00001
00016 #ifndef OSOPTION_H
00017 #define OSOPTION_H
00018 #include <string>
00019 #include <vector>
00020 #include "OSGeneral.h"
00021 #include "OSMathUtil.h"
00022
00023
00024
00025
00026
00038 class InstanceLocationOption
00039 {
00040
00041 public:
00043 std::string locationType;
00044
00046 std::string value;
00047
00052 InstanceLocationOption();
00053
00058 ~InstanceLocationOption();
00059
00064 bool IsEqual(InstanceLocationOption *that);
00065
00073 bool setRandom(double density, bool conformant);
00074 };
00075
00076
00088 class ContactOption
00089 {
00090
00091 public:
00093 std::string transportType;
00094
00096 std::string value;
00097
00102 ContactOption();
00107 ~ContactOption();
00108
00113 bool IsEqual(ContactOption *that);
00114
00122 bool setRandom(double density, bool conformant);
00123 };
00124
00125
00137 class OtherOption
00138 {
00139
00140 public:
00142 std::string name;
00143
00145 std::string value;
00146
00148 std::string description;
00149
00154 OtherOption();
00159 ~OtherOption();
00160
00165 bool IsEqual(OtherOption *that);
00166
00174 bool setRandom(double density, bool conformant);
00175 };
00176
00177
00189 class OtherOptions
00190 {
00191
00192 public:
00194 int numberOfOtherOptions;
00195
00197 OtherOption **other;
00198
00203 OtherOptions();
00208 ~OtherOptions();
00209
00214 bool IsEqual(OtherOptions *that);
00215
00223 bool setRandom(double density, bool conformant);
00224
00231 bool setOther(int numberOfOptions, OtherOption** other);
00232
00240 bool addOther(std::string name, std::string value, std::string description);
00241 };
00242
00243
00255 class GeneralOption
00256 {
00257
00258 public:
00259
00261 std::string serviceURI;
00262
00264 std::string serviceName;
00265
00267 std::string instanceName;
00268
00270 InstanceLocationOption *instanceLocation;
00271
00273 std::string jobID;
00274
00276 std::string solverToInvoke;
00277
00279 std::string license;
00280
00282 std::string userName;
00283
00285 std::string password;
00286
00288 ContactOption *contact;
00289
00291 OtherOptions *otherOptions;
00292
00297 GeneralOption();
00302 ~GeneralOption();
00303
00308 bool IsEqual(GeneralOption *that);
00309
00317 bool setRandom(double density, bool conformant);
00318 };
00319
00333 class MinDiskSpace
00334 {
00335
00336 public:
00338 std::string unit;
00339
00341 std::string description;
00342
00344 double value;
00345
00346
00351 MinDiskSpace();
00356 ~MinDiskSpace();
00357
00362 bool IsEqual(MinDiskSpace *that);
00363 };
00364
00378 class MinMemorySize
00379 {
00380
00381 public:
00383 std::string unit;
00384
00386 std::string description;
00387
00389 double value;
00390
00391
00396 MinMemorySize();
00401 ~MinMemorySize();
00402
00407 bool IsEqual(MinMemorySize *that);
00408 };
00409
00423 class MinCPUSpeed
00424 {
00425
00426 public:
00428 std::string unit;
00429
00431 std::string description;
00432
00434 double value;
00435
00436
00441 MinCPUSpeed();
00446 ~MinCPUSpeed();
00447
00452 bool IsEqual(MinCPUSpeed *that);
00453 };
00454
00468 class MinCPUNumber
00469 {
00470
00471 public:
00473 std::string description;
00474
00476 int value;
00477
00478
00483 MinCPUNumber();
00488 ~MinCPUNumber();
00489
00494 bool IsEqual(MinCPUNumber *that);
00495 };
00496
00497
00509 class SystemOption
00510 {
00511
00512 public:
00514 StorageCapacity *minDiskSpace;
00515
00517 StorageCapacity *minMemorySize;
00518
00520 CPUSpeed *minCPUSpeed;
00521
00523 CPUNumber *minCPUNumber;
00524
00526 OtherOptions *otherOptions;
00527
00532 SystemOption();
00537 ~SystemOption();
00538
00543 bool IsEqual(SystemOption *that);
00544
00552 bool setRandom(double density, bool conformant);
00553 };
00554
00555
00567 class ServiceOption
00568 {
00569
00570 public:
00572 std::string type;
00573
00575 OtherOptions *otherOptions;
00576
00581 ServiceOption();
00586 ~ServiceOption();
00587
00592 bool IsEqual(ServiceOption *that);
00593
00601 bool setRandom(double density, bool conformant);
00602 };
00603
00604
00618 class MaxTime
00619 {
00620
00621 public:
00623 std::string unit;
00624
00626 double value;
00627
00628
00633 MaxTime();
00638 ~MaxTime();
00639
00644 bool IsEqual(MaxTime *that);
00645 };
00646
00647
00659 class JobDependencies
00660 {
00661
00662 public:
00664 int numberOfJobIDs;
00665
00667 std::string *jobID;
00668
00673 JobDependencies();
00678 ~JobDependencies();
00679
00684 bool IsEqual(JobDependencies *that);
00685
00693 bool setRandom(double density, bool conformant);
00694
00701 bool setJobID(int numberOfJobIDs, std::string *jobID);
00702
00708 bool addJobID(std::string jobID);
00709 };
00710
00711
00723 class DirectoriesAndFiles
00724 {
00725
00726 public:
00728 int numberOfPaths;
00729
00731 std::string *path;
00732
00737 DirectoriesAndFiles();
00742 ~DirectoriesAndFiles();
00743
00748 bool IsEqual(DirectoriesAndFiles *that);
00749
00757 bool setRandom(double density, bool conformant);
00758
00765 bool setPath(int numberOfPaths, std::string *path);
00771 bool addPath(std::string path);
00772 };
00773
00774
00775
00787 class PathPair
00788 {
00789
00790 public:
00792 std::string from;
00793
00795 std::string to;
00796
00798 bool makeCopy;
00799
00804 PathPair();
00809 ~PathPair();
00810
00815 bool IsEqual(PathPair *that);
00816
00824 bool setRandom(double density, bool conformant);
00825 };
00826
00827
00839 class PathPairs
00840 {
00841
00842 public:
00844 int numberOfPathPairs;
00845
00847 PathPair **pathPair;
00848
00853 PathPairs();
00858 ~PathPairs();
00859
00864 bool IsEqual(PathPairs *that);
00865
00873 bool setRandom(double density, bool conformant);
00874
00881 bool setPathPair(int numberOfPathPairs, PathPair **pathPair);
00882
00891 bool setPathPair(std::string *from, std::string *to, bool *makeCopy, int numberOfPathPairs);
00892
00900 bool addPathPair(std::string fromPath, std::string toPath, bool makeCopy);
00901 };
00902
00903
00915 class Processes
00916 {
00917
00918 public:
00920 int numberOfProcesses;
00921
00923 std::string *process;
00924
00929 Processes();
00934 ~Processes();
00935
00940 bool IsEqual(Processes *that);
00941
00949 bool setRandom(double density, bool conformant);
00950
00957 bool setProcess(int numberOfProcesses, std::string *process);
00958
00964 bool addProcess(std::string process);
00965 };
00966
00967
00979 class JobOption
00980 {
00981
00982 public:
00984 TimeSpan *maxTime;
00985
00987 std::string requestedStartTime;
00988
00990 JobDependencies *dependencies;
00991
00993 DirectoriesAndFiles *requiredDirectories;
00994
00996 DirectoriesAndFiles *requiredFiles;
00997
00999 DirectoriesAndFiles *directoriesToMake;
01000
01002 DirectoriesAndFiles *filesToMake;
01003
01005 PathPairs *inputDirectoriesToMove;
01006
01008 PathPairs *inputFilesToMove;
01009
01011 PathPairs *outputFilesToMove;
01012
01014 PathPairs *outputDirectoriesToMove;
01015
01017 DirectoriesAndFiles *filesToDelete;
01018
01020 DirectoriesAndFiles *directoriesToDelete;
01021
01023 Processes *processesToKill;
01024
01026 OtherOptions *otherOptions;
01027
01032 JobOption();
01037 ~JobOption();
01038
01043 bool IsEqual(JobOption *that);
01044
01052 bool setRandom(double density, bool conformant);
01053 };
01054
01055
01067 class InitVarValue
01068 {
01069
01070 public:
01072 int idx;
01073
01075 std::string name;
01076
01078 double value;
01079
01084 InitVarValue();
01089 ~InitVarValue();
01090
01095 bool IsEqual(InitVarValue *that);
01096
01104 bool setRandom(double density, bool conformant);
01105 };
01106
01107
01119 class InitVariableValues
01120 {
01121
01122 public:
01124 int numberOfVar;
01125
01127 InitVarValue **var;
01128
01133 InitVariableValues();
01138 ~InitVariableValues();
01139
01144 bool IsEqual(InitVariableValues *that);
01145
01153 bool setRandom(double density, bool conformant);
01154
01161 bool setVar(int numberOfVar, InitVarValue **var);
01162
01170 bool setVar(int numberOfVar, InitVarValue **var, ENUM_COMBINE_ARRAYS disp);
01171
01172
01181 bool setVar(int numberOfVar, int *idx, double *value, std::string *name);
01182
01189 bool addVar(int idx, double value);
01190
01199 bool addVar(int numberOfVar, InitVarValue **var);
01200 };
01201
01202
01214 class InitVarValueString
01215 {
01216
01217 public:
01219 int idx;
01220
01222 std::string name;
01223
01225 std::string value;
01226
01231 InitVarValueString();
01236 ~InitVarValueString();
01237
01242 bool IsEqual(InitVarValueString *that);
01243
01251 bool setRandom(double density, bool conformant);
01252 };
01253
01254
01266 class InitVariableValuesString
01267 {
01268
01269 public:
01271 int numberOfVar;
01272
01274 InitVarValueString **var;
01275
01280 InitVariableValuesString();
01285 ~InitVariableValuesString();
01286
01291 bool IsEqual(InitVariableValuesString *that);
01292
01300 bool setRandom(double density, bool conformant);
01301
01308 bool setVar(int numberOfVar, InitVarValueString **var);
01309
01317 bool setVar(int numberOfVar, InitVarValueString **var, ENUM_COMBINE_ARRAYS disp);
01318
01319
01328 bool setVar(int numberOfVar, int *idx, std::string *value, std::string* name);
01329
01336 bool addVar(int idx, std::string value);
01337
01346 bool addVar(int numberOfVar, InitVarValueString **var);
01347 };
01348
01361 class InitBasStatus
01362 {
01363
01364 public:
01366 int idx;
01367
01369 std::string value;
01370
01376 InitBasStatus();
01381 ~InitBasStatus();
01382
01387 bool IsEqual(InitBasStatus *that);
01388
01396 bool setRandom(double density, bool conformant);
01397 };
01398
01399
01413 class InitialBasisStatus
01414 {
01415
01416 public:
01418 int numberOfVar;
01419
01421 InitBasStatus **var;
01422
01427 InitialBasisStatus();
01432 ~InitialBasisStatus();
01433
01438 bool IsEqual(InitialBasisStatus *that);
01439
01447 bool setRandom(double density, bool conformant);
01448
01455 bool setVar(int numberOfVar, InitBasStatus **var);
01456
01463 bool addVar(int idx, std::string value);
01464 };
01465
01477 class BranchingWeight
01478 {
01479
01480 public:
01482 int idx;
01483
01485 std::string name;
01486
01488 double value;
01489
01494 BranchingWeight();
01499 ~BranchingWeight();
01500
01505 bool IsEqual(BranchingWeight *that);
01506
01514 bool setRandom(double density, bool conformant);
01515 };
01516
01517
01518
01530 class IntegerVariableBranchingWeights
01531 {
01532
01533 public:
01535 int numberOfVar;
01536
01538 BranchingWeight **var;
01539
01544 IntegerVariableBranchingWeights();
01549 ~IntegerVariableBranchingWeights();
01550
01555 bool IsEqual(IntegerVariableBranchingWeights *that);
01556
01564 bool setRandom(double density, bool conformant);
01565
01572 bool setVar(int numberOfVar, BranchingWeight **var);
01573
01581 bool setVar(int numberOfVar, BranchingWeight **var, ENUM_COMBINE_ARRAYS disp);
01582
01591 bool setVar(int numberOfVar, int *idx, double *value, std::string* name);
01592
01599 bool addVar(int idx, double value);
01600
01609 bool addVar(int numberOfVar, BranchingWeight **var);
01610 };
01611
01624 class SOSWeights
01625 {
01626
01627 public:
01629 int sosIdx;
01630
01632 double groupWeight;
01633
01635 int numberOfVar;
01636
01638 BranchingWeight **var;
01639
01644 SOSWeights();
01649 ~SOSWeights();
01650
01655 bool IsEqual(SOSWeights *that);
01656
01664 bool setRandom(double density, bool conformant);
01665
01672 bool setVar(int numberOfVar, BranchingWeight **var);
01673
01680 bool addVar(int idx, double value);
01681 };
01682
01683
01695 class SOSVariableBranchingWeights
01696 {
01697
01698 public:
01700 int numberOfSOS;
01701
01703 SOSWeights **sos;
01704
01709 SOSVariableBranchingWeights();
01714 ~SOSVariableBranchingWeights();
01715
01720 bool IsEqual(SOSVariableBranchingWeights *that);
01721
01729 bool setRandom(double density, bool conformant);
01730
01738 bool setSOS(int numberOfSOS, SOSWeights **sos);
01748 bool addSOS(int sosIdx, int nvar, double weight, int* idx, double* value, std::string* name);
01749 };
01750
01762 class OtherVarOption
01763 {
01764
01765 public:
01767 int idx;
01768
01770 std::string name;
01771
01773 std::string value;
01774
01776 std::string lbValue;
01777
01779 std::string ubValue;
01780
01785 OtherVarOption();
01790 ~OtherVarOption();
01791
01796 bool IsEqual(OtherVarOption *that);
01797
01805 bool setRandom(double density, bool conformant);
01806 };
01807
01808
01817 class OtherVariableOption
01818 {
01819
01820 public:
01822 int numberOfVar;
01823
01825 int numberOfEnumerations;
01826
01828 std::string name;
01829
01831 std::string value;
01832
01834 std::string solver;
01835
01837 std::string category;
01838
01840 std::string type;
01841
01843 std::string description;
01844
01846 OtherVarOption **var;
01847
01848
01849
01850
01851
01852 OtherOptionEnumeration** enumeration;
01853
01858 OtherVariableOption();
01863 ~OtherVariableOption();
01864
01869 bool IsEqual(OtherVariableOption *that);
01870
01878 bool setRandom(double density, bool conformant);
01879
01886 bool setVar(int numberOfVar, OtherVarOption **var);
01887
01896 bool addVar(int idx, std::string value, std::string lbValue, std::string ubValue);
01897 };
01898
01899
01911 class VariableOption
01912 {
01913
01914 public:
01916 int numberOfOtherVariableOptions;
01917
01919 InitVariableValues *initialVariableValues;
01920
01922 InitVariableValuesString *initialVariableValuesString;
01923
01925 BasisStatus *initialBasisStatus;
01926
01928 IntegerVariableBranchingWeights *integerVariableBranchingWeights;
01929
01931 SOSVariableBranchingWeights *sosVariableBranchingWeights;
01932
01934 OtherVariableOption **other;
01935
01940 VariableOption();
01945 ~VariableOption();
01946
01951 bool IsEqual(VariableOption *that);
01952
01960 bool setRandom(double density, bool conformant);
01961
01968 bool setOther(int numberOfOptions, OtherVariableOption **other);
01969
01975 bool addOther(OtherVariableOption *other);
01976 };
01977
01978
01990 class InitObjValue
01991 {
01992
01993 public:
01995 int idx;
01996
01998 std::string name;
01999
02001 double value;
02002
02007 InitObjValue();
02012 ~InitObjValue();
02013
02018 bool IsEqual(InitObjValue *that);
02019
02027 bool setRandom(double density, bool conformant);
02028 };
02029
02030
02042 class InitObjectiveValues
02043 {
02044
02045 public:
02047 int numberOfObj;
02048
02050 InitObjValue **obj;
02051
02056 InitObjectiveValues();
02061 ~InitObjectiveValues();
02062
02067 bool IsEqual(InitObjectiveValues *that);
02068
02076 bool setRandom(double density, bool conformant);
02077
02084 bool setObj(int numberOfObj, InitObjValue **obj);
02085
02093 bool setObj(int numberOfObj, InitObjValue **obj, ENUM_COMBINE_ARRAYS disp);
02094
02095
02104 bool setObj(int numberOfObj, int *idx, double *value, std::string *name);
02105
02112 bool addObj(int idx, double value);
02113
02122 bool addObj(int numberOfObj, InitObjValue **obj);
02123 };
02124
02125
02137 class InitObjBound
02138 {
02139
02140 public:
02142 int idx;
02143
02145 std::string name;
02146
02148 double lbValue;
02149
02151 double ubValue;
02152
02157 InitObjBound();
02162 ~InitObjBound();
02163
02168 bool IsEqual(InitObjBound *that);
02169
02177 bool setRandom(double density, bool conformant);
02178 };
02179
02180
02192 class InitObjectiveBounds
02193 {
02194
02195 public:
02197 int numberOfObj;
02198
02200 InitObjBound **obj;
02201
02206 InitObjectiveBounds();
02211 ~InitObjectiveBounds();
02212
02217 bool IsEqual(InitObjectiveBounds *that);
02218
02226 bool setRandom(double density, bool conformant);
02227
02234 bool setObj(int numberOfObj, InitObjBound **obj);
02235
02243 bool setObj(int numberOfObj, InitObjBound **obj, ENUM_COMBINE_ARRAYS disp);
02244
02245
02255 bool setObj(int numberOfObj, int *idx, double *lbValue, double *ubValue, std::string *name);
02256
02264 bool addObj(int idx, double lbValue, double ubValue);
02265
02274 bool addObj(int numberOfObj, InitObjBound **obj);
02275 };
02276
02277
02289 class OtherObjOption
02290 {
02291
02292 public:
02294 int idx;
02295
02297 std::string name;
02298
02300 std::string value;
02301
02302
02304 std::string lbValue;
02305
02307 std::string ubValue;
02312 OtherObjOption();
02317 ~OtherObjOption();
02318
02323 bool IsEqual(OtherObjOption *that);
02324
02332 bool setRandom(double density, bool conformant);
02333 };
02334
02335
02347 class OtherObjectiveOption
02348 {
02349
02350 public:
02352 int numberOfObj;
02353
02355 int numberOfEnumerations;
02356
02358 std::string name;
02359
02361 std::string value;
02362
02364 std::string solver;
02365
02367 std::string category;
02368
02370 std::string type;
02371
02373 std::string description;
02374
02376 OtherObjOption **obj;
02377
02378
02379
02380
02381
02382 OtherOptionEnumeration** enumeration;
02383
02388 OtherObjectiveOption();
02393 ~OtherObjectiveOption();
02394
02399 bool IsEqual(OtherObjectiveOption *that);
02400
02408 bool setRandom(double density, bool conformant);
02409
02416 bool setObj(int numberOfObj, OtherObjOption **obj);
02417
02426 bool addObj(int idx, std::string value, std::string lbValue, std::string ubValue);
02427 };
02428
02429
02441 class ObjectiveOption
02442 {
02443
02444 public:
02446 int numberOfOtherObjectiveOptions;
02447
02449 InitObjectiveValues *initialObjectiveValues;
02450
02452 InitObjectiveBounds *initialObjectiveBounds;
02453
02455 BasisStatus *initialBasisStatus;
02456
02458 OtherObjectiveOption **other;
02459
02464 ObjectiveOption();
02469 ~ObjectiveOption();
02470
02475 bool IsEqual(ObjectiveOption *that);
02476
02484 bool setRandom(double density, bool conformant);
02485
02492 bool setOther(int numberOfOptions, OtherObjectiveOption **other);
02493
02499 bool addOther(OtherObjectiveOption *other);
02500 };
02501
02502
02514 class InitConValue
02515 {
02516
02517 public:
02519 int idx;
02520
02522 std::string name;
02523
02525 double value;
02526
02531 InitConValue();
02536 ~InitConValue();
02537
02542 bool IsEqual(InitConValue *that);
02543
02551 bool setRandom(double density, bool conformant);
02552 };
02553
02554
02566 class InitConstraintValues
02567 {
02568
02569 public:
02571 int numberOfCon;
02572
02574 InitConValue **con;
02575
02580 InitConstraintValues();
02585 ~InitConstraintValues();
02586
02591 bool IsEqual(InitConstraintValues *that);
02592
02600 bool setRandom(double density, bool conformant);
02601
02608 bool setCon(int numberOfCon, InitConValue **con);
02609
02617 bool setCon(int numberOfCon, InitConValue **con, ENUM_COMBINE_ARRAYS disp);
02618
02619
02628 bool setCon(int numberOfCon, int *idx, double *value, std::string *name);
02629
02636 bool addCon(int idx, double value);
02637
02646 bool addCon(int numberOfCon, InitConValue **con);
02647 };
02648
02649
02661 class InitDualVarValue
02662 {
02663
02664 public:
02666 int idx;
02667
02669 std::string name;
02670
02672 double lbDualValue;
02673
02675 double ubDualValue;
02676
02681 InitDualVarValue();
02682
02687 ~InitDualVarValue();
02688
02693 bool IsEqual(InitDualVarValue *that);
02694
02702 bool setRandom(double density, bool conformant);
02703 };
02704
02705
02717 class InitDualVariableValues
02718 {
02719
02720 public:
02722 int numberOfCon;
02723
02725 InitDualVarValue **con;
02726
02731 InitDualVariableValues();
02736 ~InitDualVariableValues();
02737
02742 bool IsEqual(InitDualVariableValues *that);
02743
02751 bool setRandom(double density, bool conformant);
02752
02759 bool setCon(int numberOfCon, InitDualVarValue **con);
02760
02768 bool setCon(int numberOfCon, InitDualVarValue **con, ENUM_COMBINE_ARRAYS disp);
02769
02770
02780 bool setCon(int numberOfCon, int *idx, double *lbValue, double *ubValue, std::string *name);
02781
02789 bool addCon(int idx, double lbDualValue, double ubDualValue);
02790
02799 bool addCon(int numberOfCon, InitDualVarValue **con);
02800 };
02801
02802
02814 class OtherConOption
02815 {
02816
02817 public:
02819 int idx;
02820
02822 std::string name;
02823
02825 std::string value;
02826
02828 std::string lbValue;
02829
02831 std::string ubValue;
02832
02837 OtherConOption();
02842 ~OtherConOption();
02843
02848 bool IsEqual(OtherConOption *that);
02849
02857 bool setRandom(double density, bool conformant);
02858 };
02859
02860
02872 class OtherConstraintOption
02873 {
02874
02875 public:
02877 int numberOfCon;
02878
02880 int numberOfEnumerations;
02881
02883 std::string name;
02884
02886 std::string value;
02887
02889 std::string solver;
02890
02892 std::string category;
02893
02895 std::string type;
02896
02898 std::string description;
02899
02901 OtherConOption **con;
02902
02903
02904
02905
02906
02907 OtherOptionEnumeration** enumeration;
02908
02913 OtherConstraintOption();
02918 ~OtherConstraintOption();
02919
02924 bool IsEqual(OtherConstraintOption *that);
02925
02933 bool setRandom(double density, bool conformant);
02934
02941 bool setCon(int numberOfCon, OtherConOption **con);
02942
02951 bool addCon(int idx, std::string value, std::string lbValue, std::string ubValue);
02952 };
02953
02954
02966 class ConstraintOption
02967 {
02968
02969 public:
02971 int numberOfOtherConstraintOptions;
02972
02974 InitConstraintValues *initialConstraintValues;
02975
02977 InitDualVariableValues *initialDualValues;
02978
02980 BasisStatus *initialBasisStatus;
02981
02983 OtherConstraintOption **other;
02984
02989 ConstraintOption();
02994 ~ConstraintOption();
02995
03000 bool IsEqual(ConstraintOption *that);
03001
03009 bool setRandom(double density, bool conformant);
03010
03017 bool setOther(int numberOfOptions, OtherConstraintOption **other);
03018
03024 bool addOther(OtherConstraintOption *other);
03025 };
03026
03027
03039 class SolverOption
03040 {
03041
03042 public:
03044 std::string name;
03045
03047 std::string value;
03048
03050 std::string solver;
03051
03053 std::string category;
03054
03056 std::string type;
03057
03059 std::string description;
03060
03062 int numberOfItems;
03063
03065 std::string* item;
03066
03071 SolverOption();
03076 ~SolverOption();
03077
03082 bool IsEqual(SolverOption *that);
03083
03091 bool setRandom(double density, bool conformant);
03092 };
03093
03094
03106 class SolverOptions
03107 {
03108
03109 public:
03111 int numberOfSolverOptions;
03112
03114 SolverOption **solverOption;
03115
03120 SolverOptions();
03125 ~SolverOptions();
03126
03131 bool IsEqual(SolverOptions *that);
03132
03140 bool setRandom(double density, bool conformant);
03141
03148 bool setSolverOptions(int numberOfOptions, SolverOption **solverOption);
03149
03160 bool addSolverOption(std::string name, std::string value, std::string solver,
03161 std::string category, std::string type, std::string description);
03162 };
03163
03164
03176 class OptimizationOption
03177 {
03178
03179 public:
03181 int numberOfVariables;
03182
03184 int numberOfObjectives;
03185
03187 int numberOfConstraints;
03188
03190 VariableOption *variables;
03191
03193 ObjectiveOption *objectives;
03194
03196 ConstraintOption *constraints;
03197
03199 SolverOptions *solverOptions;
03204 OptimizationOption();
03209 ~OptimizationOption();
03210
03215 bool IsEqual(OptimizationOption *that);
03216
03224 bool setRandom(double density, bool conformant);
03225 };
03226
03227
03238 class OSOption
03239 {
03240
03241 public:
03242
03250 GeneralFileHeader *optionHeader;
03254 GeneralOption *general;
03258 SystemOption *system;
03262 ServiceOption *service;
03266 JobOption *job;
03270 OptimizationOption *optimization;
03271
03276 OSOption();
03281 ~OSOption();
03282
03292 bool setOptionHeader(std::string name, std::string source,
03293 std::string fileCreator, std::string description, std::string licence);
03294
03295 private:
03299 double* m_mdInitVarValuesDense;
03300
03304 std::string* m_mdInitVarValuesStringDense;
03305
03309 int* m_mdInitBasisStatusDense;
03310
03314 double* m_mdIntegerVariableBranchingWeightsDense;
03315
03319 double* m_mdInitObjValuesDense;
03320
03324 double* m_mdInitObjLowerBoundsDense;
03325
03329 double* m_mdInitObjUpperBoundsDense;
03330
03334 double* m_mdInitConValuesDense;
03335
03340 double* m_mdInitDualVarLowerBoundsDense;
03341
03346 double* m_mdInitDualVarUpperBoundsDense;
03347
03348 public:
03353 bool IsEqual(OSOption *that);
03354
03362 bool setRandom(double density, bool conformant);
03363
03364 public:
03365
03366
03367
03371 std::string getFileName();
03372
03376 std::string getFileSource();
03377
03381 std::string getFileDescription();
03382
03386 std::string getFileCreator();
03387
03391 std::string getFileLicence();
03392
03396 std::string getServiceURI();
03397
03401 std::string getServiceName();
03402
03406 std::string getInstanceName();
03407
03411 std::string getInstanceLocation();
03412
03416 std::string getInstanceLocationType();
03417
03421 std::string getJobID();
03422
03426 std::string getSolverToInvoke();
03427
03431 std::string getLicense();
03432
03436 std::string getUserName();
03437
03441 std::string getPassword();
03442
03446 std::string getContact();
03447
03451 std::string getContactTransportType();
03452
03456 std::string getMinDiskSpaceUnit();
03457
03461 std::string getMinDiskSpaceDescription();
03462
03466 std::string getMinMemoryUnit();
03467
03471 std::string getMinMemoryDescription();
03472
03476 std::string getMinCPUSpeedUnit();
03477
03481 std::string getMinCPUSpeedDescription();
03482
03486 std::string getMinCPUNumberDescription();
03487
03491 std::string getServiceType();
03492
03496 std::string getMaxTimeUnit();
03497
03501 std::string getRequestedStartTime();
03502
03506 std::string getOptionStr(std::string optionName);
03507
03511 double getMinDiskSpace();
03512
03516 double getMinMemorySize();
03517
03521 double getMinCPUSpeed();
03522
03526 double getMaxTime();
03527
03531 double getOptionDbl(std::string optionName);
03532
03536 int getMinCPUNumber();
03537
03541 int getNumberOfOtherGeneralOptions();
03542
03546 int getNumberOfOtherSystemOptions();
03547
03551 int getNumberOfOtherServiceOptions();
03552
03556 int getNumberOfOtherJobOptions();
03557
03561 int getNumberOfJobDependencies();
03562
03566 int getNumberOfRequiredDirectories();
03567
03571 int getNumberOfRequiredFiles();
03572
03576 int getNumberOfDirectoriesToMake();
03577
03581 int getNumberOfFilesToMake();
03582
03586 int getNumberOfInputDirectoriesToMove();
03587
03591 int getNumberOfInputFilesToMove();
03592
03596 int getNumberOfOutputDirectoriesToMove();
03597
03601 int getNumberOfOutputFilesToMove();
03602
03606 int getNumberOfFilesToDelete();
03607
03611 int getNumberOfDirectoriesToDelete();
03612
03616 int getNumberOfProcessesToKill();
03617
03621 int getNumberOfVariables();
03622
03626 int getNumberOfObjectives();
03627
03631 int getNumberOfConstraints();
03632
03638 int getNumberOfInitVarValues();
03639
03645 int getNumberOfInitVarValuesString();
03646
03652 int getNumberOfIntegerVariableBranchingWeights();
03653
03659 int getNumberOfSOS();
03660
03666 int getNumberOfSOSVarBranchingWeights(int iSOS);
03667
03673 int getNumberOfOtherVariableOptions();
03674
03680 int getNumberOfInitObjValues();
03681
03687 int getNumberOfInitObjBounds();
03688
03694 int getNumberOfOtherObjectiveOptions();
03695
03701 int getNumberOfInitConValues();
03702
03708 int getNumberOfInitDualVarValues();
03709
03715 int getNumberOfOtherConstraintOptions();
03716
03722 int getNumberOfSolverOptions();
03723
03727 int getOptionInt(std::string optionName);
03728
03729
03737 OtherOption** getOtherGeneralOptions();
03738
03746 OtherOption** getOtherSystemOptions();
03747
03755 OtherOption** getOtherServiceOptions();
03756
03764 OtherOption** getOtherJobOptions();
03765
03773 OtherOption** getOtherOptions(std::string elementName);
03774
03782 OtherOption** getAllOtherOptions();
03783
03790 std::string* getJobDependencies();
03791
03799 std::string* getRequiredDirectories();
03800
03808 std::string* getRequiredFiles();
03809
03817 std::string* getDirectoriesToMake();
03818
03826 std::string* getFilesToMake();
03827
03835 PathPair** getInputDirectoriesToMove();
03836
03844 PathPair** getInputFilesToMove();
03845
03853 PathPair** getOutputDirectoriesToMove();
03854
03862 PathPair** getOutputFilesToMove();
03863
03871 std::string* getDirectoriesToDelete();
03872
03880 std::string* getFilesToDelete();
03881
03889 std::string* getProcessesToKill();
03890
03898 InitVarValue** getInitVarValuesSparse();
03899
03907 double* getInitVarValuesDense();
03908
03917 double* getInitVarValuesDense(int numberOfVariables);
03918
03926 InitVarValueString** getInitVarValuesStringSparse();
03927
03935 std::string *getInitVarValuesStringDense();
03936
03945 std::string *getInitVarValuesStringDense(int numberOfVariables);
03946
03954 InitBasStatus** getInitBasisStatusSparse();
03955
03963 std::string *getInitBasisStatusDense();
03964
03973 int* getVariableInitialBasisStatusDense(int numberOfVariables);
03974
03985 int getNumberOfInitialBasisElements(int type, int status);
03986
03998 bool getInitialBasisElements(int type, int status, int* elem);
03999
04007 BranchingWeight** getIntegerVariableBranchingWeightsSparse();
04008
04016 double* getIntegerVariableBranchingWeightsDense();
04017
04026 double* getIntegerVariableBranchingWeightsDense(int numberOfVariables);
04027
04035 SOSWeights** getSOSVariableBranchingWeightsSparse();
04036
04045 std::vector<OtherVariableOption*> getOtherVariableOptions(std::string solver_name);
04046
04054 OtherVariableOption* getOtherVariableOption(int optionNumber);
04055
04062 OtherVariableOption** getAllOtherVariableOptions();
04063
04071 InitObjValue** getInitObjValuesSparse();
04072
04080 double *getInitObjValuesDense();
04081
04090 double *getInitObjValuesDense(int numberOfObjectives);
04091
04099 InitObjBound** getInitObjBoundsSparse();
04100
04108 double *getInitObjLowerBoundsDense();
04109
04118 double *getInitObjLowerBoundsDense(int numberOfObjectives);
04119
04127 double *getInitObjUpperBoundsDense();
04128
04137 double *getInitObjUpperBoundsDense(int numberOfObjectives);
04138
04147 int* getObjectiveInitialBasisStatusDense(int numberOfObjectives);
04148
04156 std::vector<OtherObjectiveOption*> getOtherObjectiveOptions(std::string solver_name);
04157
04165 OtherObjectiveOption* getOtherObjectiveOption(int optionNumber);
04166
04173 OtherObjectiveOption** getAllOtherObjectiveOptions();
04174
04182 InitConValue** getInitConValuesSparse();
04183
04191 double *getInitConValuesDense();
04192
04201 double *getInitConValuesDense(int numberOfConstraints);
04202
04210 InitDualVarValue** getInitDualVarValuesSparse();
04211
04219 double *getInitDualVarLowerBoundsDense();
04220
04229 double *getInitDualVarLowerBoundsDense(int numberOfConstraints);
04230
04231
04239 double *getInitDualVarUpperBoundsDense();
04240
04249 double *getInitDualVarUpperBoundsDense(int numberOfConstraints);
04250
04259 int* getSlackVariableInitialBasisStatusDense(int numberOfConstraints);
04260
04268 std::vector<OtherConstraintOption*> getOtherConstraintOptions(std::string solver_name);
04269
04277 OtherConstraintOption* getOtherConstraintOption(int optionNumber);
04278
04285 OtherConstraintOption** getAllOtherConstraintOptions();
04286
04295 std::vector<SolverOption*> getSolverOptions( std::string solver_name);
04296
04297
04309 std::vector<SolverOption*> getSolverOptions( std::string solver_name, bool getFreeOptions);
04310
04317 SolverOption** getAllSolverOptions();
04318
04319
04320
04321
04322
04326 bool setServiceURI( std::string serviceURI);
04327
04331 bool setServiceName( std::string serviceName);
04332
04336 bool setInstanceName( std::string instanceName);
04337
04341 bool setInstanceLocation( std::string instanceLocation);
04342
04347 bool setInstanceLocation( std::string instanceLocation, std::string locationType);
04348
04352 bool setInstanceLocationType( std::string locationType);
04353
04357 bool setJobID( std::string jobID);
04358
04362 bool setSolverToInvoke( std::string solverToInvoke);
04363
04367 bool setLicense( std::string license);
04368
04372 bool setUserName( std::string userName);
04373
04377 bool setPassword( std::string password);
04378
04382 bool setContact( std::string contact);
04383
04388 bool setContact( std::string contact, std::string transportType);
04389
04393 bool setContactTransportType( std::string transportType);
04394
04400 bool setOtherGeneralOptions(int numberOfOptions, OtherOption** other);
04401
04408 bool setAnOtherGeneralOption(std::string name, std::string value, std::string description);
04409
04416 bool setMinDiskSpace(std::string unit, std::string description, double value);
04417
04421 bool setMinDiskSpace(double value);
04422
04423 bool setMinDiskSpaceUnit(std::string unit);
04424
04431 bool setMinMemorySize(std::string unit, std::string description, double value);
04432
04436 bool setMinMemorySize(double value);
04437
04438 bool setMinMemoryUnit(std::string unit);
04439
04446 bool setMinCPUSpeed(std::string unit, std::string description, double value);
04447
04451 bool setMinCPUSpeed(double value);
04452
04453 bool setMinCPUSpeedUnit(std::string unit);
04454
04460 bool setMinCPUNumber( int number, std::string description);
04461
04465 bool setMinCPUNumber( int number);
04466
04467 bool setOtherSystemOptions(int numberOfOptions, OtherOption** other);
04468
04469 bool setAnOtherSystemOption(std::string name, std::string value, std::string description);
04470
04471
04472 bool setServiceType( std::string serviceType);
04473
04474 bool setOtherServiceOptions(int numberOfOptions, OtherOption** other);
04475
04476 bool setAnOtherServiceOption(std::string name, std::string value, std::string description);
04477
04478
04479 bool setMaxTime(double value, std::string unit);
04480
04481 bool setMaxTime(double value);
04482
04483 bool setMaxTimeUnit(std::string unit);
04484
04485 bool setRequestedStartTime(std::string time);
04486
04487 bool setJobDependencies(int numberOfDependencies, std::string* jobDependencies);
04488 bool setAnotherJobDependency(std::string jobID);
04489
04490 bool setRequiredDirectories(int numberOfPaths, std::string* paths);
04491 bool setAnotherRequiredDirectory(std::string path);
04492
04493 bool setRequiredFiles(int numberOfPaths, std::string* paths);
04494 bool setAnotherRequiredFile(std::string path);
04495
04496 bool setDirectoriesToMake(int numberOfPaths, std::string* paths);
04497 bool setAnotherDirectoryToMake(std::string path);
04498
04499 bool setFilesToMake(int numberOfPaths, std::string* paths);
04500 bool setAnotherFileToMake(std::string path);
04501
04519 bool setPathPairs(int object, std::string *from, std::string *to, bool *makeCopy, int numberOfPathPairs);
04520
04521 bool setInputDirectoriesToMove(int numberOfPathPairs, PathPair** pathPair);
04522 bool setAnotherInputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy);
04523
04524 bool setInputFilesToMove(int numberOfPathPairs, PathPair** pathPair);
04525 bool setAnotherInputFileToMove(std::string fromPath, std::string toPath, bool makeCopy);
04526
04527 bool setOutputFilesToMove(int numberOfPathPairs, PathPair** pathPair);
04528 bool setAnotherOutputFileToMove(std::string fromPath, std::string toPath, bool makeCopy);
04529
04530 bool setOutputDirectoriesToMove(int numberOfPathPairs, PathPair** pathPair);
04531 bool setAnotherOutputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy);
04532
04533 bool setFilesToDelete(int numberOfPaths, std::string* paths);
04534 bool setAnotherFileToDelete(std::string path);
04535
04536 bool setDirectoriesToDelete(int numberOfPaths, std::string* paths);
04537 bool setAnotherDirectoryToDelete(std::string path);
04538
04539 bool setProcessesToKill(int numberOfProcesses, std::string* processes);
04540 bool setAnotherProcessToKill(std::string process);
04541
04542 bool setOtherJobOptions(int numberOfOptions, OtherOption** other);
04543 bool setAnOtherJobOption(std::string name, std::string value, std::string description);
04544
04545
04546 bool setNumberOfVariables(int numberOfVariables);
04547
04548 bool setNumberOfObjectives(int numberOfObjectives);
04549
04550 bool setNumberOfConstraints(int numberOfConstraints);
04551
04552 bool setInitVarValues(int numberOfVar, int* idx, double* value, std::string* name);
04553 bool setInitVarValuesSparse(int numberOfVar, InitVarValue** var);
04554 bool setInitVarValuesSparse(int numberOfVar, InitVarValue** var, ENUM_COMBINE_ARRAYS disp);
04555 bool setInitVarValuesDense(int numberOfVar, double *value);
04556 bool setAnotherInitVarValue(int idx, double value);
04557
04558 bool setInitVarValuesString(int numberOfVar, int* idx, std::string* value, std::string* name);
04559 bool setInitVarValuesStringSparse(int numberOfVar, InitVarValueString** var);
04560 bool setInitVarValuesStringSparse(int numberOfVar, InitVarValueString** var, ENUM_COMBINE_ARRAYS disp);
04561 bool setInitVarValuesStringDense(int numberOfVar, std::string *value);
04562 bool setAnotherInitVarValueString(int idx, std::string value);
04563
04564 bool setInitBasisStatus(int object, int status, int *i, int ni);
04565 bool setInitBasisStatusSparse(int numberOfVar, InitBasStatus** var);
04566 bool setInitBasisStatusSparse(int numberOfVar, InitBasStatus** var, ENUM_COMBINE_ARRAYS disp);
04567 bool setInitBasisStatusDense(int numberOfVar, std::string *var);
04568
04577 bool setAnotherInitBasisStatus(int type, int idx, int status);
04578
04579 bool setIntegerVariableBranchingWeights(int numberOfVar, int* idx, double* value, std::string* name);
04580 bool setIntegerVariableBranchingWeightsSparse(int numberOfVar, BranchingWeight** var);
04581 bool setIntegerVariableBranchingWeightsSparse(int numberOfVar, BranchingWeight** var, ENUM_COMBINE_ARRAYS disp);
04582 bool setIntegerVariableBranchingWeightsDense(int numberOfVar, double *value);
04583 bool setAnotherIntegerVariableBranchingWeight(int idx, double value);
04584
04585 bool setSOSVariableBranchingWeights(int numberOfSOS, SOSWeights** sos);
04586 bool setAnotherSOSVariableBranchingWeight(int sosIdx, int nvar, double weight, int* idx, double* value, std::string* name);
04587
04588 bool setNumberOfOtherVariableOptions(int numberOfOther);
04589 bool setOtherVariableOptions(int numberOfVar, OtherVariableOption** var);
04590 bool setAnOtherVariableOption(OtherVariableOption* varOption);
04591
04605 bool setOtherVariableOptionAttributes(int iOther, int numberOfVar,
04606 int numberOfEnumerations, std::string name,
04607 std::string value, std::string solver,
04608 std::string category, std::string type,
04609 std::string description);
04610
04611
04624 bool setOtherOptionEnumeration(int object, int otherOptionNumber, int enumerationNumber,
04625 int numberOfEl, std::string value, std::string description, int* idxArray);
04626
04637 bool setOtherVariableOptionVar(int otherOptionNumber, int varNumber,
04638 int idx, std::string name, std::string value, std::string lbValue, std::string ubValue);
04639
04640 bool setInitObjValues(int numberOfObj, int* idx, double* value, std::string* name);
04641 bool setInitObjValuesSparse(int numberOfObj, InitObjValue** obj);
04642 bool setInitObjValuesSparse(int numberOfObj, InitObjValue** obj, ENUM_COMBINE_ARRAYS disp);
04643 bool setInitObjValuesDense(int numberOfObj, double *value);
04644 bool setAnotherInitObjValue(int idx, double value);
04645
04646 bool setInitObjBounds(int numberOfObj, int* idx, double* lbValue, double* ubValue, std::string* name);
04647 bool setInitObjBoundsSparse(int numberOfObj, InitObjBound** obj);
04648 bool setInitObjBoundsSparse(int numberOfObj, InitObjBound** obj, ENUM_COMBINE_ARRAYS disp);
04649 bool setInitObjBoundsDense(int numberOfObj, double *lb, double *ub);
04650 bool setAnotherInitObjBound(int idx, double lbValue, double ubValue);
04651
04652 bool setNumberOfOtherObjectiveOptions(int numberOfOther);
04653 bool setOtherObjectiveOptions(int numberOfObj, OtherObjectiveOption** obj);
04654
04655 bool setAnOtherObjectiveOption(OtherObjectiveOption* objOption);
04656
04670 bool setOtherObjectiveOptionAttributes(int iOther, int numberOfObj,
04671 int numberOfEnumerations, std::string name,
04672 std::string value, std::string solver,
04673 std::string category, std::string type,
04674 std::string description);
04675
04676
04688 bool setOtherObjectiveOptionObj(int otherOptionNumber, int objNumber,
04689 int idx, std::string name, std::string value, std::string lbValue, std::string ubValue);
04690
04691 bool setInitConValues(int numberOfCon, int* idx, double* value, std::string* name);
04692 bool setInitConValuesSparse(int numberOfCon, InitConValue** con);
04693 bool setInitConValuesSparse(int numberOfCon, InitConValue** con, ENUM_COMBINE_ARRAYS disp);
04694 bool setInitConValuesDense(int numberOfCon, double *value);
04695 bool setAnotherInitConValue(int idx, double value);
04696
04697 bool setInitDualValues(int numberOfCon, int* idx, double* lbValue, double* ubValue, std::string* name);
04698 bool setInitDualVarValuesSparse(int numberOfCon, InitDualVarValue** con);
04699 bool setInitDualVarValuesSparse(int numberOfCon, InitDualVarValue** con, ENUM_COMBINE_ARRAYS disp);
04700 bool setInitDualVarValuesDense(int numberOfCon, double *lb, double *ub);
04701 bool setAnotherInitDualVarValue(int idx, double lbValue, double ubValue);
04702
04703 bool setNumberOfOtherConstraintOptions(int numberOfOther);
04704 bool setOtherConstraintOptions(int numberOfOptions, OtherConstraintOption** other);
04705
04706 bool setAnOtherConstraintOption(OtherConstraintOption* optionValue);
04707
04721 bool setOtherConstraintOptionAttributes(int iOther, int numberOfCon,
04722 int numberOfEnumerations, std::string name,
04723 std::string value, std::string solver,
04724 std::string category, std::string type,
04725 std::string description);
04726
04727
04739 bool setOtherConstraintOptionCon(int otherOptionNumber, int conNumber,
04740 int idx, std::string name, std::string value, std::string lbValue, std::string ubValue);
04741
04742 bool setNumberOfSolverOptions(int numberOfOptions);
04743
04757 bool setSolverOptionContent(int iOption, int numberOfItems,
04758 std::string name,
04759 std::string value, std::string solver,
04760 std::string category, std::string type,
04761 std::string description, std::string *itemList);
04762
04763 bool setSolverOptions(int numberOfSolverOptions, SolverOption** solverOption);
04764 bool setAnotherSolverOption(std::string name, std::string value, std::string solver,
04765 std::string category, std::string type, std::string description);
04766
04767
04768 bool setOptionInt(std::string optionName, int optionValue);
04769
04770 bool setOptionStr(std::string optionName, std::string optionValue);
04771
04772 bool setOptionDbl(std::string optionName, double value);
04773
04774 };
04775
04776 #endif