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

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

Generated on Thu Aug 5 03:02:59 2010 by  doxygen 1.4.7