/home/coin/SVN-release/OS-2.3.2/OS/src/OSCommonInterfaces/OSOption.cpp

Go to the documentation of this file.
00001 /* $Id: OSOption.cpp 3711 2010-10-05 23:29:09Z Gassmann $ */
00018 //#define DEBUG
00019 
00020 #ifdef  DEBUG
00021 #define DEBUG_OSOPTION
00022 #endif
00023 
00024 #include "OSOption.h"
00025 #include "OSParameters.h"
00026 #include "OSGeneral.h"
00027 #include "OSErrorClass.h"
00028 #include "CoinFinite.hpp"
00029 #include <iostream> 
00030 #include <sstream>
00031 #include <limits>
00032 #include <cstdio>
00033 
00034 using namespace std;
00035 
00036 InstanceLocationOption::InstanceLocationOption(): 
00037         locationType ("local"),
00038         value ("")
00039 {    
00040         #ifdef DEBUG_OSOPTION
00041         cout << "Inside InstanceLocationOption Constructor" << endl;
00042         #endif
00043 }// end InstanceLocationOption constructor  
00044 
00045 InstanceLocationOption::~InstanceLocationOption()
00046 {    
00047         #ifdef DEBUG_OSOPTION
00048         cout << "InstanceLocationOption Destructor Called" << endl;
00049         #endif
00050 }//end InstanceLocationOption destructor 
00051 
00052 
00053 ContactOption::ContactOption(): 
00054         transportType ("osp"),
00055         value ("")
00056 {    
00057         #ifdef DEBUG_OSOPTION
00058         cout << "Inside ContactOption Constructor" << endl;
00059         #endif
00060 }// end ContactOption constructor 
00061 
00062 ContactOption::~ContactOption()
00063 {    
00064         #ifdef DEBUG_OSOPTION
00065         cout << "ContactOption Destructor Called" << endl;
00066         #endif
00067 }//end ContactOption destructor
00068 
00069 
00070 OtherOption::OtherOption(): 
00071         name (""),
00072         value (""),
00073         description ("")
00074 {    
00075         #ifdef DEBUG_OSOPTION
00076         cout << "Inside OtherOption Constructor" << endl;
00077         #endif
00078 }// end OtherOption constructor 
00079 
00080 OtherOption::~OtherOption()
00081 {    
00082         #ifdef DEBUG_OSOPTION
00083         cout << "OtherOption Destructor Called" << endl;
00084         #endif
00085 }//end OtherOption destructor
00086 
00087 
00088 OtherOptions::OtherOptions(): 
00089         numberOfOtherOptions(0)
00090 {    
00091         #ifdef DEBUG_OSOPTION
00092         cout << "Inside OtherOptions Constructor" << endl;
00093         #endif
00094         other = NULL;
00095 }// end OtherOptions constructor 
00096 
00097 OtherOptions::~OtherOptions()
00098 {    
00099         #ifdef DEBUG_OSOPTION
00100         cout << "OtherOptions Destructor Called" << endl;
00101         #endif
00102 
00103         if (other != NULL)
00104         {       int i;
00105                 for (i=0; i<numberOfOtherOptions; i++)
00106                 {       delete other[i];
00107                         other[i] = NULL;
00108                 }
00109                 delete[] other;
00110                 other = NULL;
00111         }
00112 }//end OtherOptions destructor
00113 
00114 
00115 GeneralOption::GeneralOption(): 
00116         serviceURI (""),
00117         serviceName (""),
00118         instanceName (""),
00119         jobID (""),
00120         solverToInvoke (""),
00121         license (""),
00122         userName (""),
00123         password ("")
00124 {    
00125         #ifdef DEBUG_OSOPTION
00126         cout << "Inside GeneralOption Constructor" << endl;
00127         #endif
00128         instanceLocation = NULL;
00129         contact = NULL;
00130         otherOptions = NULL;
00131 }// end GeneralOption constructor  
00132 
00133 GeneralOption::~GeneralOption()
00134 {    
00135         #ifdef DEBUG_OSOPTION
00136         cout << "GeneralOption Destructor Called" << endl;
00137         #endif
00138         if (instanceLocation != NULL) delete instanceLocation;
00139         instanceLocation = NULL;
00140         if (contact != NULL) delete contact;
00141         contact = NULL;
00142         if (otherOptions != NULL) delete otherOptions;
00143         otherOptions = NULL;
00144 }//end GeneralOption destructor 
00145 
00146 
00147 MinDiskSpace::MinDiskSpace():
00148         unit ("byte"),
00149         value (0.0)
00150 {
00151         #ifdef DEBUG_OSOPTION
00152         cout << "Inside MinDiskSpace Constructor" << endl;
00153         #endif
00154 }// end MinDiskSpace constructor
00155 
00156 MinDiskSpace::~MinDiskSpace()
00157 {
00158         #ifdef DEBUG_OSOPTION
00159         cout << "MinDiskSpace Destructor Called" << endl;
00160         #endif
00161 }// end MinDiskSpace constructor
00162 
00163 
00164 MinMemorySize::MinMemorySize():
00165         unit ("byte"),
00166         value (0.0)
00167 {
00168         #ifdef DEBUG_OSOPTION
00169         cout << "Inside MinMemorySize Constructor" << endl;
00170         #endif
00171 }// end MinMemorySize constructor
00172 
00173 MinMemorySize::~MinMemorySize()
00174 {
00175         #ifdef DEBUG_OSOPTION
00176         cout << "MinMemorySize Destructor Called" << endl;
00177         #endif
00178 }// end MinMemorySize constructor
00179 
00180 
00181 MinCPUSpeed::MinCPUSpeed():
00182         unit ("hertz"),
00183         value (0.0)
00184 {
00185         #ifdef DEBUG_OSOPTION
00186         cout << "Inside MinCPUSpeed Constructor" << endl;
00187         #endif
00188 }// end MinCPUSpeed constructor
00189 
00190 MinCPUSpeed::~MinCPUSpeed()
00191 {
00192         #ifdef DEBUG_OSOPTION
00193         cout << "MinCPUSpeed Destructor Called" << endl;
00194         #endif
00195 }// end MinCPUSpeed constructor
00196 
00197 
00198 SystemOption::SystemOption(): 
00199         minCPUNumber (1)
00200 {    
00201         #ifdef DEBUG_OSOPTION
00202         cout << "Inside SystemOption Constructor" << endl;
00203         #endif
00204         minDiskSpace = NULL;
00205         minMemorySize = NULL;
00206         minCPUSpeed = NULL;
00207         otherOptions = NULL;
00208 }// end SystemOption constructor  
00209 
00210 SystemOption::~SystemOption()
00211 {    
00212         #ifdef DEBUG_OSOPTION
00213         cout << "SystemOption Destructor Called" << endl;
00214         #endif
00215         if (minDiskSpace != NULL) delete minDiskSpace;
00216         minDiskSpace = NULL;
00217         if (minMemorySize != NULL) delete minMemorySize;
00218         minMemorySize = NULL;
00219         if (minCPUSpeed != NULL) delete minCPUSpeed;
00220         minCPUSpeed = NULL;
00221         if (otherOptions != NULL) delete otherOptions;
00222         otherOptions = NULL;
00223 }//end SystemOption destructor 
00224 
00225 
00226 ServiceOption::ServiceOption(): 
00227         type ("solver")
00228 {    
00229         #ifdef DEBUG_OSOPTION
00230         cout << "Inside ServiceOption Constructor" << endl;
00231         #endif
00232         otherOptions = NULL;
00233 }// end ServiceOption constructor  
00234 
00235 ServiceOption::~ServiceOption()
00236 {    
00237         #ifdef DEBUG_OSOPTION
00238         cout << "ServiceOption Destructor Called" << endl;
00239         #endif
00240         if (otherOptions != NULL) delete otherOptions;
00241         otherOptions = NULL;
00242 }//end ServiceOption destructor 
00243 
00244 
00245 MaxTime::MaxTime():
00246         unit ("second"),
00247         value (OSDBL_MAX)
00248 {
00249         #ifdef DEBUG_OSOPTION
00250         cout << "Inside MaxTime Constructor" << endl;
00251         #endif
00252 }// end MaxTime constructor
00253 
00254 MaxTime::~MaxTime()
00255 {
00256         #ifdef DEBUG_OSOPTION
00257         cout << "MaxTime Destructor Called" << endl;
00258         #endif
00259 }// end MaxTime constructor
00260 
00261 
00262 JobDependencies::JobDependencies():
00263         numberOfJobIDs (0)
00264 {    
00265         #ifdef DEBUG_OSOPTION
00266         cout << "Inside JobDependencies Constructor" << endl;
00267         #endif
00268         jobID = NULL;
00269 }// end JobDependencies constructor  
00270 
00271 JobDependencies::~JobDependencies()
00272 {    
00273         #ifdef DEBUG_OSOPTION
00274         cout << "JobDependencies Destructor Called" << endl;
00275         #endif
00276 
00277         if (jobID != NULL) 
00278         {       delete[] jobID;
00279                 jobID = NULL;
00280         }
00281 }//end JobDependencies destructor 
00282 
00283 
00284 DirectoriesAndFiles::DirectoriesAndFiles():
00285         numberOfPaths (0)
00286 {    
00287         #ifdef DEBUG_OSOPTION
00288         cout << "Inside DirectoriesAndFiles Constructor" << endl;
00289         #endif
00290         path = NULL;
00291 }// end DirectoriesAndFiles constructor  template
00292 
00293 DirectoriesAndFiles::~DirectoriesAndFiles()
00294 {    
00295         #ifdef DEBUG_OSOPTION
00296         cout << "DirectoriesAndFiles Destructor Called" << endl;
00297         #endif
00298         if (path != NULL) 
00299         {       delete[] path;
00300                 path = NULL;
00301         }
00302 }//end DirectoriesAndFiles destructor 
00303 
00304 
00305 PathPair::PathPair():
00306         from (""),
00307         to (""),
00308         makeCopy (false)
00309 {    
00310         #ifdef DEBUG_OSOPTION
00311         cout << "Inside PathPair Constructor" << endl;
00312         #endif
00313 }// end PathPair constructor  
00314 
00315 PathPair::~PathPair()
00316 {    
00317         #ifdef DEBUG_OSOPTION
00318         cout << "PathPair Destructor Called" << endl;
00319         #endif
00320 }//end PathPair destructor 
00321 
00322 
00323 PathPairs::PathPairs():
00324         numberOfPathPairs(0)
00325 {    
00326         #ifdef DEBUG_OSOPTION
00327         cout << "Inside PathPairs Constructor" << endl;
00328         #endif
00329         pathPair = NULL;
00330 }// end PathPairs constructor  
00331 
00332 PathPairs::~PathPairs()
00333 {    
00334         #ifdef DEBUG_OSOPTION
00335         cout << "PathPairs Destructor Called" << endl;
00336         #endif
00337         int i;
00338         if (pathPair != NULL) 
00339         {       for (i=0; i < numberOfPathPairs; i++)   
00340                 {       delete pathPair[i];
00341                         pathPair[i] = NULL;
00342                 }
00343                 delete[] pathPair;
00344                 pathPair = NULL;
00345         }
00346 }//end PathPairs destructor 
00347 
00348 
00349 
00350 Processes::Processes():
00351         numberOfProcesses(0)
00352 {    
00353         #ifdef DEBUG_OSOPTION
00354         cout << "Inside Processes Constructor" << endl;
00355         #endif
00356         process = NULL;
00357 }// end Processes constructor  
00358 
00359 Processes::~Processes()
00360 {    
00361         #ifdef DEBUG_OSOPTION
00362         cout << "Processes Destructor Called" << endl;
00363         #endif
00364         if (process != NULL) 
00365         {       delete[] process;
00366                 process = NULL;
00367         }
00368 }//end Processes destructor 
00369 
00370 
00371 JobOption::JobOption():
00372         requestedStartTime("")
00373 {    
00374         #ifdef DEBUG_OSOPTION
00375         cout << "Inside JobOption Constructor" << endl;
00376         #endif
00377         maxTime = NULL;
00378         dependencies = NULL;
00379         requiredDirectories = NULL;
00380         requiredFiles = NULL;
00381         directoriesToMake = NULL;
00382         filesToMake = NULL;
00383         inputDirectoriesToMove = NULL;
00384         inputFilesToMove = NULL;
00385         outputFilesToMove = NULL;
00386         outputDirectoriesToMove = NULL;
00387         filesToDelete = NULL;
00388         directoriesToDelete = NULL;
00389         processesToKill = NULL;
00390         otherOptions = NULL;
00391 }// end JobOption constructor  
00392 
00393 JobOption::~JobOption()
00394 {    
00395         #ifdef DEBUG_OSOPTION
00396         cout << "JobOption Destructor Called" << endl;
00397         #endif
00398         if (maxTime != NULL) delete maxTime;
00399         maxTime = NULL;
00400         if (dependencies != NULL) delete dependencies;
00401         dependencies = NULL;
00402         if (requiredDirectories != NULL) delete requiredDirectories;
00403         requiredDirectories = NULL;
00404         if (requiredFiles != NULL) delete requiredFiles;
00405         requiredFiles = NULL;
00406         if (directoriesToMake != NULL) delete directoriesToMake;
00407         directoriesToMake = NULL;
00408         if (filesToMake != NULL) delete filesToMake;
00409         filesToMake = NULL;
00410         if (inputDirectoriesToMove != NULL) delete inputDirectoriesToMove;
00411         inputDirectoriesToMove = NULL;
00412         if (inputFilesToMove != NULL) delete inputFilesToMove;
00413         inputFilesToMove = NULL;
00414         if (outputDirectoriesToMove != NULL) delete outputDirectoriesToMove;
00415         outputDirectoriesToMove = NULL;
00416         if (outputFilesToMove != NULL) delete outputFilesToMove;
00417         outputFilesToMove = NULL;
00418         if (filesToDelete != NULL) delete filesToDelete;
00419         filesToDelete = NULL;
00420         if (directoriesToDelete != NULL) delete directoriesToDelete;
00421         directoriesToDelete = NULL;
00422         if (processesToKill != NULL) delete processesToKill;
00423         processesToKill = NULL;
00424         if (otherOptions != NULL) delete otherOptions;
00425         otherOptions = NULL;
00426 }//end JobOption destructor 
00427 
00428 
00429 InitVarValue::InitVarValue(): 
00430         idx (-1),
00431         value (OSNAN)
00432 {    
00433         #ifdef DEBUG_OSOPTION
00434         cout << "Inside InitVarValue Constructor" << endl;
00435         #endif
00436 }// end InitVarValue constructor  
00437 
00438 InitVarValue::~InitVarValue()
00439 {    
00440         #ifdef DEBUG_OSOPTION
00441         cout << "InitVarValue Destructor Called" << endl;
00442         #endif
00443 }//end InitVarValue destructor 
00444 
00445 
00446 InitVariableValues::InitVariableValues():
00447         numberOfVar (0)
00448 {    
00449         #ifdef DEBUG_OSOPTION
00450         cout << "Inside InitVariableValues Constructor" << endl;
00451         #endif
00452         var = NULL;
00453 }// end InitVariableValues constructor  
00454 
00455 InitVariableValues::~InitVariableValues()
00456 {    
00457         #ifdef DEBUG_OSOPTION
00458         cout << "InitVariableValues Destructor Called" << endl;
00459         #endif
00460         int i;
00461         if (var != NULL) 
00462         {       for (i=0; i < numberOfVar; i++)
00463                 {       delete var[i];
00464                         var[i] = NULL;
00465                 }
00466                 delete[] var;
00467                 var = NULL;
00468         }
00469 }//end InitVariableValues destructor 
00470 
00471 
00472 InitVarValueString::InitVarValueString(): 
00473         idx (-1),
00474         value ("")
00475 {    
00476         #ifdef DEBUG_OSOPTION
00477         cout << "Inside InitVarValueString Constructor" << endl;
00478         #endif
00479 }// end InitVarValueString constructor  
00480 
00481 InitVarValueString::~InitVarValueString()
00482 {    
00483         #ifdef DEBUG_OSOPTION
00484         cout << "InitVarValueString Destructor Called" << endl;
00485         #endif
00486 }//end InitVarValueString destructor 
00487 
00488 
00489 InitVariableValuesString::InitVariableValuesString():
00490         numberOfVar (0)
00491 {    
00492         #ifdef DEBUG_OSOPTION
00493         cout << "Inside InitVariableValuesString Constructor" << endl;
00494         #endif
00495         var = NULL;
00496 }// end InitVariableValuesString constructor  
00497 
00498 InitVariableValuesString::~InitVariableValuesString()
00499 {    
00500         #ifdef DEBUG_OSOPTION
00501         cout << "InitVariableValuesString Destructor Called" << endl;
00502         #endif
00503         int i;
00504         if (var != NULL) 
00505         {       for (i=0; i < numberOfVar; i++)
00506                 {       delete var[i];
00507                         var[i] = NULL;
00508                 }
00509                 delete[] var;
00510                 var = NULL;
00511         }
00512 }//end InitVariableValues destructor 
00513 
00514 InitBasStatus::InitBasStatus(): 
00515         idx (-1),
00516         value ("unknown")
00517 {    
00518         #ifdef DEBUG_OSOPTION
00519         cout << "Inside InitBasStatus Constructor" << endl;
00520         #endif
00521 }// end InitBasStatus constructor  
00522 
00523 InitBasStatus::~InitBasStatus()
00524 {    
00525         #ifdef DEBUG_OSOPTION
00526         cout << "InitBasStatus Destructor Called" << endl;
00527         #endif
00528 }//end InitBasStatus destructor 
00529 
00530 
00531 InitialBasisStatus::InitialBasisStatus():
00532         numberOfVar (0)
00533 {    
00534         #ifdef DEBUG_OSOPTION
00535         cout << "Inside InitialBasisStatus Constructor" << endl;
00536         #endif
00537         var = NULL;
00538 }// end InitialBasisStatus constructor  
00539 
00540 InitialBasisStatus::~InitialBasisStatus()
00541 {    
00542         #ifdef DEBUG_OSOPTION
00543         cout << "InitialBasisStatus Destructor Called" << endl;
00544         #endif
00545         if (var != NULL) 
00546         {       int i;
00547                 for (i=0; i < numberOfVar; i++)
00548                 {       delete var[i];
00549                         var[i] = NULL;
00550                 }
00551                 delete[] var;
00552                 var = NULL;
00553         }
00554 }//end InitialBasisStatus destructor 
00555 
00556 BranchingWeight::BranchingWeight(): 
00557         idx (-1),
00558         value (0.0)
00559 {    
00560         #ifdef DEBUG_OSOPTION
00561         cout << "Inside BranchingWeight Constructor" << endl;
00562         #endif
00563 }// end BranchingWeight constructor  
00564 
00565 BranchingWeight::~BranchingWeight()
00566 {    
00567         #ifdef DEBUG_OSOPTION
00568         cout << "BranchingWeight Destructor Called" << endl;
00569         #endif
00570 }//end BranchingWeight destructor 
00571 
00572 
00573 IntegerVariableBranchingWeights::IntegerVariableBranchingWeights():
00574         numberOfVar (0)
00575 {    
00576         #ifdef DEBUG_OSOPTION
00577         cout << "Inside IntegerVariableBranchingWeights Constructor" << endl;
00578         #endif
00579         var = NULL;
00580 }// end IntegerVariableBranchingWeights constructor  
00581 
00582 IntegerVariableBranchingWeights::~IntegerVariableBranchingWeights()
00583 {    
00584         #ifdef DEBUG_OSOPTION
00585         cout << "IntegerVariableBranchingWeights Destructor Called; numberOfVar=" << numberOfVar << endl;
00586         #endif
00587         if (var != NULL) 
00588         {       int i;
00589                 for (i=0; i < numberOfVar; i++)
00590                 {       delete var[i];
00591                         var[i] = NULL;
00592                 }
00593                 delete[] var;
00594                 var = NULL;
00595         }
00596 }//end IntegerVariableBranchingWeights destructor 
00597 
00598 SOSWeights::SOSWeights():
00599         sosIdx (-1),
00600         groupWeight (1.0),
00601         numberOfVar (0)
00602 {    
00603         #ifdef DEBUG_OSOPTION
00604         cout << "Inside SOSWeights Constructor" << endl;
00605         #endif
00606         var = NULL;
00607 }// end SOSWeights constructor  
00608 
00609 SOSWeights::~SOSWeights()
00610 {    
00611         #ifdef DEBUG_OSOPTION
00612         cout << "SOSWeights Destructor Called" << endl;
00613         #endif
00614         if (var != NULL) 
00615         {       int i;
00616                 for (i=0; i < numberOfVar; i++)
00617                 {       delete var[i];
00618                         var[i] = NULL;
00619                 }
00620                 delete[] var;
00621                 var = NULL;
00622         }
00623 }//end SOSWeights destructor 
00624 
00625 SOSVariableBranchingWeights::SOSVariableBranchingWeights():
00626         numberOfSOS (0)
00627 {    
00628         #ifdef DEBUG_OSOPTION
00629         cout << "Inside SOSVariableBranchingWeights Constructor" << endl;
00630         #endif
00631         sos = NULL;
00632 }// end SOSVariableBranchingWeights constructor  
00633 
00634 SOSVariableBranchingWeights::~SOSVariableBranchingWeights()
00635 {    
00636         #ifdef DEBUG_OSOPTION
00637         cout << "SOSVariableBranchingWeights Destructor Called" << endl;
00638         #endif
00639         if (sos != NULL) 
00640         {       int i;
00641                 for (i=0; i < numberOfSOS; i++)
00642                 {       delete sos[i];
00643                         sos[i] = NULL;
00644                 }
00645                 delete[] sos;
00646                 sos = NULL;
00647         }
00648 }//end SOSVariableBranchingWeights destructor 
00649 
00650 OtherVarOption::OtherVarOption(): 
00651         idx (0),
00652         value (""),
00653         lbValue (""),
00654         ubValue ("")
00655 {    
00656         #ifdef DEBUG_OSOPTION
00657         cout << "Inside OtherVarOption Constructor" << endl;
00658         #endif
00659 }// end OtherVarOption constructor  
00660 
00661 OtherVarOption::~OtherVarOption()
00662 {    
00663         #ifdef DEBUG_OSOPTION
00664         cout << "OtherVarOption Destructor Called" << endl;
00665         #endif
00666 }//end OtherVarOption destructor 
00667 
00668 
00669 OtherVariableOption::OtherVariableOption(): 
00670         numberOfVar (0),
00671         name (""),
00672         value (""),
00673         solver(""),
00674         category (""),
00675         type ("string"),
00676         description ("")
00677 {    
00678         #ifdef DEBUG_OSOPTION
00679         cout << "Inside OtherVariableOption Constructor" << endl;
00680         #endif
00681         var = NULL;
00682 }// end OtherVariableOption constructor  
00683 
00684 OtherVariableOption::~OtherVariableOption()
00685 {    
00686         #ifdef DEBUG_OSOPTION
00687         cout << "OtherVariableOption Destructor Called" << endl;
00688         #endif
00689         if (var != NULL) 
00690         {       int i;
00691                 for (i=0; i < numberOfVar; i++)
00692                 {       delete var[i];
00693                         var[i] = NULL;
00694                 }
00695                 delete[] var;
00696                 var = NULL;
00697         };
00698 }//end OtherVariableOption destructor 
00699 
00700 
00701 VariableOption::VariableOption():
00702         numberOfOtherVariableOptions(0)
00703 {    
00704         #ifdef DEBUG_OSOPTION
00705         cout << "Inside VariableOption Constructor" << endl;
00706         #endif
00707         initialVariableValues = NULL;
00708         initialVariableValuesString = NULL;
00709         initialBasisStatus = NULL;
00710         integerVariableBranchingWeights = NULL;
00711         sosVariableBranchingWeights = NULL;
00712         other = NULL;
00713 }// end VariableOption constructor  
00714 
00715 VariableOption::~VariableOption()
00716 {    
00717         #ifdef DEBUG_OSOPTION
00718         cout << "VariableOption Destructor Called" << endl;
00719         #endif
00720         if (initialVariableValues != NULL) delete initialVariableValues;
00721         initialVariableValues = NULL;
00722         if (initialVariableValuesString != NULL) delete initialVariableValuesString;
00723         initialVariableValuesString = NULL;
00724         if (initialBasisStatus != NULL) delete initialBasisStatus;
00725         initialBasisStatus = NULL;
00726         if (integerVariableBranchingWeights != NULL) delete integerVariableBranchingWeights;
00727         integerVariableBranchingWeights = NULL;
00728         if (sosVariableBranchingWeights != NULL) delete sosVariableBranchingWeights;
00729         sosVariableBranchingWeights = NULL;
00730         if (other != NULL) 
00731         {   int i;
00732                 for (i=0; i < numberOfOtherVariableOptions; i++)
00733                 {       if (other[i] != NULL)
00734                                 delete other[i];
00735                                 other[i] = NULL;
00736                 
00737                 };
00738                 delete[] other;
00739                 other = NULL;
00740         };
00741 }//end VariableOption destructor 
00742 
00743 
00744 InitObjValue::InitObjValue(): 
00745         idx (-1),
00746         value (OSNAN)
00747 {    
00748         #ifdef DEBUG_OSOPTION
00749         cout << "Inside InitObjValue Constructor" << endl;
00750         #endif
00751 }// end InitObjValue constructor  
00752 
00753 InitObjValue::~InitObjValue()
00754 {    
00755         #ifdef DEBUG_OSOPTION
00756         cout << "InitObjValue Destructor Called" << endl;
00757         #endif
00758 }//end InitObjValue destructor 
00759 
00760 
00761 InitObjectiveValues::InitObjectiveValues():
00762         numberOfObj (0)
00763 {    
00764         #ifdef DEBUG_OSOPTION
00765         cout << "Inside InitObjectiveValues Constructor" << endl;
00766         #endif
00767         obj = NULL;
00768 }// end InitObjectiveValues constructor  
00769 
00770 InitObjectiveValues::~InitObjectiveValues()
00771 {    
00772         #ifdef DEBUG_OSOPTION
00773         cout << "InitObjectiveValues Destructor Called" << endl;
00774         #endif
00775         if (obj != NULL) 
00776         {       int i;
00777                 for (i=0; i < numberOfObj; i++)
00778                 {       delete obj[i];
00779                         obj[i] = NULL;
00780                 }
00781                 delete[] obj;
00782                 obj = NULL;
00783         };
00784 }//end InitObjectiveValues destructor 
00785 
00786 
00787 InitObjBound::InitObjBound(): 
00788         idx (-1),
00789         lbValue (-OSDBL_MAX),
00790         ubValue ( OSDBL_MAX)
00791 {    
00792         #ifdef DEBUG_OSOPTION
00793         cout << "Inside InitObjBound Constructor" << endl;
00794         #endif
00795 }// end  constructor  template
00796 
00797 InitObjBound::~InitObjBound()
00798 {    
00799         #ifdef DEBUG_OSOPTION
00800         cout << "InitObjBound Destructor Called" << endl;
00801         #endif
00802 }//end InitObjBound destructor 
00803 
00804 
00805 InitObjectiveBounds::InitObjectiveBounds():
00806         numberOfObj (0)
00807 {    
00808         #ifdef DEBUG_OSOPTION
00809         cout << "Inside InitObjectiveBounds Constructor" << endl;
00810         #endif
00811         obj = NULL;
00812 }// end InitObjectiveBounds constructor  
00813 
00814 InitObjectiveBounds::~InitObjectiveBounds()
00815 {    
00816         #ifdef DEBUG_OSOPTION
00817         cout << "InitObjectiveBounds Destructor Called" << endl;
00818         #endif
00819         if (obj != NULL) 
00820         {       int i;
00821                 for (i=0; i < numberOfObj; i++)
00822                 {       delete obj[i];
00823                         obj[i] = NULL;
00824                 }
00825                 delete[] obj;
00826                 obj = NULL;
00827         };
00828 }//end InitObjectiveBounds destructor 
00829 
00830 
00831 OtherObjOption::OtherObjOption(): 
00832         idx (-1),
00833         value (""),
00834         lbValue (""),
00835         ubValue ("")
00836 {    
00837         #ifdef DEBUG_OSOPTION
00838         cout << "Inside OtherObjOption Constructor" << endl;
00839         #endif
00840 }// end OtherObjOption constructor  
00841 
00842 OtherObjOption::~OtherObjOption()
00843 {    
00844         #ifdef DEBUG_OSOPTION
00845         cout << "OtherObjOption Destructor Called" << endl;
00846         #endif
00847 }//end OtherObjOption destructor 
00848 
00849 
00850 OtherObjectiveOption::OtherObjectiveOption(): 
00851         numberOfObj (0),
00852         name (""),
00853         value (""),
00854         solver(""),
00855         category (""),
00856         type ("string"),
00857         description ("")
00858 {    
00859         #ifdef DEBUG_OSOPTION
00860         cout << "Inside OtherObjectiveOption Constructor" << endl;
00861         #endif
00862         obj = NULL;
00863 }// end OtherObjectiveOption constructor  
00864 
00865 OtherObjectiveOption::~OtherObjectiveOption()
00866 {    
00867         #ifdef DEBUG_OSOPTION
00868         cout << "OtherObjectiveOption Destructor Called" << endl;
00869         #endif
00870         if (obj != NULL) 
00871         {       int i;
00872                 for (i=0; i < numberOfObj; i++)
00873                 {       delete obj[i];
00874                         obj[i] = NULL;
00875                 }
00876                 delete[] obj;
00877                 obj = NULL;
00878         };
00879 }//end OtherObjectiveOption destructor 
00880 
00881 
00882 ObjectiveOption::ObjectiveOption(): 
00883         numberOfOtherObjectiveOptions (0)
00884 {    
00885         #ifdef DEBUG_OSOPTION
00886         cout << "Inside ObjectiveOption Constructor" << endl;
00887         #endif
00888         initialObjectiveValues = NULL;
00889         initialObjectiveBounds = NULL;
00890         other = NULL;
00891 }// end ObjectiveOption constructor  
00892 
00893 ObjectiveOption::~ObjectiveOption()
00894 {    
00895         #ifdef DEBUG_OSOPTION
00896         cout << "ObjectiveOption Destructor Called" << endl;
00897         #endif
00898         if (initialObjectiveValues != NULL) delete initialObjectiveValues;
00899         initialObjectiveValues = NULL;
00900         if (initialObjectiveBounds != NULL) delete initialObjectiveBounds;
00901         initialObjectiveBounds = NULL;
00902         if (other != NULL) 
00903         {       int i;
00904                 for (i=0; i < numberOfOtherObjectiveOptions; i++)
00905                 {       delete other[i];
00906                         other[i] = NULL;
00907                 }
00908                 delete[] other;
00909                 other = NULL;
00910         }
00911 }//end ObjectiveOption destructor 
00912 
00913 
00914 InitConValue::InitConValue(): 
00915         idx (0),
00916         value (OSNAN)
00917 {    
00918         #ifdef DEBUG_OSOPTION
00919         cout << "Inside InitConValue Constructor" << endl;
00920         #endif
00921 }// end InitConValue constructor  
00922 
00923 InitConValue::~InitConValue()
00924 {    
00925         #ifdef DEBUG_OSOPTION
00926         cout << "InitConValue Destructor Called" << endl;
00927         #endif
00928 }//end InitConValue destructor 
00929 
00930 
00931 InitConstraintValues::InitConstraintValues(): 
00932         numberOfCon (0)
00933 {    
00934         #ifdef DEBUG_OSOPTION
00935         cout << "Inside InitConstraintValues Constructor" << endl;
00936         #endif
00937         con = NULL;
00938 }// end InitConstraintValues constructor  
00939 
00940 InitConstraintValues::~InitConstraintValues()
00941 {    
00942         #ifdef DEBUG_OSOPTION
00943         cout << "InitConstraintValues Destructor Called" << endl;
00944         #endif
00945         if (con != NULL) 
00946         {       int i;
00947                 for (i=0; i < numberOfCon; i++)
00948                 {       delete con[i];
00949                         con[i] = NULL;
00950                 }
00951                 delete[] con;
00952                 con = NULL;
00953         };
00954 }//end InitConstraintValues destructor
00955 
00956 
00957 InitDualVarValue::InitDualVarValue(): 
00958         idx (0),
00959         lbDualValue (0.0),
00960         ubDualValue (0.0)
00961 {    
00962         #ifdef DEBUG_OSOPTION
00963         cout << "Inside InitDualVarValue Constructor" << endl;
00964         #endif
00965 }// end InitDualVarValue constructor  
00966 
00967 InitDualVarValue::~InitDualVarValue()
00968 {    
00969         #ifdef DEBUG_OSOPTION
00970         cout << "InitDualVarValue Destructor Called" << endl;
00971         #endif
00972 }//end InitDualVarValue destructor
00973 
00974 
00975 InitDualVariableValues::InitDualVariableValues(): 
00976         numberOfCon (0)
00977 {    
00978         #ifdef DEBUG_OSOPTION
00979         cout << "Inside InitDualVariableValues Constructor" << endl;
00980         #endif
00981         con = NULL;
00982 }// end InitDualVariableValues constructor  
00983 
00984 InitDualVariableValues::~InitDualVariableValues()
00985 {    
00986         #ifdef DEBUG_OSOPTION
00987         cout << "InitDualVariableValues Destructor Called" << endl;
00988         #endif
00989         if (con != NULL) 
00990         {       int i;
00991                 for (i=0; i < numberOfCon; i++)
00992                 {       delete con[i];
00993                         con[i] = NULL;
00994                 }
00995                 delete[] con;
00996                 con = NULL;
00997         };
00998 }//end InitDualVariableValues destructor
00999 
01000 
01001 OtherConOption::OtherConOption(): 
01002         idx (0),
01003         value (""),
01004         lbValue (""),
01005         ubValue ("")
01006 {    
01007         #ifdef DEBUG_OSOPTION
01008         cout << "Inside OtherConOption Constructor" << endl;
01009         #endif
01010 }// end OtherConOption constructor  
01011 
01012 OtherConOption::~OtherConOption()
01013 {    
01014         #ifdef DEBUG_OSOPTION
01015         cout << "OtherConOption Destructor Called" << endl;
01016         #endif
01017 }//end OtherConOption destructor
01018 
01019 
01020 OtherConstraintOption::OtherConstraintOption(): 
01021         numberOfCon(0),
01022         name (""),
01023         value (""),
01024         solver(""),
01025         category (""),
01026         type ("string"),
01027         description ("")
01028 {    
01029         #ifdef DEBUG_OSOPTION
01030         cout << "Inside OtherConstraintOption Constructor" << endl;
01031         #endif
01032         con = NULL;
01033 }// end OtherConstraintOption constructor  
01034 
01035 OtherConstraintOption::~OtherConstraintOption()
01036 {    
01037         #ifdef DEBUG_OSOPTION
01038         cout << "OtherConstraintOption Destructor Called" << endl;
01039         #endif
01040         if (con != NULL) 
01041         {       int i;
01042                 for (i=0; i < numberOfCon; i++)
01043                 {       delete con[i];
01044                         con[i] = NULL;
01045                 }
01046                 delete[] con;
01047                 con = NULL;
01048         };
01049 }//end OtherConstraintOption destructor
01050 
01051 
01052 ConstraintOption::ConstraintOption(): 
01053         numberOfOtherConstraintOptions (0)
01054 {    
01055         #ifdef DEBUG_OSOPTION
01056         cout << "Inside ConstraintOption Constructor" << endl;
01057         #endif
01058         initialConstraintValues = NULL;
01059         initialDualValues = NULL;
01060         other = NULL;
01061 }// end ConstraintOption constructor  
01062 
01063 ConstraintOption::~ConstraintOption()
01064 {    
01065         #ifdef DEBUG_OSOPTION
01066         cout << "ConstraintOption Destructor Called" << endl;
01067         #endif
01068         if (initialConstraintValues != NULL) delete initialConstraintValues;
01069         initialConstraintValues = NULL;
01070         if (initialDualValues != NULL) delete initialDualValues;
01071         initialDualValues = NULL;
01072         if (other != NULL) 
01073         {       int i;
01074                 for (i=0; i < numberOfOtherConstraintOptions; i++)
01075                 {       delete other[i];
01076                         other[i] = NULL;
01077                 }
01078                 delete[] other;
01079                 other = NULL;
01080         }
01081 }//end ConstraintOption destructor
01082 
01083 
01084 SolverOption::SolverOption(): 
01085         name (""),
01086         value (""),
01087         solver(""),
01088         category (""),
01089         type (""),
01090         description ("")
01091 {    
01092         #ifdef DEBUG_OSOPTION
01093         cout << "Inside SolverOption Constructor" << endl;
01094         #endif
01095 }// end SolverOption constructor  
01096 
01097 SolverOption::~SolverOption()
01098 {    
01099         #ifdef DEBUG_OSOPTION
01100         cout << "SolverOption Destructor Called" << endl;
01101         #endif
01102 }//end SolverOption destructor
01103 
01104 
01105 SolverOptions::SolverOptions(): 
01106         numberOfSolverOptions(0)
01107 {    
01108         #ifdef DEBUG_OSOPTION
01109         cout << "Inside SolverOptions Constructor" << endl;
01110         #endif
01111         solverOption = NULL;
01112 }// end SolverOptions constructor 
01113 
01114 SolverOptions::~SolverOptions()
01115 {    
01116         #ifdef DEBUG_OSOPTION
01117         cout << "SolverOptions Destructor Called; numberOfSolverOptions=" << numberOfSolverOptions << endl;
01118         #endif
01119         if (solverOption != NULL)
01120         {       int i;
01121                 for (i=0; i<numberOfSolverOptions; i++)
01122                 {       delete solverOption[i];
01123                         solverOption[i] = NULL;
01124                 }
01125                 delete[] solverOption;
01126                 solverOption = NULL;
01127         }
01128 }//end SolverOptions destructor
01129 
01130 
01131 OptimizationOption::OptimizationOption(): 
01132         numberOfVariables (-1),
01133         numberOfObjectives (-1),
01134         numberOfConstraints (-1)
01135 {    
01136         #ifdef DEBUG_OSOPTION
01137         cout << "Inside OptimizationOption Constructor" << endl;
01138         #endif
01139         variables = NULL;
01140         objectives = NULL;
01141         constraints = NULL;
01142         solverOptions = NULL;
01143 }// end OptimizationOption constructor  
01144 
01145 OptimizationOption::~OptimizationOption()
01146 {    
01147         #ifdef DEBUG_OSOPTION
01148         cout << "OptimizationOption Destructor Called" << endl;
01149         #endif
01150         if (variables != NULL) delete variables;
01151         variables = NULL;
01152         if (objectives != NULL) delete objectives;
01153         objectives = NULL;
01154         if (constraints != NULL) delete constraints;
01155         constraints = NULL;
01156         if (solverOptions != NULL) delete solverOptions;
01157         solverOptions = NULL;
01158 }//end OptimizationOption destructor
01159 
01160 
01161 OSOption::OSOption() 
01162 //(initializations)
01163 {    
01164         #ifdef DEBUG_OSOPTION
01165         cout << "Inside OSOption Constructor" << endl;
01166         #endif
01167 
01168         general = NULL;
01169         system = NULL;
01170         service = NULL;
01171         job = NULL;
01172         optimization = NULL;
01173         m_mdInitVarValuesDense = NULL;
01174         m_mdInitVarValuesStringDense = NULL;
01175         m_mdInitBasisStatusDense = NULL;
01176         m_mdIntegerVariableBranchingWeightsDense = NULL;
01177         m_mdInitObjValuesDense = NULL;
01178         m_mdInitObjLowerBoundsDense = NULL;
01179         m_mdInitObjUpperBoundsDense = NULL;
01180         m_mdInitConValuesDense = NULL;
01181         m_mdInitDualVarLowerBoundsDense = NULL;
01182         m_mdInitDualVarUpperBoundsDense = NULL;
01183 }// end OSOption constructor  
01184 
01185 OSOption::~OSOption()
01186 {    
01187         #ifdef DEBUG_OSOPTION
01188         cout << "OSOption Destructor Called" << endl;
01189         #endif
01190         if (general != NULL) delete general;
01191         general = NULL;
01192         if (system != NULL) delete system;
01193         system = NULL;
01194         if (service != NULL) delete service;
01195         service = NULL;
01196         if (job != NULL) delete job;
01197         job = NULL;
01198         if (optimization != NULL) delete optimization;
01199         optimization = NULL;
01200 
01201         if (m_mdInitVarValuesDense != NULL) 
01202                 delete[] m_mdInitVarValuesDense;
01203         m_mdInitVarValuesDense = NULL;
01204 
01205         if (m_mdInitVarValuesStringDense != NULL) 
01206                 delete[] m_mdInitVarValuesStringDense;
01207         m_mdInitVarValuesStringDense = NULL;
01208 
01209         if (m_mdInitBasisStatusDense != NULL) 
01210                 delete[] m_mdInitBasisStatusDense;
01211         m_mdInitBasisStatusDense = NULL;
01212 
01213         if (m_mdIntegerVariableBranchingWeightsDense != NULL) 
01214                 delete[] m_mdIntegerVariableBranchingWeightsDense;
01215         m_mdIntegerVariableBranchingWeightsDense = NULL;
01216 
01217         if (m_mdInitObjValuesDense != NULL) 
01218                 delete[] m_mdInitObjValuesDense;
01219         m_mdInitObjValuesDense = NULL;
01220 
01221         if (m_mdInitObjLowerBoundsDense != NULL) 
01222                 delete[] m_mdInitObjLowerBoundsDense;
01223         m_mdInitObjLowerBoundsDense = NULL;
01224 
01225         if (m_mdInitObjUpperBoundsDense != NULL) 
01226                 delete[] m_mdInitObjUpperBoundsDense;
01227         m_mdInitObjUpperBoundsDense = NULL;
01228 
01229         if (m_mdInitConValuesDense != NULL) 
01230                 delete[] m_mdInitConValuesDense;
01231         m_mdInitConValuesDense = NULL;
01232 
01233         if (m_mdInitDualVarLowerBoundsDense != NULL) 
01234                 delete[] m_mdInitDualVarLowerBoundsDense;
01235         m_mdInitDualVarLowerBoundsDense = NULL;
01236 
01237         if (m_mdInitDualVarUpperBoundsDense != NULL) 
01238                 delete[] m_mdInitDualVarUpperBoundsDense;
01239         m_mdInitDualVarUpperBoundsDense = NULL;
01240 }//end OSOption destructor
01241 
01242 
01243 
01244 
01245 /****************************************************************
01246  * get() methods
01247  ****************************************************************/
01248 
01249 /*********************************** 
01250  * get() methods that return strings
01251  ***********************************/
01252 
01256 std::string  OSOption::getServiceURI()
01257 {       if (this->general != NULL) 
01258                 return this->general->serviceURI;
01259 
01260         return "";
01261 }//getServiceURI
01262 
01266 std::string  OSOption::getServiceName()
01267 {       if (this->general != NULL) 
01268                 return this->general->serviceName;
01269 
01270         return "";
01271 }//getServiceName
01272 
01276 std::string  OSOption::getInstanceName()
01277 {       if (this->general != NULL) 
01278                 return this->general->instanceName;
01279 
01280         return "";
01281 }//getInstanceName
01282 
01286 std::string  OSOption::getInstanceLocation()
01287 {       if (this->general != NULL) 
01288                 if (this->general->instanceLocation != NULL)
01289                         return this->general->instanceLocation->value;
01290 
01291         return "";
01292 }//getInstanceLocation
01293 
01297 std::string  OSOption::getInstanceLocationType()
01298 {       if (this->general != NULL) 
01299                 if (this->general->instanceLocation != NULL)
01300                         return this->general->instanceLocation->locationType;
01301 
01302         return "";
01303 }//getLocationType
01304 
01308 std::string  OSOption::getJobID()
01309 {       if (this->general != NULL) 
01310                 return this->general->jobID;
01311 
01312         return "";
01313 }//getJobID
01314 
01318 std::string  OSOption::getSolverToInvoke()
01319 {       if (this->general != NULL) 
01320                 return this->general->solverToInvoke;
01321 
01322         return "";
01323 }//getSolverToInvoke
01324 
01328 std::string  OSOption::getLicense()
01329 {       if (this->general != NULL) 
01330                 return this->general->license;
01331 
01332         return "";
01333 }//getLicense
01334 
01338 std::string  OSOption::getUserName()
01339 {       if (this->general != NULL) 
01340                 return this->general->userName;
01341 
01342         return "";
01343 }//getUserName
01344 
01348 std::string  OSOption::getPassword()
01349 {       if (this->general != NULL) 
01350                 return this->general->password;
01351 
01352         return "";
01353 }//getPassword
01354 
01358 std::string  OSOption::getContact()
01359 {       if (this->general != NULL) 
01360                 if (this->general->contact != NULL)
01361                         return this->general->contact->value;
01362 
01363         return "";
01364 }//getContact
01365 
01369 std::string  OSOption::getContactTransportType()
01370 {       if (this->general != NULL) 
01371                 if (this->general->contact != NULL)
01372                         return this->general->contact->transportType;
01373 
01374         return "";
01375 }//getContactTransportType
01376 
01380 std::string  OSOption::getMinDiskSpaceUnit()
01381 {       if (this->system != NULL) 
01382                 if (this->system->minDiskSpace != NULL)
01383                         return this->system->minDiskSpace->unit;
01384 
01385         return "";
01386 }//getMinDiskSpaceUnit
01387 
01391 std::string  OSOption::getMinMemoryUnit()
01392 {       if (this->system != NULL) 
01393                 if (this->system->minMemorySize != NULL)
01394                         return this->system->minMemorySize->unit;
01395 
01396         return "";
01397 }//getMinMemory
01398 
01402 std::string  OSOption::getMinCPUSpeedUnit()
01403 {       if (this->system != NULL) 
01404                 if (this->system->minCPUSpeed != NULL)
01405                         return this->system->minCPUSpeed->unit;
01406 
01407         return "";
01408 }//getMinCPUSpeed
01409 
01413 std::string  OSOption::getServiceType()
01414 {       if (this->service != NULL) 
01415                 return this->service->type;
01416 
01417         return "";
01418 }//getServiceType
01419 
01423 std::string  OSOption::getMaxTimeUnit()
01424 {       if (this->job != NULL) 
01425                 if (this->job->maxTime != NULL)
01426                         return this->job->maxTime->unit;
01427 
01428         return "";
01429 }//getMaxTimeUnit
01430 
01434 std::string  OSOption::getRequestedStartTime()
01435 {       if (this->job != NULL) 
01436                 return this->job->requestedStartTime;
01437 
01438         return "";
01439 }//getRequestedStartTime
01440 
01447 std::string  OSOption::getOptionStr(std::string optionName)
01448 {       if (optionName == "serviceURI") 
01449                 return this->getServiceURI();
01450 
01451         if (optionName == "serviceName") 
01452                 return this->getServiceName();
01453 
01454         if (optionName == "instanceName") 
01455                 return this->getInstanceName();
01456 
01457         if (optionName == "instanceLocation") 
01458                 return this->getInstanceLocation();
01459 
01460         if (optionName == "instanceLocationType") 
01461                 return this->getInstanceLocationType();
01462 
01463         if (optionName == "jobID") 
01464                 return this->getJobID();
01465 
01466         if (optionName == "solverToInvoke") 
01467                 return this->getSolverToInvoke();
01468 
01469         if (optionName == "license") 
01470                 return this->getLicense();
01471 
01472         if (optionName == "userName") 
01473                 return this->getUserName();
01474 
01475         if (optionName == "password") 
01476                 return this->getPassword();
01477 
01478         if (optionName == "contact") 
01479                 return this->getContact();
01480 
01481         if (optionName == "contactTransportType") 
01482                 return this->getContactTransportType();
01483 
01484         if (optionName == "minDiskSpaceUnit") 
01485                 return this->getMinDiskSpaceUnit();
01486 
01487         if (optionName == "minMemoryUnit") 
01488                 return this->getMinMemoryUnit();
01489 
01490         if (optionName == "minCPUSpeedUnit") 
01491                 return this->getMinCPUSpeedUnit();
01492 
01493         if (optionName == "serviceType") 
01494                 return this->getServiceType();
01495 
01496         if (optionName == "maxTimeUnit") 
01497                 return this->getMaxTimeUnit();
01498 
01499         if (optionName == "requestedStartTime") 
01500                 return this->getRequestedStartTime();
01501 
01502         return "";
01503 }//getOptionStr
01504 
01505 /*********************************** 
01506  * get() methods that return doubles
01507  ***********************************/
01508 
01512 double  OSOption::getMinDiskSpace()
01513 {       if (this->system != NULL) 
01514                 if (this->system->minDiskSpace != NULL)
01515                         return this->system->minDiskSpace->value;
01516 
01517         return 0;
01518 }//getMinDiskSpace
01519 
01523 double  OSOption::getMinMemorySize()
01524 {       if (this->system != NULL) 
01525                 if (this->system->minMemorySize != NULL)
01526                         return this->system->minMemorySize->value;
01527 
01528         return 0;
01529 }//getMinMemorySize
01530 
01534 double  OSOption::getMinCPUSpeed()
01535 {       if (this->system != NULL) 
01536                 if (this->system->minCPUSpeed != NULL)
01537                         return this->system->minCPUSpeed->value;
01538 
01539         return 0;
01540 }//getMinCPUSpeed
01541 
01545 double  OSOption::getMaxTime()
01546 {       if (this->job != NULL) 
01547                 if (this->job->maxTime != NULL)
01548                         return job->maxTime->value;
01549 
01550         return 0;
01551 }//getMaxTime
01552 
01559 double  OSOption::getOptionDbl(std::string optionName)
01560 {       if (optionName == "minDiskSpace") 
01561                 return this->getMinDiskSpace();
01562 
01563         if (optionName == "minMemory") 
01564                 return this->getMinMemorySize();
01565 
01566         if (optionName == "minCPUSpeed") 
01567                 return this->getMinCPUSpeed();
01568 
01569         if (optionName == "maxTime") 
01570                 return this->getMaxTime();
01571 
01572         return 0;
01573 }//getOptionDbl
01574 
01582 int  OSOption::getMinCPUNumber()
01583 {       if (this->system != NULL) 
01584                 return this->system->minCPUNumber;
01585 
01586         return 0;
01587 }//getMinCPUNumber
01588 
01592 int  OSOption::getNumberOfOtherGeneralOptions()
01593 {       if (this->general != NULL) 
01594                 if (this->general->otherOptions != NULL) 
01595                         return this->general->otherOptions->numberOfOtherOptions;
01596 
01597         return 0;
01598 }//getNumberOfOtherGeneralOptions
01599 
01603 int  OSOption::getNumberOfOtherSystemOptions()
01604 {       if (this->system != NULL) 
01605                 if (this->system->otherOptions != NULL) 
01606                         return this->system->otherOptions->numberOfOtherOptions;
01607 
01608         return 0;
01609 }//getNumberOfOtherSystemOptions
01610 
01614 int  OSOption::getNumberOfOtherServiceOptions()
01615 {       if (this->service != NULL) 
01616                 if (this->service->otherOptions != NULL) 
01617                         return this->service->otherOptions->numberOfOtherOptions;
01618 
01619         return 0;
01620 }//getNumberOfOtherServiceOptions
01621 
01625 int  OSOption::getNumberOfOtherJobOptions()
01626 {       if (this->job != NULL) 
01627                 if (this->job->otherOptions != NULL) 
01628                         return this->job->otherOptions->numberOfOtherOptions;
01629 
01630         return 0;
01631 }//getNumberOfOtherJobOptions
01632 
01636 int  OSOption::getNumberOfJobDependencies()
01637 {       if (this->job != NULL) 
01638                 if (this->job->dependencies != NULL) 
01639                         return this->job->dependencies->numberOfJobIDs;
01640 
01641         return 0;
01642 }//getNumberOfJobDependencies
01643 
01647 int  OSOption::getNumberOfRequiredDirectories()
01648 {       if (this->job != NULL) 
01649                 if (this->job->requiredDirectories != NULL) 
01650                         return this->job->requiredDirectories->numberOfPaths;
01651 
01652         return 0;
01653 }//getNumberOfRequiredDirectories
01654 
01658 int  OSOption::getNumberOfRequiredFiles()
01659 {       if (this->job != NULL) 
01660                 if (this->job->requiredFiles != NULL) 
01661                         return this->job->requiredFiles->numberOfPaths;
01662 
01663         return 0;
01664 }//getNumberOfRequiredFiles
01665 
01669 int  OSOption::getNumberOfDirectoriesToMake()
01670 {       if (this->job != NULL) 
01671                 if (this->job->directoriesToMake != NULL) 
01672                         return this->job->directoriesToMake->numberOfPaths;
01673 
01674         return 0;
01675 }//getNumberOfDirectoriesToMake
01676 
01680 int  OSOption::getNumberOfFilesToMake()
01681 {       if (this->job != NULL) 
01682                 if (this->job->filesToMake != NULL) 
01683                         return this->job->filesToMake->numberOfPaths;
01684 
01685         return 0;
01686 }//getNumberOfFilesToMake
01687 
01691 int  OSOption::getNumberOfInputDirectoriesToMove()
01692 {       if (this->job != NULL) 
01693                 if (this->job->inputDirectoriesToMove != NULL) 
01694                         return this->job->inputDirectoriesToMove->numberOfPathPairs;
01695 
01696         return 0;
01697 }//getNumberOfInputDirectoriesToMove
01698 
01702 int  OSOption::getNumberOfInputFilesToMove()
01703 {       if (this->job != NULL) 
01704                 if (this->job->inputFilesToMove != NULL) 
01705                         return this->job->inputFilesToMove->numberOfPathPairs;
01706 
01707         return 0;
01708 }//getNumberOfInputFilesToMove
01709 
01713 int  OSOption::getNumberOfOutputDirectoriesToMove()
01714 {       if (this->job != NULL) 
01715                 if (this->job->outputDirectoriesToMove != NULL) 
01716                         return this->job->outputDirectoriesToMove->numberOfPathPairs;
01717 
01718         return 0;
01719 }//getNumberOfOutputDirectoriesToMove
01720 
01724 int  OSOption::getNumberOfOutputFilesToMove()
01725 {       if (this->job != NULL) 
01726                 if (this->job->outputFilesToMove != NULL) 
01727                         return this->job->outputFilesToMove->numberOfPathPairs;
01728 
01729         return 0;
01730 }//getNumberOfOutputFilesToMove
01731 
01735 int  OSOption::getNumberOfFilesToDelete()
01736 {       if (this->job != NULL) 
01737                 if (this->job->filesToDelete != NULL) 
01738                         return this->job->filesToDelete->numberOfPaths;
01739 
01740         return 0;
01741 }//getNumberOfFilesToDelete
01742 
01746 int  OSOption::getNumberOfDirectoriesToDelete()
01747 {       if (this->job != NULL) 
01748                 if (this->job->directoriesToDelete != NULL) 
01749                         return this->job->directoriesToDelete->numberOfPaths;
01750 
01751         return 0;
01752 }//getNumberOfDirectoriesToDelete
01753 
01757 int  OSOption::getNumberOfProcessesToKill()
01758 {       if (this->job != NULL) 
01759                 if (this->job->processesToKill != NULL) 
01760                         return this->job->processesToKill->numberOfProcesses;
01761 
01762         return 0;
01763 }//getNumberOfProcessesToKill
01764 
01768 int  OSOption::getNumberOfVariables()
01769 {       if (this->optimization != NULL) 
01770                 return this->optimization->numberOfVariables;
01771 
01772         return -1;
01773 }//getNumberOfVariables
01774 
01778 int  OSOption::getNumberOfObjectives()
01779 {       if (this->optimization != NULL) 
01780                 return this->optimization->numberOfObjectives;
01781 
01782         return -1;
01783 }//getNumberOfObjectives
01784 
01788 int  OSOption::getNumberOfConstraints()
01789 {       if (this->optimization != NULL) 
01790                 return this->optimization->numberOfConstraints;
01791 
01792         return -1;
01793 }//getNumberOfConstraints
01794 
01795 
01799 int OSOption::getNumberOfInitVarValues()
01800 {       
01801         if (this->optimization != NULL) 
01802         {       
01803                 if (this->optimization->variables != NULL) 
01804                 {       
01805                         if (this->optimization->variables->initialVariableValues != NULL) 
01806                         {       
01807                                 return this->optimization->variables->initialVariableValues->numberOfVar;
01808                         }
01809                 }
01810         }
01811         return -1;
01812 }//getNumberOfInitVarValues
01813 
01817 int OSOption::getNumberOfInitVarValuesString()
01818 {       if (this->optimization != NULL) 
01819                 if (this->optimization->variables != NULL) 
01820                         if (this->optimization->variables->initialVariableValuesString != NULL) 
01821                                 return this->optimization->variables->initialVariableValuesString->numberOfVar;
01822         return -1;
01823 }//getNumberOfInitVarValuesString
01824 
01828 int OSOption::getNumberOfInitialBasisVariables()
01829 {       if (this->optimization != NULL) 
01830                 if (this->optimization->variables != NULL) 
01831                         if (this->optimization->variables->initialBasisStatus != NULL) 
01832                                 return this->optimization->variables->initialBasisStatus->numberOfVar;
01833         return -1;
01834 }//getNumberOfInitialBasisVariables
01835 
01839 int OSOption::getNumberOfIntegerVariableBranchingWeights()
01840 {       if (this->optimization != NULL) 
01841                 if (this->optimization->variables != NULL) 
01842                         if (this->optimization->variables->integerVariableBranchingWeights != NULL) 
01843                                 return this->optimization->variables->integerVariableBranchingWeights->numberOfVar;
01844         return -1;
01845 }//getNumberOfIntegerBranchingWeights
01846 
01850 int OSOption::getNumberOfSOS()
01851 {       if (this->optimization != NULL) 
01852                 if (this->optimization->variables != NULL) 
01853                         if (this->optimization->variables->sosVariableBranchingWeights != NULL) 
01854                                 return this->optimization->variables->sosVariableBranchingWeights->numberOfSOS;
01855         return -1;
01856 }//getNumberOfSOS
01857 
01861 int OSOption::getNumberOfSOSVarBranchingWeights(int iSOS)
01862 {       if (this->optimization != NULL) 
01863                 if (this->optimization->variables != NULL) 
01864                         if (this->optimization->variables->sosVariableBranchingWeights != NULL) 
01865                         {       if (iSOS >= 0 && iSOS < this->optimization->variables->sosVariableBranchingWeights->numberOfSOS)
01866                                         if (this->optimization->variables->sosVariableBranchingWeights->sos[iSOS] != NULL) 
01867                                                 return this->optimization->variables->sosVariableBranchingWeights->sos[iSOS]->numberOfVar;
01868                         }
01869         return -1;
01870 }//getNumberOfSOSVarBranchingWeights
01871 
01875 int OSOption::getNumberOfOtherVariableOptions()
01876 {       if (this->optimization != NULL)
01877                 if (this->optimization->variables != NULL)
01878                         return this->optimization->variables->numberOfOtherVariableOptions;
01879 
01880         return 0;
01881 }//getNumberOfOtherVariableOptions
01882 
01886 int OSOption::getNumberOfInitObjValues()
01887 {       if (this->optimization != NULL) 
01888                 if (this->optimization->objectives != NULL) 
01889                         if (this->optimization->objectives->initialObjectiveValues != NULL) 
01890                                 return this->optimization->objectives->initialObjectiveValues->numberOfObj;
01891 
01892 return -1;
01893 }//getNumberOfInitObjValues
01894 
01898 int OSOption::getNumberOfInitObjBounds()
01899 {       if (this->optimization != NULL) 
01900                 if (this->optimization->objectives != NULL) 
01901                         if (this->optimization->objectives->initialObjectiveBounds != NULL) 
01902                                 return this->optimization->objectives->initialObjectiveBounds->numberOfObj;
01903         return -1;
01904 }//getNumberOfInitObjBounds
01905 
01909 int OSOption::getNumberOfOtherObjectiveOptions()
01910 {       if (this->optimization != NULL)
01911                 if (this->optimization->objectives != NULL)
01912                         return this->optimization->objectives->numberOfOtherObjectiveOptions;
01913 
01914         return 0;
01915 }//getNumberOfOtherObjectiveOptions
01916 
01920 int OSOption::getNumberOfInitConValues()
01921 {       if (this->optimization != NULL) 
01922                 if (this->optimization->constraints != NULL) 
01923                         if (this->optimization->constraints->initialConstraintValues != NULL) 
01924                                 return this->optimization->constraints->initialConstraintValues->numberOfCon;
01925 
01926         return -1;
01927 }//getNumberOfInitConValues
01928 
01932 int OSOption::getNumberOfInitDualVarValues()
01933 {       if (this->optimization != NULL) 
01934                 if (this->optimization->constraints != NULL) 
01935                         if (this->optimization->constraints->initialDualValues != NULL) 
01936                                 return this->optimization->constraints->initialDualValues->numberOfCon;
01937 
01938         return -1;
01939 }//getNumberOfInitDualVarValues
01940 
01944 int OSOption::getNumberOfOtherConstraintOptions()
01945 {       if (this->optimization != NULL)
01946                 if (this->optimization->constraints != NULL)
01947                         return this->optimization->constraints->numberOfOtherConstraintOptions;
01948 
01949         return -1;
01950 }//getNumberOfOtherConstraintOptions
01951 
01955 int OSOption::getNumberOfSolverOptions()
01956 {       if (this->optimization != NULL) 
01957                 if (this->optimization->solverOptions != NULL) 
01958                         return this->optimization->solverOptions->numberOfSolverOptions;
01959                 
01960         return -1;
01961 }//getNumberOfSolverOptions
01962 
01969 int  OSOption::getOptionInt(std::string optionName)
01970 {       if (optionName == "minCPUNumber")
01971                 return this->getMinCPUNumber();
01972 
01973         if (optionName == "numberOfOtherGeneralOptions")
01974                 return this->getNumberOfOtherGeneralOptions();
01975 
01976         if (optionName == "numberOfOtherSystemOptions")
01977                 return this->getNumberOfOtherSystemOptions();
01978 
01979         if (optionName == "numberOfOtherServiceOptions")
01980                 return this->getNumberOfOtherServiceOptions();
01981 
01982         if (optionName == "numberOfOtherJobOptions")
01983                 return this->getNumberOfOtherJobOptions();
01984 
01985         if (optionName == "numberOfJobDependencies")
01986                 return this->getNumberOfJobDependencies();
01987 
01988         if (optionName == "numberOfRequiredDirectories")
01989                 return this->getNumberOfRequiredDirectories();
01990 
01991         if (optionName == "numberOfRequiredFiles")
01992                 return this->getNumberOfRequiredFiles();
01993 
01994         if (optionName == "numberOfDirectoriesToMake")
01995                 return this->getNumberOfDirectoriesToMake();
01996 
01997         if (optionName == "numberOfFilesToMake")
01998                 return this->getNumberOfFilesToMake();
01999 
02000         if (optionName == "numberOfInputDirectoriesToMove")
02001                 return this->getNumberOfInputDirectoriesToMove();
02002 
02003         if (optionName == "numberOfInputFilesToMove")
02004                 return this->getNumberOfInputFilesToMove();
02005 
02006         if (optionName == "numberOfOutputDirectoriesToMove")
02007                 return this->getNumberOfOutputDirectoriesToMove();
02008 
02009         if (optionName == "numberOfOutputFilesToMove")
02010                 return this->getNumberOfOutputFilesToMove();
02011 
02012         if (optionName == "numberOfFilesToDelete")
02013                 return this->getNumberOfFilesToDelete();
02014 
02015         if (optionName == "numberOfDirectoriesToDelete")
02016                 return this->getNumberOfDirectoriesToDelete();
02017 
02018         if (optionName == "numberOfProcessesToKill")
02019                 return this->getNumberOfProcessesToKill();
02020 
02021         if (optionName == "numberOfVariables")
02022                 return this->getNumberOfVariables();
02023 
02024         if (optionName == "numberOfObjectives")
02025                 return this->getNumberOfObjectives();
02026 
02027         if (optionName == "numberOfConstraints")
02028                 return this->getNumberOfConstraints();
02029 
02030         if (optionName == "numberOfInitVarValues")
02031                 return this->getNumberOfInitVarValues();
02032 
02033         if (optionName == "numberOfInitVarValuesString")
02034                 return this->getNumberOfInitVarValuesString();
02035 
02036         if (optionName == "numberOfInitialBasisVariables")
02037                 return this->getNumberOfInitialBasisVariables();
02038 
02039         if (optionName == "numberOfIntegerVariableBranchingWeights")
02040                 return this->getNumberOfIntegerVariableBranchingWeights();
02041 
02042         if (optionName == "numberOfSOS")
02043                 return this->getNumberOfSOS();
02044 
02045         if (optionName == "numberOfOtherVariableOptions")
02046                 return this->getNumberOfOtherVariableOptions();
02047 
02048         if (optionName == "numberOfInitObjValues")
02049                 return this->getNumberOfInitObjValues();
02050 
02051         if (optionName == "numberOfInitObjBounds")
02052                 return this->getNumberOfInitObjBounds();
02053 
02054         if (optionName == "numberOfOtherObjectiveOptions")
02055                 return this->getNumberOfOtherObjectiveOptions();
02056 
02057         if (optionName == "numberOfInitConValues")
02058                 return this->getNumberOfInitConValues();
02059 
02060         if (optionName == "numberOfInitDualVarValues")
02061                 return this->getNumberOfInitDualVarValues();
02062 
02063         if (optionName == "numberOfOtherConstraintOptions")
02064                 return this->getNumberOfOtherConstraintOptions();
02065 
02066         if (optionName == "numberOfSolverOptions")
02067                 return this->getNumberOfSolverOptions();
02068 
02069         return -1;
02070 }//getOptionInt
02071 
02072 
02073 /**************************************************** 
02074  * get() methods that return arrays of various kinds
02075  ****************************************************/
02076 
02080 OtherOption** OSOption::getOtherGeneralOptions()
02081 {       if (this->general != NULL) 
02082         {       if (this->general->otherOptions != NULL)
02083                         return this->general->otherOptions->other;
02084         }
02085         return NULL;
02086 }//getOtherGeneralOptions
02087 
02091 OtherOption** OSOption::getOtherSystemOptions()
02092 {       if (this->system != NULL) 
02093         {       if (this->system->otherOptions != NULL)
02094                         return this->system->otherOptions->other;
02095         }
02096         return NULL;
02097 }//getOtherSystemOptions
02098 
02102 OtherOption** OSOption::getOtherServiceOptions()
02103 {       if (this->service != NULL) 
02104         {       if (this->service->otherOptions != NULL)
02105                         return this->service->otherOptions->other;
02106         }
02107         return NULL;
02108 }//getOtherServiceOptions
02109 
02113 OtherOption** OSOption::getOtherJobOptions()
02114 {       if (this->job != NULL) 
02115         {       if (this->job->otherOptions != NULL)
02116                         return this->job->otherOptions->other;
02117         }
02118         return NULL;
02119 }//getOtherJobOptions
02120 
02127 OtherOption** OSOption::getOtherOptions(std::string category)
02128 {       if (category == "general")
02129                 return this->getOtherGeneralOptions();
02130 
02131         if (category == "system")
02132                 return this->getOtherSystemOptions();
02133 
02134         if (category == "service")
02135                 return this->getOtherServiceOptions();
02136 
02137         if (category == "job")
02138                 return this->getOtherJobOptions();
02139         
02140         return NULL;
02141 }//getOtherOptions
02142 
02146 OtherOption** OSOption::getAllOtherOptions()
02147 {       OtherOption** optionVector = NULL;
02148         int prev_options[4];
02149         int num_options[4];
02150         int num_opt;
02151         int i;
02152 
02153         for (i = 0; i < 4; i++)
02154         {       prev_options[i] = 0;
02155                 num_options[i] = 0;
02156         }
02157         if (this->general != NULL) 
02158         {       if (this->general->otherOptions != NULL)
02159                 {       num_opt = this->getNumberOfOtherGeneralOptions();
02160                         num_options[0] = num_opt;
02161                 }
02162         }
02163 
02164         if (this->system != NULL) 
02165         {       if (this->system->otherOptions != NULL)
02166                 {       num_opt = this->getNumberOfOtherSystemOptions();
02167                         num_options[1] = num_opt;
02168                 }
02169         }
02170         prev_options[1] = prev_options[0] + num_options[0];
02171 
02172         if (this->service != NULL) 
02173         {       if (this->service->otherOptions != NULL)
02174                 {       num_opt = this->getNumberOfOtherServiceOptions();
02175                         num_options[2] = num_opt;
02176                 }
02177         }
02178         prev_options[2] = prev_options[1] + num_options[1];
02179 
02180         if (this->job != NULL) 
02181         {       if (this->job->otherOptions != NULL)
02182                 {       num_opt = this->getNumberOfOtherJobOptions();
02183                         num_options[3] = num_opt;
02184                 }
02185         }
02186         prev_options[3] = prev_options[2] + num_options[2];
02187 
02188         num_opt = num_options[0] + num_options[1] + num_options[2] + num_options[3];
02189         optionVector = new OtherOption*[num_opt];
02190 
02191         if (num_options[0] > 0)
02192         {       
02193                 for (i = 0; i < num_options[0]; i++)
02194                 {       optionVector[prev_options[0] + i] = this->general->otherOptions->other[i];
02195                 }
02196         }
02197 
02198         if (num_options[1] > 0)
02199         {       for (i = 0; i < num_options[1]; i++)
02200                 {       optionVector[prev_options[1] + i] = this->system->otherOptions->other[i];
02201                 }
02202         }
02203 
02204         if (num_options[2] > 0)
02205         {       for (i = 0; i < num_options[2]; i++)
02206                 {       optionVector[prev_options[2] + i] = this->service->otherOptions->other[i];
02207                 }
02208         }
02209 
02210         if (num_options[3] > 0)
02211         {       for (i = 0; i < num_options[3]; i++)
02212                 {       optionVector[prev_options[3] + i] = this->job->otherOptions->other[i];
02213                 }
02214         }
02215 
02216         return optionVector;
02217 }//getOtherJobOptions
02218 
02222 std::string*  OSOption::getJobDependencies()
02223 {       std::string* dependenciesVector = NULL;
02224         if (this->job != NULL) 
02225         {       if (this->job->dependencies != NULL) 
02226                         dependenciesVector = this->job->dependencies->jobID;                            
02227                 else
02228                         throw ErrorClass("<dependencies> object must be defined before getting the jobIDs");
02229         }
02230         else
02231                 throw ErrorClass("<job> object must be defined before getting the jobIDs");
02232 
02233         return dependenciesVector;
02234 }//getJobDependencies
02235 
02239 std::string*  OSOption::getRequiredDirectories()
02240 {       std::string* pathVector = NULL;
02241         if (this->job != NULL) 
02242         {       if (this->job->requiredDirectories != NULL) 
02243                         pathVector = this->job->requiredDirectories->path;                              
02244                 else
02245                         throw ErrorClass("<requiredDirectories> object must be defined before getting the paths");
02246         }
02247         else
02248                 throw ErrorClass("<job> object must be defined before getting the paths");
02249         return pathVector;
02250 }//getRequiredDirectories
02251 
02255 std::string*  OSOption::getRequiredFiles()
02256 {       std::string* pathVector = NULL;
02257         if (this->job != NULL) 
02258         {       if (this->job->requiredFiles != NULL) 
02259                         pathVector = this->job->requiredFiles->path;                            
02260                 else
02261                         throw ErrorClass("<requiredFiles> object must be defined before getting the paths");
02262         }
02263         else
02264                 throw ErrorClass("<job> object must be defined before getting the paths");
02265         return pathVector;
02266 }//getRequiredFiles
02267 
02271 std::string*  OSOption::getDirectoriesToMake()
02272 {       std::string* pathVector = NULL;
02273         if (this->job != NULL) 
02274         {       if (this->job->directoriesToMake != NULL) 
02275                         pathVector = this->job->directoriesToMake->path;                                
02276                 else
02277                         throw ErrorClass("<directoriesToMake> object must be defined before getting the paths");
02278         }
02279         else
02280                 throw ErrorClass("<job> object must be defined before getting the paths");
02281         return pathVector;
02282 }//getDirectoriesToMake
02283 
02287 std::string*  OSOption::getFilesToMake()
02288 {       std::string* pathVector = NULL;
02289         if (this->job != NULL) 
02290         {       if (this->job->filesToMake != NULL) 
02291                         pathVector = this->job->filesToMake->path;                              
02292                 else
02293                         throw ErrorClass("<filesToMake> object must be defined before getting the paths");
02294         }
02295         else
02296                 throw ErrorClass("<job> object must be defined before getting the paths");
02297         return pathVector;
02298 }//getFilesToMake
02299 
02303 PathPair** OSOption::getInputDirectoriesToMove()
02304 {       PathPair** pathPairVector = NULL;
02305         if (this->job != NULL) 
02306         {       if (this->job->inputDirectoriesToMove != NULL) 
02307                         pathPairVector = this->job->inputDirectoriesToMove->pathPair;                           
02308                 else
02309                         throw ErrorClass("<inputDirectoriesToMove> object must be defined before getting the paths");
02310         }
02311         else
02312                 throw ErrorClass("<job> object must be defined before getting the paths");
02313         return pathPairVector;
02314 }//getInputDirectoriesToMove
02315 
02319 PathPair** OSOption::getInputFilesToMove()
02320 {       PathPair** pathPairVector = NULL;
02321         if (this->job != NULL) 
02322         {       if (this->job->inputFilesToMove != NULL) 
02323                         pathPairVector = this->job->inputFilesToMove->pathPair;                         
02324                 else
02325                         throw ErrorClass("<inputFilesToMove> object must be defined before getting the paths");
02326         }
02327         else
02328                 throw ErrorClass("<job> object must be defined before getting the paths");
02329         return pathPairVector;
02330 }//getInputFilesToMove
02331 
02335 PathPair** OSOption::getOutputFilesToMove()
02336 {       PathPair** pathPairVector = NULL;
02337         if (this->job != NULL) 
02338         {       if (this->job->outputFilesToMove != NULL) 
02339                         pathPairVector = this->job->outputFilesToMove->pathPair;                                
02340                 else
02341                         throw ErrorClass("<outputFilesToMove> object must be defined before getting the paths");
02342         }
02343         else
02344                 throw ErrorClass("<job> object must be defined before getting the paths");
02345         return pathPairVector;
02346 }//getOutputFilesToMove
02347 
02351 PathPair** OSOption::getOutputDirectoriesToMove()
02352 {       PathPair** pathPairVector = NULL;
02353         if (this->job != NULL) 
02354         {       if (this->job->outputDirectoriesToMove != NULL) 
02355                         pathPairVector = this->job->outputDirectoriesToMove->pathPair;                          
02356                 else
02357                         throw ErrorClass("<outputDirectoriesToMove> object must be defined before getting the paths");
02358         }
02359         else
02360                 throw ErrorClass("<job> object must be defined before getting the paths");
02361         return pathPairVector;
02362 }//getOutputDirectoriesToMove
02363 
02367 std::string*  OSOption::getFilesToDelete()
02368 {       std::string* pathVector = NULL;
02369         if (this->job != NULL) 
02370         {       if (this->job->filesToDelete != NULL) 
02371                         pathVector = this->job->filesToDelete->path;                            
02372                 else
02373                         throw ErrorClass("<filesToDelete> object must be defined before getting the paths");
02374         }
02375         else
02376                 throw ErrorClass("<job> object must be defined before getting the paths");
02377         return pathVector;
02378 }//getFilesToDelete
02379 
02383 std::string*  OSOption::getDirectoriesToDelete()
02384 {       std::string* pathVector = NULL;
02385         if (this->job != NULL) 
02386         {       if (this->job->directoriesToDelete != NULL) 
02387                         pathVector = this->job->directoriesToDelete->path;                              
02388                 else
02389                         throw ErrorClass("<directoriesToDelete> object must be defined before getting the paths");
02390         }
02391         else
02392                 throw ErrorClass("<job> object must be defined before getting the paths");
02393         return pathVector;
02394 }//getDirectoriesToDelete
02395 
02399 std::string*  OSOption::getProcessesToKill()
02400 {       std::string* processes = NULL;
02401         if (this->job != NULL) 
02402         {       if (this->job->processesToKill != NULL) 
02403                         processes = this->job->processesToKill->process;
02404                 else
02405                         throw ErrorClass("<processesToKill> object must be defined before getting the processes");
02406         }
02407         else
02408                 throw ErrorClass("<job> object must be defined before getting the processes");
02409         return processes;
02410 }//getProcessesToKill
02411 
02412 
02413 
02418 InitVarValue**  OSOption::getInitVarValuesSparse()
02419 {       InitVarValue**  initVarVector;
02420         if (this->optimization != NULL) 
02421         {       if (this->optimization->variables != NULL) 
02422                 {       if (this->optimization->variables->initialVariableValues != NULL) 
02423                                 initVarVector = this->optimization->variables->initialVariableValues->var;
02424                         else
02425                                 throw ErrorClass("<initialVariableValues> object must be defined before getting the data");
02426                 }
02427                 else
02428                         throw ErrorClass("<variables> object must be defined before getting the data");
02429         }
02430         else
02431                 throw ErrorClass("<optimization> object must be defined before getting the data");
02432         return initVarVector;
02433 }//getInitVarValuesSparse
02434 
02440 double* OSOption::getInitVarValuesDense()
02441 {       try
02442         {       int numberOfVariables;
02443                 numberOfVariables = this->getNumberOfVariables();
02444                 if (numberOfVariables < 0)
02445                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02446 
02447                 if (this->optimization != NULL) 
02448                 {       if (this->optimization->variables != NULL) 
02449                         {       if (this->optimization->variables->initialVariableValues != NULL) 
02450                                 {       int i,j,k;
02451                                         int num_var;
02452                                         num_var = this->getNumberOfInitVarValues();
02453 
02454                                         if (m_mdInitVarValuesDense != NULL)
02455                                                 delete [] m_mdInitVarValuesDense;
02456                                         m_mdInitVarValuesDense = new double[numberOfVariables];
02457                                         for (k = 0; k < numberOfVariables; k++) m_mdInitVarValuesDense[k] = OSNAN;
02458 
02459                                         for (i = 0; i < num_var; i++)
02460                                         {       j = this->optimization->variables->initialVariableValues->var[i]->idx;
02461                                                 if (j >= 0 && j < numberOfVariables)                                            
02462                                                         m_mdInitVarValuesDense[j] 
02463                                                           = this->optimization->variables->initialVariableValues->var[i]->value;                                                
02464                                                 else
02465                                                         throw ErrorClass("Variable index out of range");
02466                                         }
02467                                         return m_mdInitVarValuesDense;
02468                                 }
02469                         }
02470                 }                                       
02471         }
02472         catch(const ErrorClass& eclass)
02473         {       throw ErrorClass(eclass.errormsg);
02474         }
02475         return NULL;
02476 }//getInitVarValuesDense
02477 
02484 double* OSOption::getInitVarValuesDense(int numberOfVariables)
02485 {       try
02486         {       if (numberOfVariables < 0)
02487                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02488 
02489                 if (this->optimization != NULL) 
02490                 {       if (this->optimization->variables != NULL) 
02491                         {       if (this->optimization->variables->initialVariableValues != NULL) 
02492                                 {       int i,j,k;
02493                                         int num_var;
02494                                         num_var = this->getNumberOfInitVarValues();
02495 
02496                                         if (m_mdInitVarValuesDense != NULL)
02497                                                 delete [] m_mdInitVarValuesDense;
02498                                         m_mdInitVarValuesDense = new double[numberOfVariables];
02499                                         for (k = 0; k < numberOfVariables; k++) m_mdInitVarValuesDense[k] = OSNAN;
02500 
02501                                         for (i = 0; i < num_var; i++)
02502                                         {       j = this->optimization->variables->initialVariableValues->var[i]->idx;
02503                                                 if (j >= 0 && j < numberOfVariables)                                            
02504                                                         m_mdInitVarValuesDense[j] 
02505                                                           = this->optimization->variables->initialVariableValues->var[i]->value;                                                
02506                                                 else
02507                                                         throw ErrorClass("Variable index out of range");
02508                                         }
02509                                         return m_mdInitVarValuesDense;
02510                                 }
02511                         }
02512                 }                                       
02513         }
02514         catch(const ErrorClass& eclass)
02515         {       throw ErrorClass(eclass.errormsg);
02516         }
02517         return NULL;
02518 }//getInitVarValuesDense
02519 
02524 InitVarValueString**  OSOption::getInitVarValuesStringSparse()
02525 {       InitVarValueString** initVarVector;
02526         if (this->optimization != NULL) 
02527         {       if (this->optimization->variables != NULL) 
02528                 {       if (this->optimization->variables->initialVariableValuesString != NULL) 
02529                                 initVarVector = this->optimization->variables->initialVariableValuesString->var;
02530                         else
02531                                 throw ErrorClass("<initialVariableValuesString> object must be defined before getting the data");
02532                 }
02533                 else
02534                         throw ErrorClass("<variables> object must be defined before getting the data");
02535         }
02536         else
02537                 throw ErrorClass("<optimization> object must be defined before getting the data");
02538         return initVarVector;
02539 }//getInitVarValuesStringSparse
02540 
02546 std::string *OSOption::getInitVarValuesStringDense()
02547 {       try
02548         {       int numberOfVariables;
02549                 numberOfVariables = this->getNumberOfVariables();
02550                 if (numberOfVariables < 0)
02551                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02552 
02553                 if (this->optimization != NULL) 
02554                 {       if (this->optimization->variables != NULL) 
02555                         {       if (this->optimization->variables->initialVariableValuesString != NULL) 
02556                                 {       int i,j,k;
02557                                         int num_var;
02558                                         num_var = this->getNumberOfInitVarValuesString();
02559 
02560                                         if (m_mdInitVarValuesStringDense != NULL)
02561                                                 delete [] m_mdInitVarValuesStringDense;
02562                                         m_mdInitVarValuesStringDense = new std::string[numberOfVariables];
02563                                         for (k = 0; k < numberOfVariables; k++) m_mdInitVarValuesStringDense[k] = "";
02564                 
02565                                         for (i = 0; i < num_var; i++)
02566                                         {       j = this->optimization->variables->initialVariableValuesString->var[i]->idx;
02567                                                 if (j >= 0 && j < numberOfVariables)
02568                                                         m_mdInitVarValuesStringDense[j] 
02569                                                           = this->optimization->variables->initialVariableValuesString->var[i]->value;
02570                                                 else
02571                                                         throw ErrorClass("Variable index out of range");
02572                                         }
02573                                         return m_mdInitVarValuesStringDense;
02574                                 }
02575                         }
02576                 }                                       
02577         }
02578         catch(const ErrorClass& eclass)
02579         {       throw ErrorClass(eclass.errormsg);
02580         }
02581         return NULL;
02582 }//getInitVarValuesStringDense
02583 
02590 std::string *OSOption::getInitVarValuesStringDense(int numberOfVariables)
02591 {       try
02592         {       if (numberOfVariables < 0)
02593                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02594 
02595                 if (this->optimization != NULL) 
02596                 {       if (this->optimization->variables != NULL) 
02597                         {       if (this->optimization->variables->initialVariableValuesString != NULL) 
02598                                 {       int i,j,k;
02599                                         int num_var;
02600                                         num_var = this->getNumberOfInitVarValuesString();
02601 
02602                                         if (m_mdInitVarValuesStringDense != NULL)
02603                                                 delete [] m_mdInitVarValuesStringDense;
02604                                         m_mdInitVarValuesStringDense = new std::string[numberOfVariables];
02605                                         for (k = 0; k < numberOfVariables; k++) m_mdInitVarValuesStringDense[k] = "";
02606                 
02607                                         for (i = 0; i < num_var; i++)
02608                                         {       j = this->optimization->variables->initialVariableValuesString->var[i]->idx;
02609                                                 if (j >= 0 && j < numberOfVariables)
02610                                                         m_mdInitVarValuesStringDense[j] 
02611                                                           = this->optimization->variables->initialVariableValuesString->var[i]->value;
02612                                                 else
02613                                                         throw ErrorClass("Variable index out of range");
02614                                         }
02615                                         return m_mdInitVarValuesStringDense;
02616                                 }
02617                         }
02618                 }                                       
02619         }
02620         catch(const ErrorClass& eclass)
02621         {       throw ErrorClass(eclass.errormsg);
02622         }
02623         return NULL;
02624 }//getInitVarValuesStringDense
02625 
02630 InitBasStatus**  OSOption::getInitBasisStatusSparse()
02631 {       InitBasStatus** initBasVector;
02632         if (this->optimization != NULL) 
02633         {       if (this->optimization->variables != NULL) 
02634                 {       if (this->optimization->variables->initialBasisStatus != NULL)
02635                                 initBasVector = this->optimization->variables->initialBasisStatus->var;
02636                         else
02637                                 throw ErrorClass("<initialBasisStatus> object must be defined before getting the data");
02638                 }
02639                 else
02640                         throw ErrorClass("<variables> object must be defined before getting the data");
02641         }
02642         else
02643                 throw ErrorClass("<optimization> object must be defined before getting the data");
02644         return initBasVector;
02645 }//getInitVarStringsSparse
02646 
02652 std::string *OSOption::getInitBasisStatusDense()
02653 {       try
02654         {       int numberOfVariables;
02655                 numberOfVariables = this->getNumberOfVariables();
02656                 if (numberOfVariables < 0)
02657                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02658 
02659                 if (this->optimization != NULL) 
02660                 {       if (this->optimization->variables != NULL) 
02661                         {       if (this->optimization->variables->initialBasisStatus != NULL) 
02662                                 {       int i,j,k;
02663                                         int num_var;
02664                                         num_var = this->getNumberOfInitialBasisVariables();
02665 
02666                                         if (m_mdInitBasisStatusDense != NULL)
02667                                                 delete [] m_mdInitBasisStatusDense;
02668                                         m_mdInitBasisStatusDense = new std::string[numberOfVariables];
02669                                         for (k = 0; k < numberOfVariables; k++) m_mdInitBasisStatusDense[k] = "";
02670                 
02671                                         for (i = 0; i < num_var; i++)
02672                                         {       j = this->optimization->variables->initialBasisStatus->var[i]->idx;
02673                                                 if (j >= 0 && j < numberOfVariables)
02674                                                         m_mdInitBasisStatusDense[j] 
02675                                                           = this->optimization->variables->initialBasisStatus->var[i]->value;
02676                                                 else
02677                                                         throw ErrorClass("Variable index out of range");
02678                                         }
02679                                         return m_mdInitBasisStatusDense;
02680                                 }
02681                         }
02682                 }                                       
02683         }
02684         catch(const ErrorClass& eclass)
02685         {       throw ErrorClass(eclass.errormsg);
02686         }
02687         return NULL;
02688 }//getInitBasisStatusDense
02689 
02696 std::string *OSOption::getInitBasisStatusDense(int numberOfVariables)
02697 {       try
02698         {       if (numberOfVariables < 0)
02699                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02700 
02701                 if (this->optimization != NULL) 
02702                 {       if (this->optimization->variables != NULL) 
02703                         {       if (this->optimization->variables->initialBasisStatus != NULL) 
02704                                 {       int i,j,k;
02705                                         int num_var;
02706                                         num_var = this->getNumberOfInitialBasisVariables();
02707 
02708                                         if (m_mdInitBasisStatusDense != NULL)
02709                                                 delete [] m_mdInitBasisStatusDense;
02710                                         m_mdInitBasisStatusDense = new std::string[numberOfVariables];
02711                                         for (k = 0; k < numberOfVariables; k++) m_mdInitBasisStatusDense[k] = "";
02712                 
02713                                         for (i = 0; i < num_var; i++)
02714                                         {       j = this->optimization->variables->initialBasisStatus->var[i]->idx;
02715                                                 if (j >= 0 && j < numberOfVariables)
02716                                                         m_mdInitBasisStatusDense[j] 
02717                                                           = this->optimization->variables->initialBasisStatus->var[i]->value;
02718                                                 else
02719                                                         throw ErrorClass("Variable index out of range");
02720                                         }
02721                                         return m_mdInitBasisStatusDense;
02722                                 }
02723                         }
02724                 }                                       
02725         }
02726         catch(const ErrorClass& eclass)
02727         {       throw ErrorClass(eclass.errormsg);
02728         }
02729         return NULL;
02730 }//getInitBasisStatusDense
02731 
02736 BranchingWeight**  OSOption::getIntegerVariableBranchingWeightsSparse()
02737 {       BranchingWeight** intVarVector;
02738         if (this->optimization != NULL) 
02739         {       if (this->optimization->variables != NULL) 
02740                 {       if (this->optimization->variables->integerVariableBranchingWeights != NULL)
02741                                 intVarVector = this->optimization->variables->integerVariableBranchingWeights->var;
02742                         else
02743                                 throw ErrorClass("<integerVariableBranchingWeights> object must be defined before getting the data");
02744                 }
02745                 else
02746                         throw ErrorClass("<variables> object must be defined before getting the data");
02747         }
02748         else
02749                 throw ErrorClass("<optimization> object must be defined before getting the data");
02750         return intVarVector;
02751 }//getIntegerVariableBranchingWeightsSparse
02752 
02753 
02759 double* OSOption::getIntegerVariableBranchingWeightsDense()
02760 {       try
02761         {       int numberOfVariables;
02762                 numberOfVariables = this->getNumberOfVariables();
02763                 if (numberOfVariables < 0)
02764                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02765 
02766                 if (this->optimization != NULL) 
02767                 {       if (this->optimization->variables != NULL) 
02768                         {       if (this->optimization->variables->integerVariableBranchingWeights != NULL) 
02769                                 {       int i,j,k;
02770                                         int num_var;
02771                                         num_var = this->getNumberOfIntegerVariableBranchingWeights();
02772 
02773                                         if (m_mdIntegerVariableBranchingWeightsDense != NULL)
02774                                                 delete [] m_mdIntegerVariableBranchingWeightsDense;
02775                                         m_mdIntegerVariableBranchingWeightsDense = new double[numberOfVariables];
02776                                         for (k = 0; k < numberOfVariables; k++) m_mdIntegerVariableBranchingWeightsDense[k] = OSNAN;
02777 
02778                                         for (i = 0; i < num_var; i++)
02779                                         {       j = this->optimization->variables->integerVariableBranchingWeights->var[i]->idx;
02780                                                 if (j >= 0 && j < numberOfVariables)                                            
02781                                                         m_mdIntegerVariableBranchingWeightsDense[j] 
02782                                                           = this->optimization->variables->integerVariableBranchingWeights->var[i]->value;                                              
02783                                                 else
02784                                                         throw ErrorClass("Variable index out of range");
02785                                         }
02786                                         return m_mdIntegerVariableBranchingWeightsDense;
02787                                 }
02788                         }
02789                 }                                       
02790         }
02791         catch(const ErrorClass& eclass)
02792         {       throw ErrorClass(eclass.errormsg);
02793         }
02794         return NULL;
02795 }//getIntegerVariableBranchingWeightsDense
02796 
02803 double* OSOption::getIntegerVariableBranchingWeightsDense(int numberOfVariables)
02804 {       try
02805         {       if (numberOfVariables < 0)
02806                         throw ErrorClass("\"numberOfVariables\" must be present to use dense methods");         
02807 
02808                 if (this->optimization != NULL) 
02809                 {       if (this->optimization->variables != NULL) 
02810                         {       if (this->optimization->variables->integerVariableBranchingWeights != NULL) 
02811                                 {       int i,j,k;
02812                                         int num_var;
02813                                         num_var = this->getNumberOfIntegerVariableBranchingWeights();
02814 
02815                                         if (m_mdIntegerVariableBranchingWeightsDense != NULL)
02816                                                 delete [] m_mdIntegerVariableBranchingWeightsDense;
02817                                         m_mdIntegerVariableBranchingWeightsDense = new double[numberOfVariables];
02818                                         for (k = 0; k < numberOfVariables; k++) m_mdIntegerVariableBranchingWeightsDense[k] = OSNAN;
02819 
02820                                         for (i = 0; i < num_var; i++)
02821                                         {       j = this->optimization->variables->integerVariableBranchingWeights->var[i]->idx;
02822                                                 if (j >= 0 && j < numberOfVariables)                                            
02823                                                         m_mdIntegerVariableBranchingWeightsDense[j] 
02824                                                           = this->optimization->variables->integerVariableBranchingWeights->var[i]->value;                                              
02825                                                 else
02826                                                         throw ErrorClass("Variable index out of range");
02827                                         }
02828                                         return m_mdIntegerVariableBranchingWeightsDense;
02829                                 }
02830                         }
02831                 }                                       
02832         }
02833         catch(const ErrorClass& eclass)
02834         {       throw ErrorClass(eclass.errormsg);
02835         }
02836         return NULL;
02837 }//getIntegerVariableBranchingWeightsDense
02838 
02843 SOSWeights**  OSOption::getSOSVariableBranchingWeightsSparse()
02844 {       SOSWeights** sosVarVector;
02845         if (this->optimization != NULL) 
02846         {       if (this->optimization->variables != NULL) 
02847                 {       if (this->optimization->variables->sosVariableBranchingWeights != NULL)
02848                                 sosVarVector = this->optimization->variables->sosVariableBranchingWeights->sos;
02849                         else
02850                                 throw ErrorClass("<sosVariableBranchingWeights> object must be defined before getting the data");
02851                 }
02852                 else
02853                         throw ErrorClass("<variables> object must be defined before getting the data");
02854         }
02855         else
02856                 throw ErrorClass("<optimization> object must be defined before getting the data");
02857         return sosVarVector;
02858 }//getSOSVariableBranchingWeightsSparse
02859 
02860 
02866 std::vector<OtherVariableOption*>  OSOption::getOtherVariableOptions( std::string solver_name)
02867 {       std::vector<OtherVariableOption*> optionsVector;
02868         if (this->optimization != NULL) 
02869         {       if (this->optimization->variables != NULL) 
02870                 {       int i;
02871                         int num_options;
02872                         num_options = this->getNumberOfOtherVariableOptions();
02873                         for(i = 0; i < num_options; i++)
02874                                 if (solver_name == this->optimization->variables->other[ i]->solver)
02875                                         optionsVector.push_back( this->optimization->variables->other[ i]);
02876                 }                                       
02877                 else
02878                         throw ErrorClass("<variables> object must be defined before getting the data");
02879         }
02880         else
02881                 throw ErrorClass("<optimization> object must be defined before getting the data");
02882         return optionsVector;
02883 }//getOtherVariableOptions
02884 
02885 
02890 OtherVariableOption** OSOption::getAllOtherVariableOptions()
02891 {       OtherVariableOption** optionsVector;
02892         if (this->optimization != NULL) 
02893         {       if (this->optimization->variables != NULL) 
02894                         optionsVector = this->optimization->variables->other;
02895                 else
02896                         throw ErrorClass("<variables> object must be defined before getting the data");
02897         }
02898         else
02899                 throw ErrorClass("<optimization> object must be defined before getting the data");
02900         return optionsVector;
02901 }//getAllOtherVariableOptions
02902 
02907 InitObjValue**  OSOption::getInitObjValuesSparse()
02908 {       InitObjValue** initObjVector;
02909         if (this->optimization != NULL) 
02910         {       if (this->optimization->objectives != NULL) 
02911                 {       if (this->optimization->objectives->initialObjectiveValues != NULL) 
02912                                 initObjVector = this->optimization->objectives->initialObjectiveValues->obj;                    
02913                         else
02914                                 throw ErrorClass("<initialObjectiveValues> object must be defined before getting the data");
02915                 }
02916                 else
02917                         throw ErrorClass("<objectives> object must be defined before getting the data");
02918         }
02919         else
02920                 throw ErrorClass("<optimization> object must be defined before getting the data");
02921         return initObjVector;
02922 }//getInitObjValuesSparse
02923 
02929 double* OSOption::getInitObjValuesDense()
02930 {       try
02931         {       int numberOfObjectives;
02932                 numberOfObjectives = this->getNumberOfObjectives();
02933                 if (numberOfObjectives < 0)
02934                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
02935 
02936                 if (this->optimization != NULL) 
02937                 {       if (this->optimization->objectives != NULL) 
02938                         {       if (this->optimization->objectives->initialObjectiveValues != NULL) 
02939                                 {       int i,j,k;
02940                                         int num_obj;
02941                                         num_obj = this->getNumberOfInitObjValues();
02942 
02943                                         if (m_mdInitObjValuesDense != NULL)
02944                                                 delete [] m_mdInitObjValuesDense;
02945                                         m_mdInitObjValuesDense = new double[numberOfObjectives];
02946                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjValuesDense[k] = OSNAN;
02947         
02948                                         for (i = 0; i < num_obj; i++)
02949                                         {       j = this->optimization->objectives->initialObjectiveValues->obj[i]->idx;
02950                                                 if (j < 0 && -j <= numberOfObjectives)                                          
02951                                                         m_mdInitObjValuesDense[-1-j] 
02952                                                           = this->optimization->objectives->initialObjectiveValues->obj[i]->value;                                              
02953                                                 else
02954                                                         throw ErrorClass("Objective index out of range");
02955                                         }
02956                                         return m_mdInitObjValuesDense;
02957                                 }
02958                         }
02959                 }                                       
02960         }
02961         catch(const ErrorClass& eclass)
02962         {       throw ErrorClass(eclass.errormsg);
02963         }
02964         return NULL;
02965 }//getInitObjValuesDense
02966 
02973 double* OSOption::getInitObjValuesDense(int numberOfObjectives)
02974 {       try
02975         {       if (numberOfObjectives < 0)
02976                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
02977 
02978                 if (this->optimization != NULL) 
02979                 {       if (this->optimization->objectives != NULL) 
02980                         {       if (this->optimization->objectives->initialObjectiveValues != NULL) 
02981                                 {       int i,j,k;
02982                                         int num_obj;
02983                                         num_obj = this->getNumberOfInitObjValues();
02984 
02985                                         if (m_mdInitObjValuesDense != NULL)
02986                                                 delete [] m_mdInitObjValuesDense;
02987                                         m_mdInitObjValuesDense = new double[numberOfObjectives];
02988                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjValuesDense[k] = OSNAN;
02989         
02990                                         for (i = 0; i < num_obj; i++)
02991                                         {       j = this->optimization->objectives->initialObjectiveValues->obj[i]->idx;
02992                                                 if (j < 0 && -j <= numberOfObjectives)                                          
02993                                                         m_mdInitObjValuesDense[-1-j] 
02994                                                           = this->optimization->objectives->initialObjectiveValues->obj[i]->value;                                              
02995                                                 else
02996                                                         throw ErrorClass("Objective index out of range");
02997                                         }
02998                                         return m_mdInitObjValuesDense;
02999                                 }
03000                         }
03001                 }                                       
03002         }
03003         catch(const ErrorClass& eclass)
03004         {       throw ErrorClass(eclass.errormsg);
03005         }
03006         return NULL;
03007 }//getInitObjValuesDense
03008 
03013 InitObjBound**  OSOption::getInitObjBoundsSparse()
03014 {       InitObjBound** initObjBounds;
03015         if (this->optimization != NULL) 
03016         {       if (this->optimization->objectives != NULL) 
03017                 {       if (this->optimization->objectives->initialObjectiveBounds != NULL) 
03018                                 initObjBounds = this->optimization->objectives->initialObjectiveBounds->obj;
03019                         else
03020                                 throw ErrorClass("<initialObjectiveBounds> object must be defined before getting the data");
03021                 }
03022                 else
03023                         throw ErrorClass("<objectives> object must be defined before getting the data");
03024         }
03025         else
03026                 throw ErrorClass("<optimization> object must be defined before getting the data");
03027         return initObjBounds;
03028 }//getInitObjBoundsSparse
03029 
03035 double* OSOption::getInitObjLowerBoundsDense()
03036 {       try
03037         {       int numberOfObjectives;
03038                 numberOfObjectives = this->getNumberOfObjectives();
03039                 if (numberOfObjectives < 0)
03040                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
03041 
03042                 if (this->optimization != NULL) 
03043                 {       if (this->optimization->objectives != NULL) 
03044                         {       if (this->optimization->objectives->initialObjectiveBounds != NULL) 
03045                                 {       int i,j,k;
03046                                         int num_obj;
03047                                         num_obj = this->getNumberOfInitObjBounds();
03048 
03049                                         if (m_mdInitObjLowerBoundsDense != NULL)
03050                                                 delete [] m_mdInitObjLowerBoundsDense;
03051                                         m_mdInitObjLowerBoundsDense = new double[numberOfObjectives];
03052                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjLowerBoundsDense[k] = OSNAN;
03053 
03054                                         for (i = 0; i < num_obj; i++)
03055                                         {       j = this->optimization->objectives->initialObjectiveBounds->obj[i]->idx;
03056                                                 if (j < 0 && -j <= numberOfObjectives)                                          
03057                                                         m_mdInitObjLowerBoundsDense[-1-j] 
03058                                                           = this->optimization->objectives->initialObjectiveBounds->obj[i]->lbValue;
03059                                                 else
03060                                                         throw ErrorClass("Objective index out of range");
03061                                         }
03062                                         return m_mdInitObjLowerBoundsDense;
03063                                 }
03064                         }
03065                 }                                       
03066         }
03067         catch(const ErrorClass& eclass)
03068         {       throw ErrorClass(eclass.errormsg);
03069         }
03070         return NULL;
03071 }//getInitObjLowerBoundsDense
03072 
03079 double* OSOption::getInitObjLowerBoundsDense(int numberOfObjectives)
03080 {       try
03081         {       if (numberOfObjectives < 0)
03082                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
03083 
03084                 if (this->optimization != NULL) 
03085                 {       if (this->optimization->objectives != NULL) 
03086                         {       if (this->optimization->objectives->initialObjectiveBounds != NULL) 
03087                                 {       int i,j,k;
03088                                         int num_obj;
03089                                         num_obj = this->getNumberOfInitObjBounds();
03090 
03091                                         if (m_mdInitObjLowerBoundsDense != NULL)
03092                                                 delete [] m_mdInitObjLowerBoundsDense;
03093                                         m_mdInitObjLowerBoundsDense = new double[numberOfObjectives];
03094                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjLowerBoundsDense[k] = OSNAN;
03095 
03096                                         for (i = 0; i < num_obj; i++)
03097                                         {       j = this->optimization->objectives->initialObjectiveBounds->obj[i]->idx;
03098                                                 if (j < 0 && -j <= numberOfObjectives)                                          
03099                                                         m_mdInitObjLowerBoundsDense[-1-j] 
03100                                                           = this->optimization->objectives->initialObjectiveBounds->obj[i]->lbValue;
03101                                                 else
03102                                                         throw ErrorClass("Objective index out of range");
03103                                         }
03104                                         return m_mdInitObjLowerBoundsDense;
03105                                 }
03106                         }
03107                 }                                       
03108         }
03109         catch(const ErrorClass& eclass)
03110         {       throw ErrorClass(eclass.errormsg);
03111         }
03112         return NULL;
03113 }//getInitObjLowerBoundsDense
03114 
03120 double* OSOption::getInitObjUpperBoundsDense()
03121 {       try
03122         {       int numberOfObjectives;
03123                 numberOfObjectives = this->getNumberOfObjectives();
03124                 if (numberOfObjectives < 0)
03125                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
03126 
03127                 if (this->optimization != NULL) 
03128                 {       if (this->optimization->objectives != NULL) 
03129                         {       if (this->optimization->objectives->initialObjectiveBounds != NULL) 
03130                                 {       int i,j,k;
03131                                         int num_obj;
03132                                         num_obj = this->getNumberOfInitObjBounds();
03133 
03134                                         if (m_mdInitObjUpperBoundsDense != NULL)
03135                                                 delete [] m_mdInitObjUpperBoundsDense;
03136                                         m_mdInitObjUpperBoundsDense = new double[numberOfObjectives];
03137                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjUpperBoundsDense[k] = OSNAN;
03138                                         
03139                                         for (i = 0; i < num_obj; i++)
03140                                         {       j = this->optimization->objectives->initialObjectiveBounds->obj[i]->idx;
03141                                                 if (j < 0 && -j <= numberOfObjectives)                                          
03142                                                         m_mdInitObjUpperBoundsDense[-1-j] 
03143                                                           = this->optimization->objectives->initialObjectiveBounds->obj[i]->ubValue;
03144                                                 else
03145                                                         throw ErrorClass("Objective index out of range");
03146                                         }
03147                                         return m_mdInitObjUpperBoundsDense;
03148                                 }
03149                         }
03150                 }                                       
03151         }
03152         catch(const ErrorClass& eclass)
03153         {       throw ErrorClass(eclass.errormsg);
03154         }
03155         return NULL;
03156 }//getInitObjUpperBoundsDense
03157 
03164 double* OSOption::getInitObjUpperBoundsDense(int numberOfObjectives)
03165 {       try
03166         {       if (numberOfObjectives < 0)
03167                         throw ErrorClass("\"numberOfObjectives\" must be present to use dense methods");                
03168 
03169                 if (this->optimization != NULL) 
03170                 {       if (this->optimization->objectives != NULL) 
03171                         {       if (this->optimization->objectives->initialObjectiveBounds != NULL) 
03172                                 {       int i,j,k;
03173                                         int num_obj;
03174                                         num_obj = this->getNumberOfInitObjBounds();
03175 
03176                                         if (m_mdInitObjUpperBoundsDense != NULL)
03177                                                 delete [] m_mdInitObjUpperBoundsDense;
03178                                         m_mdInitObjUpperBoundsDense = new double[numberOfObjectives];
03179                                         for (k = 0; k < numberOfObjectives; k++) m_mdInitObjUpperBoundsDense[k] = OSNAN;
03180                                         
03181                                         for (i = 0; i < num_obj; i++)
03182                                         {       j = this->optimization->objectives->initialObjectiveBounds->obj[i]->idx;
03183                                                 if (j < 0 && -j <= numberOfObjectives)                                          
03184                                                         m_mdInitObjUpperBoundsDense[-1-j] 
03185                                                           = this->optimization->objectives->initialObjectiveBounds->obj[i]->ubValue;
03186                                                 else
03187                                                         throw ErrorClass("Objective index out of range");
03188                                         }
03189                                         return m_mdInitObjUpperBoundsDense;
03190                                 }
03191                         }
03192                 }                                       
03193         }
03194         catch(const ErrorClass& eclass)
03195         {       throw ErrorClass(eclass.errormsg);
03196         }
03197         return NULL;
03198 }//getInitObjUpperBoundsDense
03199 
03205 std::vector<OtherObjectiveOption*>  OSOption::getOtherObjectiveOptions( std::string solver_name)
03206 {       std::vector<OtherObjectiveOption*> optionsVector;
03207         if (this->optimization != NULL) 
03208         {       if (this->optimization->variables != NULL) 
03209                 {       int i;
03210                         int num_options;
03211                         num_options = this->getNumberOfOtherObjectiveOptions();
03212                         for(i = 0; i < num_options; i++)
03213                                 if (solver_name == this->optimization->objectives->other[ i]->solver)
03214                                         optionsVector.push_back( this->optimization->objectives->other[ i]);
03215                 }                                       
03216                 else
03217                         throw ErrorClass("<objectives> object must be defined before getting the data");
03218         }
03219         else
03220                 throw ErrorClass("<optimization> object must be defined before getting the data");
03221         return optionsVector;
03222 }//getOtherObjectiveOptions
03223 
03228 OtherObjectiveOption** OSOption::getAllOtherObjectiveOptions()
03229 {       OtherObjectiveOption** optionsVector;
03230         if (this->optimization != NULL) 
03231         {       if (this->optimization->objectives != NULL) 
03232                         optionsVector = this->optimization->objectives->other;
03233                 else
03234                         throw ErrorClass("<objectives> object must be defined before getting the data");
03235         }
03236         else
03237                 throw ErrorClass("<optimization> object must be defined before getting the data");
03238         return optionsVector;
03239 }//getAllOtherObjectiveOptions
03240 
03241 
03246 InitConValue**  OSOption::getInitConValuesSparse()
03247 {       InitConValue** initConVector;
03248         if (this->optimization != NULL) 
03249         {       if (this->optimization->constraints != NULL) 
03250                 {       if (this->optimization->constraints->initialConstraintValues != NULL) 
03251                                 initConVector = this->optimization->constraints->initialConstraintValues->con;                  
03252                         else
03253                                 throw ErrorClass("<initialConstraintValues> object must be defined before getting the data");
03254                 }
03255                 else
03256                         throw ErrorClass("<constraints> object must be defined before getting the data");
03257         }
03258         else
03259                 throw ErrorClass("<optimization> object must be defined before getting the data");
03260         return initConVector;
03261 }//getInitConValuesSparse
03262 
03268 double* OSOption::getInitConValuesDense()
03269 {       try
03270         {       int numberOfConstraints;
03271                 numberOfConstraints = this->getNumberOfConstraints();
03272                 if (numberOfConstraints < 0)
03273                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03274 
03275                 if (this->optimization != NULL) 
03276                 {       if (this->optimization->constraints != NULL) 
03277                         {       if (this->optimization->constraints->initialConstraintValues != NULL) 
03278                                 {       int i,j,k;
03279                                         int num_con;
03280                                         num_con = this->getNumberOfInitConValues();
03281 
03282                                         if (m_mdInitConValuesDense != NULL)
03283                                                 delete [] m_mdInitConValuesDense;
03284                                         m_mdInitConValuesDense = new double[numberOfConstraints];
03285                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitConValuesDense[k] = OSNAN;
03286 
03287                                         for (i = 0; i < num_con; i++)
03288                                         {       j = this->optimization->constraints->initialConstraintValues->con[i]->idx;
03289                                                 if (j >= 0 && j < numberOfConstraints)                                          
03290                                                         m_mdInitConValuesDense[j] 
03291                                                           = this->optimization->constraints->initialConstraintValues->con[i]->value;                                            
03292                                                 else
03293                                                         throw ErrorClass("Constraint index out of range");
03294                                         }
03295                                 return m_mdInitConValuesDense;
03296                                 }
03297                         }
03298                 }                                       
03299         }
03300         catch(const ErrorClass& eclass)
03301         {       throw ErrorClass(eclass.errormsg);
03302         }
03303         return NULL;
03304 }//getInitConValuesDense
03305 
03312 double* OSOption::getInitConValuesDense(int numberOfConstraints)
03313 {       try
03314         {       if (numberOfConstraints < 0)
03315                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03316 
03317                 if (this->optimization != NULL) 
03318                 {       if (this->optimization->constraints != NULL) 
03319                         {       if (this->optimization->constraints->initialConstraintValues != NULL) 
03320                                 {       int i,j,k;
03321                                         int num_con;
03322                                         num_con = this->getNumberOfInitConValues();
03323 
03324                                         if (m_mdInitConValuesDense != NULL)
03325                                                 delete [] m_mdInitConValuesDense;
03326                                         m_mdInitConValuesDense = new double[numberOfConstraints];
03327                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitConValuesDense[k] = OSNAN;
03328 
03329                                         for (i = 0; i < num_con; i++)
03330                                         {       j = this->optimization->constraints->initialConstraintValues->con[i]->idx;
03331                                                 if (j >= 0 && j < numberOfConstraints)                                          
03332                                                         m_mdInitConValuesDense[j] 
03333                                                           = this->optimization->constraints->initialConstraintValues->con[i]->value;                                            
03334                                                 else
03335                                                         throw ErrorClass("Constraint index out of range");
03336                                         }
03337                                 return m_mdInitConValuesDense;
03338                                 }
03339                         }
03340                 }                                       
03341         }
03342         catch(const ErrorClass& eclass)
03343         {       throw ErrorClass(eclass.errormsg);
03344         }
03345         return NULL;
03346 }//getInitConValuesDense
03347 
03352 InitDualVarValue**  OSOption::getInitDualVarValuesSparse()
03353 {       InitDualVarValue** initDualVector;
03354         if (this->optimization != NULL) 
03355         {       if (this->optimization->constraints != NULL) 
03356                 {       if (this->optimization->constraints->initialDualValues != NULL) 
03357                                 initDualVector = this->optimization->constraints->initialDualValues->con;                       
03358                         else
03359                                 throw ErrorClass("<initialDualValues> object must be defined before getting the data");
03360                 }
03361                 else
03362                         throw ErrorClass("<constraints> object must be defined before getting the data");
03363         }
03364         else
03365                 throw ErrorClass("<optimization> object must be defined before getting the data");
03366         return initDualVector;
03367 }//getInitDualVarValuesSparse
03368 
03374 double* OSOption::getInitDualVarLowerBoundsDense()
03375 {       try
03376         {       int numberOfConstraints;
03377                 numberOfConstraints = this->getNumberOfConstraints();
03378                 if (numberOfConstraints < 0)
03379                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03380 
03381                 if (this->optimization != NULL) 
03382                 {       if (this->optimization->constraints != NULL) 
03383                         {       if (this->optimization->constraints->initialDualValues != NULL) 
03384                                 {       int i,j,k;
03385                                         int num_con;
03386                                         num_con = this->getNumberOfInitDualVarValues();
03387 
03388                                         if (m_mdInitDualVarLowerBoundsDense != NULL)
03389                                                 delete [] m_mdInitDualVarLowerBoundsDense;
03390                                         m_mdInitDualVarLowerBoundsDense = new double[numberOfConstraints];
03391                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitDualVarLowerBoundsDense[k] = 0.0;
03392 
03393                                         for (i = 0; i < num_con; i++)
03394                                         {       j = this->optimization->constraints->initialDualValues->con[i]->idx;
03395                                                 if (j >= 0 && j < numberOfConstraints)                                          
03396                                                         m_mdInitDualVarLowerBoundsDense[j] 
03397                                                           = this->optimization->constraints->initialDualValues->con[i]->lbDualValue;                                            
03398                                                 else
03399                                                         throw ErrorClass("Constraint index out of range");
03400                                         }
03401                                         return m_mdInitDualVarLowerBoundsDense;
03402                                 }
03403                         }
03404                 }                                       
03405         }
03406         catch(const ErrorClass& eclass)
03407         {       throw ErrorClass(eclass.errormsg);
03408         }
03409         return NULL;
03410 }//getInitDualVarLowerBoundsDense
03411 
03418 double* OSOption::getInitDualVarLowerBoundsDense(int numberOfConstraints)
03419 {       try
03420         {       if (numberOfConstraints < 0)
03421                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03422 
03423                 if (this->optimization != NULL) 
03424                 {       if (this->optimization->constraints != NULL) 
03425                         {       if (this->optimization->constraints->initialDualValues != NULL) 
03426                                 {       int i,j,k;
03427                                         int num_con;
03428                                         num_con = this->getNumberOfInitDualVarValues();
03429 
03430                                         if (m_mdInitDualVarLowerBoundsDense != NULL)
03431                                                 delete [] m_mdInitDualVarLowerBoundsDense;
03432                                         m_mdInitDualVarLowerBoundsDense = new double[numberOfConstraints];
03433                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitDualVarLowerBoundsDense[k] = 0.0;
03434 
03435                                         for (i = 0; i < num_con; i++)
03436                                         {       j = this->optimization->constraints->initialDualValues->con[i]->idx;
03437                                                 if (j >= 0 && j < numberOfConstraints)                                          
03438                                                         m_mdInitDualVarLowerBoundsDense[j] 
03439                                                           = this->optimization->constraints->initialDualValues->con[i]->lbDualValue;                                            
03440                                                 else
03441                                                         throw ErrorClass("Constraint index out of range");
03442                                         }
03443                                         return m_mdInitDualVarLowerBoundsDense;
03444                                 }
03445                         }
03446                 }                                       
03447         }
03448         catch(const ErrorClass& eclass)
03449         {       throw ErrorClass(eclass.errormsg);
03450         }
03451         return NULL;
03452 }//getInitDualVarLowerBoundsDense
03453 
03459 double* OSOption::getInitDualVarUpperBoundsDense()
03460 {       try
03461         {       int numberOfConstraints;
03462                 numberOfConstraints = this->getNumberOfConstraints();
03463                 if (numberOfConstraints < 0)
03464                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03465 
03466                 if (this->optimization != NULL) 
03467                 {       if (this->optimization->constraints != NULL) 
03468                         {       if (this->optimization->constraints->initialDualValues != NULL) 
03469                                 {       int i,j,k;
03470                                         int num_con;
03471                                         num_con = this->getNumberOfInitDualVarValues();
03472                                         numberOfConstraints = this->getNumberOfConstraints();
03473 
03474                                         if (m_mdInitDualVarUpperBoundsDense != NULL)
03475                                                 delete [] m_mdInitDualVarUpperBoundsDense;
03476                                         m_mdInitDualVarUpperBoundsDense = new double[numberOfConstraints];
03477                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitDualVarUpperBoundsDense[k] = 0.0;
03478 
03479                                         for (i = 0; i < num_con; i++)
03480                                         {       j = this->optimization->constraints->initialDualValues->con[i]->idx;
03481                                                 if (j >= 0 && j < numberOfConstraints)                                          
03482                                                         m_mdInitDualVarUpperBoundsDense[j] 
03483                                                           = this->optimization->constraints->initialDualValues->con[i]->ubDualValue;    
03484                                                 else
03485                                                         throw ErrorClass("Constraint index out of range");
03486                                         }
03487                                         return m_mdInitDualVarUpperBoundsDense;
03488                                 }
03489                         }
03490                 }                                       
03491         }
03492         catch(const ErrorClass& eclass)
03493         {       throw ErrorClass(eclass.errormsg);
03494         }
03495         return NULL;
03496 }//getInitDualVarUpperBoundsDense
03497 
03504 double* OSOption::getInitDualVarUpperBoundsDense(int numberOfConstraints)
03505 {       try
03506         {       if (numberOfConstraints < 0)
03507                         throw ErrorClass("\"numberOfConstraints\" must be present to use dense methods");               
03508 
03509                 if (this->optimization != NULL) 
03510                 {       if (this->optimization->constraints != NULL) 
03511                         {       if (this->optimization->constraints->initialDualValues != NULL) 
03512                                 {       int i,j,k;
03513                                         int num_con;
03514                                         num_con = this->getNumberOfInitDualVarValues();
03515                                         numberOfConstraints = this->getNumberOfConstraints();
03516 
03517                                         if (m_mdInitDualVarUpperBoundsDense != NULL)
03518                                                 delete [] m_mdInitDualVarUpperBoundsDense;
03519                                         m_mdInitDualVarUpperBoundsDense = new double[numberOfConstraints];
03520                                         for (k = 0; k < numberOfConstraints; k++) m_mdInitDualVarUpperBoundsDense[k] = 0.0;
03521 
03522                                         for (i = 0; i < num_con; i++)
03523                                         {       j = this->optimization->constraints->initialDualValues->con[i]->idx;
03524                                                 if (j >= 0 && j < numberOfConstraints)                                          
03525                                                         m_mdInitDualVarUpperBoundsDense[j] 
03526                                                           = this->optimization->constraints->initialDualValues->con[i]->ubDualValue;    
03527                                                 else
03528                                                         throw ErrorClass("Constraint index out of range");
03529                                         }
03530                                         return m_mdInitDualVarUpperBoundsDense;
03531                                 }
03532                         }
03533                 }                                       
03534         }
03535         catch(const ErrorClass& eclass)
03536         {       throw ErrorClass(eclass.errormsg);
03537         }
03538         return NULL;
03539 }//getInitDualVarUpperBoundsDense
03540 
03546 std::vector<OtherConstraintOption*>  OSOption::getOtherConstraintOptions( std::string solver_name)
03547 {       std::vector<OtherConstraintOption*> optionsVector;
03548         if (this->optimization != NULL) 
03549         {       if (this->optimization->constraints != NULL) 
03550                 {       int i;
03551                         int num_options;
03552                         num_options = this->getNumberOfOtherConstraintOptions();
03553                         for(i = 0; i < num_options; i++)
03554                                 if (solver_name == this->optimization->constraints->other[ i]->solver)
03555                                         optionsVector.push_back( this->optimization->constraints->other[ i]);
03556                 }                                       
03557                 else
03558                         throw ErrorClass("<constraints> object must be defined before getting the data");
03559         }
03560         else
03561                 throw ErrorClass("<optimization> object must be defined before getting the data");
03562         return optionsVector;
03563 }//getOtherConstraintOptions
03564 
03569 OtherConstraintOption** OSOption::getAllOtherConstraintOptions()
03570 {       OtherConstraintOption** optionsVector;
03571         if (this->optimization != NULL) 
03572         {       if (this->optimization->constraints != NULL) 
03573                         optionsVector = this->optimization->constraints->other;
03574                 else
03575                         throw ErrorClass("<constraints> object must be defined before getting the data");
03576         }
03577         else
03578                 throw ErrorClass("<optimization> object must be defined before getting the data");
03579         return optionsVector;
03580 }//getAllOtherConstraintOptions
03581 
03582 
03588 std::vector<SolverOption*>  OSOption::getSolverOptions( std::string solver_name)
03589 {       std::vector<SolverOption*> optionsVector;
03590         if (this->optimization != NULL) 
03591         {       if (this->optimization->solverOptions != NULL) 
03592                 {       int i;
03593                         int num_options;
03594                         num_options = this->getNumberOfSolverOptions();
03595                         for(i = 0; i < num_options; i++)
03596                                 if (solver_name == this->optimization->solverOptions->solverOption[ i]->solver)
03597                                         optionsVector.push_back( this->optimization->solverOptions->solverOption[ i]);
03598                 }                                       
03599                 else
03600                         throw ErrorClass("<solverOptions> object must be defined before getting the data");
03601         }
03602         else
03603                 throw ErrorClass("<optimization> object must be defined before getting the data");
03604         return optionsVector;
03605 }//getSolverOptions
03606 
03611 SolverOption** OSOption::getAllSolverOptions()
03612 {       SolverOption** optionsVector;
03613         if (this->optimization != NULL) 
03614         {       if (this->optimization->solverOptions != NULL) 
03615                         optionsVector = this->optimization->solverOptions->solverOption;
03616                 else
03617                         throw ErrorClass("<solverOptions> object must be defined before getting the data");
03618         }
03619         else
03620                 throw ErrorClass("<optimization> object must be defined before getting the data");
03621         return optionsVector;
03622 }//getAllOtherConstraintOptions
03623 
03624 
03625 
03632 /* ----------------------------------------------------------
03633  * Start with a number of set() and add() methods for arrays 
03634  * used in various subelements.
03635  * These have been put here in order of appearance
03636  * ----------------------------------------------------------*/
03637 
03641 bool OtherOptions::setOther(int numberOfOptions, OtherOption** other)
03642 {       try
03643         {       if (this->other != NULL)
03644                         throw ErrorClass( "otherOptions array previously used.");
03645                 
03646                 if (numberOfOptions < 0)
03647                         throw ErrorClass( "length of otherOptions array cannot be negative.");
03648 
03649                 this->numberOfOtherOptions = numberOfOptions;
03650                 if (numberOfOptions == 0)
03651                         return true;
03652 
03653                 this->other = new OtherOption*[numberOfOptions];
03654          
03655                 int  i;
03656                 for (i = 0; i < numberOfOptions; i++)
03657                 {        this->other[i] = new OtherOption();
03658                         *this->other[i] = *other[i];
03659                 }
03660                 return true;
03661         }
03662         catch(const ErrorClass& eclass)
03663         {       cout << eclass.errormsg << endl;
03664                 return false;
03665         }
03666 }//setOther
03667 
03671 bool OtherOptions::addOther(std::string name, std::string value, std::string description)
03672 {       try
03673         {       int nopt; int i;
03674                 if (name.empty() )
03675                         throw ErrorClass( "the name of an option cannot be empty." );
03676 
03677                 if (this->other == NULL) 
03678                         nopt = 0;
03679                 else
03680                         nopt = this->numberOfOtherOptions;
03681         
03682                 OtherOption** temp = new OtherOption*[nopt+1];  //Allocate the new pointers
03683                 for (i = 0; i < nopt; i++)
03684                         temp[i] = this->other[i];  //copy the pointers
03685 
03686                 delete[] this->other; //delete old pointers
03687         
03688 //      add in the new element
03689                 temp[ nopt] = new OtherOption();
03690 
03691                 temp[ nopt]->name = name;
03692                 temp[ nopt]->value = value;
03693                 temp[ nopt]->description = description;
03694 
03695                 this->other = temp;   //hook the new pointers into the data structure
03696                 this->numberOfOtherOptions = ++nopt;
03697 
03698                 return true;
03699         }
03700         catch(const ErrorClass& eclass)
03701         {       cout << eclass.errormsg << endl;
03702                 return false;
03703         }
03704 }//addOther
03705 
03711 bool JobDependencies::setJobID(int numberOfJobIDs, std::string *jobID)
03712 {       try
03713         {       if (this->jobID != NULL)
03714                         throw ErrorClass( "jobID array previously used.");
03715 
03716                 if (numberOfJobIDs < 0)
03717                         throw ErrorClass( "length of jobID array cannot be negative.");
03718 
03719                 this->numberOfJobIDs = numberOfJobIDs;
03720                 if (numberOfJobIDs == 0)
03721                         return true;
03722 
03723                 this->jobID = new std::string[numberOfJobIDs];
03724                 int i;
03725                 for (i = 0; i < numberOfJobIDs; i++)
03726                         this->jobID[i] = jobID[i];
03727                 
03728                 return true;
03729         }
03730         catch(const ErrorClass& eclass)
03731         {       cout << eclass.errormsg << endl;
03732                 return false;
03733         }
03734 }//setJobID
03735 
03741 bool JobDependencies::addJobID(std::string jobID)
03742 {       try
03743         {       int nopt;
03744                 if (jobID.empty() )
03745                         throw ErrorClass( "the name of a jobID cannot be empty." );
03746 
03747                 if (this->jobID == NULL) 
03748                         nopt = 0;
03749                 else
03750                         nopt = this->numberOfJobIDs;
03751 
03752                 std::string* temp = new std::string[nopt+1];
03753                 int i;
03754                 for (i = 0; i < nopt; i++)
03755                         temp[i] = this->jobID[i]; // create the new jobID
03756 
03757                 delete[] this->jobID;
03758                 
03759                 temp[nopt] = jobID;
03760 
03761                 this->jobID = temp;
03762                 this->numberOfJobIDs = ++nopt;
03763                 return true;
03764         }
03765         catch(const ErrorClass& eclass)
03766         {       cout << eclass.errormsg << endl;
03767                 return false;
03768         }
03769 }//addJobID
03770 
03777 bool DirectoriesAndFiles::setPath(int numberOfPaths, std::string *path)
03778 {       try
03779         {       if (this->path != NULL)
03780                         throw ErrorClass( "path array previously used.");
03781 
03782                 if (numberOfPaths < 0)
03783                         throw ErrorClass( "length of path array cannot be negative.");
03784 
03785                 this->numberOfPaths = numberOfPaths;
03786                 if (numberOfPaths == 0)
03787                         return true;
03788 
03789                 this->path = new std::string[numberOfPaths];
03790                 int i;
03791                 for (i = 0; i < numberOfPaths; i++)
03792                         this->path[i] = path[i];
03793                 
03794                 return true;
03795         }
03796         catch(const ErrorClass& eclass)
03797         {       cout << eclass.errormsg << endl;
03798                 return false;
03799         }
03800 }//setPath
03801 
03807 bool DirectoriesAndFiles::addPath(std::string path)
03808 {       try
03809         {       int nopt;
03810                 if (path.empty() )
03811                         throw ErrorClass( "the path cannot be empty." );
03812 
03813                 if (this->path == NULL) 
03814                         nopt = 0;
03815                 else
03816                         nopt = this->numberOfPaths;
03817 
03818                 std::string* temp = new std::string[nopt+1];
03819                 int i;
03820                 for (i = 0; i < nopt; i++)
03821                         temp[i] = this->path[i]; // create the new path
03822 
03823                 delete[] this->path;
03824                 
03825                 temp[nopt] = path;
03826 
03827                 this->path = temp;
03828                 this->numberOfPaths = ++nopt;
03829                 return true;
03830         }
03831         catch(const ErrorClass& eclass)
03832         {       cout << eclass.errormsg << endl;
03833                 return false;
03834         }
03835 }//addPath
03836 
03843 bool PathPairs::setPathPair(int numberOfPathPairs, PathPair **pathPair)
03844 {       try
03845         {       if (this->pathPair != NULL)
03846                         throw ErrorClass( "pathPair array previously used.");
03847                 
03848                 if (numberOfPathPairs < 0)
03849                         throw ErrorClass( "length of pathPair array cannot be negative.");
03850 
03851                 this->numberOfPathPairs = numberOfPathPairs;
03852                 if (numberOfPathPairs == 0)
03853                         return true;
03854 
03855                 this->pathPair = new PathPair*[numberOfPathPairs];
03856          
03857                 int  i;
03858                 for (i = 0; i < numberOfPathPairs; i++)
03859                 {        this->pathPair[i] = new PathPair();
03860                         *this->pathPair[i] = *pathPair[i];
03861                 }
03862                 return true;
03863         }
03864         catch(const ErrorClass& eclass)
03865         {       cout << eclass.errormsg << endl;
03866                 return false;
03867         }
03868 }//setPathPair
03869 
03877 bool PathPairs::addPathPair(std::string fromPath, std::string toPath, bool makeCopy)
03878 {       try
03879         {       int nopt; int i;
03880                 if (fromPath.empty() )
03881                         throw ErrorClass( "the \"from\" path cannot be empty." );
03882                 if (toPath.empty() )
03883                         throw ErrorClass( "the \"to\" path cannot be empty." );
03884 
03885                 if (this->pathPair == NULL) 
03886                         nopt = 0;
03887                 else
03888                         nopt = this->numberOfPathPairs;
03889         
03890                 PathPair** temp = new PathPair*[nopt+1];  //Allocate the new pointers
03891                 for (i = 0; i < nopt; i++)
03892                         temp[i] = this->pathPair[i];  //copy the pointers
03893 
03894                 delete[] this->pathPair; //delete old pointers
03895         
03896 //      add in the new element
03897                 temp[ nopt] = new PathPair();
03898 
03899                 temp[ nopt]->from = fromPath;
03900                 temp[ nopt]->to = toPath;
03901                 temp[ nopt]->makeCopy = makeCopy;
03902 
03903                 this->pathPair = temp;   //hook the new pointers into the data structure
03904                 this->numberOfPathPairs = ++nopt;
03905 
03906                 return true;
03907         }
03908         catch(const ErrorClass& eclass)
03909         {       cout << eclass.errormsg << endl;
03910                 return false;
03911         }
03912 }//addPathPair
03913 
03920 bool Processes::setProcess(int numberOfProcesses, std::string *process)
03921 {       try
03922         {       if (this->process != NULL)
03923                         throw ErrorClass( "process array previously used.");
03924 
03925                 if (numberOfProcesses < 0)
03926                         throw ErrorClass( "length of process array cannot be negative.");
03927 
03928                 this->numberOfProcesses= numberOfProcesses;
03929                 if (numberOfProcesses == 0)
03930                         return true;
03931 
03932                 this->process = new std::string[numberOfProcesses];
03933                 int i;
03934                 for (i = 0; i < numberOfProcesses; i++)
03935                         this->process[i] = process[i];
03936                 
03937                 return true;
03938         }
03939         catch(const ErrorClass& eclass)
03940         {       cout << eclass.errormsg << endl;
03941                 return false;
03942         }
03943 }//setProcess
03944 
03950 bool Processes::addProcess(std::string process)
03951 {       try
03952         {       int nopt;
03953                 if (process.empty() )
03954                         throw ErrorClass( "the name of a process cannot be empty." );
03955 
03956                 if (this->process == NULL) 
03957                         nopt = 0;
03958                 else
03959                         nopt = this->numberOfProcesses;
03960 
03961                 std::string* temp = new std::string[nopt+1];
03962                 int i;
03963                 for (i = 0; i < nopt; i++)
03964                         temp[i] = this->process[i]; // create the new jobID
03965 
03966                 delete[] this->process;
03967                 
03968                 temp[nopt] = process;
03969 
03970                 this->process = temp;
03971                 this->numberOfProcesses = ++nopt;
03972                 return true;
03973         }
03974         catch(const ErrorClass& eclass)
03975         {       cout << eclass.errormsg << endl;
03976                 return false;
03977         }
03978 }//addProcess
03979 
03986 bool InitVariableValues::setVar(int numberOfVar, InitVarValue **var)
03987 {       try
03988         {       if (this->var != NULL)
03989                         throw ErrorClass( "InitVarValue array previously used.");
03990                 
03991                 if (numberOfVar < 0)
03992                         throw ErrorClass( "length of var array cannot be negative.");
03993 
03994                 this->numberOfVar = numberOfVar;
03995                 if (numberOfVar == 0)
03996                         return true;
03997 
03998                 this->var = new InitVarValue*[numberOfVar];
03999          
04000                 int  i;
04001                 for (i = 0; i < numberOfVar; i++)
04002                 {        this->var[i] = new InitVarValue();
04003                         *this->var[i] = *var[i];
04004                 }
04005                 return true;
04006         }
04007         catch(const ErrorClass& eclass)
04008         {       cout << eclass.errormsg << endl;
04009                 return false;
04010         }
04011 }//setVar
04012 
04019 bool InitVariableValues::addVar(int idx, double value)
04020 {       try
04021         {       int nopt; int i;
04022                 if (idx < 0)
04023                         throw ErrorClass( "the index of a variable cannot be negative." );
04024 
04025                 if (this->var == NULL) 
04026                         nopt = 0;
04027                 else
04028                         nopt = this->numberOfVar;
04029         
04030                 InitVarValue** temp = new InitVarValue*[nopt+1];  //Allocate the new pointers
04031                 for (i = 0; i < nopt; i++)
04032                         temp[i] = this->var[i];  //copy the pointers
04033 
04034                 delete[] this->var; //delete old pointers
04035         
04036 //      add in the new element
04037                 temp[ nopt] = new InitVarValue();
04038 
04039                 temp[ nopt]->idx = idx;
04040                 temp[ nopt]->value = value;
04041 
04042                 this->var = temp;   //hook the new pointers into the data structure
04043                 this->numberOfVar = ++nopt;
04044 
04045                 return true;
04046         }
04047         catch(const ErrorClass& eclass)
04048         {       cout << eclass.errormsg << endl;
04049                 return false;
04050         }
04051 }//addVar
04052 
04059 bool InitVariableValuesString::setVar(int numberOfVar, InitVarValueString **var)
04060 {       try
04061         {       if (this->var != NULL)
04062                         throw ErrorClass( "InitVarValueString array previously used.");
04063                 
04064                 if (numberOfVar < 0)
04065                         throw ErrorClass( "length of var array cannot be negative.");
04066 
04067                 this->numberOfVar = numberOfVar;
04068                 if (numberOfVar == 0)
04069                         return true;
04070 
04071                 this->var = new InitVarValueString*[numberOfVar];
04072          
04073                 int  i;
04074                 for (i = 0; i < numberOfVar; i++)
04075                 {        this->var[i] = new InitVarValueString();
04076                         *this->var[i] = *var[i];
04077                 }
04078                 return true;
04079         }
04080         catch(const ErrorClass& eclass)
04081         {       cout << eclass.errormsg << endl;
04082                 return false;
04083         }
04084 }//setVar
04085 
04092 bool InitVariableValuesString::addVar(int idx, std::string value)
04093 {       try
04094         {       int nopt; int i;
04095                 if (idx < 0)
04096                         throw ErrorClass( "the index of a variable cannot be negative." );
04097 
04098                 if (this->var == NULL) 
04099                         nopt = 0;
04100                 else
04101                         nopt = this->numberOfVar;
04102         
04103                 InitVarValueString** temp = new InitVarValueString*[nopt+1];  //Allocate the new pointers
04104                 for (i = 0; i < nopt; i++)
04105                         temp[i] = this->var[i];  //copy the pointers
04106 
04107                 delete[] this->var; //delete old pointers
04108         
04109 //      add in the new element
04110                 temp[ nopt] = new InitVarValueString();
04111 
04112                 temp[ nopt]->idx = idx;
04113                 temp[ nopt]->value = value;
04114 
04115                 this->var = temp;   //hook the new pointers into the data structure
04116                 this->numberOfVar = ++nopt;
04117 
04118                 return true;
04119         }
04120         catch(const ErrorClass& eclass)
04121         {       cout << eclass.errormsg << endl;
04122                 return false;
04123         }
04124 }//addVar
04125 
04132 bool InitialBasisStatus::setVar(int numberOfVar, InitBasStatus **var)
04133 {       try
04134         {       if (this->var != NULL)
04135                         throw ErrorClass( "InitBasStatus array previously used.");
04136                 
04137                 if (numberOfVar < 0)
04138                         throw ErrorClass( "length of var array cannot be negative.");
04139 
04140                 this->numberOfVar = numberOfVar;
04141                 if (numberOfVar == 0)
04142                         return true;
04143 
04144                 this->var = new InitBasStatus*[numberOfVar];
04145          
04146                 int  i;
04147                 for (i = 0; i < numberOfVar; i++)
04148                 {        this->var[i] = new InitBasStatus();
04149                         *this->var[i] = *var[i];
04150                 }
04151                 return true;
04152         }
04153         catch(const ErrorClass& eclass)
04154         {       cout << eclass.errormsg << endl;
04155                 return false;
04156         }
04157 }//setVar
04158 
04165 bool InitialBasisStatus::addVar(int idx, std::string value)
04166 {       try
04167         {       int nopt; int i;
04168                 if (idx < 0)
04169                         throw ErrorClass( "the index of a variable cannot be negative." );
04170                 if (value != "atLower" && value != "basic" && value != "unknown" && 
04171                         value != "atUpper" && value != "superbasic" )
04172                         throw ErrorClass( "Illegal basis status " + value );
04173 
04174                 if (this->var == NULL) 
04175                         nopt = 0;
04176                 else
04177                         nopt = this->numberOfVar;
04178         
04179                 InitBasStatus** temp = new InitBasStatus*[nopt+1];  //Allocate the new pointers
04180                 for (i = 0; i < nopt; i++)
04181                         temp[i] = this->var[i];  //copy the pointers
04182 
04183                 delete[] this->var; //delete old pointers
04184         
04185 //      add in the new element
04186                 temp[ nopt] = new InitBasStatus();
04187 
04188                 temp[ nopt]->idx = idx;
04189                 temp[ nopt]->value = value;
04190 
04191                 this->var = temp;   //hook the new pointers into the data structure
04192                 this->numberOfVar = ++nopt;
04193 
04194                 return true;
04195         }
04196         catch(const ErrorClass& eclass)
04197         {       cout << eclass.errormsg << endl;
04198                 return false;
04199         }
04200 }//addVar
04201 
04208 bool IntegerVariableBranchingWeights::setVar(int numberOfVar, BranchingWeight **var)
04209 {       try
04210         {       if (this->var != NULL)
04211                         throw ErrorClass( "BranchingWeight array previously used.");
04212                 
04213                 if (numberOfVar < 0)
04214                         throw ErrorClass( "length of var array cannot be negative.");
04215 
04216                 this->numberOfVar = numberOfVar;
04217                 if (numberOfVar == 0)
04218                         return true;
04219 
04220                 this->var = new BranchingWeight*[numberOfVar];
04221          
04222                 int  i;
04223                 for (i = 0; i < numberOfVar; i++)
04224                 {        this->var[i] = new BranchingWeight();
04225                         *this->var[i] = *var[i];
04226                 }
04227                 return true;
04228         }
04229         catch(const ErrorClass& eclass)
04230         {       cout << eclass.errormsg << endl;
04231                 return false;
04232         }
04233 }//setVar
04234 
04241 bool IntegerVariableBranchingWeights::addVar(int idx, double value)
04242 {       try
04243         {       int nopt; int i;
04244                 if (idx < 0)
04245                         throw ErrorClass( "the index of a variable cannot be negative." );
04246 
04247                 if (this->var == NULL) 
04248                         nopt = 0;
04249                 else
04250                         nopt = this->numberOfVar;
04251         
04252                 BranchingWeight** temp = new BranchingWeight*[nopt+1];  //Allocate the new pointers
04253                 for (i = 0; i < nopt; i++)
04254                         temp[i] = this->var[i];  //copy the pointers
04255 
04256                 delete[] this->var; //delete old pointers
04257         
04258 //      add in the new element
04259                 temp[ nopt] = new BranchingWeight();
04260 
04261                 temp[ nopt]->idx = idx;
04262                 temp[ nopt]->value = value;
04263 
04264                 this->var = temp;   //hook the new pointers into the data structure
04265                 this->numberOfVar = ++nopt;
04266 
04267                 return true;
04268         }
04269         catch(const ErrorClass& eclass)
04270         {       cout << eclass.errormsg << endl;
04271                 return false;
04272         }
04273 }//addVar
04274 
04281 bool SOSWeights::setVar(int numberOfVar, BranchingWeight **var)
04282 {       try
04283         {       if (this->var != NULL)
04284                         throw ErrorClass( "BranchingWeight array previously used.");
04285                 
04286                 if (numberOfVar < 0)
04287                         throw ErrorClass( "length of var array cannot be negative.");
04288 
04289                 this->numberOfVar = numberOfVar;
04290                 if (numberOfVar == 0)
04291                         return true;
04292 
04293                 this->var = new BranchingWeight*[numberOfVar];
04294          
04295                 int  i;
04296                 for (i = 0; i < numberOfVar; i++)
04297                 {        this->var[i] = new BranchingWeight();
04298                         *this->var[i] = *var[i];
04299                 }
04300                 return true;
04301         }
04302         catch(const ErrorClass& eclass)
04303         {       cout << eclass.errormsg << endl;
04304                 return false;
04305         }
04306 }//setVar
04307 
04314 bool SOSWeights::addVar(int idx, double value)
04315 {       try
04316         {       int nopt; int i;
04317                 if (idx < 0)
04318                         throw ErrorClass( "the index of a variable cannot be negative." );
04319 
04320                 if (this->var == NULL) 
04321                         nopt = 0;
04322                 else
04323                         nopt = this->numberOfVar;
04324         
04325                 BranchingWeight** temp = new BranchingWeight*[nopt+1];  //Allocate the new pointers
04326                 for (i = 0; i < nopt; i++)
04327                         temp[i] = this->var[i];  //copy the pointers
04328 
04329                 delete[] this->var; //delete old pointers
04330         
04331 //      add in the new element
04332                 temp[ nopt] = new BranchingWeight();
04333 
04334                 temp[ nopt]->idx = idx;
04335                 temp[ nopt]->value = value;
04336 
04337                 this->var = temp;   //hook the new pointers into the data structure
04338                 this->numberOfVar = ++nopt;
04339 
04340                 return true;
04341         }
04342         catch(const ErrorClass& eclass)
04343         {       cout << eclass.errormsg << endl;
04344                 return false;
04345         }
04346 }//addVar
04347 
04354 bool SOSVariableBranchingWeights::setSOS(int numberOfSOS, SOSWeights **sos)
04355 {       try
04356         {       if (this->sos != NULL)
04357                         throw ErrorClass( "SOS array previously used.");
04358                 
04359                 if (numberOfSOS < 0)
04360                         throw ErrorClass( "length of sos array cannot be negative.");
04361                 
04362                 this->numberOfSOS = numberOfSOS;
04363                 if (numberOfSOS == 0) return true;
04364 
04365                 this->sos = new SOSWeights*[numberOfSOS];
04366          
04367                 int  i, j;
04368                 for (i = 0; i < numberOfSOS; i++)
04369                 {       this->sos[i] = new SOSWeights();
04370                         this->sos[i]->sosIdx      = sos[i]->sosIdx;
04371                         this->sos[i]->groupWeight = sos[i]->groupWeight;
04372 
04373                         if (sos[i]->numberOfVar < 0)
04374                                 throw ErrorClass( "the number of variables in the SOS cannot be negative.");
04375 
04376                         this->sos[i]->numberOfVar = sos[i]->numberOfVar;
04377 
04378                         if (sos[i]->numberOfVar > 0) 
04379                         {       this->sos[i]->var = new BranchingWeight*[sos[i]->numberOfVar];
04380                                 for (j = 0; j < sos[i]->numberOfVar; j++)
04381                                 {        this->sos[i]->var[j] = new BranchingWeight();
04382                                         *this->sos[i]->var[j] = *sos[i]->var[j];
04383                                 }
04384                         }
04385                 }
04386                 return true;
04387         }
04388         catch(const ErrorClass& eclass)
04389         {       cout << eclass.errormsg << endl;
04390                 return false;
04391         }
04392 }//setSOS
04393 
04399 bool SOSVariableBranchingWeights::addSOS(int sosIdx, int nvar, double weight, int* idx, double* value)
04400 {       try
04401         {       int nopt; int i;
04402                 if (sosIdx < 0)
04403                         throw ErrorClass( "the index of the SOS cannot be negative." );
04404                 if (nvar < 0)
04405                         throw ErrorClass( "the number of variables in the SOS cannot be negative." );
04406 
04407                 if (this->sos  == NULL) 
04408                         nopt = 0;
04409                 else
04410                         nopt = this->numberOfSOS;
04411         
04412                 SOSWeights** temp = new SOSWeights*[nopt+1];  //Allocate the new pointers
04413                 for (i = 0; i < nopt; i++)
04414                         temp[i] = this->sos[i];  //copy the pointers
04415 
04416                 delete[] this->sos; //delete old pointers
04417         
04418 //      add in the new element
04419                 temp[ nopt] = new SOSWeights();
04420 
04421                 temp[ nopt]->sosIdx = sosIdx;
04422                 temp[ nopt]->groupWeight = weight;
04423                 temp[ nopt]->numberOfVar = nvar;
04424                 temp[ nopt]->var = new BranchingWeight*[nvar];
04425                 for (i = 0; i < nvar; i++)
04426                 {       temp[nopt]->var[i] = new BranchingWeight();
04427                         temp[nopt]->var[i]->idx   = idx[i];
04428                         temp[nopt]->var[i]->value = value[i];
04429                 }
04430 
04431                 this->sos  = temp;   //hook the new pointers into the data structure
04432                 this->numberOfSOS = ++nopt;
04433 
04434                 return true;
04435         }
04436         catch(const ErrorClass& eclass)
04437         {       cout << eclass.errormsg << endl;
04438                 return false;
04439         }
04440 }//addSOS
04441 
04448 bool OtherVariableOption::setVar(int numberOfVar, OtherVarOption **var)
04449 {       try
04450         {       if (this->var != NULL)
04451                         throw ErrorClass( "OtherVarOption array previously used.");
04452                 
04453                 if (numberOfVar < 0)
04454                         throw ErrorClass( "length of <var> array cannot be negative.");
04455 
04456                 this->numberOfVar = numberOfVar;
04457                 if (numberOfVar == 0) return true;
04458 
04459                 this->var = new OtherVarOption*[numberOfVar];
04460          
04461                 int  i;
04462                 for (i = 0; i < numberOfVar; i++)
04463                 {        this->var[i] = new OtherVarOption();
04464                         *this->var[i] = *var[i];
04465                 }
04466                 return true;
04467         }
04468         catch(const ErrorClass& eclass)
04469         {       cout << eclass.errormsg << endl;
04470                 return false;
04471         }
04472 }//setVar
04473 
04482 bool OtherVariableOption::addVar(int idx, std::string value, std::string lbValue, std::string ubValue)
04483 {       try
04484         {       int nopt; int i;
04485                 if (idx < 0)
04486                         throw ErrorClass( "the index of a variable cannot be negative." );
04487 
04488                 if (this->var == NULL) 
04489                         nopt = 0;
04490                 else
04491                         nopt = this->numberOfVar;
04492         
04493                 OtherVarOption** temp = new OtherVarOption*[nopt+1];  //Allocate the new pointers
04494                 for (i = 0; i < nopt; i++)
04495                         temp[i] = this->var[i];  //copy the pointers
04496 
04497                 delete[] this->var; //delete old pointers
04498         
04499 //      add in the new element
04500                 temp[ nopt] = new OtherVarOption();
04501 
04502                 temp[ nopt]->idx = idx;
04503                 temp[ nopt]->value = value;
04504                 temp[ nopt]->lbValue = lbValue;
04505                 temp[ nopt]->ubValue = ubValue;
04506 
04507                 this->var = temp;   //hook the new pointers into the data structure
04508                 this->numberOfVar = ++nopt;
04509 
04510                 return true;
04511         }
04512         catch(const ErrorClass& eclass)
04513         {       cout << eclass.errormsg << endl;
04514                 return false;
04515         }
04516 }//addVar
04517 
04524 bool VariableOption::setOther(int numberOfOptions, OtherVariableOption  **other)
04525 {       try
04526         {       if (this->other != NULL)
04527                         throw ErrorClass( "otherVariableOptions array previously used.");
04528                 
04529                 if (numberOfOptions < 0)
04530                         throw ErrorClass( "length of <other> array cannot be negative.");
04531 
04532                 this->numberOfOtherVariableOptions = numberOfOptions;
04533                 if (numberOfOptions == 0) return true;
04534 
04535                 this->other = new OtherVariableOption*[numberOfOptions];
04536          
04537                 int  i, j;
04538                 for (i = 0; i < numberOfOptions; i++)
04539                 {       this->other[i] = new OtherVariableOption();
04540                         this->other[i]->name        = other[i]->name;
04541                         this->other[i]->value       = other[i]->value;
04542                         this->other[i]->solver      = other[i]->solver;
04543                         this->other[i]->category    = other[i]->category;
04544                         this->other[i]->type        = other[i]->type;
04545                         this->other[i]->description = other[i]->description;
04546 
04547                         if (other[i]->numberOfVar < 0)
04548                                 throw ErrorClass( "the number of variables in otherVariableOption cannot be negative.");
04549 
04550                         this->other[i]->numberOfVar = other[i]->numberOfVar;
04551 
04552                         if (other[i]->numberOfVar > 0) 
04553                         {
04554                                 this->other[i]->var = new OtherVarOption*[other[i]->numberOfVar];
04555                                 for (j = 0; j < other[i]->numberOfVar; j++)
04556                                 {        this->other[i]->var[j] = new OtherVarOption();
04557                                         *this->other[i]->var[j] = *other[i]->var[j];
04558                                 }
04559                         }
04560                 }
04561                 return true;
04562         }
04563         catch(const ErrorClass& eclass)
04564         {       cout << eclass.errormsg << endl;
04565                 return false;
04566         }
04567 }//setOther
04568 
04574 bool VariableOption::addOther(OtherVariableOption *other)
04575 {       try
04576         {       int nopt, i, j;
04577                 if (this->other == NULL) 
04578                         nopt = 0;
04579                 else
04580                         nopt = this->numberOfOtherVariableOptions;
04581         
04582                 OtherVariableOption** temp = new OtherVariableOption*[nopt+1];  //Allocate the new pointers
04583                 for (i = 0; i < nopt; i++)
04584                         temp[i] = this->other[i];  //copy the pointers
04585 
04586                 delete[] this->other; //delete old pointers
04587         
04588 //      add in the new element
04589                 temp[ nopt] = new OtherVariableOption();
04590                 temp[ nopt]->name        = other->name;
04591                 temp[ nopt]->value       = other->value;
04592                 temp[ nopt]->solver      = other->solver;
04593                 temp[ nopt]->category    = other->category;
04594                 temp[ nopt]->type        = other->type;
04595                 temp[ nopt]->description = other->description;
04596 
04597                 if (other->numberOfVar < 0)
04598                         throw ErrorClass( "the number of variables in otherVariableOption cannot be negative.");
04599 
04600                 temp[ nopt]->numberOfVar = other->numberOfVar;
04601 
04602                 if (other->numberOfVar > 0)
04603                 {       
04604                         temp[ nopt]->var = new OtherVarOption*[other->numberOfVar];
04605                         for (j = 0; j < other->numberOfVar; j++)
04606                         {        temp[ nopt]->var[j] = new OtherVarOption();
04607                                 *temp[ nopt]->var[j] = *other->var[j];
04608                         }
04609                 }
04610 
04611                 this->other = temp;   //hook the new pointers into the data structure
04612                 this->numberOfOtherVariableOptions = ++nopt;
04613 
04614                 return true;
04615         }
04616         catch(const ErrorClass& eclass)
04617         {       cout << eclass.errormsg << endl;
04618                 return false;
04619         }
04620 }//addOther
04621 
04628 bool InitObjectiveValues::setObj(int numberOfObj, InitObjValue **obj)
04629 {       try
04630         {       if (this->obj != NULL)
04631                         throw ErrorClass( "InitObjValue array previously used.");
04632                 
04633                 if (numberOfObj < 0)
04634                         throw ErrorClass( "length of obj array cannot be negative.");
04635 
04636                 this->numberOfObj = numberOfObj;
04637                 if (numberOfObj == 0)
04638                         return true;
04639 
04640                 this->obj = new InitObjValue*[numberOfObj];
04641          
04642                 int  i;
04643                 for (i = 0; i < numberOfObj; i++)
04644                 {        this->obj[i] = new InitObjValue();
04645                         *this->obj[i] = *obj[i];
04646                 }
04647                 return true;
04648         }
04649         catch(const ErrorClass& eclass)
04650         {       cout << eclass.errormsg << endl;
04651                 return false;
04652         }
04653 }//setObj
04654 
04661 bool InitObjectiveValues::addObj(int idx, double value)
04662 {       try
04663         {       int nopt; int i;
04664                 if (idx >= 0)
04665                         throw ErrorClass( "the index of an objective must be negative." );
04666 
04667                 if (this->obj == NULL) 
04668                         nopt = 0;
04669                 else
04670                         nopt = this->numberOfObj;
04671         
04672                 InitObjValue** temp = new InitObjValue*[nopt+1];  //Allocate the new pointers
04673                 for (i = 0; i < nopt; i++)
04674                         temp[i] = this->obj[i];  //copy the pointers
04675 
04676                 delete[] this->obj; //delete old pointers
04677         
04678 //      add in the new element
04679                 temp[ nopt] = new InitObjValue();
04680 
04681                 temp[ nopt]->idx = idx;
04682                 temp[ nopt]->value = value;
04683 
04684                 this->obj = temp;   //hook the new pointers into the data structure
04685                 this->numberOfObj = ++nopt;
04686 
04687                 return true;
04688         }
04689         catch(const ErrorClass& eclass)
04690         {       cout << eclass.errormsg << endl;
04691                 return false;
04692         }
04693 }//addObj
04694 
04701 bool InitObjectiveBounds::setObj(int numberOfObj, InitObjBound **obj)
04702 {       try
04703         {       if (this->obj != NULL)
04704                         throw ErrorClass( "InitObjBound array previously used.");
04705                 
04706                 if (numberOfObj < 0)
04707                         throw ErrorClass( "length of obj array cannot be negative.");
04708 
04709                 this->numberOfObj = numberOfObj;
04710                 if (numberOfObj == 0)
04711                         return true;
04712 
04713                 this->obj = new InitObjBound*[numberOfObj];
04714          
04715                 int  i;
04716                 for (i = 0; i < numberOfObj; i++)
04717                 {        this->obj[i] = new InitObjBound();
04718                         *this->obj[i] = *obj[i];
04719                 }
04720                 return true;
04721         }
04722         catch(const ErrorClass& eclass)
04723         {       cout << eclass.errormsg << endl;
04724                 return false;
04725         }
04726 }//setObj
04727 
04735 bool InitObjectiveBounds::addObj(int idx, double lbValue, double ubValue)
04736 {       try
04737         {       int nopt; int i;
04738                 if (idx >= 0)
04739                         throw ErrorClass( "the index of an objective must be negative." );
04740 
04741                 if (this->obj == NULL) 
04742                         nopt = 0;
04743                 else
04744                         nopt = this->numberOfObj;
04745         
04746                 InitObjBound** temp = new InitObjBound*[nopt+1];  //Allocate the new pointers
04747                 for (i = 0; i < nopt; i++)
04748                         temp[i] = this->obj[i];  //copy the pointers
04749 
04750                 delete[] this->obj; //delete old pointers
04751         
04752 //      add in the new element
04753                 temp[ nopt] = new InitObjBound();
04754 
04755                 temp[ nopt]->idx = idx;
04756                 temp[ nopt]->lbValue = lbValue;
04757                 temp[ nopt]->ubValue = ubValue;
04758 
04759                 this->obj = temp;   //hook the new pointers into the data structure
04760                 this->numberOfObj = ++nopt;
04761 
04762                 return true;
04763         }
04764         catch(const ErrorClass& eclass)
04765         {       cout << eclass.errormsg << endl;
04766                 return false;
04767         }
04768 }//addObj
04769 
04776 bool OtherObjectiveOption::setObj(int numberOfObj, OtherObjOption **obj)
04777 {       try
04778         {       if (this->obj != NULL)
04779                         throw ErrorClass( "OtherObjOption array previously used.");
04780                 
04781                 if (numberOfObj < 0)
04782                         throw ErrorClass( "length of <obj> array cannot be negative.");
04783 
04784                 this->numberOfObj= numberOfObj;
04785                 if (numberOfObj == 0)
04786                         return true;
04787 
04788                 this->obj = new OtherObjOption*[numberOfObj];
04789          
04790                 int  i;
04791                 for (i = 0; i < numberOfObj; i++)
04792                 {        this->obj[i] = new OtherObjOption();
04793                         *this->obj[i] = *obj[i];
04794                 }
04795                 return true;
04796         }
04797         catch(const ErrorClass& eclass)
04798         {       cout << eclass.errormsg << endl;
04799                 return false;
04800         }
04801 }//setObj
04802 
04811 bool OtherObjectiveOption::addObj(int idx, std::string value, std::string lbValue, std::string ubValue)
04812 {       try
04813         {       int nopt; int i;
04814                 if (idx >= 0)
04815                         throw ErrorClass( "the index of an objective must be negative." );
04816 
04817                 if (this->obj == NULL) 
04818                         nopt = 0;
04819                 else
04820                         nopt = this->numberOfObj;
04821         
04822                 OtherObjOption** temp = new OtherObjOption*[nopt+1];  //Allocate the new pointers
04823                 for (i = 0; i < nopt; i++)
04824                         temp[i] = this->obj[i];  //copy the pointers
04825 
04826                 delete[] this->obj; //delete old pointers
04827         
04828 //      add in the new element
04829                 temp[ nopt] = new OtherObjOption();
04830 
04831                 temp[ nopt]->idx = idx;
04832                 temp[ nopt]->value = value;
04833                 temp[ nopt]->lbValue = lbValue;
04834                 temp[ nopt]->ubValue = ubValue;
04835 
04836                 this->obj = temp;   //hook the new pointers into the data structure
04837                 this->numberOfObj = ++nopt;
04838 
04839                 return true;
04840         }
04841         catch(const ErrorClass& eclass)
04842         {       cout << eclass.errormsg << endl;
04843                 return false;
04844         }
04845 }//addObj
04846 
04853 bool ObjectiveOption::setOther(int numberOfOptions, OtherObjectiveOption  **other)
04854 {       try
04855         {       if (this->other != NULL)
04856                         throw ErrorClass( "otherObjectiveOptions array previously used.");
04857                 
04858                 if (numberOfOptions < 0)
04859                         throw ErrorClass( "length of <other> array cannot be negative.");
04860 
04861                 this->numberOfOtherObjectiveOptions = numberOfOptions;
04862                 if (numberOfOptions == 0) return true;
04863 
04864                 this->other = new OtherObjectiveOption*[numberOfOptions];
04865          
04866                 int  i, j;
04867                 for (i = 0; i < numberOfOptions; i++)
04868                 {       this->other[i] = new OtherObjectiveOption();
04869                         this->other[i]->name        = other[i]->name;
04870                         this->other[i]->value       = other[i]->value;
04871                         this->other[i]->solver      = other[i]->solver;
04872                         this->other[i]->category    = other[i]->category;
04873                         this->other[i]->type        = other[i]->type;
04874                         this->other[i]->description = other[i]->description;
04875 
04876                         if (other[i]->numberOfObj < 0)
04877                                 throw ErrorClass( "the number of objectives in otherObjectiveOption cannot be negative.");
04878 
04879                         this->other[i]->numberOfObj = other[i]->numberOfObj;
04880 
04881                         if (other[i]->numberOfObj > 0) 
04882                         {
04883                                 this->other[i]->obj = new OtherObjOption*[other[i]->numberOfObj];
04884                                 for (j = 0; j < other[i]->numberOfObj; j++)
04885                                 {        this->other[i]->obj[j] = new OtherObjOption();
04886                                         *this->other[i]->obj[j] = *other[i]->obj[j];
04887                                 }
04888                         }
04889                 }
04890                 return true;
04891         }
04892         catch(const ErrorClass& eclass)
04893         {       cout << eclass.errormsg << endl;
04894                 return false;
04895         }
04896 }//setOther
04897 
04903 bool ObjectiveOption::addOther(OtherObjectiveOption *other)
04904 {       try
04905         {       int nopt, i, j;
04906                 if (this->other == NULL) 
04907                         nopt = 0;
04908                 else
04909                         nopt = this->numberOfOtherObjectiveOptions;
04910         
04911                 OtherObjectiveOption** temp = new OtherObjectiveOption*[nopt+1];  //Allocate the new pointers
04912                 for (i = 0; i < nopt; i++)
04913                         temp[i] = this->other[i];  //copy the pointers
04914 
04915                 delete[] this->other; //delete old pointers
04916         
04917 //      add in the new element
04918                 temp[ nopt] = new OtherObjectiveOption();
04919                 temp[ nopt]->name        = other->name;
04920                 temp[ nopt]->value       = other->value;
04921                 temp[ nopt]->solver      = other->solver;
04922                 temp[ nopt]->category    = other->category;
04923                 temp[ nopt]->type        = other->type;
04924                 temp[ nopt]->description = other->description;
04925 
04926                 if (other->numberOfObj < 0)
04927                         throw ErrorClass( "the number of objectives in otherObjectiveOption cannot be negative.");
04928 
04929                 temp[ nopt]->numberOfObj = other->numberOfObj;
04930 
04931                 if (other->numberOfObj > 0) 
04932                 {       
04933                         temp[ nopt]->obj = new OtherObjOption*[other->numberOfObj];
04934                         for (j = 0; j < other->numberOfObj; j++)
04935                         {        temp[ nopt]->obj[j] = new OtherObjOption();
04936                                 *temp[ nopt]->obj[j] = *other->obj[j];
04937                         }
04938                 }
04939 
04940                 this->other = temp;   //hook the new pointers into the data structure
04941                 this->numberOfOtherObjectiveOptions = ++nopt;
04942 
04943                 return true;
04944         }
04945         catch(const ErrorClass& eclass)
04946         {       cout << eclass.errormsg << endl;
04947                 return false;
04948         }
04949 }//addOther
04950 
04957 bool InitConstraintValues::setCon(int numberOfCon, InitConValue **con)
04958 {       try
04959         {       if (this->con != NULL)
04960                         throw ErrorClass( "InitConValue array previously used.");
04961                 
04962                 if (numberOfCon < 0)
04963                         throw ErrorClass( "length of con array cannot be negative.");
04964 
04965                 this->numberOfCon = numberOfCon;
04966                 if (numberOfCon == 0)
04967                         return true;
04968 
04969                 this->con = new InitConValue*[numberOfCon];
04970          
04971                 int  i;
04972                 for (i = 0; i < numberOfCon; i++)
04973                 {        this->con[i] = new InitConValue();
04974                         *this->con[i] = *con[i];
04975                 }
04976                 return true;
04977         }
04978         catch(const ErrorClass& eclass)
04979         {       cout << eclass.errormsg << endl;
04980                 return false;
04981         }
04982 }//setCon
04983 
04990 bool InitConstraintValues::addCon(int idx, double value)
04991 {       try
04992         {       int nopt; int i;
04993                 if (idx < 0)
04994                         throw ErrorClass( "the index of a constraint cannot be negative." );
04995 
04996                 if (this->con == NULL) 
04997                         nopt = 0;
04998                 else
04999                         nopt = this->numberOfCon;
05000         
05001                 InitConValue** temp = new InitConValue*[nopt+1];  //Allocate the new pointers
05002                 for (i = 0; i < nopt; i++)
05003                         temp[i] = this->con[i];  //copy the pointers
05004 
05005                 delete[] this->con; //delete old pointers
05006         
05007 //      add in the new element
05008                 temp[ nopt] = new InitConValue();
05009 
05010                 temp[ nopt]->idx = idx;
05011                 temp[ nopt]->value = value;
05012 
05013                 this->con = temp;   //hook the new pointers into the data structure
05014                 this->numberOfCon = ++nopt;
05015 
05016                 return true;
05017         }
05018         catch(const ErrorClass& eclass)
05019         {       cout << eclass.errormsg << endl;
05020                 return false;
05021         }
05022 }//addCon
05023 
05030 bool InitDualVariableValues::setCon(int numberOfCon, InitDualVarValue **con)
05031 {       try
05032         {       if (this->con != NULL)
05033                         throw ErrorClass( "InitDualVarValue array previously used.");
05034                 
05035                 if (numberOfCon < 0)
05036                         throw ErrorClass( "length of con array cannot be negative.");
05037 
05038                 this->numberOfCon = numberOfCon;
05039                 if (numberOfCon == 0)
05040                         return true;
05041 
05042                 this->con = new InitDualVarValue*[numberOfCon];
05043          
05044                 int  i;
05045                 for (i = 0; i < numberOfCon; i++)
05046                 {        this->con[i] = new InitDualVarValue();
05047                         *this->con[i] = *con[i];
05048                 }
05049                 return true;
05050         }
05051         catch(const ErrorClass& eclass)
05052         {       cout << eclass.errormsg << endl;
05053                 return false;
05054         }
05055 }//setCon
05056 
05064 bool InitDualVariableValues::addCon(int idx, double lbDualValue, double ubDualValue)
05065 {       try
05066         {       int nopt; int i;
05067                 if (idx < 0)
05068                         throw ErrorClass( "the index of a constraint cannot be negative." );
05069 
05070                 if (this->con == NULL) 
05071                         nopt = 0;
05072                 else
05073                         nopt = this->numberOfCon;
05074         
05075                 InitDualVarValue** temp = new InitDualVarValue*[nopt+1];  //Allocate the new pointers
05076                 for (i = 0; i < nopt; i++)
05077                         temp[i] = this->con[i];  //copy the pointers
05078 
05079                 delete[] this->con; //delete old pointers
05080         
05081 //      add in the new element
05082                 temp[ nopt] = new InitDualVarValue();
05083 
05084                 temp[ nopt]->idx = idx;
05085                 temp[ nopt]->lbDualValue = lbDualValue;
05086                 temp[ nopt]->ubDualValue = ubDualValue;
05087 
05088                 this->con = temp;   //hook the new pointers into the data structure
05089                 this->numberOfCon = ++nopt;
05090 
05091                 return true;
05092         }
05093         catch(const ErrorClass& eclass)
05094         {       cout << eclass.errormsg << endl;
05095                 return false;
05096         }
05097 }//addCon
05098 
05105 bool OtherConstraintOption::setCon(int numberOfCon, OtherConOption **con)
05106 {       try
05107         {       if (this->con != NULL)
05108                         throw ErrorClass( "OtherConOption array previously used.");
05109                 
05110                 if (numberOfCon < 0)
05111                         throw ErrorClass( "length of <con> array cannot be negative.");
05112 
05113                 this->numberOfCon = numberOfCon;
05114                 if (numberOfCon == 0)
05115                         return true;
05116 
05117                 this->con = new OtherConOption*[numberOfCon];
05118          
05119                 int  i;
05120                 for (i = 0; i < numberOfCon; i++)
05121                 {        this->con[i] = new OtherConOption();
05122                         *this->con[i] = *con[i];
05123                 }
05124                 return true;
05125         }
05126         catch(const ErrorClass& eclass)
05127         {       cout << eclass.errormsg << endl;
05128                 return false;
05129         }
05130 }//setVar
05131 
05140 bool OtherConstraintOption::addCon(int idx, std::string value, std::string lbValue, std::string ubValue)
05141 {       try
05142         {       int nopt; int i;
05143                 if (idx < 0)
05144                         throw ErrorClass( "the index of a variable cannot be negative." );
05145 
05146                 if (this->con == NULL) 
05147                         nopt = 0;
05148                 else
05149                         nopt = this->numberOfCon;
05150         
05151                 OtherConOption** temp = new OtherConOption*[nopt+1];  //Allocate the new pointers
05152                 for (i = 0; i < nopt; i++)
05153                         temp[i] = this->con[i];  //copy the pointers
05154 
05155                 delete[] this->con; //delete old pointers
05156         
05157 //      add in the new element
05158                 temp[ nopt] = new OtherConOption();
05159 
05160                 temp[ nopt]->idx = idx;
05161                 temp[ nopt]->value = value;
05162                 temp[ nopt]->lbValue = lbValue;
05163                 temp[ nopt]->ubValue = ubValue;
05164 
05165                 this->con = temp;   //hook the new pointers into the data structure
05166                 this->numberOfCon = ++nopt;
05167 
05168                 return true;
05169         }
05170         catch(const ErrorClass& eclass)
05171         {       cout << eclass.errormsg << endl;
05172                 return false;
05173         }
05174 }//addCon
05175 
05182 bool ConstraintOption::setOther(int numberOfOptions, OtherConstraintOption  **other)
05183 {       try
05184         {       if (this->other != NULL)
05185                         throw ErrorClass( "otherConstraintOptions array previously used.");
05186                 
05187                 if (numberOfOptions < 0)
05188                         throw ErrorClass( "length of <other> array cannot be negative.");
05189 
05190                 this->numberOfOtherConstraintOptions = numberOfOptions;
05191                 if (numberOfOptions == 0)
05192                         return true;
05193 
05194                 this->other = new OtherConstraintOption*[numberOfOptions];
05195          
05196                 int  i, j;
05197                 for (i = 0; i < numberOfOptions; i++)
05198                 {       this->other[i] = new OtherConstraintOption();
05199                         this->other[i]->name        = other[i]->name;
05200                         this->other[i]->value       = other[i]->value;
05201                         this->other[i]->solver      = other[i]->solver;
05202                         this->other[i]->category    = other[i]->category;
05203                         this->other[i]->type        = other[i]->type;
05204                         this->other[i]->description = other[i]->description;
05205 
05206                         if (other[i]->numberOfCon < 0)
05207                                 throw ErrorClass( "the number of constraints in otherConstraintOption cannot be negative.");
05208 
05209                         this->other[i]->numberOfCon = other[i]->numberOfCon;
05210 
05211                         if (other[i]->numberOfCon > 0) 
05212                         {
05213                                 this->other[i]->con = new OtherConOption*[other[i]->numberOfCon];
05214                                 for (j = 0; j < other[i]->numberOfCon; j++)
05215                                 {        this->other[i]->con[j] = new OtherConOption();
05216                                         *this->other[i]->con[j] = *other[i]->con[j];
05217                                 }
05218                         }
05219                 }
05220                 return true;
05221         }
05222         catch(const ErrorClass& eclass)
05223         {       cout << eclass.errormsg << endl;
05224                 return false;
05225         }
05226 }//setOther
05227 
05233 bool ConstraintOption::addOther(OtherConstraintOption *other)
05234 {       try
05235         {       int nopt, i, j;
05236                 if (this->other == NULL) 
05237                         nopt = 0;
05238                 else
05239                         nopt = this->numberOfOtherConstraintOptions;
05240         
05241                 OtherConstraintOption** temp = new OtherConstraintOption*[nopt+1];  //Allocate the new pointers
05242                 for (i = 0; i < nopt; i++)
05243                         temp[i] = this->other[i];  //copy the pointers
05244 
05245                 delete[] this->other; //delete old pointers
05246         
05247 //      add in the new element
05248          temp[ nopt] = new OtherConstraintOption();
05249                 temp[ nopt]->name        = other->name;
05250                 temp[ nopt]->value       = other->value;
05251                 temp[ nopt]->solver      = other->solver;
05252                 temp[ nopt]->category    = other->category;
05253                 temp[ nopt]->type        = other->type;
05254                 temp[ nopt]->description = other->description;
05255 
05256                 if (other->numberOfCon < 0)
05257                         throw ErrorClass( "the number of constraints in otherConstraintOption cannot be negative.");
05258 
05259                 temp[ nopt]->numberOfCon = other->numberOfCon;
05260 
05261                 if (other->numberOfCon > 0)
05262                 {       
05263                         temp[ nopt]->con = new OtherConOption*[other->numberOfCon];
05264                         for (j = 0; j < other->numberOfCon; j++)
05265                         {        temp[ nopt]->con[j] = new OtherConOption();
05266                                 *temp[ nopt]->con[j] = *other->con[j];
05267                         }
05268                 }
05269 
05270                 this->other = temp;   //hook the new pointers into the data structure
05271                 this->numberOfOtherConstraintOptions = ++nopt;
05272 
05273                 return true;
05274         }
05275         catch(const ErrorClass& eclass)
05276         {       cout << eclass.errormsg << endl;
05277                 return false;
05278         }
05279 }//addOther
05280 
05287 bool SolverOptions::setSolverOptions(int numberOfOptions, SolverOption **solverOption)
05288 {       try
05289         {       if (this->solverOption != NULL)
05290                         throw ErrorClass( "solverOptions array previously used.");
05291                 
05292                 if (numberOfOptions < 0)
05293                         throw ErrorClass( "length of <solverOption> array cannot be negative.");
05294 
05295                 this->numberOfSolverOptions = numberOfOptions;
05296                 if (numberOfOptions == 0)
05297                         return true;
05298 
05299                 this->solverOption = new SolverOption*[numberOfOptions];
05300          
05301                 int  i;
05302                 for (i = 0; i < numberOfOptions; i++)
05303                 {        this->solverOption[i] = new SolverOption();
05304                         *this->solverOption[i] = *solverOption[i];
05305                 }
05306                 return true;
05307         }
05308         catch(const ErrorClass& eclass)
05309         {       cout << eclass.errormsg << endl;
05310                 return false;
05311         }
05312 }//setSolverOption
05313 
05324 bool SolverOptions::addSolverOption(std::string name, std::string value, std::string solver, 
05325                  std::string category, std::string type, std::string description)
05326 {       try
05327         {       int nopt; int i;
05328                 if (name.empty() )
05329                         throw ErrorClass( "the name of a solver option cannot be empty." );
05330 
05331                 if (this->solverOption == NULL) 
05332                         nopt = 0;
05333                 else
05334                         nopt = this->numberOfSolverOptions;
05335         
05336                 SolverOption** temp = new SolverOption*[nopt+1];  //Allocate the new pointers
05337                 for (i = 0; i < nopt; i++)
05338                         temp[i] = this->solverOption[i];  //copy the pointers
05339 
05340                 delete[] this->solverOption; //delete old pointers
05341         
05342 //      add in the new element
05343                 temp[ nopt] = new SolverOption();
05344 
05345                 temp[ nopt]->name = name;
05346                 temp[ nopt]->value = value;
05347                 temp[ nopt]->solver = solver;
05348                 temp[ nopt]->type = type;
05349                 temp[ nopt]->category = category;
05350                 temp[ nopt]->description = description;
05351 
05352                 this->solverOption = temp;   //hook the new pointers into the data structure
05353                 this->numberOfSolverOptions = ++nopt;
05354 
05355                 return true;
05356         }
05357         catch(const ErrorClass& eclass)
05358         {       cout << eclass.errormsg << endl;
05359                 return false;
05360         }
05361 }//addSolverOption
05362 
05363         
05368 bool OSOption::setServiceURI( std::string serviceURI)
05369 {       if (this->general == NULL) 
05370                 this->general = new GeneralOption();
05371         this->general->serviceURI = serviceURI;
05372         return true;
05373 }//setServiceURI
05374 
05375 bool OSOption::setServiceName( std::string serviceName)
05376 {       if (this->general == NULL) 
05377                 this->general = new GeneralOption();
05378         this->general->serviceName = serviceName;
05379         return true;
05380 }//setServiceName
05381 
05382 bool OSOption::setInstanceName( std::string instanceName)
05383 {       if (this->general == NULL) 
05384                 this->general = new GeneralOption();
05385         this->general->instanceName = instanceName;
05386         return true;
05387 }//setInstanceName
05388 
05389 bool OSOption::setInstanceLocation( std::string instanceLocation)
05390 {       if (this->general == NULL) 
05391                 this->general = new GeneralOption();
05392         if (this->general->instanceLocation == NULL) 
05393                 this->general->instanceLocation = new InstanceLocationOption();
05394         this->general->instanceLocation->value = instanceLocation;
05395         return true;
05396 }//setInstanceLocation
05397 
05398 bool OSOption::setInstanceLocationType( std::string locationType)
05399 {       try
05400         {       if (this->general == NULL) 
05401                         this->general = new GeneralOption();
05402                 if (this->general->instanceLocation == NULL) 
05403                         this->general->instanceLocation = new InstanceLocationOption();
05404                 
05405                 if (verifyLocationType(locationType) == 0)
05406                         throw ErrorClass( "location type not recognized.");
05407 
05408                 this->general->instanceLocation->locationType = locationType;
05409                 return true;
05410         }
05411         catch(const ErrorClass& eclass)
05412         {       cout << eclass.errormsg << endl;
05413                 return false;
05414         }
05415 }//setLocationType
05416 
05417 bool OSOption::setJobID( std::string jobID)
05418 {       if (this->general == NULL) 
05419                 this->general = new GeneralOption();
05420         this->general->jobID = jobID;
05421         return true;
05422 }//setJobID
05423 
05424 bool OSOption::setSolverToInvoke( std::string solverToInvoke)
05425 {       if (this->general == NULL) 
05426                 this->general = new GeneralOption();
05427         this->general->solverToInvoke = solverToInvoke;
05428         return true;
05429 }//setSolverToInvoke
05430 
05431 bool OSOption::setLicense( std::string license)
05432 {       if (this->general == NULL) 
05433                 this->general = new GeneralOption();
05434         this->general->license = license;
05435         return true;
05436 }//setLicense
05437 
05438 bool OSOption::setUserName( std::string userName)
05439 {       if (this->general == NULL) 
05440                 this->general = new GeneralOption();
05441         this->general->userName = userName;
05442         return true;
05443 }//setUserName
05444 
05445 bool OSOption::setPassword( std::string password)
05446 {       if (this->general == NULL) 
05447                 this->general = new GeneralOption();
05448         this->general->password = password;
05449         return true;
05450 }//setPassword
05451 
05452 bool OSOption::setContact( std::string contact)
05453 {       if (this->general == NULL) 
05454                 this->general = new GeneralOption();
05455         if (this->general->contact == NULL) 
05456                 this->general->contact = new ContactOption();
05457         this->general->contact->value = contact;
05458         return true;
05459 }//setContact
05460 
05461 bool OSOption::setContactTransportType( std::string transportType)
05462 {       try
05463         {       if (this->general == NULL) 
05464                         this->general = new GeneralOption();
05465                 if (this->general->contact == NULL) 
05466                         this->general->contact = new ContactOption();
05467                 
05468                 if (verifyTransportType(transportType) == 0)
05469                         throw ErrorClass( "transport type not recognized.");
05470 
05471                 this->general->contact->transportType = transportType;
05472                 return true;
05473         }
05474         catch(const ErrorClass& eclass)
05475         {       cout << eclass.errormsg << endl;
05476                 return false;
05477         }
05478 }//setContactTransportType
05479 
05480 bool OSOption::setOtherGeneralOptions(int numberOfOptions, OtherOption** other)
05481 {       if (this->general == NULL) 
05482                 this->general = new GeneralOption();
05483         if (this->general->otherOptions == NULL) 
05484                 this->general->otherOptions = new OtherOptions();
05485         else
05486         {       int i;
05487                 for (i = 0; i < this->general->otherOptions->numberOfOtherOptions; i++)
05488                         delete this->general->otherOptions->other[i];
05489                 delete[] this->general->otherOptions->other;
05490                 this->general->otherOptions->other = NULL;
05491         }
05492         return this->general->otherOptions->setOther(numberOfOptions, other);
05493 }//setOtherGeneralOptions
05494 
05495 bool OSOption::setAnOtherGeneralOption(std::string name, std::string value, std::string description)
05496 {       if (this->general == NULL) 
05497                 this->general = new GeneralOption();
05498         if (this->general->otherOptions == NULL) 
05499                 this->general->otherOptions = new OtherOptions();
05500         return this->general->otherOptions->addOther(name, value, description);
05501 }//setAnOtherGeneralOption
05502 
05503 
05504 
05509 bool OSOption::setMinDiskSpace(double value)
05510 {       if (this->system == NULL) 
05511                 this->system = new SystemOption();
05512         if (this->system->minDiskSpace == NULL)
05513                 this->system->minDiskSpace = new MinDiskSpace();
05514         this->system->minDiskSpace->value = value;
05515         return true;
05516 }//setMinDiskSpace
05517 
05518 bool OSOption::setMinDiskSpaceUnit(std::string unit)
05519 {       try
05520         {       if (this->system == NULL) 
05521                         this->system = new SystemOption();
05522                 if (this->system->minDiskSpace == NULL)
05523                         this->system->minDiskSpace = new MinDiskSpace();
05524                 
05525                 if (verifyStorageUnit(unit) == 0)
05526                         throw ErrorClass( "disk space unit not recognized.");
05527 
05528                 this->system->minDiskSpace->unit = unit;
05529                 return true;
05530         }
05531         catch(const ErrorClass& eclass)
05532         {       cout << eclass.errormsg << endl;
05533                 return false;
05534         }
05535 }//setMinDiskSpaceUnit
05536 
05537 bool OSOption::setMinMemorySize(double value)
05538 {       if (this->system == NULL) 
05539                 this->system = new SystemOption();
05540         if (this->system->minMemorySize == NULL)
05541                 this->system->minMemorySize = new MinMemorySize();
05542         this->system->minMemorySize->value = value;
05543         return true;
05544 }//setMinMemorySize
05545 
05546 bool OSOption::setMinMemoryUnit(std::string unit)
05547 {       try
05548         {       if (this->system == NULL) 
05549                         this->system = new SystemOption();
05550                 if (this->system->minMemorySize == NULL)
05551                         this->system->minMemorySize = new MinMemorySize();
05552                 
05553                 if (verifyStorageUnit(unit) == 0)
05554                         throw ErrorClass( "memory size unit not recognized.");
05555 
05556                 this->system->minMemorySize->unit = unit;
05557                 return true;
05558         }
05559         catch(const ErrorClass& eclass)
05560         {       cout << eclass.errormsg << endl;
05561                 return false;
05562         }
05563 }//setMinMemoryUnit
05564 
05565 bool OSOption::setMinCPUSpeed(double value)
05566 {       if (this->system == NULL) 
05567                 this->system = new SystemOption();
05568         if (this->system->minCPUSpeed == NULL)
05569                 this->system->minCPUSpeed = new MinCPUSpeed();
05570         this->system->minCPUSpeed->value = value;
05571         return true;
05572 }//setMinCPUSpeed
05573 
05574 bool OSOption::setMinCPUSpeedUnit(std::string unit)
05575 {       try
05576         {       if (this->system == NULL) 
05577                         this->system = new SystemOption();
05578                 if (this->system->minCPUSpeed == NULL)
05579                         this->system->minCPUSpeed = new MinCPUSpeed();
05580                 
05581                 if (verifyCPUSpeedUnit(unit) == 0)
05582                         throw ErrorClass( "CPU speed unit not recognized.");
05583 
05584                 this->system->minCPUSpeed->unit = unit;
05585                 return true;
05586         }
05587         catch(const ErrorClass& eclass)
05588         {       cout << eclass.errormsg << endl;
05589                 return false;
05590         }
05591 }//setMinCPUSpeedUnit
05592 
05593 bool OSOption::setMinCPUNumber(int number)
05594 {       if (this->system == NULL) 
05595                 this->system = new SystemOption();
05596         this->system->minCPUNumber = number;
05597         return true;
05598 }//setMinCPUNumber
05599 
05600 bool OSOption::setOtherSystemOptions(int numberOfOptions, OtherOption** other)
05601 {       if (this->system == NULL) 
05602                 this->system = new SystemOption();
05603         if (this->system->otherOptions == NULL) 
05604                 this->system->otherOptions = new OtherOptions();
05605         else
05606         {       int i;
05607                 for (i = 0; i < this->system->otherOptions->numberOfOtherOptions; i++)
05608                         delete this->system->otherOptions->other[i];
05609                 delete[] this->system->otherOptions->other;
05610                 this->system->otherOptions->other = NULL;
05611                 this->system->otherOptions->numberOfOtherOptions = 0;
05612         }
05613         return this->system->otherOptions->setOther(numberOfOptions, other);
05614 }//setOtherSystemOptions
05615 
05616 bool OSOption::setAnOtherSystemOption(std::string name, std::string value, std::string description)
05617 {       if (this->system == NULL) 
05618                 this->system = new SystemOption();
05619         if (this->system->otherOptions == NULL) 
05620                 this->system->otherOptions = new OtherOptions();
05621         return this->system->otherOptions->addOther(name, value, description);
05622 }//setAnOtherSystemOption
05623 
05624 
05629 bool OSOption::setServiceType( std::string serviceType)
05630 {       try
05631         {       if (this->service == NULL) 
05632                         this->service = new ServiceOption();
05633                 
05634                 if (verifyServiceType(serviceType) == 0)
05635                         throw ErrorClass( "service type not recognized.");
05636 
05637                 this->service->type = serviceType;
05638                 return true;
05639         }
05640         catch(const ErrorClass& eclass)
05641         {       cout << eclass.errormsg << endl;
05642                 return false;
05643         }
05644 }//setServiceType
05645 
05646 bool OSOption::setOtherServiceOptions(int numberOfOptions, OtherOption** other)
05647 {       if (this->service == NULL) 
05648                 this->service = new ServiceOption();
05649         if (this->service->otherOptions == NULL) 
05650                 this->service->otherOptions = new OtherOptions();
05651         else
05652         {       int i;
05653                 for (i = 0; i < this->service->otherOptions->numberOfOtherOptions; i++)
05654                         delete this->service->otherOptions->other[i];
05655                 delete[] this->service->otherOptions->other;
05656                 this->service->otherOptions->other = NULL;
05657         }
05658         return this->service->otherOptions->setOther(numberOfOptions, other);
05659 }//setOtherServiceOptions
05660 
05661 bool OSOption::setAnOtherServiceOption(std::string name, std::string value, std::string description)
05662 {       if (this->service == NULL) 
05663                 this->service = new ServiceOption();
05664         if (this->service->otherOptions == NULL) 
05665                 this->service->otherOptions = new OtherOptions();
05666         return this->service->otherOptions->addOther(name, value, description);
05667 }//setAnOtherServiceOption
05668 
05673 bool OSOption::setMaxTime(double value)
05674 {       if (this->job == NULL) 
05675                 this->job = new JobOption();
05676         if (this->job->maxTime == NULL)
05677                 this->job->maxTime = new MaxTime();
05678         this->job->maxTime->value = value;
05679         return true;
05680 }//setMaxTime
05681 
05682 bool OSOption::setMaxTimeUnit(std::string unit)
05683 {       try
05684         {       if (this->job == NULL) 
05685                         this->job = new JobOption();
05686                 if (this->job->maxTime == NULL)
05687                         this->job->maxTime = new MaxTime();
05688                 
05689                 if (verifyTimeUnit(unit) == 0)
05690                         throw ErrorClass( "time unit not recognized.");
05691 
05692                 this->job->maxTime->unit = unit;
05693                 return true;
05694         }
05695         catch(const ErrorClass& eclass)
05696         {       cout << eclass.errormsg << endl;
05697                 return false;
05698         }
05699 }//setMaxTimeUnit
05700 
05701 bool OSOption::setRequestedStartTime(std::string time)
05702 {       if (this->job == NULL) 
05703                 this->job = new JobOption();
05704         this->job->requestedStartTime = time;
05705         return true;
05706 }//setRequestedStartTime
05707 
05708 
05709 bool OSOption::setJobDependencies(int numberOfDependencies, std::string* jobDependencies)
05710 {       if (this->job == NULL) 
05711                 this->job = new JobOption();
05712         if (this->job->dependencies == NULL) 
05713                 this->job->dependencies = new JobDependencies();
05714         else 
05715                 delete[] this->job->dependencies->jobID;
05716         this->job->dependencies->jobID = NULL;
05717         return this->job->dependencies->setJobID(numberOfDependencies, jobDependencies);
05718 }//setJobDependencies
05719 
05720 bool OSOption::setAnotherJobDependency(std::string jobID)
05721 {       if (this->job == NULL) 
05722                 this->job = new JobOption();
05723         if (this->job->dependencies == NULL) 
05724                 this->job->dependencies = new JobDependencies();
05725         return this->job->dependencies->addJobID(jobID);
05726 }//setAnotherJobDependency
05727 
05728 
05729 bool OSOption::setRequiredDirectories(int numberOfPaths, std::string* paths)
05730 {       if (this->job == NULL) 
05731                 this->job = new JobOption();
05732         if (this->job->requiredDirectories == NULL) 
05733                 this->job->requiredDirectories = new DirectoriesAndFiles();
05734         else
05735                 delete[] this->job->requiredDirectories->path;
05736         this->job->requiredDirectories->path = NULL;
05737         return this->job->requiredDirectories->setPath(numberOfPaths, paths);
05738 }//setRequiredDirectories
05739 
05740 bool OSOption::setAnotherRequiredDirectory(std::string path)
05741 {       if (this->job == NULL) 
05742                 this->job = new JobOption();
05743         if (this->job->requiredDirectories == NULL) 
05744                 this->job->requiredDirectories = new DirectoriesAndFiles();
05745         return this->job->requiredDirectories->addPath(path);
05746 }//setAnotherRequiredDirectory
05747 
05748 
05749 bool OSOption::setRequiredFiles(int numberOfPaths, std::string* paths)
05750 {       if (this->job == NULL) 
05751                 this->job = new JobOption();
05752         if (this->job->requiredFiles == NULL) 
05753                 this->job->requiredFiles = new DirectoriesAndFiles();
05754         else
05755                 delete[] this->job->requiredFiles->path;
05756         this->job->requiredFiles->path = NULL;
05757         return this->job->requiredFiles->setPath(numberOfPaths, paths);
05758 }//setRequiredFiles
05759 
05760 bool OSOption::setAnotherRequiredFile(std::string path)
05761 {       if (this->job == NULL) 
05762                 this->job = new JobOption();
05763         if (this->job->requiredFiles == NULL) 
05764                 this->job->requiredFiles = new DirectoriesAndFiles();
05765         return this->job->requiredFiles->addPath(path);
05766 }//setAnotherRequiredFile
05767 
05768 
05769 bool OSOption::setDirectoriesToMake(int numberOfPaths, std::string* paths)
05770 {       if (this->job == NULL) 
05771                 this->job = new JobOption();
05772         if (this->job->directoriesToMake == NULL) 
05773                 this->job->directoriesToMake = new DirectoriesAndFiles();
05774         else
05775                 delete[] this->job->directoriesToMake->path;
05776         this->job->directoriesToMake->path = NULL;
05777         return this->job->directoriesToMake->setPath(numberOfPaths, paths);
05778 }//setDirectoriesToMake
05779 
05780 bool OSOption::setAnotherDirectoryToMake(std::string path)
05781 {       if (this->job == NULL) 
05782                 this->job = new JobOption();
05783         if (this->job->directoriesToMake == NULL) 
05784                 this->job->directoriesToMake = new DirectoriesAndFiles();
05785         return this->job->directoriesToMake->addPath(path);
05786 }//setAnotherDirectoryToMake
05787 
05788 
05789 bool OSOption::setFilesToMake(int numberOfPaths, std::string* paths)
05790 {       if (this->job == NULL) 
05791                 this->job = new JobOption();
05792         if (this->job->filesToMake == NULL) 
05793                 this->job->filesToMake = new DirectoriesAndFiles();
05794         else
05795                 delete[] this->job->filesToMake->path;
05796         this->job->filesToMake->path = NULL;
05797         return this->job->filesToMake->setPath(numberOfPaths, paths);
05798 }//setFilesToMake
05799 
05800 bool OSOption::setAnotherFileToMake(std::string path)
05801 {       if (this->job == NULL) 
05802                 this->job = new JobOption();
05803         if (this->job->filesToMake == NULL) 
05804                 this->job->filesToMake = new DirectoriesAndFiles();
05805         return this->job->filesToMake->addPath(path);
05806 }//setAnotherFileToMake
05807 
05808 
05809 bool OSOption::setInputDirectoriesToMove(int numberOfPathPairs, PathPair** pathPair)
05810 {       if (this->job == NULL) 
05811                 this->job = new JobOption();
05812         if (this->job->inputDirectoriesToMove == NULL) 
05813                 this->job->inputDirectoriesToMove = new PathPairs();
05814         else
05815                 delete[] this->job->inputDirectoriesToMove->pathPair;
05816         this->job->inputDirectoriesToMove->pathPair = NULL;
05817         return this->job->inputDirectoriesToMove->setPathPair(numberOfPathPairs, pathPair);
05818 }//setInputDirectoriesToMove
05819 
05820 bool OSOption::setAnotherInputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy)
05821 {       if (this->job == NULL) 
05822                 this->job = new JobOption();
05823         if (this->job->inputDirectoriesToMove == NULL) 
05824                 this->job->inputDirectoriesToMove = new PathPairs();
05825         return this->job->inputDirectoriesToMove->addPathPair(fromPath, toPath, makeCopy);
05826 }//setAnotherInputDirectoryToMove
05827 
05828 
05829 bool OSOption::setInputFilesToMove(int numberOfPathPairs, PathPair** pathPair)
05830 {       if (this->job == NULL) 
05831                 this->job = new JobOption();
05832         if (this->job->inputFilesToMove == NULL) 
05833                 this->job->inputFilesToMove = new PathPairs();
05834         else
05835                 delete[] this->job->inputFilesToMove->pathPair;
05836         this->job->inputFilesToMove->pathPair = NULL;
05837         return this->job->inputFilesToMove->setPathPair(numberOfPathPairs, pathPair);
05838 }//setInputFilesToMove
05839 
05840 bool OSOption::setAnotherInputFileToMove(std::string fromPath, std::string toPath, bool makeCopy)
05841 {       if (this->job == NULL) 
05842                 this->job = new JobOption();
05843         if (this->job->inputFilesToMove == NULL) 
05844                 this->job->inputFilesToMove = new PathPairs();
05845         return this->job->inputFilesToMove->addPathPair(fromPath, toPath, makeCopy);
05846 }//setAnotherInputFileToMove
05847 
05848 
05849 bool OSOption::setOutputFilesToMove(int numberOfPathPairs, PathPair** pathPair)
05850 {       if (this->job == NULL) 
05851                 this->job = new JobOption();
05852         if (this->job->outputFilesToMove == NULL) 
05853                 this->job->outputFilesToMove = new PathPairs();
05854         else
05855                 delete[] this->job->outputFilesToMove->pathPair;
05856         this->job->outputFilesToMove->pathPair = NULL;
05857         return this->job->outputFilesToMove->setPathPair(numberOfPathPairs, pathPair);
05858 }//setOutputFilesToMove
05859 
05860 bool OSOption::setAnotherOutputFileToMove(std::string fromPath, std::string toPath, bool makeCopy)
05861 {       if (this->job == NULL) 
05862                 this->job = new JobOption();
05863         if (this->job->outputFilesToMove == NULL) 
05864                 this->job->outputFilesToMove = new PathPairs();
05865         return this->job->outputFilesToMove->addPathPair(fromPath, toPath, makeCopy);
05866 }//setAnotherOutputFileToMove
05867 
05868 
05869 bool OSOption::setOutputDirectoriesToMove(int numberOfPathPairs, PathPair** pathPair)
05870 {       if (this->job == NULL) 
05871                 this->job = new JobOption();
05872         if (this->job->outputDirectoriesToMove == NULL) 
05873                 this->job->outputDirectoriesToMove = new PathPairs();
05874         else
05875                 delete[] this->job->outputDirectoriesToMove->pathPair;
05876         this->job->outputDirectoriesToMove->pathPair = NULL;
05877         return this->job->outputDirectoriesToMove->setPathPair(numberOfPathPairs, pathPair);
05878 }//setOutputDirectoriesToMove
05879 
05880 bool OSOption::setAnotherOutputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy)
05881 {       if (this->job == NULL) 
05882                 this->job = new JobOption();
05883         if (this->job->outputDirectoriesToMove == NULL) 
05884                 this->job->outputDirectoriesToMove = new PathPairs();
05885         return this->job->outputDirectoriesToMove->addPathPair(fromPath, toPath, makeCopy);
05886 }//setAnotherOutputDirectoryToMove
05887 
05888 
05889 bool OSOption::setFilesToDelete(int numberOfPaths, std::string* paths)
05890 {       if (this->job == NULL) 
05891                 this->job = new JobOption();
05892         if (this->job->filesToDelete == NULL) 
05893                 this->job->filesToDelete = new DirectoriesAndFiles();
05894         else
05895                 delete[] this->job->filesToDelete->path;
05896         this->job->filesToDelete->path = NULL;
05897         return this->job->filesToDelete->setPath(numberOfPaths, paths);
05898 }//setFilesToDelete
05899 
05900 bool OSOption::setAnotherFileToDelete(std::string path)
05901 {       if (this->job == NULL) 
05902                 this->job = new JobOption();
05903         if (this->job->filesToDelete == NULL) 
05904                 this->job->filesToDelete = new DirectoriesAndFiles();
05905         return this->job->filesToDelete->addPath(path);
05906 }//setAnotherFileToDelete
05907 
05908 
05909 bool OSOption::setDirectoriesToDelete(int numberOfPaths, std::string* paths)
05910 {       if (this->job == NULL) 
05911                 this->job = new JobOption();
05912         if (this->job->directoriesToDelete == NULL) 
05913                 this->job->directoriesToDelete = new DirectoriesAndFiles();
05914         else
05915                 delete[] this->job->directoriesToDelete->path;
05916         this->job->directoriesToDelete->path = NULL;
05917         return this->job->directoriesToDelete->setPath(numberOfPaths, paths);
05918 }//setDirectoriesToDelete
05919 
05920 bool OSOption::setAnotherDirectoryToDelete(std::string path)
05921 {       if (this->job == NULL) 
05922                 this->job = new JobOption();
05923         if (this->job->directoriesToDelete == NULL) 
05924                 this->job->directoriesToDelete = new DirectoriesAndFiles();
05925         return this->job->directoriesToDelete->addPath(path);
05926 }//setAnotherDirectoryToDelete
05927 
05928 
05929 bool OSOption::setProcessesToKill(int numberOfProcesses, std::string* processes)
05930 {       if (this->job == NULL) 
05931                 this->job = new JobOption();
05932         if (this->job->processesToKill == NULL) 
05933                 this->job->processesToKill = new Processes();
05934         else
05935                 delete[] this->job->processesToKill->process;
05936         this->job->processesToKill->process = NULL;
05937         return this->job->processesToKill->setProcess(numberOfProcesses, processes);
05938 }//setProcessesToKill
05939 
05940 bool OSOption::setAnotherProcessToKill(std::string process)
05941 {       if (this->job == NULL) 
05942                 this->job = new JobOption();
05943         if (this->job->processesToKill == NULL) 
05944                 this->job->processesToKill = new Processes();
05945         return this->job->processesToKill->addProcess(process);
05946 }//setAnotherProcessToKill
05947 
05948 
05949 bool OSOption::setOtherJobOptions(int numberOfOptions, OtherOption** other)
05950 {       if (this->job == NULL) 
05951                 this->job = new JobOption();
05952         if (this->job->otherOptions == NULL) 
05953                 this->job->otherOptions = new OtherOptions();
05954         else
05955         {       int i;
05956                 for (i = 0; i < this->job->otherOptions->numberOfOtherOptions; i++)
05957                         delete this->job->otherOptions->other[i];
05958                 delete[] this->job->otherOptions->other;
05959                 this->job->otherOptions->other = NULL;
05960         }
05961         return this->job->otherOptions->setOther(numberOfOptions, other);
05962 }//setOtherJobOptions
05963 
05964 bool OSOption::setAnOtherJobOption(std::string name, std::string value, std::string description)
05965 {       if (this->job == NULL) 
05966                 this->job = new JobOption();
05967         if (this->job->otherOptions == NULL) 
05968                 this->job->otherOptions = new OtherOptions();
05969         return this->job->otherOptions->addOther(name, value, description);
05970 }//setAnOtherJobOption
05971 
05972 
05973 
05974 bool OSOption::setNumberOfVariables(int numberOfObjects)
05975 {       if (this->optimization == NULL) 
05976                 this->optimization = new OptimizationOption();
05977         this->optimization->numberOfVariables = numberOfObjects;
05978         return true;
05979 }//setNumberOfVariables
05980 
05981 bool OSOption::setNumberOfObjectives(int numberOfObjects)
05982 {       if (this->optimization == NULL) 
05983                 this->optimization = new OptimizationOption();
05984         this->optimization->numberOfObjectives = numberOfObjects;
05985         return true;
05986 }//setNumberOfObjectives
05987 
05988 bool OSOption::setNumberOfConstraints(int numberOfObjects)
05989 {       if (this->optimization == NULL) 
05990                 this->optimization = new OptimizationOption();
05991         this->optimization->numberOfConstraints = numberOfObjects;
05992         return true;
05993 }//setNumberOfConstraints
05994 
05995 
05996 bool OSOption::setInitVarValuesSparse(int numberOfVar, InitVarValue** var)
05997 {       if (this->optimization == NULL) 
05998                 this->optimization = new OptimizationOption();
05999         if (this->optimization->variables == NULL) 
06000                 this->optimization->variables = new VariableOption();
06001         if (this->optimization->variables->initialVariableValues == NULL) 
06002                 this->optimization->variables->initialVariableValues = new InitVariableValues();
06003         else
06004         {       int i;
06005                 for (i = 0; i < this->optimization->variables->initialVariableValues->numberOfVar; i++)
06006                         delete this->optimization->variables->initialVariableValues->var[i];
06007                 delete[] this->optimization->variables->initialVariableValues->var;
06008                 this->optimization->variables->initialVariableValues->var = NULL;
06009         }
06010         return this->optimization->variables->initialVariableValues->setVar(numberOfVar, var);
06011 }//setInitVarValuesSparse
06012 
06013 bool OSOption::setInitVarValuesDense(int numberOfVar, double *value)
06014 {       if (this->optimization == NULL) 
06015                 this->optimization = new OptimizationOption();
06016         if (this->optimization->variables == NULL) 
06017                 this->optimization->variables = new VariableOption();
06018         if (this->optimization->variables->initialVariableValues == NULL) 
06019                 this->optimization->variables->initialVariableValues = new InitVariableValues();
06020         else
06021         {       delete[] this->optimization->variables->initialVariableValues->var;
06022                 this->optimization->variables->initialVariableValues->var = NULL;
06023         }
06024 
06025         int i;
06026         for (i = 0; i < numberOfVar; i++)
06027         {       
06028                 if (!CoinIsnan(value[i]))
06029                         if (!this->optimization->variables->initialVariableValues->addVar(i, value[i]))
06030                                 return false;
06031         }
06032         return true;
06033 }//setInitVarValuesDense
06034 
06035 bool OSOption::setAnotherInitVarValue(int idx, double value)
06036 {       if (this->optimization == NULL) 
06037                 this->optimization = new OptimizationOption();
06038         if (this->optimization->variables == NULL) 
06039                 this->optimization->variables = new VariableOption();
06040         if (this->optimization->variables->initialVariableValues == NULL) 
06041                 this->optimization->variables->initialVariableValues = new InitVariableValues();
06042         return this->optimization->variables->initialVariableValues->addVar(idx, value);
06043 }//setAnotherInitVarValue
06044 
06045 
06046 bool OSOption::setInitVarValuesStringSparse(int numberOfVar, InitVarValueString** var)
06047 {       if (this->optimization == NULL) 
06048                 this->optimization = new OptimizationOption();
06049         if (this->optimization->variables == NULL) 
06050                 this->optimization->variables = new VariableOption();
06051         if (this->optimization->variables->initialVariableValuesString == NULL) 
06052                 this->optimization->variables->initialVariableValuesString = new InitVariableValuesString();
06053         else
06054         {       int i;
06055                 for (i = 0; i < this->optimization->variables->initialVariableValuesString->numberOfVar; i++)
06056                         delete this->optimization->variables->initialVariableValuesString->var[i];
06057                 delete[] this->optimization->variables->initialVariableValuesString->var;
06058                 this->optimization->variables->initialVariableValuesString->var = NULL;
06059         }
06060         return this->optimization->variables->initialVariableValuesString->setVar(numberOfVar, var);
06061 }//setInitVarValuesStringSparse
06062 
06063 bool OSOption::setInitVarValuesStringDense(int numberOfVar, std::string *value)
06064 {       if (this->optimization == NULL) 
06065                 this->optimization = new OptimizationOption();
06066         if (this->optimization->variables == NULL) 
06067                 this->optimization->variables = new VariableOption();
06068         if (this->optimization->variables->initialVariableValuesString == NULL) 
06069                 this->optimization->variables->initialVariableValuesString = new InitVariableValuesString();
06070         else
06071         {       delete[] this->optimization->variables->initialVariableValuesString->var;
06072                 this->optimization->variables->initialVariableValuesString->var = NULL;
06073         }
06074         int i;
06075         for (i = 0; i < numberOfVar; i++)
06076         {       if (value[i] != "")
06077                         if (!this->optimization->variables->initialVariableValuesString->addVar(i, value[i]))
06078                                 return false;
06079         }
06080                 return true;
06081 }//setInitVarValuesStringDense
06082 
06083 bool OSOption::setAnotherInitVarValueString(int idx, std::string value)
06084 {       if (this->optimization == NULL) 
06085                 this->optimization = new OptimizationOption();
06086         if (this->optimization->variables == NULL) 
06087                 this->optimization->variables = new VariableOption();
06088         if (this->optimization->variables->initialVariableValuesString == NULL) 
06089                 this->optimization->variables->initialVariableValuesString = new InitVariableValuesString();
06090         return this->optimization->variables->initialVariableValuesString->addVar(idx, value);
06091 }//setAnotherInitVarValueString
06092 
06093 
06094 bool OSOption::setInitBasisStatusSparse(int numberOfVar, InitBasStatus** var)
06095 {       if (this->optimization == NULL) 
06096                 this->optimization = new OptimizationOption();
06097         if (this->optimization->variables == NULL) 
06098                 this->optimization->variables = new VariableOption();
06099         if (this->optimization->variables->initialBasisStatus == NULL) 
06100                 this->optimization->variables->initialBasisStatus = new InitialBasisStatus();
06101         else
06102         {       int i;
06103                 for (i = 0; i < this->optimization->variables->initialBasisStatus->numberOfVar; i++)
06104                         delete this->optimization->variables->initialBasisStatus->var[i];
06105                 delete[] this->optimization->variables->initialBasisStatus->var;
06106                 this->optimization->variables->initialBasisStatus->var = NULL;
06107         }
06108         return this->optimization->variables->initialBasisStatus->setVar(numberOfVar, var);
06109 }//setInitBasisStatusSparse
06110 
06111 bool OSOption::setInitBasisStatusDense(int numberOfVar, std::string *value)
06112 {       if (this->optimization == NULL) 
06113                 this->optimization = new OptimizationOption();
06114         if (this->optimization->variables == NULL) 
06115                 this->optimization->variables = new VariableOption();
06116         if (this->optimization->variables->initialBasisStatus == NULL) 
06117                 this->optimization->variables->initialBasisStatus = new InitialBasisStatus();
06118         else
06119         {       delete[] this->optimization->variables->initialBasisStatus->var;
06120                 this->optimization->variables->initialBasisStatus->var = NULL;
06121         }
06122         int i;
06123         for (i = 0; i < numberOfVar; i++)
06124         {       if (verifyBasisStatus(value[i]) != 0)
06125                         if (!this->optimization->variables->initialBasisStatus->addVar(i, value[i]))
06126                                 return false;
06127         }
06128         return true;
06129 }//setInitBasisStatusDense
06130 
06131 bool OSOption::setAnotherInitBasisStatus(int idx, std::string value)
06132 {       if (this->optimization == NULL) 
06133                 this->optimization = new OptimizationOption();
06134         if (this->optimization->variables == NULL) 
06135                 this->optimization->variables = new VariableOption();
06136         if (this->optimization->variables->initialBasisStatus == NULL) 
06137                 this->optimization->variables->initialBasisStatus = new InitialBasisStatus();
06138         return this->optimization->variables->initialBasisStatus->addVar(idx, value);
06139 }//setAnotherInitBasisStatus
06140 
06141 
06142 bool OSOption::setIntegerVariableBranchingWeightsSparse(int numberOfVar, BranchingWeight** var)
06143 {       if (this->optimization == NULL) 
06144                 this->optimization = new OptimizationOption();
06145         if (this->optimization->variables == NULL) 
06146                 this->optimization->variables = new VariableOption();
06147         if (this->optimization->variables->integerVariableBranchingWeights == NULL) 
06148                 this->optimization->variables->integerVariableBranchingWeights = new IntegerVariableBranchingWeights();
06149         else
06150         {       int i;
06151                 for (i = 0; i < this->optimization->variables->integerVariableBranchingWeights->numberOfVar; i++)
06152                         delete this->optimization->variables->integerVariableBranchingWeights->var[i];
06153                 delete[] this->optimization->variables->integerVariableBranchingWeights->var;
06154                 this->optimization->variables->integerVariableBranchingWeights->var = NULL;
06155         }
06156         return this->optimization->variables->integerVariableBranchingWeights->setVar(numberOfVar, var);
06157 }//setIntegerVariableBranchingWeightsSparse
06158 
06159 bool OSOption::setIntegerVariableBranchingWeightsDense(int numberOfVar, double *value)
06160 {       if (this->optimization == NULL) 
06161                 this->optimization = new OptimizationOption();
06162         if (this->optimization->variables == NULL) 
06163                 this->optimization->variables = new VariableOption();
06164         if (this->optimization->variables->integerVariableBranchingWeights == NULL) 
06165                 this->optimization->variables->integerVariableBranchingWeights = new IntegerVariableBranchingWeights();
06166         else
06167         {       delete[] this->optimization->variables->integerVariableBranchingWeights->var;
06168                 this->optimization->variables->integerVariableBranchingWeights->var = NULL;
06169         }
06170         int i;
06171         for (i = 0; i < numberOfVar; i++)
06172         {       if (!CoinIsnan(value[i]))
06173                         if (!this->optimization->variables->integerVariableBranchingWeights->addVar(i, value[i]))
06174                                 return false;
06175         }
06176         return true;
06177 }//setIntegerVariableBranchingWeightsDense
06178 
06179 bool OSOption::setAnotherIntegerVariableBranchingWeight(int idx, double value)
06180 {       if (this->optimization == NULL) 
06181                 this->optimization = new OptimizationOption();
06182         if (this->optimization->variables == NULL) 
06183                 this->optimization->variables = new VariableOption();
06184         if (this->optimization->variables->integerVariableBranchingWeights == NULL) 
06185                 this->optimization->variables->integerVariableBranchingWeights = new IntegerVariableBranchingWeights();
06186         return this->optimization->variables->integerVariableBranchingWeights->addVar(idx, value);
06187 }//setAnotherIntegerVariableBranchingWeight
06188 
06189 
06190 bool OSOption::setSOSVariableBranchingWeights(int numberOfSOS, SOSWeights** sos)
06191 {       if (this->optimization == NULL) 
06192                 this->optimization = new OptimizationOption();
06193         if (this->optimization->variables == NULL) 
06194                 this->optimization->variables = new VariableOption();
06195         if (this->optimization->variables->sosVariableBranchingWeights == NULL) 
06196                 this->optimization->variables->sosVariableBranchingWeights = new SOSVariableBranchingWeights();
06197         else
06198         {       int i;
06199                 for (i = 0; i < this->optimization->variables->sosVariableBranchingWeights->numberOfSOS; i++)
06200                         delete this->optimization->variables->sosVariableBranchingWeights->sos[i];
06201                 delete[] this->optimization->variables->sosVariableBranchingWeights->sos;
06202                 this->optimization->variables->sosVariableBranchingWeights->sos = NULL;
06203         }
06204         return this->optimization->variables->sosVariableBranchingWeights->setSOS(numberOfSOS, sos);
06205 }//setSOSVariableBranchingWeights
06206 
06207 bool OSOption::setAnotherSOSVariableBranchingWeight(int sosIdx, int nvar, double weight, int* idx, double* value)
06208 {       if (this->optimization == NULL) 
06209                 this->optimization = new OptimizationOption();
06210         if (this->optimization->variables == NULL) 
06211                 this->optimization->variables = new VariableOption();
06212         if (this->optimization->variables->sosVariableBranchingWeights == NULL) 
06213                 this->optimization->variables->sosVariableBranchingWeights = new SOSVariableBranchingWeights();
06214         return this->optimization->variables->sosVariableBranchingWeights->addSOS(sosIdx, nvar, weight, idx, value);
06215 }//setAnotherSOSVariableBranchingWeight
06216 
06217 
06218 bool OSOption::setOtherVariableOptions(int numberOfOptions, OtherVariableOption** other)
06219 {       if (this->optimization == NULL)
06220                 this->optimization = new OptimizationOption();
06221         if (this->optimization->variables == NULL)
06222                 this->optimization->variables = new VariableOption();
06223         else
06224         {       int i;
06225                 for (i = 0; i < this->optimization->variables->numberOfOtherVariableOptions; i++)
06226                         delete this->optimization->variables->other[i];
06227                 delete[] this->optimization->variables->other;
06228                 this->optimization->variables->other = NULL;
06229         }
06230         return this->optimization->variables->setOther(numberOfOptions, other);
06231 }//setOtherVariableOptions
06232 
06233 bool OSOption::setAnOtherVariableOption(OtherVariableOption* optionValue)
06234 {       if (this->optimization == NULL)
06235                 this->optimization = new OptimizationOption();
06236         if (this->optimization->variables == NULL)
06237                 this->optimization->variables = new VariableOption();
06238         return this->optimization->variables->addOther(optionValue);
06239 }//setAnOtherVariableOption
06240 
06241 
06242 bool OSOption::setInitObjValuesSparse(int numberOfObj, InitObjValue** obj)
06243 {       if (this->optimization == NULL) 
06244                 this->optimization = new OptimizationOption();
06245         if (this->optimization->objectives == NULL) 
06246                 this->optimization->objectives = new ObjectiveOption();
06247         if (this->optimization->objectives->initialObjectiveValues == NULL) 
06248                 this->optimization->objectives->initialObjectiveValues = new InitObjectiveValues();
06249         else
06250         {       int i;
06251                 for (i = 0; i < this->optimization->objectives->initialObjectiveValues->numberOfObj; i++)
06252                         delete this->optimization->objectives->initialObjectiveValues->obj[i];
06253                 delete[] this->optimization->objectives->initialObjectiveValues->obj;
06254                 this->optimization->objectives->initialObjectiveValues->obj = NULL;
06255         }
06256         return this->optimization->objectives->initialObjectiveValues->setObj(numberOfObj, obj);
06257 }//setInitObjValuesSparse
06258 
06259 bool OSOption::setInitObjValuesDense(int numberOfObj, double *value)
06260 {       if (this->optimization == NULL) 
06261                 this->optimization = new OptimizationOption();
06262         if (this->optimization->objectives == NULL) 
06263                 this->optimization->objectives = new ObjectiveOption();
06264         if (this->optimization->objectives->initialObjectiveValues == NULL) 
06265                 this->optimization->objectives->initialObjectiveValues = new InitObjectiveValues();
06266         else
06267         {       delete[] this->optimization->objectives->initialObjectiveValues->obj;
06268                 this->optimization->objectives->initialObjectiveValues->obj = NULL;
06269         }
06270         int i;
06271         for (i = 0; i < numberOfObj; i++)
06272         {       if (!CoinIsnan(value[i]))
06273                         if (!this->optimization->objectives->initialObjectiveValues->addObj(-1-i, value[i]))
06274                                 return false;
06275         }
06276         return true;
06277 }//setInitObjValuesDense
06278 
06279 bool OSOption::setAnotherInitObjValue(int idx, double value)
06280 {       if (this->optimization == NULL) 
06281                 this->optimization = new OptimizationOption();
06282         if (this->optimization->objectives == NULL) 
06283                 this->optimization->objectives = new ObjectiveOption();
06284         if (this->optimization->objectives->initialObjectiveValues == NULL) 
06285                 this->optimization->objectives->initialObjectiveValues = new InitObjectiveValues();
06286         return this->optimization->objectives->initialObjectiveValues->addObj(idx, value);
06287 }//setAnotherInitObjValue
06288 
06289 
06290 bool OSOption::setInitObjBoundsSparse(int numberOfObj, InitObjBound** obj)
06291 {       if (this->optimization == NULL) 
06292                 this->optimization = new OptimizationOption();
06293         if (this->optimization->objectives == NULL) 
06294                 this->optimization->objectives = new ObjectiveOption();
06295         if (this->optimization->objectives->initialObjectiveBounds == NULL) 
06296                 this->optimization->objectives->initialObjectiveBounds = new InitObjectiveBounds();
06297         else
06298         {       int i;
06299                 for (i = 0; i < this->optimization->objectives->initialObjectiveBounds->numberOfObj; i++)
06300                         delete this->optimization->objectives->initialObjectiveBounds->obj[i];
06301                 delete[] this->optimization->objectives->initialObjectiveBounds->obj;
06302                 this->optimization->objectives->initialObjectiveBounds->obj = NULL;
06303         }
06304         return this->optimization->objectives->initialObjectiveBounds->setObj(numberOfObj, obj);
06305 }//setInitObjBoundsSparse
06306 
06307 bool OSOption::setInitObjBoundsDense(int numberOfObj, double* lb, double* ub)
06308 {       if (this->optimization == NULL) 
06309                 this->optimization = new OptimizationOption();
06310         if (this->optimization->objectives == NULL) 
06311                 this->optimization->objectives = new ObjectiveOption();
06312         if (this->optimization->objectives->initialObjectiveBounds == NULL) 
06313                 this->optimization->objectives->initialObjectiveBounds = new InitObjectiveBounds();
06314         else
06315         {       delete[] this->optimization->objectives->initialObjectiveBounds->obj;
06316                 this->optimization->objectives->initialObjectiveBounds->obj = NULL;
06317         }
06318         int i;
06319         for (i = 0; i < numberOfObj; i++)
06320         {       if (!this->optimization->objectives->initialObjectiveBounds->addObj(-1-i, lb[i], ub[i]))
06321                         return false;
06322         }
06323         return true;
06324 }//setInitObjBoundsDense
06325 
06326 bool OSOption::setAnotherInitObjBound(int idx, double lb, double ub)
06327 {       if (this->optimization == NULL) 
06328                 this->optimization = new OptimizationOption();
06329         if (this->optimization->objectives == NULL) 
06330                 this->optimization->objectives = new ObjectiveOption();
06331         if (this->optimization->objectives->initialObjectiveBounds == NULL) 
06332                 this->optimization->objectives->initialObjectiveBounds = new InitObjectiveBounds();
06333         return this->optimization->objectives->initialObjectiveBounds->addObj(idx, lb, ub);
06334 }//setAnotherInitObjBound
06335 
06336 
06337 bool OSOption::setOtherObjectiveOptions(int numberOfOptions, OtherObjectiveOption** other)
06338 {       if (this->optimization == NULL)
06339                 this->optimization = new OptimizationOption();
06340         if (this->optimization->objectives == NULL)
06341                 this->optimization->objectives = new ObjectiveOption();
06342         else
06343         {       int i;
06344                 for (i = 0; i < this->optimization->objectives->numberOfOtherObjectiveOptions; i++)
06345                         delete this->optimization->objectives->other[i];
06346                 delete[] this->optimization->objectives->other;
06347                 this->optimization->objectives->other = NULL;
06348         }
06349         return this->optimization->objectives->setOther(numberOfOptions, other);
06350 }//setOtherObjectiveOptions
06351 
06352 bool OSOption::setAnOtherObjectiveOption(OtherObjectiveOption* optionValue)
06353 {       if (this->optimization == NULL)
06354                 this->optimization = new OptimizationOption();
06355         if (this->optimization->objectives == NULL)
06356                 this->optimization->objectives = new ObjectiveOption();
06357         return this->optimization->objectives->addOther(optionValue);
06358 }//setAnOtherVariableOption
06359 
06360 
06361 bool OSOption::setInitConValuesSparse(int numberOfCon, InitConValue** con)
06362 {       if (this->optimization == NULL) 
06363                 this->optimization = new OptimizationOption();
06364         if (this->optimization->constraints == NULL) 
06365                 this->optimization->constraints = new ConstraintOption();
06366         if (this->optimization->constraints->initialConstraintValues == NULL) 
06367                 this->optimization->constraints->initialConstraintValues = new InitConstraintValues();
06368         else
06369         {       int i;
06370                 for (i = 0; i < this->optimization->constraints->initialConstraintValues->numberOfCon; i++)
06371                         delete this->optimization->constraints->initialConstraintValues->con[i];
06372                 delete[] this->optimization->constraints->initialConstraintValues->con;
06373                 this->optimization->constraints->initialConstraintValues->con = NULL;
06374         }
06375         return this->optimization->constraints->initialConstraintValues->setCon(numberOfCon, con);
06376 }//setInitConValuesSparse
06377 
06378 bool OSOption::setInitConValuesDense(int numberOfCon, double *value)
06379 {       if (this->optimization == NULL) 
06380                 this->optimization = new OptimizationOption();
06381         if (this->optimization->constraints == NULL) 
06382                 this->optimization->constraints = new ConstraintOption();
06383         if (this->optimization->constraints->initialConstraintValues == NULL) 
06384                 this->optimization->constraints->initialConstraintValues = new InitConstraintValues();
06385         else
06386         {       delete[] this->optimization->constraints->initialConstraintValues->con;
06387                 this->optimization->constraints->initialConstraintValues->con = NULL;
06388         }
06389         int i;
06390         for (i = 0; i < numberOfCon; i++)
06391         {       if (!CoinIsnan(value[i]))
06392                         if (!this->optimization->constraints->initialConstraintValues->addCon(i, value[i]))
06393                                 return false;
06394         }
06395         return true;
06396 }//setInitConValuesDense
06397 
06398 bool OSOption::setAnotherInitConValue(int idx, double value)
06399 {       if (this->optimization == NULL) 
06400                 this->optimization = new OptimizationOption();
06401         if (this->optimization->constraints == NULL) 
06402                 this->optimization->constraints = new ConstraintOption();
06403         if (this->optimization->constraints->initialConstraintValues == NULL) 
06404                 this->optimization->constraints->initialConstraintValues = new InitConstraintValues();
06405         return this->optimization->constraints->initialConstraintValues->addCon(idx, value);
06406 }//setAnotherInitConValue
06407 
06408 
06409 bool OSOption::setInitDualVarValuesSparse(int numberOfCon, InitDualVarValue** con)
06410 {       if (this->optimization == NULL) 
06411                 this->optimization = new OptimizationOption();
06412         if (this->optimization->constraints == NULL) 
06413                 this->optimization->constraints = new ConstraintOption();
06414         if (this->optimization->constraints->initialDualValues == NULL) 
06415                 this->optimization->constraints->initialDualValues = new InitDualVariableValues();
06416         else
06417         {       int i;
06418                 for (i = 0; i < this->optimization->constraints->initialDualValues->numberOfCon; i++)
06419                         delete this->optimization->constraints->initialDualValues->con[i];
06420                 delete[] this->optimization->constraints->initialDualValues->con;
06421                 this->optimization->constraints->initialDualValues->con = NULL;
06422         }
06423         return this->optimization->constraints->initialDualValues->setCon(numberOfCon, con);
06424 }//setInitDualVarValuesSparse
06425 
06426 bool OSOption::setInitDualVarValuesDense(int numberOfCon, double* lb, double* ub)
06427 {       if (this->optimization == NULL) 
06428                 this->optimization = new OptimizationOption();
06429         if (this->optimization->constraints == NULL) 
06430                 this->optimization->constraints = new ConstraintOption();
06431         if (this->optimization->constraints->initialDualValues == NULL) 
06432                 this->optimization->constraints->initialDualValues = new InitDualVariableValues();
06433         else
06434         {       delete[] this->optimization->constraints->initialDualValues->con;
06435                 this->optimization->constraints->initialDualValues->con = NULL;
06436         }
06437         int i;
06438         for (i = 0; i < numberOfCon; i++)
06439         {       if ((lb[i] != 0.0) || (ub[i] != 0.0))
06440                         if (!this->optimization->constraints->initialDualValues->addCon(i, lb[i], ub[i]))
06441                                 return false;   
06442         }
06443         return true;
06444 }//setInitDualVarValuesDense
06445 
06446 bool OSOption::setAnotherInitDualVarValue(int idx, double lbValue, double ubValue)
06447 {       if (this->optimization == NULL) 
06448                 this->optimization = new OptimizationOption();
06449         if (this->optimization->constraints == NULL) 
06450                 this->optimization->constraints = new ConstraintOption();
06451         if (this->optimization->constraints->initialDualValues == NULL) 
06452                 this->optimization->constraints->initialDualValues = new InitDualVariableValues();
06453         return this->optimization->constraints->initialDualValues->addCon(idx, lbValue, ubValue);
06454 }//setAnotherInitConValue
06455 
06456 
06457 bool OSOption::setOtherConstraintOptions(int numberOfOptions, OtherConstraintOption** other)
06458 {       if (this->optimization == NULL)
06459                 this->optimization = new OptimizationOption();
06460         if (this->optimization->constraints == NULL)
06461                 this->optimization->constraints = new ConstraintOption();
06462         else
06463         {       int i;
06464                 for (i = 0; i < this->optimization->constraints->numberOfOtherConstraintOptions; i++)
06465                         delete this->optimization->constraints->other[i];
06466                 delete[] this->optimization->constraints->other;
06467                 this->optimization->constraints->other = NULL;
06468         }
06469         return this->optimization->constraints->setOther(numberOfOptions, other);
06470 }//setOtherConstraintOptions
06471 
06472 bool OSOption::setAnOtherConstraintOption(OtherConstraintOption* optionValue)
06473 {       if (this->optimization == NULL)
06474                 this->optimization = new OptimizationOption();
06475         if (this->optimization->constraints == NULL)
06476                 this->optimization->constraints = new ConstraintOption();
06477         return this->optimization->constraints->addOther(optionValue);
06478 }//setAnOtherConstraintOption
06479 
06480 
06481 bool OSOption::setSolverOptions(int numberOfSolverOptions, SolverOption** solverOption)
06482 {       if (this->optimization == NULL) 
06483                 this->optimization = new OptimizationOption();
06484         if (this->optimization->solverOptions == NULL) 
06485                 this->optimization->solverOptions = new SolverOptions();
06486         else
06487         {       int i;
06488                 for (i = 0; i < this->optimization->solverOptions->numberOfSolverOptions; i++)
06489                         delete this->optimization->solverOptions->solverOption[i];
06490                 delete[] this->optimization->solverOptions->solverOption;
06491                 this->optimization->solverOptions->solverOption = NULL;
06492         }
06493         return this->optimization->solverOptions->setSolverOptions(numberOfSolverOptions, solverOption);
06494 }//setSolverOptions
06495 
06496 bool OSOption::setAnotherSolverOption(std::string name, std::string value, std::string solver, 
06497                  std::string category, std::string type, std::string description)
06498 {       if (this->optimization == NULL) 
06499                 this->optimization = new OptimizationOption();
06500         if (this->optimization->solverOptions == NULL) 
06501                 this->optimization->solverOptions = new SolverOptions();
06502         return this->optimization->solverOptions->addSolverOption(name, value, solver, category, type, description);
06503 }//setAnotherSolverOption
06504 
06505 
06506 bool OSOption::setOptionStr(std::string optionName, std::string optionValue)
06507 {       if (optionName == "serviceURI") 
06508                 return this->setServiceURI(optionValue);
06509 
06510         if (optionName == "serviceName") 
06511                 return this->setServiceName(optionValue);
06512 
06513         if (optionName == "instanceName") 
06514                 return this->setInstanceName(optionValue);
06515 
06516         if (optionName == "instanceLocation") 
06517                 return this->setInstanceLocation(optionValue);
06518 
06519         if (optionName == "locationType") 
06520                 return this->setInstanceLocationType(optionValue);
06521 
06522         if (optionName == "jobID") 
06523                 return this->setJobID(optionValue);
06524 
06525         if (optionName == "solverName") 
06526                 return this->setSolverToInvoke(optionValue);
06527 
06528         if (optionName == "solverToInvoke") 
06529                 return this->setSolverToInvoke(optionValue);
06530 
06531         if (optionName == "license") 
06532                 return this->setLicense(optionValue);
06533 
06534         if (optionName == "userName") 
06535                 return this->setUserName(optionValue);
06536 
06537         if (optionName == "password") 
06538                 return this->setPassword(optionValue);
06539 
06540         if (optionName == "contact") 
06541                 return this->setContact(optionValue);
06542 
06543         if (optionName == "transportType") 
06544                 return this->setContactTransportType(optionValue);
06545 
06546         if (optionName == "minDiskSpaceUnit") 
06547                 return this->setMinDiskSpaceUnit(optionValue);
06548 
06549         if (optionName == "minMemoryUnit") 
06550                 return this->setMinMemoryUnit(optionValue);
06551 
06552         if (optionName == "minCPUSpeedUnit") 
06553                 return this->setMinCPUSpeedUnit(optionValue);
06554 
06555         if (optionName == "serviceType") 
06556                 return this->setServiceType(optionValue);
06557 
06558         if (optionName == "maxTimeUnit") 
06559                 return this->setMaxTimeUnit(optionValue);
06560 
06561         if (optionName == "requestedStartTime") 
06562                 return this->setRequestedStartTime(optionValue);
06563 
06564         return false;
06565 }//setOptionStr
06566 
06567 
06568 bool OSOption::setOptionInt(std::string optionName, int optionValue)
06569 {       if (optionName == "minCPUNumber")
06570                 return this->setMinCPUNumber(optionValue);
06571 
06572         return false;
06573 }//setOptionInt
06574 
06575 
06576 bool OSOption::setOptionDbl(std::string optionName, double value)
06577 {       if (optionName == "minDiskSpace") 
06578                 return this->setMinDiskSpace(value);
06579 
06580         if (optionName == "minMemory") 
06581                 return this->setMinMemorySize(value);
06582 
06583         if (optionName == "minCPUSpeed") 
06584                 return this->setMinCPUSpeed(value);
06585 
06586         if (optionName == "maxTime") 
06587                 return this->setMaxTime(value);
06588 
06589         return false;
06590 }//setOptionDbl
06591 
06592 /***************************************************
06593  * methods to test whether two OSOption objects 
06594  * or their components are equal to each other
06595  ***************************************************/
06596 bool OSOption::IsEqual(OSOption *that)
06597 {
06598         #ifdef DEBUG_OSOPTION
06599                 cout << "Start comparing in OSOption" << endl;
06600         #endif
06601         if (this == NULL)
06602         {       if (that == NULL)
06603                         return true;
06604                 else
06605                 {
06606                         #ifdef DEBUG_OSOPTION
06607                                 cout << "First object is NULL, second is not" << endl;
06608                         #endif
06609                         return false;
06610                 }
06611         }
06612         else 
06613         {       if (that == NULL)
06614                 {
06615                         #ifdef DEBUG_OSOPTION
06616                                 cout << "Second object is NULL, first is not" << endl;
06617                         #endif
06618                         return false;
06619                 }
06620                 else    
06621                 {       if (!this->general->IsEqual(that->general))
06622                                 return false;
06623                         if (!this->system->IsEqual(that->system))
06624                                 return false;
06625                         if (!this->service->IsEqual(that->service))
06626                                 return false;
06627                         if (!this->job->IsEqual(that->job))
06628                                 return false;
06629                         if (!this->optimization->IsEqual(that->optimization))
06630                                 return false;
06631                         return true;
06632                 }
06633         }
06634 }//OSOption::IsEqual
06635 
06636 
06637 bool GeneralOption::IsEqual(GeneralOption *that)
06638 {       
06639 #ifdef DEBUG_OSOPTION
06640         cout << "Start comparing in GeneralOption" << endl;
06641 #endif
06642         if (this == NULL)
06643         {       if (that == NULL)
06644                         return true;
06645                 else
06646                 {
06647                         #ifdef DEBUG_OSOPTION
06648                                 cout << "First object is NULL, second is not" << endl;
06649                         #endif
06650                         return false;
06651                 }
06652         }
06653         else 
06654         {       if (that == NULL)
06655                 {
06656                         #ifdef DEBUG_OSOPTION
06657                                 cout << "Second object is NULL, first is not" << endl;
06658                         #endif
06659                         return false;
06660                 }
06661                 else    
06662                 {       bool same;
06663                         same =  (this->serviceURI     == that->serviceURI);
06664                         same = ((this->serviceName    == that->serviceName )   && same);
06665                         same = ((this->instanceName   == that->instanceName )  && same);
06666                         same = ((this->jobID          == that->jobID )         && same);
06667                         same = ((this->solverToInvoke == that->solverToInvoke) && same);
06668                         same = ((this->license        == that->license )       && same);
06669                         same = ((this->userName       == that->userName )      && same);
06670                         same = ((this->password       == that->password )      && same);
06671                         if (!same) 
06672                         {
06673                                 #ifdef DEBUG_OSOPTION
06674                                 cout << "serviceURI:    " << this->serviceURI     << " vs. " << that->serviceURI     << endl;
06675                                 cout << "serviceName:   " << this->serviceName    << " vs. " << that->serviceName    << endl;
06676                                 cout << "instanceName:  " << this->instanceName   << " vs. " << that->instanceName   << endl;
06677                                 cout << "jobID:         " << this->jobID          << " vs. " << that->jobID          << endl;
06678                                 cout << "solverToInvoke:" << this->solverToInvoke << " vs. " << that->solverToInvoke << endl;
06679                                 cout << "license:       " << this->license        << " vs. " << that->license        << endl;
06680                                 cout << "userName:      " << this->userName       << " vs. " << that->userName       << endl;
06681                                 cout << "password:      " << this->password       << " vs. " << that->password       << endl;
06682                                 #endif
06683                                 return false;
06684                         }
06685                         if (!this->instanceLocation->IsEqual(that->instanceLocation))
06686                                 return false;
06687                         if (!this->contact->IsEqual(that->contact))
06688                                 return false;
06689                         if (!this->otherOptions->IsEqual(that->otherOptions))
06690                                 return false;
06691                         return true;
06692                 }
06693         }
06694 }//GeneralOption::IsEqual
06695 
06696 
06697 bool SystemOption::IsEqual(SystemOption *that)
06698 {       
06699 #ifdef DEBUG_OSOPTION
06700         cout << "Start comparing in SystemOption" << endl;
06701 #endif
06702         if (this == NULL)
06703         {       if (that == NULL)
06704                         return true;
06705                 else
06706                 {
06707                         #ifdef DEBUG_OSOPTION
06708                                 cout << "First object is NULL, second is not" << endl;
06709                         #endif
06710                         return false;
06711                 }
06712         }
06713         else 
06714         {       if (that == NULL)
06715                 {
06716                         #ifdef DEBUG_OSOPTION
06717                                 cout << "Second object is NULL, first is not" << endl;
06718                         #endif
06719                         return false;
06720                 }
06721                 else    
06722                 {       if (this->minCPUNumber != that->minCPUNumber)
06723                         {
06724                                 #ifdef DEBUG_OSOPTION
06725                                 cout << "minCPUNumber: " << this->minCPUNumber << " vs. " << that->minCPUNumber << endl;
06726                                 #endif
06727                                 return false;
06728                         }
06729 
06730                         if (!this->minDiskSpace->IsEqual(that->minDiskSpace))
06731                                 return false;
06732                         if (!this->minMemorySize->IsEqual(that->minMemorySize))
06733                                 return false;
06734                         if (!this->minCPUSpeed->IsEqual(that->minCPUSpeed))
06735                                 return false;
06736                         if (!this->otherOptions->IsEqual(that->otherOptions))
06737                                 return false;
06738                         return true;
06739                 }       
06740         }
06741 }//SystemOption::IsEqual
06742 
06743 
06744 bool ServiceOption::IsEqual(ServiceOption *that)
06745 {       
06746 #ifdef DEBUG_OSOPTION
06747         cout << "Start comparing in ServiceOption" << endl;
06748 #endif
06749         if (this == NULL)
06750         {       if (that == NULL)
06751                         return true;
06752                 else
06753                 {
06754                         #ifdef DEBUG_OSOPTION
06755                                 cout << "First object is NULL, second is not" << endl;
06756                         #endif
06757                         return false;
06758                 }
06759         }
06760         else 
06761         {       if (that == NULL)
06762                 {
06763                         #ifdef DEBUG_OSOPTION
06764                                 cout << "Second object is NULL, first is not" << endl;
06765                         #endif
06766                         return false;
06767                 }
06768                 else
06769                 {       if (this->type != that->type)
06770                         {
06771                                 #ifdef DEBUG_OSOPTION
06772                                 cout << "service type: " << this->type << " vs. " << that->type << endl;
06773                                 #endif
06774                                 return false;
06775                         }
06776 
06777                         if (!this->otherOptions->IsEqual(that->otherOptions))
06778                                 return false;
06779                         return true;
06780                 }
06781         }
06782 }//ServiceOption::IsEqual
06783 
06784 
06785 bool JobOption::IsEqual(JobOption *that)
06786 {
06787 #ifdef DEBUG_OSOPTION
06788         cout << "Start comparing in JobOption" << endl;
06789 #endif
06790         if (this == NULL)
06791         {       if (that == NULL)
06792                         return true;
06793                 else
06794                 {
06795                         #ifdef DEBUG_OSOPTION
06796                                 cout << "First object is NULL, second is not" << endl;
06797                         #endif
06798                         return false;
06799                 }
06800         }
06801         else 
06802         {       if (that == NULL)
06803                 {
06804                         #ifdef DEBUG_OSOPTION
06805                                 cout << "Second object is NULL, first is not" << endl;
06806                         #endif
06807                         return false;
06808                 }
06809                 else    
06810                 {       if (this->requestedStartTime != that->requestedStartTime)
06811                         {
06812                                 #ifdef DEBUG_OSOPTION
06813                                 cout << "requestedStartTime: " << this->requestedStartTime << " vs. " << that->requestedStartTime << endl;
06814                                 #endif
06815                                 return false;
06816                         }
06817 
06818                         if (!this->maxTime->IsEqual(that->maxTime))
06819                                 return false;
06820                         if (!this->dependencies->IsEqual(that->dependencies))
06821                                 return false;
06822                         if (!this->requiredDirectories->IsEqual(that->requiredDirectories))
06823                                 return false;
06824                         if (!this->requiredFiles->IsEqual(that->requiredFiles))
06825                                 return false;
06826                         if (!this->directoriesToMake->IsEqual(that->directoriesToMake))
06827                                 return false;
06828                         if (!this->filesToMake->IsEqual(that->filesToMake))
06829                                 return false;
06830                         if (!this->inputDirectoriesToMove->IsEqual(that->inputDirectoriesToMove))
06831                                 return false;
06832                         if (!this->inputFilesToMove->IsEqual(that->inputFilesToMove))
06833                                 return false;
06834                         if (!this->outputFilesToMove->IsEqual(that->outputFilesToMove))
06835                                 return false;
06836                         if (!this->outputDirectoriesToMove->IsEqual(that->outputDirectoriesToMove))
06837                                 return false;
06838                         if (!this->filesToDelete->IsEqual(that->filesToDelete))
06839                                 return false;
06840                         if (!this->otherOptions->IsEqual(that->otherOptions))
06841                                 return false;
06842                         if (!this->otherOptions->IsEqual(that->otherOptions))
06843                                 return false;
06844                         if (!this->otherOptions->IsEqual(that->otherOptions))
06845                                 return false;
06846                         if (!this->otherOptions->IsEqual(that->otherOptions))
06847                                 return false;
06848                         return true;
06849                 }
06850         }
06851 }//JobOption::IsEqual
06852 
06853 bool OptimizationOption::IsEqual(OptimizationOption *that)
06854 {
06855 #ifdef DEBUG_OSOPTION
06856         cout << "Start comparing in OptimizationOption" << endl;
06857 #endif
06858         if (this == NULL)
06859         {       if (that == NULL)
06860                         return true;
06861                 else
06862                 {
06863                         #ifdef DEBUG_OSOPTION
06864                                 cout << "First object is NULL, second is not" << endl;
06865                         #endif
06866                         return false;
06867                 }
06868         }
06869         else 
06870         {       if (that == NULL)
06871                 {
06872                         #ifdef DEBUG_OSOPTION
06873                                 cout << "Second object is NULL, first is not" << endl;
06874                         #endif
06875                         return false;
06876                 }
06877                 else    
06878                 {       if ((this->numberOfVariables != that->numberOfVariables) && 
06879                                 (this->numberOfVariables *  that->numberOfVariables) != 0)
06880                         {
06881                                 #ifdef DEBUG_OSOPTION
06882                                 cout << "numberOfVariables: " 
06883                                          << this->numberOfVariables << " vs. " << that->numberOfVariables << endl;
06884                                 #endif
06885                                 return false;
06886                         }
06887                         if ((this->numberOfObjectives != that->numberOfObjectives) && 
06888                                 (this->numberOfObjectives *  that->numberOfObjectives) != 0)
06889                         {
06890                                 #ifdef DEBUG_OSOPTION
06891                                 cout << "numberOfObjectives: " 
06892                                          << this->numberOfObjectives << " vs. " << that->numberOfObjectives << endl;
06893                                 #endif
06894                                 return false;
06895                         }
06896                         if ((this->numberOfConstraints != that->numberOfConstraints) && 
06897                                 (this->numberOfConstraints *  that->numberOfConstraints) != 0)
06898                         {
06899                                 #ifdef DEBUG_OSOPTION
06900                                 cout << "numberOfConstraints: " 
06901                                          << this->numberOfConstraints << " vs. " << that->numberOfConstraints << endl;
06902                                 #endif
06903                                 return false;
06904                         }
06905 
06906                         if (!this->variables->IsEqual(that->variables))
06907                                 return false;
06908                         if (!this->objectives->IsEqual(that->objectives))
06909                                 return false;
06910                         if (!this->constraints->IsEqual(that->constraints))
06911                                 return false;
06912                         if (!this->solverOptions->IsEqual(that->solverOptions))
06913                                 return false;
06914                         return true;
06915                 }
06916         }
06917 }//OptimizationOption::IsEqual
06918 
06919 bool InstanceLocationOption::IsEqual(InstanceLocationOption *that)
06920 {
06921 #ifdef DEBUG_OSOPTION
06922         cout << "Start comparing in InstanceLocationOption" << endl;
06923 #endif
06924         if (this == NULL)
06925         {       if (that == NULL)
06926                         return true;
06927                 else
06928                 {
06929                         #ifdef DEBUG_OSOPTION
06930                                 cout << "First object is NULL, second is not" << endl;
06931                         #endif
06932                         return false;
06933                 }
06934         }
06935         else 
06936         {       if (that == NULL)
06937                 {
06938                         #ifdef DEBUG_OSOPTION
06939                                 cout << "Second object is NULL, first is not" << endl;
06940                         #endif
06941                         return false;
06942                 }
06943                 else    
06944                 {       if ((this->locationType != that->locationType) || (this->value != that->value)) 
06945                         {       
06946                                 #ifdef DEBUG_OSOPTION
06947                                 cout << "location type: " << this->locationType << " vs. " << that->locationType << endl;
06948                                 cout << "value: "         << this->value        << " vs. " << that->value        << endl;
06949                                 #endif
06950                                 return false;
06951                         }
06952                         return true;
06953                 }
06954         }
06955 }//InstanceLocationOption::IsEqual
06956 
06957 bool ContactOption::IsEqual(ContactOption *that)
06958 {
06959 #ifdef DEBUG_OSOPTION
06960         cout << "Start comparing in ContactOption" << endl;
06961 #endif
06962         if (this == NULL)
06963         {       if (that == NULL)
06964                         return true;
06965                 else
06966                 {
06967                         #ifdef DEBUG_OSOPTION
06968                                 cout << "First object is NULL, second is not" << endl;
06969                         #endif
06970                         return false;
06971                 }
06972         }
06973         else 
06974         {       if (that == NULL)
06975                 {
06976                         #ifdef DEBUG_OSOPTION
06977                                 cout << "Second object is NULL, first is not" << endl;
06978                         #endif
06979                         return false;
06980                 }
06981                 else    
06982                 {       if ((this->transportType != that->transportType) || (this->value != that->value)) 
06983                         {       
06984                                 #ifdef DEBUG_OSOPTION
06985                                 cout << "transport type: " << this->transportType << " vs. " << that->transportType << endl;
06986                                 cout << "value: "          << this->value         << " vs. " << that->value         << endl;
06987                                 #endif
06988                                 return false;
06989                         }
06990                         return true;
06991                 }
06992         }
06993 }//ContactOption::IsEqual
06994 
06995 bool OtherOptions::IsEqual(OtherOptions *that)
06996 {
06997 #ifdef DEBUG_OSOPTION
06998         cout << "Start comparing in OtherOptions" << endl;
06999 #endif
07000         if (this == NULL)
07001         {       if (that == NULL)
07002                         return true;
07003                 else
07004                 {
07005                         #ifdef DEBUG_OSOPTION
07006                                 cout << "First object is NULL, second is not" << endl;
07007                         #endif
07008                         return false;
07009                 }
07010         }
07011         else 
07012         {       if (that == NULL)
07013                 {
07014                         #ifdef DEBUG_OSOPTION
07015                                 cout << "Second object is NULL, first is not" << endl;
07016                         #endif
07017                         return false;
07018                 }
07019                 else    
07020                 {       if (this->numberOfOtherOptions  != that->numberOfOtherOptions) 
07021                         {
07022                                 #ifdef DEBUG_OSOPTION
07023                                 cout << "numberOfOtherOptions: " << this->numberOfOtherOptions << " vs. " << that->numberOfOtherOptions << endl;
07024                                 #endif
07025                                 return false;
07026                         }
07027                         int i;
07028                         for (i = 0; i < this->numberOfOtherOptions; i++)
07029                                 if (!this->other[i]->IsEqual(that->other[i]))
07030                                         return false;
07031                         return true;
07032                 }
07033         }
07034 }//OtherOptions::IsEqual
07035 
07036 
07037 bool OtherOption::IsEqual(OtherOption *that)
07038 {
07039 #ifdef DEBUG_OSOPTION
07040         cout << "Start comparing in OtherOption" << endl;
07041 #endif
07042         if (this == NULL)
07043         {       if (that == NULL)
07044                         return true;
07045                 else
07046                 {
07047                         #ifdef DEBUG_OSOPTION
07048                                 cout << "First object is NULL, second is not" << endl;
07049                         #endif
07050                         return false;
07051                 }
07052         }
07053         else 
07054         {       if (that == NULL)
07055                 {
07056                         #ifdef DEBUG_OSOPTION
07057                                 cout << "Second object is NULL, first is not" << endl;
07058                         #endif
07059                         return false;
07060                 }
07061                 else    
07062                 {       if ((this->name  != that->name)  || 
07063                                 (this->value != that->value) || 
07064                                 (this->description != that->description) ) 
07065                         {
07066                                 #ifdef DEBUG_OSOPTION
07067                                 cout << "name: "        << this->name        << " vs. " << that->name        << endl;
07068                                 cout << "value: "       << this->value       << " vs. " << that->value       << endl;
07069                                 cout << "description: " << this->description << " vs. " << that->description << endl;
07070                                 #endif
07071                                 return false;
07072                         }
07073                         return true;
07074                 }
07075         }
07076 }//OtherOption::IsEqual
07077 
07078 bool MinDiskSpace::IsEqual(MinDiskSpace *that)
07079 {
07080 #ifdef DEBUG_OSOPTION
07081         cout << "Start comparing in MinDiskSpace" << endl;
07082 #endif
07083         if (this == NULL)
07084         {       if (that == NULL)
07085                         return true;
07086                 else
07087                 {
07088                         #ifdef DEBUG_OSOPTION
07089                                 cout << "First object is NULL, second is not" << endl;
07090                         #endif
07091                         return false;
07092                 }
07093         }
07094         else 
07095         {       if (that == NULL)
07096                 {
07097                         #ifdef DEBUG_OSOPTION
07098                                 cout << "Second object is NULL, first is not" << endl;
07099                         #endif
07100                         return false;
07101                 }
07102                 else    
07103                 {       if ((this->unit  != that->unit)  || 
07104                                 (this->value != that->value) ) 
07105                         {       
07106 #ifdef DEBUG_OSOPTION
07107                                 cout << "unit: "  << this->unit  << " vs. " << that->unit  << endl;
07108                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07109 #endif  
07110                                 return false;
07111                         }
07112                         return true;
07113                 }
07114         }
07115 }//MinDiskSpace::IsEqual
07116 
07117 bool MinMemorySize::IsEqual(MinMemorySize *that)
07118 {
07119 #ifdef DEBUG_OSOPTION
07120         cout << "Start comparing in MinMemorySize" << endl;
07121 #endif
07122         if (this == NULL)
07123         {       if (that == NULL)
07124                         return true;
07125                 else
07126                 {
07127                         #ifdef DEBUG_OSOPTION
07128                                 cout << "First object is NULL, second is not" << endl;
07129                         #endif
07130                         return false;
07131                 }
07132         }
07133         else 
07134         {       if (that == NULL)
07135                 {
07136                         #ifdef DEBUG_OSOPTION
07137                                 cout << "Second object is NULL, first is not" << endl;
07138                         #endif
07139                         return false;
07140                 }
07141                 else    
07142                 {       if ((this->unit  != that->unit)  || 
07143                                 (this->value != that->value) ) 
07144                         {
07145 #ifdef DEBUG_OSOPTION
07146                                 cout << "unit: "  << this->unit  << " vs. " << that->unit  << endl;
07147                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07148 #endif  
07149                                 return false;
07150                         }
07151                         return true;
07152                 }
07153         }
07154 }//MinMemorySize::IsEqual
07155 
07156 
07157 bool MaxTime::IsEqual(MaxTime *that)
07158 {
07159 #ifdef DEBUG_OSOPTION
07160         cout << "Start comparing in MaxTime" << endl;
07161 #endif
07162         if (this == NULL)
07163         {       if (that == NULL)
07164                         return true;
07165                 else
07166                 {
07167                         #ifdef DEBUG_OSOPTION
07168                                 cout << "First object is NULL, second is not" << endl;
07169                         #endif
07170                         return false;
07171                 }
07172         }
07173         else 
07174         {       if (that == NULL)
07175                 {
07176                         #ifdef DEBUG_OSOPTION
07177                                 cout << "Second object is NULL, first is not" << endl;
07178                         #endif
07179                         return false;
07180                 }
07181                 else    
07182                 {       if ((this->unit  != that->unit)  || 
07183                                 (this->value != that->value) ) 
07184                         {
07185 #ifdef DEBUG_OSOPTION
07186                                 cout << "unit: "  << this->unit  << " vs. " << that->unit  << endl;
07187                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07188 #endif  
07189                                 return false;
07190                         }
07191                         return true;
07192                 }
07193         }
07194 }//MaxTime::IsEqual
07195 
07196 bool MinCPUSpeed::IsEqual(MinCPUSpeed *that)
07197 {
07198 #ifdef DEBUG_OSOPTION
07199         cout << "Start comparing in MinCPUSpeed" << endl;
07200 #endif
07201         if (this == NULL)
07202         {       if (that == NULL)
07203                         return true;
07204                 else
07205                 {
07206                         #ifdef DEBUG_OSOPTION
07207                                 cout << "First object is NULL, second is not" << endl;
07208                         #endif
07209                         return false;
07210                 }
07211         }
07212         else 
07213         {       if (that == NULL)
07214                 {
07215                         #ifdef DEBUG_OSOPTION
07216                                 cout << "Second object is NULL, first is not" << endl;
07217                         #endif
07218                         return false;
07219                 }
07220                 else    
07221                 {       if ((this->unit  != that->unit)  || 
07222                                 (this->value != that->value) ) 
07223                         {
07224 #ifdef DEBUG_OSOPTION
07225                                 cout << "unit: "  << this->unit  << " vs. " << that->unit  << endl;
07226                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07227 #endif  
07228                                 return false;
07229                         }
07230                         return true;
07231                 }
07232         }
07233 }//MinCPUSpeed::IsEqual
07234 
07235 
07236 bool JobDependencies::IsEqual(JobDependencies *that)
07237 {
07238 #ifdef DEBUG_OSOPTION
07239         cout << "Start comparing in JobDependencies" << endl;
07240 #endif
07241         if (this == NULL)
07242         {       if (that == NULL)
07243                         return true;
07244                 else
07245                 {
07246                         #ifdef DEBUG_OSOPTION
07247                                 cout << "First object is NULL, second is not" << endl;
07248                         #endif
07249                         return false;
07250                 }
07251         }
07252         else 
07253         {       if (that == NULL)
07254                 {
07255                         #ifdef DEBUG_OSOPTION
07256                                 cout << "Second object is NULL, first is not" << endl;
07257                         #endif
07258                         return false;
07259                 }
07260                 else    
07261                 {       if (this->numberOfJobIDs != that->numberOfJobIDs)  
07262                         {
07263 #ifdef DEBUG_OSOPTION
07264                                 cout << "numberOfJobIDs: " << this->numberOfJobIDs << " vs. " << that->numberOfJobIDs << endl;
07265 #endif  
07266                                 return false;
07267                         }
07268                         int i;
07269                         for (i = 0; i < numberOfJobIDs; i++)
07270                                 if (this->jobID[i] != that->jobID[i])
07271                                 {
07272 #ifdef DEBUG_OSOPTION
07273                                         cout << "jobID[" << i << "]: " << this->jobID[i] << " vs. " << that->jobID[i] << endl;
07274 #endif  
07275                                         return false;
07276                                 }
07277                         return true;
07278                 }
07279         }
07280 }//JobDependencies::IsEqual
07281 
07282 bool DirectoriesAndFiles::IsEqual(DirectoriesAndFiles *that)
07283 {
07284 #ifdef DEBUG_OSOPTION
07285         cout << "Start comparing in DirectoriesAndFiles" << endl;
07286 #endif
07287         if (this == NULL)
07288         {       if (that == NULL)
07289                         return true;
07290                 else
07291                 {
07292                         #ifdef DEBUG_OSOPTION
07293                                 cout << "First object is NULL, second is not" << endl;
07294                         #endif
07295                         return false;
07296                 }
07297         }
07298         else 
07299         {       if (that == NULL)
07300                 {
07301                         #ifdef DEBUG_OSOPTION
07302                                 cout << "Second object is NULL, first is not" << endl;
07303                         #endif
07304                         return false;
07305                 }
07306                 else    
07307                 {       if (this->numberOfPaths != that->numberOfPaths)  
07308                         {
07309 #ifdef DEBUG_OSOPTION
07310                                 cout << "numberOfPaths: " << this->numberOfPaths << " vs. " << that->numberOfPaths << endl;
07311 #endif  
07312                                 return false;
07313                         }
07314                         int i;
07315                         for (i = 0; i < numberOfPaths; i++)
07316                                 if (this->path[i] != that->path[i])
07317                                 {
07318 #ifdef DEBUG_OSOPTION
07319                                         cout << "path[" << i << "]: \'" << this->path[i] << "\' vs. \'" << that->path[i] << "\'" << endl;
07320 #endif  
07321                                         return false;
07322                                 }
07323                         return true;
07324                 }
07325         }
07326 }//DirectoriesAndFiles::IsEqual
07327 
07328 bool PathPairs::IsEqual(PathPairs *that)
07329 {
07330 #ifdef DEBUG_OSOPTION
07331         cout << "Start comparing in PathPairs" << endl;
07332 #endif
07333         if (this == NULL)
07334         {       if (that == NULL)
07335                         return true;
07336                 else
07337                 {
07338                         #ifdef DEBUG_OSOPTION
07339                                 cout << "First object is NULL, second is not" << endl;
07340                         #endif
07341                         return false;
07342                 }
07343         }
07344         else 
07345         {       if (that == NULL)
07346                 {
07347                         #ifdef DEBUG_OSOPTION
07348                                 cout << "Second object is NULL, first is not" << endl;
07349                         #endif
07350                         return false;
07351                 }
07352                 else    
07353                 {       if (this->numberOfPathPairs != that->numberOfPathPairs)  
07354                         {
07355 #ifdef DEBUG_OSOPTION
07356                                 cout << "numberOfPathPairs: " << this->numberOfPathPairs << " vs. " << that->numberOfPathPairs << endl;
07357 #endif  
07358                                 return false;
07359                         }
07360                         int i;
07361                         for (i = 0; i < numberOfPathPairs; i++)
07362                                 if (!this->pathPair[i]->IsEqual(that->pathPair[i]))
07363                                         return false;
07364                         return true;
07365                 }
07366         }
07367 }//PathPairs::IsEqual
07368 
07369         
07370 bool PathPair::IsEqual(PathPair *that)
07371 {
07372 #ifdef DEBUG_OSOPTION
07373         cout << "Start comparing in PathPair" << endl;
07374 #endif
07375         if (this == NULL)
07376         {       if (that == NULL)
07377                         return true;
07378                 else
07379                 {
07380                         #ifdef DEBUG_OSOPTION
07381                                 cout << "First object is NULL, second is not" << endl;
07382                         #endif
07383                         return false;
07384                 }
07385         }
07386         else 
07387         {       if (that == NULL)
07388                 {
07389                         #ifdef DEBUG_OSOPTION
07390                                 cout << "Second object is NULL, first is not" << endl;
07391                         #endif
07392                         return false;
07393                 }
07394                 else    
07395                 {       if ((this->from != that->from) || (this->to != that->to) || 
07396                                 (this->makeCopy != that->makeCopy))  
07397                         {
07398 #ifdef DEBUG_OSOPTION
07399                                 cout << "from: "     << this->from     << " vs. " << that->from     << endl;
07400                                 cout << "to: "       << this->to       << " vs. " << that->to       << endl;
07401                                 cout << "makeCopy: " << this->makeCopy << " vs. " << that->makeCopy << endl;
07402 #endif  
07403                                 return false;
07404                         }
07405                         return true;
07406                 }
07407         }
07408 }//PathPair::IsEqual
07409 
07410 bool Processes::IsEqual(Processes *that)
07411 {
07412 #ifdef DEBUG_OSOPTION
07413         cout << "Start comparing in Processes" << endl;
07414 #endif
07415         if (this == NULL)
07416         {       if (that == NULL)
07417                         return true;
07418                 else
07419                 {
07420                         #ifdef DEBUG_OSOPTION
07421                                 cout << "First object is NULL, second is not" << endl;
07422                         #endif
07423                         return false;
07424                 }
07425         }
07426         else 
07427         {       if (that == NULL)
07428                 {
07429                         #ifdef DEBUG_OSOPTION
07430                                 cout << "Second object is NULL, first is not" << endl;
07431                         #endif
07432                         return false;
07433                 }
07434                 else    
07435                 {       if (this->numberOfProcesses != that->numberOfProcesses)  
07436                         {
07437 #ifdef DEBUG_OSOPTION
07438                                 cout << "numberOfProcesses: " << this->numberOfProcesses << " vs. " << that->numberOfProcesses << endl;
07439 #endif  
07440                                 return false;
07441                         }
07442                         int i;
07443                         for (i = 0; i < numberOfProcesses; i++)
07444                                 if (this->process[i] != that->process[i])
07445                                 {
07446 #ifdef DEBUG_OSOPTION
07447                                         cout << "process[" << i << "]: " << this->process[i] << " vs. " << that->process[i] << endl;
07448 #endif  
07449                                         return false;
07450                                 }
07451                         return true;
07452                 }
07453         }
07454 }//Processes::IsEqual
07455 
07456 
07457 bool VariableOption::IsEqual(VariableOption *that)
07458 {
07459 #ifdef DEBUG_OSOPTION
07460         cout << "Start comparing in VariableOption" << endl;
07461 #endif
07462         if (this == NULL)
07463         {       if (that == NULL)
07464                         return true;
07465                 else
07466                 {
07467                         #ifdef DEBUG_OSOPTION
07468                                 cout << "First object is NULL, second is not" << endl;
07469                         #endif
07470                         return false;
07471                 }
07472         }
07473         else 
07474         {       if (that == NULL)
07475                 {
07476                         #ifdef DEBUG_OSOPTION
07477                                 cout << "Second object is NULL, first is not" << endl;
07478                         #endif
07479                         return false;
07480                 }
07481                 else    
07482                 {       
07483                         if (!this->initialVariableValues->IsEqual(that->initialVariableValues))
07484                                 return false;
07485                         if (!this->initialVariableValuesString->IsEqual(that->initialVariableValuesString))
07486                                 return false;
07487                         if (!this->initialBasisStatus->IsEqual(that->initialBasisStatus))
07488                                 return false;
07489                         if (!this->integerVariableBranchingWeights->IsEqual(that->integerVariableBranchingWeights))
07490                                 return false;
07491                         if (!this->sosVariableBranchingWeights->IsEqual(that->sosVariableBranchingWeights))
07492                                 return false;
07493 
07494                         if (this->numberOfOtherVariableOptions != that->numberOfOtherVariableOptions)  
07495                         {
07496 #ifdef DEBUG_OSOPTION
07497                                 cout << "numberOfOtherVariableOptions: " << this->numberOfOtherVariableOptions << " vs. " << that->numberOfOtherVariableOptions << endl;
07498 #endif  
07499                                 return false;
07500                         }
07501 
07502                         int i;
07503                         for (i = 0; i < numberOfOtherVariableOptions; i++)
07504                                 if (!this->other[i]->IsEqual(that->other[i]))
07505                                 {
07506 #ifdef DEBUG_OSOPTION
07507                                         cout << "other[" << i << "]: " << this->other[i] << " vs. " << that->other[i] << endl;
07508 #endif  
07509                                         return false;
07510                                 }
07511 
07512                         return true;
07513                 }
07514         }
07515 }//VariableOption::IsEqual
07516 
07517 bool InitVariableValues::IsEqual(InitVariableValues *that)
07518 {
07519 #ifdef DEBUG_OSOPTION
07520         cout << "Start comparing in InitVariableValues" << endl;
07521 #endif
07522         if (this == NULL)
07523         {       if (that == NULL)
07524                         return true;
07525                 else
07526                 {
07527                         #ifdef DEBUG_OSOPTION
07528                                 cout << "First object is NULL, second is not" << endl;
07529                         #endif
07530                         return false;
07531                 }
07532         }
07533         else 
07534         {       if (that == NULL)
07535                 {
07536                         #ifdef DEBUG_OSOPTION
07537                                 cout << "Second object is NULL, first is not" << endl;
07538                         #endif
07539                         return false;
07540                 }
07541                 else    
07542                 {       if (this->numberOfVar != that->numberOfVar)  
07543                         {
07544 #ifdef DEBUG_OSOPTION
07545                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07546 #endif  
07547                                 return false;
07548                         }
07549                         int i;
07550                         for (i = 0; i < numberOfVar; i++)
07551                                 if (!this->var[i]->IsEqual(that->var[i]))
07552                                         return false;
07553                         return true;
07554                 }
07555         }
07556 }//InitVariableValues::IsEqual
07557 
07558 bool InitVarValue::IsEqual(InitVarValue *that)
07559 {
07560 #ifdef DEBUG_OSOPTION
07561         cout << "Start comparing in InitVarValue" << endl;
07562 #endif
07563         if (this == NULL)
07564         {       if (that == NULL)
07565                         return true;
07566                 else
07567                 {
07568                         #ifdef DEBUG_OSOPTION
07569                                 cout << "First object is NULL, second is not" << endl;
07570                         #endif
07571                         return false;
07572                 }
07573         }
07574         else 
07575         {       if (that == NULL)
07576                 {
07577                         #ifdef DEBUG_OSOPTION
07578                                 cout << "Second object is NULL, first is not" << endl;
07579                         #endif
07580                         return false;
07581                 }
07582                 else    
07583                 {       if ((this->idx != that->idx) || (this->value != that->value))
07584                         {
07585 #ifdef DEBUG_OSOPTION
07586                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
07587                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07588 #endif  
07589                                 return false;
07590                         }
07591                         return true;
07592                 }
07593         }
07594 }//InitVarValue::IsEqual
07595 
07596 
07597 bool InitVariableValuesString::IsEqual(InitVariableValuesString *that)
07598 {
07599 #ifdef DEBUG_OSOPTION
07600         cout << "Start comparing in InitVariableValuesString" << endl;
07601 #endif
07602         if (this == NULL)
07603         {       if (that == NULL)
07604                         return true;
07605                 else
07606                 {
07607                         #ifdef DEBUG_OSOPTION
07608                                 cout << "First object is NULL, second is not" << endl;
07609                         #endif
07610                         return false;
07611                 }
07612         }
07613         else 
07614         {       if (that == NULL)
07615                 {
07616                         #ifdef DEBUG_OSOPTION
07617                                 cout << "Second object is NULL, first is not" << endl;
07618                         #endif
07619                         return false;
07620                 }
07621                 else    
07622                 {       if (this->numberOfVar != that->numberOfVar)  
07623                         {
07624 #ifdef DEBUG_OSOPTION
07625                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07626 #endif  
07627                                 return false;
07628                         }
07629                         int i;
07630                         for (i = 0; i < numberOfVar; i++)
07631                                 if (!this->var[i]->IsEqual(that->var[i]))
07632                                         return false;
07633                         return true;
07634                 }
07635         }
07636 }//InitVariableValuesString::IsEqual
07637 
07638 bool InitVarValueString::IsEqual(InitVarValueString *that)
07639 {
07640 #ifdef DEBUG_OSOPTION
07641         cout << "Start comparing in InitVarValueString" << endl;
07642 #endif
07643         if (this == NULL)
07644         {       if (that == NULL)
07645                         return true;
07646                 else
07647                 {
07648                         #ifdef DEBUG_OSOPTION
07649                                 cout << "First object is NULL, second is not" << endl;
07650                         #endif
07651                         return false;
07652                 }
07653         }
07654         else 
07655         {       if (that == NULL)
07656                 {
07657                         #ifdef DEBUG_OSOPTION
07658                                 cout << "Second object is NULL, first is not" << endl;
07659                         #endif
07660                         return false;
07661                 }
07662                 else    
07663                 {       if ((this->idx != that->idx) || (this->value != that->value))
07664                         {
07665 #ifdef DEBUG_OSOPTION
07666                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
07667                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07668 #endif  
07669                                 return false;
07670                         }
07671                         return true;
07672                 }
07673         }
07674 }//InitVarValueString::IsEqual
07675 
07676 bool InitialBasisStatus::IsEqual(InitialBasisStatus *that)
07677 {
07678 #ifdef DEBUG_OSOPTION
07679         cout << "Start comparing in InitialBasisStatus" << endl;
07680 #endif
07681         if (this == NULL)
07682         {       if (that == NULL)
07683                         return true;
07684                 else
07685                 {
07686                         #ifdef DEBUG_OSOPTION
07687                                 cout << "First object is NULL, second is not" << endl;
07688                         #endif
07689                         return false;
07690                 }
07691         }
07692         else 
07693         {       if (that == NULL)
07694                 {
07695                         #ifdef DEBUG_OSOPTION
07696                                 cout << "Second object is NULL, first is not" << endl;
07697                         #endif
07698                         return false;
07699                 }
07700                 else    
07701                 {       if (this->numberOfVar != that->numberOfVar)  
07702                         {
07703 #ifdef DEBUG_OSOPTION
07704                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07705 #endif  
07706                                 return false;
07707                         }
07708                         int i;
07709                         for (i = 0; i < numberOfVar; i++)
07710                                 if (!this->var[i]->IsEqual(that->var[i]))
07711                                         return false;
07712                         return true;
07713                 }
07714         }
07715 }//InitialBasisStatus::IsEqual
07716 
07717 bool InitBasStatus::IsEqual(InitBasStatus *that)
07718 {
07719 #ifdef DEBUG_OSOPTION
07720         cout << "Start comparing in InitBasStatus" << endl;
07721 #endif
07722         if (this == NULL)
07723         {       if (that == NULL)
07724                         return true;
07725                 else
07726                 {
07727                         #ifdef DEBUG_OSOPTION
07728                                 cout << "First object is NULL, second is not" << endl;
07729                         #endif
07730                         return false;
07731                 }
07732         }
07733         else 
07734         {       if (that == NULL)
07735                 {
07736                         #ifdef DEBUG_OSOPTION
07737                                 cout << "Second object is NULL, first is not" << endl;
07738                         #endif
07739                         return false;
07740                 }
07741                 else    
07742                 {       if ((this->idx != that->idx) || (this->value != that->value))
07743                         if ((this->value != "unknown" && that->value != "") ||
07744                                 (that->value != "unknown" && this->value != "") )
07745                         {
07746 #ifdef DEBUG_OSOPTION
07747                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
07748                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07749 #endif  
07750                                 return false;
07751                         }
07752                         return true;
07753                 }
07754         }
07755 }//InitBasStatus::IsEqual
07756 
07757 
07758 bool IntegerVariableBranchingWeights::IsEqual(IntegerVariableBranchingWeights *that)
07759 {
07760 #ifdef DEBUG_OSOPTION
07761         cout << "Start comparing in IntegerVariableBranchingWeights" << endl;
07762 #endif
07763         if (this == NULL)
07764         {       if (that == NULL)
07765                         return true;
07766                 else
07767                 {
07768                         #ifdef DEBUG_OSOPTION
07769                                 cout << "First object is NULL, second is not" << endl;
07770                         #endif
07771                         return false;
07772                 }
07773         }
07774         else 
07775         {       if (that == NULL)
07776                 {
07777                         #ifdef DEBUG_OSOPTION
07778                                 cout << "Second object is NULL, first is not" << endl;
07779                         #endif
07780                         return false;
07781                 }
07782                 else    
07783                 {       if (this->numberOfVar != that->numberOfVar)  
07784                         {
07785 #ifdef DEBUG_OSOPTION
07786                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07787 #endif  
07788                                 return false;
07789                         }
07790                         int i;
07791                         for (i = 0; i < numberOfVar; i++)
07792                                 if (!this->var[i]->IsEqual(that->var[i]))
07793                                         return false;
07794                         return true;
07795                 }
07796         }
07797 }//IntegerVariableBranchingWeights::IsEqual
07798 
07799 bool SOSVariableBranchingWeights::IsEqual(SOSVariableBranchingWeights *that)
07800 {
07801 #ifdef DEBUG_OSOPTION
07802         cout << "Start comparing in SOSVariableBranchingWeights" << endl;
07803 #endif
07804         if (this == NULL)
07805         {       if (that == NULL)
07806                         return true;
07807                 else
07808                 {
07809                         #ifdef DEBUG_OSOPTION
07810                                 cout << "First object is NULL, second is not" << endl;
07811                         #endif
07812                         return false;
07813                 }
07814         }
07815         else 
07816         {       if (that == NULL)
07817                 {
07818                         #ifdef DEBUG_OSOPTION
07819                                 cout << "Second object is NULL, first is not" << endl;
07820                         #endif
07821                         return false;
07822                 }
07823                 else    
07824                 {       if (this->numberOfSOS != that->numberOfSOS)  
07825                         {
07826 #ifdef DEBUG_OSOPTION
07827                                 cout << "numberOfSOS: " << this->numberOfSOS << " vs. " << that->numberOfSOS << endl;
07828 #endif  
07829                                 return false;
07830                         }
07831                         int i;
07832                         for (i = 0; i < numberOfSOS; i++)
07833                         {       
07834                                 if (!this->sos[i]->IsEqual(that->sos[i]))
07835                                         return false;
07836                         }
07837                         return true;
07838                 }
07839         }
07840 }//SOSVariableBranchingWeights::IsEqual
07841 
07842 
07843 bool SOSWeights::IsEqual(SOSWeights *that)
07844 {
07845 #ifdef DEBUG_OSOPTION
07846         cout << "Start comparing in SOSWeights" << endl;
07847 #endif
07848         if (this == NULL)
07849         {       if (that == NULL)
07850                         return true;
07851                 else
07852                 {
07853                         #ifdef DEBUG_OSOPTION
07854                                 cout << "First object is NULL, second is not" << endl;
07855                         #endif
07856                         return false;
07857                 }
07858         }
07859         else 
07860         {       if (that == NULL)
07861                 {
07862                         #ifdef DEBUG_OSOPTION
07863                                 cout << "Second object is NULL, first is not" << endl;
07864                         #endif
07865                         return false;
07866                 }
07867                 else    
07868                 {       if ((this->sosIdx != that->sosIdx) ||
07869                                 (this->groupWeight != that->groupWeight))  
07870                         {
07871 #ifdef DEBUG_OSOPTION
07872                                 cout << "sosIdx: "      << this->sosIdx      << " vs. " << that->sosIdx      << endl;
07873                                 cout << "groupWeight: " << this->groupWeight << " vs. " << that->groupWeight << endl;
07874 #endif  
07875                                 return false;
07876                         }
07877 
07878                         if (this->numberOfVar != that->numberOfVar)  
07879                         {
07880 #ifdef DEBUG_OSOPTION
07881                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07882 #endif  
07883                                 return false;
07884                         }
07885                         int i;
07886                         for (i = 0; i < numberOfVar; i++)
07887                         {       //cout << "var[" << i << "] of " << numberOfVar << endl;
07888                                 if (!this->var[i]->IsEqual(that->var[i]))
07889                                         return false;
07890                         }
07891                         return true;
07892                 }
07893         }
07894 }//SOSWeights::IsEqual
07895 
07896 
07897 bool BranchingWeight::IsEqual(BranchingWeight *that)
07898 {
07899 #ifdef DEBUG_OSOPTION
07900         cout << "Start comparing in BranchingWeight" << endl;
07901 #endif
07902         if (this == NULL)
07903         {       if (that == NULL)
07904                         return true;
07905                 else
07906                 {
07907                         #ifdef DEBUG_OSOPTION
07908                                 cout << "First object is NULL, second is not" << endl;
07909                         #endif
07910                         return false;
07911                 }
07912         }
07913         else 
07914         {       if (that == NULL)
07915                 {
07916                         #ifdef DEBUG_OSOPTION
07917                                 cout << "Second object is NULL, first is not" << endl;
07918                         #endif
07919                         return false;
07920                 }
07921                 else    
07922                 {       if ((this->idx != that->idx) || (this->value != that->value))
07923                         {
07924 #ifdef DEBUG_OSOPTION
07925                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
07926                                 cout << "value: " << this->value << " vs. " << that->value << endl;
07927 #endif  
07928                                 return false;
07929                         }
07930                         return true;
07931                 }
07932         }
07933 }//BranchingWeight::IsEqual
07934 
07935 bool OtherVariableOption::IsEqual(OtherVariableOption *that)
07936 {
07937 #ifdef DEBUG_OSOPTION
07938         cout << "Start comparing in OtherVariableOption" << endl;
07939 #endif
07940         if (this == NULL)
07941         {       if (that == NULL)
07942                         return true;
07943                 else
07944                 {
07945                         #ifdef DEBUG_OSOPTION
07946                                 cout << "First object is NULL, second is not" << endl;
07947                         #endif
07948                         return false;
07949                 }
07950         }
07951         else 
07952         {       if (that == NULL)
07953                 {
07954                         #ifdef DEBUG_OSOPTION
07955                                 cout << "Second object is NULL, first is not" << endl;
07956                         #endif
07957                         return false;
07958                 }
07959                 else    
07960                 {       if ((this->name        != that->name)     ||
07961                                 (this->value       != that->value)    ||
07962                                 (this->solver      != that->solver)   ||
07963                                 (this->category    != that->category) ||
07964                                 (this->type        != that->type)     ||
07965                                 (this->description != that->description))  
07966                         {
07967 #ifdef DEBUG_OSOPTION
07968                                 cout << "name: "        << this->name        << " vs. " << that->name        << endl;
07969                                 cout << "value: "       << this->value       << " vs. " << that->value       << endl;
07970                                 cout << "solver: "      << this->solver      << " vs. " << that->solver      << endl;
07971                                 cout << "category: "    << this->category    << " vs. " << that->category    << endl;
07972                                 cout << "type: "        << this->type        << " vs. " << that->type        << endl;
07973                                 cout << "description: " << this->description << " vs. " << that->description << endl;
07974 #endif  
07975                                 return false;
07976                         }
07977 
07978                         if (this->numberOfVar != that->numberOfVar)  
07979                         {
07980 #ifdef DEBUG_OSOPTION
07981                                 cout << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
07982 #endif  
07983                                 return false;
07984                         }
07985                         int i;
07986                         for (i = 0; i < numberOfVar; i++)
07987                                 if (!this->var[i]->IsEqual(that->var[i]))
07988                                         return false;
07989                         return true;
07990                 }
07991         }
07992 }//OtherVariableOption::IsEqual
07993 
07994 bool OtherVarOption::IsEqual(OtherVarOption *that)
07995 {
07996 #ifdef DEBUG_OSOPTION
07997         cout << "Start comparing in OtherVarOption" << endl;
07998 #endif
07999         if (this == NULL)
08000         {       if (that == NULL)
08001                         return true;
08002                 else
08003                 {
08004                         #ifdef DEBUG_OSOPTION
08005                                 cout << "First object is NULL, second is not" << endl;
08006                         #endif
08007                         return false;
08008                 }
08009         }
08010         else 
08011         {       if (that == NULL)
08012                 {
08013                         #ifdef DEBUG_OSOPTION
08014                                 cout << "Second object is NULL, first is not" << endl;
08015                         #endif
08016                         return false;
08017                 }
08018                 else    
08019                 {       if ((this->idx     != that->idx)     || (this->value   != that->value) ||
08020                                 (this->lbValue != that->lbValue) || (this->ubValue != that->ubValue))
08021                         {
08022 #ifdef DEBUG_OSOPTION
08023                                 cout << "idx: "     << this->idx     << " vs. " << that->idx     << endl;
08024                                 cout << "value: "   << this->value   << " vs. " << that->value   << endl;
08025                                 cout << "lbValue: " << this->lbValue << " vs. " << that->lbValue << endl;
08026                                 cout << "ubValue: " << this->ubValue << " vs. " << that->ubValue << endl;
08027 #endif  
08028                                 return false;
08029                         }
08030                         return true;
08031                 }
08032         }
08033 }//OtherVarOption::IsEqual
08034 
08035 bool ObjectiveOption::IsEqual(ObjectiveOption *that)
08036 {
08037 #ifdef DEBUG_OSOPTION
08038         cout << "Start comparing in ObjectiveOption" << endl;
08039 #endif
08040         if (this == NULL)
08041         {       if (that == NULL)
08042                         return true;
08043                 else
08044                 {
08045                         #ifdef DEBUG_OSOPTION
08046                                 cout << "First object is NULL, second is not" << endl;
08047                         #endif
08048                         return false;
08049                 }
08050         }
08051         else 
08052         {       if (that == NULL)
08053                 {
08054                         #ifdef DEBUG_OSOPTION
08055                                 cout << "Second object is NULL, first is not" << endl;
08056                         #endif
08057                         return false;
08058                 }
08059                 else    
08060                 {       
08061                         if (!this->initialObjectiveValues->IsEqual(that->initialObjectiveValues))
08062                                 return false;
08063                         if (!this->initialObjectiveBounds->IsEqual(that->initialObjectiveBounds))
08064                                 return false;
08065 
08066                         if (this->numberOfOtherObjectiveOptions != that->numberOfOtherObjectiveOptions)  
08067                         {
08068 #ifdef DEBUG_OSOPTION
08069                                 cout << "numberOfOtherObjectiveOptions: " << this->numberOfOtherObjectiveOptions << " vs. " << that->numberOfOtherObjectiveOptions << endl;
08070 #endif  
08071                                 return false;
08072                         }
08073                         int i;
08074                         for (i = 0; i < numberOfOtherObjectiveOptions; i++)
08075                                 if (!this->other[i]->IsEqual(that->other[i]))
08076                                         return false;
08077 
08078                         return true;
08079                 }
08080         }
08081 }//ObjectiveOption::IsEqual
08082 
08083 bool InitObjectiveValues::IsEqual(InitObjectiveValues *that)
08084 {
08085 #ifdef DEBUG_OSOPTION
08086         cout << "Start comparing in InitObjectiveValues" << endl;
08087 #endif
08088         if (this == NULL)
08089         {       if (that == NULL)
08090                         return true;
08091                 else
08092                 {
08093                         #ifdef DEBUG_OSOPTION
08094                                 cout << "First object is NULL, second is not" << endl;
08095                         #endif
08096                         return false;
08097                 }
08098         }
08099         else 
08100         {       if (that == NULL)
08101                 {
08102                         #ifdef DEBUG_OSOPTION
08103                                 cout << "Second object is NULL, first is not" << endl;
08104                         #endif
08105                         return false;
08106                 }
08107                 else    
08108                 {       if (this->numberOfObj != that->numberOfObj)  
08109                         {
08110 #ifdef DEBUG_OSOPTION
08111                                 cout << "numberOfObj: " << this->numberOfObj << " vs. " << that->numberOfObj << endl;
08112 #endif  
08113                                 return false;
08114                         }
08115                         int i;
08116                         for (i = 0; i < numberOfObj; i++)
08117                                 if (!this->obj[i]->IsEqual(that->obj[i]))
08118                                         return false;
08119                         return true;
08120                 }
08121         }
08122 }//InitObjectiveValues::IsEqual
08123 
08124 bool InitObjValue::IsEqual(InitObjValue *that)
08125 {
08126 #ifdef DEBUG_OSOPTION
08127         cout << "Start comparing in InitObjValue" << endl;
08128 #endif
08129         if (this == NULL)
08130         {       if (that == NULL)
08131                         return true;
08132                 else
08133                 {
08134                         #ifdef DEBUG_OSOPTION
08135                                 cout << "First object is NULL, second is not" << endl;
08136                         #endif
08137                         return false;
08138                 }
08139         }
08140         else 
08141         {       if (that == NULL)
08142                 {
08143                         #ifdef DEBUG_OSOPTION
08144                                 cout << "Second object is NULL, first is not" << endl;
08145                         #endif
08146                         return false;
08147                 }
08148                 else    
08149                 {       if ((this->idx != that->idx) || (this->value != that->value))
08150                         {
08151 #ifdef DEBUG_OSOPTION
08152                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
08153                                 cout << "value: " << this->value << " vs. " << that->value << endl;
08154 #endif  
08155                                 return false;
08156                         }
08157                         return true;
08158                 }
08159         }
08160 }//InitObjValue::IsEqual
08161 
08162 bool InitObjectiveBounds::IsEqual(InitObjectiveBounds *that)
08163 {
08164 #ifdef DEBUG_OSOPTION
08165         cout << "Start comparing in InitObjectiveBounds" << endl;
08166 #endif
08167         if (this == NULL)
08168         {       if (that == NULL)
08169                         return true;
08170                 else
08171                 {
08172                         #ifdef DEBUG_OSOPTION
08173                                 cout << "First object is NULL, second is not" << endl;
08174                         #endif
08175                         return false;
08176                 }
08177         }
08178         else 
08179         {       if (that == NULL)
08180                 {
08181                         #ifdef DEBUG_OSOPTION
08182                                 cout << "Second object is NULL, first is not" << endl;
08183                         #endif
08184                         return false;
08185                 }
08186                 else    
08187                 {       if (this->numberOfObj != that->numberOfObj)  
08188                         {
08189 #ifdef DEBUG_OSOPTION
08190                                 cout << "numberOfObj: " << this->numberOfObj << " vs. " << that->numberOfObj << endl;
08191 #endif  
08192                                 return false;
08193                         }
08194                         int i;
08195                         for (i = 0; i < numberOfObj; i++)
08196                                 if (!this->obj[i]->IsEqual(that->obj[i]))
08197                                         return false;
08198                         return true;
08199                 }
08200         }
08201 }//InitObjectiveBounds::IsEqual
08202 
08203 bool InitObjBound::IsEqual(InitObjBound *that)
08204 {
08205 #ifdef DEBUG_OSOPTION
08206         cout << "Start comparing in InitObjBound" << endl;
08207 #endif
08208         if (this == NULL)
08209         {       if (that == NULL)
08210                         return true;
08211                 else
08212                 {
08213                         #ifdef DEBUG_OSOPTION
08214                                 cout << "First object is NULL, second is not" << endl;
08215                         #endif
08216                         return false;
08217                 }
08218         }
08219         else 
08220         {       if (that == NULL)
08221                 {
08222                         #ifdef DEBUG_OSOPTION
08223                                 cout << "Second object is NULL, first is not" << endl;
08224                         #endif
08225                         return false;
08226                 }
08227                 else    
08228                 {       if ((this->idx     != that->idx)    || (this->lbValue != that->lbValue) || 
08229                                 (this->ubValue != that->ubValue) )
08230                         {
08231 #ifdef DEBUG_OSOPTION
08232                                 cout << "idx: "     << this->idx     << " vs. " << that->idx     << endl;
08233                                 cout << "lbValue: " << this->lbValue << " vs. " << that->lbValue << endl;
08234                                 cout << "ubValue: " << this->ubValue << " vs. " << that->ubValue << endl;
08235 #endif  
08236                                 return false;
08237                         }
08238                         return true;
08239                 }
08240         }
08241 }//InitObjBound::IsEqual
08242 
08243 bool OtherObjectiveOption::IsEqual(OtherObjectiveOption *that)
08244 {
08245 #ifdef DEBUG_OSOPTION
08246         cout << "Start comparing in OtherObjectiveOption" << endl;
08247 #endif
08248         if (this == NULL)
08249         {       if (that == NULL)
08250                         return true;
08251                 else
08252                 {
08253                         #ifdef DEBUG_OSOPTION
08254                                 cout << "First object is NULL, second is not" << endl;
08255                         #endif
08256                         return false;
08257                 }
08258         }
08259         else 
08260         {       if (that == NULL)
08261                 {
08262                         #ifdef DEBUG_OSOPTION
08263                                 cout << "Second object is NULL, first is not" << endl;
08264                         #endif
08265                         return false;
08266                 }
08267                 else    
08268                 {       if ((this->name        != that->name)     ||
08269                                 (this->value       != that->value)    ||
08270                                 (this->solver      != that->solver)   ||
08271                                 (this->category    != that->category) ||
08272                                 (this->type        != that->type)     ||
08273                                 (this->description != that->description))  
08274                         {
08275 #ifdef DEBUG_OSOPTION
08276                                 cout << "name: "        << this->name        << " vs. " << that->name        << endl;
08277                                 cout << "value: "       << this->value       << " vs. " << that->value       << endl;
08278                                 cout << "solver: "      << this->solver      << " vs. " << that->solver      << endl;
08279                                 cout << "category: "    << this->category    << " vs. " << that->category    << endl;
08280                                 cout << "type: "        << this->type        << " vs. " << that->type        << endl;
08281                                 cout << "description: " << this->description << " vs. " << that->description << endl;
08282 #endif  
08283                                 return false;
08284                         }
08285 
08286                         if (this->numberOfObj != that->numberOfObj)  
08287                         {
08288 #ifdef DEBUG_OSOPTION
08289                                 cout << "numberOfObj: " << this->numberOfObj << " vs. " << that->numberOfObj << endl;
08290 #endif  
08291                                 return false;
08292                         }
08293                         int i;
08294                         for (i = 0; i < numberOfObj; i++)
08295                                 if (!this->obj[i]->IsEqual(that->obj[i]))
08296                                         return false;
08297                         return true;
08298                 }
08299         }
08300 }//OtherObjectiveOption::IsEqual
08301 
08302 bool OtherObjOption::IsEqual(OtherObjOption *that)
08303 {
08304 #ifdef DEBUG_OSOPTION
08305         cout << "Start comparing in OtherObjOption" << endl;
08306 #endif
08307         if (this == NULL)
08308         {       if (that == NULL)
08309                         return true;
08310                 else
08311                 {
08312                         #ifdef DEBUG_OSOPTION
08313                                 cout << "First object is NULL, second is not" << endl;
08314                         #endif
08315                         return false;
08316                 }
08317         }
08318         else 
08319         {       if (that == NULL)
08320                 {
08321                         #ifdef DEBUG_OSOPTION
08322                                 cout << "Second object is NULL, first is not" << endl;
08323                         #endif
08324                         return false;
08325                 }
08326                 else    
08327                 {       if ((this->idx     != that->idx)     || (this->value   != that->value) ||
08328                                 (this->lbValue != that->lbValue) || (this->ubValue != that->ubValue))
08329                         {
08330 #ifdef DEBUG_OSOPTION
08331                                 cout << "idx: "     << this->idx     << " vs. " << that->idx     << endl;
08332                                 cout << "value: "   << this->value   << " vs. " << that->value   << endl;
08333                                 cout << "lbValue: " << this->lbValue << " vs. " << that->lbValue << endl;
08334                                 cout << "ubValue: " << this->ubValue << " vs. " << that->ubValue << endl;
08335 #endif  
08336                                 return false;
08337                         }
08338                         return true;
08339                 }
08340         }
08341 }//OtherObjOption::IsEqual
08342 
08343 bool ConstraintOption::IsEqual(ConstraintOption *that)
08344 {
08345 #ifdef DEBUG_OSOPTION
08346         cout << "Start comparing in ConstraintOption" << endl;
08347 #endif
08348         if (this == NULL)
08349         {       if (that == NULL)
08350                         return true;
08351                 else
08352                 {
08353                         #ifdef DEBUG_OSOPTION
08354                                 cout << "First object is NULL, second is not" << endl;
08355                         #endif
08356                         return false;
08357                 }
08358         }
08359         else 
08360         {       if (that == NULL)
08361                 {
08362                         #ifdef DEBUG_OSOPTION
08363                                 cout << "Second object is NULL, first is not" << endl;
08364                         #endif
08365                         return false;
08366                 }
08367                 else    
08368                 {       
08369                         if (!this->initialConstraintValues->IsEqual(that->initialConstraintValues))
08370                                 return false;
08371                         if (!this->initialDualValues->IsEqual(that->initialDualValues))
08372                                 return false;
08373 
08374                         if (this->numberOfOtherConstraintOptions != that->numberOfOtherConstraintOptions)  
08375                         {
08376 #ifdef DEBUG_OSOPTION
08377                                 cout << "numberOfOtherConstraintOptions: " << this->numberOfOtherConstraintOptions << " vs. " << that->numberOfOtherConstraintOptions << endl;
08378 #endif  
08379                                 return false;
08380                         }
08381                         int i;
08382                         for (i = 0; i < numberOfOtherConstraintOptions; i++)
08383                                 if (!this->other[i]->IsEqual(that->other[i]))
08384                                         return false;
08385 
08386                         return true;
08387                 }
08388         }
08389 }//ConstraintOption::IsEqual
08390 
08391 bool InitConstraintValues::IsEqual(InitConstraintValues *that)
08392 {
08393 #ifdef DEBUG_OSOPTION
08394         cout << "Start comparing in InitConstraintValues" << endl;
08395 #endif
08396         if (this == NULL)
08397         {       if (that == NULL)
08398                         return true;
08399                 else
08400                 {
08401                         #ifdef DEBUG_OSOPTION
08402                                 cout << "First object is NULL, second is not" << endl;
08403                         #endif
08404                         return false;
08405                 }
08406         }
08407         else 
08408         {       if (that == NULL)
08409                 {
08410                         #ifdef DEBUG_OSOPTION
08411                                 cout << "Second object is NULL, first is not" << endl;
08412                         #endif
08413                         return false;
08414                 }
08415                 else    
08416                 {       if (this->numberOfCon != that->numberOfCon)  
08417                         {
08418 #ifdef DEBUG_OSOPTION
08419                                 cout << "numberOfCon: " << this->numberOfCon << " vs. " << that->numberOfCon << endl;
08420 #endif  
08421                                 return false;
08422                         }
08423                         int i;
08424                         for (i = 0; i < numberOfCon; i++)
08425                                 if (!this->con[i]->IsEqual(that->con[i]))
08426                                         return false;
08427                         return true;
08428                 }
08429         }
08430 }//InitConstraintValues::IsEqual
08431 
08432 bool InitConValue::IsEqual(InitConValue *that)
08433 {
08434 #ifdef DEBUG_OSOPTION
08435         cout << "Start comparing in InitConValue" << endl;
08436 #endif
08437         if (this == NULL)
08438         {       if (that == NULL)
08439                         return true;
08440                 else
08441                 {
08442                         #ifdef DEBUG_OSOPTION
08443                                 cout << "First object is NULL, second is not" << endl;
08444                         #endif
08445                         return false;
08446                 }
08447         }
08448         else 
08449         {       if (that == NULL)
08450                 {
08451                         #ifdef DEBUG_OSOPTION
08452                                 cout << "Second object is NULL, first is not" << endl;
08453                         #endif
08454                         return false;
08455                 }
08456                 else    
08457                 {       if ((this->idx != that->idx) || (this->value != that->value))
08458                         {
08459 #ifdef DEBUG_OSOPTION
08460                                 cout << "idx: "   << this->idx   << " vs. " << that->idx   << endl;
08461                                 cout << "value: " << this->value << " vs. " << that->value << endl;
08462 #endif  
08463                                 return false;
08464                         }
08465                         return true;
08466                 }
08467         }
08468 }//InitConValue::IsEqual
08469 
08470 bool InitDualVariableValues::IsEqual(InitDualVariableValues *that)
08471 {
08472 #ifdef DEBUG_OSOPTION
08473         cout << "Start comparing in InitDualVariableValues" << endl;
08474 #endif
08475         if (this == NULL)
08476         {       if (that == NULL)
08477                         return true;
08478                 else
08479                 {
08480                         #ifdef DEBUG_OSOPTION
08481                                 cout << "First object is NULL, second is not" << endl;
08482                         #endif
08483                         return false;
08484                 }
08485         }
08486         else 
08487         {       if (that == NULL)
08488                 {
08489                         #ifdef DEBUG_OSOPTION
08490                                 cout << "Second object is NULL, first is not" << endl;
08491                         #endif
08492                         return false;
08493                 }
08494                 else    
08495                 {       if (this->numberOfCon != that->numberOfCon)  
08496                         {
08497 #ifdef DEBUG_OSOPTION
08498                                 cout << "numberOfCon: " << this->numberOfCon << " vs. " << that->numberOfCon << endl;
08499 #endif  
08500                                 return false;
08501                         }
08502                         int i;
08503                         for (i = 0; i < numberOfCon; i++)
08504                                 if (!this->con[i]->IsEqual(that->con[i]))
08505                                         return false;
08506                         return true;
08507                 }
08508         }
08509 }//InitDualVariableValues::IsEqual
08510 
08511 bool InitDualVarValue::IsEqual(InitDualVarValue *that)
08512 {
08513 #ifdef DEBUG_OSOPTION
08514         cout << "Start comparing in InitDualVarValue" << endl;
08515 #endif
08516         if (this == NULL)
08517         {       if (that == NULL)
08518                         return true;
08519                 else
08520                 {
08521                         #ifdef DEBUG_OSOPTION
08522                                 cout << "First object is NULL, second is not" << endl;
08523                         #endif
08524                         return false;
08525                 }
08526         }
08527         else 
08528         {       if (that == NULL)
08529                 {
08530                         #ifdef DEBUG_OSOPTION
08531                                 cout << "Second object is NULL, first is not" << endl;
08532                         #endif
08533                         return false;
08534                 }
08535                 else    
08536                 {       if ((this->idx != that->idx) || (this->lbDualValue != that->lbDualValue) ||
08537                                 (this->ubDualValue != that->ubDualValue))
08538                         {
08539 #ifdef DEBUG_OSOPTION
08540                                 cout << "idx: "         << this->idx         << " vs. " << that->idx         << endl;
08541                                 cout << "lbDualValue: " << this->lbDualValue << " vs. " << that->lbDualValue << endl;
08542                                 cout << "ubDualValue: " << this->ubDualValue << " vs. " << that->ubDualValue << endl;
08543 #endif  
08544                                 return false;
08545                         }
08546                         return true;
08547                 }
08548         }
08549 }//InitDualVarValue::IsEqual
08550 
08551 bool OtherConstraintOption::IsEqual(OtherConstraintOption *that)
08552 {
08553 #ifdef DEBUG_OSOPTION
08554         cout << "Start comparing in OtherConstraintOption" << endl;
08555 #endif
08556         if (this == NULL)
08557         {       if (that == NULL)
08558                         return true;
08559                 else
08560                 {
08561                         #ifdef DEBUG_OSOPTION
08562                                 cout << "First object is NULL, second is not" << endl;
08563                         #endif
08564                         return false;
08565                 }
08566         }
08567         else 
08568         {       if (that == NULL)
08569                 {
08570                         #ifdef DEBUG_OSOPTION
08571                                 cout << "Second object is NULL, first is not" << endl;
08572                         #endif
08573                         return false;
08574                 }
08575                 else    
08576                 {       if ((this->name        != that->name)     ||
08577                                 (this->value       != that->value)    ||
08578                                 (this->solver      != that->solver)   ||
08579                                 (this->category    != that->category) ||
08580                                 (this->type        != that->type)     ||
08581                                 (this->description != that->description))  
08582                         {
08583 #ifdef DEBUG_OSOPTION
08584                                 cout << "name: "        << this->name        << " vs. " << that->name        << endl;
08585                                 cout << "value: "       << this->value       << " vs. " << that->value       << endl;
08586                                 cout << "solver: "      << this->solver      << " vs. " << that->solver      << endl;
08587                                 cout << "category: "    << this->category    << " vs. " << that->category    << endl;
08588                                 cout << "type: "        << this->type        << " vs. " << that->type        << endl;
08589                                 cout << "description: " << this->description << " vs. " << that->description << endl;
08590 #endif  
08591                                 return false;
08592                         }
08593 
08594                         if (this->numberOfCon != that->numberOfCon)  
08595                         {
08596 #ifdef DEBUG_OSOPTION
08597                                 cout << "numberOfCon: " << this->numberOfCon << " vs. " << that->numberOfCon << endl;
08598 #endif  
08599                                 return false;
08600                         }
08601                         int i;
08602                         for (i = 0; i < numberOfCon; i++)
08603                                 if (!this->con[i]->IsEqual(that->con[i]))
08604                                         return false;
08605                         return true;
08606                 }
08607         }
08608 }//OtherConstraintOption::IsEqual
08609 
08610 bool OtherConOption::IsEqual(OtherConOption *that)
08611 {
08612 #ifdef DEBUG_OSOPTION
08613         cout << "Start comparing in OtherConOption" << endl;
08614 #endif
08615         if (this == NULL)
08616         {       if (that == NULL)
08617                         return true;
08618                 else
08619                 {
08620                         #ifdef DEBUG_OSOPTION
08621                                 cout << "First object is NULL, second is not" << endl;
08622                         #endif
08623                         return false;
08624                 }
08625         }
08626         else 
08627         {       if (that == NULL)
08628                 {
08629                         #ifdef DEBUG_OSOPTION
08630                                 cout << "Second object is NULL, first is not" << endl;
08631                         #endif
08632                         return false;
08633                 }
08634                 else    
08635                 {       if ((this->idx     != that->idx)     || (this->value   != that->value) ||
08636                                 (this->lbValue != that->lbValue) || (this->ubValue != that->ubValue))
08637                         {
08638 #ifdef DEBUG_OSOPTION
08639                                 cout << "idx: "     << this->idx     << " vs. " << that->idx     << endl;
08640                                 cout << "value: "   << this->value   << " vs. " << that->value   << endl;
08641                                 cout << "lbValue: " << this->lbValue << " vs. " << that->lbValue << endl;
08642                                 cout << "ubValue: " << this->ubValue << " vs. " << that->ubValue << endl;
08643 #endif  
08644                                 return false;
08645                         }
08646                         return true;
08647                 }
08648         }
08649 }//OtherConOption::IsEqual
08650 
08651 
08652 bool SolverOptions::IsEqual(SolverOptions *that)
08653 {
08654 #ifdef DEBUG_OSOPTION
08655         cout << "Start comparing in SolverOptions" << endl;
08656 #endif
08657         if (this == NULL)
08658         {       if (that == NULL)
08659                         return true;
08660                 else
08661                 {
08662                         #ifdef DEBUG_OSOPTION
08663                                 cout << "First object is NULL, second is not" << endl;
08664                         #endif
08665                         return false;
08666                 }
08667         }
08668         else 
08669         {       if (that == NULL)
08670                 {
08671                         #ifdef DEBUG_OSOPTION
08672                                 cout << "Second object is NULL, first is not" << endl;
08673                         #endif
08674                         return false;
08675                 }
08676                 else    
08677                 {   if (this->numberOfSolverOptions != that->numberOfSolverOptions)  
08678                         {
08679 #ifdef DEBUG_OSOPTION
08680                                 cout << "numberOfSolverOptions: " << this->numberOfSolverOptions << " vs. " << that->numberOfSolverOptions << endl;
08681 #endif  
08682                                 return false;
08683                         }
08684 
08685                         int i;
08686                         for (i = 0; i < numberOfSolverOptions; i++)
08687                                 if (!this->solverOption[i]->IsEqual(that->solverOption[i]))
08688                                         return false;
08689 
08690                         return true;
08691                 }
08692         }
08693 }//SolverOptions::IsEqual
08694 
08695 bool SolverOption::IsEqual(SolverOption *that)
08696 {
08697 #ifdef DEBUG_OSOPTION
08698         cout << "Start comparing in SolverOption" << endl;
08699 #endif
08700         if (this == NULL)
08701         {       if (that == NULL)
08702                         return true;
08703                 else
08704                 {
08705                         #ifdef DEBUG_OSOPTION
08706                                 cout << "First object is NULL, second is not" << endl;
08707                         #endif
08708                         return false;
08709                 }
08710         }
08711         else 
08712         {       if (that == NULL)
08713                 {
08714                         #ifdef DEBUG_OSOPTION
08715                                 cout << "Second object is NULL, first is not" << endl;
08716                         #endif
08717                         return false;
08718                 }
08719                 else    
08720                 {       if ((this->name        != that->name)     ||
08721                                 (this->value       != that->value)    ||
08722                                 (this->solver      != that->solver)   ||
08723                                 (this->category    != that->category) ||
08724                                 (this->type        != that->type)     ||
08725                                 (this->description != that->description))  
08726                         {
08727 #ifdef DEBUG_OSOPTION
08728                                 cout << "name: "        << this->name        << " vs. " << that->name        << endl;
08729                                 cout << "value: "       << this->value       << " vs. " << that->value       << endl;
08730                                 cout << "solver: "      << this->solver      << " vs. " << that->solver      << endl;
08731                                 cout << "category: "    << this->category    << " vs. " << that->category    << endl;
08732                                 cout << "type: "        << this->type        << " vs. " << that->type        << endl;
08733                                 cout << "description: " << this->description << " vs. " << that->description << endl;
08734 #endif  
08735                                 return false;
08736                         }
08737                         return true;
08738                 }
08739         }
08740 }//SolverOption::IsEqual

Generated on Fri Jan 7 03:24:39 2011 by  doxygen 1.4.7