/home/coin/SVN-release/OS-2.1.0/OS/v2.0/OSResult.h

Go to the documentation of this file.
00001 
00017 #ifndef OSRESULT_H
00018 #define OSRESULT_H
00019 //#define DEBUG
00020 #include <string>
00021 #include <vector> 
00022 
00023 
00035 class GeneralSubstatus {
00036 
00037 public:
00038  
00040         std::string name;
00041 
00043         std::string description;
00044         
00049         GeneralSubstatus();
00054         ~GeneralSubstatus();
00055                 
00056 };//GeneralSubstatus
00057 
00058 
00070 class GeneralStatus {
00071 
00072 public:
00073  
00075         int numberOfSubstatuses;
00076 
00078         std::string type;
00079         
00081         std::string description;
00082         
00084         std::vector<GeneralSubstatus*> substatus;
00085 
00090         GeneralStatus();
00095         ~GeneralStatus();
00096                 
00097 };//GeneralStatus
00098 
00099 
00111 class GeneralResult{
00112 public:
00113 
00115         GeneralStatus *generalStatus;
00116         
00120         std::string serviceURI;
00121         
00125         std::string serviceName;
00126         
00128         std::string instanceName;
00129         
00133         std::string jobID;
00134         
00138         std::string time;
00139         
00141         std::string message;
00142         
00147         GeneralResult();
00152         ~GeneralResult();
00153 };//class GeneralResult
00154 
00155 
00167 class SystemResult{
00168 public:
00169         
00174         SystemResult();
00179         ~SystemResult();
00180 };//class SystemResult
00181 
00182 
00194 class ServiceResult{
00195 public:
00196         
00201         ServiceResult();
00206         ~ServiceResult();
00207 };//class ServiceResult
00208 
00209 
00221 class Time{
00222 public:
00223 
00228         std::string type;
00229 
00234         std::string category;
00235 
00240         std::string unit;
00241 
00246         std::string description;
00247 
00252         double value;
00253 
00258         Time();
00263         ~Time();
00264 };//class Time
00265 
00266 
00278 class TimingInformation{
00279 public:
00280 
00285         Time** time;
00286 
00291         int numberOfTimes;
00292 
00297         TimingInformation();
00302         ~TimingInformation();
00303 };//class TimingInformation
00304 
00305 
00317 class JobResult{
00318 public:
00319         
00320         TimingInformation* timingInformation;
00325         JobResult();
00330         ~JobResult();
00331 };//class JobResult
00332 
00333 
00334 
00335 
00347 class OptimizationSolutionSubstatus {
00348 public:
00349         
00351         std::string namee;
00352         
00354         std::string description;
00355         
00356         
00360         OptimizationSolutionSubstatus();
00365         ~OptimizationSolutionSubstatus();
00366                 
00367 };//OptimizationSolutionSubstatus
00368 
00369 
00381 class OptimizationSolutionStatus {
00382 public:
00383         
00385         int numberOfSubstatuses;
00386 
00388         std::string type;
00389         
00391         std::string description;
00392         
00394         std::vector<OptimizationSolutionSubstatus*> substatus;
00395 
00399         OptimizationSolutionStatus();
00404         ~OptimizationSolutionStatus();
00405                 
00406 };//OptimizationSolutionStatus
00407 
00408 
00420 class VarValue{
00421 public:
00422 
00424         int idx;
00425         
00426         /* value is the value of the variable indexed by idx
00427          * in the solution
00428          */     
00429         double value;
00430 
00435         VarValue();
00440         ~VarValue();
00441 
00442 };// class VarValue
00443 
00444 
00455 class VariableValues{
00456 public:
00457 
00460         int numberOfVar;
00461 
00465         std::vector<VarValue*> var;
00466 
00467         
00472         VariableValues();
00473         
00478         ~VariableValues();
00479 
00480 };// class VariableValues
00481 
00482 
00494 class VarStringValue{
00495 public:
00496 
00498         int idx;
00499         
00500         /* value is the value of the variable indexed by idx
00501          * in the solution
00502          */     
00503         std::string value;
00504 
00509         VarStringValue();
00510 
00515         ~VarStringValue();
00516 
00517 };// class VarStringValue
00518 
00519 
00530 class VariableStringValues{
00531 public:
00532 
00535         int numberOfVar;
00536 
00540         std::vector<VarStringValue*> var;
00541 
00542         
00547         VariableStringValues();
00548         
00553         ~VariableStringValues();
00554 
00555 };// class VariableStringValues
00556 
00557 
00568 class OtherVarResult {
00569 public:
00570         
00572         int idx;
00573         
00580         std::string value;
00581         
00586         OtherVarResult();
00591         ~OtherVarResult();
00592         
00593 };//OtherVarResult
00594 
00595 
00596 
00608 class OtherVariableResult {
00609 public:
00610 
00614         int numberOfVar;
00615 
00619         std::string value;
00620 
00622         std::string name;
00623         
00625         std::string description;
00626         
00627         /* a pointer to OtherVarResult objects that will
00628          * give for each variable the index and value for 
00629          * this user defined variable result
00630          */
00631         std::vector<OtherVarResult*> var;
00632 
00637         OtherVariableResult();
00638         
00643         ~OtherVariableResult();
00644         
00645 };//OtherVariableResult
00646 
00647 
00659 class VariableSolution{
00660 public:
00661 
00665         int numberOfOtherVariableResults;
00666 
00668         VariableValues *values;
00669         
00671         VariableStringValues *valuesString;
00672         
00673 
00677         OtherVariableResult** other;
00678 
00683         VariableSolution();
00684         
00689         ~VariableSolution();
00690 
00691 };// class VariableSolution
00692 
00693 
00705 class ObjValue {
00706 public: 
00707 
00709         int idx;
00710         
00712         double value;
00713         
00718         ObjValue();
00719 
00724         ~ObjValue();
00725 };//ObjValue
00726 
00737 class ObjectiveValues {
00738 public:
00739 
00742         int numberOfObj;
00743 
00748         std::vector<ObjValue*> obj;
00749         
00754         ObjectiveValues();
00755         
00760         ~ObjectiveValues();
00761         
00762 };//ObjectiveValues
00763 
00764 
00776 class OtherObjResult {
00777 public:
00778         
00780         int idx;
00781         
00782         
00786         std::string value;
00787         
00792         OtherObjResult();
00793 
00798         ~OtherObjResult();
00799         
00800 };//OtherObjResult
00801 
00802 
00803 
00804 
00816 class OtherObjectiveResult {
00817 public:
00818 
00822         int numberOfObj;
00823 
00827         std::string value;
00828 
00829 
00831         std::string name;
00832         
00834         std::string description;
00835 
00836         /* a pointer to OtherObjResult objects that will
00837          * give for each objective function the index and 
00838          * value for this user defined objective function result
00839          */     
00840         std::vector<OtherObjResult*> obj;
00841         
00846         OtherObjectiveResult();
00847         
00852         ~OtherObjectiveResult();
00853         
00854 };//OtherObjectiveResult
00855 
00856 
00857 
00869 class ObjectiveSolution {
00870 public:
00871 
00875         int numberOfOtherObjectiveResults;
00876         
00878         ObjectiveValues *values;
00879 
00883         OtherObjectiveResult** other; 
00884 
00889         ObjectiveSolution();
00890         
00895         ~ObjectiveSolution();
00896 
00897 };//ObjectiveSolution
00898 
00899 
00900 
00911 class DualVarValue {
00912 public: 
00913 
00915         int idx;
00916 
00921         double lbValue;
00922         
00923         
00928         double ubValue;
00929         
00933         double value;
00934         
00939         DualVarValue();
00940 
00945         ~DualVarValue();
00946         
00947 };//DualVarValue
00948 
00949 
00950 
00961 class DualVariableValues {
00962 public:
00963 
00966         int numberOfCon;
00967 
00972         std::vector<DualVarValue*> con;
00973         
00978         DualVariableValues();
00979         
00984         ~DualVariableValues();
00985         
00986 };//DualVariableValues
00987 
00988 
01000 class OtherConResult {
01001 public:
01002         
01004         int idx;
01005         
01011         std::string value;
01012         
01017         OtherConResult();
01018 
01023         ~OtherConResult();
01024         
01025 };//OtherConResult
01026 
01027 
01028 
01029 
01030 
01042 class OtherConstraintResult {
01043 public:
01044 
01048         int numberOfCon;
01049 
01053         std::string value;
01054 
01056         std::string name;
01057         
01059         std::string description;
01060         
01061         
01062         /* a vector of OtherConResult objects that will
01063          * give for each constraint the index and 
01064          * value for this user defined objective function result
01065          */     
01066         std::vector<OtherConResult*> con;
01067 
01072         OtherConstraintResult();
01073         
01078         ~OtherConstraintResult();
01079         
01080 };//OtherConstraintResult
01081 
01082         
01083 
01084 
01096 class ConstraintSolution {
01097 
01098 public:
01099 
01103         int numberOfOtherConstraintResults;
01104         
01106         DualVariableValues *dualValues;
01107         
01111         OtherConstraintResult** other;
01112         
01117         ConstraintSolution();
01118         
01123         ~ConstraintSolution();
01124         
01125 };//ConstraintSolution
01126 
01127 
01128 
01129 
01141 class OtherOptimizationResult {
01142 public:
01143 
01145         std::string name;
01146         
01148         std::string description;
01149 
01153         std::string value;
01154 
01159         OtherOptimizationResult();
01160         
01165         ~OtherOptimizationResult();
01166         
01167 };//OtherOptimizationResult
01168 
01169         
01170 
01171 
01183 class OptimizationSolution{
01184 public:
01185 
01189         int targetObjectiveIdx;
01190 
01192         int numberOfOtherResults;
01193 
01197         OptimizationSolutionStatus *status;
01198         
01200         std::string message;
01201         
01205         VariableSolution *variables;
01206         
01210         ObjectiveSolution *objectives;
01211         
01215         ConstraintSolution *constraints;
01216         
01220         std::vector<OtherOptimizationResult*> other;
01221 
01226         OptimizationSolution();
01227 
01232         ~OptimizationSolution();
01233 
01234 };// class OptimizationSolution
01235 
01236 
01248 class OptimizationResult{
01249 public:
01250         
01254         int numberOfVariables;
01255         
01259         int numberOfObjectives;
01260 
01264     int numberOfConstraints;
01265 
01269         int numberOfSolutions;
01270 
01274         OptimizationSolution **solution;
01275         
01280         OptimizationResult();
01281 
01286         ~OptimizationResult();
01287 
01288 };// class OptimizationResult
01289 
01290 
01291 
01302 class OSResult{
01303 
01304 public:
01305 
01309         GeneralResult *general;
01310 
01314         SystemResult *system;
01315 
01319         ServiceResult *service;
01320 
01324         JobResult *job;
01325 
01329         OptimizationResult *optimization;
01330 
01335         OSResult(); 
01336 
01341         ~OSResult();
01342 public: 
01343         
01347         int m_iVariableNumber;
01348         
01352         int m_iObjectiveNumber;
01353         
01357         int m_iConstraintNumber;
01358         
01362         int m_iNumberOfOtherVariableResults;
01363         
01367         double *m_mdPrimalValues;
01368         
01372         double *m_mdDualValues;
01373         
01374         
01375 
01376 
01377 public:
01378 
01384         GeneralStatus* getGeneralStatus();
01385         
01392         std::string getGeneralStatusType();
01393         
01399         std::string getGeneralStatusDescription();
01400 
01406         std::string getServiceName();
01407         
01413         std::string getServiceURI();
01414         
01420         std::string getInstanceName();
01421         
01427         std::string getJobID();
01428         
01434         std::string getGeneralMessage();
01435 
01441         int getTimeNumber();
01442 
01449         double getTimeValue();
01450 
01457         double* getOptimalPrimalVariableValues(int objIdx);
01458 
01465         double* getOptimalDualVariableValues(int objIdx);
01466         
01467         //Solution getSolution(int solIdx);
01468 
01477         OptimizationSolutionStatus* getSolutionStatus( int solIdx);
01478 
01488         std::string getSolutionStatusType(int solIdx);
01489 
01496         std::string getSolutionStatusDescription(int solIdx);
01497         
01504         std::string getSolutionMessage(int solIdx);
01505         
01506 
01507         
01508         
01514         int getVariableNumber();
01515         
01521         int getObjectiveNumber();
01522         
01528         int getConstraintNumber();
01529         
01535         int getSolutionNumber();        
01536         
01542         int getNumberOfOtherVariableResults( int solIdx);
01543         
01544         // set methods
01545         //
01546         
01547         
01548         
01555         bool setGeneralStatus(GeneralStatus *status);
01556                         
01564         bool setGeneralStatusType(std::string type);    
01565         
01572         bool setGeneralStatusDescription(std::string description);
01573         
01580         bool setGeneralMessage(std::string message);
01581 
01588         bool setServiceName(std::string serviceName);
01589         
01596         bool setServiceURI(std::string serviceURI);     
01597         
01604         bool setInstanceName(std::string instanceName);
01605                 
01612         bool setJobID(std::string jobID);
01613                 
01620         bool setTime(double time);
01621                 
01632         bool addTimingInformation(std::string type, std::string category,
01633                                                           std::string unit, std::string description, double value);
01634         
01641         bool setTimeNumber(int timeNumber);
01642         
01649         bool setVariableNumber(int variableNumber);
01650         
01657         bool setObjectiveNumber(int objectiveNumber);
01658         
01665         bool setConstraintNumber(int constraintNumber);
01666                 
01679         bool setSolutionNumber(int number);
01680         
01681         
01694         bool setSolutionStatus(int solIdx, std::string type, std::string description);
01695 
01708         bool setSolutionObjectiveIndex(int solIdx, int objectiveIdx);
01709         
01719         bool setNumberOfPrimalVariableValues(int solIdx, int n);
01720                 
01721         
01732         bool setPrimalVariableValues(int solIdx, double *x, int n);
01749         bool setNumberOfOtherVariableResults(int solIdx, int numberOfOtherVariableResults);
01750                 
01766         bool setAnOtherVariableResult(int solIdx, int otherIdx, std::string name, std::string description, int *indexes,  std::string *s, int n);
01767 
01768 
01769         
01785         bool setObjectiveValues(int solIdx, double *objectiveValues, int n);
01786         
01787 
01800         bool setDualVariableValues(int solIdx, double* lbValues, double* ubValues, int n);
01801 
01802 
01813         bool setDualVariableValues(int solIdx, double *y, int n);
01814         
01825         bool setConstraintValues(int solIdx, double *constraintValues, int n);
01826 
01827 
01828 
01829 };
01830 #endif

Generated on Tue Mar 30 03:04:40 2010 by  doxygen 1.4.7