OSResult.cpp
Go to the documentation of this file.
1 /* $Id: OSResult.cpp 5284 2017-12-08 13:52:50Z stefan $ */
16 #include "OSResult.h"
17 #include "OSParameters.h"
18 #include "OSErrorClass.h"
19 #include "OSGeneral.h"
20 #include "OSParameters.h"
21 #include "OSMathUtil.h"
22 #include "OSOutput.h"
23 
24 #include<iostream>
25 #include<sstream>
26 
27 using namespace std;
28 
35  name( ""),
36  description( "")
37 {
38 #ifndef NDEBUG
39  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralSubstatus Constructor");
40 #endif
41 }// end GeneralSubstatus constructor
42 
44 {
45 #ifndef NDEBUG
46  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralSubstatus Destructor");
47 #endif
48 }//end GeneralSubstatus destructor
49 
50 
52  numberOfSubstatuses (0),
53  type( ""),
54  description( ""),
55  substatus (NULL)
56 {
57 #ifndef NDEBUG
58  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralStatus Constructor");
59 #endif
60 }// end GeneralStatus constructor
61 
63 {
64 #ifndef NDEBUG
65  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralStatus Destructor");
66 #endif
67  if (substatus != NULL)
68  {
69  for (int i = 0; i < numberOfSubstatuses; i++)
70  {
71  delete substatus[i];
72  substatus[i] = NULL;
73  }
74  delete[] substatus;
75  substatus = NULL;
76  }
77 }//end GeneralStatus destructor
78 
79 
81  name( ""),
82  value( ""),
83  description( "")
84 {
85 #ifndef NDEBUG
86  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherResult Constructor");
87 #endif
88 }// end OtherResult constructor
89 
91 {
92 #ifndef NDEBUG
93  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherResult Destructor");
94 #endif
95 }// end OtherResult destructor
96 
97 
99  numberOfOtherResults( 0),
100  other( NULL)
101 {
102 #ifndef NDEBUG
103  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherResults Constructor");
104 #endif
105 }// end OtherResults constructor
106 
108 {
109 #ifndef NDEBUG
110  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherResults Destructor");
111 #endif
112  if (other != NULL)
113  {
114  for (int i = 0; i < numberOfOtherResults; i++)
115  {
116  delete other[i];
117  other[i] = NULL;
118  }
119  delete[] other;
120  other = NULL;
121  }
122 }// end OtherResults destructor
123 
124 
126  generalStatus(NULL),
127  message(""),
128  serviceURI(""),
129  serviceName(""),
130  instanceName(""),
131  jobID(""),
132  solverInvoked(""),
133  timeStamp(""),
134  otherResults(NULL)
135 {
136 #ifndef NDEBUG
137  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralResult Constructor");
138 #endif
139 }//end GeneralResult constructor
140 
141 
143 {
144 #ifndef NDEBUG
145  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the GeneralResult Destructor");
146 #endif
147  if (generalStatus != NULL)
148  {
149  delete generalStatus;
150  generalStatus = NULL;
151  }
152  if (otherResults != NULL)
153  {
154  delete otherResults;
155  otherResults = NULL;
156  }
157 }// end GeneralResult destructor
158 
160  systemInformation(""),
161  availableDiskSpace(NULL),
162  availableMemory(NULL),
163  availableCPUSpeed(NULL),
164  availableCPUNumber(NULL),
165  otherResults(NULL)
166 {
167 #ifndef NDEBUG
168  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the SystemResult Constructor");
169 #endif
170 }//end SystemResult constructor
171 
172 
174 {
175 #ifndef NDEBUG
176  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the SystemResult Destructor");
177 #endif
178  if (availableDiskSpace != NULL)
179  {
180  delete availableDiskSpace;
181  availableDiskSpace = NULL;
182  }
183  if (availableMemory != NULL)
184  {
185  delete availableMemory;
186  availableMemory = NULL;
187  }
188  if (availableCPUSpeed != NULL)
189  {
190  delete availableCPUSpeed;
191  availableCPUSpeed = NULL;
192  }
193  if (availableCPUNumber != NULL)
194  {
195  delete availableCPUNumber;
196  availableCPUNumber = NULL;
197  }
198  if (otherResults != NULL)
199  {
200  delete otherResults;
201  otherResults = NULL;
202  }
203 }// end SystemResult destructor
204 
205 
207  currentState("unknown"),
208  currentJobCount(-1),
209  totalJobsSoFar(-1),
210  timeServiceStarted("1970-01-01T00:00:00-00:00"),
211  serviceUtilization(-1.0),
212  otherResults(NULL)
213 {
214 #ifndef NDEBUG
215  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ServiceResult Constructor");
216 #endif
217 }//end ServiceResult constructor
218 
219 
221 {
222 #ifndef NDEBUG
223  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ServiceResult Destructor");
224 #endif
225  if (otherResults != NULL)
226  {
227  delete otherResults;
228  otherResults = NULL;
229  }
230 }// end ServiceResult destructor
231 
232 #if 0
233 Time::Time():
234  type("elapsedTime"),
235  category("total"),
236  unit("second"),
237  description(""),
238  value(0.0)
239 {
240 #ifndef NDEBUG
241  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the Time Constructor");
242 #endif
243 }//end Time constructor
244 
245 
246 Time::~Time()
247 {
248 #ifndef NDEBUG
249  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the Time Destructor");
250 #endif
251 
252 }// end Time destructor
253 #endif
254 
256  TimeSpan(),
257  type("elapsedTime"),
258  category("total"),
259  description("")
260 {
261 #ifndef NDEBUG
262  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the TimeMeasurement Constructor");
263 #endif
264 }//end TimeMeasurement constructor
265 
266 
268 {
269 #ifndef NDEBUG
270  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the TimeMeasurement Destructor");
271 #endif
272 
273 }// end TimeMeasurement destructor
274 
276  numberOfTimes(0),
277  time(NULL)
278 {
279 #ifndef NDEBUG
280  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the TimingInformation Constructor");
281 #endif
282 }//end TimingInformation constructor
283 
284 
286 {
287 #ifndef NDEBUG
288  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the TimingInformation Destructor");
289 #endif
290  if (time != NULL)
291  {
292  for (int i = 0; i < numberOfTimes; i++)
293  {
294  delete time[i];
295  time[i] = NULL;
296  }
297  delete[] time;
298  time = NULL;
299  }
300 }// end TimingInformation destructor
301 
303  status("finished"),
304  submitTime("1970-01-01T00:00:00-00:00"),
305  scheduledStartTime("1970-01-01T00:00:00-00:00"),
306  actualStartTime("1970-01-01T00:00:00-00:00"),
307  endTime("1970-01-01T00:00:00-00:00"),
308  timingInformation(NULL),
309  usedDiskSpace(NULL),
310  usedMemory(NULL),
311  usedCPUSpeed(NULL),
312  usedCPUNumber(NULL),
313  otherResults(NULL)
314 {
315 #ifndef NDEBUG
316  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the JobResult Constructor");
317 #endif
318  timingInformation = NULL;
319 }//end JobResult constructor
320 
321 
323 {
324 #ifndef NDEBUG
325  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the JobResult Destructor");
326 #endif
327  if (timingInformation != NULL)
328  {
329  delete timingInformation;
330  timingInformation = NULL;
331  }
332  if (usedDiskSpace != NULL)
333  {
334  delete usedDiskSpace;
335  usedDiskSpace = NULL;
336  }
337  if (usedMemory != NULL)
338  {
339  delete usedMemory;
340  usedMemory = NULL;
341  }
342  if (usedCPUSpeed != NULL)
343  {
344  delete usedCPUSpeed;
345  usedCPUSpeed = NULL;
346  }
347  if (usedCPUNumber != NULL)
348  {
349  delete usedCPUNumber;
350  usedCPUNumber = NULL;
351  }
352  if (otherResults != NULL)
353  {
354  delete otherResults;
355  otherResults = NULL;
356  }
357 }// end JobResult destructor
358 
359 
361  type(""),
362  description("")
363 {
364 #ifndef NDEBUG
365  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolutionSubstatus Constructor");
366 #endif
367 }//end OptimizationSolutionSubstatus constructor
368 
369 
371 {
372 #ifndef NDEBUG
373  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolutionSubstatus Destructor");
374 #endif
375 }// end OptimizationSolutionSubstatus destructor
376 
377 
379  numberOfSubstatuses(0),
380  type(""),
381  description(""),
382  substatus(NULL)
383 {
384 #ifndef NDEBUG
385  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolutionStatus Constructor");
386 #endif
387 }//end OptimizationSolutionStatus constructor
388 
389 
391 {
392 #ifndef NDEBUG
393  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolutionStatus Destructor");
394 #endif
395  if (substatus != NULL)
396  {
397  for (int i = 0; i < numberOfSubstatuses; i++)
398  {
399  delete substatus[i];
400  substatus[i] = NULL;
401  }
402  delete[] substatus;
403  substatus = NULL;
404  }
405 }// end OptimizationSolutionStatus destructor
406 
407 
409  idx( -1),
410  name(""),
411  value( 0)
412 {
413 #ifndef NDEBUG
414  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VarValue Constructor");
415 #endif
416 }//end VarValue constructor
417 
418 
420 {
421 #ifndef NDEBUG
422  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VarValue Destructor");
423 #endif
424 }// end VarValue destructor
425 
426 
427 
429  numberOfVar(0),
430  var(NULL)
431 {
432 #ifndef NDEBUG
433  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableValues Constructor");
434 #endif
435 }//end VariableValues constructor
436 
437 
439 {
440 #ifndef NDEBUG
441  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableValues Destructor");
442 #endif
443  if(var != NULL)
444  {
445  for(int i = 0; i < numberOfVar; i++)
446  {
447  delete var[i];
448  var[i] = NULL;
449  }
450  delete[] var;
451  var = NULL;
452  }
453 }// end VariableValues destructor
454 
455 
457  idx( -1),
458  name(""),
459  value( "")
460 {
461 #ifndef NDEBUG
462  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VarValueString Constructor");
463 #endif
464 }//end VarValueString constructor
465 
466 
468 {
469 #ifndef NDEBUG
470  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VarValueString Destructor");
471 #endif
472 }// end VarValueString destructor
473 
474 
475 
477  numberOfVar(0),
478  var(NULL)
479 {
480 #ifndef NDEBUG
481  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableValuesString Constructor");
482 #endif
483 }//end VariableValuesString constructor
484 
485 
487 {
488 #ifndef NDEBUG
489  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableValuesString Destructor");
490 #endif
491  if(var != NULL)
492  {
493  for(int i = 0; i < numberOfVar; i++)
494  {
495  delete var[i];
496  var[i] = NULL;
497  }
498  delete[] var;
499  var = NULL;
500  }
501 }// end VariableValuesString destructor
502 
503 
505  idx( -1),
506  name(""),
507  value( "")
508 {
509 #ifndef NDEBUG
510  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherVarResult Constructor");
511 #endif
512 }//end OtherVarResult constructor
513 
514 
516 {
517 #ifndef NDEBUG
518  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherVarResult Destructor");
519 #endif
520 }// end OtherVarResult destructor
521 
522 
523 
525  numberOfVar(0), //(-1),
526  numberOfEnumerations(0),
527  name(""),
528  value(""),
529  type(""),
530  description(""),
531  var(NULL),
532  varType(""),
533  enumeration(NULL),
534  enumType("")
535 {
536 #ifndef NDEBUG
537  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherVariableResult Constructor");
538 #endif
539 
540 }//end OtherVariableResult constructor
541 
542 
544 {
545 #ifndef NDEBUG
546  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherVariableResult Destructor");
547 #endif
548  if (var != NULL)
549  {
550  for(int i = 0; i < numberOfVar; i++)
551  {
552  delete var[i];
553  var[i] = NULL;
554  }
555  delete[] var;
556  var = NULL;
557  }
558  if (enumeration != NULL)
559  {
560  for(int i = 0; i < numberOfEnumerations; i++)
561  {
562  delete enumeration[i];
563  enumeration[i] = NULL;
564  }
565  delete[] enumeration;
566  enumeration = NULL;
567  }
568 }// end OtherVariableResult destructor
569 
570 
572  numberOfOtherVariableResults( 0),
573  values( NULL),
574  valuesString( NULL),
575  basisStatus(NULL),
576  other( NULL)
577 {
578 #ifndef NDEBUG
579  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableSolution Constructor");
580 #endif
581 }//end VariableSolution constructor
582 
583 
585 {
586 #ifndef NDEBUG
587  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the VariableSolution Destructor");
588 #endif
589  if (values != NULL)
590  {
591  delete values;
592  values = NULL;
593  }
594  if (valuesString != NULL)
595  {
596  delete valuesString;
597  valuesString = NULL;
598  }
599  if (basisStatus != NULL)
600  {
601  delete basisStatus;
602  basisStatus = NULL;
603  }
604  if(numberOfOtherVariableResults > 0 && other != NULL)
605  {
606  for(int i = 0; i < numberOfOtherVariableResults; i++)
607  {
608  delete other[i];
609  other[i] = NULL;
610  }
611  delete[] other;
612  other = NULL;
613  }
614 }// end VariableSolution destructor
615 
616 
617 
619  idx( -1),
620  name(""),
621  value(0.0)
622 // value( OSNaN())
623 {
624 #ifndef NDEBUG
625  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjValue Constructor");
626 #endif
627 }//end ObjValue constructor
628 
630 {
631 #ifndef NDEBUG
632  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjValue Destructor");
633 #endif
634 }// end ObjValue destructor
635 
636 
637 
639  numberOfObj(0),
640  obj(NULL)
641 {
642 #ifndef NDEBUG
643  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjectiveValues Constructor");
644 #endif
645 
646 }//end ObjectiveValues constructor
647 
648 
650 {
651 #ifndef NDEBUG
652  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjectiveValues Destructor");
653 #endif
654  if((obj != NULL) && (numberOfObj > 0) )
655  {
656  for(int i = 0; i < numberOfObj; i++)
657  {
658  delete obj[i];
659  obj[i] = NULL;
660  }
661  delete[] obj;
662  obj = NULL;
663  }
664 }// end ObjectiveValues destructor
665 
666 
668  idx(-1),
669  name(""),
670  value( "")
671 {
672 #ifndef NDEBUG
673  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherObjResult Constructor");
674 #endif
675 }//end OtherObjResult constructor
676 
677 
679 {
680 #ifndef NDEBUG
681  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherObjResult Destructor");
682 #endif
683 }//end OtherObjResult destructor
684 
685 
687  numberOfObj(0),
688  numberOfEnumerations(0),
689  name(""),
690  value(""),
691  type(""),
692  description(""),
693  obj(NULL),
694  objType(""),
695  enumeration(NULL),
696  enumType("")
697 {
698 #ifndef NDEBUG
699  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherObjectiveResult Constructor");
700 #endif
701 }//end OtherObjectiveResult constructor
702 
703 
705 {
706 #ifndef NDEBUG
707  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherObjectiveResult Destructor");
708 #endif
709  if(obj != NULL)
710  {
711  for(int i = 0; i < numberOfObj; i++)
712  {
713  delete obj[i];
714  obj[i] = NULL;
715  }
716  delete[] obj;
717  obj = NULL;
718  }
719  if (enumeration != NULL)
720  {
721  for(int i = 0; i < numberOfEnumerations; i++)
722  {
723  delete enumeration[i];
724  enumeration[i] = NULL;
725  }
726  delete[] enumeration;
727  enumeration = NULL;
728  }
729 }// end OtherObjectiveResult destructor
730 
731 
733  numberOfOtherObjectiveResults( 0),
734  values( NULL),
735  basisStatus(NULL),
736  other( NULL)
737 {
738 #ifndef NDEBUG
739  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjectiveSolution Constructor");
740 #endif
741 }//end ObjectiveSolution constructor
742 
743 
745 {
746 #ifndef NDEBUG
747  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ObjectiveSolution Destructor");
748 #endif
749  if (values != NULL)
750  {
751  delete values;
752  values = NULL;
753  }
754  if (basisStatus != NULL)
755  {
756  delete basisStatus;
757  basisStatus = NULL;
758  }
759  if(numberOfOtherObjectiveResults > 0 && other != NULL)
760  {
761  for(int i = 0; i < numberOfOtherObjectiveResults; i++)
762  {
763  delete other[i];
764  other[i] = NULL;
765  }
766  delete[] other;
767  other = NULL;
768  }
769 }// end ObjectiveSolution destructor
770 
771 
773  idx( -1),
774  name(""),
775  //lbValue( 0),
776  //ubValue( 0),
777  value( 0)
778 {
779 #ifndef NDEBUG
780  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the DualVarValue Constructor");
781 #endif
782 }//end DualVarValue constructor
783 
784 
786 {
787 #ifndef NDEBUG
788  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the DualVarValue Destructor");
789 #endif
790 }// end DualVarValue destructor
791 
792 
794  numberOfCon(0),
795  con(NULL)
796 {
797 #ifndef NDEBUG
798  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the DualVariableValues Constructor");
799 #endif
800 
801 }//end DualVariableValues constructor
802 
803 
805 {
806 #ifndef NDEBUG
807  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the DualVariableValues Destructor");
808 #endif
809  if (con != NULL)
810  {
811  for(int i = 0; i < numberOfCon; i++)
812  {
813  delete con[i];
814  con[i] = NULL;
815  }
816  delete[] con;
817  con = NULL;
818  }
819 }// end DualVariableValues destructor
820 
821 
823  idx( -1),
824  name(""),
825  value( "")
826 {
827 #ifndef NDEBUG
828  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherConResult Constructor");
829 #endif
830 }//end OtherConResult constructor
831 
832 
834 {
835 #ifndef NDEBUG
836  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherConResult Destructor");
837 #endif
838 }//end OtherConResult destructor
839 
840 
841 
843  numberOfCon(0),
844  numberOfEnumerations(0),
845  name(""),
846  value(""),
847  type(""),
848  description(""),
849  con(NULL),
850  conType(""),
851  enumeration(NULL),
852  enumType("")
853 {
854 #ifndef NDEBUG
855  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherConstraintResult Constructor");
856 #endif
857 }//end OtherConstraintResult constructor
858 
859 
861 {
862 #ifndef NDEBUG
863  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherConstraintResult Destructor");
864 #endif
865  if (con != NULL)
866  {
867  for(int i = 0; i < numberOfCon; i++)
868  {
869  delete con[i];
870  con[i] = NULL;
871  }
872  delete[] con;
873  con = NULL;
874  }
875  if (enumeration != NULL)
876  {
877  for(int i = 0; i < numberOfEnumerations; i++)
878  {
879  delete enumeration[i];
880  enumeration[i] = NULL;
881  }
882  delete[] enumeration;
883  enumeration = NULL;
884  }
885 }// end OtherConstraintResult destructor
886 
887 
888 
890  numberOfOtherConstraintResults( 0),
891  dualValues( NULL),
892  basisStatus(NULL),
893  other( NULL)
894 {
895 #ifndef NDEBUG
896  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ConstraintSolution Constructor");
897 #endif
898 }//end ConstraintSolution constructor
899 
900 
902 {
903 #ifndef NDEBUG
904  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the ConstraintSolution Destructor");
905 #endif
906  if (dualValues != NULL)
907  {
908  delete dualValues;
909  dualValues = NULL;
910  }
911  if (basisStatus != NULL)
912  {
913  delete basisStatus;
914  basisStatus = NULL;
915  }
916  if(numberOfOtherConstraintResults > 0 && other != NULL)
917  {
918  for(int i = 0; i < numberOfOtherConstraintResults; i++)
919  {
920  delete other[i];
921  other[i] = NULL;
922  }
923  delete[] other;
924  other = NULL;
925  }
926 }// end ConstraintSolution destructor
927 
928 
929 
931  numberOfMatrixVar(0),
932  matrixVar(NULL)
933 {
934 #ifndef NDEBUG
935  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixVariableValues Constructor");
936 #endif
937 }//end MatrixVariableValues constructor
938 
939 
941 {
942 #ifndef NDEBUG
943  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixVariableValues Destructor");
944 #endif
945  if(numberOfMatrixVar > 0 && matrixVar != NULL)
946  {
947  for(int i = 0; i < numberOfMatrixVar; i++)
948  {
949  delete matrixVar[i];
950  matrixVar[i] = NULL;
951  }
952  delete[] matrixVar;
953  matrixVar = NULL;
954  }
955 }// end MatrixVariableValues destructor
956 
957 
959  numberOfOtherMatrixVariableResults(0),
960  values(NULL),
961  other(NULL)
962 {
963 #ifndef NDEBUG
964  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixVariableSolution Constructor");
965 #endif
966 }//end MatrixVariableSolution constructor
967 
968 
970 {
971 #ifndef NDEBUG
972  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixVariableSolution Destructor");
973 #endif
974  if (values != NULL)
975  delete values;
976  values = NULL;
977 #if 0
978  if(numberOfOtherMatrixVariableResults > 0 && matrixVar != NULL)
979  {
980  for(int i = 0; i < numberOfMatrixVar; i++)
981  {
982  delete matrixVar[i];
983  matrixVar[i] = NULL;
984  }
985  delete[] matrixVar;
986  matrixVar = NULL;
987  }
988 #endif
989 }// end MatrixVariableValues destructor
990 
991 
993  name(""),
994  description(""),
995  value(""),
996  type(""),
997  solver(""),
998  category(""),
999  numberOfMatrixVar(0),
1000  matrixType(""),
1001  matrixVar(NULL),
1002  numberOfEnumerations(0),
1003  enumType(""),
1004  enumeration(NULL)
1005 {
1006 #ifndef NDEBUG
1007  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherMatrixVariableResult Constructor");
1008 #endif
1009 }//end OtherMatrixVariableResult constructor
1010 
1011 
1013  description(""),
1014  value(""),
1015  type(""),
1016  solver(""),
1017  category(""),
1018  numberOfMatrixVar(0),
1019  matrixVar(NULL),
1020  numberOfEnumerations(0),
1021  enumeration(NULL)
1022 {
1023 #ifndef NDEBUG
1024  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherMatrixVariableResult Constructor");
1025 #endif
1026  name = name_;
1027 }//end alternate OtherMatrixVariableResult constructor
1028 
1030 {
1031 #ifndef NDEBUG
1032  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherMatrixVariableResult Destructor");
1033 #endif
1034  if (numberOfMatrixVar > 0 && matrixVar != NULL)
1035  {
1036  for(int i = 0; i < numberOfMatrixVar; i++)
1037  {
1038  delete matrixVar[i];
1039  matrixVar[i] = NULL;
1040  }
1041  delete[] matrixVar;
1042  matrixVar = NULL;
1043  }
1044 
1045  if (numberOfEnumerations > 0 && enumeration != NULL)
1046  {
1047  for(int i = 0; i < numberOfEnumerations; i++)
1048  {
1049  delete enumeration[i];
1050  enumeration[i] = NULL;
1051  }
1052  delete[] enumeration;
1053  enumeration = NULL;
1054  }
1055 }// end OtherMatrixVariableResult destructor
1056 
1057 
1059 // numberOfOtherMatrixVariableResults(0),
1060 // values(NULL)
1061 {
1062 #ifndef NDEBUG
1063  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixObjectiveSolution Constructor");
1064 #endif
1065 }//end MatrixObjectiveSolution constructor
1066 
1067 
1069 {
1070 #ifndef NDEBUG
1071  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixObjectiveSolution Destructor");
1072 #endif
1073 #if 0
1074  if (values != NULL)
1075  delete values;
1076  values = NULL;
1077  if(numberOfOtherMatrixVariableResults > 0 && matrixVar != NULL)
1078  {
1079  for(int i = 0; i < numberOfMatrixVar; i++)
1080  {
1081  delete matrixVar[i];
1082  matrixVar[i] = NULL;
1083  }
1084  delete[] matrixVar;
1085  matrixVar = NULL;
1086  }
1087 #endif
1088 }// end MatrixObjectiveSolution destructor
1089 
1090 
1092 // numberOfOtherMatrixVariableResults(0),
1093 // values(NULL)
1094 {
1095 #ifndef NDEBUG
1096  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixConstraintSolution Constructor");
1097 #endif
1098 }//end MatrixConstraintSolution constructor
1099 
1100 
1102 {
1103 #ifndef NDEBUG
1104  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixConstraintSolution Destructor");
1105 #endif
1106 #if 0
1107  if (values != NULL)
1108  delete values;
1109  values = NULL;
1110  if(numberOfOtherMatrixVariableResults > 0 && matrixVar != NULL)
1111  {
1112  for(int i = 0; i < numberOfMatrixVar; i++)
1113  {
1114  delete matrixVar[i];
1115  matrixVar[i] = NULL;
1116  }
1117  delete[] matrixVar;
1118  matrixVar = NULL;
1119  }
1120 #endif
1121 }// end MatrixConstraintSolution destructor
1122 
1124  numberOfOtherMatrixProgrammingResults(0),
1125  matrixVariables(NULL),
1126  matrixObjectives(NULL),
1127  matrixConstraints(NULL),
1128  other(NULL)
1129 {
1130 #ifndef NDEBUG
1131  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixProgrammingSolution Constructor");
1132 #endif
1133 }//end MatrixProgrammingSolution constructor
1134 
1135 
1137 {
1138 #ifndef NDEBUG
1139  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the MatrixProgrammingSolution Destructor");
1140 #endif
1141  if (matrixVariables != NULL)
1142  delete matrixVariables;
1143  matrixVariables = NULL;
1144  if (matrixObjectives != NULL)
1145  delete matrixObjectives;
1146  matrixObjectives = NULL;
1147  if (matrixConstraints != NULL)
1148  delete matrixConstraints;
1149  matrixConstraints = NULL;
1150 
1151  if(numberOfOtherMatrixProgrammingResults > 0 && other != NULL)
1152  {
1153  for(int i = 0; i < numberOfOtherMatrixProgrammingResults; i++)
1154  {
1155  delete other[i];
1156  other[i] = NULL;
1157  }
1158  delete[] other;
1159  other = NULL;
1160  }
1161 }// end MatrixProgrammingSolution destructor
1162 
1163 
1165  name(""),
1166  value(""),
1167  category (""),
1168  description (""),
1169  numberOfItems (0),
1170  item( NULL)
1171 {
1172 #ifndef NDEBUG
1173  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolutionResult Constructor");
1174 #endif
1175 }//end OtherSolutionResult constructor
1176 
1177 
1179 {
1180 #ifndef NDEBUG
1181  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolutionResult Destructor");
1182 #endif
1183  if (item != NULL)
1184  delete[] item;
1185  item = NULL;
1186 }// end OtherSolutionResult destructor
1187 
1188 
1189 
1191  numberOfOtherSolutionResults( 0),
1192  otherSolutionResult( NULL)
1193 {
1194 #ifndef NDEBUG
1195  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolutionResults Constructor");
1196 #endif
1197 }//end OtherSolutionResults constructor
1198 
1199 
1201 {
1202 #ifndef NDEBUG
1203  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolutionResults Destructor");
1204 #endif
1206  {
1207  for(int i = 0; i < numberOfOtherSolutionResults; i++)
1208  {
1209  delete otherSolutionResult[i];
1210  otherSolutionResult[i] = NULL;
1211  }
1212  delete[] otherSolutionResult;
1213  otherSolutionResult = NULL;
1214  }
1215 }// end OtherSolutionResults destructor
1216 
1217 
1218 
1220  targetObjectiveIdx( -1),
1221  targetObjectiveName(""),
1222  weightedObjectives(false),
1223  status(NULL),
1224  message( ""),
1225  variables( NULL),
1226  objectives( NULL),
1227  constraints( NULL),
1228  matrixProgramming(NULL),
1229  otherSolutionResults( NULL)
1230  //other(NULL)
1231 {
1232 #ifndef NDEBUG
1233  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolution Constructor");
1234 #endif
1235 }//end OptimizationSolution constructor
1236 
1237 
1239 {
1240 #ifndef NDEBUG
1241  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationSolution Destructor");
1242 #endif
1243  if (status != NULL)
1244  {
1245  delete status;
1246  status = NULL;
1247  }
1248  if (variables != NULL)
1249  {
1250  delete variables;
1251  variables = NULL;
1252  }
1253  if (objectives != NULL)
1254  {
1255  delete objectives;
1256  objectives = NULL;
1257  }
1258  if (constraints != NULL)
1259  {
1260  delete constraints;
1261  constraints = NULL;
1262  }
1263  if (matrixProgramming != NULL)
1264  {
1265  delete matrixProgramming;
1266  matrixProgramming = NULL;
1267  }
1268  if (otherSolutionResults != NULL)
1269  {
1270  delete otherSolutionResults;
1271  otherSolutionResults = NULL;
1272  }
1273 }// end OptimizationSolution destructor
1274 
1275 
1277  name( ""),
1278  category (""),
1279  description (""),
1280  numberOfItems (0),
1281  item( NULL)
1282 {
1283 #ifndef NDEBUG
1284  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the SolverOutput Constructor");
1285 #endif
1286 }//end SolverOutput constructor
1287 
1288 
1290 {
1291 #ifndef NDEBUG
1292  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the SolverOutput Destructor");
1293 #endif
1294  if (item != NULL)
1295  {
1296  //for (int i=0; i < numberOfItems; i++)
1297  //{ delete item[i];
1298  // item[i] = NULL;
1299  //}
1300  delete[] item;
1301  item = NULL;
1302  }
1303 }// end SolverOutput destructor
1304 
1305 
1306 
1308  numberOfSolverOutputs(0),
1309  solverOutput(NULL)
1310 {
1311 #ifndef NDEBUG
1312  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolverOutput Constructor");
1313 #endif
1314 
1315 }//end OtherSolverOutput constructor
1316 
1317 
1319 {
1320 #ifndef NDEBUG
1321  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OtherSolverOutput Destructor");
1322 #endif
1323  if (solverOutput != NULL)
1324  {
1325  for(int i = 0; i < numberOfSolverOutputs; i++)
1326  {
1327  delete solverOutput[i];
1328  solverOutput[i] = NULL;
1329  }
1330  delete[] solverOutput;
1331  solverOutput = NULL;
1332  }
1333 }// end OtherSolverOutput destructor
1334 
1335 
1336 
1338  numberOfSolutions(0),
1339  numberOfVariables( -1),
1340  numberOfObjectives( -1),
1341  numberOfConstraints(-1),
1342  solution(NULL),
1343  otherSolverOutput(NULL)
1344 {
1345 #ifndef NDEBUG
1346  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationResult Constructor");
1347 #endif
1348 }//end OptimizationResult constructor
1349 
1350 
1352 {
1353  std::ostringstream outStr;
1354 
1355 #ifndef NDEBUG
1356  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OptimizationResult Destructor");
1357 #endif
1358  if( solution != NULL)
1359  {
1360  for(int i = 0; i < this->numberOfSolutions; i++)
1361  {
1362  delete solution[i];
1363  solution[i] = NULL;
1364 #ifndef NDEBUG
1365  outStr.str("");
1366  outStr.clear();
1367  outStr << "Deleting Solution: " << i << endl;
1369 #endif
1370  }
1371  delete[] solution;
1372  solution = NULL;
1373  if( otherSolverOutput != NULL)
1374  {
1375  delete otherSolverOutput;
1376  otherSolverOutput = NULL;
1377  }
1378  }
1379 }// end OptimizationResult destructor
1380 
1381 
1383  m_iVariableNumber( -1),
1384  m_iObjectiveNumber( -1),
1385  m_iConstraintNumber( -1),
1386  m_iNumberOfOtherVariableResults( -1),
1387  m_mdPrimalValues( NULL),
1388  m_mdDualValues( NULL)
1389 
1390 {
1391 #ifndef NDEBUG
1392  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OSResult Constructor");
1393 #endif
1394  resultHeader = NULL;
1395  general = NULL;
1396  system = NULL;
1397  service = NULL;
1398  job = NULL;
1399  optimization = NULL;
1400 }// end OSResult constructor
1401 
1403 {
1404 #ifndef NDEBUG
1405  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Inside the OSResult Destructor");
1406 #endif
1407  // delete the children of OSResult
1408  // delete resultHeader object
1409  if (resultHeader != NULL)
1410  {
1411  delete resultHeader;
1412  resultHeader = NULL;
1413  }
1414  // delete general object
1415  if (general != NULL)
1416  {
1417  delete general;
1418  general = NULL;
1419  }
1420  //delete system object
1421  if (system != NULL)
1422  {
1423  delete system;
1424  system = NULL;
1425  }
1426  //delete service object
1427  if (service != NULL)
1428  {
1429  delete service;
1430  service = NULL;
1431  }
1432  //delete job object
1433  if (job != NULL)
1434  {
1435  delete job;
1436  job = NULL;
1437  }
1438  //delete optimization object
1439  if (optimization != NULL)
1440  {
1441  delete optimization;
1442  optimization = NULL;
1443  }
1444 
1445  int k;
1446 
1447  if (m_mdPrimalValues != NULL) delete[] m_mdPrimalValues;
1448  m_mdPrimalValues = 0;
1449 
1450  if (m_mdDualValues != NULL) delete[] m_mdDualValues;
1451  m_mdDualValues = 0;
1452 
1453  int numPrimalVals = this->primalVals.size();
1454  for (k = 0; k < numPrimalVals; k++)
1455  {
1456  if (this->primalVals[ k] != NULL )
1457  delete this->primalVals[ k];
1458  }
1459  this->primalVals.clear();
1460 
1461  int numDualVals = this->dualVals.size();
1462  for (k = 0; k < numDualVals; k++)
1463  {
1464  if (this->dualVals[ k] != NULL )
1465  delete this->dualVals[ k];
1466  }
1467  this->dualVals.clear();
1468 }//end OSResult destructor
1469 
1470 // =============================================================
1471 // get methods
1472 
1474 {
1475  if (general == NULL) return NULL;
1476  return general->generalStatus;
1477 }//getGeneralStatus
1478 
1480 {
1481  if (general == NULL) return "";
1482  if (general->generalStatus == NULL) return "";
1483  return general->generalStatus->type;
1484 }//getGeneralStatusType
1485 
1487 {
1488  if (general == NULL) return "";
1489  if (general->generalStatus == NULL) return "";
1491 }//getGeneralStatusDescription
1492 
1494 {
1495  if (general == NULL) return -1;
1496  if (general->generalStatus == NULL) return -1;
1498 }//getGeneralStatusDescription
1499 
1501 {
1502  if (general == NULL) return "";
1503  if (general->generalStatus == NULL) return "";
1504  if (i < 0 || i >= general->generalStatus->numberOfSubstatuses)
1505  throw ErrorClass("idx is outside of range in routine getGeneralSubstatusName()");
1506  if (general->generalStatus->substatus[i] == NULL) return "";
1507  return general->generalStatus->substatus[i]->name;
1508 }//getGeneralSubstatusName
1509 
1511 {
1512  if (general == NULL) return "";
1513  if (general->generalStatus == NULL) return "";
1514  if (i < 0 || i >= general->generalStatus->numberOfSubstatuses)
1515  throw ErrorClass("idx is outside of range in routine getGeneralSubstatusDescription()");
1516  if (general->generalStatus->substatus[i] == NULL) return "";
1518 }//getGeneralSubstatusDescription
1519 
1521 {
1522  if (general == NULL) return "";
1523  return general->message;
1524 }//getServiceName
1525 
1527 {
1528  if (general == NULL) return "";
1529  return general->serviceName;
1530 }//getServiceName
1531 
1533 {
1534  if (general == NULL) return "";
1535  return general->serviceURI;
1536 }//getServiceURI
1537 
1539 {
1540  if (general == NULL) return "";
1541  return general->instanceName;
1542 }//getInstanceName
1543 
1545 {
1546  if (general == NULL) return "";
1547  return general->jobID;
1548 }//getJobID
1549 
1551 {
1552  if (general == NULL) return "";
1553  return general->solverInvoked;
1554 }//getSolverInvoked
1555 
1557 {
1558  if (general == NULL) return "";
1559  return general->timeStamp;
1560 }//getTimeStamp
1561 
1563 {
1564  if (general == NULL) return -1;
1565  if (general->otherResults == NULL) return -1;
1567 }//getNumberOfOtherGeneralResults
1568 
1570 {
1571  if (general == NULL) return "";
1572  if (general->otherResults == NULL) return "";
1573  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
1574  throw ErrorClass("idx is outside of range in routine getOtherGeneralResultName()");
1575  if (general->otherResults->other[idx] == NULL) return "";
1576  return general->otherResults->other[idx]->name;
1577 }//getOtherGeneralResultName
1578 
1580 {
1581  if (general == NULL) return "";
1582  if (general->otherResults == NULL) return "";
1583  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
1584  throw ErrorClass("idx is outside of range in routine getOtherGeneralResultValue()");
1585  if (general->otherResults->other[idx] == NULL) return "";
1586  return general->otherResults->other[idx]->value;
1587 }//getOtherGeneralResultValue
1588 
1590 {
1591  if (general == NULL) return "";
1592  if (general->otherResults == NULL) return "";
1593  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
1594  throw ErrorClass("idx is outside of range in routine getOtherGeneralResultDescription()");
1595  if (general->otherResults->other[idx] == NULL) return "";
1596  return general->otherResults->other[idx]->description;
1597 }//getOtherGeneralResultDescription
1598 
1600 {
1601  if (system == NULL) return "";
1602  return system->systemInformation;
1603 }//getSystemInformation
1604 
1606 {
1607  if (system == NULL) return "";
1608  if (system->availableDiskSpace == NULL) return "";
1609  return system->availableDiskSpace->unit;
1610 }//getAvailableDiskSpaceUnit
1611 
1613 {
1614  if (system == NULL) return "";
1615  if (system->availableDiskSpace == NULL) return "";
1617 }//getAvailableDiskSpaceDescription
1618 
1620 {
1621  if (system == NULL) return -1.;
1622  if (system->availableDiskSpace == NULL) return -1.;
1623  return system->availableDiskSpace->value;
1624 }//getAvailableDiskSpaceValue
1625 
1627 {
1628  if (system == NULL) return "";
1629  if (system->availableMemory == NULL) return "";
1630  return system->availableMemory->unit;
1631 }//getAvailableMemoryUnit
1632 
1634 {
1635  if (system == NULL) return "";
1636  if (system->availableMemory == NULL) return "";
1638 }//getAvailableMemoryDescription
1639 
1641 {
1642  if (system == NULL) return -1.;
1643  if (system->availableMemory == NULL) return -1.;
1644  return system->availableMemory->value;
1645 }//getAvailableMemoryValue
1646 
1648 {
1649  if (system == NULL) return "";
1650  if (system->availableCPUSpeed == NULL) return "";
1651  return system->availableCPUSpeed->unit;
1652 }//getAvailableCPUSpeedUnit
1653 
1655 {
1656  if (system == NULL) return "";
1657  if (system->availableCPUSpeed == NULL) return "";
1659 }//getAvailableCPUSpeedDescription
1660 
1662 {
1663  if (system == NULL) return -1.;
1664  if (system->availableCPUSpeed == NULL) return -1.;
1665  return system->availableCPUSpeed->value;
1666 }//getAvailableCPUSpeedValue
1667 
1669 {
1670  if (system == NULL) return "";
1671  if (system->availableCPUNumber == NULL) return "";
1673 }//getAvailableCPUNumberDescription
1674 
1676 {
1677  if (system == NULL) return -1;
1678  if (system->availableCPUNumber == NULL) return -1;
1679  return system->availableCPUNumber->value;
1680 }//getAvailableCPUNumberValue
1681 
1683 {
1684  if (system == NULL) return -1;
1685  if (system->otherResults == NULL) return -1;
1687 }//getNumberOfOtherSystemResults
1688 
1690 {
1691  if (system == NULL) return "";
1692  if (system->otherResults == NULL) return "";
1693  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
1694  throw ErrorClass("idx is outside of range in routine getOtherSystemResultName()");
1695  if (system->otherResults->other[idx] == NULL) return "";
1696  return system->otherResults->other[idx]->name;
1697 }//getOtherSystemResultName
1698 
1700 {
1701  if (system == NULL) return "";
1702  if (system->otherResults == NULL) return "";
1703  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
1704  throw ErrorClass("idx is outside of range in routine getOtherSystemResultValue()");
1705  if (system->otherResults->other[idx] == NULL) return "";
1706  return system->otherResults->other[idx]->value;
1707 }//getOtherSystemResultValue
1708 
1710 {
1711  if (system == NULL) return "";
1712  if (system->otherResults == NULL) return "";
1713  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
1714  throw ErrorClass("idx is outside of range in routine getOtherSystemResultDescription()");
1715  if (system->otherResults->other[idx] == NULL) return "";
1716  return system->otherResults->other[idx]->description;
1717 }//getOtherSystemResultDescription
1718 
1720 {
1721  if (service == NULL) return "";
1722  return service->currentState;
1723 }//getCurrentState
1724 
1726 {
1727  if (service == NULL) return -1;
1728  return service->currentJobCount;
1729 }//getCurrentJobCount
1730 
1732 {
1733  if (service == NULL) return -1;
1734  return service->totalJobsSoFar;
1735 }//getTotalJobsSoFar
1736 
1738 {
1739  if (service == NULL) return "";
1740  return service->timeServiceStarted;
1741 }//getTimeServiceStarted
1742 
1744 {
1745  if (service == NULL) return -1.;
1746  return service->serviceUtilization;
1747 }//getServiceUtilization
1748 
1750 {
1751  if (service == NULL) return -1;
1752  if (service->otherResults == NULL) return -1;
1754 }//getNumberOfOtherServiceResults
1755 
1757 {
1758  if (service == NULL) return "";
1759  if (service->otherResults == NULL) return "";
1760  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
1761  throw ErrorClass("idx is outside of range in routine getOtherServiceResultName()");
1762  if (service->otherResults->other[idx] == NULL) return "";
1763  return service->otherResults->other[idx]->name;
1764 }//getOtherServiceResultName
1765 
1767 {
1768  if (service == NULL) return "";
1769  if (service->otherResults == NULL) return "";
1770  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
1771  throw ErrorClass("idx is outside of range in routine getOtherServiceResultValue()");
1772  if (service->otherResults->other[idx] == NULL) return "";
1773  return service->otherResults->other[idx]->value;
1774 }//getOtherServiceResultValue
1775 
1777 {
1778  if (service == NULL) return "";
1779  if (service->otherResults == NULL) return "";
1780  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
1781  throw ErrorClass("idx is outside of range in routine getOtherServiceResultDescription()");
1782  if (service->otherResults->other[idx] == NULL) return "";
1783  return service->otherResults->other[idx]->description;
1784 }//getOtherServiceResultDescription
1785 
1787 {
1788  if (job == NULL) return "";
1789  return job->status;
1790 }//getJobStatus
1791 
1793 {
1794  if (job == NULL) return "";
1795  return job->submitTime;
1796 }//getJobSubmitTime
1797 
1799 {
1800  if (job == NULL) return "";
1801  return job->scheduledStartTime;
1802 }//getScheduledStartTime
1803 
1805 {
1806  if (job == NULL) return "";
1807  return job->actualStartTime;
1808 }//getActualStartTime
1809 
1811 {
1812  if (job == NULL) return "";
1813  return job->endTime;
1814 }//getJobEndTime
1815 
1817 {
1818  if (job == NULL) return -1;
1819  if (job->timingInformation == NULL) return -1;
1821 }//getNumberOfTimes
1822 
1824 {
1825  if (job == NULL) return "";
1826  if (job->timingInformation == NULL) return "";
1827  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
1828  throw ErrorClass("idx is outside of range in routine getTimingInfoUnit()");
1829  if (job->timingInformation->time[idx] == NULL) return "";
1830  return job->timingInformation->time[idx]->unit;
1831 }//getTimingInfoUnit
1832 
1834 {
1835  if (job == NULL) return "";
1836  if (job->timingInformation == NULL) return "";
1837  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
1838  throw ErrorClass("idx is outside of range in routine getTimingInfoType()");
1839  if (job->timingInformation->time[idx] == NULL) return "";
1840  return job->timingInformation->time[idx]->type;
1841 }//getTimingInfoType
1842 
1844 {
1845  if (job == NULL) return "";
1846  if (job->timingInformation == NULL) return "";
1847  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
1848  throw ErrorClass("idx is outside of range in routine getTimingInfoCategory()");
1849  if (job->timingInformation->time[idx] == NULL) return "";
1850  return job->timingInformation->time[idx]->category;
1851 }//getTimingInfoCategory
1852 
1854 {
1855  if (job == NULL) return "";
1856  if (job->timingInformation == NULL) return "";
1857  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
1858  throw ErrorClass("idx is outside of range in routine getTimingInfoDescription()");
1859  if (job->timingInformation->time[idx] == NULL) return "";
1860  return job->timingInformation->time[idx]->description;
1861 }//getTimingInfoDescription
1862 
1864 {
1865  if (job == NULL) return OSNaN();
1866  if (job->timingInformation == NULL) return OSNaN();
1867  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
1868  throw ErrorClass("idx is outside of range in routine getTimingInfoValue()");
1869  if (job->timingInformation->time[idx] == NULL) return OSNaN();
1870  return job->timingInformation->time[idx]->value;
1871 }//getTimingInfoValue
1872 
1874 {
1875  if (job == NULL) return "";
1876  if (job->usedDiskSpace == NULL) return "";
1877  return job->usedDiskSpace->unit;
1878 }//getUsedDiskSpaceUnit
1879 
1881 {
1882  if (job == NULL) return "";
1883  if (job->usedDiskSpace == NULL) return "";
1884  return job->usedDiskSpace->description;
1885 }//getUsedDiskSpaceDescription
1886 
1888 {
1889  if (job == NULL) return -1.;
1890  if (job->usedDiskSpace == NULL) return -1.;
1891  return job->usedDiskSpace->value;
1892 }//getUsedDiskSpaceValue
1893 
1895 {
1896  if (job == NULL) return "";
1897  if (job->usedMemory == NULL) return "";
1898  return job->usedMemory->unit;
1899 }//getUsedMemoryUnit
1900 
1902 {
1903  if (job == NULL) return "";
1904  if (job->usedMemory == NULL) return "";
1905  return job->usedMemory->description;
1906 }//getUsedMemoryDescription
1907 
1909 {
1910  if (job == NULL) return -1.;
1911  if (job->usedMemory == NULL) return -1.;
1912  return job->usedMemory->value;
1913 }//getUsedMemoryValue
1914 
1916 {
1917  if (job == NULL) return "";
1918  if (job->usedCPUSpeed == NULL) return "";
1919  return job->usedCPUSpeed->unit;
1920 }//getUsedCPUSpeedUnit
1921 
1923 {
1924  if (job == NULL) return "";
1925  if (job->usedCPUSpeed == NULL) return "";
1926  return job->usedCPUSpeed->description;
1927 }//getUsedCPUSpeedDescription
1928 
1930 {
1931  if (job == NULL) return -1.;
1932  if (job->usedCPUSpeed == NULL) return -1.;
1933  return job->usedCPUSpeed->value;
1934 }//getUsedCPUSpeedValue
1935 
1937 {
1938  if (job == NULL) return "";
1939  if (job->usedCPUNumber == NULL) return "";
1940  return job->usedCPUNumber->description;
1941 }//getUsedCPUNumberDescription
1942 
1944 {
1945  if (job == NULL) return -1;
1946  if (job->usedCPUNumber == NULL) return -1;
1947  return job->usedCPUNumber->value;
1948 }//getUsedCPUNumberValue
1949 
1951 {
1952  if (job == NULL) return -1;
1953  if (job->otherResults == NULL) return -1;
1955 }//getNumberOfOtherJobResults
1956 
1958 {
1959  if (job == NULL) return "";
1960  if (job->otherResults == NULL) return "";
1961  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
1962  throw ErrorClass("idx is outside of range in routine getOtherJobResultName()");
1963  if (job->otherResults->other[idx] == NULL) return "";
1964  return job->otherResults->other[idx]->name;
1965 }//getOtherJobResultName
1966 
1968 {
1969  if (job == NULL) return "";
1970  if (job->otherResults == NULL) return "";
1971  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
1972  throw ErrorClass("idx is outside of range in routine getOtherJobResultValue()");
1973  if (job->otherResults->other[idx] == NULL) return "";
1974  return job->otherResults->other[idx]->value;
1975 }//getOtherJobResultValue
1976 
1978 {
1979  if (job == NULL) return "";
1980  if (job->otherResults == NULL) return "";
1981  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
1982  throw ErrorClass("idx is outside of range in routine getOtherJobResultDescription()");
1983  if (job->otherResults->other[idx] == NULL) return "";
1984  return job->otherResults->other[idx]->description;
1985 }//getOtherJobResultDescription
1986 
1988 {
1989  if (job == NULL) return 0.0;
1990  if (job->timingInformation == NULL) return 0.0;
1991  if (job->timingInformation->numberOfTimes <= 0) return 0.0;
1992  return job->timingInformation->time[0]->value;
1993 }//getTimeValue
1994 
1996 {
1997  if (job == NULL) return -1;
1998  if (job->timingInformation == NULL) return -1;
2000 }//getTimeNumber
2001 
2002 
2004 {
2005  if(m_iVariableNumber == -1)
2006  {
2007  if(optimization == NULL) return -1;
2009  }
2010  return m_iVariableNumber;
2011 }//getVariableNumber
2012 
2014 {
2015  if(m_iObjectiveNumber == -1)
2016  {
2017  if(optimization == NULL) return -1;
2019  }
2020  return m_iObjectiveNumber;
2021 }//getObjectiveNumber
2022 
2024 {
2025  if(m_iConstraintNumber == -1)
2026  {
2027  if(optimization == NULL) return -1;
2029  }
2030  return m_iConstraintNumber;
2031 }//getConstraintNumber
2032 
2034 {
2035  if(optimization == NULL) return 0;
2036  if(optimization->solution == NULL) return 0;
2038 }//getSolutionNumber
2039 
2040 
2042 {
2043  if (optimization == NULL || optimization->solution == NULL)
2044  throw ErrorClass("No solution defined");
2045  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2046  throw ErrorClass("solIdx is outside of range in routine getSolutionStatus()");
2047  if(optimization->solution[solIdx] == NULL) return NULL;
2048  return optimization->solution[solIdx]->status;
2049 }//getSolutionStatus
2050 
2052 {
2053  if (optimization == NULL || optimization->solution == NULL)
2054  throw ErrorClass("No solution defined");
2055  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2056  throw ErrorClass("solIdx is outside of range in routine getSolutionStatusType()");
2057  if (optimization->solution[solIdx] == NULL) return "";
2058  if (optimization->solution[solIdx]->status == NULL) return "";
2059  return optimization->solution[solIdx]->status->type;
2060 }//getSolutionStatusType
2061 
2063 {
2064  if (optimization == NULL || optimization->solution == NULL)
2065  throw ErrorClass("No solution defined");
2066  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2067  throw ErrorClass("solIdx is outside of range in routine getSolutionStatusDescription()");
2068  if (optimization->solution[solIdx] == NULL) return "";
2069  if (optimization->solution[solIdx]->status == NULL) return "";
2070  return optimization->solution[solIdx]->status->description;
2071 }//getSolutionStatusDescription
2072 
2074 {
2075  if (optimization == NULL || optimization->solution == NULL)
2076  throw ErrorClass("No solution defined");
2077  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2078  throw ErrorClass("solIdx is outside of range in routine getNumberOfSolutionSubstatuses()");
2079  if (optimization->solution[solIdx] == NULL) return -1;
2080  if (optimization->solution[solIdx]->status == NULL) return -1;
2081  return optimization->solution[solIdx]->status->numberOfSubstatuses;
2082 }//getNumberOfSolutionSubstatuses
2083 
2084 string OSResult::getSolutionSubstatusType(int solIdx, int substatusIdx)
2085 {
2086  if (optimization == NULL || optimization->solution == NULL)
2087  throw ErrorClass("No solution defined");
2088  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2089  throw ErrorClass("solIdx is outside of range in routine getSolutionSubstatusType()");
2090  if (optimization->solution[solIdx] == NULL) return "";
2091  if (optimization->solution[solIdx]->status == NULL) return "";
2092  if (substatusIdx < 0 || substatusIdx >= optimization->solution[solIdx]->status->numberOfSubstatuses)
2093  throw ErrorClass("solution substatus index is outside of range in routine getSolutionSubstatusType()");
2094  return optimization->solution[solIdx]->status->substatus[substatusIdx]->type;
2095 }//getSolutionSubstatusType
2096 
2097 string OSResult::getSolutionSubstatusDescription(int solIdx, int substatusIdx)
2098 {
2099  if (optimization == NULL || optimization->solution == NULL)
2100  throw ErrorClass("No solution defined");
2101  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2102  throw ErrorClass("solIdx is outside of range in routine getSolutionSubstatusDescription()");
2103  if (optimization->solution[solIdx] == NULL) return "";
2104  if (optimization->solution[solIdx]->status == NULL) return "";
2105  if (substatusIdx < 0 || substatusIdx >= optimization->solution[solIdx]->status->numberOfSubstatuses)
2106  return "";
2107  return optimization->solution[solIdx]->status->substatus[substatusIdx]->description;
2108 }//getSolutionSubstatusDescription
2109 
2111 {
2112  if (optimization == NULL || optimization->solution == NULL)
2113  throw ErrorClass("No solution defined");
2114  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2115  throw ErrorClass("solIdx is outside of range in routine getSolutionTargetObjectiveIdx()");
2116  if (optimization->solution[solIdx] == NULL) return 0;
2117  return optimization->solution[solIdx]->targetObjectiveIdx;
2118 }//getSolutionTargetObjectiveIdx
2119 
2121 {
2122  if (optimization == NULL || optimization->solution == NULL)
2123  throw ErrorClass("No solution defined");
2124  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2125  throw ErrorClass("solIdx is outside of range in routine getSolutionTargetObjectiveName()");
2126  if (optimization->solution[solIdx] == NULL) return 0;
2127  return optimization->solution[solIdx]->targetObjectiveName;
2128 }//getSolutionTargetObjectiveName
2129 
2131 {
2132  if (optimization == NULL || optimization->solution == NULL)
2133  throw ErrorClass("No solution defined");
2134  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2135  throw ErrorClass("solIdx is outside of range in routine getSolutionWeightedObjectives()");
2136  if (optimization->solution[solIdx] == NULL) return false;
2137  return optimization->solution[solIdx]->weightedObjectives;
2138 }//getSolutionWeightedObjectives
2139 
2141 {
2142  if(optimization == NULL) return "there is no solution";
2143  if(optimization->solution == NULL ||
2144  solIdx < 0 || solIdx >= optimization->numberOfSolutions) return "there is no solution";
2145  if(optimization->solution[solIdx] == NULL) return "there is no solution";
2146  return optimization->solution[solIdx]->message;
2147 }//getSolutionMessage
2148 
2150 {
2151  if (optimization == NULL || optimization->solution == NULL)
2152  throw ErrorClass("No solution defined");
2153  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2154  throw ErrorClass("solIdx is outside of range in routine getNumberOfPrimalVariableValues()");
2155  if (optimization->solution[solIdx] == NULL) return -1;
2156  if (optimization->solution[solIdx]->variables == NULL) return -1;
2157  if (optimization->solution[solIdx]->variables->values == NULL) return -1;
2158  return optimization->solution[solIdx]->variables->values->numberOfVar;
2159 }//getNumberOfPrimalVariableValues
2160 
2162 {
2163  if (optimization == NULL || optimization->solution == NULL)
2164  throw ErrorClass("No solution defined");
2165  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2166  throw ErrorClass("solIdx is outside of range in routine getNumberOfVarValues()");
2167  if (optimization->solution[solIdx] == NULL) return -1;
2168  if (optimization->solution[solIdx]->variables == NULL) return -1;
2169  if (optimization->solution[solIdx]->variables->values == NULL) return -1;
2170  return optimization->solution[solIdx]->variables->values->numberOfVar;
2171 }//getNumberOfVarValues
2172 
2173 int OSResult::getVarValueIdx(int solIdx, int varIdx)
2174 {
2175  if (optimization == NULL || optimization->solution == NULL)
2176  throw ErrorClass("No solution defined");
2177  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2178  throw ErrorClass("solIdx is outside of range in routine getVarValueIdx()");
2179  if (optimization->solution[solIdx] == NULL) return -1;
2180  if (optimization->solution[solIdx]->variables == NULL) return -1;
2181  if (optimization->solution[solIdx]->variables->values == NULL) return -1;
2182  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->values->numberOfVar)
2183  throw ErrorClass("varIdx is outside of range in routine getVarValueIdx()");
2184  return optimization->solution[solIdx]->variables->values->var[varIdx]->idx;
2185 }//getVarValueIdx
2186 
2187 std::string OSResult::getVarValueName(int solIdx, int varIdx)
2188 {
2189  if (optimization == NULL || optimization->solution == NULL)
2190  throw ErrorClass("No solution defined");
2191  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2192  throw ErrorClass("solIdx is outside of range in routine getVarValueIdx()");
2193  if (optimization->solution[solIdx] == NULL) return "";
2194  if (optimization->solution[solIdx]->variables == NULL) return "";
2195  if (optimization->solution[solIdx]->variables->values == NULL) return "";
2196  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->values->numberOfVar)
2197  throw ErrorClass("varIdx is outside of range in routine getVarValueIdx()");
2198  return optimization->solution[solIdx]->variables->values->var[varIdx]->name;
2199 }//getVarValueName
2200 
2201 double OSResult::getVarValue(int solIdx, int varIdx)
2202 {
2203  if (optimization == NULL || optimization->solution == NULL)
2204  throw ErrorClass("No solution defined");
2205  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2206  throw ErrorClass("solIdx is outside of range in routine getVarValue()");
2207  if (optimization->solution[solIdx] == NULL) return OSNaN();
2208  if (optimization->solution[solIdx]->variables == NULL) return OSNaN();
2209  if (optimization->solution[solIdx]->variables->values == NULL) return OSNaN();
2210  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->values->numberOfVar)
2211  throw ErrorClass("varIdx is outside of range in routine getVarValue()");
2212  return optimization->solution[solIdx]->variables->values->var[varIdx]->value;
2213 }//getVarValue
2214 
2215 std::vector<IndexValuePair*> OSResult::getOptimalPrimalVariableValues(int solIdx)
2216 {
2217  int numberOfVar;
2218  struct IndexValuePair *primalValPair;
2219  int iSolutions = this->getSolutionNumber();
2220  for(int i = 0; i < iSolutions; i++)
2221  {
2222  if( i != solIdx) continue;
2223  if(optimization->solution[i] == NULL) continue;
2224  if(optimization->solution[i]->variables == NULL) continue;
2225  if(optimization->solution[i]->variables->values == NULL) continue;
2226  if((optimization->solution[i]->status->type.find("ptimal") != string::npos && m_mdPrimalValues == NULL) ||
2227  optimization->solution[i]->status->type.compare("globallyOptimal") == 0)
2228  {
2229  numberOfVar = optimization->solution[i]->variables->values->numberOfVar;
2230  for(int j = 0; j < numberOfVar; j++)
2231  {
2232  primalValPair = new IndexValuePair();
2233  primalValPair->value = optimization->solution[i]->variables->values->var[j]->value;
2234  primalValPair->idx = optimization->solution[i]->variables->values->var[j]->idx;
2235  primalVals.push_back( primalValPair);
2236  }
2237  }
2238  if(optimization->solution[i]->status->type.compare("globallyOptimal") == 0)
2239  {
2240  return primalVals;
2241  }
2242  }
2243  return primalVals;
2244 }//getOptimalPrimalVariableValues
2245 
2246 
2248 {
2249  if (optimization == NULL || optimization->solution == NULL)
2250  throw ErrorClass("No solution defined");
2251  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2252  throw ErrorClass("solIdx is outside of range in routine getNumberOfVarValuesString()");
2253  if (optimization->solution[solIdx] == NULL) return -1;
2254  if (optimization->solution[solIdx]->variables == NULL) return -1;
2255  if (optimization->solution[solIdx]->variables->valuesString == NULL) return -1;
2257 }//getNumberOfVarValuesString
2258 
2259 int OSResult::getVarValueStringIdx(int solIdx, int varIdx)
2260 {
2261  if (optimization == NULL || optimization->solution == NULL)
2262  throw ErrorClass("No solution defined");
2263  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2264  throw ErrorClass("solIdx is outside of range in routine getVarValueStringIdx()");
2265  if (optimization->solution[solIdx] == NULL) return -1;
2266  if (optimization->solution[solIdx]->variables == NULL) return -1;
2267  if (optimization->solution[solIdx]->variables->valuesString == NULL) return -1;
2268  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->valuesString->numberOfVar)
2269  throw ErrorClass("varIdx is outside of range in routine getVarValueStringIdx()");
2270  return optimization->solution[solIdx]->variables->valuesString->var[varIdx]->idx;
2271 }//getVarValueStringIdx
2272 
2273 std::string OSResult::getVarValueStringName(int solIdx, int varIdx)
2274 {
2275  if (optimization == NULL || optimization->solution == NULL)
2276  throw ErrorClass("No solution defined");
2277  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2278  throw ErrorClass("solIdx is outside of range in routine getVarValueStringIdx()");
2279  if (optimization->solution[solIdx] == NULL) return "";
2280  if (optimization->solution[solIdx]->variables == NULL) return "";
2281  if (optimization->solution[solIdx]->variables->valuesString == NULL) return "";
2282  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->valuesString->numberOfVar)
2283  throw ErrorClass("varIdx is outside of range in routine getVarValueStringIdx()");
2284  return optimization->solution[solIdx]->variables->valuesString->var[varIdx]->name;
2285 }//getVarValueStringName
2286 
2287 std::string OSResult::getVarValueString(int solIdx, int varIdx)
2288 {
2289  if (optimization == NULL || optimization->solution == NULL)
2290  throw ErrorClass("No solution defined");
2291  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2292  throw ErrorClass("solIdx is outside of range in routine getVarValueString()");
2293  if (optimization->solution[solIdx] == NULL) return NULL;
2294  if (optimization->solution[solIdx]->variables == NULL) return NULL;
2295  if (optimization->solution[solIdx]->variables->valuesString == NULL) return NULL;
2296  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->valuesString->numberOfVar)
2297  throw ErrorClass("varIdx is outside of range in routine getVarValueString()");
2298  return optimization->solution[solIdx]->variables->valuesString->var[varIdx]->value;
2299 }//getVarValueString
2300 
2301 int OSResult::getBasisStatusNumberOfEl(int solIdx, int object, int status)
2302 {
2303  if (optimization == NULL || optimization->solution == NULL)
2304  throw ErrorClass("No solution defined");
2305  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2306  throw ErrorClass("solIdx is outside of range in routine getBasisStatusNumberOfEl()");
2307  if (optimization->solution[solIdx] == NULL) return -1;
2308 
2309  switch (object)
2310  {
2312  {
2313  if (optimization->solution[solIdx]->variables == NULL) return -1;
2314  if (optimization->solution[solIdx]->variables->basisStatus == NULL) return -1;
2315  return optimization->solution[solIdx]->variables->basisStatus->getNumberOfEl(status);
2316  }
2318  {
2319  if (optimization->solution[solIdx]->objectives == NULL) return -1;
2320  if (optimization->solution[solIdx]->objectives->basisStatus == NULL) return -1;
2321  return optimization->solution[solIdx]->objectives->basisStatus->getNumberOfEl(status);
2322  }
2324  {
2325  if (optimization->solution[solIdx]->constraints == NULL) return -1;
2326  if (optimization->solution[solIdx]->constraints->basisStatus == NULL) return -1;
2327  return optimization->solution[solIdx]->constraints->basisStatus->getNumberOfEl(status);
2328  }
2329  default:
2330  throw ErrorClass("target object not implemented in getBasisStatusNumberOfEl");
2331  }
2332 }//getBasisStatusNumberOfEl
2333 
2334 int OSResult::getBasisStatusEl(int solIdx, int object, int status, int j)
2335 {
2336  if (optimization == NULL || optimization->solution == NULL)
2337  throw ErrorClass("No solution defined");
2338  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2339  throw ErrorClass("solIdx is outside of range in routine getBasisStatusEl()");
2340  if (optimization->solution[solIdx] == NULL)
2341  throw ErrorClass("solution never defined in routine getBasisStatusEl()");
2342 
2343  switch (object)
2344  {
2346  {
2347  if (optimization->solution[solIdx]->variables == NULL)
2348  throw ErrorClass("variables result never defined in routine getBasisStatusEl()");
2349  if (optimization->solution[solIdx]->variables->basisStatus == NULL)
2350  throw ErrorClass("basis status never defined in routine getBasisStatusEl()");
2351  return optimization->solution[solIdx]->variables->basisStatus->getEl(status, j);
2352  }
2354  {
2355  if (optimization->solution[solIdx]->objectives == NULL)
2356  throw ErrorClass("objectives result never defined in routine getBasisStatusEl()");
2357  if (optimization->solution[solIdx]->objectives->basisStatus == NULL)
2358  throw ErrorClass("basis status never defined in routine getBasisStatusEl()");
2359  return optimization->solution[solIdx]->objectives->basisStatus->getEl(status, j);
2360  }
2362  {
2363  if (optimization->solution[solIdx]->constraints == NULL)
2364  throw ErrorClass("constraints result never defined in routine getBasisStatusEl()");
2365  if (optimization->solution[solIdx]->constraints->basisStatus == NULL)
2366  throw ErrorClass("basis status never defined in routine getBasisStatusEl()");
2367  return optimization->solution[solIdx]->constraints->basisStatus->getEl(status, j);
2368  }
2369  default:
2370  throw ErrorClass("target object not implemented in getBasisStatusEl");
2371  }
2372 }//getBasisStatusEl
2373 
2374 int OSResult::getBasisInformationDense(int solIdx, int object, int* resultArray, int dim)
2375 {
2376  if (optimization == NULL || optimization->solution == NULL)
2377  throw ErrorClass("No solution defined");
2378  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2379  throw ErrorClass("solIdx is outside of range in routine getBasisInformationDense()");
2380  if (optimization->solution[solIdx] == NULL)
2381  throw ErrorClass("solution never defined in routine getBasisInformationDense()");
2382 
2383  for (int i=0; i<dim; i++)
2384  resultArray[i] = 0;
2385 
2386  switch (object)
2387  {
2389  {
2390  if (optimization->solution[solIdx]->variables == NULL)
2391  throw ErrorClass("variables result never defined in routine getBasisInformationDense()");
2392  if (optimization->solution[solIdx]->variables->basisStatus == NULL)
2393  throw ErrorClass("basis status never defined in routine getBasisInformationDense()");
2394  return optimization->solution[solIdx]->variables->basisStatus->getBasisDense(resultArray, dim, false);
2395  }
2397  {
2398  if (optimization->solution[solIdx]->objectives == NULL)
2399  throw ErrorClass("objectives result never defined in routine getBasisInformationDense()");
2400  if (optimization->solution[solIdx]->objectives->basisStatus == NULL)
2401  throw ErrorClass("basis status never defined in routine getBasisInformationDense()");
2402  return optimization->solution[solIdx]->objectives->basisStatus->getBasisDense(resultArray, dim, true);
2403  }
2405  {
2406  if (optimization->solution[solIdx]->constraints == NULL)
2407  throw ErrorClass("constraints result never defined in routine getBasisInformationDense()");
2408  if (optimization->solution[solIdx]->constraints->basisStatus == NULL)
2409  throw ErrorClass("basis status never defined in routine getBasisInformationDense()");
2410  return optimization->solution[solIdx]->constraints->basisStatus->getBasisDense(resultArray, dim, false);
2411  }
2412  default:
2413  throw ErrorClass("target object not implemented in getBasisInformationDense");
2414  }
2415 }//getBasisInformationDense
2416 
2417 /*
2418 int OSResult::getNumberOfBasisVar(int solIdx){
2419  if (optimization == NULL || optimization->solution == NULL)
2420  throw ErrorClass("No solution defined");
2421  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2422  throw ErrorClass("solIdx is outside of range in routine getNumberOfBasisVar()");
2423  if (optimization->solution[solIdx] == NULL) return -1;
2424  if (optimization->solution[solIdx]->variables == NULL) return -1;
2425  if (optimization->solution[solIdx]->variables->basisStatus == NULL) return -1;
2426  return optimization->solution[solIdx]->variables->basisStatus->numberOfVar;
2427 }//getNumberOfBasisVar
2428 
2429 int OSResult::getBasisVarIdx(int solIdx, int varIdx){
2430  if (optimization == NULL || optimization->solution == NULL)
2431  throw ErrorClass("No solution defined");
2432  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2433  throw ErrorClass("solIdx is outside of range in routine getBasisVarIdx()");
2434  if (optimization->solution[solIdx] == NULL) return -1;
2435  if (optimization->solution[solIdx]->variables == NULL) return -1;
2436  if (optimization->solution[solIdx]->variables->valuesString == NULL) return -1;
2437  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->basisStatus->numberOfVar)
2438  throw ErrorClass("varIdx is outside of range in routine getBasisVarIdx()");
2439  return optimization->solution[solIdx]->variables->basisStatus->var[varIdx]->idx;
2440 }//getBasisVarIdx
2441 
2442 std::string OSResult::getBasisVar(int solIdx, int varIdx){
2443  if (optimization == NULL || optimization->solution == NULL)
2444  throw ErrorClass("No solution defined");
2445  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2446  throw ErrorClass("solIdx is outside of range in routine getBasisVar()");
2447  if (optimization->solution[solIdx] == NULL) return "";
2448  if (optimization->solution[solIdx]->variables == NULL) return "";
2449  if (optimization->solution[solIdx]->variables->valuesString == NULL) return "";
2450  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->basisStatus->numberOfVar)
2451  throw ErrorClass("varIdx is outside of range in routine getBasisVar()");
2452  return optimization->solution[solIdx]->variables->basisStatus->var[varIdx]->value;
2453 }//getBasisVar
2454 */
2455 
2457 {
2459  {
2460  if (optimization == NULL || optimization->solution == NULL)
2461  throw ErrorClass("No solution defined");
2462  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2463  throw ErrorClass("solIdx is outside of range in routine getNumberOfOtherVariableResults()");
2464  if(optimization->solution[solIdx] == NULL)
2465  throw ErrorClass("solution was never defined in routine getNumberOfOtherVariableResults()");
2466  if(optimization->solution[solIdx]->variables == NULL) return 0;
2467  if(optimization->solution[solIdx]->variables->other == NULL) return 0;
2469  }
2471 }//getNumberOfOtherVariableResults
2472 
2474 {
2475  if (optimization == NULL || optimization->solution == NULL)
2476  throw ErrorClass("No solution defined");
2477  int iSolutions = this->getSolutionNumber();
2478  if (solIdx < 0 || solIdx >= iSolutions)
2479  throw ErrorClass("solIdx is outside of range in routine getAnOtherVariableResultNumberOfVar()");
2480  if (optimization->solution[solIdx] == NULL) return -1;
2481  if (optimization->solution[solIdx]->variables == NULL) return -1;
2482  if (optimization->solution[solIdx]->variables->other == NULL) return -1;
2483  if (iOther < 0 || iOther >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2484  throw ErrorClass("other variables result index is outside of range in routine getAnOtherVariableResultNumberOfVar()");
2485  return optimization->solution[solIdx]->variables->other[iOther]->numberOfVar;
2486 }//getAnOtherVariableResultNumberOfVar
2487 
2488 string OSResult::getOtherVariableResultName(int solIdx, int otherIdx)
2489 {
2490  if (optimization == NULL || optimization->solution == NULL)
2491  throw ErrorClass("No solution defined");
2492  int iSolutions = this->getSolutionNumber();
2493  if (solIdx < 0 || solIdx >= iSolutions)
2494  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultName()");
2495  if (optimization->solution[solIdx] == NULL) return "";
2496  if (optimization->solution[solIdx]->variables == NULL) return "";
2497  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2498  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2499  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultName()");
2500  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2501  return optimization->solution[solIdx]->variables->other[ otherIdx]->name;
2502 }//getOtherVariableResultName
2503 
2504 string OSResult::getOtherVariableResultType(int solIdx, int otherIdx)
2505 {
2506  if (optimization == NULL || optimization->solution == NULL)
2507  throw ErrorClass("No solution defined");
2508  int iSolutions = this->getSolutionNumber();
2509  if (solIdx < 0 || solIdx >= iSolutions)
2510  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultType()");
2511  if (optimization->solution[solIdx] == NULL) return "";
2512  if (optimization->solution[solIdx]->variables == NULL) return "";
2513  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2514  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2515  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultType()");
2516  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2517  return optimization->solution[solIdx]->variables->other[ otherIdx]->type;
2518 }//getOtherVariableResultType
2519 
2520 string OSResult::getOtherVariableResultValue(int solIdx, int otherIdx)
2521 {
2522  if (optimization == NULL || optimization->solution == NULL)
2523  throw ErrorClass("No solution defined");
2524  int iSolutions = this->getSolutionNumber();
2525  if (solIdx < 0 || solIdx >= iSolutions)
2526  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultValue()");
2527  if (optimization->solution[solIdx] == NULL) return "";
2528  if (optimization->solution[solIdx]->variables == NULL) return "";
2529  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2530  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2531  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultValue()");
2532  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2533  return optimization->solution[solIdx]->variables->other[ otherIdx]->value;
2534 }//getOtherVariableResultValue
2535 
2536 string OSResult::getOtherVariableResultDescription(int solIdx, int otherIdx)
2537 {
2538  if (optimization == NULL || optimization->solution == NULL)
2539  throw ErrorClass("No solution defined");
2540  int iSolutions = this->getSolutionNumber();
2541  if (solIdx < 0 || solIdx >= iSolutions)
2542  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultDescription()");
2543  if (optimization->solution[solIdx] == NULL) return "";
2544  if (optimization->solution[solIdx]->variables == NULL) return "";
2545  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2546  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2547  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultDescription()");
2548  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2549  return optimization->solution[solIdx]->variables->other[ otherIdx]->description;
2550 }//getOtherVariableResultDescription
2551 
2552 int OSResult::getOtherVariableResultNumberOfVar(int solIdx, int otherIdx)
2553 {
2554  if (optimization == NULL || optimization->solution == NULL)
2555  throw ErrorClass("No solution defined");
2556  int iSolutions = this->getSolutionNumber();
2557  if (solIdx < 0 || solIdx >= iSolutions)
2558  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultNumberOfVar()");
2559  if (optimization->solution[solIdx] == NULL) return -1;
2560  if (optimization->solution[solIdx]->variables == NULL) return -1;
2561  if (optimization->solution[solIdx]->variables->other == NULL) return -1;
2562  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2563  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultNumberOfVar()");
2564  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return -1;
2565  return optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar;
2566 }//getOtherVariableResultNumberOfVar
2567 
2568 int OSResult::getOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx)
2569 {
2570  if (optimization == NULL || optimization->solution == NULL)
2571  throw ErrorClass("No solution defined");
2572  int iSolutions = this->getSolutionNumber();
2573  if (solIdx < 0 || solIdx >= iSolutions)
2574  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultVarIdx()");
2575  if (optimization->solution[solIdx] == NULL) return -1;
2576  if (optimization->solution[solIdx]->variables == NULL) return -1;
2577  if (optimization->solution[solIdx]->variables->other == NULL) return -1;
2578  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2579  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultVarIdx()");
2580  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return -1;
2581  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var == NULL) return -1;
2582  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar)
2583  throw ErrorClass("varIdx is outside of range in routine getOtherVariableResultVarIdx()");
2584  return optimization->solution[solIdx]->variables->other[otherIdx]->var[varIdx]->idx;
2585 }//getOtherVariableResultVarIdx
2586 
2587 string OSResult::getOtherVariableResultVar(int solIdx, int otherIdx, int varIdx)
2588 {
2589  if (optimization == NULL || optimization->solution == NULL)
2590  throw ErrorClass("No solution defined");
2591  int iSolutions = this->getSolutionNumber();
2592  if (solIdx < 0 || solIdx >= iSolutions)
2593  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultVar()");
2594  if (optimization->solution[solIdx] == NULL) return "";
2595  if (optimization->solution[solIdx]->variables == NULL) return "";
2596  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2597  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2598  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultVar()");
2599  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2600  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var == NULL) return "";
2601  if (varIdx < 0 || varIdx >= optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar)
2602  throw ErrorClass("varIdx is outside of range in routine getOtherVariableResultVar()");
2603  return optimization->solution[solIdx]->variables->other[otherIdx]->var[varIdx]->value;
2604 }//getOtherVariableResultVar
2605 
2606 
2608 {
2609  if (optimization == NULL || optimization->solution == NULL)
2610  throw ErrorClass("No solution defined");
2611  int iSolutions = this->getSolutionNumber();
2612  if (solIdx < 0 || solIdx >= iSolutions)
2613  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
2614  if (optimization->solution[solIdx] == NULL) return -1;
2615  if (optimization->solution[solIdx]->variables == NULL) return -1;
2616  if (optimization->solution[solIdx]->variables->other == NULL) return -1;
2617  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2618  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
2619  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return -1;
2620  return optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfEnumerations;
2621 }//getOtherVariableResultNumberOfEnumerations
2622 
2623 std::string OSResult::getOtherVariableResultArrayType(int solIdx,int otherIdx)
2624 {
2625  if (optimization == NULL || optimization->solution == NULL)
2626  throw ErrorClass("No solution defined");
2627  int iSolutions = this->getSolutionNumber();
2628  if (solIdx < 0 || solIdx >= iSolutions)
2629  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
2630  if (optimization->solution[solIdx] == NULL) return "";
2631  if (optimization->solution[solIdx]->variables == NULL) return "";
2632  if (optimization->solution[solIdx]->variables->other == NULL) return "";
2633  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2634  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
2635  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return "";
2636 
2637  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var != NULL)
2638  return optimization->solution[solIdx]->variables->other[ otherIdx]->varType;
2639  else if (optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration != NULL)
2640  return optimization->solution[solIdx]->variables->other[ otherIdx]->enumType;
2641  else
2642  return "";
2643 }//getOtherVariableResultArrayType
2644 
2645 
2646 std::string OSResult::getOtherVariableResultEnumerationValue(int solIdx,int otherIdx, int enumIdx)
2647 {
2648  if (optimization == NULL || optimization->solution == NULL)
2649  throw ErrorClass("No solution defined");
2650  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2651  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultEnumerationValue()");
2652  if (optimization->solution[solIdx] == NULL)
2653  throw ErrorClass("solution never defined in routine getOtherVariableResultEnumerationValue()");
2654 
2655  if (optimization->solution[solIdx]->variables == NULL)
2656  throw ErrorClass("variables result never defined in routine getOtherVariableResultEnumerationValue()");
2657  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2658  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultEnumerationValue()");
2659  if (optimization->solution[solIdx]->variables->other == NULL)
2660  throw ErrorClass("other variable array never defined in routine getOtherVariableResultEnumerationValue()");
2661  if (optimization->solution[solIdx]->variables->other[otherIdx] == NULL)
2662  throw ErrorClass("other variable result never defined in routine getOtherVariableResultEnumerationValue()");
2663  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2664  throw ErrorClass("enumerations array never defined in routine getOtherVariableResultEnumerationValue()");
2665  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations)
2666  throw ErrorClass("enumIdx is outside of range in routine getOtherVariableResultEnumerationValue()");
2667  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx] == NULL)
2668  throw ErrorClass("enumeration never defined in routine getOtherVariableResultEnumerationValue()");
2669 
2670  return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->value;
2671 }//getOtherVariableResultEnumerationValue
2672 
2673 std::string OSResult::getOtherVariableResultEnumerationDescription(int solIdx,int otherIdx, int enumIdx)
2674 {
2675  if (optimization == NULL || optimization->solution == NULL)
2676  throw ErrorClass("No solution defined");
2677  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2678  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultEnumerationDescription()");
2679  if (optimization->solution[solIdx] == NULL)
2680  throw ErrorClass("solution never defined in routine getOtherVariableResultEnumerationDescription()");
2681 
2682  if (optimization->solution[solIdx]->variables == NULL)
2683  throw ErrorClass("variables result never defined in routine getOtherVariableResultEnumerationDescription()");
2684  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2685  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultEnumerationDescription()");
2686  if (optimization->solution[solIdx]->variables->other == NULL)
2687  throw ErrorClass("other variable array never defined in routine getOtherVariableResultEnumerationDescription()");
2688  if (optimization->solution[solIdx]->variables->other[otherIdx] == NULL)
2689  throw ErrorClass("other variable result never defined in routine getOtherVariableResultEnumerationDescription()");
2690  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2691  throw ErrorClass("enumerations array never defined in routine getOtherVariableResultEnumerationDescription()");
2692  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations)
2693  throw ErrorClass("enumIdx is outside of range in routine getOtherVariableResultEnumerationDescription()");
2694  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx] == NULL)
2695  throw ErrorClass("enumeration never defined in routine getOtherVariableResultEnumerationDescription()");
2696 
2697  return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->description;
2698 }//getOtherVariableResultEnumerationDescription
2699 
2700 int OSResult::getOtherVariableResultEnumerationNumberOfEl(int solIdx,int otherIdx, int enumIdx)
2701 {
2702  if (optimization == NULL || optimization->solution == NULL)
2703  throw ErrorClass("No solution defined");
2704  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2705  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultEnumerationNumberOfEl()");
2706  if (optimization->solution[solIdx] == NULL)
2707  throw ErrorClass("solution never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2708 
2709  if (optimization->solution[solIdx]->variables == NULL)
2710  throw ErrorClass("variables result never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2711  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2712  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultEnumerationNumberOfEl()");
2713  if (optimization->solution[solIdx]->variables->other == NULL)
2714  throw ErrorClass("other variable array never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2715  if (optimization->solution[solIdx]->variables->other[otherIdx] == NULL)
2716  throw ErrorClass("other variable result never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2717  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2718  throw ErrorClass("enumerations array never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2719  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations)
2720  throw ErrorClass("enumIdx is outside of range in routine getOtherVariableResultEnumerationNumberOfEl()");
2721  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx] == NULL)
2722  throw ErrorClass("enumeration never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
2723 
2724  return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
2725 }//getOtherVariableResultEnumerationNumberOfEl
2726 
2727 int OSResult::getOtherVariableResultEnumerationEl(int solIdx,int otherIdx, int enumIdx, int j)
2728 {
2729  if (optimization == NULL || optimization->solution == NULL)
2730  throw ErrorClass("No solution defined");
2731  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2732  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultEnumerationEl()");
2733  if (optimization->solution[solIdx] == NULL)
2734  throw ErrorClass("solution never defined in routine getOtherVariableResultEnumerationEl()");
2735 
2736  if (optimization->solution[solIdx]->variables == NULL)
2737  throw ErrorClass("variables result never defined in routine getOtherVariableResultEnumerationEl()");
2738  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2739  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultEnumerationEl()");
2740  if (optimization->solution[solIdx]->variables->other == NULL)
2741  throw ErrorClass("other variable array never defined in routine getOtherVariableResultEnumerationEl()");
2742  if (optimization->solution[solIdx]->variables->other[otherIdx] == NULL)
2743  throw ErrorClass("other variable result never defined in routine getOtherVariableResultEnumerationEl()");
2744  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2745  throw ErrorClass("enumerations array never defined in routine getOtherVariableResultEnumerationEl()");
2746  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations)
2747  throw ErrorClass("enumIdx is outside of range in routine getOtherVariableResultEnumerationEl()");
2748  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx] == NULL)
2749  throw ErrorClass("enumeration never defined in routine getOtherVariableResultEnumerationEl()");
2750 
2751  return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->getEl(j);
2752 }//getOtherVariableResultEnumerationEl
2753 
2754 
2755 int OSResult::getOtherVariableResultArrayDense(int solIdx, int otherIdx, std::string* resultArray, int dim)
2756 {
2757  int i, j;
2758  if (optimization == NULL || optimization->solution == NULL)
2759  throw ErrorClass("No solution defined");
2760  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2761  throw ErrorClass("solIdx is outside of range in routine getOtherVariableResultArrayDense()");
2762  if (optimization->solution[solIdx] == NULL)
2763  throw ErrorClass("solution never defined in routine getOtherVariableResultArrayDense()");
2764  if (optimization->solution[solIdx]->variables == NULL)
2765  throw ErrorClass("variables result never defined in routine getOtherVariableResultArrayDense()");
2766  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2767  throw ErrorClass("otherIdx is outside of range in routine getOtherVariableResultArrayDense()");
2768  if (optimization->solution[solIdx]->variables->other == NULL)
2769  throw ErrorClass("other variable array never defined in routine getOtherVariableResultArrayDense()");
2770  if (optimization->solution[solIdx]->variables->other[otherIdx] == NULL)
2771  throw ErrorClass("other variable result never defined in routine getOtherVariableResultArrayDense()");
2772 
2773  if (optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2774  {
2775  if (optimization->solution[solIdx]->variables->other[otherIdx]->var == NULL)
2776  return 0; // neither <var> nor <enumeration>
2777  else // there is a <var> array
2778  {
2779  for (i=0; i<dim; i++)
2780  resultArray[i] = "";
2781  for (i=0; i<optimization->solution[solIdx]->variables->other[otherIdx]->numberOfVar; i++)
2782  {
2783  j = optimization->solution[solIdx]->variables->other[otherIdx]->var[i]->idx;
2784  if (j >= 0 && j < dim)
2785  resultArray[j] = optimization->solution[solIdx]->variables->other[otherIdx]->var[i]->value;
2786  else
2787  throw ErrorClass("variable index out of range in routine getOtherVariableResultArrayDense()");
2788  }
2789  return dim;
2790  }
2791  }
2792  else // there is an <enumeration> array
2793  {
2794  std::string val;
2795  int n,k;
2796 
2797  for (j=0; j<dim; j++)
2798  resultArray[j] = "";
2799 
2800  for (i=0; i<optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations; i++)
2801  {
2802  val = optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->value;
2803  n = optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->numberOfEl;
2804  for (j=0; j<n; j++)
2805  {
2806  k = optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->el[j];
2807  if (j >= 0 && j < dim)
2808  resultArray[k] = val;
2809  else
2810  throw ErrorClass("variable index out of range in routine getOtherVariableResultArrayDense()");
2811  }
2812  }
2813  return dim;
2814  }
2815  return -1;
2816 }//getOtherVariableResultArrayDense
2817 
2818 /*
2819 int* OSResult::getOtherOptionResultName(int solIdx, int otherIdx, char object, int status)
2820 {
2821  if (optimization == NULL || optimization->solution == NULL)
2822  throw ErrorClass("No solution defined");
2823  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2824  throw ErrorClass("solIdx is outside of range in routine getOtherOptionResultEl()");
2825  if (optimization->solution[solIdx] == NULL)
2826  throw ErrorClass("solution never defined in routine getOtherOptionResultEl()");
2827 
2828  switch (object)
2829  {
2830  case ENUM_PROBLEM_COMPONENT_variables:
2831  {
2832  if (optimization->solution[solIdx]->variables == NULL)
2833  throw ErrorClass("variables result never defined in routine getOtherOptionResultEl()");
2834  if (optimization->solution[solIdx]->variables->other == NULL)
2835  throw ErrorClass("other variable array never defined in routine getOtherOptionResultEl()");
2836  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2837  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2838  return optimization->solution[solIdx]->variables->other[otherIdx]->getEl(status);
2839  }
2840  case ENUM_PROBLEM_COMPONENT_objectives:
2841  {
2842  if (optimization->solution[solIdx]->objectives == NULL)
2843  throw ErrorClass("objectives result never defined in routine getOtherOptionResultEl()");
2844  if (optimization->solution[solIdx]->objectives->other == NULL)
2845  throw ErrorClass("other objective array never defined in routine getOtherOptionResultEl()");
2846  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
2847  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2848  return optimization->solution[solIdx]->objectives->other[otherIdx]->getEl(status);
2849  }
2850  case ENUM_PROBLEM_COMPONENT_constraints:
2851  {
2852  if (optimization->solution[solIdx]->constraints == NULL)
2853  throw ErrorClass("constraints result never defined in routine getOtherOptionResultEl()");
2854  if (optimization->solution[solIdx]->constraints->other == NULL)
2855  throw ErrorClass("other constraint array never defined in routine getOtherOptionResultEl()");
2856  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
2857  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2858  return optimization->solution[solIdx]->constraints->other[otherIdx]->getEl(status);
2859  }
2860  default:
2861  throw ErrorClass("target object not implemented in getOtherOptionResultEl");
2862  }
2863 }//getOtherOptionResultEl
2864 
2865 
2866 int* OSResult::getOtherOptionResultEl(int solIdx, int otherIdx, char object, int status)
2867 {
2868  if (optimization == NULL || optimization->solution == NULL)
2869  throw ErrorClass("No solution defined");
2870  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2871  throw ErrorClass("solIdx is outside of range in routine getOtherOptionResultEl()");
2872  if (optimization->solution[solIdx] == NULL)
2873  throw ErrorClass("solution never defined in routine getOtherOptionResultEl()");
2874 
2875  switch (object)
2876  {
2877  case ENUM_PROBLEM_COMPONENT_variables:
2878  {
2879  if (optimization->solution[solIdx]->variables == NULL)
2880  throw ErrorClass("variables result never defined in routine getOtherOptionResultEl()");
2881  if (optimization->solution[solIdx]->variables->other == NULL)
2882  throw ErrorClass("other variable array never defined in routine getOtherOptionResultEl()");
2883  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2884  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2885  return optimization->solution[solIdx]->variables->other[otherIdx]->getEl(status);
2886  }
2887  case ENUM_PROBLEM_COMPONENT_objectives:
2888  {
2889  if (optimization->solution[solIdx]->objectives == NULL)
2890  throw ErrorClass("objectives result never defined in routine getOtherOptionResultEl()");
2891  if (optimization->solution[solIdx]->objectives->other == NULL)
2892  throw ErrorClass("other objective array never defined in routine getOtherOptionResultEl()");
2893  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
2894  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2895  return optimization->solution[solIdx]->objectives->other[otherIdx]->getEl(status);
2896  }
2897  case ENUM_PROBLEM_COMPONENT_constraints:
2898  {
2899  if (optimization->solution[solIdx]->constraints == NULL)
2900  throw ErrorClass("constraints result never defined in routine getOtherOptionResultEl()");
2901  if (optimization->solution[solIdx]->constraints->other == NULL)
2902  throw ErrorClass("other constraint array never defined in routine getOtherOptionResultEl()");
2903  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
2904  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2905  return optimization->solution[solIdx]->constraints->other[otherIdx]->getEl(status);
2906  }
2907  default:
2908  throw ErrorClass("target object not implemented in getOtherOptionResultEl");
2909  }
2910 }//getOtherOptionResultEl
2911 
2912 
2913 int* OSResult::getOtherOptionResultEl(int solIdx, int otherIdx, char object, int status)
2914 {
2915  if (optimization == NULL || optimization->solution == NULL)
2916  throw ErrorClass("No solution defined");
2917  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2918  throw ErrorClass("solIdx is outside of range in routine getOtherOptionResultEl()");
2919  if (optimization->solution[solIdx] == NULL)
2920  throw ErrorClass("solution never defined in routine getOtherOptionResultEl()");
2921 
2922  switch (object)
2923  {
2924  case ENUM_PROBLEM_COMPONENT_variables:
2925  {
2926  if (optimization->solution[solIdx]->variables == NULL)
2927  throw ErrorClass("variables result never defined in routine getOtherOptionResultEl()");
2928  if (optimization->solution[solIdx]->variables->other == NULL)
2929  throw ErrorClass("other variable array never defined in routine getOtherOptionResultEl()");
2930  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2931  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2932  return optimization->solution[solIdx]->variables->other[otherIdx]->getEl(status);
2933  }
2934  case ENUM_PROBLEM_COMPONENT_objectives:
2935  {
2936  if (optimization->solution[solIdx]->objectives == NULL)
2937  throw ErrorClass("objectives result never defined in routine getOtherOptionResultEl()");
2938  if (optimization->solution[solIdx]->objectives->other == NULL)
2939  throw ErrorClass("other objective array never defined in routine getOtherOptionResultEl()");
2940  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
2941  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2942  return optimization->solution[solIdx]->objectives->other[otherIdx]->getEl(status);
2943  }
2944  case ENUM_PROBLEM_COMPONENT_constraints:
2945  {
2946  if (optimization->solution[solIdx]->constraints == NULL)
2947  throw ErrorClass("constraints result never defined in routine getOtherOptionResultEl()");
2948  if (optimization->solution[solIdx]->constraints->other == NULL)
2949  throw ErrorClass("other constraint array never defined in routine getOtherOptionResultEl()");
2950  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
2951  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2952  return optimization->solution[solIdx]->constraints->other[otherIdx]->getEl(status);
2953  }
2954  default:
2955  throw ErrorClass("target object not implemented in getOtherOptionResultEl");
2956  }
2957 }//getOtherOptionResultEl
2958 
2959 
2960 int* OSResult::getOtherOptionResultEl(int solIdx, int otherIdx, char object, int status)
2961 {
2962  if (optimization == NULL || optimization->solution == NULL)
2963  throw ErrorClass("No solution defined");
2964  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
2965  throw ErrorClass("solIdx is outside of range in routine getOtherOptionResultEl()");
2966  if (optimization->solution[solIdx] == NULL)
2967  throw ErrorClass("solution never defined in routine getOtherOptionResultEl()");
2968 
2969  switch (object)
2970  {
2971  case ENUM_PROBLEM_COMPONENT_variables:
2972  {
2973  if (optimization->solution[solIdx]->variables == NULL)
2974  throw ErrorClass("variables result never defined in routine getOtherOptionResultEl()");
2975  if (optimization->solution[solIdx]->variables->other == NULL)
2976  throw ErrorClass("other variable array never defined in routine getOtherOptionResultEl()");
2977  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->variables->numberOfOtherVariableResults)
2978  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2979  return optimization->solution[solIdx]->variables->other[otherIdx]->getEl(status);
2980  }
2981  case ENUM_PROBLEM_COMPONENT_objectives:
2982  {
2983  if (optimization->solution[solIdx]->objectives == NULL)
2984  throw ErrorClass("objectives result never defined in routine getOtherOptionResultEl()");
2985  if (optimization->solution[solIdx]->objectives->other == NULL)
2986  throw ErrorClass("other objective array never defined in routine getOtherOptionResultEl()");
2987  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
2988  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2989  return optimization->solution[solIdx]->objectives->other[otherIdx]->getEl(status);
2990  }
2991  case ENUM_PROBLEM_COMPONENT_constraints:
2992  {
2993  if (optimization->solution[solIdx]->constraints == NULL)
2994  throw ErrorClass("constraints result never defined in routine getOtherOptionResultEl()");
2995  if (optimization->solution[solIdx]->constraints->other == NULL)
2996  throw ErrorClass("other constraint array never defined in routine getOtherOptionResultEl()");
2997  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
2998  throw ErrorClass("otherIdx is outside of range in routine getOtherOptionResultEl()");
2999  return optimization->solution[solIdx]->constraints->other[otherIdx]->getEl(status);
3000  }
3001  default:
3002  throw ErrorClass("target object not implemented in getOtherOptionResultEl");
3003  }
3004 }//getOtherOptionResultEl
3005 */
3006 
3008 {
3009  if (optimization == NULL || optimization->solution == NULL)
3010  throw ErrorClass("No solution defined");
3011  int iSolutions = this->getSolutionNumber();
3012  if (solIdx < 0 || solIdx >= iSolutions)
3013  throw ErrorClass("solIdx is outside of range in routine getNumberOfObjValues()");
3014  if (optimization->solution[solIdx] == NULL) return -1;
3015  if (optimization->solution[solIdx]->objectives == NULL) return -1;
3016  if (optimization->solution[solIdx]->objectives->values == NULL) return -1;
3017  return optimization->solution[solIdx]->objectives->values->numberOfObj;
3018 }//getNumberOfObjValues
3019 
3020 int OSResult::getObjValueIdx(int solIdx, int objIdx)
3021 {
3022  if (optimization == NULL || optimization->solution == NULL)
3023  throw ErrorClass("No solution defined");
3024  int iSolutions = this->getSolutionNumber();
3025  if (solIdx < 0 || solIdx >= iSolutions)
3026  throw ErrorClass("solIdx is outside of range in routine getObjValueIdx()");
3027  if (optimization->solution[solIdx] == NULL) return 0;
3028  if (optimization->solution[solIdx]->objectives == NULL) return 0;
3029  if (optimization->solution[solIdx]->objectives->values == NULL) return 0;
3030  if (objIdx < 0 || objIdx >= optimization->solution[solIdx]->objectives->values->numberOfObj)
3031  throw ErrorClass("objIdx is outside of range in routine getObjValueIdx()");
3032  return optimization->solution[solIdx]->objectives->values->obj[objIdx]->idx;
3033 }//getObjValueIdx
3034 
3035 std::string OSResult::getObjValueName(int solIdx, int objIdx)
3036 {
3037  if (optimization == NULL || optimization->solution == NULL)
3038  throw ErrorClass("No solution defined");
3039  int iSolutions = this->getSolutionNumber();
3040  if (solIdx < 0 || solIdx >= iSolutions)
3041  throw ErrorClass("solIdx is outside of range in routine getObjValueIdx()");
3042  if (optimization->solution[solIdx] == NULL) return "";
3043  if (optimization->solution[solIdx]->objectives == NULL) return "";
3044  if (optimization->solution[solIdx]->objectives->values == NULL) return "";
3045  if (objIdx < 0 || objIdx >= optimization->solution[solIdx]->objectives->values->numberOfObj)
3046  throw ErrorClass("objIdx is outside of range in routine getObjValueIdx()");
3047  return optimization->solution[solIdx]->objectives->values->obj[objIdx]->name;
3048 }//getObjValueName
3049 
3050 double OSResult::getObjValue(int solIdx, int objIdx)
3051 {
3052  if (optimization == NULL || optimization->solution == NULL)
3053  throw ErrorClass("No solution defined");
3054  int iSolutions = this->getSolutionNumber();
3055  if (solIdx < 0 || solIdx >= iSolutions)
3056  throw ErrorClass("solIdx is outside of range in routine getObjValue()");
3057  if (optimization->solution[solIdx] == NULL) return OSNaN();
3058  if (optimization->solution[solIdx]->objectives == NULL) return OSNaN();
3059  if (optimization->solution[solIdx]->objectives->values == NULL) return OSNaN();
3060  if (objIdx < 0 || objIdx >= optimization->solution[solIdx]->objectives->values->numberOfObj)
3061  throw ErrorClass("objIdx is outside of range in routine getObjValue()");
3062  return optimization->solution[solIdx]->objectives->values->obj[objIdx]->value;
3063 }//getObjValue
3064 
3065 double OSResult::getOptimalObjValue(int objIdx, int solIdx)
3066 {
3067  if (this->optimization == NULL || this->optimization->solution == NULL)
3068  throw ErrorClass("No optimization or solution object defined");
3069  int iSolutions = this->getSolutionNumber();
3070  for (int i = 0; i < iSolutions; i++)
3071  {
3072  if(i != solIdx) continue;
3073  if(this->optimization->solution[i]->targetObjectiveIdx != objIdx) continue;
3074  if((this->optimization->solution[i]->status->type.find("ptimal") != string::npos ) ||
3075  this->optimization->solution[i]->status->type.compare("globallyOptimal") == 0)
3076  {
3077  if ((this->optimization->solution[i]->objectives != NULL) &&
3078  (this->optimization->solution[i]->objectives->values != NULL) &&
3079  (this->optimization->solution[i]->objectives->values->obj != NULL) )
3080  return this->optimization->solution[i]->objectives->values->obj[ (objIdx >= 0 ? objIdx : -objIdx -1) ]->value;
3081  else
3082  {
3083  throw ErrorClass("There is no optimal solution");
3084  }
3085  }
3086  else
3087  {
3088  throw ErrorClass("There is no optimal solution");
3089  }
3090  }
3091  throw ErrorClass("There is no optimal solution");
3092 }//getOptimalObjValue
3093 
3095 {
3096  if (optimization == NULL || optimization->solution == NULL)
3097  throw ErrorClass("No solution defined");
3098  int iSolutions = this->getSolutionNumber();
3099  if (solIdx < 0 || solIdx >= iSolutions)
3100  throw ErrorClass("solIdx is outside of range in routine getNumberOfOtherObjectiveResults()");
3101  if (optimization->solution[solIdx] == NULL)
3102  throw ErrorClass("solution was never defined in routine getNumberOfOtherObjectiveResults()");
3103  if (optimization->solution[solIdx]->objectives == NULL) return 0;
3104  if (optimization->solution[solIdx]->objectives->other == NULL) return 0;
3106 }//getNumberOfOtherObjectiveResults
3107 
3108 
3109 string OSResult::getOtherObjectiveResultName(int solIdx, int otherIdx)
3110 {
3111  if (optimization == NULL || optimization->solution == NULL)
3112  throw ErrorClass("No solution defined");
3113  int iSolutions = this->getSolutionNumber();
3114  if (solIdx < 0 || solIdx >= iSolutions)
3115  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultName()");
3116  if (optimization->solution[solIdx] == NULL) return "";
3117  if (optimization->solution[solIdx]->objectives == NULL) return "";
3118  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3119  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3120  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultName()");
3121  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3122  return optimization->solution[solIdx]->objectives->other[ otherIdx]->name;
3123 }//getOtherObjectiveResultName
3124 
3125 string OSResult::getOtherObjectiveResultType(int solIdx, int otherIdx)
3126 {
3127  if (optimization == NULL || optimization->solution == NULL)
3128  throw ErrorClass("No solution defined");
3129  int iSolutions = this->getSolutionNumber();
3130  if (solIdx < 0 || solIdx >= iSolutions)
3131  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultType()");
3132  if (optimization->solution[solIdx] == NULL) return "";
3133  if (optimization->solution[solIdx]->objectives == NULL) return "";
3134  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3135  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3136  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultType()");
3137  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3138  return optimization->solution[solIdx]->objectives->other[ otherIdx]->type;
3139 }//getOtherObjectiveResultType
3140 
3141 string OSResult::getOtherObjectiveResultValue(int solIdx, int otherIdx)
3142 {
3143  if (optimization == NULL || optimization->solution == NULL)
3144  throw ErrorClass("No solution defined");
3145  int iSolutions = this->getSolutionNumber();
3146  if (solIdx < 0 || solIdx >= iSolutions)
3147  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultValue()");
3148  if (optimization->solution[solIdx] == NULL) return "";
3149  if (optimization->solution[solIdx]->objectives == NULL) return "";
3150  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3151  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3152  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultValue()");
3153  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3154  return optimization->solution[solIdx]->objectives->other[ otherIdx]->value;
3155 }//getOtherObjectiveResultValue
3156 
3157 string OSResult::getOtherObjectiveResultDescription(int solIdx, int otherIdx)
3158 {
3159  if (optimization == NULL || optimization->solution == NULL)
3160  throw ErrorClass("No solution defined");
3161  int iSolutions = this->getSolutionNumber();
3162  if (solIdx < 0 || solIdx >= iSolutions)
3163  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultDescription()");
3164  if (optimization->solution[solIdx] == NULL) return "";
3165  if (optimization->solution[solIdx]->objectives == NULL) return "";
3166  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3167  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3168  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultDescription()");
3169  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3170  return optimization->solution[solIdx]->objectives->other[ otherIdx]->description;
3171 }//getOtherObjectiveResultDescription
3172 
3174 {
3175  if (optimization == NULL || optimization->solution == NULL)
3176  throw ErrorClass("No solution defined");
3177  int iSolutions = this->getSolutionNumber();
3178  if (solIdx < 0 || solIdx >= iSolutions)
3179  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultNumberOfObj()");
3180  if (optimization->solution[solIdx] == NULL) return -1;
3181  if (optimization->solution[solIdx]->objectives == NULL) return -1;
3182  if (optimization->solution[solIdx]->objectives->other == NULL) return -1;
3183  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3184  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultNumberOfObj()");
3185  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return -1;
3186  return optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfObj;
3187 }//getOtherObjectiveResultNumberOfObj
3188 
3189 int OSResult::getOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx)
3190 {
3191  if (optimization == NULL || optimization->solution == NULL)
3192  throw ErrorClass("No solution defined");
3193  int iSolutions = this->getSolutionNumber();
3194  if (solIdx < 0 || solIdx >= iSolutions)
3195  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultObjIdx()");
3196  if (optimization->solution[solIdx] == NULL) return 0;
3197  if (optimization->solution[solIdx]->objectives == NULL) return 0;
3198  if (optimization->solution[solIdx]->objectives->other == NULL) return 0;
3199  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3200  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultObjIdx()");
3201  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return -1;
3202  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->obj == NULL) return -1;
3203  if (objIdx < 0 || objIdx >= optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfObj)
3204  throw ErrorClass("objIdx is outside of range in routine getOtherObjectiveResultObjIdx()");
3205  return optimization->solution[solIdx]->objectives->other[otherIdx]->obj[objIdx]->idx;
3206 }//getOtherObjectiveResultObjIdx
3207 
3208 string OSResult::getOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx)
3209 {
3210  if (optimization == NULL || optimization->solution == NULL)
3211  throw ErrorClass("No solution defined");
3212  int iSolutions = this->getSolutionNumber();
3213 
3214  if (solIdx < 0 || solIdx >= iSolutions)
3215  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultObj()");
3216  if (optimization->solution[solIdx] == NULL) return "";
3217  if (optimization->solution[solIdx]->objectives == NULL) return "";
3218  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3219  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3220  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultObj()");
3221  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3222  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->obj == NULL) return "";
3223  if (objIdx < 0 || objIdx >= optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfObj)
3224  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultObj()");
3225  return optimization->solution[solIdx]->objectives->other[otherIdx]->obj[objIdx]->value;
3226 }//getOtherObjectiveResultObj
3227 
3228 
3230 {
3231  if (optimization == NULL || optimization->solution == NULL)
3232  throw ErrorClass("No solution defined");
3233  int iSolutions = this->getSolutionNumber();
3234  if (solIdx < 0 || solIdx >= iSolutions)
3235  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultNumberOfEnumerations()");
3236  if (optimization->solution[solIdx] == NULL) return -1;
3237  if (optimization->solution[solIdx]->objectives == NULL) return -1;
3238  if (optimization->solution[solIdx]->objectives->other == NULL) return -1;
3239  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3240  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultNumberOfEnumerations()");
3241  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return -1;
3242  return optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfEnumerations;
3243 }//getOtherObjectiveResultNumberOfEnumerations
3244 
3245 
3246 std::string OSResult::getOtherObjectiveResultArrayType(int solIdx, int otherIdx)
3247 {
3248  if (optimization == NULL || optimization->solution == NULL)
3249  throw ErrorClass("No solution defined");
3250  int iSolutions = this->getSolutionNumber();
3251  if (solIdx < 0 || solIdx >= iSolutions)
3252  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultArrayType()");
3253  if (optimization->solution[solIdx] == NULL) return "";
3254  if (optimization->solution[solIdx]->objectives == NULL) return "";
3255  if (optimization->solution[solIdx]->objectives->other == NULL) return "";
3256  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3257  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultArrayType()");
3258  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return "";
3259 
3260  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->obj != NULL)
3261  return optimization->solution[solIdx]->objectives->other[ otherIdx]->objType;
3262  else if (optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration != NULL)
3263  return optimization->solution[solIdx]->objectives->other[ otherIdx]->enumType;
3264  else
3265  return "";
3266 }//getOtherObjectiveResultArrayType
3267 
3268 
3269 std::string OSResult::getOtherObjectiveResultEnumerationValue(int solIdx,int otherIdx, int enumIdx)
3270 {
3271  if (optimization == NULL || optimization->solution == NULL)
3272  throw ErrorClass("No solution defined");
3273  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3274  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultEnumerationValue()");
3275  if (optimization->solution[solIdx] == NULL)
3276  throw ErrorClass("solution never defined in routine getOtherObjectiveResultEnumerationValue()");
3277 
3278  if (optimization->solution[solIdx]->objectives == NULL)
3279  throw ErrorClass("variables result never defined in routine getOtherObjectiveResultEnumerationValue()");
3280  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3281  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultEnumerationValue()");
3282  if (optimization->solution[solIdx]->objectives->other == NULL)
3283  throw ErrorClass("other variable array never defined in routine getOtherObjectiveResultEnumerationValue()");
3284  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL)
3285  throw ErrorClass("other variable result never defined in routine getOtherObjectiveResultEnumerationValue()");
3286  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3287  throw ErrorClass("enumerations array never defined in routine getOtherObjectiveResultEnumerationValue()");
3288  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations)
3289  throw ErrorClass("enumIdx is outside of range in routine getOtherObjectiveResultEnumerationValue()");
3290  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx] == NULL)
3291  throw ErrorClass("enumeration never defined in routine getOtherObjectiveResultEnumerationValue()");
3292 
3293  return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->value;
3294 }//getOtherObjectiveResultEnumerationValue
3295 
3296 
3297 std::string OSResult::getOtherObjectiveResultEnumerationDescription(int solIdx,int otherIdx, int enumIdx)
3298 {
3299  if (optimization == NULL || optimization->solution == NULL)
3300  throw ErrorClass("No solution defined");
3301  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3302  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultEnumerationDescription()");
3303  if (optimization->solution[solIdx] == NULL)
3304  throw ErrorClass("solution never defined in routine getOtherObjectiveResultEnumerationDescription()");
3305 
3306  if (optimization->solution[solIdx]->objectives == NULL)
3307  throw ErrorClass("variables result never defined in routine getOtherObjectiveResultEnumerationDescription()");
3308  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3309  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultEnumerationDescription()");
3310  if (optimization->solution[solIdx]->objectives->other == NULL)
3311  throw ErrorClass("other variable array never defined in routine getOtherObjectiveResultEnumerationDescription()");
3312  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL)
3313  throw ErrorClass("other variable result never defined in routine getOtherObjectiveResultEnumerationDescription()");
3314  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3315  throw ErrorClass("enumerations array never defined in routine getOtherObjectiveResultEnumerationDescription()");
3316  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations)
3317  throw ErrorClass("enumIdx is outside of range in routine getOtherObjectiveResultEnumerationDescription()");
3318  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx] == NULL)
3319  throw ErrorClass("enumeration never defined in routine getOtherObjectiveResultEnumerationDescription()");
3320 
3321  return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->description;
3322 }//getOtherObjectiveResultEnumerationDescription
3323 
3324 
3325 int OSResult::getOtherObjectiveResultEnumerationNumberOfEl(int solIdx,int otherIdx, int enumIdx)
3326 {
3327  if (optimization == NULL || optimization->solution == NULL)
3328  throw ErrorClass("No solution defined");
3329  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3330  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3331  if (optimization->solution[solIdx] == NULL)
3332  throw ErrorClass("solution never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3333 
3334  if (optimization->solution[solIdx]->objectives == NULL)
3335  throw ErrorClass("variables result never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3336  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3337  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3338  if (optimization->solution[solIdx]->objectives->other == NULL)
3339  throw ErrorClass("other variable array never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3340  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL)
3341  throw ErrorClass("other variable result never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3342  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3343  throw ErrorClass("enumerations array never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3344  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations)
3345  throw ErrorClass("enumIdx is outside of range in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3346  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx] == NULL)
3347  throw ErrorClass("enumeration never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3348 
3349  return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
3350 }//getOtherObjectiveResultEnumerationNumberOfEl
3351 
3352 
3353 int OSResult::getOtherObjectiveResultEnumerationEl(int solIdx,int otherIdx, int enumIdx, int j)
3354 {
3355  if (optimization == NULL || optimization->solution == NULL)
3356  throw ErrorClass("No solution defined");
3357  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3358  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultEnumerationEl()");
3359  if (optimization->solution[solIdx] == NULL)
3360  throw ErrorClass("solution never defined in routine getOtherObjectiveResultEnumerationEl()");
3361 
3362  if (optimization->solution[solIdx]->objectives == NULL)
3363  throw ErrorClass("variables result never defined in routine getOtherObjectiveResultEnumerationEl()");
3364  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3365  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultEnumerationEl()");
3366  if (optimization->solution[solIdx]->objectives->other == NULL)
3367  throw ErrorClass("other variable array never defined in routine getOtherObjectiveResultEnumerationEl()");
3368  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL)
3369  throw ErrorClass("other variable result never defined in routine getOtherObjectiveResultEnumerationEl()");
3370  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3371  throw ErrorClass("enumerations array never defined in routine getOtherObjectiveResultEnumerationEl()");
3372  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations)
3373  throw ErrorClass("enumIdx is outside of range in routine getOtherObjectiveResultEnumerationEl()");
3374  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx] == NULL)
3375  throw ErrorClass("enumeration never defined in routine getOtherObjectiveResultEnumerationEl()");
3376 
3377  return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->getEl(j);
3378 }//getOtherObjectiveResultEnumerationEl
3379 
3380 
3381 int OSResult::getOtherObjectiveResultArrayDense(int solIdx, int otherIdx, std::string* resultArray, int dim)
3382 {
3383  int i, j;
3384  if (optimization == NULL || optimization->solution == NULL)
3385  throw ErrorClass("No solution defined");
3386  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3387  throw ErrorClass("solIdx is outside of range in routine getOtherObjectiveResultArrayDense()");
3388  if (optimization->solution[solIdx] == NULL)
3389  throw ErrorClass("solution never defined in routine getOtherObjectiveResultArrayDense()");
3390  if (optimization->solution[solIdx]->objectives == NULL)
3391  throw ErrorClass("objectives result never defined in routine getOtherObjectiveResultArrayDense()");
3392  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults)
3393  throw ErrorClass("otherIdx is outside of range in routine getOtherObjectiveResultArrayDense()");
3394  if (optimization->solution[solIdx]->objectives->other == NULL)
3395  throw ErrorClass("other objective array never defined in routine getOtherObjectiveResultArrayDense()");
3396  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL)
3397  throw ErrorClass("other objective result never defined in routine getOtherObjectiveResultArrayDense()");
3398 
3399  if (optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3400  {
3401  if (optimization->solution[solIdx]->objectives->other[otherIdx]->obj == NULL)
3402  return 0; // neither <obj> nor <enumeration>
3403  else // there is a <obj> array
3404  {
3405  for (i=0; i<dim; i++)
3406  resultArray[i] = "";
3407  for (i=0; i<optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfObj; i++)
3408  {
3409  j = -1 - optimization->solution[solIdx]->objectives->other[otherIdx]->obj[i]->idx;
3410  if (j >= 0 && j < dim)
3411  resultArray[j] = optimization->solution[solIdx]->objectives->other[otherIdx]->obj[i]->value;
3412  else
3413  throw ErrorClass("objective index out of range in routine getOtherObjectiveResultArrayDense()");
3414  }
3415  return dim;
3416  }
3417  }
3418  else // there is an <enumeration> array
3419  {
3420  std::string val;
3421  int n,k;
3422 
3423  for (j=0; j<dim; j++)
3424  resultArray[j] = "";
3425 
3426  for (i=0; i<optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations; i++)
3427  {
3428  val = optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->value;
3429  n = optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->numberOfEl;
3430 
3431  for (j=0; j<n; j++)
3432  {
3433  k = -1 - optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->el[j];
3434  if (j >= 0 && j < dim)
3435  resultArray[k] = val;
3436  else
3437  throw ErrorClass("objective index out of range in routine getOtherObjectiveResultArrayDense()");
3438  }
3439  }
3440  return dim;
3441  }
3442  return -1;
3443 }//getOtherObjectiveResultArrayDense
3444 
3445 
3447 {
3448  if (optimization == NULL || optimization->solution == NULL)
3449  throw ErrorClass("No solution defined");
3450  int iSolutions = this->getSolutionNumber();
3451  if (solIdx < 0 || solIdx >= iSolutions)
3452  throw ErrorClass("solIdx is outside of range in routine getNumberOfDualValues()");
3453  if (optimization->solution[solIdx] == NULL) return -1;
3454  if (optimization->solution[solIdx]->constraints == NULL) return -1;
3455  if (optimization->solution[solIdx]->constraints->dualValues == NULL) return -1;
3457 }//getNumberOfDualValues
3458 
3459 int OSResult::getDualValueIdx(int solIdx, int conIdx)
3460 {
3461  if (optimization == NULL || optimization->solution == NULL)
3462  throw ErrorClass("No solution defined");
3463  int iSolutions = this->getSolutionNumber();
3464  if (solIdx < 0 || solIdx >= iSolutions)
3465  throw ErrorClass("solIdx is outside of range in routine getDualValueIdx()");
3466  if (optimization->solution[solIdx] == NULL) return -1;
3467  if (optimization->solution[solIdx]->constraints == NULL) return -1;
3468  if (optimization->solution[solIdx]->constraints->dualValues == NULL) return -1;
3469  if (conIdx < 0 || conIdx >= optimization->solution[solIdx]->constraints->dualValues->numberOfCon)
3470  throw ErrorClass("conIdx is outside of range in routine getDualValueIdx()");
3471  return optimization->solution[solIdx]->constraints->dualValues->con[conIdx]->idx;
3472 }//getDualValueIdx
3473 
3474 std::string OSResult::getDualValueName(int solIdx, int conIdx)
3475 {
3476  if (optimization == NULL || optimization->solution == NULL)
3477  throw ErrorClass("No solution defined");
3478  int iSolutions = this->getSolutionNumber();
3479  if (solIdx < 0 || solIdx >= iSolutions)
3480  throw ErrorClass("solIdx is outside of range in routine getDualValueIdx()");
3481  if (optimization->solution[solIdx] == NULL) return "";
3482  if (optimization->solution[solIdx]->constraints == NULL) return "";
3483  if (optimization->solution[solIdx]->constraints->dualValues == NULL) return "";
3484  if (conIdx < 0 || conIdx >= optimization->solution[solIdx]->constraints->dualValues->numberOfCon)
3485  throw ErrorClass("conIdx is outside of range in routine getDualValueIdx()");
3486  return optimization->solution[solIdx]->constraints->dualValues->con[conIdx]->name;
3487 }//getDualValueName
3488 
3489 double OSResult::getDualValue(int solIdx, int conIdx)
3490 {
3491  if (optimization == NULL || optimization->solution == NULL)
3492  throw ErrorClass("No solution defined");
3493  int iSolutions = this->getSolutionNumber();
3494  if (solIdx < 0 || solIdx >= iSolutions)
3495  throw ErrorClass("solIdx is outside of range in routine getDualValue()");
3496  if (optimization->solution[solIdx] == NULL) return OSNaN();
3497  if (optimization->solution[solIdx]->constraints == NULL) return OSNaN();
3498  if (optimization->solution[solIdx]->constraints->dualValues == NULL) return OSNaN();
3499  if (conIdx < 0 || conIdx >= optimization->solution[solIdx]->constraints->dualValues->numberOfCon)
3500  throw ErrorClass("conIdx is outside of range in routine getDualValue()");
3501  return optimization->solution[solIdx]->constraints->dualValues->con[conIdx]->value;
3502 }//getDualValue
3503 
3504 std::vector<IndexValuePair*> OSResult::getOptimalDualVariableValues(int solIdx)
3505 {
3506  int numberOfCon;
3507  struct IndexValuePair *dualValPair;
3508  int iSolutions = this->getSolutionNumber();
3509  for(int i = 0; i < iSolutions; i++)
3510  {
3511  if(i != solIdx) continue;
3512  if(optimization->solution[i] == NULL) continue;
3513  if(optimization->solution[i]->constraints == NULL) continue;
3514  if(optimization->solution[i]->constraints->dualValues == NULL) continue;
3515  if((optimization->solution[i]->status->type.find("ptimal") != string::npos && m_mdDualValues == NULL) ||
3516  optimization->solution[i]->status->type.compare("globallyOptimal") == 0)
3517  {
3519  for(int j = 0; j < numberOfCon; j++)
3520  {
3521  dualValPair = new IndexValuePair();
3522  dualValPair->idx = optimization->solution[i]->constraints->dualValues->con[j]->idx;
3523  dualValPair->value = optimization->solution[i]->constraints->dualValues->con[j]->value;
3524  dualVals.push_back( dualValPair);
3525  }
3526  }
3527  if(optimization->solution[i]->status->type.compare("globallyOptimal") == 0)
3528  {
3529  return dualVals;
3530  }
3531  }
3532  return dualVals;
3533 }//getOptimalDualVariableValues
3534 
3535 
3537 {
3538  if (optimization == NULL || optimization->solution == NULL)
3539  throw ErrorClass("No solution defined");
3540  int iSolutions = this->getSolutionNumber();
3541  if (solIdx < 0 || solIdx >= iSolutions)
3542  throw ErrorClass("solIdx is outside of range in routine getNumberOfOtherConstraintResults()");
3543  if (optimization->solution[solIdx] == NULL)
3544  throw ErrorClass("solution was never defined in routine getNumberOfOtherConstraintResults()");
3545  if (optimization->solution[solIdx]->constraints == NULL) return 0;
3546  if (optimization->solution[solIdx]->constraints->other == NULL) return 0;
3548 }//getNumberOfOtherConstraintResults
3549 
3550 
3551 string OSResult::getOtherConstraintResultName(int solIdx, int otherIdx)
3552 {
3553  if (optimization == NULL || optimization->solution == NULL)
3554  throw ErrorClass("No solution defined");
3555  int iSolutions = this->getSolutionNumber();
3556  if (solIdx < 0 || solIdx >= iSolutions)
3557  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultName()");
3558  if (optimization->solution[solIdx] == NULL) return "";
3559  if (optimization->solution[solIdx]->constraints == NULL) return "";
3560  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3561  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3562  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultName()");
3563  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3564  return optimization->solution[solIdx]->constraints->other[ otherIdx]->name;
3565 }//getOtherConstraintResultName
3566 
3567 string OSResult::getOtherConstraintResultType(int solIdx, int otherIdx)
3568 {
3569  if (optimization == NULL || optimization->solution == NULL)
3570  throw ErrorClass("No solution defined");
3571  int iSolutions = this->getSolutionNumber();
3572  if (solIdx < 0 || solIdx >= iSolutions)
3573  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultType()");
3574  if (optimization->solution[solIdx] == NULL) return "";
3575  if (optimization->solution[solIdx]->constraints == NULL) return "";
3576  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3577  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3578  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultType()");
3579  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3580  return optimization->solution[solIdx]->constraints->other[ otherIdx]->type;
3581 }//getOtherConstraintResultType
3582 
3583 string OSResult::getOtherConstraintResultValue(int solIdx, int otherIdx)
3584 {
3585  if (optimization == NULL || optimization->solution == NULL)
3586  throw ErrorClass("No solution defined");
3587  int iSolutions = this->getSolutionNumber();
3588  if (solIdx < 0 || solIdx >= iSolutions)
3589  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultValue()");
3590  if (optimization->solution[solIdx] == NULL) return "";
3591  if (optimization->solution[solIdx]->constraints == NULL) return "";
3592  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3593  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3594  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultValue()");
3595  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3596  return optimization->solution[solIdx]->constraints->other[ otherIdx]->value;
3597 }//getOtherConstraintResultValue
3598 
3599 string OSResult::getOtherConstraintResultDescription(int solIdx, int otherIdx)
3600 {
3601  if (optimization == NULL || optimization->solution == NULL)
3602  throw ErrorClass("No solution defined");
3603  int iSolutions = this->getSolutionNumber();
3604  if (solIdx < 0 || solIdx >= iSolutions)
3605  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultDescription()");
3606  if (optimization->solution[solIdx] == NULL) return "";
3607  if (optimization->solution[solIdx]->constraints == NULL) return "";
3608  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3609  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3610  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultDescription()");
3611  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3612  return optimization->solution[solIdx]->constraints->other[ otherIdx]->description;
3613 }//getOtherConstraintResultDescription
3614 
3616 {
3617  if (optimization == NULL || optimization->solution == NULL)
3618  throw ErrorClass("No solution defined");
3619  int iSolutions = this->getSolutionNumber();
3620  if (solIdx < 0 || solIdx >= iSolutions)
3621  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultNumberOfCon()");
3622  if (optimization->solution[solIdx] == NULL) return -1;
3623  if (optimization->solution[solIdx]->constraints == NULL) return -1;
3624  if (optimization->solution[solIdx]->constraints->other == NULL) return -1;
3625  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3626  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultNumberOfCon()");
3627  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return -1;
3628  return optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfCon;
3629 }//getOtherConstraintResultNumberOfCon
3630 
3631 int OSResult::getOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx)
3632 {
3633  if (optimization == NULL || optimization->solution == NULL)
3634  throw ErrorClass("No solution defined");
3635  int iSolutions = this->getSolutionNumber();
3636  if (solIdx < 0 || solIdx >= iSolutions)
3637  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultConIdx()");
3638  if (optimization->solution[solIdx] == NULL) return -1;
3639  if (optimization->solution[solIdx]->constraints == NULL) return -1;
3640  if (optimization->solution[solIdx]->constraints->other == NULL) return -1;
3641  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3642  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultConIdx()");
3643  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return -1;
3644  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->con == NULL) return -1;
3645  if (conIdx < 0 || conIdx >= optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfCon)
3646  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultConIdx()");
3647  return optimization->solution[solIdx]->constraints->other[otherIdx]->con[conIdx]->idx;
3648 }//getOtherConstraintResultConIdx
3649 
3650 string OSResult::getOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx)
3651 {
3652  if (optimization == NULL || optimization->solution == NULL)
3653  throw ErrorClass("No solution defined");
3654  int iSolutions = this->getSolutionNumber();
3655  if (solIdx < 0 || solIdx >= iSolutions)
3656  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultCon()");
3657  if (optimization->solution[solIdx] == NULL) return "";
3658  if (optimization->solution[solIdx]->constraints == NULL) return "";
3659  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3660  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3661  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultCon()");
3662  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3663  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->con == NULL) return "";
3664  if (conIdx < 0 || conIdx >= optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfCon)
3665  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultCon()");
3666  return optimization->solution[solIdx]->constraints->other[otherIdx]->con[conIdx]->value;
3667 }//getOtherConstraintResultCon
3668 
3669 
3670 std::string OSResult::getOtherConstraintResultArrayType(int solIdx, int otherIdx)
3671 {
3672  if (optimization == NULL || optimization->solution == NULL)
3673  throw ErrorClass("No solution defined");
3674  int iSolutions = this->getSolutionNumber();
3675  if (solIdx < 0 || solIdx >= iSolutions)
3676  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultArrayType()");
3677  if (optimization->solution[solIdx] == NULL) return "";
3678  if (optimization->solution[solIdx]->constraints == NULL) return "";
3679  if (optimization->solution[solIdx]->constraints->other == NULL) return "";
3680  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3681  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultArrayType()");
3682  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return "";
3683 
3684  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->con != NULL)
3685  return optimization->solution[solIdx]->constraints->other[ otherIdx]->conType;
3686  else if (optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration != NULL)
3687  return optimization->solution[solIdx]->constraints->other[ otherIdx]->enumType;
3688  else
3689  return "";
3690 }//getOtherConstraintResultArrayType
3691 
3692 
3694 {
3695  if (optimization == NULL || optimization->solution == NULL)
3696  throw ErrorClass("No solution defined");
3697  int iSolutions = this->getSolutionNumber();
3698  if (solIdx < 0 || solIdx >= iSolutions)
3699  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultNumberOfEnumerations()");
3700  if (optimization->solution[solIdx] == NULL) return -1;
3701  if (optimization->solution[solIdx]->constraints == NULL) return -1;
3702  if (optimization->solution[solIdx]->constraints->other == NULL) return -1;
3703  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3704  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultNumberOfEnumerations()");
3705  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return -1;
3706  return optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfEnumerations;
3707 }//getOtherConstraintResultNumberOfEnumerations
3708 
3709 
3710 std::string OSResult::getOtherConstraintResultEnumerationValue(int solIdx,int otherIdx, int enumIdx)
3711 {
3712  if (optimization == NULL || optimization->solution == NULL)
3713  throw ErrorClass("No solution defined");
3714  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3715  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultEnumerationValue()");
3716  if (optimization->solution[solIdx] == NULL)
3717  throw ErrorClass("solution never defined in routine getOtherConstraintResultEnumerationValue()");
3718 
3719  if (optimization->solution[solIdx]->constraints == NULL)
3720  throw ErrorClass("constraints result never defined in routine getOtherConstraintResultEnumerationValue()");
3721  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3722  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultEnumerationValue()");
3723  if (optimization->solution[solIdx]->constraints->other == NULL)
3724  throw ErrorClass("other constraint array never defined in routine getOtherConstraintResultEnumerationValue()");
3725  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL)
3726  throw ErrorClass("other constraint result never defined in routine getOtherConstraintResultEnumerationValue()");
3727  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3728  throw ErrorClass("enumerations array never defined in routine getOtherConstraintResultEnumerationValue()");
3729  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations)
3730  throw ErrorClass("enumIdx is outside of range in routine getOtherConstraintResultEnumerationValue()");
3731  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx] == NULL)
3732  throw ErrorClass("enumeration never defined in routine getOtherConstraintResultEnumerationValue()");
3733 
3734  return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->value;
3735 }//getOtherConstraintResultEnumerationValue
3736 
3737 
3738 std::string OSResult::getOtherConstraintResultEnumerationDescription(int solIdx,int otherIdx, int enumIdx)
3739 {
3740  if (optimization == NULL || optimization->solution == NULL)
3741  throw ErrorClass("No solution defined");
3742  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3743  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultEnumerationDescription()");
3744  if (optimization->solution[solIdx] == NULL)
3745  throw ErrorClass("solution never defined in routine getOtherConstraintResultEnumerationDescription()");
3746 
3747  if (optimization->solution[solIdx]->constraints == NULL)
3748  throw ErrorClass("constraints result never defined in routine getOtherConstraintResultEnumerationDescription()");
3749  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3750  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultEnumerationDescription()");
3751  if (optimization->solution[solIdx]->constraints->other == NULL)
3752  throw ErrorClass("other constraint array never defined in routine getOtherConstraintResultEnumerationDescription()");
3753  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL)
3754  throw ErrorClass("other constraint result never defined in routine getOtherConstraintResultEnumerationDescription()");
3755  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3756  throw ErrorClass("enumerations array never defined in routine getOtherConstraintResultEnumerationDescription()");
3757  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations)
3758  throw ErrorClass("enumIdx is outside of range in routine getOtherConstraintResultEnumerationDescription()");
3759  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx] == NULL)
3760  throw ErrorClass("enumeration never defined in routine getOtherConstraintResultEnumerationDescription()");
3761 
3762  return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->description;
3763 }//getOtherConstraintResultEnumerationDescription
3764 
3765 int OSResult::getOtherConstraintResultEnumerationNumberOfEl(int solIdx,int otherIdx, int enumIdx)
3766 {
3767  if (optimization == NULL || optimization->solution == NULL)
3768  throw ErrorClass("No solution defined");
3769  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3770  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultEnumerationNumberOfEl()");
3771  if (optimization->solution[solIdx] == NULL)
3772  throw ErrorClass("solution never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3773 
3774  if (optimization->solution[solIdx]->constraints == NULL)
3775  throw ErrorClass("constraints result never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3776  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3777  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultEnumerationNumberOfEl()");
3778  if (optimization->solution[solIdx]->constraints->other == NULL)
3779  throw ErrorClass("other constraint array never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3780  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL)
3781  throw ErrorClass("other constraint result never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3782  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3783  throw ErrorClass("enumerations array never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3784  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations)
3785  throw ErrorClass("enumIdx is outside of range in routine getOtherConstraintResultEnumerationNumberOfEl()");
3786  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx] == NULL)
3787  throw ErrorClass("enumeration never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
3788 
3789  return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
3790 }//getOtherConstraintResultEnumerationNumberOfEl
3791 
3792 int OSResult::getOtherConstraintResultEnumerationEl(int solIdx,int otherIdx, int enumIdx, int j)
3793 {
3794  if (optimization == NULL || optimization->solution == NULL)
3795  throw ErrorClass("No solution defined");
3796  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3797  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultEnumerationEl()");
3798  if (optimization->solution[solIdx] == NULL)
3799  throw ErrorClass("solution never defined in routine getOtherConstraintResultEnumerationEl()");
3800 
3801  if (optimization->solution[solIdx]->constraints == NULL)
3802  throw ErrorClass("constraints result never defined in routine getOtherConstraintResultEnumerationEl()");
3803  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3804  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultEnumerationEl()");
3805  if (optimization->solution[solIdx]->constraints->other == NULL)
3806  throw ErrorClass("other constraint array never defined in routine getOtherConstraintResultEnumerationEl()");
3807  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL)
3808  throw ErrorClass("other constraint result never defined in routine getOtherConstraintResultEnumerationEl()");
3809  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3810  throw ErrorClass("enumerations array never defined in routine getOtherConstraintResultEnumerationEl()");
3811  if (enumIdx < 0 || enumIdx >= optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations)
3812  throw ErrorClass("enumIdx is outside of range in routine getOtherConstraintResultEnumerationEl()");
3813  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx] == NULL)
3814  throw ErrorClass("enumeration never defined in routine getOtherConstraintResultEnumerationEl()");
3815 
3816  return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->getEl(j);
3817 }//getOtherConstraintResultEnumerationEl
3818 
3819 int OSResult::getOtherConstraintResultArrayDense(int solIdx, int otherIdx, std::string* resultArray, int dim)
3820 {
3821  int i, j;
3822  if (optimization == NULL || optimization->solution == NULL)
3823  throw ErrorClass("No solution defined");
3824  if (solIdx < 0 || solIdx >= optimization->numberOfSolutions)
3825  throw ErrorClass("solIdx is outside of range in routine getOtherConstraintResultArrayDense()");
3826  if (optimization->solution[solIdx] == NULL)
3827  throw ErrorClass("solution never defined in routine getOtherConstraintResultArrayDense()");
3828  if (optimization->solution[solIdx]->constraints == NULL)
3829  throw ErrorClass("constraints result never defined in routine getOtherConstraintResultArrayDense()");
3830  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults)
3831  throw ErrorClass("otherIdx is outside of range in routine getOtherConstraintResultArrayDense()");
3832  if (optimization->solution[solIdx]->constraints->other == NULL)
3833  throw ErrorClass("other constraint array never defined in routine getOtherConstraintResultArrayDense()");
3834  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL)
3835  throw ErrorClass("other constraint result never defined in routine getOtherConstraintResultArrayDense()");
3836 
3837  if (optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3838  {
3839  if (optimization->solution[solIdx]->constraints->other[otherIdx]->con == NULL)
3840  return 0; // neither <con> nor <enumeration>
3841  else // there is a <con> array
3842  {
3843  for (i=0; i<dim; i++)
3844  resultArray[i] = "";
3845 
3846  for (i=0; i<optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfCon; i++)
3847  {
3848  j = optimization->solution[solIdx]->constraints->other[otherIdx]->con[i]->idx;
3849  if (j >= 0 && j < dim)
3850  resultArray[j] = optimization->solution[solIdx]->constraints->other[otherIdx]->con[i]->value;
3851  else
3852  throw ErrorClass("constraint index out of range in routine getOtherConstraintResultArrayDense()");
3853  }
3854  return dim;
3855  }
3856  }
3857  else // there is an <enumeration> array
3858  {
3859  std::string val;
3860  int n,k;
3861 
3862  for (j=0; j<dim; j++)
3863  resultArray[j] = "";
3864 
3865  for (i=0; i<optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations; i++)
3866  {
3867  val = optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->value;
3868  n = optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->numberOfEl;
3869 
3870  for (j=0; j<n; j++)
3871  {
3872  k = optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->el[j];
3873  if (j >= 0 && j < dim)
3874  resultArray[k] = val;
3875  else
3876  throw ErrorClass("constraint index out of range in routine getOtherConstraintResultArrayDense()");
3877  }
3878  }
3879  return dim;
3880  }
3881  return -1;
3882 }//getOtherConstraintResultArrayDense
3883 
3884 
3885 
3887 {
3888  if (optimization == NULL || optimization->solution == NULL)
3889  throw ErrorClass("No solution defined");
3890  int iSolutions = this->getSolutionNumber();
3891  if (solIdx < 0 || solIdx >= iSolutions)
3892  throw ErrorClass("solIdx is outside of range in routine getNumberOfOtherSolutionResults()");
3893  if (optimization->solution[solIdx] == NULL) return -1;
3894  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return -1;
3896 }//getNumberOfOtherSolutionResults
3897 
3898 string OSResult::getOtherSolutionResultName(int solIdx, int otherIdx)
3899 {
3900  if (optimization == NULL || optimization->solution == NULL)
3901  throw ErrorClass("No solution defined");
3902  int iSolutions = this->getSolutionNumber();
3903  if (solIdx < 0 || solIdx >= iSolutions)
3904  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultName()");
3905  if (optimization->solution[solIdx] == NULL) return "";
3906  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return "";
3907  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3908  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultName()");
3909  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return "";
3910  return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->name;
3911 }//getOtherSolutionResultName
3912 
3913 string OSResult::getOtherSolutionResultValue(int solIdx, int otherIdx)
3914 {
3915  if (optimization == NULL || optimization->solution == NULL)
3916  throw ErrorClass("No solution defined");
3917  int iSolutions = this->getSolutionNumber();
3918  if (solIdx < 0 || solIdx >= iSolutions)
3919  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultName()");
3920  if (optimization->solution[solIdx] == NULL) return "";
3921  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return "";
3922  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3923  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultValue()");
3924  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return "";
3926 }//getOtherSolutionResultName
3927 
3928 string OSResult::getOtherSolutionResultCategory(int solIdx, int otherIdx)
3929 {
3930  if (optimization == NULL || optimization->solution == NULL)
3931  throw ErrorClass("No solution defined");
3932  int iSolutions = this->getSolutionNumber();
3933  if (solIdx < 0 || solIdx >= iSolutions)
3934  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultCategory()");
3935  if (optimization->solution[solIdx] == NULL) return "";
3936  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return "";
3937  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3938  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultCategory()");
3939  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return "";
3941 }//getOtherSolutionResultCategory
3942 
3943 string OSResult::getOtherSolutionResultDescription(int solIdx, int otherIdx)
3944 {
3945  if (optimization == NULL || optimization->solution == NULL)
3946  throw ErrorClass("No solution defined");
3947  int iSolutions = this->getSolutionNumber();
3948  if (solIdx < 0 || solIdx >= iSolutions)
3949  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultDescription()");
3950  if (optimization->solution[solIdx] == NULL) return "";
3951  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return "";
3952  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3953  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultDescription()");
3954  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return "";
3956 }//getOtherSolutionResultDescription
3957 
3959 {
3960  if (optimization == NULL || optimization->solution == NULL)
3961  throw ErrorClass("No solution defined");
3962  int iSolutions = this->getSolutionNumber();
3963  if (solIdx < 0 || solIdx >= iSolutions)
3964  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultNumberOfItems()");
3965  if (optimization->solution[solIdx] == NULL) return -1;
3966  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return -1;
3967  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3968  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultNumberOfItems()");
3969  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return -1;
3971 }//getOtherSolutionResultNumberOfItems
3972 
3973 string OSResult::getOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx)
3974 {
3975  if (optimization == NULL || optimization->solution == NULL)
3976  throw ErrorClass("No solution defined");
3977  int iSolutions = this->getSolutionNumber();
3978  if (solIdx < 0 || solIdx >= iSolutions)
3979  throw ErrorClass("solIdx is outside of range in routine getOtherSolutionResultItem()");
3980  if (optimization->solution[solIdx] == NULL) return "";
3981  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return "";
3982  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return "";
3983  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults)
3984  throw ErrorClass("otherIdx is outside of range in routine getOtherSolutionResultItem()");
3985  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item == NULL) return "";
3986  if (itemIdx < 0 || itemIdx >= optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->numberOfItems)
3987  throw ErrorClass("itemIdx is outside of range in routine getOtherSolutionResultItem()");
3988  return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item[itemIdx];
3989 }//getOtherSolutionResultItem
3990 
3992 {
3993  if (optimization == NULL || optimization->otherSolverOutput == NULL) return -1;
3995 }//getNumberOfSolverOutputs
3996 
3997 string OSResult::getSolverOutputName(int otherIdx)
3998 {
3999  if (optimization == NULL) return "";
4000  if (optimization->otherSolverOutput == NULL) return "";
4001  if (otherIdx < 0 || otherIdx >= optimization->otherSolverOutput->numberOfSolverOutputs)
4002  throw ErrorClass("otherIdx is outside of range in routine getSolverOutputName()");
4003  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return "";
4004  return optimization->otherSolverOutput->solverOutput[otherIdx]->name;
4005 }//getSolverOutputName
4006 
4008 {
4009  if (optimization == NULL) return "";
4010  if (optimization->otherSolverOutput == NULL) return "";
4011  if (otherIdx < 0 || otherIdx >= optimization->otherSolverOutput->numberOfSolverOutputs)
4012  throw ErrorClass("otherIdx is outside of range in routine getSolverOutputCategory()");
4013  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return "";
4015 }//getSolverOutputCategory
4016 
4018 {
4019  if (optimization == NULL) return "";
4020  if (optimization->otherSolverOutput == NULL) return "";
4021  if (otherIdx < 0 || otherIdx >= optimization->otherSolverOutput->numberOfSolverOutputs)
4022  throw ErrorClass("otherIdx is outside of range in routine getSolverOutputDescription()");
4023  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return "";
4025 }//getSolverOutputDescription
4026 
4028 {
4029  if (optimization == NULL) return -1;
4030  if (optimization->otherSolverOutput == NULL) return -1;
4031  if (otherIdx < 0 || otherIdx >= optimization->otherSolverOutput->numberOfSolverOutputs)
4032  throw ErrorClass("otherIdx is outside of range in routine getSolverOutputNumberOfItems()");
4033  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return -1;
4035 }//getSolverOutputNumberOfItems
4036 
4037 string OSResult::getSolverOutputItem(int otherIdx, int itemIdx)
4038 {
4039  if (optimization == NULL) return "";
4040  if (optimization->otherSolverOutput == NULL) return "";
4041  if (otherIdx < 0 || otherIdx >= optimization->otherSolverOutput->numberOfSolverOutputs)
4042  throw ErrorClass("otherIdx is outside of range in routine getSolverOutputItem");
4043  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return "";
4044  if (itemIdx < 0 || itemIdx >= optimization->otherSolverOutput->solverOutput[otherIdx]->numberOfItems)
4045  throw ErrorClass("itemIdx is outside of range in routine getSolverOutputItem()");
4046  return optimization->otherSolverOutput->solverOutput[otherIdx]->item[itemIdx];;
4047 }//getSolverOutputItem
4048 
4049 //==================================================================
4050 // set methods
4051 
4052 bool OSResult::setHeader(std::string name, std::string source,
4053  std::string fileCreator, std::string description, std::string licence)
4054 {
4055  if (this->resultHeader == NULL)
4056  this->resultHeader = new GeneralFileHeader();
4057  return this->resultHeader->setHeader(name, source, fileCreator, description, licence);
4058 }// end of OSResult::setHeader
4059 
4061 {
4062  if (general == NULL) general = new GeneralResult();
4063  if (general->generalStatus == NULL) general->generalStatus = new GeneralStatus();
4064  general->generalStatus = status;
4065  return true;
4066 }//setGeneralStatus
4067 
4068 bool OSResult::setGeneralStatusType(string type)
4069 {
4070  if (general == NULL) general = new GeneralResult();
4071  if (verifyGeneralResultStatus(type) == 0) return false;
4072  if (general->generalStatus == NULL) general->generalStatus = new GeneralStatus();
4073  general->generalStatus->type = type;
4074  return true;
4075 }//setGeneralStatusType
4076 
4077 bool OSResult::setGeneralStatusDescription(string description)
4078 {
4079  if (general == NULL) general = new GeneralResult();
4080  if (general->generalStatus == NULL) general->generalStatus = new GeneralStatus();
4081  general->generalStatus->description = description;
4082  return true;
4083 }//setGeneralStatusDescription
4084 
4086 {
4087  if (num < 0) return false;
4088 
4089  if (general == NULL) general = new GeneralResult();
4090  if (general->generalStatus == NULL) general->generalStatus = new GeneralStatus();
4091  if (general->generalStatus->substatus != NULL) return false;
4093  if (num > 0)
4094  {
4096  for(int i = 0; i < num; i++)
4098  }
4099  return true;
4100 }//setNumberOfGeneralSubstatuses
4101 
4103 {
4104  if (general == NULL) general = new GeneralResult();
4105  if (general->generalStatus == NULL) return false;
4106  if (idx < 0 || idx >= general->generalStatus->numberOfSubstatuses) return false;
4107  general->generalStatus->substatus[idx]->name = name;
4108  return true;
4109 }//setGeneralSubstatusName
4110 
4111 bool OSResult::setGeneralSubstatusDescription(int idx, string description)
4112 {
4113  if (general == NULL) general = new GeneralResult();
4114  if (general->generalStatus == NULL) return false;
4115  if (idx < 0 || idx >= general->generalStatus->numberOfSubstatuses) return false;
4116  general->generalStatus->substatus[idx]->description = description;
4117  return true;
4118 }//setGeneralSubstatusDescription
4119 
4120 bool OSResult::setGeneralMessage(string message)
4121 {
4122  if (general == NULL) general = new GeneralResult();
4123  general->message = message;
4124  return true;
4125 }//setGeneralMessage
4126 
4127 bool OSResult::setServiceName(string serviceName)
4128 {
4129  if (general == NULL) general = new GeneralResult();
4130  general->serviceName = serviceName;
4131  return true;
4132 }//setServiceName
4133 
4134 bool OSResult::setServiceURI(string serviceURI)
4135 {
4136  if (general == NULL) general = new GeneralResult();
4137  general->serviceURI = serviceURI;
4138  return true;
4139 }//setServiceURI
4140 
4141 bool OSResult::setInstanceName(string instanceName)
4142 {
4143  if (general == NULL) general = new GeneralResult();
4144  general->instanceName = instanceName;
4145  return true;
4146 }//setInstanceName
4147 
4148 bool OSResult::setJobID(string jobID)
4149 {
4150  if (general == NULL) general = new GeneralResult();
4151  general->jobID = jobID;
4152  return true;
4153 }//setJobID
4154 
4155 bool OSResult::setSolverInvoked(string solverInvoked)
4156 {
4157  if (general == NULL) general = new GeneralResult();
4158  general->solverInvoked = solverInvoked;
4159  return true;
4160 }//setSolverInvoked
4161 
4162 bool OSResult::setTimeStamp(string timeStamp)
4163 {
4164  if (general == NULL) general = new GeneralResult();
4165  general->timeStamp = timeStamp;
4166  return true;
4167 }//setTimeStamp
4168 
4170 {
4171  if (general == NULL) general = new GeneralResult();
4172  if(general->otherResults == NULL) general->otherResults = new OtherResults();
4173  if (num < 0) return false;
4174  if (general->otherResults->other != NULL) return false;
4176  if (num > 0)
4177  {
4178  general->otherResults->other = new OtherResult*[num];
4179  for(int i = 0; i < num; i++)
4180  general->otherResults->other[i] = new OtherResult();
4181  }
4182  return true;
4183 }//setNumberOfOtherGeneralResults
4184 
4185 
4187 {
4188  if (general == NULL) general = new GeneralResult();
4189  if (general->otherResults == NULL) return false;
4190  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
4191  return false;
4192  general->otherResults->other[idx]->name = name;
4193  return true;
4194 }//setOtherGeneralResultName
4195 
4197 {
4198  if (general == NULL) general = new GeneralResult();
4199  if (general->otherResults == NULL) return false;
4200  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
4201  return false;
4203  return true;
4204 }//setOtherGeneralResultValue
4205 
4207 {
4208  if (general == NULL) general = new GeneralResult();
4209  if (general->otherResults == NULL) return false;
4210  if (idx < 0 || idx >= general->otherResults->numberOfOtherResults)
4211  return false;
4212  general->otherResults->other[idx]->description = description;
4213  return true;
4214 }//setOtherGeneralResultDescription
4215 
4216 bool OSResult::setSystemInformation(string systemInformation)
4217 {
4218  if (system == NULL) system = new SystemResult();
4219  system->systemInformation = systemInformation;
4220  return true;
4221 }//setServiceName
4222 
4224 {
4225  if (system == NULL) system = new SystemResult();
4227  if (verifyStorageUnit(unit) == false) return false;
4228  system->availableDiskSpace->unit = unit;
4229  return true;
4230 }//setAvailableDiskSpaceUnit
4231 
4232 bool OSResult::setAvailableDiskSpaceDescription(std::string description)
4233 {
4234  if (system == NULL) system = new SystemResult();
4236  system->availableDiskSpace->description = description;
4237  return true;
4238 }//setAvailableDiskSpaceDescription
4239 
4241 {
4242  if (system == NULL) system = new SystemResult();
4245  return true;
4246 }//setAvailableDiskSpaceValue
4247 
4248 bool OSResult::setAvailableMemoryUnit(std::string unit)
4249 {
4250  if (system == NULL) system = new SystemResult();
4252  if (verifyStorageUnit(unit) == false) return false;
4253  system->availableMemory->unit = unit;
4254  return true;
4255 }//setAvailableMemoryUnit
4256 
4257 bool OSResult::setAvailableMemoryDescription(std::string description)
4258 {
4259  if (system == NULL) system = new SystemResult();
4261  system->availableMemory->description = description;
4262  return true;
4263 }//setAvailableMemoryDescription
4264 
4266 {
4267  if (system == NULL) system = new SystemResult();
4270  return true;
4271 }//setAvailableMemoryValue
4272 
4274 {
4275  if (system == NULL) return false;
4276  if (system->availableCPUSpeed == NULL) system->availableCPUSpeed = new CPUSpeed();
4277  if (verifyCPUSpeedUnit(unit) == false) return false;
4278  system->availableCPUSpeed->unit = unit;
4279  return true;
4280 }//setAvailableCPUSpeedUnit
4281 
4282 bool OSResult::setAvailableCPUSpeedDescription(std::string description)
4283 {
4284  if (system == NULL) system = new SystemResult();
4285  if (system->availableCPUSpeed == NULL) system->availableCPUSpeed = new CPUSpeed();
4286  system->availableCPUSpeed->description = description;
4287  return true;
4288 }//setAvailableCPUSpeedDescription
4289 
4291 {
4292  if (system == NULL) system = new SystemResult();
4293  if (system->availableCPUSpeed == NULL) system->availableCPUSpeed = new CPUSpeed();
4295  return true;
4296 }//setAvailableCPUSpeedValue
4297 
4298 bool OSResult::setAvailableCPUNumberDescription(std::string description)
4299 {
4300  if (system == NULL) system = new SystemResult();
4302  system->availableCPUNumber->description = description;
4303  return true;
4304 }//setAvailableCPUNumberDescription
4305 
4307 {
4308  if (system == NULL) system = new SystemResult();
4311  return true;
4312 }//setAvailableCPUNumberValue
4313 
4315 {
4316  if (system == NULL) system = new SystemResult();
4317  if(system->otherResults == NULL) system->otherResults = new OtherResults();
4318  if (num < 0) return false;
4319  if (system->otherResults->other != NULL) return false;
4321  if (num > 0)
4322  {
4323  system->otherResults->other = new OtherResult*[num];
4324  for(int i = 0; i < num; i++)
4325  system->otherResults->other[i] = new OtherResult();
4326  }
4327  return true;
4328 }//setNumberOfOtherSystemResults
4329 
4330 
4332 {
4333  if (system == NULL) system = new SystemResult();
4334  if (system->otherResults == NULL) return false;
4335  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
4336  return false;
4337  system->otherResults->other[idx]->name = name;
4338  return true;
4339 }//setOtherSystemResultName
4340 
4342 {
4343  if (system == NULL) system = new SystemResult();
4344  if (system->otherResults == NULL) return false;
4345  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
4346  return false;
4348  return true;
4349 }//setOtherSystemResultValue
4350 
4351 bool OSResult::setOtherSystemResultDescription(int idx, string description)
4352 {
4353  if (system == NULL) system = new SystemResult();
4354  if (system->otherResults == NULL) return false;
4355  if (idx < 0 || idx >= system->otherResults->numberOfOtherResults)
4356  return false;
4357  system->otherResults->other[idx]->description = description;
4358  return true;
4359 }//setOtherSystemResultDescription
4360 
4361 bool OSResult::setCurrentState(std::string currentState)
4362 {
4363  if(verifySystemCurrentState(currentState) == 0) return false;
4364 
4365  if (service == NULL) service = new ServiceResult();
4366  service->currentState = currentState;
4367  return true;
4368 }//setCurrentState
4369 
4371 {
4372  if (service == NULL) service = new ServiceResult();
4373  service->currentJobCount = jobCount;
4374  return true;
4375 }//setCurrentJobCount
4376 
4378 {
4379  if (service == NULL) service = new ServiceResult();
4380  service->totalJobsSoFar = number;
4381  return true;
4382 }//setTotalJobsSoFar
4383 
4384 bool OSResult::setTimeServiceStarted(std::string startTime)
4385 {
4386  if (service == NULL) service = new ServiceResult();
4387  service->timeServiceStarted = startTime;
4388  return true;
4389 }//setTimeServiceStarted
4390 
4392 {
4393  if (service == NULL) service = new ServiceResult();
4395  return true;
4396 }//setServiceUtilization
4397 
4399 {
4400  if (num < 0) return false;
4401 
4402  if (service == NULL) service = new ServiceResult();
4403  if(service->otherResults == NULL) service->otherResults = new OtherResults();
4404  if (service->otherResults->other != NULL) return false;
4406  if (num > 0)
4407  {
4408  service->otherResults->other = new OtherResult*[num];
4409  for(int i = 0; i < num; i++)
4410  service->otherResults->other[i] = new OtherResult();
4411  }
4412  return true;
4413 }//setNumberOfOtherServiceResults
4414 
4416 {
4417  if (service == NULL) service = new ServiceResult();
4418  if (service->otherResults == NULL) return false;
4419  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
4420  return false;
4421  service->otherResults->other[idx]->name = name;
4422  return true;
4423 }//setOtherServiceResultName
4424 
4426 {
4427  if (service == NULL) service = new ServiceResult();
4428  if (service->otherResults == NULL) return false;
4429  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
4430  return false;
4432  return true;
4433 }//setOtherServiceResultValue
4434 
4436 {
4437  if (service == NULL) service = new ServiceResult();
4438  if (service->otherResults == NULL) return false;
4439  if (idx < 0 || idx >= service->otherResults->numberOfOtherResults)
4440  return false;
4441  service->otherResults->other[idx]->description = description;
4442  return true;
4443 }//setOtherServiceResultDescription
4444 
4445 bool OSResult::setJobStatus(std::string status)
4446 {
4447  if (verifyJobStatus(status) == 0) return false;
4448 
4449  if (job == NULL) job = new JobResult();
4450  job->status = status;
4451  return true;
4452 }//setJobStatus
4453 
4454 bool OSResult::setJobSubmitTime(std::string submitTime)
4455 {
4456  if (job == NULL) job = new JobResult();
4457  job->submitTime = submitTime;
4458  return true;
4459 }//setJobSubmitTime
4460 
4461 bool OSResult::setScheduledStartTime(std::string scheduledStartTime)
4462 {
4463  if (job == NULL) job = new JobResult();
4464  job->scheduledStartTime = scheduledStartTime;
4465  return true;
4466 }//setScheduledStartTime
4467 
4468 bool OSResult::setActualStartTime(std::string actualStartTime)
4469 {
4470  if (job == NULL) job = new JobResult();
4471  job->actualStartTime = actualStartTime;
4472  return true;
4473 }//setActualStartTime
4474 
4475 bool OSResult::setJobEndTime(std::string endTime)
4476 {
4477  if (job == NULL) job = new JobResult();
4478  job->endTime = endTime;
4479  return true;
4480 }//setJobEndTime
4481 
4482 bool OSResult::setTime(double time)
4483 {
4484  return addTimingInformation("elapsedTime", "total", "second", "", time);
4485 }//setTime
4486 
4487 bool OSResult::addTimingInformation(std::string type, std::string category, std::string unit, std::string description, double value)
4488 
4489 {
4490  int nt;
4491  int i;
4492  if (verifyTimeUnit(unit) != true)
4493  throw ErrorClass("Invalid unit of time in addTimingInformation()");
4494  if (job == NULL) job = new JobResult();
4496 
4498  TimeMeasurement** temp = new TimeMeasurement*[nt+1]; //Allocate the new pointers
4499  for (i = 0; i < nt; i++)
4500  temp[i] = job->timingInformation->time[i]; //copy the pointers
4501 
4502  delete[] job->timingInformation->time; //delete old pointers
4503 
4504 // add in the new element
4505  temp[ nt] = new TimeMeasurement();
4506 
4507  temp[ nt]->type = type;
4508  temp[ nt]->category = category;
4509  temp[ nt]->unit = unit;
4510  temp[ nt]->description = description;
4511  temp[ nt]->value = value;
4512 
4513  job->timingInformation->time = temp; //hook the new pointers into the data structure
4515 
4516  return true;
4517 }//addTimingInformation
4518 
4519 
4520 bool OSResult::setTimingInformation(int idx, std::string type, std::string category,
4521  std::string unit, std::string description, double value)
4522 {
4523  if (verifyTimeUnit(unit) == 0) return false;
4524  if (verifyTimeType(type) == 0) return false;
4525  if (verifyTimeCategory(category) == 0) return false;
4526 
4527  if (job == NULL) job = new JobResult();
4528  if (job->timingInformation == NULL) return false;
4529  if (idx < 0 || idx >= job->timingInformation->numberOfTimes)
4530  return false;
4531 
4532  job->timingInformation->time[idx]->type = type;
4533  job->timingInformation->time[idx]->category = category;
4534  job->timingInformation->time[idx]->unit = unit;
4535  job->timingInformation->time[idx]->description = description;
4537 
4538  return true;
4539 }//setTimingInformation
4540 
4541 
4542 bool OSResult::setNumberOfTimes(int numberOfTimes)
4543 {
4544  if (numberOfTimes < 0) return false;
4545 
4546  if (job == NULL) job = new JobResult();
4548  job->timingInformation->numberOfTimes = numberOfTimes;
4549  if (numberOfTimes > 0)
4550  {
4551 
4552 
4553  job->timingInformation->time = new TimeMeasurement*[numberOfTimes];
4554  for(int i = 0; i < numberOfTimes; i++)
4556  }
4557  return true;
4558 }//setNumberOfTimes
4559 
4560 bool OSResult::setTimeNumber(int numberOfTimes)
4561 {
4562  if (numberOfTimes < 0) return false;
4563 
4564  if (job == NULL) job = new JobResult();
4566  job->timingInformation->numberOfTimes = numberOfTimes;
4567  return true;
4568 }//setTimeNumber
4569 
4570 bool OSResult::setUsedDiskSpaceUnit(std::string unit)
4571 {
4572  if (verifyStorageUnit(unit) == 0) return false;
4573 
4574  if (job == NULL) job = new JobResult();
4575  if (job->usedDiskSpace == NULL) job->usedDiskSpace = new StorageCapacity();
4576  job->usedDiskSpace->unit = unit;
4577  return true;
4578 }//setUsedDiskSpaceUnit
4579 
4580 bool OSResult::setUsedDiskSpaceDescription(std::string description)
4581 {
4582  if (job == NULL) job = new JobResult();
4583  if (job->usedDiskSpace == NULL) job->usedDiskSpace = new StorageCapacity();
4584  job->usedDiskSpace->description = description;
4585  return true;
4586 }//setUsedDiskSpaceDescription
4587 
4589 {
4590  if (job == NULL) job = new JobResult();
4591  if (job->usedDiskSpace == NULL) job->usedDiskSpace = new StorageCapacity();
4593  return true;
4594 }//setUsedDiskSpaceValue
4595 
4596 bool OSResult::setUsedMemoryUnit(std::string unit)
4597 {
4598  if (verifyStorageUnit(unit) == 0) return false;
4599 
4600  if (job == NULL) job = new JobResult();
4601  if (job->usedMemory == NULL) job->usedMemory = new StorageCapacity();
4602  job->usedMemory->unit = unit;
4603  return true;
4604 }//setUsedMemoryUnit
4605 
4606 bool OSResult::setUsedMemoryDescription(std::string description)
4607 {
4608  if (job == NULL) job = new JobResult();
4609  if (job->usedMemory == NULL) job->usedMemory = new StorageCapacity();
4610  job->usedMemory->description = description;
4611  return true;
4612 }//setUsedMemoryDescription
4613 
4615 {
4616  if (job == NULL) job = new JobResult();
4617  if (job->usedMemory == NULL) job->usedMemory = new StorageCapacity();
4618  job->usedMemory->value = value;
4619  return true;
4620 }//setUsedMemoryValue
4621 
4622 bool OSResult::setUsedCPUSpeedUnit(std::string unit)
4623 {
4624  if ( verifyCPUSpeedUnit(unit) == 0) return false;
4625 
4626  if (job == NULL) job = new JobResult();
4627  if (job->usedCPUSpeed == NULL) job->usedCPUSpeed = new CPUSpeed();
4628  job->usedCPUSpeed->unit = unit;
4629  return true;
4630 }//setUsedCPUSpeedUnit
4631 
4632 bool OSResult::setUsedCPUSpeedDescription(std::string description)
4633 {
4634  if (job == NULL) job = new JobResult();
4635  if (job->usedCPUSpeed == NULL) job->usedCPUSpeed = new CPUSpeed();
4636  job->usedCPUSpeed->description = description;
4637  return true;
4638 }//setUsedCPUSpeedDescription
4639 
4641 {
4642  if (job == NULL) job = new JobResult();
4643  if (job->usedCPUSpeed == NULL) job->usedCPUSpeed = new CPUSpeed();
4645  return true;
4646 }//setUsedCPUSpeedValue
4647 
4648 bool OSResult::setUsedCPUNumberDescription(std::string description)
4649 {
4650  if (job == NULL) job = new JobResult();
4651  if (job->usedCPUNumber == NULL) job->usedCPUNumber = new CPUNumber();
4652  job->usedCPUNumber->description = description;
4653  return true;
4654 }//setUsedCPUNumberDescription
4655 
4657 {
4658  if (job == NULL) job = new JobResult();
4659  if (job->usedCPUNumber == NULL) job->usedCPUNumber = new CPUNumber();
4661  return true;
4662 }//setUsedCPUNumberValue
4663 
4665 {
4666  if (job == NULL) job = new JobResult();
4667  if (job->otherResults == NULL) job->otherResults = new OtherResults();
4668  if (num < 0) return false;
4669  if (job->otherResults->other != NULL) return false;
4671  if (num > 0)
4672  {
4673  job->otherResults->other = new OtherResult*[num];
4674  for(int i = 0; i < num; i++)
4675  job->otherResults->other[i] = new OtherResult();
4676  }
4677  return true;
4678 }//setNumberOfOtherJobResults
4679 
4680 
4681 bool OSResult::setOtherJobResultName(int idx, string name)
4682 {
4683  if (job == NULL) job = new JobResult();
4684  if (job->otherResults == NULL) return false;
4685  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
4686  return false;
4687  job->otherResults->other[idx]->name = name;
4688  return true;
4689 }//setOtherJobResultName
4690 
4692 {
4693  if (job == NULL) job = new JobResult();
4694  if (job->otherResults == NULL) return false;
4695  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
4696  return false;
4698  return true;
4699 }//setOtherJobResultValue
4700 
4701 bool OSResult::setOtherJobResultDescription(int idx, string description)
4702 {
4703  if (job == NULL) job = new JobResult();
4704  if (job->otherResults == NULL) return false;
4705  if (idx < 0 || idx >= job->otherResults->numberOfOtherResults)
4706  return false;
4707  job->otherResults->other[idx]->description = description;
4708  return true;
4709 }//setOtherJobResultDescription
4710 
4711 
4712 bool OSResult::setVariableNumber(int variableNumber)
4713 {
4714  if(variableNumber < 0)
4715  return false;
4716  if(optimization == NULL) optimization = new OptimizationResult();
4717  optimization->numberOfVariables = variableNumber;
4718  return true;
4719 }//setVariableNumber
4720 
4721 bool OSResult::setObjectiveNumber(int objectiveNumber)
4722 {
4723 
4724  if(objectiveNumber < 0)
4725  return false;
4726  if(optimization == NULL) optimization = new OptimizationResult();
4727  optimization->numberOfObjectives = objectiveNumber;
4728  return true;
4729 }//setObjectiveNumber
4730 
4731 bool OSResult::setConstraintNumber(int constraintNumber)
4732 {
4733  if(constraintNumber < 0)
4734  return false;
4735  if(optimization == NULL) optimization = new OptimizationResult();
4736  optimization->numberOfConstraints = constraintNumber;
4737  return true;
4738 }//setConstraintNumber
4739 
4741 {
4742  if(number < 0) return false;
4743  if(number == 0) return true;
4744  if(optimization == NULL) optimization = new OptimizationResult();
4745  optimization->numberOfSolutions = number;
4746  optimization->solution = new OptimizationSolution*[number];
4747  for(int i = 0; i < number; i++)
4748  {
4750  }
4751  return true;
4752 }//setSolutionNumber
4753 
4754 bool OSResult::setSolutionStatus(int solIdx, string type, string description)
4755 {
4756  int nSols = this->getSolutionNumber();
4757  if(optimization == NULL) return false;
4758  if(nSols <= 0) return false;
4759  if(optimization->solution == NULL ||
4760  solIdx < 0 || solIdx >= nSols) return false;
4761  if(optimization->solution[solIdx] == NULL)
4762  optimization->solution[solIdx] = new OptimizationSolution();
4763  if(optimization->solution[solIdx]->status == NULL)
4765 
4766  if (verifySolutionStatus(type) == false) return false;
4767 
4768  optimization->solution[solIdx]->status->type = type;
4769  optimization->solution[solIdx]->status->description = description;
4770  return true;
4771 }//setSolutionStatus
4772 
4773 bool OSResult::setSolutionStatusType(int solIdx, std::string type)
4774 {
4775  int nSols = this->getSolutionNumber();
4776  if(optimization == NULL) return false;
4777  if(nSols <= 0) return false;
4778  if(optimization->solution == NULL ||
4779  solIdx < 0 || solIdx >= nSols) return false;
4780  if(optimization->solution[solIdx] == NULL)
4781  optimization->solution[solIdx] = new OptimizationSolution();
4782  if(optimization->solution[solIdx]->status == NULL)
4784 
4785  if (verifySolutionStatus(type) == false) return false;
4786 
4787  optimization->solution[solIdx]->status->type = type;
4788  return true;
4789 }//setSolutionStatusType
4790 
4791 bool OSResult::setSolutionStatusDescription(int solIdx, std::string description)
4792 {
4793  int nSols = this->getSolutionNumber();
4794  if(optimization == NULL) return false;
4795  if(nSols <= 0) return false;
4796  if(optimization->solution == NULL ||
4797  solIdx < 0 || solIdx >= nSols) return false;
4798  if(optimization->solution[solIdx] == NULL)
4799  {
4800  optimization->solution[solIdx] = new OptimizationSolution();
4801  }
4802  if(optimization->solution[solIdx]->status == NULL)
4803  {
4805  }
4806  optimization->solution[solIdx]->status->description = description;
4807  return true;
4808 }//setSolutionStatusDescription
4809 
4811 {
4812  int nSols = this->getSolutionNumber();
4813  if (optimization == NULL) return false;
4814  if (nSols <= 0) return false;
4815  if (optimization->solution == NULL ||
4816  solIdx < 0 || solIdx >= nSols) return false;
4817  if (optimization->solution[solIdx] == NULL)
4818  {
4819  optimization->solution[solIdx] = new OptimizationSolution();
4820  }
4821  if (optimization->solution[solIdx]->status == NULL)
4822  {
4824  }
4825  if (num < 0) return false;
4826  if (optimization->solution[solIdx]->status->substatus != NULL) return false;
4828  if (num > 0)
4829  {
4831  for(int i = 0; i < num; i++)
4832  {
4834  }
4835  }
4836  return true;
4837 }//setNumberOfSolutionSubstatuses
4838 
4839 bool OSResult::setSolutionSubstatusType(int solIdx, int substatusIdx, std::string type)
4840 {
4841  int nSols = this->getSolutionNumber();
4842  if(optimization == NULL) return false;
4843  if(optimization->solution == NULL ||
4844  solIdx < 0 || solIdx >= nSols) return false;
4845  if(optimization->solution[solIdx] == NULL) return false;
4846  if(optimization->solution[solIdx]->status == NULL) return false;
4847  int nSubs = optimization->solution[solIdx]->status->numberOfSubstatuses;
4848  if (substatusIdx < 0 || substatusIdx >= nSubs) return false;
4849 
4850  if (verifySolutionSubstatusType(type) == 0) return false;
4851 
4852  optimization->solution[solIdx]->status->substatus[substatusIdx]->type = type;
4853  return true;
4854 }//setSolutionSubstatusType
4855 
4856 bool OSResult::setSolutionSubstatusDescription(int solIdx, int substatusIdx, std::string description)
4857 {
4858  int nSols = this->getSolutionNumber();
4859  if(optimization == NULL) return false;
4860  if(optimization->solution == NULL ||
4861  solIdx < 0 || solIdx >= nSols) return false;
4862  if(optimization->solution[solIdx] == NULL) return false;
4863  if(optimization->solution[solIdx]->status == NULL) return false;
4864  int nSubs = optimization->solution[solIdx]->status->numberOfSubstatuses;
4865  if (substatusIdx < 0 || substatusIdx >= nSubs) return false;
4866  optimization->solution[solIdx]->status->substatus[substatusIdx]->description = description;
4867  return true;
4868 }//setSolutionSubstatusDescription
4869 
4870 bool OSResult::setSolutionTargetObjectiveIdx(int solIdx, int objectiveIdx)
4871 {
4872  int nSols = this->getSolutionNumber();
4873  if(optimization == NULL) return false;
4874  if(nSols <= 0) return false;
4875  if(optimization == NULL) return false;
4876  if(optimization->solution == NULL ||
4877  solIdx < 0 || solIdx >= nSols) return false;
4878  if(optimization->solution[solIdx] == NULL)
4879  {
4880  optimization->solution[solIdx] = new OptimizationSolution();
4881  }
4882  if(objectiveIdx >= 0) return false;
4883  optimization->solution[solIdx]->targetObjectiveIdx = objectiveIdx;
4884  return true;
4885 }//setSolutionTargetObjectiveIdx
4886 
4887 bool OSResult::setSolutionTargetObjectiveName(int solIdx, std::string objectiveName)
4888 {
4889  int nSols = this->getSolutionNumber();
4890  if(optimization == NULL) return false;
4891  if(nSols <= 0) return false;
4892  if(optimization == NULL) return false;
4893  if(optimization->solution == NULL ||
4894  solIdx < 0 || solIdx >= nSols) return false;
4895  if(optimization->solution[solIdx] == NULL)
4896  {
4897  optimization->solution[solIdx] = new OptimizationSolution();
4898  }
4899  optimization->solution[solIdx]->targetObjectiveName = objectiveName;
4900  return true;
4901 }//setSolutionTargetObjectiveName
4902 
4903 bool OSResult::setSolutionWeightedObjectives(int solIdx, bool weightedObjectives)
4904 {
4905  int nSols = this->getSolutionNumber();
4906  if (optimization == NULL) return false;
4907  if (nSols <= 0) return false;
4908  if (optimization == NULL) return false;
4909  if (optimization->solution == NULL ||
4910  solIdx < 0 || solIdx >= nSols) return false;
4911  if (optimization->solution[solIdx] == NULL)
4912  optimization->solution[solIdx] = new OptimizationSolution();
4913  optimization->solution[solIdx]->weightedObjectives = weightedObjectives;
4914  return true;
4915 }//setSolutionWeightedObjectives
4916 
4917 bool OSResult::setSolutionMessage(int solIdx, std::string msg)
4918 {
4919  int nSols = this->getSolutionNumber();
4920  if(optimization == NULL) return false;
4921  if(nSols <= 0) return false;
4922  if(optimization == NULL) return false;
4923  if(optimization->solution == NULL ||
4924  solIdx < 0 || solIdx >= nSols) return false;
4925  if(optimization->solution[solIdx] == NULL)
4926  {
4927  optimization->solution[solIdx] = new OptimizationSolution();
4928  }
4929  optimization->solution[solIdx]->message = msg;
4930  return true;
4931 }//setSolutionMessage
4932 
4933 bool OSResult::setNumberOfPrimalVariableValues(int solIdx, int numberOfVar)
4934 {
4935  int nSols = this->getSolutionNumber();
4936  int nVar = this->getVariableNumber();
4937  if (numberOfVar <= 0 || numberOfVar > nVar) return false;
4938  if (optimization == NULL) return false;
4939  if (nSols <= 0) return false;
4940  if (optimization->solution == NULL ||
4941  solIdx < 0 || solIdx >= nSols) return false;
4942  if (optimization->solution[solIdx] == NULL)
4943  {
4944  optimization->solution[solIdx] = new OptimizationSolution();
4945  }
4946  if (optimization->solution[solIdx]->variables == NULL)
4947  {
4948  optimization->solution[solIdx]->variables = new VariableSolution();
4949  }
4950  if (optimization->solution[solIdx]->variables->values == NULL)
4951  {
4953  }
4954  if (numberOfVar < 0) return false;
4955  if (optimization->solution[solIdx]->variables->values->var != NULL) return false;
4956  optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
4957  if (numberOfVar > 0)
4958  optimization->solution[solIdx]->variables->values->var = new VarValue*[numberOfVar];
4959  return true;
4960 }//setNumberOfPrimalVariableValues
4961 
4962 bool OSResult::setPrimalVariableValuesSparse(int solIdx, std::vector<IndexValuePair*> x)
4963 {
4964  int nSols = this->getSolutionNumber();
4965  int numberOfVar = x.size();
4966  if(optimization == NULL) return false;
4967  if(nSols <= 0) return false;
4968  if(optimization->solution == NULL ||
4969  solIdx < 0 || solIdx >= nSols) return false;
4970  if(optimization->solution[solIdx] == NULL)
4971  {
4972  optimization->solution[solIdx] = new OptimizationSolution();
4973  }
4974  if(optimization->solution[solIdx]->variables == NULL)
4975  {
4976  optimization->solution[solIdx]->variables = new VariableSolution();
4977  }
4978  if (optimization->solution[solIdx]->variables->values == NULL)
4979  {
4981  }
4982  if (optimization->solution[solIdx]->variables->values->var == NULL)
4983  {
4984  optimization->solution[solIdx]->variables->values->var = new VarValue*[numberOfVar];
4985  }
4986  optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
4987  if(x.size() == 0)
4988  {
4989  //optimization->solution[solIdx]->variables->values->var = NULL;
4990  return true;
4991  }
4992  for(int i = 0; i < numberOfVar; i++)
4993  {
4994  optimization->solution[solIdx]->variables->values->var[i] = new VarValue();
4995  optimization->solution[solIdx]->variables->values->var[i]->idx = x[i]->idx;
4996  optimization->solution[solIdx]->variables->values->var[i]->value = x[i]->value;
4997  }
4998  return true;
4999 }//setPrimalVariableValuesSparse
5000 
5002 {
5003  int numberOfVar = this->getVariableNumber();
5004  int nSols = this->getSolutionNumber();
5005  if(optimization == NULL) return false;
5006  if(nSols <= 0) return false;
5007  if(optimization->solution == NULL ||
5008  solIdx < 0 || solIdx >= nSols) return false;
5009  if(optimization->solution[solIdx] == NULL)
5010  {
5011  optimization->solution[solIdx] = new OptimizationSolution();
5012  }
5013  if(optimization->solution[solIdx]->variables == NULL)
5014  {
5015  optimization->solution[solIdx]->variables = new VariableSolution();
5016  }
5017  if(optimization->solution[solIdx]->variables->values == NULL)
5018  {
5020  }
5021  if(optimization->solution[solIdx]->variables->values->var == NULL)
5022  {
5023  optimization->solution[solIdx]->variables->values->var = new VarValue*[numberOfVar];
5024  }
5025  optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
5026  if(x == NULL)
5027  {
5028  //optimization->solution[solIdx]->variables->values->var = NULL;
5029  return true;
5030  }
5031  for(int i = 0; i < numberOfVar; i++)
5032  {
5033  optimization->solution[solIdx]->variables->values->var[i] = new VarValue();
5034  optimization->solution[solIdx]->variables->values->var[i]->idx = i;
5035  optimization->solution[solIdx]->variables->values->var[i]->value = x[i];
5036  }
5037  return true;
5038 }//setPrimalVariableValuesDense
5039 
5040 bool OSResult::setNumberOfVarValues(int solIdx, int numberOfVar)
5041 {
5042  if (optimization == NULL || optimization->solution == NULL)
5043  {
5044  // throw ErrorClass("No optimization or solution object defined");
5045  return false;
5046  }
5047  int nSols = optimization->numberOfSolutions;
5048  if (solIdx < 0 || solIdx >= nSols) return false;
5049  if (optimization->solution[solIdx] == NULL)
5050  optimization->solution[solIdx] = new OptimizationSolution();
5051  if (optimization->solution[solIdx]->variables == NULL)
5052  optimization->solution[solIdx]->variables = new VariableSolution();
5053  if (optimization->solution[solIdx]->variables->values == NULL)
5055  if (optimization->solution[solIdx]->variables->values->numberOfVar > 0) return false;
5056  if (numberOfVar < 0) return false;
5057  if (optimization->solution[solIdx]->variables->values->var != NULL) return false;
5058  optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
5059  if (numberOfVar > 0)
5060  {
5061  optimization->solution[solIdx]->variables->values->var = new VarValue*[numberOfVar];
5062  for(int i = 0; i < numberOfVar; i++)
5063  optimization->solution[solIdx]->variables->values->var[i] = new VarValue();
5064  }
5065  return true;
5066 }//setNumberOfVarValues
5067 
5068 bool OSResult::setVarValue(int solIdx, int number, int idx, std::string name, double val)
5069 {
5070  if (optimization == NULL || optimization->solution == NULL)
5071  {
5072  // throw ErrorClass("No optimization or solution object defined");
5073  return false;
5074  }
5075  int nSols = optimization->numberOfSolutions;
5076  if (solIdx < 0 || solIdx >= nSols)
5077  {
5078  // throw ErrorClass("Trying to use a solution that was not previously declared");
5079  return false;
5080  }
5081  if (optimization->solution[solIdx] == NULL)
5082  {
5083  // throw ErrorClass("Solution object not previously defined");
5084  return false;
5085  }
5086  if (optimization->solution[solIdx]->variables == NULL)
5087  {
5088  // throw ErrorClass("variables object not previously defined");
5089  return false;
5090  }
5091  if (optimization->solution[solIdx]->variables->values == NULL)
5092  {
5093  // throw ErrorClass("values object not previously defined");
5094  return false;
5095  }
5096  int nVar = optimization->solution[solIdx]->variables->values->numberOfVar;
5097  if (number < 0 || number >= nVar)
5098  {
5099  // throw ErrorClass("Trying to set value outside of var array boundaries");
5100  return false;
5101  }
5102  if (idx < 0)
5103  {
5104  // throw ErrorClass("Variable index cannot be negative.");
5105  return false;
5106  }
5107  optimization->solution[solIdx]->variables->values->var[number]->idx = idx;
5108  optimization->solution[solIdx]->variables->values->var[number]->name = name;
5109  optimization->solution[solIdx]->variables->values->var[number]->value = val;
5110  return true;
5111 }//setVarValue
5112 
5113 
5114 bool OSResult::setNumberOfVarValuesString(int solIdx, int numberOfVar)
5115 {
5116  if (optimization == NULL || optimization->solution == NULL)
5117  {
5118  // throw ErrorClass("No optimization or solution object defined");
5119  return false;
5120  }
5121  int nSols = optimization->numberOfSolutions;
5122  if (solIdx < 0 || solIdx >= nSols)
5123  {
5124  // throw ErrorClass("Trying to use a solution that was not previously declared");
5125  return false;
5126  }
5127  if (optimization->solution[solIdx] == NULL)
5128  optimization->solution[solIdx] = new OptimizationSolution();
5129  if (optimization->solution[solIdx]->variables == NULL)
5130  optimization->solution[solIdx]->variables = new VariableSolution();
5131  if (optimization->solution[solIdx]->variables->valuesString == NULL)
5134  return false;
5135  if (numberOfVar < 0) return false;
5136  if (optimization->solution[solIdx]->variables->valuesString->var != NULL) return false;
5137  optimization->solution[solIdx]->variables->valuesString->numberOfVar = numberOfVar;
5138  if (numberOfVar > 0)
5139  {
5140  optimization->solution[solIdx]->variables->valuesString->var = new VarValueString*[numberOfVar];
5141  for(int i = 0; i < numberOfVar; i++)
5143  }
5144  return true;
5145 }//setNumberOfVarValuesString
5146 
5147 bool OSResult::setVarValueString(int solIdx, int number, int idx, std::string name, std::string str)
5148 {
5149  if (optimization == NULL || optimization->solution == NULL)
5150  {
5151  // throw ErrorClass("No optimization or solution object defined");
5152  return false;
5153  }
5154  int nSols = optimization->numberOfSolutions;
5155  if (solIdx < 0 || solIdx >= nSols)
5156  {
5157  // throw ErrorClass("Trying to use a solution that was not previously declared");
5158  return false;
5159  }
5160  if (optimization->solution[solIdx] == NULL)
5161  {
5162  // throw ErrorClass("Solution object not previously defined");
5163  return false;
5164  }
5165  if (optimization->solution[solIdx]->variables == NULL)
5166  {
5167  // throw ErrorClass("variables object not previously defined");
5168  return false;
5169  }
5170  if (optimization->solution[solIdx]->variables->valuesString == NULL)
5171  {
5172  // throw ErrorClass("values object not previously defined");
5173  return false;
5174  }
5175  int nVar = optimization->solution[solIdx]->variables->valuesString->numberOfVar;
5176  if (number < 0 || number >= nVar)
5177  {
5178  // throw ErrorClass("Trying to set value outside of var array boundaries");
5179  return false;
5180  }
5181  if (idx < 0)
5182  {
5183  // throw ErrorClass("Variable index cannot be negative.");
5184  return false;
5185  }
5186  optimization->solution[solIdx]->variables->valuesString->var[number]->idx = idx;
5187  optimization->solution[solIdx]->variables->valuesString->var[number]->name = name;
5188  optimization->solution[solIdx]->variables->valuesString->var[number]->value = str;
5189  return true;
5190 }//setVarValueString
5191 
5192 bool OSResult::setBasisStatus(int solIdx, int object, int status, int *i, int ni)
5193 {
5194  if (optimization == NULL || optimization->solution == NULL)
5195  return false;
5196  int nSols = optimization->numberOfSolutions;
5197  if (solIdx < 0 || solIdx >= nSols)
5198  return false;
5199  if (optimization->solution[solIdx] == NULL)
5200  optimization->solution[solIdx] = new OptimizationSolution();
5201 
5202  switch (object)
5203  {
5205  {
5206  if (optimization->solution[solIdx]->variables == NULL)
5207  optimization->solution[solIdx]->variables = new VariableSolution();
5208  if (optimization->solution[solIdx]->variables->basisStatus == NULL)
5210  for (int j=0; j<ni; j++) if (i[j] < 0) return false;
5211  return optimization->solution[solIdx]->variables->basisStatus->setIntVector(status, i, ni);
5212  }
5214  {
5215  if (optimization->solution[solIdx]->objectives == NULL)
5217  if (optimization->solution[solIdx]->objectives->basisStatus == NULL)
5219  for (int j=0; j<ni; j++) if (i[j] >= 0) return false;
5220  return optimization->solution[solIdx]->objectives->basisStatus->setIntVector(status, i, ni);
5221  }
5223  {
5224  if (optimization->solution[solIdx]->constraints == NULL)
5226  if (optimization->solution[solIdx]->constraints->basisStatus == NULL)
5228  for (int j=0; j<ni; j++) if (i[j] < 0) return false;
5229  return optimization->solution[solIdx]->constraints->basisStatus->setIntVector(status, i, ni);
5230  }
5231  default:
5232  throw ErrorClass("target object not implemented in setBasisStatus");
5233  }
5234 }//setBasisStatus
5235 
5237 {
5238  //int iNumberOfVariables = this->getVariableNumber();
5239  //if(iNumberOfVariables <= 0) return false;
5240  int nSols = this->getSolutionNumber();
5241  if (nSols <= 0) return false;
5242  if (optimization == NULL) return false;
5243  if (optimization->solution == NULL ||
5244  solIdx < 0 || solIdx >= nSols) return false;
5245  if (optimization->solution[solIdx] == NULL)
5246  optimization->solution[solIdx] = new OptimizationSolution();
5247  if (optimization->solution[solIdx]->variables == NULL)
5248  optimization->solution[solIdx]->variables = new VariableSolution();
5249  if (num < 0) return false;
5250  if (optimization->solution[solIdx]->variables->other != NULL) return false;
5252  if (num > 0)
5253  {
5254  optimization->solution[solIdx]->variables->other = new OtherVariableResult*[num];
5255  for(int i = 0; i < num; i++)
5256  optimization->solution[solIdx]->variables->other[ i] = new OtherVariableResult();
5257  }
5258  return true;
5259 }//setNumberOfOtherVariableResults
5260 
5261 
5262 bool OSResult::setAnOtherVariableResultSparse(int solIdx, int otherIdx, string name, string value, string description, int *idx, string *s, int numberOfVar)
5263 {
5264  int iNumberOfVariables = numberOfVar;
5265  if(iNumberOfVariables <= -1) return false;
5266  int nSols = this->getSolutionNumber();
5267  if(optimization == NULL) return false;
5268  if(nSols <= 0) return false;
5269  if(optimization == NULL) return false;
5270  if(optimization->solution == NULL ||
5271  solIdx < 0 || solIdx >= nSols) return false;
5272  if(optimization->solution[solIdx] == NULL) return false;
5273  if(optimization->solution[solIdx]->variables == NULL)return false;
5274  if(optimization->solution[solIdx]->variables->other == NULL) return false;
5275  if(optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5276  optimization->solution[solIdx]->variables->other[ otherIdx]->name = name;
5277  optimization->solution[solIdx]->variables->other[ otherIdx]->value = value;
5278  optimization->solution[solIdx]->variables->other[ otherIdx]->description = description;
5279  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5280  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var == NULL)
5281  optimization->solution[solIdx]->variables->other[ otherIdx]->var = new OtherVarResult*[numberOfVar];
5282  for(int i = 0; i < numberOfVar; i++)
5283  {
5284  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i] = new OtherVarResult();
5285  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->idx = idx[i];
5286  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->value = s[i];
5287  }
5288  return true;
5289 }//setAnOtherVariableResultSparse
5290 
5291 
5292 bool OSResult::setAnOtherVariableResultSparse(int solIdx, int otherIdx, string name, string value, string description, int *idx, string *s, int numberOfVar, std::string type, std::string varType, std::string enumType)
5293 {
5294  int iNumberOfVariables = numberOfVar;
5295  if(iNumberOfVariables <= -1) return false;
5296  int nSols = this->getSolutionNumber();
5297  if(optimization == NULL) return false;
5298  if(nSols <= 0) return false;
5299  if(optimization == NULL) return false;
5300  if(optimization->solution == NULL ||
5301  solIdx < 0 || solIdx >= nSols) return false;
5302  if(optimization->solution[solIdx] == NULL) return false;
5303  if(optimization->solution[solIdx]->variables == NULL)return false;
5304  if(optimization->solution[solIdx]->variables->other == NULL) return false;
5305  if(optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5306  optimization->solution[solIdx]->variables->other[ otherIdx]->name = name;
5307  optimization->solution[solIdx]->variables->other[ otherIdx]->type = type;
5308  optimization->solution[solIdx]->variables->other[ otherIdx]->varType = varType;
5309  optimization->solution[solIdx]->variables->other[ otherIdx]->enumType = enumType;
5310  optimization->solution[solIdx]->variables->other[ otherIdx]->value = value;
5311  optimization->solution[solIdx]->variables->other[ otherIdx]->description = description;
5312  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5313  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var != NULL) return false;
5314  optimization->solution[solIdx]->variables->other[ otherIdx]->var = new OtherVarResult*[numberOfVar];
5315  for(int i = 0; i < numberOfVar; i++)
5316  {
5317  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i] = new OtherVarResult();
5318  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->idx = idx[i];
5319  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->value = s[i];
5320  }
5321  return true;
5322 }//setAnOtherVariableResultSparse
5323 
5324 
5325 bool OSResult::setAnOtherVariableResultDense(int solIdx, int otherIdx, string name, string value, string description, string *s)
5326 {
5327  int numberOfVar = this->getVariableNumber();
5328  int iNumberOfVariables = numberOfVar;
5329  if (iNumberOfVariables <= -1) return false;
5330  int nSols = this->getSolutionNumber();
5331  if (optimization == NULL) return false;
5332  if (nSols <= 0) return false;
5333  if (optimization == NULL) return false;
5334  if (optimization->solution == NULL ||
5335  solIdx < 0 || solIdx >= nSols) return false;
5336  if (optimization->solution[solIdx] == NULL) return false;
5337  if (optimization->solution[solIdx]->variables == NULL)return false;
5338  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5339  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5340  optimization->solution[solIdx]->variables->other[ otherIdx]->name = name;
5341  optimization->solution[solIdx]->variables->other[ otherIdx]->value = value;
5342  optimization->solution[solIdx]->variables->other[ otherIdx]->description = description;
5343  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5344  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var == NULL)
5345  optimization->solution[solIdx]->variables->other[ otherIdx]->var = new OtherVarResult*[numberOfVar];
5346  for(int i = 0; i < numberOfVar; i++)
5347  {
5348  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i] = new OtherVarResult();
5349  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->idx = i;
5350  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->value = s[i];
5351  ;
5352  }
5353  return true;
5354 }//setAnOtherVariableResultDense
5355 
5356 bool OSResult::setAnOtherVariableResultDense(int solIdx, int otherIdx, string name, string value, string description, string *s, std::string type, std::string varType, std::string enumType)
5357 {
5358  int numberOfVar = this->getVariableNumber();
5359  int iNumberOfVariables = numberOfVar;
5360  if(iNumberOfVariables <= -1) return false;
5361  int nSols = this->getSolutionNumber();
5362  if(optimization == NULL) return false;
5363  if(nSols <= 0) return false;
5364  if(optimization == NULL) return false;
5365  if(optimization->solution == NULL ||
5366  solIdx < 0 || solIdx >= nSols) return false;
5367  if(optimization->solution[solIdx] == NULL) return false;
5368  if(optimization->solution[solIdx]->variables == NULL)return false;
5369  if(optimization->solution[solIdx]->variables->other == NULL) return false;
5370  if(optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5371  optimization->solution[solIdx]->variables->other[ otherIdx]->name = name;
5372  optimization->solution[solIdx]->variables->other[ otherIdx]->type = type;
5373  optimization->solution[solIdx]->variables->other[ otherIdx]->varType = varType;
5374  optimization->solution[solIdx]->variables->other[ otherIdx]->enumType = enumType;
5375  optimization->solution[solIdx]->variables->other[ otherIdx]->value = value;
5376  optimization->solution[solIdx]->variables->other[ otherIdx]->description = description;
5377  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5378  if(optimization->solution[solIdx]->variables->other[ otherIdx]->var != NULL) return false;
5379  optimization->solution[solIdx]->variables->other[ otherIdx]->var = new OtherVarResult*[numberOfVar];
5380  for(int i = 0; i < numberOfVar; i++)
5381  {
5382  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i] = new OtherVarResult();
5383  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->idx = i;
5384  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i]->value = s[i];
5385  ;
5386  }
5387  return true;
5388 }//setAnOtherVariableResultDense
5389 
5390 bool OSResult::setOtherVariableResultNumberOfVar(int solIdx, int otherIdx, int numberOfVar)
5391 {
5392  int iNumberOfVariables = numberOfVar;
5393  if (iNumberOfVariables <= -1) return false;
5394  int nSols = this->getSolutionNumber();
5395  if (nSols <= 0) return false;
5396  if (optimization == NULL) return false;
5397  if (optimization->solution == NULL ||
5398  solIdx < 0 || solIdx >= nSols) return false;
5399  if (optimization->solution[solIdx] == NULL) return false;
5400  if (optimization->solution[solIdx]->variables == NULL) return false;
5401  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5402  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5403  if (optimization->solution[solIdx]->variables->other[ otherIdx]->var == NULL)
5404  optimization->solution[solIdx]->variables->other[ otherIdx]->var = new OtherVarResult*[numberOfVar];
5405  for(int i = 0; i < numberOfVar; i++)
5406  optimization->solution[solIdx]->variables->other[ otherIdx]->var[i] = new OtherVarResult();
5407  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5408  return true;
5409 }//setOtherVariableResultNumberOfVar
5410 
5411 
5412 bool OSResult::setOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
5413 {
5414  int iNumberOfEnumerations = numberOfEnumerations;
5415  if (iNumberOfEnumerations <= -1) return false;
5416  int nSols = this->getSolutionNumber();
5417  if (nSols <= 0) return false;
5418  if (optimization == NULL) return false;
5419  if (optimization->solution == NULL ||
5420  solIdx < 0 || solIdx >= nSols) return false;
5421  if (optimization->solution[solIdx] == NULL) return false;
5422  if (optimization->solution[solIdx]->variables == NULL) return false;
5423  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5424  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5425  if (optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration == NULL)
5426  optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration = new OtherOptionOrResultEnumeration*[numberOfEnumerations];
5427  for(int i = 0; i < numberOfEnumerations; i++)
5429  optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
5430  return true;
5431 }//setOtherVariableResultNumberOfEnumerations
5432 
5433 bool OSResult::setOtherVariableResultName(int solIdx, int otherIdx, std::string name)
5434 {
5435  int numberOfVar = this->getVariableNumber();
5436  int iNumberOfVariables = numberOfVar;
5437  if (iNumberOfVariables <= -1) return false;
5438  int nSols = this->getSolutionNumber();
5439  if (optimization == NULL) return false;
5440  if (nSols <= 0) return false;
5441  if (optimization == NULL) return false;
5442  if (optimization->solution == NULL ||
5443  solIdx < 0 || solIdx >= nSols) return false;
5444  if (optimization->solution[solIdx] == NULL) return false;
5445  if (optimization->solution[solIdx]->variables == NULL)return false;
5446  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5447  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5448  optimization->solution[solIdx]->variables->other[ otherIdx]->name = name;
5449  return true;
5450 }//setOtherVariableResultName
5451 
5452 bool OSResult::setOtherVariableResultType(int solIdx, int otherIdx, std::string type)
5453 {
5454  int numberOfVar = this->getVariableNumber();
5455  int iNumberOfVariables = numberOfVar;
5456  if (iNumberOfVariables <= -1) return false;
5457  int nSols = this->getSolutionNumber();
5458  if (optimization == NULL) return false;
5459  if (nSols <= 0) return false;
5460  if (optimization == NULL) return false;
5461  if (optimization->solution == NULL ||
5462  solIdx < 0 || solIdx >= nSols) return false;
5463  if (optimization->solution[solIdx] == NULL) return false;
5464  if (optimization->solution[solIdx]->variables == NULL)return false;
5465  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5466  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5467  optimization->solution[solIdx]->variables->other[ otherIdx]->type = type;
5468  return true;
5469 }//setOtherVariableResultType
5470 
5471 bool OSResult::setOtherVariableResultVarType(int solIdx, int otherIdx, std::string varType)
5472 {
5473  int numberOfVar = this->getVariableNumber();
5474  int iNumberOfVariables = numberOfVar;
5475  if (iNumberOfVariables <= -1) return false;
5476  int nSols = this->getSolutionNumber();
5477  if (optimization == NULL) return false;
5478  if (nSols <= 0) return false;
5479  if (optimization == NULL) return false;
5480  if (optimization->solution == NULL ||
5481  solIdx < 0 || solIdx >= nSols) return false;
5482  if (optimization->solution[solIdx] == NULL) return false;
5483  if (optimization->solution[solIdx]->variables == NULL)return false;
5484  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5485  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5486  optimization->solution[solIdx]->variables->other[ otherIdx]->varType = varType;
5487  return true;
5488 }//setOtherVariableResultVarType
5489 
5490 bool OSResult::setOtherVariableResultEnumType(int solIdx, int otherIdx, std::string enumType)
5491 {
5492  int numberOfVar = this->getVariableNumber();
5493  int iNumberOfVariables = numberOfVar;
5494  if (iNumberOfVariables <= -1) return false;
5495  int nSols = this->getSolutionNumber();
5496  if (optimization == NULL) return false;
5497  if (nSols <= 0) return false;
5498  if (optimization == NULL) return false;
5499  if (optimization->solution == NULL ||
5500  solIdx < 0 || solIdx >= nSols) return false;
5501  if (optimization->solution[solIdx] == NULL) return false;
5502  if (optimization->solution[solIdx]->variables == NULL)return false;
5503  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5504  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5505  optimization->solution[solIdx]->variables->other[ otherIdx]->enumType = enumType;
5506  return true;
5507 }//setOtherVariableResultEnumType
5508 
5509 bool OSResult::setOtherVariableResultValue(int solIdx, int otherIdx, std::string value)
5510 {
5511  int numberOfVar = this->getVariableNumber();
5512  int iNumberOfVariables = numberOfVar;
5513  if (iNumberOfVariables <= -1) return false;
5514  int nSols = this->getSolutionNumber();
5515  if (optimization == NULL) return false;
5516  if (nSols <= 0) return false;
5517  if (optimization == NULL) return false;
5518  if (optimization->solution == NULL ||
5519  solIdx < 0 || solIdx >= nSols) return false;
5520  if (optimization->solution[solIdx] == NULL) return false;
5521  if (optimization->solution[solIdx]->variables == NULL)return false;
5522  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5523  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5524  optimization->solution[solIdx]->variables->other[ otherIdx]->value = value;
5525  return true;
5526 }//setOtherVariableResultValue
5527 
5528 bool OSResult::setOtherVariableResultDescription(int solIdx, int otherIdx, std::string description)
5529 {
5530  int numberOfVar = this->getVariableNumber();
5531  int iNumberOfVariables = numberOfVar;
5532  if (iNumberOfVariables <= -1) return false;
5533  int nSols = this->getSolutionNumber();
5534  if (optimization == NULL) return false;
5535  if (nSols <= 0) return false;
5536  if (optimization == NULL) return false;
5537  if (optimization->solution == NULL ||
5538  solIdx < 0 || solIdx >= nSols) return false;
5539  if (optimization->solution[solIdx] == NULL) return false;
5540  if (optimization->solution[solIdx]->variables == NULL)return false;
5541  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5542  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5543  optimization->solution[solIdx]->variables->other[ otherIdx]->description = description;
5544  return true;
5545 }//setOtherVariableResultDescription
5546 
5547 bool OSResult::setOtherVariableResultSolver(int solIdx, int otherIdx, std::string solver)
5548 {
5549  int numberOfVar = this->getVariableNumber();
5550  int iNumberOfVariables = numberOfVar;
5551  if (iNumberOfVariables <= -1) return false;
5552  int nSols = this->getSolutionNumber();
5553  if (optimization == NULL) return false;
5554  if (nSols <= 0) return false;
5555  if (optimization == NULL) return false;
5556  if (optimization->solution == NULL ||
5557  solIdx < 0 || solIdx >= nSols) return false;
5558  if (optimization->solution[solIdx] == NULL) return false;
5559  if (optimization->solution[solIdx]->variables == NULL)return false;
5560  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5561  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5562  optimization->solution[solIdx]->variables->other[ otherIdx]->solver = solver;
5563  return true;
5564 }//setOtherVariableResultSolver
5565 
5566 bool OSResult::setOtherVariableResultCategory(int solIdx, int otherIdx, std::string category)
5567 {
5568  int numberOfVar = this->getVariableNumber();
5569  int iNumberOfVariables = numberOfVar;
5570  if (iNumberOfVariables <= -1) return false;
5571  int nSols = this->getSolutionNumber();
5572  if (optimization == NULL) return false;
5573  if (nSols <= 0) return false;
5574  if (optimization == NULL) return false;
5575  if (optimization->solution == NULL ||
5576  solIdx < 0 || solIdx >= nSols) return false;
5577  if (optimization->solution[solIdx] == NULL) return false;
5578  if (optimization->solution[solIdx]->variables == NULL)return false;
5579  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5580  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5581  optimization->solution[solIdx]->variables->other[ otherIdx]->category = category;
5582  return true;
5583 }//setOtherVariableResultCategory
5584 
5585 bool OSResult::setOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx, int idx)
5586 {
5587  int nSols = this->getSolutionNumber();
5588  if(nSols <= 0) return false;
5589  if(optimization == NULL) return false;
5590  if(optimization->solution == NULL ||
5591  solIdx < 0 || solIdx >= nSols) return false;
5592  if(optimization->solution[solIdx] == NULL) return false;
5593  if(optimization->solution[solIdx]->variables == NULL) return false;
5594  if(optimization->solution[solIdx]->variables->other[otherIdx] == NULL) return false;
5595  if(optimization->solution[solIdx]->variables->other[otherIdx]->var == NULL) return false;
5596  if (idx < 0) return false;
5597  optimization->solution[solIdx]->variables->other[otherIdx]->var[varIdx]->idx = idx;
5598  return true;
5599 }//setOtherVariableResultVarIdx
5600 
5601 bool OSResult::setOtherVariableResultVarName(int solIdx, int otherIdx, int varIdx, std::string name)
5602 {
5603  int nSols = this->getSolutionNumber();
5604  if(nSols <= 0) return false;
5605  if(optimization == NULL) return false;
5606  if(optimization->solution == NULL ||
5607  solIdx < 0 || solIdx >= nSols) return false;
5608  if(optimization->solution[solIdx] == NULL) return false;
5609  if(optimization->solution[solIdx]->variables == NULL) return false;
5610  if(optimization->solution[solIdx]->variables->other[otherIdx] == NULL) return false;
5611  if(optimization->solution[solIdx]->variables->other[otherIdx]->var == NULL) return false;
5612  optimization->solution[solIdx]->variables->other[otherIdx]->var[varIdx]->name = name;
5613  return true;
5614 }//setOtherVariableResultVarName
5615 
5616 bool OSResult::setOtherVariableResultVar(int solIdx, int otherIdx, int varIdx, std::string value)
5617 {
5618  int nSols = this->getSolutionNumber();
5619  if(nSols <= 0) return false;
5620  if(optimization == NULL) return false;
5621  if(optimization->solution == NULL ||
5622  solIdx < 0 || solIdx >= nSols) return false;
5623  if(optimization->solution[solIdx] == NULL) return false;
5624  if(optimization->solution[solIdx]->variables == NULL) return false;
5625  if(optimization->solution[solIdx]->variables->other[otherIdx] == NULL) return false;
5626  if(optimization->solution[solIdx]->variables->other[otherIdx]->var == NULL) return false;
5627  optimization->solution[solIdx]->variables->other[otherIdx]->var[varIdx]->value = value;
5628  return true;
5629 }//setOtherVariableResultVar
5630 
5631 bool OSResult::setOtherOptionOrResultEnumeration(int solIdx, int otherIdx, int object, int enumIdx, std::string value, std::string description, int *i, int ni)
5632 {
5633  if (optimization == NULL || optimization->solution == NULL)
5634  return false;
5635  int nSols = optimization->numberOfSolutions;
5636  if (solIdx < 0 || solIdx >= nSols)
5637  return false;
5638  if (optimization->solution[solIdx] == NULL) return false;
5639 
5640  switch (object)
5641  {
5643  {
5644  if (optimization->solution[solIdx]->variables == NULL) return false;
5645  if (optimization->solution[solIdx]->variables->other == NULL) return false;
5647  if (otherIdx < 0 || otherIdx >= n_other) return false;
5648  if (optimization->solution[solIdx]->variables->other[ otherIdx] == NULL) return false;
5649  if (optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration == NULL) return false;
5650  int n_enum = optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfEnumerations;
5651  if (enumIdx < 0 || enumIdx >= n_enum) return false;
5652  if (optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration[enumIdx] == NULL)
5653  optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration[enumIdx] = new OtherOptionOrResultEnumeration();
5654  for (int j=0; j<ni; j++) if (i[j] < 0) return false;
5655  return optimization->solution[solIdx]->variables->other[ otherIdx]->enumeration[enumIdx]->setOtherOptionOrResultEnumeration(value, description, i, ni);
5656  }
5658  {
5659  if (optimization->solution[solIdx]->objectives == NULL) return false;
5660  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
5661  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
5662  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration == NULL) return false;
5663  int n_enum = optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfEnumerations;
5664  if (enumIdx < 0 || enumIdx >= n_enum) return false;
5665  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration[enumIdx] == NULL)
5666  optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration[enumIdx] = new OtherOptionOrResultEnumeration();
5667  for (int j=0; j<ni; j++) if (i[j] >= 0) return false;
5668  return optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration[enumIdx]->setOtherOptionOrResultEnumeration(value, description, i, ni);
5669  }
5671  {
5672  if (optimization->solution[solIdx]->constraints == NULL) return false;
5673  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
5674  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
5675  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration == NULL) return false;
5676  int n_enum = optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfEnumerations;
5677  if (enumIdx < 0 || enumIdx >= n_enum) return false;
5678  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration[enumIdx] == NULL)
5679  optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration[enumIdx] = new OtherOptionOrResultEnumeration();
5680  for (int j=0; j<ni; j++) if (i[j] < 0) return false;
5681  return optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration[enumIdx]->setOtherOptionOrResultEnumeration(value, description, i, ni);
5682  }
5683 
5684  default:
5685  throw ErrorClass("target object not implemented in setOtherOptionOrResultEnumeration");
5686  }
5687 }//setOtherOptionOrResultEnumeration
5688 
5689 
5691 {
5692  int nSols = this->getSolutionNumber();
5693  if (nSols <= 0) return false;
5694  if (optimization == NULL) return false;
5695  if (optimization->solution == NULL ||
5696  solIdx < 0 || solIdx >= nSols) return false;
5697  if (optimization->solution[solIdx] == NULL)
5698  {
5699  optimization->solution[solIdx] = new OptimizationSolution();
5700  }
5701  if (optimization->solution[solIdx]->objectives == NULL)
5702  {
5704  }
5705  if (num < 0) return false;
5706  if (optimization->solution[solIdx]->objectives->other != NULL) return false;
5708  if (num > 0)
5709  {
5711  for(int i = 0; i < num; i++)
5712  {
5714  }
5715  }
5716  return true;
5717 }//setNumberOfOtherObjectiveResults
5718 
5719 bool OSResult::setNumberOfObjValues(int solIdx, int numberOfObj)
5720 {
5721  if (optimization == NULL || optimization->solution == NULL)
5722  {
5723  // throw ErrorClass("No optimization or solution object defined");
5724  return false;
5725  }
5726  int nSols = optimization->numberOfSolutions;
5727  if (solIdx < 0 || solIdx >= nSols)
5728  {
5729  // throw ErrorClass("Trying to use a solution that was not previously declared");
5730  return false;
5731  }
5732  if (optimization->solution[solIdx] == NULL)
5733  optimization->solution[solIdx] = new OptimizationSolution();
5734  if (optimization->solution[solIdx]->objectives == NULL)
5736  if (optimization->solution[solIdx]->objectives->values == NULL)
5738  if (optimization->solution[solIdx]->objectives->values->numberOfObj > 0)
5739  return false;
5740  if (numberOfObj < 0) return false;
5741  if (optimization->solution[solIdx]->objectives->values->obj != NULL) return false;
5742  optimization->solution[solIdx]->objectives->values->numberOfObj = numberOfObj;
5743  if (numberOfObj > 0)
5744  {
5745 
5746  optimization->solution[solIdx]->objectives->values->obj = new ObjValue*[numberOfObj];
5747  for(int i = 0; i < numberOfObj; i++)
5748  optimization->solution[solIdx]->objectives->values->obj[i] = new ObjValue();
5749  }
5750  return true;
5751 }//setNumberOfObjValues
5752 
5753 
5754 bool OSResult::setNumberOfObjectiveValues(int solIdx, int numberOfObj)
5755 {
5756  int nSols = this->getSolutionNumber();
5757  int nObj = this->getObjectiveNumber();
5758  if (numberOfObj <= 0 || numberOfObj > nObj) return false;
5759  if (optimization == NULL) return false;
5760  if (nSols <= 0) return false;
5761  if (optimization->solution == NULL ||
5762  solIdx < 0 || solIdx >= nSols) return false;
5763  if (optimization->solution[solIdx] == NULL)
5764  {
5765  optimization->solution[solIdx] = new OptimizationSolution();
5766  }
5767 
5768  if (optimization->solution[solIdx]->objectives == NULL)
5769  {
5771  }
5772  if (optimization->solution[solIdx]->objectives->values == NULL)
5773  {
5775  }
5776  optimization->solution[solIdx]->objectives->values->numberOfObj = numberOfObj;
5777 // optimization->solution[solIdx]->objectives->values->obj = new ObjValue*[numberOfObj];
5778 
5779  return true;
5780 }//setNumberOfObjectiveValues
5781 
5782 
5783 
5784 bool OSResult::setObjectiveValuesSparse(int solIdx, std::vector<IndexValuePair*> x)
5785 {
5786  int numberOfObj = x.size();
5787  int iNumberOfObjectives = numberOfObj;
5788  if(iNumberOfObjectives < 0) return false;
5789  if(iNumberOfObjectives == 0) return true;
5790  if(x.size() == 0) return false;
5791  int nSols = this->getSolutionNumber();
5792  if(optimization == NULL) return false;
5793  if(nSols <= 0) return false;
5794  if(optimization == NULL) return false;
5795  if(optimization->solution == NULL ||
5796  solIdx < 0 || solIdx >= nSols) return false;
5797  if(optimization->solution[solIdx] == NULL)
5798  {
5799  optimization->solution[solIdx] = new OptimizationSolution();
5800  }
5801  if(optimization->solution[solIdx]->objectives == NULL)
5802  {
5804  }
5805  if(optimization->solution[solIdx]->objectives->values == NULL)
5806  {
5808  }
5809  if(optimization->solution[solIdx]->objectives->values->obj == NULL)
5810  {
5811  optimization->solution[solIdx]->objectives->values->obj = new ObjValue*[iNumberOfObjectives];
5812  }
5813  optimization->solution[solIdx]->objectives->values->numberOfObj = iNumberOfObjectives;
5814  for(int i = 0; i < iNumberOfObjectives; i++)
5815  {
5816  optimization->solution[solIdx]->objectives->values->obj[i] = new ObjValue();
5817  optimization->solution[solIdx]->objectives->values->obj[i]->idx = x[i]->idx;
5818  optimization->solution[solIdx]->objectives->values->obj[i]->value = x[i]->value;
5819  }
5820  return true;
5821 }//setObjectiveValuesSparse
5822 
5823 
5824 bool OSResult::setObjectiveValuesDense(int solIdx, double *objectiveValues)
5825 {
5826  int numberOfObj = this->getObjectiveNumber();
5827  int iNumberOfObjectives = numberOfObj;
5828  if (iNumberOfObjectives < 0) return false;
5829  if (iNumberOfObjectives == 0) return true;
5830  if (objectiveValues == NULL) return false;
5831  int nSols = this->getSolutionNumber();
5832  if (optimization == NULL) return false;
5833  if (nSols <= 0) return false;
5834  if (optimization == NULL) return false;
5835  if (optimization->solution == NULL ||
5836  solIdx < 0 || solIdx >= nSols) return false;
5837  if (optimization->solution[solIdx] == NULL)
5838  {
5839  optimization->solution[solIdx] = new OptimizationSolution();
5840  }
5841  if (optimization->solution[solIdx]->objectives == NULL)
5842  {
5844  }
5845  if (optimization->solution[solIdx]->objectives->values == NULL)
5846  {
5848  }
5849  if (optimization->solution[solIdx]->objectives->values->obj == NULL)
5850  {
5851  optimization->solution[solIdx]->objectives->values->obj = new ObjValue*[iNumberOfObjectives];
5852  }
5853 
5854  optimization->solution[solIdx]->objectives->values->numberOfObj = iNumberOfObjectives;
5855  for(int i = 0; i < iNumberOfObjectives; i++)
5856  {
5857  optimization->solution[solIdx]->objectives->values->obj[i] = new ObjValue();
5858  optimization->solution[solIdx]->objectives->values->obj[i]->idx = -(i+1);
5859  optimization->solution[solIdx]->objectives->values->obj[i]->value = objectiveValues[i];
5860  }
5861 
5862  return true;
5863 }//setObjectiveValuesDense
5864 
5865 
5866 
5867 bool OSResult::setObjValue(int solIdx, int number, int idx, std::string name, double val)
5868 {
5869  if (optimization == NULL || optimization->solution == NULL)
5870  {
5871  // throw ErrorClass("No optimization or solution object defined");
5872  return false;
5873  }
5874  int nSols = optimization->numberOfSolutions;
5875  if (solIdx < 0 || solIdx >= nSols)
5876  {
5877  // throw ErrorClass("Trying to use a solution that was not previously declared");
5878  return false;
5879  }
5880  if (optimization->solution[solIdx] == NULL)
5881  {
5882  // throw ErrorClass("Solution object not previously defined");
5883  return false;
5884  }
5885  if (optimization->solution[solIdx]->objectives == NULL)
5886  {
5887  // throw ErrorClass("objectives object not previously defined");
5888  return false;
5889  }
5890  if (optimization->solution[solIdx]->objectives->values == NULL)
5891  {
5892  // throw ErrorClass("values object not previously defined");
5893  return false;
5894  }
5895  int nObj = optimization->solution[solIdx]->objectives->values->numberOfObj;
5896  if (number < 0 || number >= nObj)
5897  {
5898  // throw ErrorClass("Trying to set value outside of obj array boundaries");
5899  return false;
5900  }
5901  if (idx >= 0)
5902  {
5903  // throw ErrorClass("Objective index must be negative.");
5904  return false;
5905  }
5906  optimization->solution[solIdx]->objectives->values->obj[number]->idx = idx;
5907  optimization->solution[solIdx]->objectives->values->obj[number]->name = name;
5908  optimization->solution[solIdx]->objectives->values->obj[number]->value = val;
5909  return true;
5910 }//setObjValue
5911 
5912 bool OSResult::setOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx, int numberOfObj)
5913 {
5914  int iNumberOfObjectives = numberOfObj;
5915  if (iNumberOfObjectives <= -1) return false;
5916  int nSols = this->getSolutionNumber();
5917  if (optimization == NULL) return false;
5918  if (nSols <= 0) return false;
5919  if (optimization == NULL) return false;
5920  if (optimization->solution == NULL ||
5921  solIdx < 0 || solIdx >= nSols) return false;
5922  if (optimization->solution[solIdx] == NULL) return false;
5923  if (optimization->solution[solIdx]->objectives == NULL)return false;
5924  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
5925  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
5926  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->obj == NULL)
5927  optimization->solution[solIdx]->objectives->other[ otherIdx]->obj = new OtherObjResult*[numberOfObj];
5928  for(int i = 0; i < numberOfObj; i++)
5929  {
5930  optimization->solution[solIdx]->objectives->other[ otherIdx]->obj[i] = new OtherObjResult();
5931  }
5932  optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfObj = numberOfObj;
5933  return true;
5934 }//setOtherObjectiveResultNumberOfObj
5935 
5936 
5937 bool OSResult::setOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
5938 {
5939  int iNumberOfEnumerations = numberOfEnumerations;
5940  if (iNumberOfEnumerations <= -1) return false;
5941  int nSols = this->getSolutionNumber();
5942  if (nSols <= 0) return false;
5943  if (optimization == NULL) return false;
5944  if (optimization->solution == NULL ||
5945  solIdx < 0 || solIdx >= nSols) return false;
5946  if (optimization->solution[solIdx] == NULL) return false;
5947  if (optimization->solution[solIdx]->objectives == NULL) return false;
5948  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
5949  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
5950  if (optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration == NULL)
5951  optimization->solution[solIdx]->objectives->other[ otherIdx]->enumeration = new OtherOptionOrResultEnumeration*[numberOfEnumerations];
5952  for(int i = 0; i < numberOfEnumerations; i++)
5954  optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
5955  return true;
5956 }//setOtherObjectiveResultNumberOfEnumerations
5957 
5958 bool OSResult::setOtherObjectiveResultName(int solIdx, int otherIdx, std::string name)
5959 {
5960  int numberOfObj = this->getObjectiveNumber();
5961  int iNumberOfObjectives = numberOfObj;
5962  if (iNumberOfObjectives <= -1) return false;
5963  int nSols = this->getSolutionNumber();
5964  if (optimization == NULL) return false;
5965  if (nSols <= 0) return false;
5966  if (optimization == NULL) return false;
5967  if (optimization->solution == NULL ||
5968  solIdx < 0 || solIdx >= nSols) return false;
5969  if (optimization->solution[solIdx] == NULL) return false;
5970  if (optimization->solution[solIdx]->objectives == NULL)return false;
5971  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
5972  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
5973  optimization->solution[solIdx]->objectives->other[ otherIdx]->name = name;
5974  return true;
5975 }//setOtherObjectiveResultName
5976 
5977 bool OSResult::setOtherObjectiveResultType(int solIdx, int otherIdx, std::string type)
5978 {
5979  int numberOfObj = this->getObjectiveNumber();
5980  int iNumberOfObjectives = numberOfObj;
5981  if (iNumberOfObjectives <= -1) return false;
5982  int nSols = this->getSolutionNumber();
5983  if (optimization == NULL) return false;
5984  if (nSols <= 0) return false;
5985  if (optimization == NULL) return false;
5986  if (optimization->solution == NULL ||
5987  solIdx < 0 || solIdx >= nSols) return false;
5988  if (optimization->solution[solIdx] == NULL) return false;
5989  if (optimization->solution[solIdx]->objectives == NULL)return false;
5990  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
5991  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
5992  optimization->solution[solIdx]->objectives->other[ otherIdx]->type = type;
5993  return true;
5994 }//setOtherObjectiveResultType
5995 
5996 bool OSResult::setOtherObjectiveResultObjType(int solIdx, int otherIdx, std::string objType)
5997 {
5998  int numberOfObj = this->getObjectiveNumber();
5999  int iNumberOfObjectives = numberOfObj;
6000  if (iNumberOfObjectives <= -1) return false;
6001  int nSols = this->getSolutionNumber();
6002  if (optimization == NULL) return false;
6003  if (nSols <= 0) return false;
6004  if (optimization == NULL) return false;
6005  if (optimization->solution == NULL ||
6006  solIdx < 0 || solIdx >= nSols) return false;
6007  if (optimization->solution[solIdx] == NULL) return false;
6008  if (optimization->solution[solIdx]->objectives == NULL)return false;
6009  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6010  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6011  optimization->solution[solIdx]->objectives->other[ otherIdx]->objType = objType;
6012  return true;
6013 }//setOtherObjectiveResultObjType
6014 
6015 bool OSResult::setOtherObjectiveResultEnumType(int solIdx, int otherIdx, std::string enumType)
6016 {
6017  int numberOfObj = this->getObjectiveNumber();
6018  int iNumberOfObjectives = numberOfObj;
6019  if (iNumberOfObjectives <= -1) return false;
6020  int nSols = this->getSolutionNumber();
6021  if (optimization == NULL) return false;
6022  if (nSols <= 0) return false;
6023  if (optimization == NULL) return false;
6024  if (optimization->solution == NULL ||
6025  solIdx < 0 || solIdx >= nSols) return false;
6026  if (optimization->solution[solIdx] == NULL) return false;
6027  if (optimization->solution[solIdx]->objectives == NULL)return false;
6028  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6029  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6030  optimization->solution[solIdx]->objectives->other[ otherIdx]->enumType = enumType;
6031  return true;
6032 }//setOtherObjectiveResultEnumType
6033 
6034 bool OSResult::setOtherObjectiveResultValue(int solIdx, int otherIdx, std::string value)
6035 {
6036  int numberOfObj = this->getObjectiveNumber();
6037  int iNumberOfObjectives = numberOfObj;
6038  if (iNumberOfObjectives <= -1) return false;
6039  int nSols = this->getSolutionNumber();
6040  if (optimization == NULL) return false;
6041  if (nSols <= 0) return false;
6042  if (optimization == NULL) return false;
6043  if (optimization->solution == NULL ||
6044  solIdx < 0 || solIdx >= nSols) return false;
6045  if (optimization->solution[solIdx] == NULL) return false;
6046  if (optimization->solution[solIdx]->objectives == NULL)return false;
6047  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6048  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6049  optimization->solution[solIdx]->objectives->other[ otherIdx]->value = value;
6050  return true;
6051 }//setOtherObjectiveResultValue
6052 
6053 bool OSResult::setOtherObjectiveResultDescription(int solIdx, int otherIdx, std::string description)
6054 {
6055  int numberOfObj = this->getObjectiveNumber();
6056  int iNumberOfObjectives = numberOfObj;
6057  if (iNumberOfObjectives <= -1) return false;
6058  int nSols = this->getSolutionNumber();
6059  if (optimization == NULL) return false;
6060  if (nSols <= 0) return false;
6061  if (optimization == NULL) return false;
6062  if (optimization->solution == NULL ||
6063  solIdx < 0 || solIdx >= nSols) return false;
6064  if (optimization->solution[solIdx] == NULL) return false;
6065  if (optimization->solution[solIdx]->objectives == NULL)return false;
6066  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6067  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6068  optimization->solution[solIdx]->objectives->other[ otherIdx]->description = description;
6069  return true;
6070 }//setOtherObjectiveResultDescription
6071 
6072 bool OSResult::setOtherObjectiveResultSolver(int solIdx, int otherIdx, std::string solver)
6073 {
6074  int numberOfObj = this->getObjectiveNumber();
6075  int iNumberOfObjectives = numberOfObj;
6076  if (iNumberOfObjectives <= -1) return false;
6077  int nSols = this->getSolutionNumber();
6078  if (optimization == NULL) return false;
6079  if (nSols <= 0) return false;
6080  if (optimization == NULL) return false;
6081  if (optimization->solution == NULL ||
6082  solIdx < 0 || solIdx >= nSols) return false;
6083  if (optimization->solution[solIdx] == NULL) return false;
6084  if (optimization->solution[solIdx]->objectives == NULL)return false;
6085  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6086  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6087  optimization->solution[solIdx]->objectives->other[ otherIdx]->solver = solver;
6088  return true;
6089 }//setOtherObjectiveResultSolver
6090 
6091 bool OSResult::setOtherObjectiveResultCategory(int solIdx, int otherIdx, std::string category)
6092 {
6093  int numberOfObj = this->getObjectiveNumber();
6094  int iNumberOfObjectives = numberOfObj;
6095  if (iNumberOfObjectives <= -1) return false;
6096  int nSols = this->getSolutionNumber();
6097  if (optimization == NULL) return false;
6098  if (nSols <= 0) return false;
6099  if (optimization == NULL) return false;
6100  if (optimization->solution == NULL ||
6101  solIdx < 0 || solIdx >= nSols) return false;
6102  if (optimization->solution[solIdx] == NULL) return false;
6103  if (optimization->solution[solIdx]->objectives == NULL)return false;
6104  if (optimization->solution[solIdx]->objectives->other == NULL) return false;
6105  if (optimization->solution[solIdx]->objectives->other[ otherIdx] == NULL) return false;
6106  optimization->solution[solIdx]->objectives->other[ otherIdx]->category = category;
6107  return true;
6108 }//setOtherObjectiveResultCategory
6109 
6110 bool OSResult::setOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx, int idx)
6111 {
6112  int nSols = this->getSolutionNumber();
6113  if (nSols <= 0) return false;
6114  if (optimization == NULL) return false;
6115  if (optimization->solution == NULL ||
6116  solIdx < 0 || solIdx >= nSols) return false;
6117  if (optimization->solution[solIdx] == NULL) return false;
6118  if (optimization->solution[solIdx]->objectives == NULL) return false;
6119  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL) return false;
6120  if (optimization->solution[solIdx]->objectives->other[otherIdx]->obj == NULL) return false;
6121  if (idx >= 0) return false;
6122  optimization->solution[solIdx]->objectives->other[otherIdx]->obj[objIdx]->idx = idx;
6123  return true;
6124 }//setOtherObjectiveResultObjIdx
6125 
6126 bool OSResult::setOtherObjectiveResultObjName(int solIdx, int otherIdx, int objIdx, std::string name)
6127 {
6128  int nSols = this->getSolutionNumber();
6129  if (nSols <= 0) return false;
6130  if (optimization == NULL) return false;
6131  if (optimization->solution == NULL ||
6132  solIdx < 0 || solIdx >= nSols) return false;
6133  if (optimization->solution[solIdx] == NULL) return false;
6134  if (optimization->solution[solIdx]->objectives == NULL) return false;
6135  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL) return false;
6136  if (optimization->solution[solIdx]->objectives->other[otherIdx]->obj == NULL) return false;
6137  optimization->solution[solIdx]->objectives->other[otherIdx]->obj[objIdx]->name = name;
6138  return true;
6139 }//setOtherObjectiveResultObjName
6140 
6141 bool OSResult::setOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx, std::string value)
6142 {
6143  int nSols = this->getSolutionNumber();
6144  if (nSols <= 0) return false;
6145  if (optimization == NULL) return false;
6146  if (optimization->solution == NULL ||
6147  solIdx < 0 || solIdx >= nSols) return false;
6148  if (optimization->solution[solIdx] == NULL) return false;
6149  if (optimization->solution[solIdx]->objectives == NULL) return false;
6150  if (optimization->solution[solIdx]->objectives->other[otherIdx] == NULL) return false;
6151  if (optimization->solution[solIdx]->objectives->other[otherIdx]->obj == NULL) return false;
6152  optimization->solution[solIdx]->objectives->other[otherIdx]->obj[objIdx]->value = value;
6153  return true;
6154 }//setOtherObjectiveResultObj
6155 
6157 {
6158  int nSols = this->getSolutionNumber();
6159  if (nSols <= 0) return false;
6160  if (optimization == NULL) return false;
6161  if (optimization->solution == NULL ||
6162  solIdx < 0 || solIdx >= nSols) return false;
6163  if (optimization->solution[solIdx] == NULL)
6164  {
6165  optimization->solution[solIdx] = new OptimizationSolution();
6166  }
6167  if (optimization->solution[solIdx]->constraints == NULL)
6168  {
6170  }
6171  if (num < 0) return false;
6172  if (optimization->solution[solIdx]->constraints->other != NULL) return false;
6174  if (num > 0)
6175  {
6177  for(int i = 0; i < num; i++)
6178  {
6180  }
6181  }
6182  return true;
6183 }//setNumberOfOtherConstraintResults
6184 
6185 bool OSResult::setNumberOfDualValues(int solIdx, int numberOfCon)
6186 {
6187  if (optimization == NULL || optimization->solution == NULL)
6188  {
6189  // throw ErrorClass("No optimization or solution object defined");
6190  return false;
6191  }
6192  int nSols = optimization->numberOfSolutions;
6193  if (solIdx < 0 || solIdx >= nSols)
6194  {
6195  // throw ErrorClass("Trying to use a solution that was not previously declared");
6196  return false;
6197  }
6198  if (optimization->solution[solIdx] == NULL)
6199  optimization->solution[solIdx] = new OptimizationSolution();
6200  if (optimization->solution[solIdx]->constraints == NULL)
6202  if (optimization->solution[solIdx]->constraints->dualValues == NULL)
6205  return false;
6206  if (numberOfCon < 0) return false;
6207  if (optimization->solution[solIdx]->constraints->dualValues->con != NULL) return false;
6208  optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6209  if (numberOfCon > 0)
6210  {
6211  optimization->solution[solIdx]->constraints->dualValues->con = new DualVarValue*[numberOfCon];
6212  for(int i = 0; i < numberOfCon; i++)
6214  }
6215  return true;
6216 }//setNumberOfDualValues
6217 
6218 
6219 bool OSResult::setNumberOfDualVariableValues(int solIdx, int numberOfCon)
6220 {
6221  int nSols = this->getSolutionNumber();
6222  int nCon = this->getConstraintNumber();
6223  if (numberOfCon <= 0 || numberOfCon > nCon) return false;
6224  if (optimization == NULL) return false;
6225  if (nSols <= 0) return false;
6226  if (optimization->solution == NULL ||
6227  solIdx < 0 || solIdx >= nSols) return false;
6228  if (optimization->solution[solIdx] == NULL)
6229  {
6230  optimization->solution[solIdx] = new OptimizationSolution();
6231  }
6232  if (optimization->solution[solIdx]->constraints == NULL)
6233  {
6235  }
6236  if (optimization->solution[solIdx]->constraints->dualValues == NULL)
6237  {
6239  }
6240  optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6241 // optimization->solution[solIdx]->constraints->dualValues->con = new DualVarValue*[numberOfCon];
6242 
6243  return true;
6244 }//setNumberOfDualVariableValues
6245 
6246 
6247 
6248 bool OSResult::setDualVariableValuesSparse(int solIdx, std::vector<IndexValuePair*> x)
6249 {
6250  int numberOfCon = x.size();
6251  int iNumberOfConstraints = numberOfCon;
6252  if(iNumberOfConstraints < 0) return false;
6253  if(iNumberOfConstraints == 0) return true;
6254  int nSols = this->getSolutionNumber();
6255  if(optimization == NULL) return false;
6256  if(nSols <= 0) return false;
6257  if(optimization == NULL) return false;
6258  if(optimization->solution == NULL ||
6259  solIdx < 0 || solIdx >= nSols) return false;
6260  if(optimization->solution[solIdx] == NULL)
6261  {
6262  optimization->solution[solIdx] = new OptimizationSolution();
6263  }
6264  if(optimization->solution[solIdx]->constraints == NULL)
6265  {
6267  }
6268  if(optimization->solution[solIdx]->constraints->dualValues == NULL)
6269  {
6271  }
6272  if(optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6273  {
6274  optimization->solution[solIdx]->constraints->dualValues->con = new DualVarValue*[numberOfCon];
6275  }
6276  if(x.size() == 0)
6277  {
6278  optimization->solution[solIdx]->constraints->dualValues = NULL;
6279  return true;
6280  }
6281  optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6282  for(int i = 0; i < iNumberOfConstraints; i++)
6283  {
6285  optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = x[i]->idx;
6286  optimization->solution[solIdx]->constraints->dualValues->con[i]->value = x[i]->value;
6287  }
6288  return true;
6289 }//setDualVariableValuesSparse
6290 
6291 bool OSResult::setDualVariableValuesDense(int solIdx, double *y)
6292 {
6293  int numberOfCon = this->getConstraintNumber();
6294  int iNumberOfConstraints = numberOfCon;
6295  if (iNumberOfConstraints < 0) return false;
6296  if (iNumberOfConstraints == 0) return true;
6297  int nSols = this->getSolutionNumber();
6298  if (optimization == NULL) return false;
6299  if (nSols <= 0) return false;
6300  if (optimization == NULL) return false;
6301  if (optimization->solution == NULL ||
6302  solIdx < 0 || solIdx >= nSols) return false;
6303  if (optimization->solution[solIdx] == NULL)
6304  {
6305  optimization->solution[solIdx] = new OptimizationSolution();
6306  }
6307  if (optimization->solution[solIdx]->constraints == NULL)
6308  {
6310  }
6311  if (optimization->solution[solIdx]->constraints->dualValues == NULL)
6312  {
6314  }
6315  if (optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6316  {
6317  optimization->solution[solIdx]->constraints->dualValues->con = new DualVarValue*[numberOfCon];
6318  }
6319  if (y == NULL)
6320  {
6321  optimization->solution[solIdx]->constraints->dualValues = NULL;
6322  return true;
6323  }
6324  optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6325  for(int i = 0; i < iNumberOfConstraints; i++)
6326  {
6328  optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = i;
6329  optimization->solution[solIdx]->constraints->dualValues->con[i]->value = y[i];
6330 
6331  }
6332  return true;
6333 }//setDualVariableValuesDense
6334 
6335 bool OSResult::setConstraintValuesDense(int solIdx, double *dualVarValues)
6336 {
6337  int numberOfCon = this->getConstraintNumber();
6338  int iNumberOfConstraints = numberOfCon;
6339  if (iNumberOfConstraints <= 0) return false;
6340  int nSols = this->getSolutionNumber();
6341  if (optimization == NULL) return false;
6342  if (nSols <= 0) return false;
6343  if (optimization == NULL) return false;
6344  if (optimization->solution == NULL ||
6345  solIdx < 0 || solIdx >= nSols) return false;
6346  if (optimization->solution[solIdx] == NULL)
6347  {
6348  optimization->solution[solIdx] = new OptimizationSolution();
6349  }
6350  if (optimization->solution[solIdx]->constraints == NULL)
6351  {
6353  }
6354  if (optimization->solution[solIdx]->constraints->dualValues == NULL)
6355  {
6357  }
6358  if (optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6359  {
6360  optimization->solution[solIdx]->constraints->dualValues->con = new DualVarValue*[numberOfCon];
6361  }
6362  if (dualVarValues == NULL)
6363  {
6364  optimization->solution[solIdx]->constraints->dualValues = NULL;
6365  return true;
6366  }
6367  //optimization->solution[solIdx]->constraints->dualValues->con = new ConValue*[ iNumberOfConstraints];
6368  optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6369  for(int i = 0; i < iNumberOfConstraints; i++)
6370  {
6372  //optimization->solution[solIdx]->constraints->dualValues->con[i] = new ConValue();
6373  optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = i;
6374  optimization->solution[solIdx]->constraints->dualValues->con[i]->value = dualVarValues[i];
6375  }
6376  return true;
6377 }//setConstraintValuesDense
6378 
6379 bool OSResult::setDualValue(int solIdx, int number, int idx, std::string name, double val)
6380 {
6381  if (optimization == NULL || optimization->solution == NULL)
6382  {
6383  // throw ErrorClass("No optimization or solution object defined");
6384  return false;
6385  }
6386  int nSols = optimization->numberOfSolutions;
6387  if (solIdx < 0 || solIdx >= nSols)
6388  {
6389  // throw ErrorClass("Trying to use a solution that was not previously declared");
6390  return false;
6391  }
6392  if (optimization->solution[solIdx] == NULL)
6393  {
6394  // throw ErrorClass("Solution object not previously defined");
6395  return false;
6396  }
6397  if (optimization->solution[solIdx]->constraints == NULL)
6398  {
6399  // throw ErrorClass("constraints object not previously defined");
6400  return false;
6401  }
6402  if (optimization->solution[solIdx]->constraints->dualValues == NULL)
6403  {
6404  // throw ErrorClass("values object not previously defined");
6405  return false;
6406  }
6407  int nCon = optimization->solution[solIdx]->constraints->dualValues->numberOfCon;
6408  if (number < 0 || number >= nCon)
6409  {
6410  // throw ErrorClass("Trying to set value outside of con array boundaries");
6411  return false;
6412  }
6413  if (idx < 0)
6414  {
6415  // throw ErrorClass("Constraint index cannot be negative.");
6416  return false;
6417  }
6418  optimization->solution[solIdx]->constraints->dualValues->con[number]->idx = idx;
6419  optimization->solution[solIdx]->constraints->dualValues->con[number]->name = name;
6420  optimization->solution[solIdx]->constraints->dualValues->con[number]->value = val;
6421  return true;
6422 }//setDualValue
6423 
6424 bool OSResult::setOtherConstraintResultNumberOfCon(int solIdx, int otherIdx, int numberOfCon)
6425 {
6426  int iNumberOfConstraints = numberOfCon;
6427  if (iNumberOfConstraints <= -1) return false;
6428  int nSols = this->getSolutionNumber();
6429  if (optimization == NULL) return false;
6430  if (nSols <= 0) return false;
6431  if (optimization == NULL) return false;
6432  if (optimization->solution == NULL ||
6433  solIdx < 0 || solIdx >= nSols) return false;
6434  if (optimization->solution[solIdx] == NULL) return false;
6435  if (optimization->solution[solIdx]->constraints == NULL)return false;
6436  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6437  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6438  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->con == NULL)
6439  optimization->solution[solIdx]->constraints->other[ otherIdx]->con = new OtherConResult*[numberOfCon];
6440  for(int i = 0; i < numberOfCon; i++)
6441  optimization->solution[solIdx]->constraints->other[ otherIdx]->con[i] = new OtherConResult();
6442  optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfCon = numberOfCon;
6443  return true;
6444 }//setOtherConstraintResultNumberOfCon
6445 
6446 
6447 bool OSResult::setOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
6448 {
6449  int iNumberOfEnumerations = numberOfEnumerations;
6450  if (iNumberOfEnumerations <= -1) return false;
6451  int nSols = this->getSolutionNumber();
6452  if (nSols <= 0) return false;
6453  if (optimization == NULL) return false;
6454  if (optimization->solution == NULL ||
6455  solIdx < 0 || solIdx >= nSols) return false;
6456  if (optimization->solution[solIdx] == NULL) return false;
6457  if (optimization->solution[solIdx]->constraints == NULL) return false;
6458  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6459  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6460  if (optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration == NULL)
6461  optimization->solution[solIdx]->constraints->other[ otherIdx]->enumeration = new OtherOptionOrResultEnumeration*[numberOfEnumerations];
6462  for(int i = 0; i < numberOfEnumerations; i++)
6464  optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
6465  return true;
6466 }//setOtherConstraintResultNumberOfEnumerations
6467 
6468 bool OSResult::setOtherConstraintResultName(int solIdx, int otherIdx, std::string name)
6469 {
6470  int numberOfCon = this->getConstraintNumber();
6471  int iNumberOfConstraints = numberOfCon;
6472  if (iNumberOfConstraints <= -1) return false;
6473  int nSols = this->getSolutionNumber();
6474  if (optimization == NULL) return false;
6475  if (nSols <= 0) return false;
6476  if (optimization == NULL) return false;
6477  if (optimization->solution == NULL ||
6478  solIdx < 0 || solIdx >= nSols) return false;
6479  if (optimization->solution[solIdx] == NULL) return false;
6480  if (optimization->solution[solIdx]->constraints == NULL)return false;
6481  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6482  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6483  optimization->solution[solIdx]->constraints->other[ otherIdx]->name = name;
6484  return true;
6485 }//setOtherConstraintResultName
6486 
6487 bool OSResult::setOtherConstraintResultType(int solIdx, int otherIdx, std::string type)
6488 {
6489  int numberOfCon = this->getConstraintNumber();
6490  int iNumberOfConstraints = numberOfCon;
6491  if (iNumberOfConstraints <= -1) return false;
6492  int nSols = this->getSolutionNumber();
6493  if (optimization == NULL) return false;
6494  if (nSols <= 0) return false;
6495  if (optimization == NULL) return false;
6496  if (optimization->solution == NULL ||
6497  solIdx < 0 || solIdx >= nSols) return false;
6498  if (optimization->solution[solIdx] == NULL) return false;
6499  if (optimization->solution[solIdx]->constraints == NULL)return false;
6500  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6501  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6502  optimization->solution[solIdx]->constraints->other[ otherIdx]->type = type;
6503  return true;
6504 }//setOtherConstraintResultType
6505 
6506 bool OSResult::setOtherConstraintResultConType(int solIdx, int otherIdx, std::string conType)
6507 {
6508  int numberOfCon = this->getConstraintNumber();
6509  int iNumberOfConstraints = numberOfCon;
6510  if (iNumberOfConstraints <= -1) return false;
6511  int nSols = this->getSolutionNumber();
6512  if (optimization == NULL) return false;
6513  if (nSols <= 0) return false;
6514  if (optimization == NULL) return false;
6515  if (optimization->solution == NULL ||
6516  solIdx < 0 || solIdx >= nSols) return false;
6517  if (optimization->solution[solIdx] == NULL) return false;
6518  if (optimization->solution[solIdx]->constraints == NULL)return false;
6519  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6520  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6521  optimization->solution[solIdx]->constraints->other[ otherIdx]->conType = conType;
6522  return true;
6523 }//setOtherConstraintResultConType
6524 
6525 bool OSResult::setOtherConstraintResultEnumType(int solIdx, int otherIdx, std::string enumType)
6526 {
6527  int numberOfCon = this->getConstraintNumber();
6528  int iNumberOfConstraints = numberOfCon;
6529  if (iNumberOfConstraints <= -1) return false;
6530  int nSols = this->getSolutionNumber();
6531  if (optimization == NULL) return false;
6532  if (nSols <= 0) return false;
6533  if (optimization == NULL) return false;
6534  if (optimization->solution == NULL ||
6535  solIdx < 0 || solIdx >= nSols) return false;
6536  if (optimization->solution[solIdx] == NULL) return false;
6537  if (optimization->solution[solIdx]->constraints == NULL)return false;
6538  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6539  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6540  optimization->solution[solIdx]->constraints->other[ otherIdx]->enumType = enumType;
6541  return true;
6542 }//setOtherConstraintResultEnumType
6543 
6544 bool OSResult::setOtherConstraintResultValue(int solIdx, int otherIdx, std::string value)
6545 {
6546  int numberOfCon = this->getConstraintNumber();
6547  int iNumberOfConstraints = numberOfCon;
6548  if (iNumberOfConstraints <= -1) return false;
6549  int nSols = this->getSolutionNumber();
6550  if (optimization == NULL) return false;
6551  if (nSols <= 0) return false;
6552  if (optimization == NULL) return false;
6553  if (optimization->solution == NULL ||
6554  solIdx < 0 || solIdx >= nSols) return false;
6555  if (optimization->solution[solIdx] == NULL) return false;
6556  if (optimization->solution[solIdx]->constraints == NULL)return false;
6557  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6558  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6559  optimization->solution[solIdx]->constraints->other[ otherIdx]->value = value;
6560  return true;
6561 }//setOtherConstraintResultValue
6562 
6563 bool OSResult::setOtherConstraintResultDescription(int solIdx, int otherIdx, std::string description)
6564 {
6565  int numberOfCon = this->getConstraintNumber();
6566  int iNumberOfConstraints = numberOfCon;
6567  if (iNumberOfConstraints <= -1) return false;
6568  int nSols = this->getSolutionNumber();
6569  if (optimization == NULL) return false;
6570  if (nSols <= 0) return false;
6571  if (optimization == NULL) return false;
6572  if (optimization->solution == NULL ||
6573  solIdx < 0 || solIdx >= nSols) return false;
6574  if (optimization->solution[solIdx] == NULL) return false;
6575  if (optimization->solution[solIdx]->constraints == NULL)return false;
6576  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6577  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6578  optimization->solution[solIdx]->constraints->other[ otherIdx]->description = description;
6579  return true;
6580 }//setOtherConstraintResultDescription
6581 
6582 bool OSResult::setOtherConstraintResultSolver(int solIdx, int otherIdx, std::string solver)
6583 {
6584  int numberOfCon = this->getConstraintNumber();
6585  int iNumberOfConstraints = numberOfCon;
6586  if (iNumberOfConstraints <= -1) return false;
6587  int nSols = this->getSolutionNumber();
6588  if (optimization == NULL) return false;
6589  if (nSols <= 0) return false;
6590  if (optimization == NULL) return false;
6591  if (optimization->solution == NULL ||
6592  solIdx < 0 || solIdx >= nSols) return false;
6593  if (optimization->solution[solIdx] == NULL) return false;
6594  if (optimization->solution[solIdx]->constraints == NULL)return false;
6595  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6596  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6597  optimization->solution[solIdx]->constraints->other[ otherIdx]->solver = solver;
6598  return true;
6599 }//setOtherConstraintResultSolver
6600 
6601 bool OSResult::setOtherConstraintResultCategory(int solIdx, int otherIdx, std::string category)
6602 {
6603  int numberOfCon = this->getConstraintNumber();
6604  int iNumberOfConstraints = numberOfCon;
6605  if (iNumberOfConstraints <= -1) return false;
6606  int nSols = this->getSolutionNumber();
6607  if (optimization == NULL) return false;
6608  if (nSols <= 0) return false;
6609  if (optimization == NULL) return false;
6610  if (optimization->solution == NULL ||
6611  solIdx < 0 || solIdx >= nSols) return false;
6612  if (optimization->solution[solIdx] == NULL) return false;
6613  if (optimization->solution[solIdx]->constraints == NULL)return false;
6614  if (optimization->solution[solIdx]->constraints->other == NULL) return false;
6615  if (optimization->solution[solIdx]->constraints->other[ otherIdx] == NULL) return false;
6616  optimization->solution[solIdx]->constraints->other[ otherIdx]->category = category;
6617  return true;
6618 }//setOtherConstraintResultCategory
6619 
6620 bool OSResult::setOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx, int idx)
6621 {
6622  int nSols = this->getSolutionNumber();
6623  if (nSols <= 0) return false;
6624  if (optimization == NULL) return false;
6625  if (optimization->solution == NULL ||
6626  solIdx < 0 || solIdx >= nSols) return false;
6627  if (optimization->solution[solIdx] == NULL) return false;
6628  if (optimization->solution[solIdx]->constraints == NULL) return false;
6629  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL) return false;
6630  if (optimization->solution[solIdx]->constraints->other[otherIdx]->con == NULL) return false;
6631  if (idx < 0) return false;
6632  optimization->solution[solIdx]->constraints->other[otherIdx]->con[conIdx]->idx = idx;
6633  return true;
6634 }//setOtherConstraintResultConIdx
6635 
6636 bool OSResult::setOtherConstraintResultConName(int solIdx, int otherIdx, int conIdx, std::string name)
6637 {
6638  int nSols = this->getSolutionNumber();
6639  if (nSols <= 0) return false;
6640  if (optimization == NULL) return false;
6641  if (optimization->solution == NULL ||
6642  solIdx < 0 || solIdx >= nSols) return false;
6643  if (optimization->solution[solIdx] == NULL) return false;
6644  if (optimization->solution[solIdx]->constraints == NULL) return false;
6645  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL) return false;
6646  if (optimization->solution[solIdx]->constraints->other[otherIdx]->con == NULL) return false;
6647  optimization->solution[solIdx]->constraints->other[otherIdx]->con[conIdx]->name = name;
6648  return true;
6649 }//setOtherConstraintResultConIdx
6650 
6651 bool OSResult::setOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx, std::string value)
6652 {
6653  int nSols = this->getSolutionNumber();
6654  if (nSols <= 0) return false;
6655  if (optimization == NULL) return false;
6656  if (optimization->solution == NULL ||
6657  solIdx < 0 || solIdx >= nSols) return false;
6658  if (optimization->solution[solIdx] == NULL) return false;
6659  if (optimization->solution[solIdx]->constraints == NULL) return false;
6660  if (optimization->solution[solIdx]->constraints->other[otherIdx] == NULL) return false;
6661  if (optimization->solution[solIdx]->constraints->other[otherIdx]->con == NULL) return false;
6662  optimization->solution[solIdx]->constraints->other[otherIdx]->con[conIdx]->value = value;
6663  return true;
6664 }//setOtherConstraintResultCon
6665 
6666 bool OSResult::setMatrixVariableSolution(int solIdx, int numberOfMatrixVar_,
6667  int numberOfOtherMatrixVariableResults_)
6668 {
6669  int nSols = this->getSolutionNumber();
6670  if (nSols <= 0) return false;
6671  if (optimization == NULL) return false;
6672  if (optimization->solution == NULL ||
6673  solIdx < 0 || solIdx >= nSols) return false;
6674  if (optimization->solution[solIdx] == NULL) return false;
6675  if (optimization->solution[solIdx]->matrixProgramming == NULL)
6677  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL)
6679  = new MatrixVariableSolution();
6682  = new MatrixVariableValues();
6684  = numberOfMatrixVar_;
6686  = numberOfOtherMatrixVariableResults_;
6687 
6689  = new OSMatrixWithMatrixVarIdx*[numberOfMatrixVar_];
6691  = new OtherMatrixVariableResult*[numberOfOtherMatrixVariableResults_];
6692 
6693  //Note: Initial to zero, so we can check for double usage later
6694  for (int i=0; i < numberOfMatrixVar_; i++)
6696  for (int i=0; i < numberOfOtherMatrixVariableResults_; i++)
6698 
6699  return true;
6700 }//setMatrixVariableSolution
6701 
6702 
6703 bool OSResult::setMatrixVarValuesAttributes(int solIdx, int idx, int matrixVarIdx, int numberOfRows,
6704  int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry,
6705  ENUM_MATRIX_TYPE type, std::string name)
6706 {
6707  int nSols = this->getSolutionNumber();
6708  if (nSols <= 0) return false;
6709  if (optimization == NULL) return false;
6710  if (optimization->solution == NULL ||
6711  solIdx < 0 || solIdx >= nSols) return false;
6712  if (optimization->solution[solIdx] == NULL) return false;
6713  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
6714  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
6715  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->values == NULL) return false;
6717  return false;
6718  if (idx < 0 || idx >= optimization->solution[solIdx]->matrixProgramming
6719  ->matrixVariables->values->numberOfMatrixVar) return false;
6721  != NULL) return false;
6723  = new OSMatrixWithMatrixVarIdx();
6725  ->matrixVarIdx = matrixVarIdx;
6727  ->numberOfRows = numberOfRows;
6729  ->numberOfColumns = numberOfColumns;
6731  ->symmetry = symmetry;
6734  return true;
6735 }//setMatrixVarValuesAttributes
6736 
6737 bool OSResult::setMatrixVarValuesBlockStructure(int solIdx, int idx, int* colOffset, int colOffsetSize,
6738  int* rowOffset, int rowOffsetSize, int numberOfBlocks, int blocksConstructorIdx)
6739 {
6740  int nSols = this->getSolutionNumber();
6741  if (nSols <= 0) return false;
6742  if (optimization == NULL) return false;
6743  if (optimization->solution == NULL ||
6744  solIdx < 0 || solIdx >= nSols) return false;
6745  if (optimization->solution[solIdx] == NULL) return false;
6746  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
6747  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
6748  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->values == NULL) return false;
6750  return false;
6751  if (idx < 0 || idx >= optimization->solution[solIdx]->matrixProgramming
6752  ->matrixVariables->values->numberOfMatrixVar) return false;
6753 
6755  ->inumberOfChildren = 1; //single Blocks constructor
6757  ->m_mChildren = new MatrixNode*[1];
6759  ->m_mChildren[0] = new MatrixBlocks();
6761  ->m_mChildren[0]->inumberOfChildren = numberOfBlocks;
6762 
6764  ->matrixVar[idx]->m_mChildren[0])->colOffset = new IntVector(numberOfBlocks+1);
6765 
6766  for (int i=0; i <= numberOfBlocks; i++)
6768  ->matrixVar[idx]->m_mChildren[0])->colOffset->el[i] = colOffset[i];
6769 
6771  ->matrixVar[idx]->m_mChildren[0])->rowOffset = new IntVector(numberOfBlocks+1);
6772 
6773  for (int i=0; i <= numberOfBlocks; i++)
6775  ->matrixVar[idx]->m_mChildren[0])->rowOffset->el[i] = rowOffset[i];
6776 
6777  //Note well: Individual pointers are set to NULL, which allows a check against double allocation later
6779  ->matrixVar[idx]->m_mChildren[0])->m_mChildren = new MatrixNode*[numberOfBlocks];
6780 
6781  for (int i=0; i<numberOfBlocks; i++)
6783  ->matrixVar[idx]->m_mChildren[0])->m_mChildren[i] = NULL;
6784 
6785  return true;
6786 }//setMatrixVarValuesBlockStructure
6787 
6788 
6789 bool OSResult::setMatrixVarValuesBlockElements(int solIdx, int idx, int blkno, int blkRowIdx, int blkColIdx,
6790  int nz, int* start, int* index, MatrixElementValues* value, ENUM_MATRIX_TYPE valueType,
6791  ENUM_MATRIX_SYMMETRY symmetry, bool rowMajor)
6792 {
6793  try
6794  {
6795  int nSols = this->getSolutionNumber();
6796  if (nSols <= 0) return false;
6797  if (optimization == NULL) return false;
6798  if (optimization->solution == NULL ||
6799  solIdx < 0 || solIdx >= nSols) return false;
6800  if (optimization->solution[solIdx] == NULL) return false;
6801  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
6802  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
6804  return false;
6806  return false;
6807  if (idx < 0 || idx >= optimization->solution[solIdx]->matrixProgramming
6808  ->matrixVariables->values->numberOfMatrixVar) return false;
6810  == NULL) return false;
6812  ->m_mChildren[0] == NULL) return false;
6813 
6814  if (blkno < 0 ||
6816  ->values->matrixVar[idx]->m_mChildren[0])->inumberOfChildren) return false;
6817 
6819  ->values->matrixVar[idx]->m_mChildren[0])->m_mChildren[blkno] != NULL)
6820  throw ErrorClass("memory error in setMatrixVarBlockElements: block was previously allocated");
6821 
6823  ->values->matrixVar[idx]->m_mChildren[0])->m_mChildren[blkno] = new MatrixBlock();
6824 
6827  ->m_mChildren[blkno])->blockRowIdx = blkRowIdx;
6828 
6831  ->m_mChildren[blkno])->blockColIdx = blkColIdx;
6832 
6835  ->m_mChildren[blkno])->symmetry = ENUM_MATRIX_SYMMETRY_lower;
6836 
6839  ->m_mChildren[blkno])->inumberOfChildren = 1;
6840 
6843  ->m_mChildren[blkno])->m_mChildren = new MatrixNode*[1];
6844 
6845  if (valueType == ENUM_MATRIX_TYPE_constant)
6846  ((MatrixBlocks*)optimization->solution[solIdx]
6848  ->m_mChildren[blkno]->m_mChildren[0] = new ConstantMatrixElements();
6849  else
6850  throw ErrorClass("in setMatrixVarBlockElements: element type not yet implemented:"
6851  + returnMatrixTypeString(valueType));
6852 
6855  ->m_mChildren[blkno]->m_mChildren[0])->numberOfValues = nz;
6856 
6857  int startSize;
6858 
6859  if (rowMajor)
6860  startSize
6862  ->values->matrixVar[idx]->m_mChildren[0])->rowOffset->el[blkRowIdx+1]
6864  ->values->matrixVar[idx]->m_mChildren[0])->rowOffset->el[blkRowIdx] + 1;
6865  else
6866  startSize
6868  ->values->matrixVar[idx]->m_mChildren[0])->colOffset->el[blkColIdx+1]
6870  ->values->matrixVar[idx]->m_mChildren[0])->colOffset->el[blkColIdx] + 1;
6871 
6874  ->m_mChildren[blkno]->m_mChildren[0])->start = new IntVector(startSize);
6875 
6876  for (int i=0; i<startSize; i++)
6879  ->m_mChildren[blkno]->m_mChildren[0])->start->el[i] = start[i];
6880 
6881  if (nz > 0)
6882  {
6885  ->m_mChildren[blkno]->m_mChildren[0])->index = new IntVector(nz);
6886 
6887  for (int i=0; i<nz; i++)
6890  ->m_mChildren[blkno]->m_mChildren[0])->index->el[i] = index[i];
6891 
6892  if (valueType == ENUM_MATRIX_TYPE_constant)
6893  {
6896  ->m_mChildren[blkno]->m_mChildren[0])->value = new ConstantMatrixValues();
6897 
6900  ->m_mChildren[blkno]->m_mChildren[0])->value->numberOfEl = nz;
6901 
6904  ->m_mChildren[blkno]->m_mChildren[0])->value->el = new double[nz];
6905 
6906  for (int i=0; i<nz; i++)
6909  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value)->el[i]
6910  = ((ConstantMatrixValues*)value)->el[i];
6911  }
6912  }
6913  }
6914  catch(const ErrorClass& eclass)
6915  {
6916  throw ErrorClass( eclass.errormsg);
6917  }
6918  return true;
6919 }//setMatrixVarValuesBlockElements
6920 
6921 
6922 bool OSResult::setMatrixVariablesOtherResultGeneralAttributes(int solIdx, int idx, std::string name,
6923  std::string description, std::string value, std::string type,
6924  std::string solver, std::string category,
6925  int numberOfMatrixVar, std::string matrixType,
6926  int numberOfEnumerations, std::string enumType)
6927 {
6928  int nSols = this->getSolutionNumber();
6929  if (nSols <= 0) return false;
6930  if (optimization == NULL) return false;
6931  if (optimization->solution == NULL ||
6932  solIdx < 0 || solIdx >= nSols) return false;
6933  if (optimization->solution[solIdx] == NULL) return false;
6934  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
6935  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
6936  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other == NULL) return false;
6937  if (idx < 0 || idx >= optimization->solution[solIdx]->matrixProgramming
6939  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx] != NULL)
6940  return false;
6942  = new OtherMatrixVariableResult();
6945  = description;
6951  = numberOfMatrixVar;
6953  = matrixType;
6955  = numberOfEnumerations;
6957 
6958  if (numberOfMatrixVar > 0)
6959  {
6961  = new OSMatrixWithMatrixVarIdx*[numberOfMatrixVar];
6962  for (int i=0; i<numberOfMatrixVar; i++)
6964  = NULL;
6965  }
6966 
6967  if (numberOfEnumerations > 0)
6968  {
6970  = new OtherOptionOrResultEnumeration*[numberOfEnumerations];
6971  for (int i=0; i<numberOfEnumerations; i++)
6973  = NULL;
6974  }
6975  return true;
6976 }//setMatrixVariablesOtherResultGeneralAttributes
6977 
6978 
6979 bool OSResult::setMatrixVariablesOtherResultMatrixAttributes(int solIdx, int otherIdx, int matrixVarIdx,
6980  int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry,
6981  ENUM_MATRIX_TYPE type, std::string name)
6982 {
6983  int nSols = this->getSolutionNumber();
6984  if (nSols <= 0) return false;
6985  if (optimization == NULL) return false;
6986  if (optimization->solution == NULL ||
6987  solIdx < 0 || solIdx >= nSols) return false;
6988  if (optimization->solution[solIdx] == NULL) return false;
6989  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
6990  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
6991  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other == NULL) return false;
6992 
6993  if (otherIdx < 0 || otherIdx > optimization->solution[solIdx]->matrixProgramming->matrixVariables
6994  ->numberOfOtherMatrixVariableResults) return false;
6995  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx] == NULL)
6996  return false;
6998  == NULL) return false;
6999  if (matrixVarIdx < 0 ||
7000  matrixVarIdx >= optimization->solution[solIdx]->matrixProgramming->matrixVariables
7001  ->other[otherIdx]->numberOfMatrixVar) return false;
7002  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7003  ->matrixVar[matrixVarIdx] != NULL) return false;
7005  ->matrixVar[matrixVarIdx] = new OSMatrixWithMatrixVarIdx();
7007  ->matrixVar[matrixVarIdx]->matrixVarIdx = matrixVarIdx;
7009  ->matrixVar[matrixVarIdx]->numberOfRows = numberOfRows;
7011  ->matrixVar[matrixVarIdx]->numberOfColumns = numberOfColumns;
7013  ->matrixVar[matrixVarIdx]->symmetry = symmetry;
7015  ->matrixVar[matrixVarIdx]->type = type;
7017  ->matrixVar[matrixVarIdx]->name = name;
7018  return true;
7019 }//setMatrixVariablesOtherResultMatrixAttributes
7020 
7021 bool OSResult::setMatrixVariablesOtherResultBlockStructure(int solIdx, int otherIdx, int matrixVarIdx,
7022  int* colOffset, int colOffsetSize, int* rowOffset, int rowOffsetSize,
7023  int numberOfBlocks, int blocksConstructorIdx)
7024 {
7025  int nSols = this->getSolutionNumber();
7026  if (nSols <= 0) return false;
7027  if (optimization == NULL) return false;
7028  if (optimization->solution == NULL ||
7029  solIdx < 0 || solIdx >= nSols) return false;
7030  if (optimization->solution[solIdx] == NULL) return false;
7031  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
7032  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
7033  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other == NULL) return false;
7034  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->matrixProgramming->matrixVariables
7035  ->numberOfOtherMatrixVariableResults) return false;
7036  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx] == NULL)
7037  return false;
7038  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7039  ->matrixVar == NULL) return false;
7040  if (matrixVarIdx < 0 || matrixVarIdx >= optimization->solution[solIdx]->matrixProgramming
7041  ->matrixVariables->other[otherIdx]->numberOfMatrixVar) return false;
7042 
7044  ->matrixVar[matrixVarIdx]->inumberOfChildren = 1; //single Blocks constructor
7046  ->matrixVar[matrixVarIdx]->m_mChildren = new MatrixNode*[1];
7048  ->matrixVar[matrixVarIdx]->m_mChildren[0] = new MatrixBlocks();
7050  ->matrixVar[matrixVarIdx]->m_mChildren[0]->inumberOfChildren = numberOfBlocks;
7051 
7053  ->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset = new IntVector(numberOfBlocks+1);
7054 
7055  for (int i=0; i <= numberOfBlocks; i++)
7057  ->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[i] = colOffset[i];
7058 
7060  ->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset = new IntVector(numberOfBlocks+1);
7061 
7062  for (int i=0; i <= numberOfBlocks; i++)
7064  ->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[i] = rowOffset[i];
7065 
7066  //Note well: Individual pointers are set to NULL, which allows a check against double allocation later
7068  ->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren = new MatrixNode*[numberOfBlocks];
7069 
7070  for (int i=0; i<numberOfBlocks; i++)
7072  ->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[i] = NULL;
7073 
7074  return true;
7075 }//setMatrixVariablesOtherResultBlockStructure
7076 
7077 bool OSResult::setMatrixVariablesOtherResultBlockElements(int solIdx, int otherIdx, int matrixVarIdx,
7078  int blkno, int blkRowIdx, int blkColIdx, int nz, int* start, int* index,
7079  MatrixElementValues* value, ENUM_MATRIX_TYPE valueType,
7080  ENUM_MATRIX_SYMMETRY symmetry, bool rowMajor)
7081 {
7082  try
7083  {
7084  int nSols = this->getSolutionNumber();
7085  if (nSols <= 0) return false;
7086  if (optimization == NULL) return false;
7087  if (optimization->solution == NULL ||
7088  solIdx < 0 || solIdx >= nSols) return false;
7089  if (optimization->solution[solIdx] == NULL) return false;
7090  if (optimization->solution[solIdx]->matrixProgramming == NULL) return false;
7091  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables == NULL) return false;
7092 
7093  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other == NULL) return false;
7094  if (otherIdx < 0 || otherIdx >= optimization->solution[solIdx]->matrixProgramming->matrixVariables
7095  ->numberOfOtherMatrixVariableResults) return false;
7096  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx] == NULL)
7097  return false;
7098  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7099  ->matrixVar == NULL) return false;
7100  if (matrixVarIdx < 0 || matrixVarIdx >= optimization->solution[solIdx]->matrixProgramming
7101  ->matrixVariables->other[otherIdx]->numberOfMatrixVar) return false;
7102 
7103  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7104  ->matrixVar[matrixVarIdx] == NULL) return false;
7105  if (optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7106  ->matrixVar[matrixVarIdx]->m_mChildren[0] == NULL) return false;
7107 
7108  if (blkno < 0 ||
7110  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->inumberOfChildren)
7111  return false;
7112 
7114  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[blkno] != NULL)
7115  throw ErrorClass("memory error in setMatrixVarBlockElements: block was previously allocated");
7116 
7118  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[blkno]
7119  = new MatrixBlock();
7120 
7122  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7123  ->m_mChildren[0])->m_mChildren[blkno])->blockRowIdx = blkRowIdx;
7124 
7126  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7127  ->m_mChildren[0])->m_mChildren[blkno])->blockColIdx = blkColIdx;
7128 
7130  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7131  ->m_mChildren[0])->m_mChildren[blkno])->symmetry = ENUM_MATRIX_SYMMETRY_lower;
7132 
7134  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7135  ->m_mChildren[0])->m_mChildren[blkno])->inumberOfChildren = 1;
7136 
7138  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7139  ->m_mChildren[0])->m_mChildren[blkno])->m_mChildren = new MatrixNode*[1];
7140 
7141  if (valueType == ENUM_MATRIX_TYPE_constant)
7142  ((MatrixBlocks*)optimization->solution[solIdx]
7143  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7144  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0] = new ConstantMatrixElements();
7145  else
7146  throw ErrorClass("in setMatrixVarBlockElements: element type not yet implemented:"
7147  + returnMatrixTypeString(valueType));
7148 
7150  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7151  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->numberOfValues = nz;
7152 
7153  int startSize;
7154 
7155  if (rowMajor)
7156  startSize
7158  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[blkRowIdx+1]
7160  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[blkRowIdx] + 1;
7161  else
7162  startSize
7164  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[blkColIdx+1]
7166  ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[blkColIdx] + 1;
7167 
7169  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7170  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->start
7171  = new IntVector(startSize);
7172 
7173  for (int i=0; i<startSize; i++)
7175  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7176  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->start->el[i] = start[i];
7177 
7178  if (nz > 0)
7179  {
7181  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7182  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->index = new IntVector(nz);
7183 
7184  for (int i=0; i<nz; i++)
7186  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7187  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->index->el[i] = index[i];
7188 
7189  if (valueType == ENUM_MATRIX_TYPE_constant)
7190  {
7192  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7193  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value
7194  = new ConstantMatrixValues();
7195 
7197  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7198  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value->numberOfEl = nz;
7199 
7201  ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7202  ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value->el = new double[nz];
7203 
7204  for (int i=0; i<nz; i++)
7206  ->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7207  ->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])
7208  ->value)->el[i] = ((ConstantMatrixValues*)value)->el[i];
7209  }
7210  }
7211  }
7212  catch(const ErrorClass& eclass)
7213  {
7214  throw ErrorClass( eclass.errormsg);
7215  }
7216  return true;
7217 }//setMatrixVariablesOtherResultBlockElements
7218 
7219 
7221 {
7222  int nSols = this->getSolutionNumber();
7223  if (nSols <= 0) return false;
7224  if (optimization == NULL) return false;
7225  if (optimization->solution == NULL ||
7226  solIdx < 0 || solIdx >= nSols) return false;
7227  if (optimization->solution[solIdx] == NULL)
7228  {
7229  optimization->solution[solIdx] = new OptimizationSolution();
7230  }
7231  if (optimization->solution[solIdx]->otherSolutionResults == NULL)
7232  {
7234  }
7235  if (num < 0) return false;
7236  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult != NULL) return false;
7238  if (num > 0)
7239  {
7241  for(int i = 0; i < num; i++)
7242  {
7244  }
7245  }
7246  return true;
7247 }//setNumberOfOtherSolutionResults
7248 
7249 bool OSResult::setOtherSolutionResultName(int solIdx, int otherIdx, std::string name)
7250 {
7251  int nSols = this->getSolutionNumber();
7252  if (nSols <= 0) return false;
7253  if (optimization == NULL) return false;
7254  if (optimization->solution == NULL ||
7255  solIdx < 0 || solIdx >= nSols) return false;
7256  if (optimization->solution[solIdx] == NULL) return false;
7257  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7258  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return false;
7259  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->name = name;
7260  return true;
7261 }//setOtherSolutionResultName
7262 
7263 bool OSResult::setOtherSolutionResultValue(int solIdx, int otherIdx, std::string value)
7264 {
7265  int nSols = this->getSolutionNumber();
7266  if (nSols <= 0) return false;
7267  if (optimization == NULL) return false;
7268  if (optimization->solution == NULL ||
7269  solIdx < 0 || solIdx >= nSols) return false;
7270  if (optimization->solution[solIdx] == NULL) return false;
7271  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7272  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return false;
7274  return true;
7275 }//setOtherSolutionResultValue
7276 
7277 bool OSResult::setOtherSolutionResultCategory(int solIdx, int otherIdx, std::string category)
7278 {
7279  int nSols = this->getSolutionNumber();
7280  if (nSols <= 0) return false;
7281  if (optimization == NULL) return false;
7282  if (optimization->solution == NULL ||
7283  solIdx < 0 || solIdx >= nSols) return false;
7284  if (optimization->solution[solIdx] == NULL) return false;
7285  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7286  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return false;
7287  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->category = category;
7288  return true;
7289 }//setOtherSolutionResultCategory
7290 
7291 
7292 bool OSResult::setOtherSolutionResultDescription(int solIdx, int otherIdx, std::string description)
7293 {
7294  int nSols = this->getSolutionNumber();
7295  if (nSols <= 0) return false;
7296  if (optimization == NULL) return false;
7297  if (optimization->solution == NULL ||
7298  solIdx < 0 || solIdx >= nSols) return false;
7299  if (optimization->solution[solIdx] == NULL) return false;
7300  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7301  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return false;
7302  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->description = description;
7303  return true;
7304 }//setOtherSolutionResultDescription
7305 
7306 
7307 bool OSResult::setOtherSolutionResultNumberOfItems(int solIdx, int otherIdx, int numberOfItems)
7308 {
7309  int nSols = this->getSolutionNumber();
7310  if (nSols <= 0) return false;
7311  if (optimization == NULL) return false;
7312  if (optimization->solution == NULL ||
7313  solIdx < 0 || solIdx >= nSols) return false;
7314  if (optimization->solution[solIdx] == NULL) return false;
7315  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7316  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL)
7318  if (numberOfItems < 0) return false;
7319  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item != NULL) return false;
7320  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->numberOfItems = numberOfItems;
7321  if (numberOfItems > 0)
7322  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item = new std::string[numberOfItems];
7323  return true;
7324 }//setOtherSolutionResultNumberOfItems
7325 
7326 bool OSResult::setOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx, std::string item)
7327 {
7328  int nSols = this->getSolutionNumber();
7329  if (nSols <= 0) return false;
7330  if (optimization == NULL) return false;
7331  if (optimization->solution == NULL ||
7332  solIdx < 0 || solIdx >= nSols) return false;
7333  if (optimization->solution[solIdx] == NULL) return false;
7334  if (optimization->solution[solIdx]->otherSolutionResults == NULL) return false;
7335  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx] == NULL) return false;
7336  if (optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item == NULL) return false;
7337  optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->item[itemIdx] = item;
7338  return true;
7339 }//setOtherSolutionResultItem
7340 
7341 //----------------- start hard-hat area
7342 //#if 0
7343 
7344 bool OSResult::setAnOtherSolutionResult(int solIdx, std::string name, std::string value,
7345  std::string category, std::string description, int numberOfItems, std::string* item)
7346 {
7347  if (name == "") return false;
7348  int inumberOfItems = numberOfItems;
7349  if(inumberOfItems <= -1) return false;
7350  int nSols = this->getSolutionNumber();
7351  if(nSols <= 0) return false;
7352  if(optimization == NULL) return false;
7353  if(optimization->solution == NULL ||
7354  solIdx < 0 || solIdx >= nSols) return false;
7355  if(optimization->solution[solIdx] == NULL) return false;
7356 
7357  try
7358  {
7359  if (optimization->solution[solIdx]->otherSolutionResults == NULL)
7361 
7363  int i;
7364 
7365  OtherSolutionResult** temp = new OtherSolutionResult*[nres+1]; //Allocate the new pointers
7366  for (i = 0; i < nres; i++)
7367  temp[i] = optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[i]; //copy the pointers
7368 
7369  delete[] optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult; //delete old pointers
7370 
7371 // add in the new element
7372  temp[ nres] = new OtherSolutionResult();
7373 
7374 
7375  temp[ nres]->name = name;
7376  temp[ nres]->value = value;
7377  temp[ nres]->category = category;
7378  temp[ nres]->description = description;
7379  temp[ nres]->numberOfItems = numberOfItems;
7380 
7381  // if there was an item array, we do a hard copy
7382  if (item != NULL)
7383  {
7384  temp[nres]->item = new std::string[numberOfItems];
7385  for (i=0; i<numberOfItems; i++)
7386  temp[nres]->item[i] = item[i];
7387  }
7388 
7389  //hook the new pointers into the data structure
7392 
7393  return true;
7394  }
7395  catch(const ErrorClass& eclass)
7396  {
7398  return false;
7399  }
7400 }//setAnOtherSolutionResult
7401 
7402 
7403 //#endif
7404 //+++++++++++++++++ end hard-hat area
7405 
7407 {
7408  if (optimization == NULL) return false;
7409  if (optimization->otherSolverOutput == NULL)
7410  {
7412  }
7413  if (num < 0) return false;
7414  if (optimization->otherSolverOutput->solverOutput != NULL) return false;
7416  if (num > 0)
7417  {
7419  for(int i = 0; i < num; i++)
7420  {
7422  }
7423  }
7424  return true;
7425 }//setNumberOfSolverOutputs
7426 
7427 bool OSResult::setSolverOutputName(int otherIdx, std::string name)
7428 {
7429  if (optimization == NULL) return false;
7430  if (optimization->otherSolverOutput == NULL) return false;
7431  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return false;
7432  optimization->otherSolverOutput->solverOutput[otherIdx]->name = name;
7433  return true;
7434 }//setSolverOutputName
7435 
7436 bool OSResult::setSolverOutputCategory(int otherIdx, std::string category)
7437 {
7438  if (optimization == NULL) return false;
7439  if (optimization->otherSolverOutput == NULL) return false;
7440  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return false;
7441  optimization->otherSolverOutput->solverOutput[otherIdx]->category = category;
7442  return true;
7443 }//setSolverOutputCategory
7444 
7445 bool OSResult::setSolverOutputDescription(int otherIdx, std::string description)
7446 {
7447  if (optimization == NULL) return false;
7448  if (optimization->otherSolverOutput == NULL) return false;
7449  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return false;
7450  optimization->otherSolverOutput->solverOutput[otherIdx]->description = description;
7451  return true;
7452 }//setSolverOutputDescription
7453 
7454 bool OSResult::setSolverOutputNumberOfItems(int otherIdx, int numberOfItems)
7455 {
7456  if (optimization == NULL) return false;
7457  if (optimization->otherSolverOutput == NULL) return false;
7458  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL)
7460  if (numberOfItems < 0) return false;
7461  if (optimization->otherSolverOutput->solverOutput[otherIdx]->item != NULL) return false;
7462  optimization->otherSolverOutput->solverOutput[otherIdx]->numberOfItems = numberOfItems;
7463  if (numberOfItems > 0)
7464  optimization->otherSolverOutput->solverOutput[otherIdx]->item = new std::string[numberOfItems];
7465  return true;
7466 }//setSolverOutputNumberOfItems
7467 
7468 bool OSResult::setSolverOutputItem(int otherIdx, int itemIdx, std::string item)
7469 {
7470  if (optimization == NULL) return false;
7471  if (optimization->otherSolverOutput == NULL) return false;
7472  if (optimization->otherSolverOutput->solverOutput == NULL) return false;
7473  if (optimization->otherSolverOutput->solverOutput[otherIdx] == NULL) return false;
7474  if (optimization->otherSolverOutput->solverOutput[otherIdx]->item == NULL) return false;
7475  optimization->otherSolverOutput->solverOutput[otherIdx]->item[itemIdx] = item;
7476  return true;
7477 }//setSolverOutputItem
7478 
7479 
7480 
7481 /***************************************************
7482  * methods to test whether two OSResult objects
7483  * or their components are equal to each other
7484  ***************************************************/
7486 {
7487 #ifndef NDEBUG
7488  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OSResult");
7489 #endif
7490  if (this == NULL)
7491  {
7492  if (that == NULL)
7493  return true;
7494  else
7495  {
7496 #ifndef NDEBUG
7497  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OSResult");
7498  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7499 #endif
7500  return false;
7501  }
7502  }
7503  else
7504  {
7505  if (that == NULL)
7506  {
7507 #ifndef NDEBUG
7508  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OSResult");
7509  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7510 #endif
7511  return false;
7512  }
7513  else
7514  {
7515  if (!this->general->IsEqual(that->general))
7516  return false;
7517  if (!this->system->IsEqual(that->system))
7518  return false;
7519  if (!this->service->IsEqual(that->service))
7520  return false;
7521  if (!this->job->IsEqual(that->job))
7522  return false;
7523  if (!this->optimization->IsEqual(that->optimization))
7524  return false;
7525 
7526  return true;
7527  }
7528  }
7529 }//OSResult::IsEqual
7530 
7532 {
7533  std::ostringstream outStr;
7534 
7535 #ifndef NDEBUG
7536  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in GeneralResult");
7537 #endif
7538  if (this == NULL)
7539  {
7540  if (that == NULL)
7541  return true;
7542  else
7543  {
7544 #ifndef NDEBUG
7545  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralResult");
7546  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7547 #endif
7548  return false;
7549  }
7550  }
7551  else
7552  {
7553  if (that == NULL)
7554  {
7555 #ifndef NDEBUG
7556  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralResult");
7557  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7558 #endif
7559  return false;
7560  }
7561  else
7562  {
7563  if (this->message != that->message ||
7564  this->serviceURI != that->serviceURI ||
7565  this->serviceName != that->serviceName ||
7566  this->instanceName != that->instanceName ||
7567  this->jobID != that->jobID ||
7568  this->solverInvoked != that->solverInvoked ||
7569  this->timeStamp != that->timeStamp )
7570  {
7571 #ifndef NDEBUG
7572  outStr.str("");
7573  outStr.clear();
7574  outStr << "Differences in GeneralResult" << endl;
7575  outStr << "message: " << this->message << " vs. " << that->message << endl;
7576  outStr << "serviceURI: " << this->serviceURI << " vs. " << that->serviceURI << endl;
7577  outStr << "serviceName: " << this->serviceName << " vs. " << that->serviceName << endl;
7578  outStr << "instanceName: " << this->instanceName << " vs. " << that->instanceName << endl;
7579  outStr << "jobID: " << this->jobID << " vs. " << that->jobID << endl;
7580  outStr << "solverInvoked: " << this->solverInvoked << " vs. " << that->solverInvoked << endl;
7581  outStr << "timeStamp: " << this->timeStamp << " vs. " << that->timeStamp << endl;
7583 #endif
7584 
7585  return false;
7586  }
7587  if (!this->generalStatus->IsEqual(that->generalStatus))
7588  return false;
7589  if (!this->otherResults->IsEqual(that->otherResults))
7590  return false;
7591  return true;
7592  }
7593  }
7594 }//GeneralResult::IsEqual
7595 
7596 
7598 {
7599  std::ostringstream outStr;
7600 
7601 #ifndef NDEBUG
7602  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in GeneralStatus");
7603 #endif
7604  if (this == NULL)
7605  {
7606  if (that == NULL)
7607  return true;
7608  else
7609  {
7610 #ifndef NDEBUG
7611  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralStatus");
7612  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7613 #endif
7614  return false;
7615  }
7616  }
7617  else
7618  {
7619  if (that == NULL)
7620  {
7621 #ifndef NDEBUG
7622  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralStatus");
7623  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7624 #endif
7625 
7626  return false;
7627  }
7628  else
7629  {
7630  if (this->numberOfSubstatuses != that->numberOfSubstatuses ||
7631  this->type != that->type ||
7632  this->description != that->description )
7633  {
7634 #ifndef NDEBUG
7635  outStr.str("");
7636  outStr.clear();
7637  outStr << "Differences in GeneralStatus" << endl;
7638  outStr << "numberOfSubstatuses: " << this->numberOfSubstatuses << " vs. " << that->numberOfSubstatuses << endl;
7639  outStr << "type: " << this->type << " vs. " << that->type << endl;
7640  outStr << "description: " << this->description << " vs. " << that->description << endl;
7642 #endif
7643  return false;
7644  }
7645 
7646  for (int i = 0; i < numberOfSubstatuses; i++)
7647  if (!this->substatus[i]->IsEqual(that->substatus[i]))
7648  return false;
7649  }
7650  return true;
7651  }
7652 }//GeneralStatus::IsEqual
7653 
7655 {
7656  std::ostringstream outStr;
7657 
7658 #ifndef NDEBUG
7659  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in GeneralSubstatus");
7660 #endif
7661  if (this == NULL)
7662  {
7663  if (that == NULL)
7664  return true;
7665  else
7666  {
7667 #ifndef NDEBUG
7668  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralSubstatus");
7669  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7670 #endif
7671  return false;
7672  }
7673  }
7674  else
7675  {
7676  if (that == NULL)
7677  {
7678 #ifndef NDEBUG
7679  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in GeneralSubstatus");
7680  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7681 #endif
7682  return false;
7683  }
7684  else
7685  {
7686  if (this->name != that->name ||
7687  this->description != that->description )
7688  {
7689 #ifndef NDEBUG
7690  outStr.str("");
7691  outStr.clear();
7692  outStr << "Differences in GeneralSubstatus" << endl;
7693  outStr << "name: " << this->name << " vs. " << that->name << endl;
7694  outStr << "description: " << this->description << " vs. " << that->description << endl;
7696 #endif
7697  return false;
7698  }
7699  }
7700  return true;
7701  }
7702 }//GeneralSubstatus::IsEqual
7703 
7704 
7706 {
7707  std::ostringstream outStr;
7708 
7709 #ifndef NDEBUG
7710  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherResults");
7711 #endif
7712  if (this == NULL)
7713  {
7714  if (that == NULL)
7715  return true;
7716  else
7717  {
7718 #ifndef NDEBUG
7719  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherResults");
7720  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7721 #endif
7722  return false;
7723  }
7724  }
7725  else
7726  {
7727  if (that == NULL)
7728  {
7729 #ifndef NDEBUG
7730  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherResults");
7731  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7732 #endif
7733  return false;
7734  }
7735  else
7736  {
7737  if (this->numberOfOtherResults != that->numberOfOtherResults)
7738  {
7739 #ifndef NDEBUG
7740  outStr.str("");
7741  outStr.clear();
7742  outStr << "Differences in OtherResults" << endl;
7743  outStr << "numberOfOtherResults: " << this->numberOfOtherResults << " vs. " << that->numberOfOtherResults << endl;
7745 #endif
7746 
7747  return false;
7748  }
7749 
7750  for (int i = 0; i < numberOfOtherResults; i++)
7751  if (!this->other[i]->IsEqual(that->other[i]))
7752  return false;
7753  return true;
7754  }
7755  }
7756 }//OtherResults::IsEqual
7757 
7758 
7760 {
7761  std::ostringstream outStr;
7762 
7763 #ifndef NDEBUG
7764  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherResult");
7765 #endif
7766  if (this == NULL)
7767  {
7768  if (that == NULL)
7769  return true;
7770  else
7771  {
7772 #ifndef NDEBUG
7773  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherResult");
7774  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7775 #endif
7776  return false;
7777  }
7778  }
7779  else
7780  {
7781  if (that == NULL)
7782  {
7783 #ifndef NDEBUG
7784  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherResult");
7785  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7786 #endif
7787  return false;
7788  }
7789  else
7790  {
7791  if (this->name != that->name ||
7792  this->value != that->value ||
7793  this->description != that->description )
7794  {
7795 #ifndef NDEBUG
7796  outStr.str("");
7797  outStr.clear();
7798  outStr << "Differences in OtherResult" << endl;
7799  outStr << "name: " << this->name << " vs. " << that->name << endl;
7800  outStr << "value: " << this->value << " vs. " << that->value << endl;
7801  outStr << "description: " << this->description << " vs. " << that->description << endl;
7803 #endif
7804  return false;
7805  }
7806  return true;
7807  }
7808  }
7809 }//OtherResult::IsEqual
7810 
7811 
7813 {
7814  std::ostringstream outStr;
7815 
7816 #ifndef NDEBUG
7817  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in SystemResult");
7818 #endif
7819  if (this == NULL)
7820  {
7821  if (that == NULL)
7822  return true;
7823  else
7824  {
7825 #ifndef NDEBUG
7826  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in SystemResult");
7827  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7828 #endif
7829  return false;
7830  }
7831  }
7832  else
7833  {
7834  if (that == NULL)
7835  {
7836 #ifndef NDEBUG
7837  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in SystemResult");
7838  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7839 #endif
7840  return false;
7841  }
7842  else
7843  {
7844  if (this->systemInformation != that->systemInformation)
7845  {
7846 #ifndef NDEBUG
7847  outStr.str("");
7848  outStr.clear();
7849  outStr << "Differences in SystemResult" << endl;
7850  outStr << "systemInformation: " << this->systemInformation << " vs. " << that->systemInformation << endl;
7852 #endif
7853  return false;
7854  }
7855 
7856  if (!this->availableDiskSpace->IsEqual(that->availableDiskSpace))
7857  return false;
7858  if (!this->availableMemory->IsEqual(that->availableMemory))
7859  return false;
7860  if (!this->availableCPUSpeed->IsEqual(that->availableCPUSpeed))
7861  return false;
7862  if (!this->availableCPUNumber->IsEqual(that->availableCPUNumber))
7863  return false;
7864  if (!this->otherResults->IsEqual(that->otherResults))
7865  return false;
7866 
7867  return true;
7868  }
7869  }
7870 }//SystemResult::IsEqual
7871 
7872 
7873 
7875 {
7876  std::ostringstream outStr;
7877 
7878 #ifndef NDEBUG
7879  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in ServiceResult");
7880 #endif
7881  if (this == NULL)
7882  {
7883  if (that == NULL)
7884  return true;
7885  else
7886  {
7887 #ifndef NDEBUG
7888  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ServiceResult");
7889  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7890 #endif
7891  return false;
7892  }
7893  }
7894  else
7895  {
7896  if (that == NULL)
7897  {
7898 #ifndef NDEBUG
7899  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ServiceResult");
7900  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7901 #endif
7902  return false;
7903  }
7904  else
7905  {
7906  if (this->currentState != that->currentState ||
7907  this->currentJobCount != that->currentJobCount ||
7908  this->totalJobsSoFar != that->totalJobsSoFar ||
7909  this->timeServiceStarted != that->timeServiceStarted ||
7911  {
7912 #ifndef NDEBUG
7913  outStr.str("");
7914  outStr.clear();
7915  outStr << "Differences in ServiceResult" << endl;
7916  outStr << "currentState: " << this->currentState << " vs. " << that->currentState << endl;
7917  outStr << "currentJobCount: " << this->currentJobCount << " vs. " << that->currentJobCount << endl;
7918  outStr << "totalJobsSoFar: " << this->totalJobsSoFar << " vs. " << that->totalJobsSoFar << endl;
7919  outStr << "timeServiceStarted: " << this->timeServiceStarted << " vs. " << that->timeServiceStarted << endl;
7920  outStr << "serviceUtilization: " << this->serviceUtilization << " vs. " << that->serviceUtilization << endl;
7922 #endif
7923  return false;
7924  }
7925 
7926  if (!this->otherResults->IsEqual(that->otherResults))
7927  return false;
7928  }
7929  return true;
7930  }
7931 }//ServiceResult::IsEqual
7932 
7933 
7935 {
7936  std::ostringstream outStr;
7937 
7938 #ifndef NDEBUG
7939  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in JobResult");
7940 #endif
7941  if (this == NULL)
7942  {
7943  if (that == NULL)
7944  return true;
7945  else
7946  {
7947 #ifndef NDEBUG
7948  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in JobResult");
7949  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
7950 #endif
7951  return false;
7952  }
7953  }
7954  else
7955  {
7956  if (that == NULL)
7957  {
7958 #ifndef NDEBUG
7959  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in JobResult");
7960  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
7961 #endif
7962  return false;
7963  }
7964  else
7965  {
7966  if (this->status != that->status ||
7967  this->submitTime != that->submitTime ||
7968  this->scheduledStartTime != that->scheduledStartTime ||
7969  this->actualStartTime != that->actualStartTime ||
7970  this->endTime != that->endTime )
7971  {
7972 #ifndef NDEBUG
7973  outStr.str("");
7974  outStr.clear();
7975  outStr << "Differences in JobResult" << endl;
7976  outStr << "status: " << this->status << " vs. " << that->status << endl;
7977  outStr << "submitTime: " << this->submitTime << " vs. " << that->submitTime << endl;
7978  outStr << "scheduledStartTime: " << this->scheduledStartTime << " vs. " << that->scheduledStartTime << endl;
7979  outStr << "actualStartTime: " << this->actualStartTime << " vs. " << that->actualStartTime << endl;
7980  outStr << "endTime: " << this->endTime << " vs. " << that->endTime << endl;
7982 #endif
7983  return false;
7984  }
7985 
7986  if (!this->timingInformation->IsEqual(that->timingInformation))
7987  return false;
7988  if (!this->usedDiskSpace->IsEqual(that->usedDiskSpace))
7989  return false;
7990  if (!this->usedMemory->IsEqual(that->usedMemory))
7991  return false;
7992  if (!this->usedCPUSpeed->IsEqual(that->usedCPUSpeed))
7993  return false;
7994  if (!this->usedCPUNumber->IsEqual(that->usedCPUNumber))
7995  return false;
7996  if (!this->otherResults->IsEqual(that->otherResults))
7997  return false;
7998 
7999  return true;
8000  }
8001  }
8002 }//JobResult::IsEqual
8003 
8004 
8006 {
8007  std::ostringstream outStr;
8008 
8009 #ifndef NDEBUG
8010  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in TimingInformation");
8011 #endif
8012  if (this == NULL)
8013  {
8014  if (that == NULL)
8015  return true;
8016  else
8017  {
8018 #ifndef NDEBUG
8019  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in TimingInformation");
8020  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8021 #endif
8022  return false;
8023  }
8024  }
8025  else
8026  {
8027  if (that == NULL)
8028  {
8029 #ifndef NDEBUG
8030  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in TimingInformation");
8031  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8032 #endif
8033  return false;
8034  }
8035  else
8036  {
8037  if (this->numberOfTimes != that->numberOfTimes)
8038  {
8039 #ifndef NDEBUG
8040  outStr.str("");
8041  outStr.clear();
8042  outStr << "Differences in TimingInformation" << endl;
8043  outStr << "numberOfTimes: " << this->numberOfTimes << " vs. " << that->numberOfTimes << endl;
8045 #endif
8046 
8047  return false;
8048  }
8049 
8050  for (int i = 0; i < numberOfTimes; i++)
8051  if (!this->time[i]->IsEqual(that->time[i]))
8052  return false;
8053  return true;
8054  }
8055  }
8056 }//TimingInformation::IsEqual
8057 
8058 
8060 {
8061  std::ostringstream outStr;
8062 
8063 #ifndef NDEBUG
8064  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in TimeMeasurement");
8065 #endif
8066  if (this == NULL)
8067  {
8068  if (that == NULL)
8069  return true;
8070  else
8071  {
8072 #ifndef NDEBUG
8073  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in TimeMeasurement");
8074  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8075 #endif
8076  return false;
8077  }
8078  }
8079  else
8080  {
8081  if (that == NULL)
8082  {
8083 #ifndef NDEBUG
8084  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in TimeMeasurement");
8085  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8086 #endif
8087  return false;
8088  }
8089  else
8090  {
8091  if (this->type != that->type ||
8092  this->category != that->category ||
8093  this->description != that->description )
8094  {
8095 #ifndef NDEBUG
8096  outStr.str("");
8097  outStr.clear();
8098  outStr << "Differences in TimeMeasurement" << endl;
8099  outStr << "type: " << this->type << " vs. " << that->type << endl;
8100  outStr << "category: " << this->category << " vs. " << that->category << endl;
8101  outStr << "description: " << this->description << " vs. " << that->description << endl;
8103 #endif
8104  return false;
8105  }
8106  return this->TimeSpan::IsEqual(that);
8107  }
8108  }
8109 }//TimeMeasurement::IsEqual
8110 
8111 
8113 {
8114  std::ostringstream outStr;
8115 
8116 #ifndef NDEBUG
8117  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OptimizationResult");
8118 #endif
8119  if (this == NULL)
8120  {
8121  if (that == NULL)
8122  return true;
8123  else
8124  {
8125 #ifndef NDEBUG
8126  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationResult");
8127  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8128 #endif
8129  return false;
8130  }
8131  }
8132  else
8133  {
8134  if (that == NULL)
8135  {
8136 #ifndef NDEBUG
8137  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationResult");
8138  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8139 #endif
8140  return false;
8141  }
8142  else
8143  {
8144  if (this->numberOfSolutions != that->numberOfSolutions ||
8145  this->numberOfVariables != that->numberOfVariables ||
8146  this->numberOfObjectives != that->numberOfObjectives ||
8147  this->numberOfConstraints != that->numberOfConstraints )
8148  {
8149 #ifndef NDEBUG
8150  outStr.str("");
8151  outStr.clear();
8152  outStr << "Differences in OptimizationResult" << endl;
8153  outStr << "numberOfSolutions: " << this->numberOfSolutions << " vs. " << that->numberOfSolutions << endl;
8154  outStr << "numberOfVariables: " << this->numberOfVariables << " vs. " << that->numberOfVariables << endl;
8155  outStr << "numberOfObjectives: " << this->numberOfObjectives << " vs. " << that->numberOfObjectives << endl;
8156  outStr << "numberOfConstraints: " << this->numberOfConstraints << " vs. " << that->numberOfConstraints << endl;
8158 #endif
8159  return false;
8160  }
8161 
8162  for (int i = 0; i < numberOfSolutions; i++)
8163  if (!this->solution[i]->IsEqual(that->solution[i]))
8164  return false;
8165 
8166  if (!this->otherSolverOutput->IsEqual(that->otherSolverOutput))
8167  return false;
8168 
8169  return true;
8170  }
8171  }
8172 }//OptimizationResult::IsEqual
8173 
8174 
8176 {
8177  std::ostringstream outStr;
8178 
8179 #ifndef NDEBUG
8180  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OptimizationSolution");
8181 #endif
8182  if (this == NULL)
8183  {
8184  if (that == NULL)
8185  return true;
8186  else
8187  {
8188 #ifndef NDEBUG
8189  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolution");
8190  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8191 #endif
8192  return false;
8193  }
8194  }
8195  else
8196  {
8197  if (that == NULL)
8198  {
8199 #ifndef NDEBUG
8200  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolution");
8201  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8202 #endif
8203  return false;
8204  }
8205  else
8206  {
8207  if (this->targetObjectiveIdx != that->targetObjectiveIdx)
8208  {
8209 #ifndef NDEBUG
8210  outStr.str("");
8211  outStr.clear();
8212  outStr << "Differences in OptimizationSolution" << endl;
8213  outStr << "targetObjectiveIdx: " << this->targetObjectiveIdx << " vs. " << that->targetObjectiveIdx << endl;
8215 #endif
8216  return false;
8217  }
8218 
8219  if (this->targetObjectiveName != that->targetObjectiveName)
8220  {
8221 #ifndef NDEBUG
8222  outStr.str("");
8223  outStr.clear();
8224  outStr << "Differences in OptimizationSolution" << endl;
8225  outStr << "targetObjectiveName: " << this->targetObjectiveName << " vs. " << that->targetObjectiveName << endl;
8227 #endif
8228  return false;
8229  }
8230 
8231  if (this->weightedObjectives != that->weightedObjectives)
8232  {
8233 #ifndef NDEBUG
8234  outStr.str("");
8235  outStr.clear();
8236  outStr << "Differences in OptimizationSolution" << endl;
8237  outStr << "weightedObjectives: " << this->weightedObjectives << " vs. " << that->weightedObjectives << endl;
8239 #endif
8240  return false;
8241  }
8242 
8243  if (this->message != that->message)
8244  {
8245 #ifndef NDEBUG
8246  outStr.str("");
8247  outStr.clear();
8248  outStr << "Differences in OptimizationSolution" << endl;
8249  outStr << "message: \'" << this->message << "\' vs. \'" << that->message << "\'" << endl;
8251 #endif
8252  return false;
8253  }
8254 
8255  if (!this->status->IsEqual(that->status))
8256  return false;
8257  if (!this->variables->IsEqual(that->variables))
8258  return false;
8259  if (!this->objectives->IsEqual(that->objectives))
8260  return false;
8261  if (!this->constraints->IsEqual(that->constraints))
8262  return false;
8264  return false;
8265 
8266  return true;
8267  }
8268  }
8269 }//OptimizationSolution ::IsEqual
8270 
8271 
8273 {
8274  std::ostringstream outStr;
8275 
8276 #ifndef NDEBUG
8277  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OptimizationSolutionStatus");
8278 #endif
8279  if (this == NULL)
8280  {
8281  if (that == NULL)
8282  return true;
8283  else
8284  {
8285 #ifndef NDEBUG
8286  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolutionStatus");
8287  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8288 #endif
8289  return false;
8290  }
8291  }
8292  else
8293  {
8294  if (that == NULL)
8295  {
8296 #ifndef NDEBUG
8297  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolutionStatus");
8298  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8299 #endif
8300  return false;
8301  }
8302  else
8303  {
8304  if (this->type != that->type ||
8305  this->description != that->description )
8306  {
8307 #ifndef NDEBUG
8308  outStr.str("");
8309  outStr.clear();
8310  outStr << "Differences in OptimizationSolutionStatus" << endl;
8311  outStr << "type: " << this->type << " vs. " << that->type << endl;
8312  outStr << "description: " << this->description << " vs. " << that->description << endl;
8314 #endif
8315  return false;
8316  }
8317 
8318  if (this->numberOfSubstatuses != that->numberOfSubstatuses)
8319  {
8320 #ifndef NDEBUG
8321  outStr.str("");
8322  outStr.clear();
8323  outStr << "Differences in OptimizationSolutionStatus" << endl;
8324  outStr << "numberOfSubstatuses: " << this->numberOfSubstatuses << " vs. " << that->numberOfSubstatuses << endl;
8326 #endif
8327 
8328  return false;
8329  }
8330 
8331  for (int i = 0; i < numberOfSubstatuses; i++)
8332  if (!this->substatus[i]->IsEqual(that->substatus[i]))
8333  return false;
8334 
8335  return true;
8336  }
8337  }
8338 }//OptimizationSolutionStatus::IsEqual
8339 
8340 
8342 {
8343  std::ostringstream outStr;
8344 
8345 #ifndef NDEBUG
8346  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OptimizationSolutionSubstatus");
8347 #endif
8348  if (this == NULL)
8349  {
8350  if (that == NULL)
8351  return true;
8352  else
8353  {
8354 #ifndef NDEBUG
8355  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolutionSubstatus");
8356  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8357 #endif
8358  return false;
8359  }
8360  }
8361  else
8362  {
8363  if (that == NULL)
8364  {
8365 #ifndef NDEBUG
8366  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OptimizationSolutionSubstatus");
8367  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8368 #endif
8369  return false;
8370  }
8371  else
8372  {
8373  if (this->type != that->type ||
8374  this->description != that->description )
8375  {
8376 #ifndef NDEBUG
8377  outStr.str("");
8378  outStr.clear();
8379  outStr << "Differences in OptimizationSolutionSubstatus" << endl;
8380  outStr << "type: " << this->type << " vs. " << that->type << endl;
8381  outStr << "description: " << this->description << " vs. " << that->description << endl;
8383 #endif
8384  return false;
8385  }
8386 
8387  return true;
8388  }
8389  }
8390 }//OptimizationSolutionSubstatus::IsEqual
8391 
8392 
8394 {
8395  std::ostringstream outStr;
8396 
8397 #ifndef NDEBUG
8398  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in VariableSolution");
8399 #endif
8400  if (this == NULL)
8401  {
8402  if (that == NULL)
8403  return true;
8404  else
8405  {
8406 #ifndef NDEBUG
8407  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableSolution");
8408  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8409 #endif
8410  return false;
8411  }
8412  }
8413  else
8414  {
8415  if (that == NULL)
8416  {
8417 #ifndef NDEBUG
8418  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableSolution");
8419  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8420 #endif
8421  return false;
8422  }
8423  else
8424  {
8426  {
8427 #ifndef NDEBUG
8428  outStr.str("");
8429  outStr.clear();
8430  outStr << "Differences in VariableSolution" << endl;
8431  outStr << "numberOfOtherVariableResults: " << this->numberOfOtherVariableResults << " vs. " << that->numberOfOtherVariableResults << endl;
8433 #endif
8434 
8435  return false;
8436  }
8437 
8438  for (int i = 0; i < numberOfOtherVariableResults; i++)
8439  if (!this->other[i]->IsEqual(that->other[i]))
8440  return false;
8441 
8442  if (!this->values->IsEqual(that->values))
8443  return false;
8444  if (!this->valuesString->IsEqual(that->valuesString))
8445  return false;
8446  if (!this->basisStatus->IsEqual(that->basisStatus))
8447  return false;
8448 
8449  return true;
8450  }
8451  }
8452 }//VariableSolution::IsEqual
8453 
8455 {
8456  std::ostringstream outStr;
8457 
8458 #ifndef NDEBUG
8459  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in VariableValues");
8460 #endif
8461  if (this == NULL)
8462  {
8463  if (that == NULL)
8464  return true;
8465  else
8466  {
8467 #ifndef NDEBUG
8468  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableValues");
8469  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8470 #endif
8471  return false;
8472  }
8473  }
8474  else
8475  {
8476  if (that == NULL)
8477  {
8478 #ifndef NDEBUG
8479  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableValues");
8480  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8481 #endif
8482  return false;
8483  }
8484  else
8485  {
8486  if (this->numberOfVar != that->numberOfVar)
8487  {
8488 #ifndef NDEBUG
8489  outStr.str("");
8490  outStr.clear();
8491  outStr << "Differences in VariableValues" << endl;
8492  outStr << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
8494 #endif
8495 
8496  return false;
8497  }
8498 
8499  for (int i = 0; i < numberOfVar; i++)
8500  if (!this->var[i]->IsEqual(that->var[i]))
8501  return false;
8502 
8503  return true;
8504  }
8505  }
8506 }//VariableValues::IsEqual
8507 
8508 
8510 {
8511  std::ostringstream outStr;
8512 
8513 #ifndef NDEBUG
8514  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in VarValue");
8515 #endif
8516  if (this == NULL)
8517  {
8518  if (that == NULL)
8519  return true;
8520  else
8521  {
8522 #ifndef NDEBUG
8523  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VarValue");
8524  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8525 #endif
8526  return false;
8527  }
8528  }
8529  else
8530  {
8531  if (that == NULL)
8532  {
8533 #ifndef NDEBUG
8534  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VarValue");
8535  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8536 #endif
8537  return false;
8538  }
8539  else
8540  {
8541  if (this->idx != that->idx || this->name != that->name ||
8542  !OSIsEqual(this->value, that->value) )
8543  {
8544 #ifndef NDEBUG
8545  outStr.str("");
8546  outStr.clear();
8547  outStr << "Differences in VarValue" << endl;
8548  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
8549  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
8550  outStr << "value: " << this->value << " vs. " << that->value << endl;
8552 #endif
8553  return false;
8554  }
8555 
8556  return true;
8557  }
8558  }
8559 }//VarValue::IsEqual
8560 
8561 
8563 {
8564  std::ostringstream outStr;
8565 
8566 #ifndef NDEBUG
8567  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in VariableValuesString");
8568 #endif
8569  if (this == NULL)
8570  {
8571  if (that == NULL)
8572  return true;
8573  else
8574  {
8575 #ifndef NDEBUG
8576  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableValuesString");
8577  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8578 #endif
8579  return false;
8580  }
8581  }
8582  else
8583  {
8584  if (that == NULL)
8585  {
8586 #ifndef NDEBUG
8587  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VariableValuesString");
8588  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8589 #endif
8590  return false;
8591  }
8592  else
8593  {
8594  if (this->numberOfVar != that->numberOfVar)
8595  {
8596 #ifndef NDEBUG
8597  outStr.str("");
8598  outStr.clear();
8599  outStr << "Differences in VariableValuesString" << endl;
8600  outStr << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
8602 #endif
8603 
8604  return false;
8605  }
8606 
8607  for (int i = 0; i < numberOfVar; i++)
8608  if (!this->var[i]->IsEqual(that->var[i]))
8609  return false;
8610 
8611  return true;
8612  }
8613  }
8614 }//VariableValuesString::IsEqual
8615 
8616 
8618 {
8619  std::ostringstream outStr;
8620 
8621 #ifndef NDEBUG
8622  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in VarValueString");
8623 #endif
8624  if (this == NULL)
8625  {
8626  if (that == NULL)
8627  return true;
8628  else
8629  {
8630 #ifndef NDEBUG
8631  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VarValueString");
8632  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8633 #endif
8634  return false;
8635  }
8636  }
8637  else
8638  {
8639  if (that == NULL)
8640  {
8641 #ifndef NDEBUG
8642  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in VarValueString");
8643  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8644 #endif
8645  return false;
8646  }
8647  else
8648  {
8649  if (this->idx != that->idx || this->name != that->name ||
8650  this->value != that->value )
8651  {
8652 #ifndef NDEBUG
8653  outStr.str("");
8654  outStr.clear();
8655  outStr << "Differences in VarValueString" << endl;
8656  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
8657  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
8658  outStr << "value: " << this->value << " vs. " << that->value << endl;
8660 #endif
8661  return false;
8662  }
8663 
8664  return true;
8665  }
8666  }
8667 }//VarValueString::IsEqual
8668 
8669 
8671 {
8672  std::ostringstream outStr;
8673 
8674 #ifndef NDEBUG
8675  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherVariableResult");
8676 #endif
8677  if (this == NULL)
8678  {
8679  if (that == NULL)
8680  return true;
8681  else
8682  {
8683 #ifndef NDEBUG
8684  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherVariableResult");
8685  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8686 #endif
8687  return false;
8688  }
8689  }
8690  else
8691  {
8692  if (that == NULL)
8693  {
8694 #ifndef NDEBUG
8695  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherVariableResult");
8696  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8697 #endif
8698  return false;
8699  }
8700  else
8701  {
8702  if (this->name != that->name ||
8703  this->value != that->value ||
8704  this->description != that->description )
8705  {
8706 #ifndef NDEBUG
8707  outStr.str("");
8708  outStr.clear();
8709  outStr << "Differences in OtherVariableResult" << endl;
8710  outStr << "name: " << this->name << " vs. " << that->name << endl;
8711  outStr << "value: " << this->value << " vs. " << that->value << endl;
8712  outStr << "description: " << this->description << " vs. " << that->description << endl;
8714 #endif
8715  return false;
8716  }
8717 
8718  if (this->numberOfVar != that->numberOfVar)
8719  {
8720 #ifndef NDEBUG
8721  outStr.str("");
8722  outStr.clear();
8723  outStr << "numberOfVar: " << this->numberOfVar << " vs. " << that->numberOfVar << endl;
8725 #endif
8726 
8727  return false;
8728  }
8729 
8730  for (int i = 0; i < numberOfVar; i++)
8731  if (!this->var[i]->IsEqual(that->var[i]))
8732  return false;
8733 
8734  if (this->numberOfEnumerations != that->numberOfEnumerations)
8735  {
8736 #ifndef NDEBUG
8737  outStr.str("");
8738  outStr.clear();
8739  outStr << "Differences in OtherVariableResult" << endl;
8740  outStr << "numberOfEnumerations: " << this->numberOfEnumerations << " vs. " << that->numberOfEnumerations << endl;
8742 #endif
8743 
8744  return false;
8745  }
8746 
8747  for (int i = 0; i < numberOfEnumerations; i++)
8748  if (!this->enumeration[i]->IsEqual(that->enumeration[i]))
8749  return false;
8750 
8751  return true;
8752  }
8753  }
8754 }//OtherVariableResult::IsEqual
8755 
8756 
8758 {
8759  std::ostringstream outStr;
8760 
8761 #ifndef NDEBUG
8762  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherVarResult");
8763 #endif
8764  if (this == NULL)
8765  {
8766  if (that == NULL)
8767  return true;
8768  else
8769  {
8770 #ifndef NDEBUG
8771  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherVarResult");
8772  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8773 #endif
8774  return false;
8775  }
8776  }
8777  else
8778  {
8779  if (that == NULL)
8780  {
8781 #ifndef NDEBUG
8782  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherVarResult");
8783  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8784 #endif
8785  return false;
8786  }
8787  else
8788  {
8789  if (this->idx != that->idx || this->name != that->name ||
8790  this->value != that->value )
8791  {
8792 #ifndef NDEBUG
8793  outStr.str("");
8794  outStr.clear();
8795  outStr << "Differences in OtherVarResult" << endl;
8796  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
8797  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
8798  outStr << "value: " << this->value << " vs. " << that->value << endl;
8800 #endif
8801  return false;
8802  }
8803 
8804  return true;
8805  }
8806  }
8807 }//OtherVarResult::IsEqual
8808 
8809 
8811 {
8812  std::ostringstream outStr;
8813 
8814 #ifndef NDEBUG
8815  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in ObjectiveSolution");
8816 #endif
8817  if (this == NULL)
8818  {
8819  if (that == NULL)
8820  return true;
8821  else
8822  {
8823 #ifndef NDEBUG
8824  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjectiveSolution");
8825  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8826 #endif
8827  return false;
8828  }
8829  }
8830  else
8831  {
8832  if (that == NULL)
8833  {
8834 #ifndef NDEBUG
8835  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjectiveSolution");
8836  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8837 #endif
8838  return false;
8839  }
8840  else
8841  {
8843  {
8844 #ifndef NDEBUG
8845  outStr.str("");
8846  outStr.clear();
8847  outStr << "Differences in ObjectiveSolution" << endl;
8848  outStr << "numberOfOtherObjectiveResults: " << this->numberOfOtherObjectiveResults << " vs. " << that->numberOfOtherObjectiveResults << endl;
8850 #endif
8851 
8852  return false;
8853  }
8854 
8855  for (int i = 0; i < numberOfOtherObjectiveResults; i++)
8856  if (!this->other[i]->IsEqual(that->other[i]))
8857  return false;
8858 
8859  if (!this->values->IsEqual(that->values))
8860  return false;
8861  if (!this->basisStatus->IsEqual(that->basisStatus))
8862  return false;
8863 
8864  return true;
8865  }
8866  }
8867 }//ObjectiveSolution::IsEqual
8868 
8869 
8871 {
8872  std::ostringstream outStr;
8873 
8874 #ifndef NDEBUG
8875  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in ObjectiveValues");
8876 #endif
8877  if (this == NULL)
8878  {
8879  if (that == NULL)
8880  return true;
8881  else
8882  {
8883 #ifndef NDEBUG
8884  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjectiveValues");
8885  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8886 #endif
8887  return false;
8888  }
8889  }
8890  else
8891  {
8892  if (that == NULL)
8893  {
8894 #ifndef NDEBUG
8895  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjectiveValues");
8896  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8897 #endif
8898  return false;
8899  }
8900  else
8901  {
8902  if (this->numberOfObj != that->numberOfObj)
8903  {
8904 #ifndef NDEBUG
8905  outStr.str("");
8906  outStr.clear();
8907  outStr << "Differences in ObjectiveValues" << endl;
8908  outStr << "numberOfObj: " << this->numberOfObj << " vs. " << that->numberOfObj << endl;
8910 #endif
8911 
8912  return false;
8913  }
8914 
8915  for (int i = 0; i < numberOfObj; i++)
8916  if (!this->obj[i]->IsEqual(that->obj[i]))
8917  return false;
8918 
8919  return true;
8920  }
8921  }
8922 }//ObjectiveValues::IsEqual
8923 
8924 
8926 {
8927  std::ostringstream outStr;
8928 
8929 #ifndef NDEBUG
8930  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in ObjValue");
8931 #endif
8932  if (this == NULL)
8933  {
8934  if (that == NULL)
8935  return true;
8936  else
8937  {
8938 #ifndef NDEBUG
8939  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjValue");
8940  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8941 #endif
8942  return false;
8943  }
8944  }
8945  else
8946  {
8947  if (that == NULL)
8948  {
8949 #ifndef NDEBUG
8950  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ObjValue");
8951  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
8952 #endif
8953  return false;
8954  }
8955  else
8956  {
8957  if (this->idx != that->idx || this->name != that->name ||
8958  this->value != that->value )
8959  {
8960 #ifndef NDEBUG
8961  outStr.str("");
8962  outStr.clear();
8963  outStr << "Differences in ObjValue" << endl;
8964  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
8965  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
8966  outStr << "value: " << this->value << " vs. " << that->value << endl;
8968 #endif
8969  return false;
8970  }
8971 
8972  return true;
8973  }
8974  }
8975 }//ObjValue::IsEqual
8976 
8977 
8979 {
8980  std::ostringstream outStr;
8981 
8982 #ifndef NDEBUG
8983  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherObjectiveResult");
8984 #endif
8985  if (this == NULL)
8986  {
8987  if (that == NULL)
8988  return true;
8989  else
8990  {
8991 #ifndef NDEBUG
8992  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherObjectiveResult");
8993  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
8994 #endif
8995  return false;
8996  }
8997  }
8998  else
8999  {
9000  if (that == NULL)
9001  {
9002 #ifndef NDEBUG
9003  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherObjectiveResult");
9004  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9005 #endif
9006  return false;
9007  }
9008  else
9009  {
9010  if (this->value != that->value ||
9011  this->name != that->name ||
9012  this->description != that->description )
9013  {
9014 #ifndef NDEBUG
9015  outStr.str("");
9016  outStr.clear();
9017  outStr << "Differences in OtherObjectiveResult" << endl;
9018  outStr << "name: " << this->name << " vs. " << that->name << endl;
9019  outStr << "value: " << this->value << " vs. " << that->value << endl;
9020  outStr << "description: " << this->description << " vs. " << that->description << endl;
9022 #endif
9023  return false;
9024  }
9025 
9026  if (this->numberOfObj != that->numberOfObj)
9027  {
9028 #ifndef NDEBUG
9029  outStr.str("");
9030  outStr.clear();
9031  outStr << "Differences in OtherObjectiveResult" << endl;
9032  outStr << "numberOfObj: " << this->numberOfObj << " vs. " << that->numberOfObj << endl;
9034 #endif
9035 
9036  return false;
9037  }
9038 
9039  for (int i = 0; i < numberOfObj; i++)
9040  if (!this->obj[i]->IsEqual(that->obj[i]))
9041  return false;
9042 
9043  if (this->numberOfEnumerations != that->numberOfEnumerations)
9044  {
9045 #ifndef NDEBUG
9046  outStr.str("");
9047  outStr.clear();
9048  outStr << "Differences in OtherObjectiveResult" << endl;
9049  outStr << "numberOfEnumerations: " << this->numberOfEnumerations << " vs. " << that->numberOfEnumerations << endl;
9051 #endif
9052 
9053  return false;
9054  }
9055 
9056  for (int i = 0; i < numberOfEnumerations; i++)
9057  if (!this->enumeration[i]->IsEqual(that->enumeration[i]))
9058  return false;
9059 
9060  return true;
9061  }
9062  }
9063 }//OtherObjectiveResult::IsEqual
9064 
9065 
9067 {
9068  std::ostringstream outStr;
9069 
9070 #ifndef NDEBUG
9071  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherObjResult");
9072 #endif
9073  if (this == NULL)
9074  {
9075  if (that == NULL)
9076  return true;
9077  else
9078  {
9079 #ifndef NDEBUG
9080  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherObjResult");
9081  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9082 #endif
9083  return false;
9084  }
9085  }
9086  else
9087  {
9088  if (that == NULL)
9089  {
9090 #ifndef NDEBUG
9091  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherObjResult");
9092  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9093 #endif
9094  return false;
9095  }
9096  else
9097  {
9098  if (this->idx != that->idx || this->name != that->name ||
9099  this->value != that->value )
9100  {
9101 #ifndef NDEBUG
9102  outStr.str("");
9103  outStr.clear();
9104  outStr << "Differences in OtherObjResult" << endl;
9105  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
9106  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
9107  outStr << "value: " << this->value << " vs. " << that->value << endl;
9109 #endif
9110  return false;
9111  }
9112 
9113  return true;
9114  }
9115  }
9116 }//OtherObjResult::IsEqual
9117 
9118 
9120 {
9121  std::ostringstream outStr;
9122 
9123 #ifndef NDEBUG
9124  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in ConstraintSolution");
9125 #endif
9126  if (this == NULL)
9127  {
9128  if (that == NULL)
9129  return true;
9130  else
9131  {
9132 #ifndef NDEBUG
9133  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ConstraintSolution");
9134  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9135 #endif
9136  return false;
9137  }
9138  }
9139  else
9140  {
9141  if (that == NULL)
9142  {
9143 #ifndef NDEBUG
9144  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in ConstraintSolution");
9145  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9146 #endif
9147  return false;
9148  }
9149  else
9150  {
9152  {
9153 #ifndef NDEBUG
9154  outStr.str("");
9155  outStr.clear();
9156  outStr << "Differences in ConstraintSolution" << endl;
9157  outStr << "numberOfOtherConstraintResults: " << this->numberOfOtherConstraintResults << " vs. " << that->numberOfOtherConstraintResults << endl;
9159 #endif
9160 
9161  return false;
9162  }
9163 
9164  for (int i = 0; i < numberOfOtherConstraintResults; i++)
9165  if (!this->other[i]->IsEqual(that->other[i]))
9166  return false;
9167 
9168  if (!this->dualValues->IsEqual(that->dualValues))
9169  return false;
9170  if (!this->basisStatus->IsEqual(that->basisStatus))
9171  return false;
9172 
9173  return true;
9174  }
9175  }
9176 }//ConstraintSolution::IsEqual
9177 
9178 
9180 {
9181  std::ostringstream outStr;
9182 
9183 #ifndef NDEBUG
9184  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in DualVariableValues");
9185 #endif
9186  if (this == NULL)
9187  {
9188  if (that == NULL)
9189  return true;
9190  else
9191  {
9192 #ifndef NDEBUG
9193  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in DualVariableValues");
9194  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9195 #endif
9196  return false;
9197  }
9198  }
9199  else
9200  {
9201  if (that == NULL)
9202  {
9203 #ifndef NDEBUG
9204  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in DualVariableValues");
9205  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9206 #endif
9207  return false;
9208  }
9209  else
9210  {
9211  if (this->numberOfCon != that->numberOfCon)
9212  {
9213 #ifndef NDEBUG
9214  outStr.str("");
9215  outStr.clear();
9216  outStr << "Differences in DualVariableValues" << endl;
9217  outStr << "numberOfCon: " << this->numberOfCon << " vs. " << that->numberOfCon << endl;
9219 #endif
9220 
9221  return false;
9222  }
9223 
9224  for (int i = 0; i < numberOfCon; i++)
9225  if (!this->con[i]->IsEqual(that->con[i]))
9226  return false;
9227 
9228  return true;
9229  }
9230  }
9231 }//DualVariableValues::IsEqual
9232 
9234 {
9235  std::ostringstream outStr;
9236 
9237 #ifndef NDEBUG
9238  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in DualVarValue");
9239 #endif
9240  if (this == NULL)
9241  {
9242  if (that == NULL)
9243  return true;
9244  else
9245  {
9246 #ifndef NDEBUG
9247  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in DualVarValue");
9248  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9249 #endif
9250  return false;
9251  }
9252  }
9253  else
9254  {
9255  if (that == NULL)
9256  {
9257 #ifndef NDEBUG
9258  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in DualVarValue");
9259  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9260 #endif
9261  return false;
9262  }
9263  else
9264  {
9265  if (this->idx != that->idx || this->name != that->name ||
9266  !OSIsEqual(this->value, that->value) )
9267  {
9268 #ifndef NDEBUG
9269  outStr.str("");
9270  outStr.clear();
9271  outStr << "Differences in DualVarValue" << endl;
9272  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
9273  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
9274  outStr << "value: " << this->value << " vs. " << that->value << endl;
9276 #endif
9277  return false;
9278  }
9279 
9280  return true;
9281  }
9282  }
9283 }//DualVarValue::IsEqual
9284 
9286 {
9287  std::ostringstream outStr;
9288 
9289 #ifndef NDEBUG
9290  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherConstraintResult");
9291 #endif
9292  if (this == NULL)
9293  {
9294  if (that == NULL)
9295  return true;
9296  else
9297  {
9298 #ifndef NDEBUG
9299  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherConstraintResult");
9300  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9301 #endif
9302  return false;
9303  }
9304  }
9305  else
9306  {
9307  if (that == NULL)
9308  {
9309 #ifndef NDEBUG
9310  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherConstraintResult");
9311  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9312 #endif
9313  return false;
9314  }
9315  else
9316  {
9317  if (this->name != that->name ||
9318  this->value != that->value ||
9319  this->description != that->description )
9320  {
9321 #ifndef NDEBUG
9322  outStr.str("");
9323  outStr.clear();
9324  outStr << "Differences in OtherConstraintResult" << endl;
9325  outStr << "name: " << this->name << " vs. " << that->name << endl;
9326  outStr << "value: " << this->value << " vs. " << that->value << endl;
9327  outStr << "description: " << this->description << " vs. " << that->description << endl;
9329 #endif
9330  return false;
9331  }
9332 
9333  if (this->numberOfCon != that->numberOfCon)
9334  {
9335 #ifndef NDEBUG
9336  outStr.str("");
9337  outStr.clear();
9338  outStr << "Differences in OtherConstraintResult" << endl;
9339  outStr << "numberOfCon: " << this->numberOfCon << " vs. " << that->numberOfCon << endl;
9341 #endif
9342 
9343  return false;
9344  }
9345 
9346  for (int i = 0; i < numberOfCon; i++)
9347  if (!this->con[i]->IsEqual(that->con[i]))
9348  return false;
9349 
9350  if (this->numberOfEnumerations != that->numberOfEnumerations)
9351  {
9352 #ifndef NDEBUG
9353  outStr.str("");
9354  outStr.clear();
9355  outStr << "Differences in OtherConstraintResult" << endl;
9356  outStr << "numberOfEnumerations: " << this->numberOfEnumerations << " vs. " << that->numberOfEnumerations << endl;
9358 #endif
9359 
9360  return false;
9361  }
9362 
9363  for (int i = 0; i < numberOfEnumerations; i++)
9364  if (!this->enumeration[i]->IsEqual(that->enumeration[i]))
9365  return false;
9366 
9367  return true;
9368  }
9369  }
9370 }//OtherConstraintResult::IsEqual
9371 
9372 
9374 {
9375  std::ostringstream outStr;
9376 
9377 #ifndef NDEBUG
9378  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherConResult");
9379 #endif
9380  if (this == NULL)
9381  {
9382  if (that == NULL)
9383  return true;
9384  else
9385  {
9386 #ifndef NDEBUG
9387  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherConResult");
9388  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9389 #endif
9390  return false;
9391  }
9392  }
9393  else
9394  {
9395  if (that == NULL)
9396  {
9397 #ifndef NDEBUG
9398  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherConResult");
9399  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9400 #endif
9401  return false;
9402  }
9403  else
9404  {
9405  if (this->idx != that->idx || this->name != that->name ||
9406  this->value != that->value )
9407  {
9408 #ifndef NDEBUG
9409  outStr.str("");
9410  outStr.clear();
9411  outStr << "Differences in OtherConResult" << endl;
9412  outStr << "idx: " << this->idx << " vs. " << that->idx << endl;
9413  outStr << "name: -" << this->name << "- vs. -" << that->name << "-" << endl;
9414  outStr << "value: " << this->value << " vs. " << that->value << endl;
9416 #endif
9417  return false;
9418  }
9419 
9420  return true;
9421  }
9422  }
9423 }//OtherConResult::IsEqual
9424 
9425 
9427 {
9428  std::ostringstream outStr;
9429 
9430 #ifndef NDEBUG
9431  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherSolutionResults");
9432 #endif
9433  if (this == NULL)
9434  {
9435  if (that == NULL)
9436  return true;
9437  else
9438  {
9439 #ifndef NDEBUG
9440  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolutionResults");
9441  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9442 #endif
9443  return false;
9444  }
9445  }
9446  else
9447  {
9448  if (that == NULL)
9449  {
9450 #ifndef NDEBUG
9451  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolutionResults");
9452  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9453 #endif
9454  return false;
9455  }
9456  else
9457  {
9459  {
9460 #ifndef NDEBUG
9461  outStr.str("");
9462  outStr.clear();
9463  outStr << "Differences in OtherSolutionResults" << endl;
9464  outStr << "numberOfOtherSolutionResults: " << this->numberOfOtherSolutionResults << " vs. " << that->numberOfOtherSolutionResults << endl;
9466 #endif
9467 
9468  return false;
9469  }
9470 
9471  for (int i = 0; i < numberOfOtherSolutionResults; i++)
9472  if (!this->otherSolutionResult[i]->IsEqual(that->otherSolutionResult[i]))
9473  return false;
9474 
9475  return true;
9476  }
9477  }
9478 }//OtherSolutionResults::IsEqual
9479 
9481 {
9482  std::ostringstream outStr;
9483 
9484 #ifndef NDEBUG
9485  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherSolutionResult");
9486 #endif
9487  if (this == NULL)
9488  {
9489  if (that == NULL)
9490  return true;
9491  else
9492  {
9493 #ifndef NDEBUG
9494  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolutionResult");
9495  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9496 #endif
9497  return false;
9498  }
9499  }
9500  else
9501  {
9502  if (that == NULL)
9503  {
9504 #ifndef NDEBUG
9505  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolutionResult");
9506  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9507 #endif
9508  return false;
9509  }
9510  else
9511  {
9512 
9513  if (this->name != that->name ||
9514  this->category != that->category ||
9515  this->description != that->description )
9516  {
9517 #ifndef NDEBUG
9518  outStr.str("");
9519  outStr.clear();
9520  outStr << "Differences in OtherSolutionResult" << endl;
9521  outStr << "name: " << this->name << " vs. " << that->name << endl;
9522  outStr << "category: " << this->category << " vs. " << that->category << endl;
9523  outStr << "description: " << this->description << " vs. " << that->description << endl;
9525 #endif
9526  return false;
9527  }
9528 
9529  if (this->numberOfItems != that->numberOfItems)
9530  {
9531 #ifndef NDEBUG
9532  outStr.str("");
9533  outStr.clear();
9534  outStr << "Differences in OtherSolutionResult" << endl;
9535  outStr << "numberOfItems: " << this->numberOfItems << " vs. " << that->numberOfItems << endl;
9537 #endif
9538 
9539  return false;
9540  }
9541 
9542  for (int i = 0; i < numberOfItems; i++)
9543  if (this->item[i] != that->item[i])
9544  {
9545 #ifndef NDEBUG
9546  outStr.str("");
9547  outStr.clear();
9548  outStr << "Differences in OtherSolutionResult" << endl;
9549  outStr << "item: " << this->item[i] << " vs. " << that->item[i] << endl;
9551 #endif
9552  return false;
9553  }
9554 
9555  return true;
9556  }
9557  }
9558 }//OtherSolutionResult::IsEqual
9559 
9560 
9562 {
9563  std::ostringstream outStr;
9564 
9565 #ifndef NDEBUG
9566  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in OtherSolverOutput");
9567 #endif
9568  if (this == NULL)
9569  {
9570  if (that == NULL)
9571  return true;
9572  else
9573  {
9574 #ifndef NDEBUG
9575  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolverOutput");
9576  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9577 #endif
9578  return false;
9579  }
9580  }
9581  else
9582  {
9583  if (that == NULL)
9584  {
9585 #ifndef NDEBUG
9586  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in OtherSolverOutput");
9587  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9588 #endif
9589  return false;
9590  }
9591  else
9592  {
9593  if (this->numberOfSolverOutputs != that->numberOfSolverOutputs)
9594  {
9595 #ifndef NDEBUG
9596  outStr.str("");
9597  outStr.clear();
9598  outStr << "Differences in OtherSolverOutput" << endl;
9599  outStr << "numberOfSolverOutputs: " << this->numberOfSolverOutputs << " vs. " << that->numberOfSolverOutputs << endl;
9601 #endif
9602 
9603  return false;
9604  }
9605 
9606  for (int i = 0; i < numberOfSolverOutputs; i++)
9607  if (!this->solverOutput[i]->IsEqual(that->solverOutput[i]))
9608  return false;
9609 
9610  return true;
9611  }
9612  }
9613 }//OtherSolverOutput::IsEqual
9614 
9615 
9617 {
9618  std::ostringstream outStr;
9619 
9620 #ifndef NDEBUG
9621  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Start comparing in SolverOutput");
9622 #endif
9623  if (this == NULL)
9624  {
9625  if (that == NULL)
9626  return true;
9627  else
9628  {
9629 #ifndef NDEBUG
9630  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in SolverOutput");
9631  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "First object is NULL, second is not");
9632 #endif
9633  return false;
9634  }
9635  }
9636  else
9637  {
9638  if (that == NULL)
9639  {
9640 #ifndef NDEBUG
9641  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Differences in SolverOutput");
9642  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_debug, "Second object is NULL, first is not");
9643 #endif
9644  return false;
9645  }
9646  else
9647  {
9648  if (this->name != that->name ||
9649  this->category != that->category ||
9650  this->description != that->description )
9651  {
9652 #ifndef NDEBUG
9653  outStr.str("");
9654  outStr.clear();
9655  outStr << "Differences in SolverOutput" << endl;
9656  outStr << "name: " << this->name << " vs. " << that->name << endl;
9657  outStr << "category: " << this->category << " vs. " << that->category << endl;
9658  outStr << "description: " << this->description << " vs. " << that->description << endl;
9660 #endif
9661  return false;
9662  }
9663 
9664  if (this->numberOfItems != that->numberOfItems)
9665  {
9666 #ifndef NDEBUG
9667  outStr.str("");
9668  outStr.clear();
9669  outStr << "Differences in SolverOutput" << endl;
9670  outStr << "numberOfItems: " << this->numberOfItems << " vs. " << that->numberOfItems << endl;
9672 #endif
9673  return false;
9674  }
9675 
9676  for (int i = 0; i < numberOfItems; i++)
9677  if (this->item[i] != that->item[i])
9678  {
9679 #ifndef NDEBUG
9680  outStr.str("");
9681  outStr.clear();
9682  outStr << "Differences in SolverOutput" << endl;
9683  outStr << "item: " << this->item[i] << " vs. " << that->item[i] << endl;
9685 #endif
9686  return false;
9687  }
9688 
9689  return true;
9690  }
9691  }
9692 }//SolverOutput::IsEqual
9693 
9694 
9695 /******************************************************
9696  * methods to set random objects and their components
9697  ******************************************************/
9698 bool OSResult::setRandom(double density, bool conformant)
9699 {
9700 #ifndef NDEBUG
9701  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OSResult");
9702 #endif
9703  if (OSRand() <= density)
9704  {
9706  resultHeader->setRandom(density, conformant);
9707  }
9708  if (OSRand() <= density)
9709  {
9710  general = new GeneralResult();
9711  general->setRandom(density, conformant);
9712  }
9713  if (OSRand() <= density)
9714  {
9715  system = new SystemResult();
9716  system->setRandom(density, conformant);
9717  }
9718  if (OSRand() <= density)
9719  {
9720  service = new ServiceResult();
9721  service->setRandom(density, conformant);
9722  }
9723  if (OSRand() <= density)
9724  {
9725  job = new JobResult();
9726  job->setRandom(density, conformant);
9727  }
9728  if (OSRand() <= density)
9729  {
9731  optimization->setRandom(density, conformant);
9732  }
9733  return true;
9734 }//OSResult::setRandom
9735 
9736 
9737 bool GeneralResult::setRandom(double density, bool conformant)
9738 {
9739 #ifndef NDEBUG
9740  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random GeneralResult");
9741 #endif
9742  if (OSRand() <= density) this->message = "random string";
9743  if (OSRand() <= density) this->serviceURI = "random string";
9744  if (OSRand() <= density) this->serviceName = "random string";
9745  if (OSRand() <= density) this->instanceName = "random string";
9746  if (OSRand() <= density) this->jobID = "random string";
9747  if (OSRand() <= density) this->solverInvoked = "random string";
9748  if (OSRand() <= density) this->timeStamp = "random string";
9749 
9750  if (OSRand() <= density)
9751  {
9752  generalStatus = new GeneralStatus();
9753 
9754 
9755  generalStatus->setRandom(density, conformant);
9756  }
9757  if (OSRand() <= density)
9758  {
9759  otherResults = new OtherResults();
9760  otherResults->setRandom(density, conformant);
9761  }
9762  return true;
9763 }//GeneralResult::setRandom
9764 
9765 
9766 bool GeneralStatus::setRandom(double density, bool conformant)
9767 {
9768 #ifndef NDEBUG
9769  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random GeneralStatus");
9770 #endif
9771  int n;
9772 
9773  if (OSRand() <= density) numberOfSubstatuses = (int)(1+4*OSRand());
9774  if (OSRand() <= density) type = "normal";
9775  else type = "error";
9776  if (OSRand() <= density) description = "random string";
9777 
9778  if (conformant) n = this->numberOfSubstatuses;
9779  else n = (int)(1+4*OSRand());
9780 
9781  substatus = new GeneralSubstatus*[n];
9782 
9783  for (int i = 0; i < n; i++)
9784  {
9785  substatus[i] = new GeneralSubstatus();
9786  substatus[i]->setRandom(density, conformant);
9787  }
9788 
9789  return true;
9790 }//GeneralStatus::setRandom
9791 
9792 bool GeneralSubstatus::setRandom(double density, bool conformant)
9793 {
9794 #ifndef NDEBUG
9795  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random GeneralSubstatus");
9796 #endif
9797  name = "substatus name";
9798  if (OSRand() <= density) description = "random string";
9799  return true;
9800 }//GeneralSubstatus::setRandom
9801 
9802 
9803 bool OtherResults::setRandom(double density, bool conformant)
9804 {
9805 #ifndef NDEBUG
9806  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherResults");
9807 #endif
9808  int n;
9809 
9810  this->numberOfOtherResults = (int)(1+4*OSRand());
9811 
9812  if (conformant) n = this->numberOfOtherResults;
9813  else n = (int)(1+4*OSRand());
9814 
9815  other = new OtherResult*[n];
9816 
9817  for (int i = 0; i < n; i++)
9818  {
9819  other[i] = new OtherResult();
9820  other[i]->setRandom(density, conformant);
9821  }
9822 
9823  return true;
9824 }//OtherResults::setRandom
9825 
9826 
9827 bool OtherResult::setRandom(double density, bool conformant)
9828 {
9829 #ifndef NDEBUG
9830  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherResult");
9831 #endif
9832  name = "other result";
9833  value = "random string";
9834  description = "random string";
9835  return true;
9836 }//OtherResult::setRandom
9837 
9838 
9839 bool SystemResult::setRandom(double density, bool conformant)
9840 {
9841 #ifndef NDEBUG
9842  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random SystemResult");
9843 #endif
9844  if (OSRand() <= density) systemInformation = "random string";
9845 
9846  if (OSRand() <= density)
9847  {
9849  availableDiskSpace->setRandom(density, conformant);
9850  }
9851 
9852  if (OSRand() <= density)
9853  {
9855  availableMemory->setRandom(density, conformant);
9856  }
9857  if (OSRand() <= density)
9858  {
9859  availableCPUSpeed = new CPUSpeed();
9860  availableCPUSpeed->setRandom(density, conformant);
9861  }
9862 
9863  if (OSRand() <= density)
9864  {
9865  availableCPUNumber = new CPUNumber();
9866  availableCPUNumber->setRandom(density, conformant);
9867  }
9868 
9869  if (OSRand() <= density)
9870  {
9871  otherResults = new OtherResults();
9872  otherResults->setRandom(density, conformant);
9873  }
9874  return true;
9875 }//SystemResult::setRandom
9876 
9877 bool ServiceResult::setRandom(double density, bool conformant)
9878 {
9879 #ifndef NDEBUG
9880  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random ServiceResult");
9881 #endif
9882  if (OSRand() <= density)
9883  {
9884  double temp = OSRand();
9885  if (conformant) temp = 0.5*temp;
9886 
9887  if (temp <= 0.25) this->currentState = "unknown";
9888  else if (temp <= 0.50) this->currentState = "busy";
9889  else if (temp <= 0.75) this->currentState = "";
9890  else this->currentState = "known";
9891  }
9892 
9893  if (OSRand() <= density) currentJobCount = (int) (-1+4*OSRand());
9894  if (OSRand() <= density) totalJobsSoFar = (int) (-1+4*OSRand());
9895  if (OSRand() <= density) timeServiceStarted = "2010-07-12T01:23:45-03:00";
9896 
9897  if (OSRand() <= density)
9898  {
9899  double temp = OSRand();
9900 
9901  if (temp <= 0.25) this->serviceUtilization = OSRand();
9902  else if (temp <= 0.50) this->serviceUtilization = -1.0;
9903  else if (temp <= 0.75) this->serviceUtilization = OSDBL_MAX;
9904  else this->serviceUtilization = OSNaN();
9905  }
9906 
9907  if (OSRand() <= density)
9908  {
9909  otherResults = new OtherResults();
9910  otherResults->setRandom(density, conformant);
9911  }
9912  return true;
9913 }//ServiceResult::setRandom
9914 
9915 
9916 bool JobResult::setRandom(double density, bool conformant)
9917 {
9918 #ifndef NDEBUG
9919  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random JobResult");
9920 #endif
9921  if (OSRand() <= density)
9922  {
9923  double temp = OSRand();
9924  if (conformant) temp = 0.5*temp;
9925 
9926  if (temp <= 0.25) this->status = "finished";
9927  else if (temp <= 0.50) this->status = "running";
9928  else if (temp <= 0.75) this->status = "";
9929  else this->status = "walking";
9930  }
9931 
9932  if (OSRand() <= density) submitTime = "1970-01-01T00:00:00-00:00";
9933  if (OSRand() <= density) scheduledStartTime = "1970-01-01T00:00:00-00:00";
9934  if (OSRand() <= density) actualStartTime = "1970-01-01T00:00:00-00:00";
9935  if (OSRand() <= density) endTime = "1970-01-01T00:00:00-00:00";
9936 
9937  if (OSRand() <= density)
9938  {
9940  timingInformation->setRandom(density, conformant);
9941  }
9942 
9943  if (OSRand() <= density)
9944  {
9946  usedDiskSpace->setRandom(density, conformant);
9947  }
9948 
9949  if (OSRand() <= density)
9950  {
9951  usedMemory = new StorageCapacity();
9952  usedMemory->setRandom(density, conformant);
9953  }
9954 
9955  if (OSRand() <= density)
9956  {
9957  usedCPUSpeed = new CPUSpeed();
9958  usedCPUSpeed->setRandom(density, conformant);
9959  }
9960 
9961  if (OSRand() <= density)
9962  {
9963  usedCPUNumber = new CPUNumber();
9964  usedCPUNumber->setRandom(density, conformant);
9965  }
9966 
9967  if (OSRand() <= density)
9968  {
9969  otherResults = new OtherResults();
9970  otherResults->setRandom(density, conformant);
9971  }
9972  return true;
9973 }//JobResult::setRandom
9974 
9975 
9976 bool TimingInformation::setRandom(double density, bool conformant)
9977 {
9978 #ifndef NDEBUG
9979  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random TimingInformation");
9980 #endif
9981  int n;
9982 
9983  this->numberOfTimes = (int)(1+4*OSRand());
9984 
9985  if (conformant) n = this->numberOfTimes;
9986  else n = (int)(1+4*OSRand());
9987 
9988  time = new TimeMeasurement*[n];
9989 
9990  for (int i = 0; i < n; i++)
9991  {
9992  time[i] = new TimeMeasurement();
9993  time[i]->setRandom(density, conformant);
9994  }
9995 
9996  return true;
9997 }//TimingInformation::setRandom
9998 
9999 #if 0
10000 bool Time::setRandom(double density, bool conformant)
10001 {
10002 #ifndef NDEBUG
10003  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random Time");
10004 #endif
10005  if (OSRand() <= density)
10006  this->description = "random string";
10007 
10008  if (OSRand() <= density)
10009  {
10010  double temp = OSRand();
10011  if (conformant) temp = 0.5*temp;
10012 
10013  if (temp <= 0.25) this->type = "elapsedTime";
10014  else if (temp <= 0.50) this->type = "cpuTime";
10015  else if (temp <= 0.75) this->type = "";
10016  else this->type = "dinnerTime";
10017  }
10018 
10019  if (OSRand() <= density)
10020  {
10021  double temp = OSRand();
10022  if (conformant) temp = 0.5*temp;
10023 
10024  if (temp <= 0.25) this->category = "total";
10025  else if (temp <= 0.50) this->category = "input";
10026  else if (temp <= 0.75) this->category = "";
10027  else this->category = "putin";
10028  }
10029 
10030  if (OSRand() <= density)
10031  {
10032  double temp = OSRand();
10033  if (conformant) temp = 0.5*temp;
10034 
10035  if (temp <= 0.25) this->unit = "second";
10036  else if (temp <= 0.50) this->unit = "tick";
10037  else if (temp <= 0.75) this->unit = "";
10038  else this->unit = "flea";
10039  }
10040 
10041  if (OSRand() <= density)
10042  {
10043  if (OSRand() <= 0.5) this->value = 3.14156;
10044  else this->value = 2.71828;
10045  }
10046  return true;
10047 }//Time::setRandom
10048 #endif
10049 
10050 
10051 bool TimeMeasurement::setRandom(double density, bool conformant)
10052 {
10053 #ifndef NDEBUG
10054  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random TimeMeasurement");
10055 #endif
10056  if (OSRand() <= density)
10057  this->description = "random string";
10058 
10059  if (OSRand() <= density)
10060  {
10061  double temp = OSRand();
10062  if (conformant) temp = 0.5*temp;
10063 
10064  if (temp <= 0.25) this->type = "elapsedTime";
10065  else if (temp <= 0.50) this->type = "cpuTime";
10066  else if (temp <= 0.75) this->type = "";
10067  else this->type = "dinnerTime";
10068  }
10069 
10070  if (OSRand() <= density)
10071  {
10072  double temp = OSRand();
10073  if (conformant) temp = 0.5*temp;
10074 
10075  if (temp <= 0.25) this->category = "total";
10076  else if (temp <= 0.50) this->category = "input";
10077  else if (temp <= 0.75) this->category = "";
10078  else this->category = "putin";
10079  }
10080 
10081  if (OSRand() <= density) this->TimeSpan::setRandom(density,conformant);
10082 
10083  return true;
10084 }//TimeMeasurement::setRandom
10085 
10086 bool OptimizationResult::setRandom(double density, bool conformant)
10087 {
10088 #ifndef NDEBUG
10089  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OptimizationResult");
10090 #endif
10091  numberOfSolutions = (int)(1+4*OSRand());
10092 
10093  numberOfVariables = 10;
10094  numberOfObjectives = 2;
10095  numberOfConstraints = 5;
10096 
10097  int n;
10098 
10099  if (conformant) n = this->numberOfSolutions;
10100  else n = (int)(1+4*OSRand());
10101 
10103 
10104  for (int i = 0; i < n; i++)
10105  {
10106  solution[i] = new OptimizationSolution();
10107  solution[i]->setRandom(density,conformant);
10108  }
10109 
10110  return true;
10111 }//OptimizationResult::setRandom
10112 
10113 bool OptimizationSolution::setRandom(double density, bool conformant)
10114 {
10115 #ifndef NDEBUG
10116  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OptimizationSolution");
10117 #endif
10118  if (OSRand() <= density)
10119  {
10120  if (OSRand() <= density) targetObjectiveIdx = -1;
10121  else targetObjectiveIdx = -2;
10122  }
10123 
10124  if (OSRand() <= density) targetObjectiveName = "random string";
10125  if (OSRand() <= density) weightedObjectives = (OSRand() < 0.5);
10126 
10127  if (OSRand() <= density) message = "random string";
10128 
10130  status->setRandom(density, conformant);
10131 
10132  if (OSRand() <= density)
10133  {
10134  variables = new VariableSolution();
10135  variables->setRandom(density, conformant);
10136  }
10137 
10138  if (OSRand() <= density)
10139  {
10140  objectives = new ObjectiveSolution();
10141  objectives->setRandom(density, conformant);
10142  }
10143 
10144  if (OSRand() <= density)
10145  {
10147  constraints->setRandom(density, conformant);
10148  }
10149 
10150  if (OSRand() <= density)
10151  {
10153  otherSolutionResults->setRandom(density, conformant);
10154  }
10155 
10156  return true;
10157 }//OptimizationSolution::setRandom
10158 
10159 
10160 bool OptimizationSolutionStatus::setRandom(double density, bool conformant)
10161 {
10162 #ifndef NDEBUG
10163  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OptimizationSolutionStatus");
10164 #endif
10165  double temp = OSRand();
10166  if (conformant) temp = 0.5*temp;
10167 
10168  if (temp <= 0.25) this->type = "optimal";
10169  else if (temp <= 0.50) this->type = "unsure";
10170  else if (temp <= 0.75) this->type = "";
10171  else this->type = "sure";
10172 
10173  if (OSRand() <= density) this->description = "random string";
10174 
10175  if (OSRand() <= density)
10176  {
10177  int n;
10178 
10179  this->numberOfSubstatuses = (int)(1+4*OSRand());
10180 
10181  if (conformant) n = this->numberOfSubstatuses;
10182  else n = (int)(1+4*OSRand());
10183 
10185 
10186  for (int i = 0; i < n; i++)
10187  {
10189  substatus[i]->setRandom(density, conformant);
10190  }
10191  }
10192 
10193  return true;
10194 }//OptimizationSolutionStatus::setRandom
10195 
10196 
10197 bool OptimizationSolutionSubstatus::setRandom(double density, bool conformant)
10198 {
10199 #ifndef NDEBUG
10200  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OptimizationSolutionSubstatus");
10201 #endif
10202  double temp = OSRand();
10203  if (conformant) temp = 0.5*temp;
10204 
10205  if (temp <= 0.25) this->type = "stoppedByLimit";
10206  else if (temp <= 0.50) this->type = "stoppedByBounds";
10207  else if (temp <= 0.75) this->type = "";
10208  else this->type = "stoppedByPolice";
10209 
10210  if (OSRand() <= density) this->description = "random string";
10211 
10212  return true;
10213 }//OptimizationSolutionSubstatus::setRandom
10214 
10215 
10216 bool VariableSolution::setRandom(double density, bool conformant)
10217 {
10218 #ifndef NDEBUG
10219  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random VariableSolution");
10220 #endif
10221  if (OSRand() <= density)
10222  {
10223  int n;
10224 
10225  this->numberOfOtherVariableResults = (int)(1+4*OSRand());
10226 
10227  if (conformant) n = this->numberOfOtherVariableResults;
10228  else n = (int)(1+4*OSRand());
10229 
10230  other = new OtherVariableResult*[n];
10231 
10232  for (int i = 0; i < n; i++)
10233  {
10234  other[i] = new OtherVariableResult();
10235  other[i]->setRandom(density, conformant);
10236  }
10237  }
10238 
10239  if (OSRand() <= density)
10240  {
10241  values = new VariableValues();
10242  values->setRandom(density, conformant);
10243  }
10244 
10245  if (OSRand() <= density)
10246  {
10248  valuesString->setRandom(density, conformant);
10249  }
10250 
10251  if (OSRand() <= density)
10252  {
10253  basisStatus = new BasisStatus();
10254  basisStatus->setRandom(density, conformant, 0, 9);
10255  }
10256 
10257  return true;
10258 }//VariableSolution::setRandom
10259 
10260 bool VariableValues::setRandom(double density, bool conformant)
10261 {
10262 #ifndef NDEBUG
10263  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random VariableValues");
10264 #endif
10265  int n;
10266 
10267  this->numberOfVar = (int)(1+4*OSRand());
10268 
10269  if (conformant) n = this->numberOfVar;
10270  else n = (int)(1+4*OSRand());
10271 
10272  var = new VarValue*[n];
10273 
10274  for (int i = 0; i < n; i++)
10275  {
10276  var[i] = new VarValue();
10277  var[i]->setRandom(density, conformant);
10278  }
10279 
10280  return true;
10281 }//VariableValues::setRandom
10282 
10283 
10284 bool VarValue::setRandom(double density, bool conformant)
10285 {
10286 #ifndef NDEBUG
10287  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random VarValue");
10288 #endif
10289  this->idx = (int)(10*OSRand());
10290  if (OSRand() <= 0.5) this->value = 3.14156;
10291  else this->value = 2.71828;
10292 
10293  if (OSRand() <= density) this->name = "random string";
10294 
10295  return true;
10296 }//VarValue::setRandom
10297 
10298 
10299 bool VariableValuesString::setRandom(double density, bool conformant)
10300 {
10301 #ifndef NDEBUG
10302  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random VariableValuesString");
10303 #endif
10304  int n;
10305 
10306  this->numberOfVar = (int)(1+4*OSRand());
10307 
10308  if (conformant) n = this->numberOfVar;
10309  else n = (int)(1+4*OSRand());
10310 
10311  var = new VarValueString*[n];
10312 
10313  for (int i = 0; i < n; i++)
10314  {
10315  var[i] = new VarValueString();
10316  var[i]->setRandom(density, conformant);
10317  }
10318 
10319  return true;
10320 }//VariableValuesString::setRandom
10321 
10322 
10323 bool VarValueString::setRandom(double density, bool conformant)
10324 {
10325 #ifndef NDEBUG
10326  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random VarValueString");
10327 #endif
10328  this->idx = (int)(10*OSRand());
10329  if (OSRand() <= 0.5) this->value = "random string";
10330  else this->value = "";
10331 
10332  if (OSRand() <= density) this->name = "random string";
10333 
10334  return true;
10335 }//VarValueString::setRandom
10336 
10337 
10338 bool OtherVariableResult::setRandom(double density, bool conformant)
10339 {
10340 #ifndef NDEBUG
10341  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherVariableResult");
10342 #endif
10343  this->name = "random string";
10344  if (OSRand() <= density) this->value = "random string";
10345  if (OSRand() <= density) this->description = "random string";
10346 
10347  if (OSRand() <= density)
10348  {
10349  if (OSRand() <= 0.5)
10350  {
10351  int n;
10352 
10353  this->numberOfVar = (int)(1+4*OSRand());
10354 
10355  if (conformant) n = this->numberOfVar;
10356  else n = (int)(1+4*OSRand());
10357 
10358  var = new OtherVarResult*[n];
10359 
10360  for (int i = 0; i < n; i++)
10361  {
10362  var[i] = new OtherVarResult();
10363  var[i]->setRandom(density, conformant);
10364  }
10365  }
10366  else
10367  {
10368  int n;
10369 
10370  this->numberOfEnumerations = (int)(1+4*OSRand());
10371 
10372  if (conformant) n = this->numberOfEnumerations;
10373  else n = (int)(1+4*OSRand());
10374 
10376 
10377  for (int i = 0; i < n; i++)
10378  {
10380  enumeration[i]->setRandom(density, conformant, 0, 9);
10381  }
10382  }
10383  }
10384 
10385  return true;
10386 }//OtherVariableResult::setRandom
10387 
10388 
10389 bool OtherVarResult::setRandom(double density, bool conformant)
10390 {
10391 #ifndef NDEBUG
10392  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherVarResult");
10393 #endif
10394  this->idx = (int)(10*OSRand());
10395  if (OSRand() <= 0.5) this->value = "random string";
10396  else this->value = "";
10397 
10398  if (OSRand() <= density) this->name = "random string";
10399 
10400  return true;
10401 }//OtherVarResult::setRandom
10402 
10403 
10404 bool ObjectiveSolution::setRandom(double density, bool conformant)
10405 {
10406 #ifndef NDEBUG
10407  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random ObjectiveSolution");
10408 #endif
10409  if (OSRand() <= density)
10410  {
10411  int n;
10412 
10413  this->numberOfOtherObjectiveResults = (int)(1+4*OSRand());
10414 
10415  if (conformant) n = this->numberOfOtherObjectiveResults;
10416  else n = (int)(1+4*OSRand());
10417 
10418  other = new OtherObjectiveResult*[n];
10419 
10420  for (int i = 0; i < n; i++)
10421  {
10422 
10423  other[i] = new OtherObjectiveResult();
10424  other[i]->setRandom(density, conformant);
10425  }
10426  }
10427 
10428 
10429  if (OSRand() <= density)
10430  {
10431  values = new ObjectiveValues();
10432  values->setRandom(density, conformant);
10433  }
10434 
10435  if (OSRand() <= density)
10436  {
10437  basisStatus = new BasisStatus();
10438  basisStatus->setRandom(density, conformant, -2, -1);
10439  }
10440 
10441  return true;
10442 }//ObjectiveSolution::setRandom
10443 
10444 
10445 bool ObjectiveValues::setRandom(double density, bool conformant)
10446 {
10447 #ifndef NDEBUG
10448  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random ObjectiveValues");
10449 #endif
10450  int n;
10451 
10452  this->numberOfObj = (int)(1+4*OSRand());
10453 
10454  if (conformant) n = this->numberOfObj;
10455  else n = (int)(1+4*OSRand());
10456 
10457  obj = new ObjValue*[n];
10458 
10459  for (int i = 0; i < n; i++)
10460  {
10461  obj[i] = new ObjValue();
10462  obj[i]->setRandom(density, conformant);
10463  }
10464 
10465  return true;
10466 }//ObjectiveValues::setRandom
10467 
10468 
10469 bool ObjValue::setRandom(double density, bool conformant)
10470 {
10471 #ifndef NDEBUG
10472  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random ObjValue");
10473 #endif
10474  if (OSRand() <= 0.5) this->idx = -1;
10475  else this->idx = -2;
10476 
10477  if (OSRand() <= 0.5) this->value = 3.14156;
10478  else this->value = 2.71828;
10479 
10480  if (OSRand() <= density) this->name = "random string";
10481 
10482  return true;
10483 }//ObjValue::setRandom
10484 
10485 
10486 bool OtherObjectiveResult::setRandom(double density, bool conformant)
10487 {
10488 #ifndef NDEBUG
10489  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherObjectiveResult");
10490 #endif
10491  this->name = "random string";
10492  if (OSRand() <= density) this->value = "random string";
10493  if (OSRand() <= density) this->description = "random string";
10494 
10495  if (OSRand() <= density)
10496  {
10497  if (OSRand() <= 0.5)
10498  {
10499  int n;
10500 
10501  this->numberOfObj = (int)(1+4*OSRand());
10502 
10503  if (conformant) n = this->numberOfObj;
10504  else n = (int)(1+4*OSRand());
10505 
10506  obj = new OtherObjResult*[n];
10507 
10508  for (int i = 0; i < n; i++)
10509  {
10510  obj[i] = new OtherObjResult();
10511  obj[i]->setRandom(density, conformant);
10512  }
10513  }
10514  else
10515  {
10516  int n;
10517 
10518  this->numberOfEnumerations = (int)(1+4*OSRand());
10519 
10520  if (conformant) n = this->numberOfEnumerations;
10521  else n = (int)(1+4*OSRand());
10522 
10524 
10525  for (int i = 0; i < n; i++)
10526  {
10528  enumeration[i]->setRandom(density, conformant, -2, -1);
10529  }
10530  }
10531  }
10532 
10533  return true;
10534 }//OtherObjectiveResult::setRandom
10535 
10536 
10537 bool OtherObjResult::setRandom(double density, bool conformant)
10538 {
10539 #ifndef NDEBUG
10540  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherObjResult");
10541 #endif
10542  if (OSRand() <= 0.5) this->idx = -1;
10543  else this->idx = -2;
10544 
10545  if (OSRand() <= 0.5) this->value = "random string";
10546  else this->value = "";
10547 
10548  if (OSRand() <= density) this->name = "random string";
10549 
10550  return true;
10551 }//OtherObjResult::setRandom
10552 
10553 
10554 bool ConstraintSolution::setRandom(double density, bool conformant)
10555 {
10556 #ifndef NDEBUG
10557  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random ConstraintSolution");
10558 #endif
10559  if (OSRand() <= density)
10560  {
10561  int n;
10562 
10563  this->numberOfOtherConstraintResults = (int)(1+4*OSRand());
10564 
10565  if (conformant) n = this->numberOfOtherConstraintResults;
10566  else n = (int)(1+4*OSRand());
10567 
10568  other = new OtherConstraintResult*[n];
10569 
10570  for (int i = 0; i < n; i++)
10571  {
10572  other[i] = new OtherConstraintResult();
10573  other[i]->setRandom(density, conformant);
10574  }
10575  }
10576 
10577  if (OSRand() <= density)
10578  {
10580  dualValues->setRandom(density, conformant);
10581  }
10582 
10583  if (OSRand() <= density)
10584  {
10585  basisStatus = new BasisStatus();
10586  basisStatus->setRandom(density, conformant, 0 ,4);
10587  }
10588 
10589  return true;
10590 }//ConstraintSolution::setRandom
10591 
10592 
10593 bool DualVariableValues::setRandom(double density, bool conformant)
10594 {
10595 #ifndef NDEBUG
10596  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random DualVariableValues");
10597 #endif
10598  int n;
10599 
10600  this->numberOfCon = (int)(1+4*OSRand());
10601 
10602  if (conformant) n = this->numberOfCon;
10603  else n = (int)(1+4*OSRand());
10604 
10605  con = new DualVarValue*[n];
10606 
10607  for (int i = 0; i < n; i++)
10608  {
10609  con[i] = new DualVarValue();
10610  con[i]->setRandom(density, conformant);
10611  }
10612 
10613  return true;
10614 }//DualVariableValues::setRandom
10615 
10616 bool DualVarValue::setRandom(double density, bool conformant)
10617 {
10618 #ifndef NDEBUG
10619  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random DualVarValue");
10620 #endif
10621  this->idx = (int)(5*OSRand());
10622  if (OSRand() <= 0.5) this->value = 3.14156;
10623  else this->value = 2.71828;
10624 
10625  if (OSRand() <= density) this->name = "random string";
10626 
10627  return true;
10628 }//DualVarValue::setRandom
10629 
10630 bool OtherConstraintResult::setRandom(double density, bool conformant)
10631 {
10632 #ifndef NDEBUG
10633  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherConstraintResult");
10634 #endif
10635  this->name = "random string";
10636  if (OSRand() <= density) this->value = "random string";
10637  if (OSRand() <= density) this->description = "random string";
10638 
10639  if (OSRand() <= density)
10640  {
10641  if (OSRand() <= 0.5)
10642  {
10643  int n;
10644 
10645  this->numberOfCon = (int)(1+4*OSRand());
10646 
10647  if (conformant) n = this->numberOfCon;
10648  else n = (int)(1+4*OSRand());
10649 
10650  con = new OtherConResult*[n];
10651 
10652  for (int i = 0; i < n; i++)
10653  {
10654  con[i] = new OtherConResult();
10655  con[i]->setRandom(density, conformant);
10656  }
10657  }
10658  else
10659  {
10660  int n;
10661 
10662  this->numberOfEnumerations = (int)(1+4*OSRand());
10663 
10664  if (conformant) n = this->numberOfEnumerations;
10665  else n = (int)(1+4*OSRand());
10666 
10668 
10669  for (int i = 0; i < n; i++)
10670  {
10672  enumeration[i]->setRandom(density, conformant, 0, 4);
10673  }
10674  }
10675  }
10676 
10677 
10678  return true;
10679 }//OtherConstraintResult::setRandom
10680 
10681 
10682 bool OtherConResult::setRandom(double density, bool conformant)
10683 {
10684 #ifndef NDEBUG
10685  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherConResult");
10686 #endif
10687  this->idx = (int)(5*OSRand());
10688  if (OSRand() <= 0.5) this->value = "random string";
10689  else this->value = "";
10690 
10691  if (OSRand() <= density) this->name = "random string";
10692 
10693  return true;
10694 }//OtherConResult::setRandom
10695 
10696 
10697 bool OtherSolutionResults::setRandom(double density, bool conformant)
10698 {
10699 #ifndef NDEBUG
10700  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherSolutionResults");
10701 #endif
10703 
10704  int n;
10705 
10706  if (conformant) n = this->numberOfOtherSolutionResults;
10707  else n = (int)(4*OSRand());
10708 
10710 
10711  for (int i = 0; i < n; i++)
10712  {
10714  otherSolutionResult[i]->setRandom(density, conformant);
10715  }
10716 
10717  return true;
10718 }//OtherSolutionResults::setRandom
10719 
10720 bool OtherSolutionResult::setRandom(double density, bool conformant)
10721 {
10722 #ifndef NDEBUG
10723  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherSolutionResult");
10724 #endif
10725  name = "random string";
10726  numberOfItems = (int) (4*OSRand());
10727 
10728  if (OSRand() <= density) category = "random string";
10729  if (OSRand() <= density) description = "random string";
10730 
10731  int n;
10732 
10733  if (conformant) n = this->numberOfItems;
10734  else n = (int)(1+4*OSRand());
10735 
10736  if (n > 0 || OSRand() <= density)
10737  {
10738  item = new std::string[n];
10739 
10740  for (int i = 0; i < n; i++)
10741  item[i] = "random string";
10742  }
10743 
10744  return true;
10745 }//OtherSolutionResult::setRandom
10746 
10747 
10748 bool OtherSolverOutput::setRandom(double density, bool conformant)
10749 {
10750 #ifndef NDEBUG
10751  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random OtherSolverOutput");
10752 #endif
10753  int n;
10754 
10755  this->numberOfSolverOutputs = (int)(1+4*OSRand());
10756 
10757  if (conformant) n = this->numberOfSolverOutputs;
10758  else n = (int)(1+4*OSRand());
10759 
10760  solverOutput = new SolverOutput*[n];
10761 
10762  for (int i = 0; i < n; i++)
10763  {
10764  solverOutput[i] = new SolverOutput();
10765  solverOutput[i]->setRandom(density, conformant);
10766  }
10767 
10768  return true;
10769 }//OtherSolverOutput::setRandom
10770 
10771 
10772 bool SolverOutput::setRandom(double density, bool conformant)
10773 {
10774 #ifndef NDEBUG
10775  osoutput->OSPrint(ENUM_OUTPUT_AREA_OSResult, ENUM_OUTPUT_LEVEL_trace, "Set random SolverOutput");
10776 #endif
10777  name = "random string";
10778  numberOfItems = (int) (4*OSRand());
10779 
10780  if (OSRand() <= density) category = "random string";
10781  if (OSRand() <= density) description = "random string";
10782 
10783  int n;
10784 
10785  if (conformant) n = this->numberOfItems;
10786  else n = (int)(1+4*OSRand());
10787 
10788  if (n > 0 || OSRand() <= density)
10789  {
10790  item = new std::string[n];
10791 
10792  for (int i = 0; i < n; i++)
10793  item[i] = "random string";
10794  }
10795 
10796  return true;
10797 }//SolverOutput::setRandom
The VariableValuesString Class.
Definition: OSResult.h:1011
bool IsEqual(OtherVarResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8757
bool setUsedDiskSpaceUnit(std::string unit)
Set the unit in which used disk space is measured.
Definition: OSResult.cpp:4570
OptimizationSolutionStatus * status
status is a pointer to an OptimizationSolutionStatus object associated with this optimization solutio...
Definition: OSResult.h:2283
std::string unit
the unit in which CPU speed is measured
Definition: OSGeneral.h:817
double * values
OtherSolutionResult ** other
a pointer to the array of &lt;other&gt; children
Definition: OSResult.h:2082
int getObjectiveNumber()
Get objective number.
Definition: OSResult.cpp:2013
std::string getVarValueStringName(int solIdx, int varIdx)
Definition: OSResult.cpp:2273
bool verifySolutionSubstatusType(std::string type)
Definition: OSParameters.h:547
VariableValues()
Default constructor.
Definition: OSResult.cpp:428
bool IsEqual(SolverOutput *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9616
std::string getAvailableCPUSpeedUnit()
Definition: OSResult.cpp:1647
~OSResult()
Class destructor.
Definition: OSResult.cpp:1402
bool setAvailableMemoryUnit(std::string unit)
Set the unit in which available memory is measured.
Definition: OSResult.cpp:4248
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9877
std::string getOtherObjectiveResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3269
std::string getGeneralMessage()
Get the general message.
Definition: OSResult.cpp:1520
GeneralStatus * getGeneralStatus()
Get the general status.
Definition: OSResult.cpp:1473
double getTimingInfoValue(int idx)
Definition: OSResult.cpp:1863
bool setOtherJobResultDescription(int idx, std::string description)
Set the job otherResult description.
Definition: OSResult.cpp:4701
bool IsEqual(ServiceResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7874
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10160
int m_iVariableNumber
m_iVariableNumber holds the variable number.
Definition: OSResult.h:2614
int getNumberOfOtherObjectiveResults(int solIdx)
Definition: OSResult.cpp:3094
std::string description
the description of the other result
Definition: OSResult.h:174
bool weightedObjectives
a marker to track whether the objectives are weighted
Definition: OSResult.h:2278
bool IsEqual(VarValueString *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8617
int getOtherConstraintResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3792
bool setNumberOfObjValues(int solIdx, int numberOfObj)
Set the number of objectives to be given a value.
Definition: OSResult.cpp:5719
std::string description
Further description on the timer used.
Definition: OSResult.h:563
std::string getDualValueName(int solIdx, int objIdx)
Definition: OSResult.cpp:3474
OtherConstraintResult ** other
a pointer to an array of other pointer objects for constraint functions
Definition: OSResult.h:1879
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10284
The TimingInformation Class.
Definition: OSResult.h:604
bool setOtherObjectiveResultName(int solIdx, int otherIdx, std::string name)
Set the name of another (non-standard/solver specific) objective-related result, for the [i]th soluti...
Definition: OSResult.cpp:5958
OtherSolverOutput()
Default constructor.
Definition: OSResult.cpp:1307
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10720
std::string getTimingInfoDescription(int idx)
Definition: OSResult.cpp:1853
bool setGeneralStatusDescription(std::string description)
Set the general status description.
double getDualValue(int solIdx, int conIdx)
Definition: OSResult.cpp:3489
bool verifyCPUSpeedUnit(std::string unit)
Definition: OSParameters.h:192
int getOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx)
Definition: OSResult.cpp:3189
The GeneralSubstatus Class.
Definition: OSResult.h:54
std::vector< IndexValuePair * > primalVals
Definition: OSResult.h:2642
bool setDualValue(int solIdx, int number, int idx, std::string name, double val)
Set a dual value.
Definition: OSResult.cpp:6379
bool setSolutionStatus(int solIdx, std::string type, std::string description)
Set the [i]th optimization solution status, where i equals the given solution index.
std::string name
optional name
Definition: OSResult.h:1395
The OtherResults Class.
Definition: OSResult.h:216
double getUsedDiskSpaceValue()
Definition: OSResult.cpp:1887
bool setJobEndTime(std::string endTime)
Set the time when the job finished.
Definition: OSResult.cpp:4475
std::string description
additional description about the storage
Definition: OSGeneral.h:762
int numberOfVar
the number of variable values that are in the solution
Definition: OSResult.h:907
std::string value
value is a value associated with the constraint indexed by idx, for example value might be the value ...
Definition: OSResult.h:1724
int getNumberOfOtherGeneralResults()
Get the number of other results in the &lt;general&gt; element.
Definition: OSResult.cpp:1562
std::string getOtherServiceResultName(int idx)
Definition: OSResult.cpp:1756
bool setPrimalVariableValuesDense(int solIdx, double *x)
Set the [i]th optimization solution&#39;s primal variable values, where i equals the given solution index...
Definition: OSResult.cpp:5001
int getDualValueIdx(int solIdx, int conIdx)
Definition: OSResult.cpp:3459
OtherResults * otherResults
a pointer to the OtherResults class
Definition: OSResult.h:700
bool setAnOtherSolutionResult(int solIdx, std::string name, std::string value, std::string category, std::string description, int numberOfItems, std::string *item)
Set another solution result of solution [i].
Definition: OSResult.cpp:7344
std::string value
this element allows a specific value associated with this particular type of result ...
Definition: OSResult.h:1787
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10682
std::string getGeneralStatusType()
Get the general status type, which can be: success, error, warning.
Definition: OSResult.cpp:1479
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10216
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10404
double getObjValue(int solIdx, int objIdx)
Definition: OSResult.cpp:3050
bool IsEqual(ObjectiveValues *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8870
double value
value is a double that holds the value of the entity
Definition: OSGeneral.h:638
TimeMeasurement()
Default constructor.
Definition: OSResult.cpp:255
std::string getGeneralSubstatusName(int i)
Get the i_th general substatus name.
Definition: OSResult.cpp:1500
MatrixProgrammingSolution()
The MatrixProgramming class constructor.
Definition: OSResult.cpp:1123
const OSSmartPtr< OSOutput > osoutput
Definition: OSOutput.cpp:39
std::string scheduledStartTime
the time when the job was supposed to start
Definition: OSResult.h:670
std::string getSolutionStatusType(int solIdx)
Get the [i]th optimization solution status type, where i equals the given solution index...
Definition: OSResult.cpp:2051
StorageCapacity * usedMemory
a pointer to the MemorySize class
Definition: OSResult.h:688
std::string type
type of the result value (integer, double, boolean, string)
Definition: OSResult.h:1147
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:1511
bool setOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx, std::string value)
Set the value of another (non-standard/solver specific) objective-related result, for the [i]th solut...
Definition: OSResult.cpp:6141
bool setAvailableMemoryDescription(std::string description)
Set the description of available memory.
Definition: OSResult.cpp:4257
int numberOfOtherMatrixProgrammingResults
the number of &lt;other&gt; child elements&gt;
Definition: OSResult.h:2079
int getSolverOutputNumberOfItems(int otherIdx)
Definition: OSResult.cpp:4027
std::string getOtherGeneralResultValue(int idx)
Definition: OSResult.cpp:1579
ObjectiveValues()
Default constructor.
Definition: OSResult.cpp:638
bool IsEqual(OptimizationSolution *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8175
~ObjectiveSolution()
Class destructor.
Definition: OSResult.cpp:744
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10630
bool setOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfCon)
Set the number of &lt;enumeration&gt; children of another (non-standard/solver specific) constraint-related...
Definition: OSResult.cpp:6447
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9803
int numberOfOtherObjectiveResults
the number of types of objective function results other than the basic objective function values ...
Definition: OSResult.h:1544
TimingInformation * timingInformation
a pointer to the TimingInformation class
Definition: OSResult.h:679
bool setAvailableMemoryValue(double value)
Set the amount of available memory.
Definition: OSResult.cpp:4265
std::string category
this element allows a specific category to be associated with this particular type of result ...
Definition: OSResult.h:2149
std::string getOtherObjectiveResultValue(int solIdx, int otherIdx)
Definition: OSResult.cpp:3141
std::string value
this element allows a specific value associated with this particular type of result ...
Definition: OSResult.h:1144
bool IsEqual(CPUSpeed *that)
A function to check for the equality of two objects.
Definition: OSGeneral.cpp:1462
Time()
Default constructor.
Definition: OSResult.cpp:150
bool IsEqual(OptimizationResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8112
int getOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx)
Definition: OSResult.cpp:3173
OtherOptionOrResultEnumeration ** enumeration
the enumeration.
Definition: OSResult.h:1970
bool setHeader(std::string name, std::string source, std::string fileCreator, std::string description, std::string licence)
A function to populate an instance of the result header element.
Definition: OSResult.cpp:4052
bool setJobSubmitTime(std::string submitTime)
Set the time when the job was submitted.
Definition: OSResult.cpp:4454
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:1415
The OptimizationResult Class.
Definition: OSResult.h:2473
The SolverOutput Class.
Definition: OSResult.h:2354
int numberOfOtherMatrixVariableResults
numberOfOtherMatrixVariableResults gives the number of &lt;other&gt; children
Definition: OSResult.h:1996
std::string description
a brief description of the type of result
Definition: OSResult.h:1469
bool setOtherGeneralResultName(int idx, std::string name)
Set the general otherResult name.
Definition: OSResult.cpp:4186
a data structure to represent the constant elements in a MatrixType object
Definition: OSMatrix.h:749
std::string getUsedDiskSpaceDescription()
Definition: OSResult.cpp:1880
bool setUsedCPUSpeedValue(double value)
Set the used CPU speed.
Definition: OSResult.cpp:4640
bool setOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx, std::string item)
Set one item associated with the [j]th other solution result of solution [i].
Definition: OSResult.cpp:7326
int getOtherVariableResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:2727
bool setNumberOfSolutionSubstatuses(int solIdx, int num)
Set the [i]th optimization solution&#39;s number of substatus elements.
Definition: OSResult.cpp:4810
A commonly used structure holding an index-value pair.
Definition: OSGeneral.h:630
int numberOfVar
the number of string-valued variable values that are in the solution
Definition: OSResult.h:1017
std::string getAvailableMemoryDescription()
Definition: OSResult.cpp:1633
ObjValue ** obj
obj is a pointer to an array of ObjValue objects that give an index and objective function value for ...
Definition: OSResult.h:1344
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10323
bool setServiceName(std::string serviceName)
Set service name.
std::string description
a brief description of the type of result
Definition: OSResult.h:2152
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
Definition: OSParameters.h:599
int idx
idx is the index on variable in the solution
Definition: OSResult.h:852
std::string getOtherVariableResultDescription(int solIdx, int otherIdx)
Definition: OSResult.cpp:2536
int numberOfEl
Definition: OSGeneral.h:483
int getOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx)
Definition: OSResult.cpp:2568
The ObjectiveValues Class.
Definition: OSResult.h:1332
OtherSolutionResults * otherSolutionResults
otherSolutionResults is a pointer to an OtherSolutionResults object that is associated with this opti...
Definition: OSResult.h:2311
bool setUsedDiskSpaceDescription(std::string description)
Set the description of used disk space.
Definition: OSResult.cpp:4580
bool setOtherConstraintResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6601
bool setNumberOfSolverOutputs(int numberOfSolverOutputs)
Set the number of other solver outputs.
Definition: OSResult.cpp:7406
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
Definition: OSMatrix.h:76
int numberOfColumns
Definition: OSMatrix.h:1905
OtherObjResult()
Default constructor.
Definition: OSResult.cpp:667
bool setVariableNumber(int variableNumber)
Set the variable number.
Definition: OSResult.cpp:4712
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10593
std::string errormsg
errormsg is the error that is causing the exception to be thrown
Definition: OSErrorClass.h:42
bool IsEqual(OptimizationSolutionStatus *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8272
int currentJobCount
the number of jobs currently running
Definition: OSResult.h:423
bool verifyStorageUnit(std::string unit)
Definition: OSParameters.h:224
bool setSolutionSubstatusType(int solIdx, int substatusIdx, std::string type)
Set the solution substatus type.
Definition: OSResult.cpp:4839
int idx
idx is the index on variable in the solution
Definition: OSResult.h:961
bool setOtherServiceResultValue(int idx, std::string value)
Set the service otherResult value.
Definition: OSResult.cpp:4425
bool setUsedCPUSpeedUnit(std::string unit)
Set the unit in which used CPU speed is measured.
Definition: OSResult.cpp:4622
std::string description
the description of the substatus
Definition: OSResult.h:63
std::string getAvailableDiskSpaceDescription()
Definition: OSResult.cpp:1612
OtherOptionOrResultEnumeration ** enumeration
Definition: OSResult.h:1171
int getNumberOfVarValues(int solIdx)
Definition: OSResult.cpp:2161
double getUsedMemoryValue()
Definition: OSResult.cpp:1908
int getNumberOfDualValues(int solIdx)
Definition: OSResult.cpp:3446
std::string solver
the solver of the result value
Definition: OSResult.h:1472
DualVarValue ** con
con is a vector of DualVarValue objects that give an index and dual variable value for each constrain...
Definition: OSResult.h:1666
MatrixVariableSolution()
The MatrixVariableSolution class constructor.
Definition: OSResult.cpp:958
bool setMatrixVariablesOtherResultMatrixAttributes(int solIdx, int otherIdx, int matrixVarIdx, int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry=ENUM_MATRIX_SYMMETRY_none, ENUM_MATRIX_TYPE type=ENUM_MATRIX_TYPE_unknown, std::string name="")
A method to set attributes for a matrixVar in the [j]th other result associated with matrix variables...
Definition: OSResult.cpp:6979
bool setOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfObj)
Set the number of &lt;enumeration&gt; children of another (non-standard/solver specific) objective-related ...
Definition: OSResult.cpp:5937
DualVariableValues * dualValues
a pointer to an array of DualVariableValues objects
Definition: OSResult.h:1871
bool setSolutionTargetObjectiveName(int solIdx, std::string objectiveName)
Set the [i]th optimization solution&#39;s objective name, where i equals the given solution index...
Definition: OSResult.cpp:4887
to represent the nonzeros in a constantMatrix element
Definition: OSMatrix.h:501
~GeneralResult()
Class destructor.
Definition: OSResult.cpp:142
std::string getOtherObjectiveResultDescription(int solIdx, int otherIdx)
Definition: OSResult.cpp:3157
bool setUsedCPUSpeedDescription(std::string description)
Set the description of used CPU speed.
Definition: OSResult.cpp:4632
std::string value
this element allows a specific value associated with this particular type of result ...
Definition: OSResult.h:1463
~JobResult()
Class destructor.
Definition: OSResult.cpp:322
bool IsEqual(OtherResults *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7705
bool IsEqual(GeneralSubstatus *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7654
bool setOtherObjectiveResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6053
bool setNumberOfPrimalVariableValues(int solIdx, int n)
Set the [i]th optimization solution&#39;s number of primal variable values, where i equals the given solu...
Definition: OSResult.cpp:4933
std::string message
a message associated with this solution
Definition: OSResult.h:2286
std::string getOtherSolutionResultDescription(int solIdx, int otherIdx)
Definition: OSResult.cpp:3943
bool setMatrixVarValuesBlockElements(int solIdx, int idx, int blkno, int blkRowIdx, int blkColIdx, int nz, int *start, int *index, MatrixElementValues *value, ENUM_MATRIX_TYPE valueType, ENUM_MATRIX_SYMMETRY symmetry=ENUM_MATRIX_SYMMETRY_none, bool rowMajor=false)
A method to set the elements within a block of a matrixVar in the [i]th optimization solution...
Definition: OSResult.cpp:6789
std::vector< IndexValuePair * > getOptimalPrimalVariableValues(int solIdx)
Get one solution of optimal primal variable values.
Definition: OSResult.cpp:2215
bool setOtherSolutionResultDescription(int solIdx, int otherIdx, std::string description)
Set the description associated with the [j]th other solution result of solution [i].
Definition: OSResult.cpp:7292
bool setNumberOfTimes(int numberOfTimes)
Set the number of time measurements and initial the time array.
Definition: OSResult.cpp:4542
std::string unit
The unit of time (tick/millisecond/second/minute/hour/day/week/month/year)
Definition: OSResult.h:240
std::string getOtherSolutionResultName(int solIdx, int otherIdx)
Definition: OSResult.cpp:3898
bool setSolverOutputCategory(int otherIdx, std::string category)
Set the category associated with the [j]th solver output.
Definition: OSResult.cpp:7436
int getNumberOfOtherConstraintResults(int solIdx)
Definition: OSResult.cpp:3536
std::string systemInformation
a string containing some basic system information
Definition: OSResult.h:354
int numberOfSubstatuses
the number of substatuses
Definition: OSResult.h:111
JobResult * job
job holds the fourth child of the OSResult specified by the OSrL Schema.
Definition: OSResult.h:2576
bool setOtherConstraintResultNumberOfCon(int solIdx, int otherIdx, int numberOfCon)
Set the number of &lt;con&gt; children of another (non-standard/solver specific) constraint-related result...
Definition: OSResult.cpp:6424
The Result Class.
Definition: OSResult.h:2548
GeneralFileHeader * resultHeader
header information
Definition: OSResult.h:2556
DualVarValue()
Default constructor.
Definition: OSResult.cpp:772
bool setSolutionStatusDescription(int solIdx, std::string description)
Set the [i]th optimization solution status description.
Definition: OSResult.cpp:4791
bool setSolutionStatusType(int solIdx, std::string type)
Set the [i]th optimization solution status type.
Definition: OSResult.cpp:4773
bool IsEqual(OtherConstraintResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9285
int numberOfSubstatuses
the number of substatus objects
Definition: OSResult.h:797
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10554
bool IsEqual(VariableValues *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8454
~OptimizationSolution()
Class destructor.
Definition: OSResult.cpp:1238
std::string getOtherServiceResultDescription(int idx)
Definition: OSResult.cpp:1776
std::string description
a brief description of the type of result
Definition: OSResult.h:1793
ServiceResult()
Default constructor.
Definition: OSResult.cpp:206
int getNumberOfTimes()
Definition: OSResult.cpp:1816
int getBasisInformationDense(int solIdx, int object, int *resultArray, int dim)
Get the basis information associated with the variables, objectives or constraints for some solution...
Definition: OSResult.cpp:2374
bool setJobStatus(std::string status)
Set the job status.
Definition: OSResult.cpp:4445
bool setCurrentState(std::string currentState)
Set the current state of the service.
Definition: OSResult.cpp:4361
GeneralResult * general
general holds the first child of the OSResult specified by the OSrL Schema.
Definition: OSResult.h:2561
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9698
ServiceResult * service
service holds the third child of the OSResult specified by the OSrL Schema.
Definition: OSResult.h:2571
bool setNumberOfOtherSolutionResults(int solIdx, int numberOfOtherSolutionResults)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific) solution-related results...
Definition: OSResult.cpp:7220
OtherResults * otherResults
a pointer to the OtherResults class
Definition: OSResult.h:307
bool IsEqual(BasisStatus *that)
A function to check for the equality of two objects.
Definition: OSGeneral.cpp:1213
bool setSolverInvoked(std::string solverInvoked)
Set solver invoked.
Definition: OSResult.cpp:4155
int getCurrentJobCount()
Definition: OSResult.cpp:1725
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10772
double value
the number of units
Definition: OSGeneral.h:932
ObjectiveSolution()
Default constructor.
Definition: OSResult.cpp:732
bool setOtherOptionOrResultEnumeration(int solIdx, int otherIdx, int object, int enumIdx, std::string value, std::string description, int *i, int ni)
Set the value and corresponding indices of another (non-standard/solver specific) variable-related re...
Definition: OSResult.cpp:5631
int value
the number of CPUs
Definition: OSGeneral.h:879
bool setOtherObjectiveResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6015
std::string getUsedMemoryUnit()
Definition: OSResult.cpp:1894
bool setTime(double time)
Set time.
Definition: OSResult.cpp:4482
~MatrixObjectiveSolution()
The MatrixVariableSolution class destructor.
Definition: OSResult.cpp:1068
GeneralResult()
Default constructor.
Definition: OSResult.cpp:125
The OtherResult Class.
Definition: OSResult.h:162
std::string getSolverOutputCategory(int otherIdx)
Definition: OSResult.cpp:4007
The OptimizationSolution Class.
Definition: OSResult.h:2263
std::string targetObjectiveName
an optional name of the objective function for which we are reporting solution information ...
Definition: OSResult.h:2275
ENUM_MATRIX_TYPE type
To track the type of values present in the matrix or block.
Definition: OSMatrix.h:1902
bool setAnOtherVariableResultSparse(int solIdx, int otherIdx, std::string name, std::string value, std::string description, int *idx, std::string *s, int n)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific)variable-related results...
std::string type
type of the result value (integer, double, boolean, string)
Definition: OSResult.h:1466
VarValueString Class.
Definition: OSResult.h:956
std::string type
type of the result value (integer, double, boolean, string)
Definition: OSResult.h:1790
std::string getOtherJobResultDescription(int idx)
Definition: OSResult.cpp:1977
int getOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx)
Definition: OSResult.cpp:3631
std::string value
the value of the other result
Definition: OSResult.h:171
int getOtherSolutionResultNumberOfItems(int solIdx, int otherIdx)
Definition: OSResult.cpp:3958
bool setOtherConstraintResultSolver(int solIdx, int otherIdx, std::string solver)
Set the solver of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6582
The ConstraintSolution Class.
Definition: OSResult.h:1860
GeneralSubstatus()
Default constructor.
Definition: OSResult.cpp:34
bool setGeneralStatus(GeneralStatus *status)
Set the general status.
Definition: OSResult.cpp:4060
OptimizationResult * optimization
optimization holds the fifth child of the OSResult specified by the OSrL Schema.
Definition: OSResult.h:2581
bool setAvailableCPUSpeedDescription(std::string description)
Set the description of available CPU speed.
Definition: OSResult.cpp:4282
a data structure to represent the nonzeroes of a matrix in a blockwise fashion. Each block can be giv...
Definition: OSMatrix.h:1449
std::string getTimeServiceStarted()
Definition: OSResult.cpp:1737
std::string getAvailableMemoryUnit()
Definition: OSResult.cpp:1626
~TimeMeasurement()
Class destructor.
Definition: OSResult.cpp:267
DualVariableValues()
Default constructor.
Definition: OSResult.cpp:793
~MatrixConstraintSolution()
The MatrixConstraintSolution class destructor.
Definition: OSResult.cpp:1101
The OtherConstraintResult Class.
Definition: OSResult.h:1767
std::string description
additional description about the CPU speed
Definition: OSGeneral.h:820
bool setOtherJobResultName(int idx, std::string name)
Set the job otherResult name.
Definition: OSResult.cpp:4681
a data structure to represent a MatrixBlock object (derived from MatrixType)
Definition: OSMatrix.h:2500
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition: OSMatrix.h:321
double getOptimalObjValue(int objIdx, int solIdx)
Get one solution&#39;s optimal objective value.
Definition: OSResult.cpp:3065
bool setGeneralSubstatusName(int idx, std::string name)
Set the general substatus name.
Definition: OSResult.cpp:4102
bool setSolutionTargetObjectiveIdx(int solIdx, int objectiveIdx)
Set the [i]th optimization solution&#39;s objective index, where i equals the given solution index...
Definition: OSResult.cpp:4870
bool IsEqual(JobResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7934
~OtherResult()
Class destructor.
Definition: OSResult.cpp:90
bool getSolutionWeightedObjectives(int solIdx)
Get the [i]th optimization solution form of the objective.
Definition: OSResult.cpp:2130
SystemResult()
Default constructor.
Definition: OSResult.cpp:159
std::string matrixType
the type of matrixVar
Definition: OSResult.h:1956
SystemResult * system
system holds the second child of the OSResult specified by the OSrL Schema.
Definition: OSResult.h:2566
std::vector< IndexValuePair * > getOptimalDualVariableValues(int solIdx)
Get one solution of optimal dual variable values.
Definition: OSResult.cpp:3504
std::string varType
type of the values in the var array
Definition: OSResult.h:1165
bool setDualVariableValuesDense(int solIdx, double *y)
Set the [i]th optimization solution&#39;s dual variable values, where i equals the given solution index...
Definition: OSResult.cpp:6291
int idx
idx is the index on a objective function
Definition: OSResult.h:1392
OtherVariableResult()
Default constructor.
Definition: OSResult.cpp:524
bool setAnOtherVariableResultDense(int solIdx, int otherIdx, std::string name, std::string value, std::string description, std::string *s)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific)variable-related results...
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10197
int idx
idx is the index on the constraint
Definition: OSResult.h:1714
std::string value
value is a value associated with an objective function indexed by idx
Definition: OSResult.h:1400
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
Definition: OSMatrix.h:50
OtherResults()
Default constructor.
Definition: OSResult.cpp:98
bool setUsedMemoryValue(double value)
Set the amount of used memory.
Definition: OSResult.cpp:4614
bool setNumberOfDualValues(int solIdx, int numberOfCon)
Set the number of constraints to be given a value.
Definition: OSResult.cpp:6185
bool setServiceURI(std::string serviceURI)
Set service uri.
std::string getOtherVariableResultName(int solIdx, int otherIdx)
Definition: OSResult.cpp:2488
int getOtherConstraintResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3765
std::string description
a brief description of the type of result
Definition: OSResult.h:1150
bool setObjectiveNumber(int objectiveNumber)
Set the objective number.
Definition: OSResult.cpp:4721
~OtherVariableResult()
Class destructor.
Definition: OSResult.cpp:543
bool IsEqual(OtherResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7759
bool IsEqual(OtherSolutionResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9480
int numberOfMatrixVar
numberOfMatrixVar gives the number of &lt;matrixVar&gt; children
Definition: OSResult.h:1918
BasisStatus * basisStatus
a pointer to a BasisStatus object
Definition: OSResult.h:1550
bool setInstanceName(std::string instanceName)
Set instance name.
The OptimizationSolutionSubstatus Class.
Definition: OSResult.h:743
std::string value
the value associated with the result the user is defining
Definition: OSResult.h:2144
double OSRand()
OSRand()
Definition: OSMathUtil.cpp:262
bool setNumberOfObjectiveValues(int solIdx, int n)
Set the [i]th optimization solution&#39;s number of objective values, where i equals the given solution i...
Definition: OSResult.cpp:5754
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10469
int getBasisDense(int *resultArray, int dim, bool flipIdx)
Get the entire array of basis status in dense form.
Definition: OSGeneral.cpp:1091
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL ...
Definition: OSMatrix.h:2336
double getTimeValue()
Get the time measurement.
Definition: OSResult.cpp:1987
bool setSolutionMessage(int solIdx, std::string msg)
Set the [i]th optimization solution&#39;s message, where i equals the given solution index.
Definition: OSResult.cpp:4917
The ServiceResult Class.
Definition: OSResult.h:415
bool setTimeNumber(int timeNumber)
Set the number of time measurements.
Definition: OSResult.cpp:4560
bool setOtherSystemResultValue(int idx, std::string value)
Set the system otherResult value.
Definition: OSResult.cpp:4341
bool setAvailableCPUSpeedUnit(std::string unit)
Set the unit in which available CPU speed is measured.
Definition: OSResult.cpp:4273
bool IsEqual(SystemResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7812
The in-memory representation of the &lt;matrixVariables&gt; element.
Definition: OSResult.h:1914
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10389
std::string name
the name of the result the user is defining
Definition: OSResult.h:2141
OSResult()
Default constructor.
Definition: OSResult.cpp:1382
~VariableSolution()
Class destructor.
Definition: OSResult.cpp:584
CPUNumber * usedCPUNumber
a pointer to the CPUNumber class
Definition: OSResult.h:696
int getNumberOfOtherJobResults()
Definition: OSResult.cpp:1950
bool setOtherVariableResultVarType(int solIdx, int otherIdx, std::string varType)
Set the varType of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:5471
~DualVarValue()
Class destructor.
Definition: OSResult.cpp:785
~GeneralStatus()
Class destructor.
Definition: OSResult.cpp:62
CPUSpeed * usedCPUSpeed
a pointer to the CPUSpeed class
Definition: OSResult.h:692
bool setNumberOfOtherGeneralResults(int num)
Set number of other general results.
Definition: OSResult.cpp:4169
~OtherConstraintResult()
Class destructor.
Definition: OSResult.cpp:860
CPUSpeed * availableCPUSpeed
a pointer to the CPUSpeed class
Definition: OSResult.h:366
std::string name
Gives a name to this result.
Definition: OSResult.h:1943
OtherResult()
Default constructor.
Definition: OSResult.cpp:80
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9737
std::string endTime
the time when the job finished
Definition: OSResult.h:676
double getAvailableCPUSpeedValue()
Definition: OSResult.cpp:1661
~OtherObjResult()
Class destructor.
Definition: OSResult.cpp:678
a data structure that holds general information about files that conform to one of the OSxL schemas ...
Definition: OSGeneral.h:32
bool setOtherSolutionResultNumberOfItems(int solIdx, int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th other solution result of solution [i]...
Definition: OSResult.cpp:7307
bool setPrimalVariableValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution&#39;s primal variable values, where i equals the given solution index...
Definition: OSResult.cpp:4962
The ObjValue Class.
Definition: OSResult.h:1281
ObjectiveSolution * objectives
objectives holds the solution information for the objectives
Definition: OSResult.h:2300
double getAvailableMemoryValue()
Definition: OSResult.cpp:1640
OtherObjectiveResult()
Default constructor.
Definition: OSResult.cpp:686
std::string enumType
type of the values in the enumeration array
Definition: OSResult.h:1817
std::string getOtherServiceResultValue(int idx)
Definition: OSResult.cpp:1766
bool verifySystemCurrentState(std::string status)
Definition: OSParameters.h:420
bool IsEqual(ObjectiveSolution *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8810
std::string getUsedMemoryDescription()
Definition: OSResult.cpp:1901
static char * j
Definition: OSdtoa.cpp:3622
std::string getOtherConstraintResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3738
OtherSolutionResult ** otherSolutionResult
otherSolutionResult is a pointer to an array of OtherSolutionResult objects
Definition: OSResult.h:2215
bool IsEqual(GeneralStatus *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7597
ENUM_MATRIX_SYMMETRY
Definition: OSParameters.h:735
int getOtherObjectiveResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3325
int numberOfVar
the number of variables which have values for this particular type of result
Definition: OSResult.h:1131
std::string enumType
the type of the enumeration
Definition: OSResult.h:1965
int m_iObjectiveNumber
m_iObjectiveNumber holds the objective number.
Definition: OSResult.h:2619
std::string name
optional name
Definition: OSResult.h:1717
bool setSystemInformation(std::string systemInformation)
Set the system information.
Definition: OSResult.cpp:4216
std::string timeServiceStarted
the time when the service was started
Definition: OSResult.h:429
std::string getGeneralStatusDescription()
Get the general status description.
Definition: OSResult.cpp:1486
bool setVarValueString(int solIdx, int number, int idx, std::string name, std::string str)
Set a string-valued primal variable value.
Definition: OSResult.cpp:5147
int getOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx)
Definition: OSResult.cpp:2607
~OtherConResult()
Class destructor.
Definition: OSResult.cpp:833
std::string actualStartTime
the time when the job actually started
Definition: OSResult.h:673
bool setNumberOfOtherConstraintResults(int solIdx, int numberOfOtherConstraintResults)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific) constraint-related results...
Definition: OSResult.cpp:6156
std::string getOtherVariableResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:2646
bool setOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx, int idx)
Set the index of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6620
The OtherSolverOutput Class.
Definition: OSResult.h:2419
bool IsEqual(OtherConResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9373
bool verifyTimeUnit(std::string unit)
Definition: OSParameters.h:256
The OptimizationSolutionStatus Class.
Definition: OSResult.h:792
std::string getTimingInfoType(int idx)
Definition: OSResult.cpp:1833
bool setHeader(std::string name, std::string source, std::string description, std::string fileCreator, std::string licence)
A function to populate an instance of this class.
Definition: OSGeneral.cpp:133
std::string getSystemInformation()
Definition: OSResult.cpp:1599
std::string solver
the solver of the result value
Definition: OSResult.h:1796
std::string getActualStartTime()
Definition: OSResult.cpp:1804
std::string getJobSubmitTime()
Definition: OSResult.cpp:1792
int getNumberOfOtherSolutionResults(int solIdx)
Definition: OSResult.cpp:3886
std::string getOtherVariableResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the or &lt;enumeration&gt; array associated with an &lt;other&gt; result for...
Definition: OSResult.cpp:2623
bool setNumberOfVarValues(int solIdx, int numberOfVar)
Set the number of primal variables to be given a value.
Definition: OSResult.cpp:5040
std::string description
other data elements are optional
Definition: OSResult.h:1946
OtherConResult ** con
Definition: OSResult.h:1805
OtherSolutionResult()
Default constructor.
Definition: OSResult.cpp:1164
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:100
std::string getOtherSystemResultName(int idx)
Definition: OSResult.cpp:1689
int numberOfItems
the number of items contained in this otherSolutionResult
Definition: OSResult.h:2156
OtherSolverOutput * otherSolverOutput
otherSolverOutput is a pointer to an OtherSolverOutput object
Definition: OSResult.h:2505
std::string getOtherConstraintResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the &lt;con&gt; or &lt;enumeration&gt; array associated with an &lt;other&gt; resul...
Definition: OSResult.cpp:3670
MatrixConstraintSolution()
The MatrixConstraintSolution class constructor.
Definition: OSResult.cpp:1091
bool IsEqual(CPUNumber *that)
A function to check for the equality of two objects.
Definition: OSGeneral.cpp:1556
bool setGeneralSubstatusDescription(int idx, std::string description)
Set the general substatus description.
Definition: OSResult.cpp:4111
OtherSolutionResults()
Default constructor.
Definition: OSResult.cpp:1190
bool setSolutionNumber(int number)
set the number of solutions.
Definition: OSResult.cpp:4740
std::string objType
type of the values in the obj array
Definition: OSResult.h:1484
double OSNaN()
returns the value for NaN used in OS
std::string getOtherSystemResultDescription(int idx)
Definition: OSResult.cpp:1709
bool setOtherConstraintResultType(int solIdx, int otherIdx, std::string type)
Set the type of another (non-standard/solver specific) constraint-related result, for the [i]th solut...
Definition: OSResult.cpp:6487
int getNumberOfSolverOutputs()
Definition: OSResult.cpp:3991
bool setIntVector(int status, int *i, int ni)
Set the indices for a particular status.
Definition: OSGeneral.cpp:854
fint nres
bool setBasisStatus(int solIdx, int object, int status, int *i, int ni)
Set the basis status of a number of variables/constraints/objectives.
Definition: OSResult.cpp:5192
int numberOfSolverOutputs
the number of elements in the pointer of SolverOutput objects
Definition: OSResult.h:2425
bool setOtherGeneralResultDescription(int idx, std::string description)
Set the general otherResult description.
Definition: OSResult.cpp:4206
double * m_mdPrimalValues
m_mdPrimalValues a vector of primal variables.
Definition: OSResult.h:2634
std::vector< IndexValuePair * > dualVals
Definition: OSResult.h:2644
bool setScheduledStartTime(std::string scheduledStartTime)
Set the job&#39;s scheduled start time.
Definition: OSResult.cpp:4461
bool setConstraintValuesDense(int solIdx, double *constraintValues)
Set the [i]th optimization solution&#39;s constraint values, where i equals the given solution index...
Definition: OSResult.cpp:6335
~ConstraintSolution()
Class destructor.
Definition: OSResult.cpp:901
std::string getServiceName()
Get service name.
Definition: OSResult.cpp:1526
bool IsEqual(TimingInformation *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8005
std::string getOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx)
Definition: OSResult.cpp:3973
int getUsedCPUNumberValue()
Definition: OSResult.cpp:1943
std::string message
any general message associated with the optimization
Definition: OSResult.h:276
int getTotalJobsSoFar()
Definition: OSResult.cpp:1731
bool setOtherObjectiveResultValue(int solIdx, int otherIdx, std::string value)
Set the value of another (non-standard/solver specific) objective-related result, for the [i]th solut...
Definition: OSResult.cpp:6034
OtherVarResult ** var
Definition: OSResult.h:1162
bool setAvailableDiskSpaceUnit(std::string unit)
Set the unit in which available disk space is measured.
Definition: OSResult.cpp:4223
std::string getOtherVariableResultType(int solIdx, int otherIdx)
Definition: OSResult.cpp:2504
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9827
OtherVarResult()
Default constructor.
Definition: OSResult.cpp:504
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9792
std::string getSolutionMessage(int solIdx)
Get the [i]th optimization solution message, where i equals the given solution index.
Definition: OSResult.cpp:2140
int numberOfCon
record the number of constraints for which values are given
Definition: OSResult.h:1660
int getAnOtherVariableResultNumberOfVar(int solIdx, int iOther)
Get getAnOtherVariableResultNumberOfVar.
Definition: OSResult.cpp:2473
int getOtherObjectiveResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3353
int numberOfEnumerations
the number of distinct values for this particular type of result
Definition: OSResult.h:1779
The SystemResult Class.
Definition: OSResult.h:349
int getEl(int status, int j)
Get one entry in the array of indices for a particular status.
Definition: OSGeneral.cpp:1040
std::string description
additional description about the CPU
Definition: OSGeneral.h:876
std::string getOtherObjectiveResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the &lt;obj&gt; or &lt;enumeration&gt; array associated with an &lt;other&gt; resul...
Definition: OSResult.cpp:3246
int getNumberOfObjValues(int solIdx)
Definition: OSResult.cpp:3007
bool setOtherVariableResultName(int solIdx, int otherIdx, std::string name)
Set the name of another (non-standard/solver specific) variable-related result, for the [i]th solutio...
Definition: OSResult.cpp:5433
bool verifySolutionStatus(std::string status)
Definition: OSParameters.h:527
VarValue ** var
a vector of VarValue objects, there will be one for each variable in the solution ...
Definition: OSResult.h:912
bool setOtherConstraintResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6563
VariableSolution * variables
variables holds the solution information for the variables
Definition: OSResult.h:2291
std::string getJobID()
Get the job id.
Definition: OSResult.cpp:1544
The OtherSolutionResult Class.
Definition: OSResult.h:2136
bool setNumberOfOtherSystemResults(int num)
Set number of other system results.
Definition: OSResult.cpp:4314
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9916
double getServiceUtilization()
Definition: OSResult.cpp:1743
std::string getVarValueName(int solIdx, int varIdx)
Definition: OSResult.cpp:2187
MatrixObjectiveSolution()
The MatrixVariableSolution class constructor.
Definition: OSResult.cpp:1058
std::string name
optional name
Definition: OSResult.h:1073
bool setNumberOfOtherVariableResults(int solIdx, int numberOfOtherVariableResults)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific) variable-related results...
Definition: OSResult.cpp:5236
~OptimizationSolutionStatus()
Class destructor.
Definition: OSResult.cpp:390
ObjValue()
Default constructor.
Definition: OSResult.cpp:618
OptimizationResult()
Default constructor.
Definition: OSResult.cpp:1337
bool setObjValue(int solIdx, int number, int idx, std::string name, double val)
Set an objective value.
Definition: OSResult.cpp:5867
std::string getScheduledStartTime()
Definition: OSResult.cpp:1798
int getNumberOfOtherSystemResults()
Definition: OSResult.cpp:1682
int numberOfSolutions
numberOfSolutions is the number of objective functions reported.
Definition: OSResult.h:2480
bool setAvailableCPUNumberDescription(std::string description)
Set the description of available number of CPUs.
Definition: OSResult.cpp:4298
std::string name
the name of the result the user is defining
Definition: OSResult.h:1139
bool verifyTimeCategory(std::string category)
Definition: OSParameters.h:304
int getOtherObjectiveResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of an &lt;obj&gt; array or an &lt;enumeration&gt; associated with an &lt;other&gt; result for some solut...
Definition: OSResult.cpp:3381
std::string getOtherObjectiveResultName(int solIdx, int otherIdx)
Definition: OSResult.cpp:3109
MatrixVariableSolution * matrixVariables
a pointer to the matrixVariables object
Definition: OSResult.h:2085
bool setMatrixVarValuesAttributes(int solIdx, int idx, int matrixVarIdx, int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry=ENUM_MATRIX_SYMMETRY_none, ENUM_MATRIX_TYPE type=ENUM_MATRIX_TYPE_unknown, std::string name="")
A method to set general attributes for a matrixVar in the [i]th optimization solution, where i equals the given solution index.
Definition: OSResult.cpp:6703
int getNumberOfGeneralSubstatuses()
Get the number of substatuses.
Definition: OSResult.cpp:1493
std::string status
job status
Definition: OSResult.h:664
std::string getSolutionSubstatusDescription(int solIdx, int substatusIdx)
Definition: OSResult.cpp:2097
OtherResults * otherResults
a pointer to the OtherResults class
Definition: OSResult.h:374
double getAvailableDiskSpaceValue()
Definition: OSResult.cpp:1619
the CPUSpeed class.
Definition: OSGeneral.h:812
int getBasisStatusNumberOfEl(int solIdx, int object, int status)
Get the number of indices that belong to a particular basis status.
Definition: OSResult.cpp:2301
std::string name
the name of the result the user is defining
Definition: OSResult.h:1458
bool setOtherVariableResultVarName(int solIdx, int otherIdx, int varIdx, std::string name)
Set the name of another (non-standard/solver specific) variable-related result, for the [i]th solutio...
Definition: OSResult.cpp:5601
~OptimizationSolutionSubstatus()
Class destructor.
Definition: OSResult.cpp:370
std::string getAvailableCPUNumberDescription()
Definition: OSResult.cpp:1668
std::string getAvailableDiskSpaceUnit()
Definition: OSResult.cpp:1605
std::string getAvailableCPUSpeedDescription()
Definition: OSResult.cpp:1654
std::string getOtherConstraintResultType(int solIdx, int otherIdx)
Definition: OSResult.cpp:3567
std::string getObjValueName(int solIdx, int objIdx)
Definition: OSResult.cpp:3035
int numberOfTimes
The number of elements in the time array.
Definition: OSResult.h:612
std::string getVarValueString(int solIdx, int varIdx)
Definition: OSResult.cpp:2287
~OtherVarResult()
Class destructor.
Definition: OSResult.cpp:515
VariableValues * values
a pointer to a VariableValues object
Definition: OSResult.h:1227
~MatrixProgrammingSolution()
The MatrixProgramming class destructor.
Definition: OSResult.cpp:1136
bool setUsedMemoryUnit(std::string unit)
Set the unit in which used memory is measured.
Definition: OSResult.cpp:4596
bool IsEqual(DualVarValue *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9233
bool setOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
Set the number of &lt;enumeration&gt; children of another (non-standard/solver specific) variable-related r...
Definition: OSResult.cpp:5412
StorageCapacity * availableMemory
a pointer to the MemorySize class
Definition: OSResult.h:362
OtherMatrixVariableResult()
The standard MatrixVariableValues class constructor.
Definition: OSResult.cpp:992
bool setUsedMemoryDescription(std::string description)
Set the description of used memory.
Definition: OSResult.cpp:4606
std::string getOtherConstraintResultName(int solIdx, int otherIdx)
Definition: OSResult.cpp:3551
bool setOtherVariableResultType(int solIdx, int otherIdx, std::string type)
Set the type of another (non-standard/solver specific) variable-related result, for the [i]th solutio...
Definition: OSResult.cpp:5452
The in-memory representation of the &lt;MatrixVariableSolution&gt; element.
Definition: OSResult.h:1992
std::string enumType
type of the values in the enumeration array
Definition: OSResult.h:1174
SolverOutput()
Default constructor.
Definition: OSResult.cpp:1276
GeneralStatus * generalStatus
a pointer to the GeneralStatus class
Definition: OSResult.h:272
bool setOtherVariableResultValue(int solIdx, int otherIdx, std::string value)
Set the value of another (non-standard/solver specific) variable-related result, for the [i]th soluti...
Definition: OSResult.cpp:5509
std::string name
optional name
Definition: OSResult.h:1606
~MatrixVariableValues()
The MatrixVariableValues class destructor.
Definition: OSResult.cpp:940
int idx
the index of a variable in the solution
Definition: OSResult.h:1070
void fint fint * k
VarValueString()
Default constructor.
Definition: OSResult.cpp:456
The OtherObjResult Class.
Definition: OSResult.h:1387
The GeneralResult Class.
Definition: OSResult.h:266
const double OSDBL_MAX
Definition: OSParameters.h:93
The VariableValues Class.
Definition: OSResult.h:901
bool setOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx, int idx)
Set the index of another (non-standard/solver specific) objective-related result, for the [i]th solut...
Definition: OSResult.cpp:6110
bool setOtherConstraintResultConType(int solIdx, int otherIdx, std::string conType)
Set the conType of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6506
std::string getOtherObjectiveResultType(int solIdx, int otherIdx)
Definition: OSResult.cpp:3125
std::string name
optional name
Definition: OSResult.h:855
int getNumberOfEl(int status)
Get the number of indices for a particular status.
Definition: OSGeneral.cpp:995
int getVarValueStringIdx(int solIdx, int varIdx)
Definition: OSResult.cpp:2259
bool setMatrixVariablesOtherResultBlockStructure(int solIdx, int otherIdx, int matrixVarIdx, int *colOffset, int colOffsetSize, int *rowOffset, int rowOffsetSize, int numberOfBlocks, int blocksConstructorIdx=0)
A method to set the block structure for the values of a matrixVar associated with the [j]th &quot;other&quot; r...
Definition: OSResult.cpp:7021
void fint fint fint fint fint fint fint fint fint fint real real real real real real real real * s
std::string * item
an array of items (string-valued)
Definition: OSResult.h:2160
VarValueString ** var
a vector of VarValueString objects, there will be one for each variable in the solution ...
Definition: OSResult.h:1022
StorageCapacity * usedDiskSpace
a pointer to the DiskSpace class
Definition: OSResult.h:683
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
Definition: OSMatrix.h:70
int numberOfCon
the number of constraints which have values for this particular type of result
Definition: OSResult.h:1774
bool setOtherJobResultValue(int idx, std::string value)
Set the job otherResult value.
Definition: OSResult.cpp:4691
std::string unit
the unit in which storage capacity is measured
Definition: OSGeneral.h:759
double getVarValue(int solIdx, int varIdx)
Definition: OSResult.cpp:2201
int getSolutionNumber()
get the number of solutions.
Definition: OSResult.cpp:2033
bool setOtherSystemResultDescription(int idx, std::string description)
Set the system otherResult description.
Definition: OSResult.cpp:4351
int getSolutionTargetObjectiveIdx(int solIdx)
Definition: OSResult.cpp:2110
bool setGeneralMessage(std::string message)
Set the general message.
int idx
idx holds the index of an entity (such as a variable, constraint, objective) that is part of a sparse...
Definition: OSGeneral.h:635
std::string getOtherGeneralResultDescription(int idx)
Definition: OSResult.cpp:1589
std::string getInstanceName()
Get instance name.
Definition: OSResult.cpp:1538
std::string getTimeStamp()
Get the time stamp.
Definition: OSResult.cpp:1556
static int
Definition: OSdtoa.cpp:2173
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10299
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:1604
TimeMeasurement ** time
An array of time measurements.
Definition: OSResult.h:618
~VariableValues()
Class destructor.
Definition: OSResult.cpp:438
std::string type
the type of solution status
Definition: OSResult.h:800
std::string solverInvoked
the name of the solver used
Definition: OSResult.h:299
bool setOtherServiceResultName(int idx, std::string name)
Set the service otherResult name.
Definition: OSResult.cpp:4415
bool verifyTimeType(std::string type)
Definition: OSParameters.h:276
the CPUNumber class.
Definition: OSGeneral.h:871
bool setGeneralStatusType(std::string type)
Set the general status type, which can be: success, error, warning.
int targetObjectiveIdx
the index of the objective function for which we are reporting solution information ...
Definition: OSResult.h:2270
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10445
std::string timeStamp
a time stamp associated with the process
Definition: OSResult.h:303
bool setUsedCPUNumberValue(int value)
Set the used number of CPUs.
Definition: OSResult.cpp:4656
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10086
bool verifyJobStatus(std::string status)
Definition: OSParameters.h:444
std::string type
the type of status
Definition: OSResult.h:114
int numberOfMatrixVar
number of matrix variables affected by or associated with this result
Definition: OSResult.h:1953
bool setUsedCPUNumberDescription(std::string description)
Set the description of used number of CPUs.
Definition: OSResult.cpp:4648
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10616
std::string solver
the solver of the result value
Definition: OSResult.h:1153
~ObjectiveValues()
Class destructor.
Definition: OSResult.cpp:649
std::string getOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx)
Definition: OSResult.cpp:3208
~ServiceResult()
Class destructor.
Definition: OSResult.cpp:220
int numberOfOtherSolutionResults
the number of elements in the pointer of OtherSolutionResult objects
Definition: OSResult.h:2210
~VarValue()
Class destructor.
Definition: OSResult.cpp:419
ConstraintSolution()
Default constructor.
Definition: OSResult.cpp:889
bool setOtherSolutionResultValue(int solIdx, int otherIdx, std::string value)
Set the value associated with the [j]th other solution result of solution [i].
Definition: OSResult.cpp:7263
The VariableSolution Class.
Definition: OSResult.h:1217
std::string name
the name of the result the user is defining
Definition: OSResult.h:2359
bool setNumberOfDualVariableValues(int solIdx, int n)
Set the [i]th optimization solution&#39;s number of dual variable values, where i equals the given soluti...
Definition: OSResult.cpp:6219
OptimizationSolution ** solution
solution is an array of pointers to OptimizationSolution objects
Definition: OSResult.h:2500
double * m_mdDualValues
m_mdDualValues a vector of dual variables.
Definition: OSResult.h:2639
bool setSolverOutputDescription(int otherIdx, std::string description)
Set the description associated with the [j]th solver output.
Definition: OSResult.cpp:7445
int getObjValueIdx(int solIdx, int objIdx)
Definition: OSResult.cpp:3020
OSMatrixWithMatrixVarIdx ** matrixVar
the list of matrices and their values
Definition: OSResult.h:1959
bool setOtherVariableResultSolver(int solIdx, int otherIdx, std::string solver)
Set the solver of another (non-standard/solver specific) variable-related result, for the [i]th solut...
Definition: OSResult.cpp:5547
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition: OSMatrix.h:248
bool setOtherSolutionResultName(int solIdx, int otherIdx, std::string name)
Set the name associated with the [j]th other solution result of solution [i].
Definition: OSResult.cpp:7249
MatrixObjectiveSolution * matrixObjectives
a pointer to the matrixObjectives object
Definition: OSResult.h:2088
std::string getTimingInfoCategory(int idx)
Definition: OSResult.cpp:1843
MatrixConstraintSolution * matrixConstraints
a pointer to the matrixConstraints object
Definition: OSResult.h:2091
ConstraintSolution * constraints
constraints holds the solution information for the constraints
Definition: OSResult.h:2295
bool setOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx, int numberOfObj)
Set the number of &lt;obj&gt; children of another (non-standard/solver specific) objective-related result...
Definition: OSResult.cpp:5912
bool setNumberOfOtherJobResults(int num)
Set number of other job results.
Definition: OSResult.cpp:4664
~OptimizationResult()
Class destructor.
Definition: OSResult.cpp:1351
The TimeMeasurement Class.
Definition: OSResult.h:546
an integer Vector data structure
Definition: OSGeneral.h:469
double serviceUtilization
service utilization
Definition: OSResult.h:432
std::string category
the category of the result value
Definition: OSResult.h:1799
int getOtherVariableResultNumberOfVar(int solIdx, int otherIdx)
Definition: OSResult.cpp:2552
MatrixProgrammingSolution * matrixProgramming
matrixProgramming holds the solution information for the matrix programming components: matrix variab...
Definition: OSResult.h:2306
ObjectiveValues * values
a pointer to an array of ObjectiveValues objects
Definition: OSResult.h:1547
int getNumberOfOtherServiceResults()
Definition: OSResult.cpp:1749
std::string instanceName
the name of the instance that was solved
Definition: OSResult.h:290
std::string getJobEndTime()
Definition: OSResult.cpp:1810
std::string category
the category of the result value
Definition: OSResult.h:1475
std::string description
a brief description of the type of result
Definition: OSResult.h:2367
double value
the CPU speed (expressed in multiples of unit)
Definition: OSGeneral.h:823
bool setConstraintNumber(int constraintNumber)
Set the constraint number.
Definition: OSResult.cpp:4731
bool IsEqual(VarValue *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8509
The OtherConResult Class.
Definition: OSResult.h:1709
std::string name
optional name
Definition: OSResult.h:964
VarValue()
Default constructor.
Definition: OSResult.cpp:408
std::string getOtherSolutionResultValue(int solIdx, int otherIdx)
Definition: OSResult.cpp:3913
bool setOtherVariableResultVar(int solIdx, int otherIdx, int varIdx, std::string value)
Set the value of another (non-standard/solver specific) variable-related result, for the [i]th soluti...
Definition: OSResult.cpp:5616
bool setOtherVariableResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:5528
std::string serviceName
the serviceName is the name of the solver service that did the optimization
Definition: OSResult.h:286
bool IsEqual(ConstraintSolution *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9119
bool setAvailableDiskSpaceDescription(std::string description)
Set the description of available disk space.
Definition: OSResult.cpp:4232
std::string getSolverOutputName(int otherIdx)
Definition: OSResult.cpp:3997
std::string category
this element allows a specific category to be associated with this particular type of result ...
Definition: OSResult.h:2364
std::string getJobStatus()
Definition: OSResult.cpp:1786
The in-memory representation of the &lt;MatrixProgrammingSolution&gt; element.
Definition: OSResult.h:2075
~Time()
Class destructor.
Definition: OSResult.cpp:163
OptimizationSolutionSubstatus ** substatus
a pointer to an array of substatus objects
Definition: OSResult.h:806
int numberOfConstraints
numberOfConstrants is the number of constraint functions reported in the solution.
Definition: OSResult.h:2495
std::string getSolutionStatusDescription(int solIdx)
Get the [i]th optimization solution status description, where i equals the given solution index...
Definition: OSResult.cpp:2062
std::string description
a description of the solution status type
Definition: OSResult.h:803
BasisStatus * basisStatus
a pointer to a BasisStatus object
Definition: OSResult.h:1233
bool setOtherOptionOrResultEnumeration(std::string value, std::string description, int *i, int ni)
Set the indices for a particular level in an enumeration.
Definition: OSGeneral.cpp:621
std::string getTimingInfoUnit(int idx)
Definition: OSResult.cpp:1823
bool setSolverOutputNumberOfItems(int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th solver output.
Definition: OSResult.cpp:7454
std::string category
The category of time (total/input/preprocessing/optimization/postprocessing/output/other) ...
Definition: OSResult.h:558
double value
Definition: OSResult.h:860
int idx
idx is the index on a constraint
Definition: OSResult.h:1603
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10697
OtherVariableResult ** other
a pointer to an array of other pointer objects for variables
Definition: OSResult.h:1238
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10260
bool OSIsEqual(double x, double y)
Definition: OSGeneral.h:985
~OtherSolverOutput()
Class destructor.
Definition: OSResult.cpp:1318
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10486
~SolverOutput()
Class destructor.
Definition: OSResult.cpp:1289
bool setActualStartTime(std::string actualStartTime)
Set the job&#39;s actual start time.
Definition: OSResult.cpp:4468
OSMatrixWithMatrixVarIdx ** matrixVar
matrixVar is an array of pointers to the &lt;matrixVar&gt; children
Definition: OSResult.h:1921
std::string * item
an array of items (string-valued)
Definition: OSResult.h:2375
~OtherResults()
Class destructor.
Definition: OSResult.cpp:107
std::string name
the name of the other result
Definition: OSResult.h:168
GeneralSubstatus ** substatus
the array of substatuses
Definition: OSResult.h:120
MatrixVariableValues * values
values is pointer to the &lt;values&gt; child
Definition: OSResult.h:1999
The JobResult Class.
Definition: OSResult.h:659
~MatrixVariableSolution()
The MatrixVariableSolution class destructor.
Definition: OSResult.cpp:969
VariableSolution()
Default constructor.
Definition: OSResult.cpp:571
bool setMatrixVarValuesBlockStructure(int solIdx, int idx, int *colOffset, int colOffsetSize, int *rowOffset, int rowOffsetSize, int numberOfBlocks, int blocksConstructorIdx=0)
A method to set the block structure for the values of a matrixVar in the [i]th optimization solution...
Definition: OSResult.cpp:6737
std::string enumType
type of the values in the enumeration array
Definition: OSResult.h:1493
std::string getSolverInvoked()
Get the solver invoked.
Definition: OSResult.cpp:1550
int numberOfObj
record the number of objective rows for which values are given
Definition: OSResult.h:1338
bool setMatrixVariableSolution(int solIdx, int numberOfMatrixVar_, int numberOfOtherMatrixVariableResults_)
Set the [i]th optimization solution&#39;s MatrixVariableSolution, where i equals the given solution index...
Definition: OSResult.cpp:6666
std::string getOtherVariableResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:2673
bool setVarValue(int solIdx, int number, int idx, std::string name, double val)
Set a primal variable value.
Definition: OSResult.cpp:5068
bool setOtherSolutionResultCategory(int solIdx, int otherIdx, std::string category)
Set the category associated with the [j]th other solution result of solution [i]. ...
Definition: OSResult.cpp:7277
int getOtherConstraintResultNumberOfCon(int solIdx, int otherIdx)
Definition: OSResult.cpp:3615
CPUNumber * availableCPUNumber
a pointer to the CPUNumber class
Definition: OSResult.h:370
bool IsEqual(OtherObjectiveResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8978
std::string getSolverOutputDescription(int otherIdx)
Definition: OSResult.cpp:4017
std::string serviceURI
the serviceURI is the URI of the solver service that did the optimization
Definition: OSResult.h:281
bool setJobID(std::string jobID)
Set job id.
bool IsEqual(OptimizationSolutionSubstatus *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8341
VarValue Class.
Definition: OSResult.h:847
bool setOtherSystemResultName(int idx, std::string name)
Set the system otherResult name.
Definition: OSResult.cpp:4331
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9766
The DualVariableValues Class.
Definition: OSResult.h:1654
bool setObjectiveValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution&#39;s objective values, where i equals the given solution index...
Definition: OSResult.cpp:5784
int getNumberOfSolutionSubstatuses(int solIdx)
Definition: OSResult.cpp:2073
std::string getOtherSolutionResultCategory(int solIdx, int otherIdx)
Definition: OSResult.cpp:3928
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10113
TimingInformation()
Default constructor.
Definition: OSResult.cpp:275
bool setCurrentJobCount(int jobCount)
Set the current job count.
Definition: OSResult.cpp:4370
bool setOtherConstraintResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6525
std::string type
The type of timer used (cpuTime/elapsedTime/other)
Definition: OSResult.h:553
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:1257
VariableValuesString * valuesString
a pointer to a VariableValuesString object
Definition: OSResult.h:1230
bool IsEqual(OtherVariableResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8670
std::string conType
type of the values in the con array
Definition: OSResult.h:1808
OtherMatrixVariableResult ** other
other is a pointer to an array of &lt;other&gt; children
Definition: OSResult.h:2002
The in-memory representation of the &lt;matrixVariables&gt; &lt;other&gt; element.
Definition: OSResult.h:1939
int numberOfEnumerations
number of levels in an enumeration associated with this result
Definition: OSResult.h:1962
the TimeSpan class.
Definition: OSGeneral.h:924
The OtherObjectiveResult Class.
Definition: OSResult.h:1443
OtherObjResult ** obj
Definition: OSResult.h:1481
int numberOfRows
Definition: OSMatrix.h:1904
std::string getOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx)
Definition: OSResult.cpp:3650
OtherOptionOrResultEnumeration ** enumeration
Definition: OSResult.h:1814
int numberOfEnumerations
the number of distinct values for this particular type of result
Definition: OSResult.h:1136
bool setNumberOfOtherServiceResults(int num)
Set number of other service results.
Definition: OSResult.cpp:4398
bool IsEqual(OSResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7485
bool setSolutionSubstatusDescription(int solIdx, int substatusIdx, std::string description)
Set the solution substatus description.
Definition: OSResult.cpp:4856
std::string getSolutionTargetObjectiveName(int solIdx)
Definition: OSResult.cpp:2120
~VariableValuesString()
Class destructor.
Definition: OSResult.cpp:486
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10537
bool setOtherObjectiveResultObjName(int solIdx, int otherIdx, int objIdx, std::string name)
Set the name of another (non-standard/solver specific) objective-related result, for the [i]th soluti...
Definition: OSResult.cpp:6126
std::string name
the name of the substatus
Definition: OSResult.h:60
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9976
int getNumberOfVarValuesString(int solIdx)
Definition: OSResult.cpp:2247
bool setNumberOfVarValuesString(int solIdx, int numberOfVar)
Set the number of string-valued primal variables to be given a value.
Definition: OSResult.cpp:5114
bool setOtherConstraintResultName(int solIdx, int otherIdx, std::string name)
Set the name of another (non-standard/solver specific) constraint-related result, for the [i]th solut...
Definition: OSResult.cpp:6468
bool setUsedDiskSpaceValue(double value)
Set the amount of used disk space.
Definition: OSResult.cpp:4588
~VarValueString()
Class destructor.
Definition: OSResult.cpp:467
int getEl(int j)
get an entry in the data array of an IntVector
Definition: OSGeneral.cpp:481
bool setOtherServiceResultDescription(int idx, std::string description)
Set the service otherResult description.
Definition: OSResult.cpp:4435
OtherObjectiveResult ** other
a pointer to an array of other pointer objects for objective functions
Definition: OSResult.h:1555
int getBasisStatusEl(int solIdx, int object, int status, int j)
Get an entry in the array of indices that belong to a particular basis status.
Definition: OSResult.cpp:2334
bool IsEqual(TimeMeasurement *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8059
int numberOfVariables
numberOfVariables is the number of variables reported in the solution.
Definition: OSResult.h:2485
std::string value
Definition: OSResult.h:969
bool setOtherGeneralResultValue(int idx, std::string value)
Set the general otherResult value.
Definition: OSResult.cpp:4196
std::string getOtherSystemResultValue(int idx)
Definition: OSResult.cpp:1699
~GeneralSubstatus()
Class destructor.
Definition: OSResult.cpp:43
int getNumberOfOtherVariableResults(int solIdx)
Get numberOfOtherVariableResult.
Definition: OSResult.cpp:2456
bool IsEqual(OtherSolutionResults *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9426
bool setMatrixVariablesOtherResultBlockElements(int solIdx, int otherIdx, int matrixVarIdx, int blkno, int blkRowIdx, int blkColIdx, int nz, int *start, int *index, MatrixElementValues *value, ENUM_MATRIX_TYPE valueType, ENUM_MATRIX_SYMMETRY symmetry=ENUM_MATRIX_SYMMETRY_none, bool rowMajor=false)
A method to set the elements within a block of a matrixVar associated with the [j]th &quot;other&quot; result i...
Definition: OSResult.cpp:7077
bool setOtherObjectiveResultType(int solIdx, int otherIdx, std::string type)
Set the type of another (non-standard/solver specific) objective-related result, for the [i]th soluti...
Definition: OSResult.cpp:5977
fint nt
int getOtherConstraintResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of a &lt;con&gt; array or an &lt;enumeration&gt; associated with an &lt;other&gt; result for some soluti...
Definition: OSResult.cpp:3819
bool setObjectiveValuesDense(int solIdx, double *objectiveValues)
Set the [i]th optimization solution&#39;s objective values, where i equals the given solution index...
Definition: OSResult.cpp:5824
int numberOfOtherConstraintResults
the number of types of constraint function results other than the basic constraint function values ...
Definition: OSResult.h:1868
bool addTimingInformation(std::string type, std::string category, std::string unit, std::string description, double value)
Add timing information.
Definition: OSResult.cpp:4487
std::string getUsedCPUSpeedDescription()
Definition: OSResult.cpp:1922
std::string name
optional name
Definition: OSResult.h:1289
std::string category
the category of the result value
Definition: OSResult.h:1156
int getOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx)
Definition: OSResult.cpp:3693
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:9839
bool setOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx, int idx)
Set the index of another (non-standard/solver specific) variable-related result, for the [i]th soluti...
Definition: OSResult.cpp:5585
std::string category
The category of time (total/input/preprocessing/optimization/postprocessing/output/other) ...
Definition: OSResult.h:234
bool IsEqual(TimeSpan *that)
A function to check for the equality of two objects.
Definition: OSGeneral.cpp:1635
bool setSolverOutputName(int otherIdx, std::string name)
Set the name associated with the [j]th solver output.
Definition: OSResult.cpp:7427
JobResult()
Default constructor.
Definition: OSResult.cpp:302
std::string getUsedCPUNumberDescription()
Definition: OSResult.cpp:1936
for(int i=0;i< nnz;i++)
MatrixVariableValues()
The MatrixVariableValues class constructor.
Definition: OSResult.cpp:930
~ObjValue()
Class destructor.
Definition: OSResult.cpp:629
~DualVariableValues()
Class destructor.
Definition: OSResult.cpp:804
int getTimeNumber()
Get the number of time measurements.
Definition: OSResult.cpp:1995
bool IsEqual(VariableSolution *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8393
std::string getServiceURI()
Get service uri.
Definition: OSResult.cpp:1532
int numberOfOtherVariableResults
the number of types of variable results other than the value of the variable
Definition: OSResult.h:1224
OtherOptionOrResultEnumeration ** enumeration
Definition: OSResult.h:1490
int idx
idx is the index on an objective function
Definition: OSResult.h:1286
OptimizationSolutionSubstatus()
Default constructor.
Definition: OSResult.cpp:360
int getOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx)
Definition: OSResult.cpp:3229
OtherConstraintResult()
Default constructor.
Definition: OSResult.cpp:842
bool setSolutionWeightedObjectives(int solIdx, bool weightedObjectives)
Record whether the [i]th optimization solution uses weighted objectives, where i equals the given sol...
Definition: OSResult.cpp:4903
double value
the value of the objective indexed by idx
Definition: OSResult.h:1292
std::string getSolverOutputItem(int otherIdx, int itemIdx)
Definition: OSResult.cpp:4037
GeneralStatus()
Default constructor.
Definition: OSResult.cpp:51
bool setOtherVariableResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:5490
bool IsEqual(StorageCapacity *that)
A function to check for the equality of two objects.
Definition: OSGeneral.cpp:1366
~OtherMatrixVariableResult()
The MatrixVariableValues class destructor.
Definition: OSResult.cpp:1029
std::string getCurrentState()
Definition: OSResult.cpp:1719
bool setSolverOutputItem(int otherIdx, int itemIdx, std::string item)
Set one item associated with the [j]th solver output.
Definition: OSResult.cpp:7468
bool setOtherObjectiveResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6091
BasisStatus * basisStatus
a pointer to a BasisStatus object
Definition: OSResult.h:1874
bool setTotalJobsSoFar(int number)
Set the total number of jobs so far.
Definition: OSResult.cpp:4377
int m_iNumberOfOtherVariableResults
m_iNumberOfOtherVariableResults holds the number of OtherVariableResult objects.
Definition: OSResult.h:2629
bool setOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6651
int numberOfOtherResults
the number of other results
Definition: OSResult.h:222
std::string getOtherVariableResultValue(int solIdx, int otherIdx)
Definition: OSResult.cpp:2520
VariableValuesString()
Default constructor.
Definition: OSResult.cpp:476
int numberOfObj
the number of objectives which have values for this particular type of result
Definition: OSResult.h:1450
OtherResult ** other
the array of other results
Definition: OSResult.h:225
std::string getOtherGeneralResultName(int idx)
Get the name of the i-th other result in the &lt;general&gt; element.
Definition: OSResult.cpp:1569
bool setDualVariableValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution&#39;s dual variable values, where i equals the given solution index...
Definition: OSResult.cpp:6248
int getOtherVariableResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of a array or an &lt;enumeration&gt; associated with an &lt;other&gt; result for some solution...
Definition: OSResult.cpp:2755
bool setNumberOfGeneralSubstatuses(int num)
Set the number of substatus elements.
Definition: OSResult.cpp:4085
~OtherSolutionResults()
Class destructor.
Definition: OSResult.cpp:1200
bool setOtherConstraintResultValue(int solIdx, int otherIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6544
int getAvailableCPUNumberValue()
Definition: OSResult.cpp:1675
std::string jobID
the jobID is the ID associated with the solution of this instance
Definition: OSResult.h:295
bool IsEqual(GeneralResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:7531
bool IsEqual(VariableValuesString *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8562
std::string type
the type of the solution substatus
Definition: OSResult.h:748
std::string currentState
a string describing the current state of the service
Definition: OSResult.h:420
bool IsEqual(OtherObjResult *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9066
int getNumberOfPrimalVariableValues(int solIdx)
Definition: OSResult.cpp:2149
std::string getOtherJobResultValue(int idx)
Definition: OSResult.cpp:1967
int getOtherVariableResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:2700
OptimizationSolution()
Default constructor.
Definition: OSResult.cpp:1219
std::string value
value holds a general value associated with a variable, for example, rather than the value of a varia...
Definition: OSResult.h:1081
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:686
used for throwing exceptions.
Definition: OSErrorClass.h:31
void fint * n
OptimizationSolutionStatus * getSolutionStatus(int solIdx)
Get the [i]th optimization solution status, where i equals the given solution index.
Definition: OSResult.cpp:2041
std::string getGeneralSubstatusDescription(int i)
Get the i_th general substatus description.
Definition: OSResult.cpp:1510
bool setTimingInformation(int idx, std::string type, std::string category, std::string unit, std::string description, double value)
Set timing information.
Definition: OSResult.cpp:4520
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
Definition: OSMatrix.h:1896
bool IsEqual(DualVariableValues *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9179
std::string getUsedDiskSpaceUnit()
Definition: OSResult.cpp:1873
The DualVarValue Class.
Definition: OSResult.h:1598
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10748
std::string getUsedCPUSpeedUnit()
Definition: OSResult.cpp:1915
bool setTimeStamp(std::string timeStamp)
Set time stamp.
Definition: OSResult.cpp:4162
bool setMatrixVariablesOtherResultGeneralAttributes(int solIdx, int idx, std::string name, std::string description, std::string value, std::string type, std::string solver, std::string category, int numberOfMatrixVar=0, std::string matrixType="", int numberOfEnumerations=0, std::string enumType="")
A method to set general attributes for another (non-standard/solver specific) result associated with ...
Definition: OSResult.cpp:6922
int getVarValueIdx(int solIdx, int varIdx)
Definition: OSResult.cpp:2173
int getVariableNumber()
Get variable number.
Definition: OSResult.cpp:2003
std::string description
a description of the solution substatus
Definition: OSResult.h:751
bool verifyGeneralResultStatus(std::string status)
Definition: OSParameters.h:396
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10338
int numberOfEnumerations
the number of distinct values for this particular type of result
Definition: OSResult.h:1455
int m_iConstraintNumber
m_iConstraintNumber holds the constraint number.
Definition: OSResult.h:2624
bool setNumberOfOtherObjectiveResults(int solIdx, int numberOfOtherObjectiveResults)
Set the [i]th optimization solution&#39;s other (non-standard/solver specific) objective-related results...
Definition: OSResult.cpp:5690
bool setOtherVariableResultNumberOfVar(int solIdx, int otherIdx, int numberOfVar)
Set the number of children of another (non-standard/solver specific) variable-related result...
Definition: OSResult.cpp:5390
~TimingInformation()
Class destructor.
Definition: OSResult.cpp:285
double value
value of dual variable on the constraint indexed by idx
Definition: OSResult.h:1611
~SystemResult()
Class destructor.
Definition: OSResult.cpp:173
bool IsEqual(ObjValue *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:8925
OtherVarResult Class.
Definition: OSResult.h:1065
The GeneralStatus Class.
Definition: OSResult.h:105
std::string getOtherConstraintResultValue(int solIdx, int otherIdx)
Definition: OSResult.cpp:3583
OtherResults * otherResults
a pointer to the OtherResults class
Definition: OSResult.h:436
std::string getSolutionSubstatusType(int solIdx, int substatusIdx)
Definition: OSResult.cpp:2084
int * el
Definition: OSGeneral.h:484
bool setOtherConstraintResultConName(int solIdx, int otherIdx, int conIdx, std::string name)
Set the name of another (non-standard/solver specific) constraint-related result, for the [i]th solut...
Definition: OSResult.cpp:6636
int numberOfItems
the number of items contained in this otherSolutionResult
Definition: OSResult.h:2371
bool setOtherObjectiveResultSolver(int solIdx, int otherIdx, std::string solver)
Set the solver of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:6072
a data structure to represent an LP basis on both input and output
Definition: OSGeneral.h:645
bool setAvailableCPUNumberValue(int value)
Set the available number of CPUs.
Definition: OSResult.cpp:4306
std::string name
Definition: OSMatrix.h:2189
the StorageCapacity class.
Definition: OSGeneral.h:754
int totalJobsSoFar
total jobs processed so far
Definition: OSResult.h:426
std::string unit
the unit in which time is measured
Definition: OSGeneral.h:929
bool setTimeServiceStarted(std::string startTime)
Set the time the service was started.
Definition: OSResult.cpp:4384
OtherConResult()
Default constructor.
Definition: OSResult.cpp:822
double value
the number of units of storage capacity
Definition: OSGeneral.h:765
int numberOfObjectives
numberOfObjectives is the number of objective functions reported in the solution. ...
Definition: OSResult.h:2490
std::string getOtherJobResultName(int idx)
Definition: OSResult.cpp:1957
~OtherSolutionResult()
Class destructor.
Definition: OSResult.cpp:1178
bool IsEqual(OtherSolverOutput *that)
A function to check for the equality of two objects.
Definition: OSResult.cpp:9561
bool setServiceUtilization(double value)
Set the service utilitzation.
Definition: OSResult.cpp:4391
int getConstraintNumber()
Get constraint number.
Definition: OSResult.cpp:2023
The OtherVariableResult Class.
Definition: OSResult.h:1124
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSResult.cpp:10051
The ObjectiveSolution Class.
Definition: OSResult.h:1537
std::string getOtherVariableResultVar(int solIdx, int otherIdx, int varIdx)
Definition: OSResult.cpp:2587
std::string getOtherObjectiveResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3297
bool setAvailableDiskSpaceValue(double value)
Set the amount of available disk space.
Definition: OSResult.cpp:4240
void fint fint fint real fint real * x
bool setOtherVariableResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:5566
std::string returnMatrixTypeString(ENUM_MATRIX_TYPE type)
Definition: OSParameters.h:637
std::string getOtherConstraintResultDescription(int solIdx, int otherIdx)
Definition: OSResult.cpp:3599
double getUsedCPUSpeedValue()
Definition: OSResult.cpp:1929
bool setOtherObjectiveResultObjType(int solIdx, int otherIdx, std::string objType)
Set the objType of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
Definition: OSResult.cpp:5996
SolverOutput ** solverOutput
solverOutput is a pointer to an array of SolverOutput objects
Definition: OSResult.h:2429
OptimizationSolutionStatus()
Default constructor.
Definition: OSResult.cpp:378
std::string description
the description of the status
Definition: OSResult.h:117
std::string name
the name of the result the user is defining
Definition: OSResult.h:1782
std::string submitTime
time the job was submitted
Definition: OSResult.h:667
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
Definition: OSGeneral.cpp:1683
std::string getOtherConstraintResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an &lt;other&gt; result for some solution.
Definition: OSResult.cpp:3710
~OtherObjectiveResult()
Class destructor.
Definition: OSResult.cpp:704
bool setAvailableCPUSpeedValue(double value)
Set the available CPU speed.
Definition: OSResult.cpp:4290
The OtherSolutionResults Class.
Definition: OSResult.h:2205
StorageCapacity * availableDiskSpace
a pointer to the DiskSpace class
Definition: OSResult.h:358