17#include "OSParameters.h"
20#include "OSParameters.h"
307 endTime(
"1970-01-01T00:00:00-00:00"),
980 for(
int i = 0; i < numberOfMatrixVar; i++)
1077 if(numberOfOtherMatrixVariableResults > 0 && matrixVar != NULL)
1079 for(
int i = 0; i < numberOfMatrixVar; i++)
1081 delete matrixVar[i];
1082 matrixVar[i] = NULL;
1110 if(numberOfOtherMatrixVariableResults > 0 && matrixVar != NULL)
1112 for(
int i = 0; i < numberOfMatrixVar; i++)
1114 delete matrixVar[i];
1115 matrixVar[i] = NULL;
1353 std::ostringstream outStr;
1367 outStr <<
"Deleting Solution: " << i << endl;
1454 for (k = 0; k < numPrimalVals; k++)
1461 int numDualVals = this->
dualVals.size();
1462 for (k = 0; k < numDualVals; k++)
1475 if (
general == NULL)
return NULL;
1476 return general->generalStatus;
1481 if (
general == NULL)
return "";
1482 if (
general->generalStatus == NULL)
return "";
1483 return general->generalStatus->type;
1488 if (
general == NULL)
return "";
1489 if (
general->generalStatus == NULL)
return "";
1490 return general->generalStatus->description;
1495 if (
general == NULL)
return -1;
1496 if (
general->generalStatus == NULL)
return -1;
1497 return general->generalStatus->numberOfSubstatuses;
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;
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 "";
1517 return general->generalStatus->substatus[i]->description;
1522 if (
general == NULL)
return "";
1528 if (
general == NULL)
return "";
1534 if (
general == NULL)
return "";
1540 if (
general == NULL)
return "";
1546 if (
general == NULL)
return "";
1552 if (
general == NULL)
return "";
1553 return general->solverInvoked;
1558 if (
general == NULL)
return "";
1564 if (
general == NULL)
return -1;
1565 if (
general->otherResults == NULL)
return -1;
1566 return general->otherResults->numberOfOtherResults;
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;
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;
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;
1601 if (
system == NULL)
return "";
1602 return system->systemInformation;
1607 if (
system == NULL)
return "";
1608 if (
system->availableDiskSpace == NULL)
return "";
1609 return system->availableDiskSpace->unit;
1614 if (
system == NULL)
return "";
1615 if (
system->availableDiskSpace == NULL)
return "";
1616 return system->availableDiskSpace->description;
1621 if (
system == NULL)
return -1.;
1622 if (
system->availableDiskSpace == NULL)
return -1.;
1623 return system->availableDiskSpace->value;
1628 if (
system == NULL)
return "";
1629 if (
system->availableMemory == NULL)
return "";
1630 return system->availableMemory->unit;
1635 if (
system == NULL)
return "";
1636 if (
system->availableMemory == NULL)
return "";
1637 return system->availableMemory->description;
1642 if (
system == NULL)
return -1.;
1643 if (
system->availableMemory == NULL)
return -1.;
1644 return system->availableMemory->value;
1649 if (
system == NULL)
return "";
1650 if (
system->availableCPUSpeed == NULL)
return "";
1651 return system->availableCPUSpeed->unit;
1656 if (
system == NULL)
return "";
1657 if (
system->availableCPUSpeed == NULL)
return "";
1658 return system->availableCPUSpeed->description;
1663 if (
system == NULL)
return -1.;
1664 if (
system->availableCPUSpeed == NULL)
return -1.;
1665 return system->availableCPUSpeed->value;
1670 if (
system == NULL)
return "";
1671 if (
system->availableCPUNumber == NULL)
return "";
1672 return system->availableCPUNumber->description;
1677 if (
system == NULL)
return -1;
1678 if (
system->availableCPUNumber == NULL)
return -1;
1679 return system->availableCPUNumber->value;
1684 if (
system == NULL)
return -1;
1685 if (
system->otherResults == NULL)
return -1;
1686 return system->otherResults->numberOfOtherResults;
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;
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;
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;
1721 if (
service == NULL)
return "";
1727 if (
service == NULL)
return -1;
1728 return service->currentJobCount;
1733 if (
service == NULL)
return -1;
1734 return service->totalJobsSoFar;
1739 if (
service == NULL)
return "";
1740 return service->timeServiceStarted;
1745 if (
service == NULL)
return -1.;
1746 return service->serviceUtilization;
1751 if (
service == NULL)
return -1;
1752 if (
service->otherResults == NULL)
return -1;
1753 return service->otherResults->numberOfOtherResults;
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;
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;
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;
1788 if (
job == NULL)
return "";
1794 if (
job == NULL)
return "";
1795 return job->submitTime;
1800 if (
job == NULL)
return "";
1801 return job->scheduledStartTime;
1806 if (
job == NULL)
return "";
1807 return job->actualStartTime;
1812 if (
job == NULL)
return "";
1813 return job->endTime;
1818 if (
job == NULL)
return -1;
1819 if (
job->timingInformation == NULL)
return -1;
1820 return job->timingInformation->numberOfTimes;
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;
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;
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;
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;
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;
1875 if (
job == NULL)
return "";
1876 if (
job->usedDiskSpace == NULL)
return "";
1877 return job->usedDiskSpace->unit;
1882 if (
job == NULL)
return "";
1883 if (
job->usedDiskSpace == NULL)
return "";
1884 return job->usedDiskSpace->description;
1889 if (
job == NULL)
return -1.;
1890 if (
job->usedDiskSpace == NULL)
return -1.;
1891 return job->usedDiskSpace->value;
1896 if (
job == NULL)
return "";
1897 if (
job->usedMemory == NULL)
return "";
1898 return job->usedMemory->unit;
1903 if (
job == NULL)
return "";
1904 if (
job->usedMemory == NULL)
return "";
1905 return job->usedMemory->description;
1910 if (
job == NULL)
return -1.;
1911 if (
job->usedMemory == NULL)
return -1.;
1912 return job->usedMemory->value;
1917 if (
job == NULL)
return "";
1918 if (
job->usedCPUSpeed == NULL)
return "";
1919 return job->usedCPUSpeed->unit;
1924 if (
job == NULL)
return "";
1925 if (
job->usedCPUSpeed == NULL)
return "";
1926 return job->usedCPUSpeed->description;
1931 if (
job == NULL)
return -1.;
1932 if (
job->usedCPUSpeed == NULL)
return -1.;
1933 return job->usedCPUSpeed->value;
1938 if (
job == NULL)
return "";
1939 if (
job->usedCPUNumber == NULL)
return "";
1940 return job->usedCPUNumber->description;
1945 if (
job == NULL)
return -1;
1946 if (
job->usedCPUNumber == NULL)
return -1;
1947 return job->usedCPUNumber->value;
1952 if (
job == NULL)
return -1;
1953 if (
job->otherResults == NULL)
return -1;
1954 return job->otherResults->numberOfOtherResults;
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;
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;
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;
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;
1997 if (
job == NULL)
return -1;
1998 if (
job->timingInformation == NULL)
return -1;
1999 return job->timingInformation->numberOfTimes;
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;
2055 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2056 throw ErrorClass(
"solIdx is outside of range in routine getSolutionStatusType()");
2058 if (
optimization->solution[solIdx]->status == NULL)
return "";
2066 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2067 throw ErrorClass(
"solIdx is outside of range in routine getSolutionStatusDescription()");
2069 if (
optimization->solution[solIdx]->status == NULL)
return "";
2070 return optimization->solution[solIdx]->status->description;
2077 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2078 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfSolutionSubstatuses()");
2080 if (
optimization->solution[solIdx]->status == NULL)
return -1;
2081 return optimization->solution[solIdx]->status->numberOfSubstatuses;
2088 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2089 throw ErrorClass(
"solIdx is outside of range in routine getSolutionSubstatusType()");
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;
2101 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2102 throw ErrorClass(
"solIdx is outside of range in routine getSolutionSubstatusDescription()");
2104 if (
optimization->solution[solIdx]->status == NULL)
return "";
2105 if (substatusIdx < 0 || substatusIdx >=
optimization->solution[solIdx]->status->numberOfSubstatuses)
2107 return optimization->solution[solIdx]->status->substatus[substatusIdx]->description;
2114 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2115 throw ErrorClass(
"solIdx is outside of range in routine getSolutionTargetObjectiveIdx()");
2117 return optimization->solution[solIdx]->targetObjectiveIdx;
2124 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2125 throw ErrorClass(
"solIdx is outside of range in routine getSolutionTargetObjectiveName()");
2127 return optimization->solution[solIdx]->targetObjectiveName;
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;
2142 if(
optimization == NULL)
return "there is no solution";
2144 solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
return "there is no solution";
2145 if(
optimization->solution[solIdx] == NULL)
return "there is no solution";
2153 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2154 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfPrimalVariableValues()");
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;
2165 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2166 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfVarValues()");
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;
2177 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2178 throw ErrorClass(
"solIdx is outside of range in routine getVarValueIdx()");
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;
2191 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2192 throw ErrorClass(
"solIdx is outside of range in routine getVarValueIdx()");
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;
2205 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2206 throw ErrorClass(
"solIdx is outside of range in routine getVarValue()");
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;
2220 for(
int i = 0; i < iSolutions; i++)
2222 if( i != solIdx)
continue;
2224 if(
optimization->solution[i]->variables == NULL)
continue;
2225 if(
optimization->solution[i]->variables->values == NULL)
continue;
2227 optimization->solution[i]->status->type.compare(
"globallyOptimal") == 0)
2229 numberOfVar =
optimization->solution[i]->variables->values->numberOfVar;
2230 for(
int j = 0; j < numberOfVar; j++)
2233 primalValPair->
value =
optimization->solution[i]->variables->values->var[j]->value;
2234 primalValPair->
idx =
optimization->solution[i]->variables->values->var[j]->idx;
2238 if(
optimization->solution[i]->status->type.compare(
"globallyOptimal") == 0)
2251 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2252 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfVarValuesString()");
2254 if (
optimization->solution[solIdx]->variables == NULL)
return -1;
2255 if (
optimization->solution[solIdx]->variables->valuesString == NULL)
return -1;
2256 return optimization->solution[solIdx]->variables->valuesString->numberOfVar;
2263 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2264 throw ErrorClass(
"solIdx is outside of range in routine getVarValueStringIdx()");
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;
2277 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2278 throw ErrorClass(
"solIdx is outside of range in routine getVarValueStringIdx()");
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;
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;
2305 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2306 throw ErrorClass(
"solIdx is outside of range in routine getBasisStatusNumberOfEl()");
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);
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);
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);
2330 throw ErrorClass(
"target object not implemented in getBasisStatusNumberOfEl");
2338 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2339 throw ErrorClass(
"solIdx is outside of range in routine getBasisStatusEl()");
2341 throw ErrorClass(
"solution never defined in routine getBasisStatusEl()");
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);
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);
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);
2370 throw ErrorClass(
"target object not implemented in getBasisStatusEl");
2378 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2379 throw ErrorClass(
"solIdx is outside of range in routine getBasisInformationDense()");
2381 throw ErrorClass(
"solution never defined in routine getBasisInformationDense()");
2383 for (
int i=0; i<dim; i++)
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);
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);
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);
2413 throw ErrorClass(
"target object not implemented in getBasisInformationDense");
2462 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2463 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfOtherVariableResults()");
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;
2478 if (solIdx < 0 || solIdx >= iSolutions)
2479 throw ErrorClass(
"solIdx is outside of range in routine getAnOtherVariableResultNumberOfVar()");
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;
2493 if (solIdx < 0 || solIdx >= iSolutions)
2494 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultName()");
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;
2509 if (solIdx < 0 || solIdx >= iSolutions)
2510 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultType()");
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;
2525 if (solIdx < 0 || solIdx >= iSolutions)
2526 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultValue()");
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;
2541 if (solIdx < 0 || solIdx >= iSolutions)
2542 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultDescription()");
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;
2557 if (solIdx < 0 || solIdx >= iSolutions)
2558 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultNumberOfVar()");
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;
2573 if (solIdx < 0 || solIdx >= iSolutions)
2574 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultVarIdx()");
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;
2592 if (solIdx < 0 || solIdx >= iSolutions)
2593 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultVar()");
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;
2612 if (solIdx < 0 || solIdx >= iSolutions)
2613 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
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;
2628 if (solIdx < 0 || solIdx >= iSolutions)
2629 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultNumberOfEnumerations()");
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 "";
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;
2650 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2651 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultEnumerationValue()");
2653 throw ErrorClass(
"solution never defined in routine getOtherVariableResultEnumerationValue()");
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()");
2670 return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->value;
2677 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2678 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultEnumerationDescription()");
2680 throw ErrorClass(
"solution never defined in routine getOtherVariableResultEnumerationDescription()");
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()");
2697 return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->description;
2704 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2705 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultEnumerationNumberOfEl()");
2707 throw ErrorClass(
"solution never defined in routine getOtherVariableResultEnumerationNumberOfEl()");
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()");
2724 return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
2731 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2732 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultEnumerationEl()");
2734 throw ErrorClass(
"solution never defined in routine getOtherVariableResultEnumerationEl()");
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()");
2751 return optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[enumIdx]->getEl(j);
2760 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
2761 throw ErrorClass(
"solIdx is outside of range in routine getOtherVariableResultArrayDense()");
2763 throw ErrorClass(
"solution never defined in routine getOtherVariableResultArrayDense()");
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()");
2773 if (
optimization->solution[solIdx]->variables->other[otherIdx]->enumeration == NULL)
2775 if (
optimization->solution[solIdx]->variables->other[otherIdx]->var == NULL)
2779 for (i=0; i<dim; i++)
2780 resultArray[i] =
"";
2781 for (i=0; i<
optimization->solution[solIdx]->variables->other[otherIdx]->numberOfVar; i++)
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;
2787 throw ErrorClass(
"variable index out of range in routine getOtherVariableResultArrayDense()");
2797 for (j=0; j<dim; j++)
2798 resultArray[j] =
"";
2800 for (i=0; i<
optimization->solution[solIdx]->variables->other[otherIdx]->numberOfEnumerations; i++)
2802 val =
optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->value;
2803 n =
optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->numberOfEl;
2806 k =
optimization->solution[solIdx]->variables->other[otherIdx]->enumeration[i]->el[j];
2807 if (j >= 0 && j < dim)
2808 resultArray[k] = val;
2810 throw ErrorClass(
"variable index out of range in routine getOtherVariableResultArrayDense()");
3012 if (solIdx < 0 || solIdx >= iSolutions)
3013 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfObjValues()");
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;
3025 if (solIdx < 0 || solIdx >= iSolutions)
3026 throw ErrorClass(
"solIdx is outside of range in routine getObjValueIdx()");
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;
3040 if (solIdx < 0 || solIdx >= iSolutions)
3041 throw ErrorClass(
"solIdx is outside of range in routine getObjValueIdx()");
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;
3055 if (solIdx < 0 || solIdx >= iSolutions)
3056 throw ErrorClass(
"solIdx is outside of range in routine getObjValue()");
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;
3068 throw ErrorClass(
"No optimization or solution object defined");
3070 for (
int i = 0; i < iSolutions; i++)
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)
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;
3083 throw ErrorClass(
"There is no optimal solution");
3088 throw ErrorClass(
"There is no optimal solution");
3091 throw ErrorClass(
"There is no optimal solution");
3099 if (solIdx < 0 || solIdx >= iSolutions)
3100 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfOtherObjectiveResults()");
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;
3105 return optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults;
3114 if (solIdx < 0 || solIdx >= iSolutions)
3115 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultName()");
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;
3130 if (solIdx < 0 || solIdx >= iSolutions)
3131 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultType()");
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;
3146 if (solIdx < 0 || solIdx >= iSolutions)
3147 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultValue()");
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;
3162 if (solIdx < 0 || solIdx >= iSolutions)
3163 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultDescription()");
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;
3178 if (solIdx < 0 || solIdx >= iSolutions)
3179 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultNumberOfObj()");
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;
3194 if (solIdx < 0 || solIdx >= iSolutions)
3195 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultObjIdx()");
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;
3214 if (solIdx < 0 || solIdx >= iSolutions)
3215 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultObj()");
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;
3234 if (solIdx < 0 || solIdx >= iSolutions)
3235 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultNumberOfEnumerations()");
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;
3251 if (solIdx < 0 || solIdx >= iSolutions)
3252 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultArrayType()");
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 "";
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;
3273 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3274 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultEnumerationValue()");
3276 throw ErrorClass(
"solution never defined in routine getOtherObjectiveResultEnumerationValue()");
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()");
3293 return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->value;
3301 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3302 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultEnumerationDescription()");
3304 throw ErrorClass(
"solution never defined in routine getOtherObjectiveResultEnumerationDescription()");
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()");
3321 return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->description;
3329 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3330 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultEnumerationNumberOfEl()");
3332 throw ErrorClass(
"solution never defined in routine getOtherObjectiveResultEnumerationNumberOfEl()");
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()");
3349 return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
3357 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3358 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultEnumerationEl()");
3360 throw ErrorClass(
"solution never defined in routine getOtherObjectiveResultEnumerationEl()");
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()");
3377 return optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[enumIdx]->getEl(j);
3386 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3387 throw ErrorClass(
"solIdx is outside of range in routine getOtherObjectiveResultArrayDense()");
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()");
3399 if (
optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration == NULL)
3401 if (
optimization->solution[solIdx]->objectives->other[otherIdx]->obj == NULL)
3405 for (i=0; i<dim; i++)
3406 resultArray[i] =
"";
3407 for (i=0; i<
optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfObj; i++)
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;
3413 throw ErrorClass(
"objective index out of range in routine getOtherObjectiveResultArrayDense()");
3423 for (j=0; j<dim; j++)
3424 resultArray[j] =
"";
3426 for (i=0; i<
optimization->solution[solIdx]->objectives->other[otherIdx]->numberOfEnumerations; i++)
3428 val =
optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->value;
3429 n =
optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->numberOfEl;
3433 k = -1 -
optimization->solution[solIdx]->objectives->other[otherIdx]->enumeration[i]->el[j];
3434 if (j >= 0 && j < dim)
3435 resultArray[k] = val;
3437 throw ErrorClass(
"objective index out of range in routine getOtherObjectiveResultArrayDense()");
3451 if (solIdx < 0 || solIdx >= iSolutions)
3452 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfDualValues()");
3454 if (
optimization->solution[solIdx]->constraints == NULL)
return -1;
3455 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
return -1;
3456 return optimization->solution[solIdx]->constraints->dualValues->numberOfCon;
3464 if (solIdx < 0 || solIdx >= iSolutions)
3465 throw ErrorClass(
"solIdx is outside of range in routine getDualValueIdx()");
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;
3479 if (solIdx < 0 || solIdx >= iSolutions)
3480 throw ErrorClass(
"solIdx is outside of range in routine getDualValueIdx()");
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;
3494 if (solIdx < 0 || solIdx >= iSolutions)
3495 throw ErrorClass(
"solIdx is outside of range in routine getDualValue()");
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;
3509 for(
int i = 0; i < iSolutions; i++)
3511 if(i != solIdx)
continue;
3513 if(
optimization->solution[i]->constraints == NULL)
continue;
3514 if(
optimization->solution[i]->constraints->dualValues == NULL)
continue;
3516 optimization->solution[i]->status->type.compare(
"globallyOptimal") == 0)
3518 numberOfCon =
optimization->solution[i]->constraints->dualValues->numberOfCon;
3519 for(
int j = 0; j < numberOfCon; j++)
3522 dualValPair->
idx =
optimization->solution[i]->constraints->dualValues->con[j]->idx;
3523 dualValPair->
value =
optimization->solution[i]->constraints->dualValues->con[j]->value;
3527 if(
optimization->solution[i]->status->type.compare(
"globallyOptimal") == 0)
3541 if (solIdx < 0 || solIdx >= iSolutions)
3542 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfOtherConstraintResults()");
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;
3547 return optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults;
3556 if (solIdx < 0 || solIdx >= iSolutions)
3557 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultName()");
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;
3572 if (solIdx < 0 || solIdx >= iSolutions)
3573 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultType()");
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;
3588 if (solIdx < 0 || solIdx >= iSolutions)
3589 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultValue()");
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;
3604 if (solIdx < 0 || solIdx >= iSolutions)
3605 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultDescription()");
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;
3620 if (solIdx < 0 || solIdx >= iSolutions)
3621 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultNumberOfCon()");
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;
3636 if (solIdx < 0 || solIdx >= iSolutions)
3637 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultConIdx()");
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;
3655 if (solIdx < 0 || solIdx >= iSolutions)
3656 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultCon()");
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;
3675 if (solIdx < 0 || solIdx >= iSolutions)
3676 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultArrayType()");
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 "";
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;
3698 if (solIdx < 0 || solIdx >= iSolutions)
3699 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultNumberOfEnumerations()");
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;
3714 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3715 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultEnumerationValue()");
3717 throw ErrorClass(
"solution never defined in routine getOtherConstraintResultEnumerationValue()");
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()");
3734 return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->value;
3742 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3743 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultEnumerationDescription()");
3745 throw ErrorClass(
"solution never defined in routine getOtherConstraintResultEnumerationDescription()");
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()");
3762 return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->description;
3769 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3770 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultEnumerationNumberOfEl()");
3772 throw ErrorClass(
"solution never defined in routine getOtherConstraintResultEnumerationNumberOfEl()");
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()");
3789 return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->numberOfEl;
3796 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3797 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultEnumerationEl()");
3799 throw ErrorClass(
"solution never defined in routine getOtherConstraintResultEnumerationEl()");
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()");
3816 return optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[enumIdx]->getEl(j);
3824 if (solIdx < 0 || solIdx >=
optimization->numberOfSolutions)
3825 throw ErrorClass(
"solIdx is outside of range in routine getOtherConstraintResultArrayDense()");
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()");
3837 if (
optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration == NULL)
3839 if (
optimization->solution[solIdx]->constraints->other[otherIdx]->con == NULL)
3843 for (i=0; i<dim; i++)
3844 resultArray[i] =
"";
3846 for (i=0; i<
optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfCon; i++)
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;
3852 throw ErrorClass(
"constraint index out of range in routine getOtherConstraintResultArrayDense()");
3862 for (j=0; j<dim; j++)
3863 resultArray[j] =
"";
3865 for (i=0; i<
optimization->solution[solIdx]->constraints->other[otherIdx]->numberOfEnumerations; i++)
3867 val =
optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->value;
3868 n =
optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->numberOfEl;
3872 k =
optimization->solution[solIdx]->constraints->other[otherIdx]->enumeration[i]->el[j];
3873 if (j >= 0 && j < dim)
3874 resultArray[k] = val;
3876 throw ErrorClass(
"constraint index out of range in routine getOtherConstraintResultArrayDense()");
3891 if (solIdx < 0 || solIdx >= iSolutions)
3892 throw ErrorClass(
"solIdx is outside of range in routine getNumberOfOtherSolutionResults()");
3894 if (
optimization->solution[solIdx]->otherSolutionResults == NULL)
return -1;
3895 return optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults;
3903 if (solIdx < 0 || solIdx >= iSolutions)
3904 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultName()");
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;
3918 if (solIdx < 0 || solIdx >= iSolutions)
3919 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultName()");
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 "";
3925 return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->value;
3933 if (solIdx < 0 || solIdx >= iSolutions)
3934 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultCategory()");
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 "";
3940 return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->category;
3948 if (solIdx < 0 || solIdx >= iSolutions)
3949 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultDescription()");
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 "";
3955 return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->description;
3963 if (solIdx < 0 || solIdx >= iSolutions)
3964 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultNumberOfItems()");
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;
3970 return optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->numberOfItems;
3978 if (solIdx < 0 || solIdx >= iSolutions)
3979 throw ErrorClass(
"solIdx is outside of range in routine getOtherSolutionResultItem()");
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];
3994 return optimization->otherSolverOutput->numberOfSolverOutputs;
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;
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 "";
4014 return optimization->otherSolverOutput->solverOutput[otherIdx]->category;
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 "";
4024 return optimization->otherSolverOutput->solverOutput[otherIdx]->description;
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;
4034 return optimization->otherSolverOutput->solverOutput[otherIdx]->numberOfItems;
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];;
4053 std::string fileCreator, std::string description, std::string licence)
4057 return this->
resultHeader->setHeader(name, source, fileCreator, description, licence);
4064 general->generalStatus = status;
4080 if (
general->generalStatus == NULL)
general->generalStatus =
new GeneralStatus();
4081 general->generalStatus->description = description;
4087 if (num < 0)
return false;
4091 if (
general->generalStatus->substatus != NULL)
return false;
4092 general->generalStatus->numberOfSubstatuses = num;
4096 for(
int i = 0; i < num; i++)
4105 if (
general->generalStatus == NULL)
return false;
4106 if (idx < 0 || idx >=
general->generalStatus->numberOfSubstatuses)
return false;
4107 general->generalStatus->substatus[idx]->name = name;
4114 if (
general->generalStatus == NULL)
return false;
4115 if (idx < 0 || idx >=
general->generalStatus->numberOfSubstatuses)
return false;
4116 general->generalStatus->substatus[idx]->description = description;
4130 general->serviceName = serviceName;
4137 general->serviceURI = serviceURI;
4144 general->instanceName = instanceName;
4158 general->solverInvoked = solverInvoked;
4165 general->timeStamp = timeStamp;
4173 if (num < 0)
return false;
4174 if (
general->otherResults->other != NULL)
return false;
4175 general->otherResults->numberOfOtherResults = num;
4179 for(
int i = 0; i < num; i++)
4189 if (
general->otherResults == NULL)
return false;
4190 if (idx < 0 || idx >=
general->otherResults->numberOfOtherResults)
4192 general->otherResults->other[idx]->name = name;
4199 if (
general->otherResults == NULL)
return false;
4200 if (idx < 0 || idx >=
general->otherResults->numberOfOtherResults)
4202 general->otherResults->other[idx]->value = value;
4209 if (
general->otherResults == NULL)
return false;
4210 if (idx < 0 || idx >=
general->otherResults->numberOfOtherResults)
4212 general->otherResults->other[idx]->description = description;
4219 system->systemInformation = systemInformation;
4228 system->availableDiskSpace->unit = unit;
4236 system->availableDiskSpace->description = description;
4244 system->availableDiskSpace->value = value;
4253 system->availableMemory->unit = unit;
4261 system->availableMemory->description = description;
4269 system->availableMemory->value = value;
4275 if (
system == NULL)
return false;
4278 system->availableCPUSpeed->unit = unit;
4286 system->availableCPUSpeed->description = description;
4294 system->availableCPUSpeed->value = value;
4302 system->availableCPUNumber->description = description;
4310 system->availableCPUNumber->value = value;
4318 if (num < 0)
return false;
4319 if (
system->otherResults->other != NULL)
return false;
4320 system->otherResults->numberOfOtherResults = num;
4324 for(
int i = 0; i < num; i++)
4334 if (
system->otherResults == NULL)
return false;
4335 if (idx < 0 || idx >=
system->otherResults->numberOfOtherResults)
4337 system->otherResults->other[idx]->name = name;
4344 if (
system->otherResults == NULL)
return false;
4345 if (idx < 0 || idx >=
system->otherResults->numberOfOtherResults)
4347 system->otherResults->other[idx]->value = value;
4354 if (
system->otherResults == NULL)
return false;
4355 if (idx < 0 || idx >=
system->otherResults->numberOfOtherResults)
4357 system->otherResults->other[idx]->description = description;
4366 service->currentState = currentState;
4373 service->currentJobCount = jobCount;
4380 service->totalJobsSoFar = number;
4387 service->timeServiceStarted = startTime;
4394 service->serviceUtilization = value;
4400 if (num < 0)
return false;
4404 if (
service->otherResults->other != NULL)
return false;
4405 service->otherResults->numberOfOtherResults = num;
4409 for(
int i = 0; i < num; i++)
4418 if (
service->otherResults == NULL)
return false;
4419 if (idx < 0 || idx >=
service->otherResults->numberOfOtherResults)
4421 service->otherResults->other[idx]->name = name;
4428 if (
service->otherResults == NULL)
return false;
4429 if (idx < 0 || idx >=
service->otherResults->numberOfOtherResults)
4431 service->otherResults->other[idx]->value = value;
4438 if (
service->otherResults == NULL)
return false;
4439 if (idx < 0 || idx >=
service->otherResults->numberOfOtherResults)
4441 service->otherResults->other[idx]->description = description;
4450 job->status = status;
4457 job->submitTime = submitTime;
4464 job->scheduledStartTime = scheduledStartTime;
4471 job->actualStartTime = actualStartTime;
4478 job->endTime = endTime;
4493 throw ErrorClass(
"Invalid unit of time in addTimingInformation()");
4497 nt =
job->timingInformation->numberOfTimes;
4499 for (i = 0; i < nt; i++)
4500 temp[i] =
job->timingInformation->time[i];
4502 delete[]
job->timingInformation->time;
4507 temp[ nt]->
type = type;
4509 temp[ nt]->
unit = unit;
4511 temp[ nt]->
value = value;
4513 job->timingInformation->time = temp;
4514 job->timingInformation->numberOfTimes = ++nt;
4521 std::string unit, std::string description,
double value)
4528 if (
job->timingInformation == NULL)
return false;
4529 if (idx < 0 || idx >=
job->timingInformation->numberOfTimes)
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;
4536 job->timingInformation->time[idx]->value = value;
4544 if (numberOfTimes < 0)
return false;
4548 job->timingInformation->numberOfTimes = numberOfTimes;
4549 if (numberOfTimes > 0)
4554 for(
int i = 0; i < numberOfTimes; i++)
4562 if (numberOfTimes < 0)
return false;
4566 job->timingInformation->numberOfTimes = numberOfTimes;
4576 job->usedDiskSpace->unit = unit;
4584 job->usedDiskSpace->description = description;
4592 job->usedDiskSpace->value = value;
4602 job->usedMemory->unit = unit;
4610 job->usedMemory->description = description;
4618 job->usedMemory->value = value;
4627 if (
job->usedCPUSpeed == NULL)
job->usedCPUSpeed =
new CPUSpeed();
4628 job->usedCPUSpeed->unit = unit;
4635 if (
job->usedCPUSpeed == NULL)
job->usedCPUSpeed =
new CPUSpeed();
4636 job->usedCPUSpeed->description = description;
4643 if (
job->usedCPUSpeed == NULL)
job->usedCPUSpeed =
new CPUSpeed();
4644 job->usedCPUSpeed->value = value;
4652 job->usedCPUNumber->description = description;
4660 job->usedCPUNumber->value = value;
4668 if (num < 0)
return false;
4669 if (
job->otherResults->other != NULL)
return false;
4670 job->otherResults->numberOfOtherResults = num;
4674 for(
int i = 0; i < num; i++)
4684 if (
job->otherResults == NULL)
return false;
4685 if (idx < 0 || idx >=
job->otherResults->numberOfOtherResults)
4687 job->otherResults->other[idx]->name = name;
4694 if (
job->otherResults == NULL)
return false;
4695 if (idx < 0 || idx >=
job->otherResults->numberOfOtherResults)
4697 job->otherResults->other[idx]->value = value;
4704 if (
job->otherResults == NULL)
return false;
4705 if (idx < 0 || idx >=
job->otherResults->numberOfOtherResults)
4707 job->otherResults->other[idx]->description = description;
4714 if(variableNumber < 0)
4724 if(objectiveNumber < 0)
4733 if(constraintNumber < 0)
4742 if(number < 0)
return false;
4743 if(number == 0)
return true;
4747 for(
int i = 0; i < number; i++)
4758 if(nSols <= 0)
return false;
4760 solIdx < 0 || solIdx >= nSols)
return false;
4777 if(nSols <= 0)
return false;
4779 solIdx < 0 || solIdx >= nSols)
return false;
4795 if(nSols <= 0)
return false;
4797 solIdx < 0 || solIdx >= nSols)
return false;
4806 optimization->solution[solIdx]->status->description = description;
4814 if (nSols <= 0)
return false;
4816 solIdx < 0 || solIdx >= nSols)
return false;
4825 if (num < 0)
return false;
4826 if (
optimization->solution[solIdx]->status->substatus != NULL)
return false;
4827 optimization->solution[solIdx]->status->numberOfSubstatuses = num;
4831 for(
int i = 0; i < num; i++)
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;
4852 optimization->solution[solIdx]->status->substatus[substatusIdx]->type = type;
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;
4874 if(nSols <= 0)
return false;
4877 solIdx < 0 || solIdx >= nSols)
return false;
4882 if(objectiveIdx >= 0)
return false;
4883 optimization->solution[solIdx]->targetObjectiveIdx = objectiveIdx;
4891 if(nSols <= 0)
return false;
4894 solIdx < 0 || solIdx >= nSols)
return false;
4899 optimization->solution[solIdx]->targetObjectiveName = objectiveName;
4907 if (nSols <= 0)
return false;
4910 solIdx < 0 || solIdx >= nSols)
return false;
4913 optimization->solution[solIdx]->weightedObjectives = weightedObjectives;
4921 if(nSols <= 0)
return false;
4924 solIdx < 0 || solIdx >= nSols)
return false;
4937 if (numberOfVar <= 0 || numberOfVar > nVar)
return false;
4939 if (nSols <= 0)
return false;
4941 solIdx < 0 || solIdx >= nSols)
return false;
4950 if (
optimization->solution[solIdx]->variables->values == NULL)
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)
4965 int numberOfVar = x.size();
4967 if(nSols <= 0)
return false;
4969 solIdx < 0 || solIdx >= nSols)
return false;
4978 if (
optimization->solution[solIdx]->variables->values == NULL)
4982 if (
optimization->solution[solIdx]->variables->values->var == NULL)
4986 optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
4992 for(
int i = 0; i < numberOfVar; i++)
4995 optimization->solution[solIdx]->variables->values->var[i]->idx = x[i]->idx;
4996 optimization->solution[solIdx]->variables->values->var[i]->value = x[i]->value;
5006 if(nSols <= 0)
return false;
5008 solIdx < 0 || solIdx >= nSols)
return false;
5017 if(
optimization->solution[solIdx]->variables->values == NULL)
5021 if(
optimization->solution[solIdx]->variables->values->var == NULL)
5025 optimization->solution[solIdx]->variables->values->numberOfVar = numberOfVar;
5031 for(
int i = 0; i < numberOfVar; i++)
5034 optimization->solution[solIdx]->variables->values->var[i]->idx = i;
5035 optimization->solution[solIdx]->variables->values->var[i]->value = x[i];
5048 if (solIdx < 0 || solIdx >= nSols)
return false;
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)
5062 for(
int i = 0; i < numberOfVar; i++)
5076 if (solIdx < 0 || solIdx >= nSols)
5091 if (
optimization->solution[solIdx]->variables->values == NULL)
5096 int nVar =
optimization->solution[solIdx]->variables->values->numberOfVar;
5097 if (number < 0 || number >= nVar)
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;
5122 if (solIdx < 0 || solIdx >= nSols)
5131 if (
optimization->solution[solIdx]->variables->valuesString == NULL)
5133 if (
optimization->solution[solIdx]->variables->valuesString->numberOfVar > 0)
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)
5141 for(
int i = 0; i < numberOfVar; i++)
5155 if (solIdx < 0 || solIdx >= nSols)
5170 if (
optimization->solution[solIdx]->variables->valuesString == NULL)
5175 int nVar =
optimization->solution[solIdx]->variables->valuesString->numberOfVar;
5176 if (number < 0 || number >= nVar)
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;
5197 if (solIdx < 0 || solIdx >= nSols)
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);
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);
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);
5232 throw ErrorClass(
"target object not implemented in setBasisStatus");
5241 if (nSols <= 0)
return false;
5244 solIdx < 0 || solIdx >= nSols)
return false;
5249 if (num < 0)
return false;
5250 if (
optimization->solution[solIdx]->variables->other != NULL)
return false;
5251 optimization->solution[solIdx]->variables->numberOfOtherVariableResults = num;
5255 for(
int i = 0; i < num; i++)
5264 int iNumberOfVariables = numberOfVar;
5265 if(iNumberOfVariables <= -1)
return false;
5268 if(nSols <= 0)
return false;
5271 solIdx < 0 || solIdx >= nSols)
return false;
5282 for(
int i = 0; i < numberOfVar; i++)
5292bool 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)
5294 int iNumberOfVariables = numberOfVar;
5295 if(iNumberOfVariables <= -1)
return false;
5298 if(nSols <= 0)
return false;
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++)
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];
5328 int iNumberOfVariables = numberOfVar;
5329 if (iNumberOfVariables <= -1)
return false;
5332 if (nSols <= 0)
return false;
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++)
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];
5359 int iNumberOfVariables = numberOfVar;
5360 if(iNumberOfVariables <= -1)
return false;
5363 if(nSols <= 0)
return false;
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++)
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];
5392 int iNumberOfVariables = numberOfVar;
5393 if (iNumberOfVariables <= -1)
return false;
5395 if (nSols <= 0)
return false;
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)
5405 for(
int i = 0; i < numberOfVar; i++)
5407 optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfVar = numberOfVar;
5414 int iNumberOfEnumerations = numberOfEnumerations;
5415 if (iNumberOfEnumerations <= -1)
return false;
5417 if (nSols <= 0)
return false;
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)
5427 for(
int i = 0; i < numberOfEnumerations; i++)
5429 optimization->solution[solIdx]->variables->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
5436 int iNumberOfVariables = numberOfVar;
5437 if (iNumberOfVariables <= -1)
return false;
5440 if (nSols <= 0)
return false;
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;
5455 int iNumberOfVariables = numberOfVar;
5456 if (iNumberOfVariables <= -1)
return false;
5459 if (nSols <= 0)
return false;
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;
5474 int iNumberOfVariables = numberOfVar;
5475 if (iNumberOfVariables <= -1)
return false;
5478 if (nSols <= 0)
return false;
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;
5493 int iNumberOfVariables = numberOfVar;
5494 if (iNumberOfVariables <= -1)
return false;
5497 if (nSols <= 0)
return false;
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;
5512 int iNumberOfVariables = numberOfVar;
5513 if (iNumberOfVariables <= -1)
return false;
5516 if (nSols <= 0)
return false;
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;
5531 int iNumberOfVariables = numberOfVar;
5532 if (iNumberOfVariables <= -1)
return false;
5535 if (nSols <= 0)
return false;
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;
5550 int iNumberOfVariables = numberOfVar;
5551 if (iNumberOfVariables <= -1)
return false;
5554 if (nSols <= 0)
return false;
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;
5569 int iNumberOfVariables = numberOfVar;
5570 if (iNumberOfVariables <= -1)
return false;
5573 if (nSols <= 0)
return false;
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;
5588 if(nSols <= 0)
return false;
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;
5604 if(nSols <= 0)
return false;
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;
5619 if(nSols <= 0)
return false;
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;
5636 if (solIdx < 0 || solIdx >= nSols)
5638 if (
optimization->solution[solIdx] == NULL)
return false;
5644 if (
optimization->solution[solIdx]->variables == NULL)
return false;
5645 if (
optimization->solution[solIdx]->variables->other == NULL)
return false;
5646 int n_other =
optimization->solution[solIdx]->variables->numberOfOtherVariableResults;
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)
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);
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)
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);
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)
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);
5685 throw ErrorClass(
"target object not implemented in setOtherOptionOrResultEnumeration");
5693 if (nSols <= 0)
return false;
5696 solIdx < 0 || solIdx >= nSols)
return false;
5701 if (
optimization->solution[solIdx]->objectives == NULL)
5705 if (num < 0)
return false;
5706 if (
optimization->solution[solIdx]->objectives->other != NULL)
return false;
5707 optimization->solution[solIdx]->objectives->numberOfOtherObjectiveResults = num;
5711 for(
int i = 0; i < num; i++)
5727 if (solIdx < 0 || solIdx >= nSols)
5734 if (
optimization->solution[solIdx]->objectives == NULL)
5736 if (
optimization->solution[solIdx]->objectives->values == NULL)
5738 if (
optimization->solution[solIdx]->objectives->values->numberOfObj > 0)
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)
5747 for(
int i = 0; i < numberOfObj; i++)
5758 if (numberOfObj <= 0 || numberOfObj > nObj)
return false;
5760 if (nSols <= 0)
return false;
5762 solIdx < 0 || solIdx >= nSols)
return false;
5768 if (
optimization->solution[solIdx]->objectives == NULL)
5772 if (
optimization->solution[solIdx]->objectives->values == NULL)
5776 optimization->solution[solIdx]->objectives->values->numberOfObj = numberOfObj;
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;
5793 if(nSols <= 0)
return false;
5796 solIdx < 0 || solIdx >= nSols)
return false;
5805 if(
optimization->solution[solIdx]->objectives->values == NULL)
5809 if(
optimization->solution[solIdx]->objectives->values->obj == NULL)
5813 optimization->solution[solIdx]->objectives->values->numberOfObj = iNumberOfObjectives;
5814 for(
int i = 0; i < iNumberOfObjectives; i++)
5817 optimization->solution[solIdx]->objectives->values->obj[i]->idx = x[i]->idx;
5818 optimization->solution[solIdx]->objectives->values->obj[i]->value = x[i]->value;
5827 int iNumberOfObjectives = numberOfObj;
5828 if (iNumberOfObjectives < 0)
return false;
5829 if (iNumberOfObjectives == 0)
return true;
5830 if (objectiveValues == NULL)
return false;
5833 if (nSols <= 0)
return false;
5836 solIdx < 0 || solIdx >= nSols)
return false;
5841 if (
optimization->solution[solIdx]->objectives == NULL)
5845 if (
optimization->solution[solIdx]->objectives->values == NULL)
5849 if (
optimization->solution[solIdx]->objectives->values->obj == NULL)
5854 optimization->solution[solIdx]->objectives->values->numberOfObj = iNumberOfObjectives;
5855 for(
int i = 0; i < iNumberOfObjectives; i++)
5858 optimization->solution[solIdx]->objectives->values->obj[i]->idx = -(i+1);
5859 optimization->solution[solIdx]->objectives->values->obj[i]->value = objectiveValues[i];
5875 if (solIdx < 0 || solIdx >= nSols)
5885 if (
optimization->solution[solIdx]->objectives == NULL)
5890 if (
optimization->solution[solIdx]->objectives->values == NULL)
5895 int nObj =
optimization->solution[solIdx]->objectives->values->numberOfObj;
5896 if (number < 0 || number >= nObj)
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;
5914 int iNumberOfObjectives = numberOfObj;
5915 if (iNumberOfObjectives <= -1)
return false;
5918 if (nSols <= 0)
return false;
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)
5928 for(
int i = 0; i < numberOfObj; i++)
5932 optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfObj = numberOfObj;
5939 int iNumberOfEnumerations = numberOfEnumerations;
5940 if (iNumberOfEnumerations <= -1)
return false;
5942 if (nSols <= 0)
return false;
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)
5952 for(
int i = 0; i < numberOfEnumerations; i++)
5954 optimization->solution[solIdx]->objectives->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
5961 int iNumberOfObjectives = numberOfObj;
5962 if (iNumberOfObjectives <= -1)
return false;
5965 if (nSols <= 0)
return false;
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;
5980 int iNumberOfObjectives = numberOfObj;
5981 if (iNumberOfObjectives <= -1)
return false;
5984 if (nSols <= 0)
return false;
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;
5999 int iNumberOfObjectives = numberOfObj;
6000 if (iNumberOfObjectives <= -1)
return false;
6003 if (nSols <= 0)
return false;
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;
6018 int iNumberOfObjectives = numberOfObj;
6019 if (iNumberOfObjectives <= -1)
return false;
6022 if (nSols <= 0)
return false;
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;
6037 int iNumberOfObjectives = numberOfObj;
6038 if (iNumberOfObjectives <= -1)
return false;
6041 if (nSols <= 0)
return false;
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;
6056 int iNumberOfObjectives = numberOfObj;
6057 if (iNumberOfObjectives <= -1)
return false;
6060 if (nSols <= 0)
return false;
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;
6075 int iNumberOfObjectives = numberOfObj;
6076 if (iNumberOfObjectives <= -1)
return false;
6079 if (nSols <= 0)
return false;
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;
6094 int iNumberOfObjectives = numberOfObj;
6095 if (iNumberOfObjectives <= -1)
return false;
6098 if (nSols <= 0)
return false;
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;
6113 if (nSols <= 0)
return false;
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;
6129 if (nSols <= 0)
return false;
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;
6144 if (nSols <= 0)
return false;
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;
6159 if (nSols <= 0)
return false;
6162 solIdx < 0 || solIdx >= nSols)
return false;
6167 if (
optimization->solution[solIdx]->constraints == NULL)
6171 if (num < 0)
return false;
6172 if (
optimization->solution[solIdx]->constraints->other != NULL)
return false;
6173 optimization->solution[solIdx]->constraints->numberOfOtherConstraintResults = num;
6177 for(
int i = 0; i < num; i++)
6193 if (solIdx < 0 || solIdx >= nSols)
6200 if (
optimization->solution[solIdx]->constraints == NULL)
6202 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
6204 if (
optimization->solution[solIdx]->constraints->dualValues->numberOfCon > 0)
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)
6212 for(
int i = 0; i < numberOfCon; i++)
6223 if (numberOfCon <= 0 || numberOfCon > nCon)
return false;
6225 if (nSols <= 0)
return false;
6227 solIdx < 0 || solIdx >= nSols)
return false;
6232 if (
optimization->solution[solIdx]->constraints == NULL)
6236 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
6240 optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6250 int numberOfCon = x.size();
6251 int iNumberOfConstraints = numberOfCon;
6252 if(iNumberOfConstraints < 0)
return false;
6253 if(iNumberOfConstraints == 0)
return true;
6256 if(nSols <= 0)
return false;
6259 solIdx < 0 || solIdx >= nSols)
return false;
6264 if(
optimization->solution[solIdx]->constraints == NULL)
6268 if(
optimization->solution[solIdx]->constraints->dualValues == NULL)
6272 if(
optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6278 optimization->solution[solIdx]->constraints->dualValues = NULL;
6281 optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6282 for(
int i = 0; i < iNumberOfConstraints; i++)
6285 optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = x[i]->idx;
6286 optimization->solution[solIdx]->constraints->dualValues->con[i]->value = x[i]->value;
6294 int iNumberOfConstraints = numberOfCon;
6295 if (iNumberOfConstraints < 0)
return false;
6296 if (iNumberOfConstraints == 0)
return true;
6299 if (nSols <= 0)
return false;
6302 solIdx < 0 || solIdx >= nSols)
return false;
6307 if (
optimization->solution[solIdx]->constraints == NULL)
6311 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
6315 if (
optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6321 optimization->solution[solIdx]->constraints->dualValues = NULL;
6324 optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6325 for(
int i = 0; i < iNumberOfConstraints; i++)
6328 optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = i;
6329 optimization->solution[solIdx]->constraints->dualValues->con[i]->value = y[i];
6338 int iNumberOfConstraints = numberOfCon;
6339 if (iNumberOfConstraints <= 0)
return false;
6342 if (nSols <= 0)
return false;
6345 solIdx < 0 || solIdx >= nSols)
return false;
6350 if (
optimization->solution[solIdx]->constraints == NULL)
6354 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
6358 if (
optimization->solution[solIdx]->constraints->dualValues->con == NULL)
6362 if (dualVarValues == NULL)
6364 optimization->solution[solIdx]->constraints->dualValues = NULL;
6368 optimization->solution[solIdx]->constraints->dualValues->numberOfCon = numberOfCon;
6369 for(
int i = 0; i < iNumberOfConstraints; i++)
6373 optimization->solution[solIdx]->constraints->dualValues->con[i]->idx = i;
6374 optimization->solution[solIdx]->constraints->dualValues->con[i]->value = dualVarValues[i];
6387 if (solIdx < 0 || solIdx >= nSols)
6397 if (
optimization->solution[solIdx]->constraints == NULL)
6402 if (
optimization->solution[solIdx]->constraints->dualValues == NULL)
6407 int nCon =
optimization->solution[solIdx]->constraints->dualValues->numberOfCon;
6408 if (number < 0 || number >= nCon)
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;
6426 int iNumberOfConstraints = numberOfCon;
6427 if (iNumberOfConstraints <= -1)
return false;
6430 if (nSols <= 0)
return false;
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)
6440 for(
int i = 0; i < numberOfCon; i++)
6442 optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfCon = numberOfCon;
6449 int iNumberOfEnumerations = numberOfEnumerations;
6450 if (iNumberOfEnumerations <= -1)
return false;
6452 if (nSols <= 0)
return false;
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)
6462 for(
int i = 0; i < numberOfEnumerations; i++)
6464 optimization->solution[solIdx]->constraints->other[ otherIdx]->numberOfEnumerations = numberOfEnumerations;
6471 int iNumberOfConstraints = numberOfCon;
6472 if (iNumberOfConstraints <= -1)
return false;
6475 if (nSols <= 0)
return false;
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;
6490 int iNumberOfConstraints = numberOfCon;
6491 if (iNumberOfConstraints <= -1)
return false;
6494 if (nSols <= 0)
return false;
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;
6509 int iNumberOfConstraints = numberOfCon;
6510 if (iNumberOfConstraints <= -1)
return false;
6513 if (nSols <= 0)
return false;
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;
6528 int iNumberOfConstraints = numberOfCon;
6529 if (iNumberOfConstraints <= -1)
return false;
6532 if (nSols <= 0)
return false;
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;
6547 int iNumberOfConstraints = numberOfCon;
6548 if (iNumberOfConstraints <= -1)
return false;
6551 if (nSols <= 0)
return false;
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;
6566 int iNumberOfConstraints = numberOfCon;
6567 if (iNumberOfConstraints <= -1)
return false;
6570 if (nSols <= 0)
return false;
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;
6585 int iNumberOfConstraints = numberOfCon;
6586 if (iNumberOfConstraints <= -1)
return false;
6589 if (nSols <= 0)
return false;
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;
6604 int iNumberOfConstraints = numberOfCon;
6605 if (iNumberOfConstraints <= -1)
return false;
6608 if (nSols <= 0)
return false;
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;
6623 if (nSols <= 0)
return false;
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;
6639 if (nSols <= 0)
return false;
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;
6654 if (nSols <= 0)
return false;
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;
6667 int numberOfOtherMatrixVariableResults_)
6670 if (nSols <= 0)
return false;
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)
6678 optimization->solution[solIdx]->matrixProgramming->matrixVariables
6680 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values == NULL)
6681 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values
6683 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->numberOfMatrixVar
6684 = numberOfMatrixVar_;
6685 optimization->solution[solIdx]->matrixProgramming->matrixVariables->numberOfOtherMatrixVariableResults
6686 = numberOfOtherMatrixVariableResults_;
6688 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar
6690 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other
6694 for (
int i=0; i < numberOfMatrixVar_; i++)
6695 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[i] = NULL;
6696 for (
int i=0; i < numberOfOtherMatrixVariableResults_; i++)
6697 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[i] = NULL;
6708 if (nSols <= 0)
return false;
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;
6716 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar == NULL)
6718 if (idx < 0 || idx >=
optimization->solution[solIdx]->matrixProgramming
6719 ->matrixVariables->values->numberOfMatrixVar)
return false;
6720 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6721 != NULL)
return false;
6722 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6724 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6725 ->matrixVarIdx = matrixVarIdx;
6726 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6727 ->numberOfRows = numberOfRows;
6728 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6729 ->numberOfColumns = numberOfColumns;
6730 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6731 ->symmetry = symmetry;
6732 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]->type = type;
6733 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]->name = name;
6738 int* rowOffset,
int rowOffsetSize,
int numberOfBlocks,
int blocksConstructorIdx)
6741 if (nSols <= 0)
return false;
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;
6749 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar == NULL)
6751 if (idx < 0 || idx >=
optimization->solution[solIdx]->matrixProgramming
6752 ->matrixVariables->values->numberOfMatrixVar)
return false;
6754 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6755 ->inumberOfChildren = 1;
6756 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6758 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6760 optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6761 ->m_mChildren[0]->inumberOfChildren = numberOfBlocks;
6764 ->matrixVar[idx]->m_mChildren[0])->colOffset =
new IntVector(numberOfBlocks+1);
6766 for (
int i=0; i <= numberOfBlocks; i++)
6768 ->matrixVar[idx]->m_mChildren[0])->colOffset->el[i] = colOffset[i];
6771 ->matrixVar[idx]->m_mChildren[0])->rowOffset =
new IntVector(numberOfBlocks+1);
6773 for (
int i=0; i <= numberOfBlocks; i++)
6775 ->matrixVar[idx]->m_mChildren[0])->rowOffset->el[i] = rowOffset[i];
6779 ->matrixVar[idx]->m_mChildren[0])->m_mChildren =
new MatrixNode*[numberOfBlocks];
6781 for (
int i=0; i<numberOfBlocks; i++)
6783 ->matrixVar[idx]->m_mChildren[0])->
m_mChildren[i] = NULL;
6796 if (nSols <= 0)
return false;
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;
6803 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values == NULL)
6805 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar == NULL)
6807 if (idx < 0 || idx >=
optimization->solution[solIdx]->matrixProgramming
6808 ->matrixVariables->values->numberOfMatrixVar)
return false;
6809 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6810 == NULL)
return false;
6811 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6812 ->m_mChildren[0] == NULL)
return false;
6816 ->values->matrixVar[idx]->m_mChildren[0])->inumberOfChildren)
return false;
6819 ->values->matrixVar[idx]->m_mChildren[0])->m_mChildren[blkno] != NULL)
6820 throw ErrorClass(
"memory error in setMatrixVarBlockElements: block was previously allocated");
6823 ->values->matrixVar[idx]->m_mChildren[0])->m_mChildren[blkno] =
new MatrixBlock();
6826 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6827 ->m_mChildren[blkno])->blockRowIdx = blkRowIdx;
6830 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6831 ->m_mChildren[blkno])->blockColIdx = blkColIdx;
6834 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6838 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6839 ->m_mChildren[blkno])->inumberOfChildren = 1;
6842 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6843 ->m_mChildren[blkno])->m_mChildren =
new MatrixNode*[1];
6847 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6850 throw ErrorClass(
"in setMatrixVarBlockElements: element type not yet implemented:"
6854 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6855 ->m_mChildren[blkno]->m_mChildren[0])->numberOfValues = nz;
6862 ->values->matrixVar[idx]->m_mChildren[0])->rowOffset->el[blkRowIdx+1]
6864 ->values->matrixVar[idx]->m_mChildren[0])->rowOffset->el[blkRowIdx] + 1;
6868 ->values->matrixVar[idx]->m_mChildren[0])->colOffset->el[blkColIdx+1]
6870 ->values->matrixVar[idx]->m_mChildren[0])->colOffset->el[blkColIdx] + 1;
6873 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6874 ->m_mChildren[blkno]->m_mChildren[0])->start =
new IntVector(startSize);
6876 for (
int i=0; i<startSize; i++)
6878 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6879 ->m_mChildren[blkno]->m_mChildren[0])->start->el[i] = start[i];
6884 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6885 ->m_mChildren[blkno]->m_mChildren[0])->index =
new IntVector(nz);
6887 for (
int i=0; i<nz; i++)
6889 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6890 ->m_mChildren[blkno]->m_mChildren[0])->index->el[i] = index[i];
6895 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6899 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6900 ->m_mChildren[blkno]->m_mChildren[0])->value->numberOfEl = nz;
6903 ->matrixProgramming->matrixVariables->values->matrixVar[idx]->m_mChildren[0])
6904 ->m_mChildren[blkno]->m_mChildren[0])->value->el =
new double[nz];
6906 for (
int i=0; i<nz; i++)
6908 ->solution[solIdx]->matrixProgramming->matrixVariables->values->matrixVar[idx]
6909 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value)->el[i]
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)
6929 if (nSols <= 0)
return false;
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
6938 ->matrixVariables->numberOfOtherMatrixVariableResults)
return false;
6939 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx] != NULL)
6941 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]
6943 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->name = name;
6944 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->description
6946 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->value = value;
6947 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->type = type;
6948 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->solver = solver;
6949 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->category = category;
6950 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->numberOfMatrixVar
6951 = numberOfMatrixVar;
6952 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->matrixType
6954 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->numberOfEnumerations
6955 = numberOfEnumerations;
6956 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->enumType = enumType;
6958 if (numberOfMatrixVar > 0)
6960 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->matrixVar
6962 for (
int i=0; i<numberOfMatrixVar; i++)
6963 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->matrixVar[i]
6967 if (numberOfEnumerations > 0)
6969 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->enumeration
6971 for (
int i=0; i<numberOfEnumerations; i++)
6972 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[idx]->enumeration[i]
6984 if (nSols <= 0)
return false;
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;
6993 if (otherIdx < 0 || otherIdx >
optimization->solution[solIdx]->matrixProgramming->matrixVariables
6994 ->numberOfOtherMatrixVariableResults)
return false;
6995 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx] == NULL)
6997 if (
optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar
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;
7004 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7006 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7007 ->matrixVar[matrixVarIdx]->matrixVarIdx = matrixVarIdx;
7008 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7009 ->matrixVar[matrixVarIdx]->numberOfRows = numberOfRows;
7010 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7011 ->matrixVar[matrixVarIdx]->numberOfColumns = numberOfColumns;
7012 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7013 ->matrixVar[matrixVarIdx]->symmetry = symmetry;
7014 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7015 ->matrixVar[matrixVarIdx]->type = type;
7016 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7017 ->matrixVar[matrixVarIdx]->name = name;
7022 int* colOffset,
int colOffsetSize,
int* rowOffset,
int rowOffsetSize,
7023 int numberOfBlocks,
int blocksConstructorIdx)
7026 if (nSols <= 0)
return false;
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)
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;
7043 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7044 ->matrixVar[matrixVarIdx]->inumberOfChildren = 1;
7045 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7046 ->matrixVar[matrixVarIdx]->m_mChildren =
new MatrixNode*[1];
7047 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7048 ->matrixVar[matrixVarIdx]->m_mChildren[0] =
new MatrixBlocks();
7049 optimization->solution[solIdx]->matrixProgramming->matrixVariables->other[otherIdx]
7050 ->matrixVar[matrixVarIdx]->m_mChildren[0]->inumberOfChildren = numberOfBlocks;
7053 ->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset =
new IntVector(numberOfBlocks+1);
7055 for (
int i=0; i <= numberOfBlocks; i++)
7057 ->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[i] = colOffset[i];
7060 ->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset =
new IntVector(numberOfBlocks+1);
7062 for (
int i=0; i <= numberOfBlocks; i++)
7064 ->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[i] = rowOffset[i];
7068 ->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren =
new MatrixNode*[numberOfBlocks];
7070 for (
int i=0; i<numberOfBlocks; i++)
7072 ->matrixVar[matrixVarIdx]->m_mChildren[0])->
m_mChildren[i] = NULL;
7078 int blkno,
int blkRowIdx,
int blkColIdx,
int nz,
int* start,
int* index,
7085 if (nSols <= 0)
return false;
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;
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)
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;
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;
7110 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->inumberOfChildren)
7114 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[blkno] != NULL)
7115 throw ErrorClass(
"memory error in setMatrixVarBlockElements: block was previously allocated");
7118 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->m_mChildren[blkno]
7122 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7123 ->m_mChildren[0])->m_mChildren[blkno])->blockRowIdx = blkRowIdx;
7126 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7127 ->m_mChildren[0])->m_mChildren[blkno])->blockColIdx = blkColIdx;
7130 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7134 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7135 ->m_mChildren[0])->m_mChildren[blkno])->inumberOfChildren = 1;
7138 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7139 ->m_mChildren[0])->m_mChildren[blkno])->m_mChildren =
new MatrixNode*[1];
7143 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7146 throw ErrorClass(
"in setMatrixVarBlockElements: element type not yet implemented:"
7150 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7151 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->numberOfValues = nz;
7158 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[blkRowIdx+1]
7160 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->rowOffset->el[blkRowIdx] + 1;
7164 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[blkColIdx+1]
7166 ->other[otherIdx]->matrixVar[matrixVarIdx]->m_mChildren[0])->colOffset->el[blkColIdx] + 1;
7169 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7170 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->start
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];
7181 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7182 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->index =
new IntVector(nz);
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];
7192 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7193 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value
7197 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7198 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value->numberOfEl = nz;
7201 ->matrixProgramming->matrixVariables->other[otherIdx]->matrixVar[matrixVarIdx]
7202 ->m_mChildren[0])->m_mChildren[blkno]->m_mChildren[0])->value->el =
new double[nz];
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])
7223 if (nSols <= 0)
return false;
7226 solIdx < 0 || solIdx >= nSols)
return false;
7231 if (
optimization->solution[solIdx]->otherSolutionResults == NULL)
7235 if (num < 0)
return false;
7236 if (
optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult != NULL)
return false;
7237 optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults = num;
7241 for(
int i = 0; i < num; i++)
7252 if (nSols <= 0)
return false;
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;
7266 if (nSols <= 0)
return false;
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;
7273 optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[otherIdx]->value = value;
7280 if (nSols <= 0)
return false;
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;
7295 if (nSols <= 0)
return false;
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;
7310 if (nSols <= 0)
return false;
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];
7329 if (nSols <= 0)
return false;
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;
7345 std::string category, std::string description,
int numberOfItems, std::string* item)
7347 if (name ==
"")
return false;
7348 int inumberOfItems = numberOfItems;
7349 if(inumberOfItems <= -1)
return false;
7351 if(nSols <= 0)
return false;
7354 solIdx < 0 || solIdx >= nSols)
return false;
7355 if(
optimization->solution[solIdx] == NULL)
return false;
7359 if (
optimization->solution[solIdx]->otherSolutionResults == NULL)
7362 int nres =
optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults;
7366 for (i = 0; i < nres; i++)
7367 temp[i] =
optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult[i];
7369 delete[]
optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult;
7375 temp[ nres]->
name = name;
7376 temp[ nres]->
value = value;
7384 temp[nres]->
item =
new std::string[numberOfItems];
7385 for (i=0; i<numberOfItems; i++)
7386 temp[nres]->item[i] = item[i];
7390 optimization->solution[solIdx]->otherSolutionResults->otherSolutionResult = temp;
7391 optimization->solution[solIdx]->otherSolutionResults->numberOfOtherSolutionResults = ++nres;
7413 if (num < 0)
return false;
7414 if (
optimization->otherSolverOutput->solverOutput != NULL)
return false;
7415 optimization->otherSolverOutput->numberOfSolverOutputs = num;
7419 for(
int i = 0; i < num; i++)
7430 if (
optimization->otherSolverOutput == NULL)
return false;
7431 if (
optimization->otherSolverOutput->solverOutput[otherIdx] == NULL)
return false;
7432 optimization->otherSolverOutput->solverOutput[otherIdx]->name = name;
7439 if (
optimization->otherSolverOutput == NULL)
return false;
7440 if (
optimization->otherSolverOutput->solverOutput[otherIdx] == NULL)
return false;
7441 optimization->otherSolverOutput->solverOutput[otherIdx]->category = category;
7448 if (
optimization->otherSolverOutput == NULL)
return false;
7449 if (
optimization->otherSolverOutput->solverOutput[otherIdx] == NULL)
return false;
7450 optimization->otherSolverOutput->solverOutput[otherIdx]->description = description;
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];
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;
7521 if (!this->
job->IsEqual(that->
job))
7533 std::ostringstream outStr;
7563 if (this->message != that->
message ||
7567 this->jobID != that->
jobID ||
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;
7599 std::ostringstream outStr;
7631 this->type != that->
type ||
7637 outStr <<
"Differences in GeneralStatus" << endl;
7639 outStr <<
"type: " << this->type <<
" vs. " << that->
type << endl;
7640 outStr <<
"description: " << this->description <<
" vs. " << that->
description << endl;
7656 std::ostringstream outStr;
7686 if (this->name != that->
name ||
7692 outStr <<
"Differences in GeneralSubstatus" << endl;
7693 outStr <<
"name: " << this->name <<
" vs. " << that->
name << endl;
7694 outStr <<
"description: " << this->description <<
" vs. " << that->
description << endl;
7707 std::ostringstream outStr;
7742 outStr <<
"Differences in OtherResults" << endl;
7761 std::ostringstream outStr;
7791 if (this->name != that->
name ||
7792 this->value != that->
value ||
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;
7814 std::ostringstream outStr;
7849 outStr <<
"Differences in SystemResult" << endl;
7876 std::ostringstream outStr;
7915 outStr <<
"Differences in ServiceResult" << endl;
7936 std::ostringstream outStr;
7970 this->endTime != that->
endTime )
7975 outStr <<
"Differences in JobResult" << endl;
7976 outStr <<
"status: " << this->
status <<
" vs. " << that->
status << endl;
7980 outStr <<
"endTime: " << this->
endTime <<
" vs. " << that->
endTime << endl;
8007 std::ostringstream outStr;
8042 outStr <<
"Differences in TimingInformation" << endl;
8061 std::ostringstream outStr;
8091 if (this->type != that->
type ||
8092 this->category != that->
category ||
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;
8114 std::ostringstream outStr;
8152 outStr <<
"Differences in OptimizationResult" << endl;
8177 std::ostringstream outStr;
8212 outStr <<
"Differences in OptimizationSolution" << endl;
8224 outStr <<
"Differences in OptimizationSolution" << endl;
8236 outStr <<
"Differences in OptimizationSolution" << endl;
8243 if (this->message != that->
message)
8248 outStr <<
"Differences in OptimizationSolution" << endl;
8249 outStr <<
"message: \'" << this->message <<
"\' vs. \'" << that->
message <<
"\'" << endl;
8274 std::ostringstream outStr;
8304 if (this->type != that->
type ||
8310 outStr <<
"Differences in OptimizationSolutionStatus" << endl;
8311 outStr <<
"type: " << this->type <<
" vs. " << that->
type << endl;
8312 outStr <<
"description: " << this->description <<
" vs. " << that->
description << endl;
8323 outStr <<
"Differences in OptimizationSolutionStatus" << endl;
8343 std::ostringstream outStr;
8373 if (this->type != that->
type ||
8379 outStr <<
"Differences in OptimizationSolutionSubstatus" << endl;
8380 outStr <<
"type: " << this->type <<
" vs. " << that->
type << endl;
8381 outStr <<
"description: " << this->description <<
" vs. " << that->
description << endl;
8395 std::ostringstream outStr;
8430 outStr <<
"Differences in VariableSolution" << endl;
8456 std::ostringstream outStr;
8491 outStr <<
"Differences in VariableValues" << endl;
8492 outStr <<
"numberOfVar: " << this->numberOfVar <<
" vs. " << that->
numberOfVar << endl;
8511 std::ostringstream outStr;
8541 if (this->idx != that->
idx || this->name != that->
name ||
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;
8564 std::ostringstream outStr;
8599 outStr <<
"Differences in VariableValuesString" << endl;
8600 outStr <<
"numberOfVar: " << this->numberOfVar <<
" vs. " << that->
numberOfVar << endl;
8619 std::ostringstream outStr;
8649 if (this->idx != that->
idx || this->name != that->
name ||
8650 this->value != that->
value )
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;
8672 std::ostringstream outStr;
8702 if (this->name != that->
name ||
8703 this->value != that->
value ||
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;
8723 outStr <<
"numberOfVar: " << this->numberOfVar <<
" vs. " << that->
numberOfVar << endl;
8739 outStr <<
"Differences in OtherVariableResult" << endl;
8759 std::ostringstream outStr;
8789 if (this->idx != that->
idx || this->name != that->
name ||
8790 this->value != that->
value )
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;
8812 std::ostringstream outStr;
8847 outStr <<
"Differences in ObjectiveSolution" << endl;
8872 std::ostringstream outStr;
8907 outStr <<
"Differences in ObjectiveValues" << endl;
8927 std::ostringstream outStr;
8957 if (this->idx != that->
idx || this->name != that->
name ||
8958 this->value != that->
value )
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;
8980 std::ostringstream outStr;
9010 if (this->value != that->
value ||
9011 this->name != that->
name ||
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;
9031 outStr <<
"Differences in OtherObjectiveResult" << endl;
9048 outStr <<
"Differences in OtherObjectiveResult" << endl;
9068 std::ostringstream outStr;
9098 if (this->idx != that->
idx || this->name != that->
name ||
9099 this->value != that->
value )
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;
9121 std::ostringstream outStr;
9156 outStr <<
"Differences in ConstraintSolution" << endl;
9181 std::ostringstream outStr;
9216 outStr <<
"Differences in DualVariableValues" << endl;
9235 std::ostringstream outStr;
9265 if (this->idx != that->
idx || this->name != that->
name ||
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;
9287 std::ostringstream outStr;
9317 if (this->name != that->
name ||
9318 this->value != that->
value ||
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;
9338 outStr <<
"Differences in OtherConstraintResult" << endl;
9355 outStr <<
"Differences in OtherConstraintResult" << endl;
9375 std::ostringstream outStr;
9405 if (this->idx != that->
idx || this->name != that->
name ||
9406 this->value != that->
value )
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;
9428 std::ostringstream outStr;
9463 outStr <<
"Differences in OtherSolutionResults" << endl;
9482 std::ostringstream outStr;
9513 if (this->name != that->
name ||
9514 this->category != that->
category ||
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;
9534 outStr <<
"Differences in OtherSolutionResult" << endl;
9543 if (this->
item[i] != that->
item[i])
9548 outStr <<
"Differences in OtherSolutionResult" << endl;
9549 outStr <<
"item: " << this->
item[i] <<
" vs. " << that->
item[i] << endl;
9563 std::ostringstream outStr;
9598 outStr <<
"Differences in OtherSolverOutput" << endl;
9618 std::ostringstream outStr;
9648 if (this->name != that->
name ||
9649 this->category != that->
category ||
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;
9669 outStr <<
"Differences in SolverOutput" << endl;
9677 if (this->
item[i] != that->
item[i])
9682 outStr <<
"Differences in SolverOutput" << endl;
9683 outStr <<
"item: " << this->
item[i] <<
" vs. " << that->
item[i] << endl;
9711 general->setRandom(density, conformant);
9716 system->setRandom(density, conformant);
9721 service->setRandom(density, conformant);
9726 job->setRandom(density, conformant);
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";
9775 else type =
"error";
9779 else n = (int)(1+4*
OSRand());
9783 for (
int i = 0; i < n; i++)
9786 substatus[i]->setRandom(density, conformant);
9797 name =
"substatus name";
9813 else n = (int)(1+4*
OSRand());
9817 for (
int i = 0; i < n; i++)
9820 other[i]->setRandom(density, conformant);
9832 name =
"other result";
9833 value =
"random string";
9885 if (conformant) temp = 0.5*temp;
9924 if (conformant) temp = 0.5*temp;
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";
9935 if (
OSRand() <= density)
endTime =
"1970-01-01T00:00:00-00:00";
9986 else n = (int)(1+4*
OSRand());
9990 for (
int i = 0; i < n; i++)
9993 time[i]->setRandom(density, conformant);
10000bool Time::setRandom(
double density,
bool conformant)
10005 if (
OSRand() <= density)
10006 this->description =
"random string";
10008 if (
OSRand() <= density)
10011 if (conformant) temp = 0.5*temp;
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";
10019 if (
OSRand() <= density)
10022 if (conformant) temp = 0.5*temp;
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 =
"";
10030 if (
OSRand() <= density)
10033 if (conformant) temp = 0.5*temp;
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";
10041 if (
OSRand() <= density)
10044 else this->
value = 2.71828;
10056 if (
OSRand() <= density)
10057 this->description =
"random string";
10059 if (
OSRand() <= density)
10062 if (conformant) temp = 0.5*temp;
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";
10070 if (
OSRand() <= density)
10073 if (conformant) temp = 0.5*temp;
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 =
"";
10100 else n = (int)(1+4*
OSRand());
10104 for (
int i = 0; i < n; i++)
10107 solution[i]->setRandom(density,conformant);
10118 if (
OSRand() <= density)
10130 status->setRandom(density, conformant);
10132 if (
OSRand() <= density)
10135 variables->setRandom(density, conformant);
10138 if (
OSRand() <= density)
10144 if (
OSRand() <= density)
10150 if (
OSRand() <= density)
10166 if (conformant) temp = 0.5*temp;
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";
10173 if (
OSRand() <= density) this->description =
"random string";
10175 if (
OSRand() <= density)
10182 else n = (int)(1+4*
OSRand());
10186 for (
int i = 0; i < n; i++)
10189 substatus[i]->setRandom(density, conformant);
10203 if (conformant) temp = 0.5*temp;
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";
10210 if (
OSRand() <= density) this->description =
"random string";
10221 if (
OSRand() <= density)
10228 else n = (int)(1+4*
OSRand());
10232 for (
int i = 0; i < n; i++)
10235 other[i]->setRandom(density, conformant);
10239 if (
OSRand() <= density)
10242 values->setRandom(density, conformant);
10245 if (
OSRand() <= density)
10251 if (
OSRand() <= density)
10254 basisStatus->setRandom(density, conformant, 0, 9);
10267 this->numberOfVar = (int)(1+4*
OSRand());
10269 if (conformant) n = this->numberOfVar;
10270 else n = (int)(1+4*
OSRand());
10274 for (
int i = 0; i < n; i++)
10277 var[i]->setRandom(density, conformant);
10289 this->idx = (int)(10*
OSRand());
10290 if (
OSRand() <= 0.5) this->value = 3.14156;
10291 else this->value = 2.71828;
10293 if (
OSRand() <= density) this->name =
"random string";
10306 this->numberOfVar = (int)(1+4*
OSRand());
10308 if (conformant) n = this->numberOfVar;
10309 else n = (int)(1+4*
OSRand());
10313 for (
int i = 0; i < n; i++)
10316 var[i]->setRandom(density, conformant);
10328 this->idx = (int)(10*
OSRand());
10329 if (
OSRand() <= 0.5) this->value =
"random string";
10330 else this->value =
"";
10332 if (
OSRand() <= density) this->name =
"random string";
10343 this->name =
"random string";
10344 if (
OSRand() <= density) this->value =
"random string";
10345 if (
OSRand() <= density) this->description =
"random string";
10347 if (
OSRand() <= density)
10353 this->numberOfVar = (int)(1+4*
OSRand());
10355 if (conformant) n = this->numberOfVar;
10356 else n = (int)(1+4*
OSRand());
10360 for (
int i = 0; i < n; i++)
10363 var[i]->setRandom(density, conformant);
10373 else n = (int)(1+4*
OSRand());
10377 for (
int i = 0; i < n; i++)
10380 enumeration[i]->setRandom(density, conformant, 0, 9);
10394 this->idx = (int)(10*
OSRand());
10395 if (
OSRand() <= 0.5) this->value =
"random string";
10396 else this->value =
"";
10398 if (
OSRand() <= density) this->name =
"random string";
10409 if (
OSRand() <= density)
10416 else n = (int)(1+4*
OSRand());
10420 for (
int i = 0; i < n; i++)
10424 other[i]->setRandom(density, conformant);
10429 if (
OSRand() <= density)
10432 values->setRandom(density, conformant);
10435 if (
OSRand() <= density)
10438 basisStatus->setRandom(density, conformant, -2, -1);
10455 else n = (int)(1+4*
OSRand());
10459 for (
int i = 0; i < n; i++)
10462 obj[i]->setRandom(density, conformant);
10474 if (
OSRand() <= 0.5) this->idx = -1;
10475 else this->idx = -2;
10477 if (
OSRand() <= 0.5) this->value = 3.14156;
10478 else this->value = 2.71828;
10480 if (
OSRand() <= density) this->name =
"random string";
10491 this->name =
"random string";
10492 if (
OSRand() <= density) this->value =
"random string";
10493 if (
OSRand() <= density) this->description =
"random string";
10495 if (
OSRand() <= density)
10504 else n = (int)(1+4*
OSRand());
10508 for (
int i = 0; i < n; i++)
10511 obj[i]->setRandom(density, conformant);
10521 else n = (int)(1+4*
OSRand());
10525 for (
int i = 0; i < n; i++)
10528 enumeration[i]->setRandom(density, conformant, -2, -1);
10542 if (
OSRand() <= 0.5) this->idx = -1;
10543 else this->idx = -2;
10545 if (
OSRand() <= 0.5) this->value =
"random string";
10546 else this->value =
"";
10548 if (
OSRand() <= density) this->name =
"random string";
10559 if (
OSRand() <= density)
10566 else n = (int)(1+4*
OSRand());
10570 for (
int i = 0; i < n; i++)
10573 other[i]->setRandom(density, conformant);
10577 if (
OSRand() <= density)
10583 if (
OSRand() <= density)
10586 basisStatus->setRandom(density, conformant, 0 ,4);
10603 else n = (int)(1+4*
OSRand());
10607 for (
int i = 0; i < n; i++)
10610 con[i]->setRandom(density, conformant);
10621 this->idx = (int)(5*
OSRand());
10622 if (
OSRand() <= 0.5) this->value = 3.14156;
10623 else this->value = 2.71828;
10625 if (
OSRand() <= density) this->name =
"random string";
10635 this->name =
"random string";
10636 if (
OSRand() <= density) this->value =
"random string";
10637 if (
OSRand() <= density) this->description =
"random string";
10639 if (
OSRand() <= density)
10648 else n = (int)(1+4*
OSRand());
10652 for (
int i = 0; i < n; i++)
10655 con[i]->setRandom(density, conformant);
10665 else n = (int)(1+4*
OSRand());
10669 for (
int i = 0; i < n; i++)
10672 enumeration[i]->setRandom(density, conformant, 0, 4);
10687 this->idx = (int)(5*
OSRand());
10688 if (
OSRand() <= 0.5) this->value =
"random string";
10689 else this->value =
"";
10691 if (
OSRand() <= density) this->name =
"random string";
10707 else n = (int)(4*
OSRand());
10711 for (
int i = 0; i < n; i++)
10725 name =
"random string";
10734 else n = (int)(1+4*
OSRand());
10736 if (n > 0 ||
OSRand() <= density)
10738 item =
new std::string[n];
10740 for (
int i = 0; i < n; i++)
10741 item[i] =
"random string";
10758 else n = (int)(1+4*
OSRand());
10762 for (
int i = 0; i < n; i++)
10777 name =
"random string";
10786 else n = (int)(1+4*
OSRand());
10788 if (n > 0 ||
OSRand() <= density)
10790 item =
new std::string[n];
10792 for (
int i = 0; i < n; i++)
10793 item[i] =
"random string";
const OSSmartPtr< OSOutput > osoutput
bool OSIsEqual(double x, double y)
double OSNaN()
returns the value for NaN used in OS
a data structure to represent an LP basis on both input and output
a data structure to represent the constant elements in a MatrixType object
to represent the nonzeros in a constantMatrix element
The ConstraintSolution Class.
OtherConstraintResult ** other
a pointer to an array of other pointer objects for constraint functions
ConstraintSolution()
Default constructor.
BasisStatus * basisStatus
a pointer to a BasisStatus object
bool IsEqual(ConstraintSolution *that)
A function to check for the equality of two objects.
DualVariableValues * dualValues
a pointer to an array of DualVariableValues objects
~ConstraintSolution()
Class destructor.
int numberOfOtherConstraintResults
the number of types of constraint function results other than the basic constraint function values
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string name
optional name
DualVarValue()
Default constructor.
~DualVarValue()
Class destructor.
double value
value of dual variable on the constraint indexed by idx
bool IsEqual(DualVarValue *that)
A function to check for the equality of two objects.
int idx
idx is the index on a constraint
The DualVariableValues Class.
~DualVariableValues()
Class destructor.
DualVarValue ** con
con is a vector of DualVarValue objects that give an index and dual variable value for each constrain...
bool IsEqual(DualVariableValues *that)
A function to check for the equality of two objects.
DualVariableValues()
Default constructor.
int numberOfCon
record the number of constraints for which values are given
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
used for throwing exceptions.
std::string errormsg
errormsg is the error that is causing the exception to be thrown
~GeneralResult()
Class destructor.
std::string solverInvoked
the name of the solver used
GeneralResult()
Default constructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string serviceURI
the serviceURI is the URI of the solver service that did the optimization
std::string serviceName
the serviceName is the name of the solver service that did the optimization
bool IsEqual(GeneralResult *that)
A function to check for the equality of two objects.
std::string timeStamp
a time stamp associated with the process
std::string jobID
the jobID is the ID associated with the solution of this instance
OtherResults * otherResults
a pointer to the OtherResults class
GeneralStatus * generalStatus
a pointer to the GeneralStatus class
std::string instanceName
the name of the instance that was solved
std::string message
any general message associated with the optimization
bool IsEqual(GeneralStatus *that)
A function to check for the equality of two objects.
int numberOfSubstatuses
the number of substatuses
std::string type
the type of status
GeneralSubstatus ** substatus
the array of substatuses
~GeneralStatus()
Class destructor.
std::string description
the description of the status
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
GeneralStatus()
Default constructor.
The GeneralSubstatus Class.
bool IsEqual(GeneralSubstatus *that)
A function to check for the equality of two objects.
~GeneralSubstatus()
Class destructor.
std::string description
the description of the substatus
GeneralSubstatus()
Default constructor.
std::string name
the name of the substatus
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
an integer Vector data structure
std::string status
job status
std::string scheduledStartTime
the time when the job was supposed to start
JobResult()
Default constructor.
TimingInformation * timingInformation
a pointer to the TimingInformation class
CPUSpeed * usedCPUSpeed
a pointer to the CPUSpeed class
CPUNumber * usedCPUNumber
a pointer to the CPUNumber class
StorageCapacity * usedMemory
a pointer to the MemorySize class
std::string submitTime
time the job was submitted
~JobResult()
Class destructor.
std::string actualStartTime
the time when the job actually started
bool IsEqual(JobResult *that)
A function to check for the equality of two objects.
StorageCapacity * usedDiskSpace
a pointer to the DiskSpace class
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
OtherResults * otherResults
a pointer to the OtherResults class
std::string endTime
the time when the job finished
a data structure to represent a MatrixBlock object (derived from MatrixType)
a data structure to represent the nonzeroes of a matrix in a blockwise fashion. Each block can be giv...
MatrixConstraintSolution()
The MatrixConstraintSolution class constructor.
~MatrixConstraintSolution()
The MatrixConstraintSolution class destructor.
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements,...
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
MatrixObjectiveSolution()
The MatrixVariableSolution class constructor.
~MatrixObjectiveSolution()
The MatrixVariableSolution class destructor.
The in-memory representation of the <MatrixProgrammingSolution> element.
~MatrixProgrammingSolution()
The MatrixProgramming class destructor.
MatrixVariableSolution * matrixVariables
a pointer to the matrixVariables object
MatrixProgrammingSolution()
The MatrixProgramming class constructor.
OtherSolutionResult ** other
a pointer to the array of <other> children
int numberOfOtherMatrixProgrammingResults
the number of <other> child elements>
MatrixConstraintSolution * matrixConstraints
a pointer to the matrixConstraints object
MatrixObjectiveSolution * matrixObjectives
a pointer to the matrixObjectives object
The in-memory representation of the <MatrixVariableSolution> element.
MatrixVariableValues * values
values is pointer to the <values> child
MatrixVariableSolution()
The MatrixVariableSolution class constructor.
int numberOfOtherMatrixVariableResults
numberOfOtherMatrixVariableResults gives the number of <other> children
OtherMatrixVariableResult ** other
other is a pointer to an array of <other> children
~MatrixVariableSolution()
The MatrixVariableSolution class destructor.
The in-memory representation of the <matrixVariables> element.
MatrixVariableValues()
The MatrixVariableValues class constructor.
~MatrixVariableValues()
The MatrixVariableValues class destructor.
OSMatrixWithMatrixVarIdx ** matrixVar
matrixVar is an array of pointers to the <matrixVar> children
int numberOfMatrixVar
numberOfMatrixVar gives the number of <matrixVar> children
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL
bool setAvailableDiskSpaceDescription(std::string description)
Set the description of available disk space.
double getUsedCPUSpeedValue()
bool setNumberOfOtherServiceResults(int num)
Set number of other service results.
int getOtherObjectiveResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
bool setVarValue(int solIdx, int number, int idx, std::string name, double val)
Set a primal variable value.
bool setOtherVariableResultVarType(int solIdx, int otherIdx, std::string varType)
Set the varType of another (non-standard/solver specific) variable-related result,...
bool setDualVariableValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
std::string getOtherConstraintResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an <other> result for some solution.
std::string getServiceName()
Get service name.
bool setNumberOfDualVariableValues(int solIdx, int n)
Set the [i]th optimization solution's number of dual variable values, where i equals the given soluti...
int getNumberOfVarValuesString(int solIdx)
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...
int getNumberOfDualValues(int solIdx)
bool setGeneralMessage(std::string message)
Set the general message.
std::string getSolverOutputItem(int otherIdx, int itemIdx)
int getSolverOutputNumberOfItems(int otherIdx)
bool setTimeStamp(std::string timeStamp)
Set time stamp.
bool setVarValueString(int solIdx, int number, int idx, std::string name, std::string str)
Set a string-valued primal variable value.
int getOtherVariableResultNumberOfVar(int solIdx, int otherIdx)
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...
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...
bool setOtherVariableResultNumberOfVar(int solIdx, int otherIdx, int numberOfVar)
Set the number of children of another (non-standard/solver specific) variable-related result,...
bool setJobID(std::string jobID)
Set job id.
bool setNumberOfOtherJobResults(int num)
Set number of other job results.
bool setJobStatus(std::string status)
Set the job status.
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...
std::string getGeneralSubstatusName(int i)
Get the i_th general substatus name.
bool setPrimalVariableValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution's primal variable values, where i equals the given solution index...
std::string getTimingInfoDescription(int idx)
std::string getVarValueString(int solIdx, int varIdx)
std::string getSolverInvoked()
Get the solver invoked.
std::string getGeneralStatusDescription()
Get the general status description.
std::string getOtherVariableResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an <other> result for some solution.
std::string getOtherConstraintResultValue(int solIdx, int otherIdx)
bool setUsedDiskSpaceValue(double value)
Set the amount of used disk space.
std::string getOtherObjectiveResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
bool setOtherConstraintResultConType(int solIdx, int otherIdx, std::string conType)
Set the conType of another (non-standard/solver specific) constraint-related result,...
std::string getSolutionStatusType(int solIdx)
Get the [i]th optimization solution status type, where i equals the given solution index.
std::string getOtherSolutionResultName(int solIdx, int otherIdx)
bool setAvailableCPUNumberDescription(std::string description)
Set the description of available number of CPUs.
std::string getOtherVariableResultValue(int solIdx, int otherIdx)
std::string getGeneralSubstatusDescription(int i)
Get the i_th general substatus description.
bool setUsedCPUNumberDescription(std::string description)
Set the description of used number of CPUs.
OSResult()
Default constructor.
int m_iNumberOfOtherVariableResults
m_iNumberOfOtherVariableResults holds the number of OtherVariableResult objects.
std::string getOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx)
std::string getOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx)
std::string getTimeServiceStarted()
int getUsedCPUNumberValue()
int getNumberOfObjValues(int solIdx)
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...
std::string getInstanceName()
Get instance name.
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...
bool setGeneralStatusDescription(std::string description)
Set the general status description.
bool setSolutionNumber(int number)
set the number of solutions.
int getNumberOfOtherJobResults()
std::string getOtherVariableResultType(int solIdx, int otherIdx)
std::string getJobStatus()
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 "other" result i...
std::string getOtherConstraintResultDescription(int solIdx, int otherIdx)
bool setOtherSystemResultValue(int idx, std::string value)
Set the system otherResult value.
bool setOtherGeneralResultName(int idx, std::string name)
Set the general otherResult name.
bool setAvailableCPUSpeedValue(double value)
Set the available CPU speed.
std::string getOtherObjectiveResultName(int solIdx, int otherIdx)
int getOtherConstraintResultNumberOfCon(int solIdx, int otherIdx)
std::string getSolutionSubstatusDescription(int solIdx, int substatusIdx)
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...
bool setSolverOutputItem(int otherIdx, int itemIdx, std::string item)
Set one item associated with the [j]th solver output.
std::string getOtherGeneralResultValue(int idx)
int getBasisStatusNumberOfEl(int solIdx, int object, int status)
Get the number of indices that belong to a particular basis status.
bool setInstanceName(std::string instanceName)
Set instance name.
GeneralResult * general
general holds the first child of the OSResult specified by the OSrL Schema.
bool setOtherJobResultName(int idx, std::string name)
Set the job otherResult name.
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...
bool setSolutionSubstatusDescription(int solIdx, int substatusIdx, std::string description)
Set the solution substatus description.
double getAvailableCPUSpeedValue()
std::string getUsedDiskSpaceDescription()
bool setSolverOutputNumberOfItems(int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th solver output.
bool setMatrixVariableSolution(int solIdx, int numberOfMatrixVar_, int numberOfOtherMatrixVariableResults_)
Set the [i]th optimization solution's MatrixVariableSolution, where i equals the given solution index...
bool setObjectiveValuesDense(int solIdx, double *objectiveValues)
Set the [i]th optimization solution's objective values, where i equals the given solution index.
std::string getOtherGeneralResultName(int idx)
Get the name of the i-th other result in the <general> element.
bool setJobSubmitTime(std::string submitTime)
Set the time when the job was submitted.
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,...
std::string getOtherVariableResultDescription(int solIdx, int otherIdx)
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...
std::string getActualStartTime()
bool setNumberOfDualValues(int solIdx, int numberOfCon)
Set the number of constraints to be given a value.
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 ...
bool setNumberOfSolutionSubstatuses(int solIdx, int num)
Set the [i]th optimization solution's number of substatus elements.
double getAvailableMemoryValue()
bool setOtherServiceResultDescription(int idx, std::string description)
Set the service otherResult description.
int m_iObjectiveNumber
m_iObjectiveNumber holds the objective number.
int getOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx)
int getOtherVariableResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an <other> result for some solution.
bool setOtherSolutionResultName(int solIdx, int otherIdx, std::string name)
Set the name associated with the [j]th other solution result of solution [i].
int getNumberOfOtherConstraintResults(int solIdx)
int getOtherVariableResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of a array or an <enumeration> associated with an <other> result for some solution.
bool setUsedCPUSpeedUnit(std::string unit)
Set the unit in which used CPU speed is measured.
bool setTimeServiceStarted(std::string startTime)
Set the time the service was started.
std::string getAvailableCPUNumberDescription()
std::string getOtherJobResultDescription(int idx)
int getOtherVariableResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
std::string getSolutionStatusDescription(int solIdx)
Get the [i]th optimization solution status description, where i equals the given solution index.
bool setNumberOfOtherVariableResults(int solIdx, int numberOfOtherVariableResults)
Set the [i]th optimization solution's other (non-standard/solver specific) variable-related results,...
double * m_mdPrimalValues
m_mdPrimalValues a vector of primal variables.
std::string getJobSubmitTime()
bool setOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfObj)
Set the number of <enumeration> children of another (non-standard/solver specific) objective-related ...
bool setObjectiveValuesSparse(int solIdx, std::vector< IndexValuePair * > x)
Set the [i]th optimization solution's objective values, where i equals the given solution index.
std::string getTimingInfoType(int idx)
bool setGeneralStatusType(std::string type)
Set the general status type, which can be: success, error, warning.
std::string getOtherObjectiveResultValue(int solIdx, int otherIdx)
ServiceResult * service
service holds the third child of the OSResult specified by the OSrL Schema.
bool setNumberOfTimes(int numberOfTimes)
Set the number of time measurements and initial the time array.
bool setObjectiveNumber(int objectiveNumber)
Set the objective number.
std::string getSolverOutputDescription(int otherIdx)
bool setOtherServiceResultValue(int idx, std::string value)
Set the service otherResult value.
bool setSolutionTargetObjectiveName(int solIdx, std::string objectiveName)
Set the [i]th optimization solution's objective name, where i equals the given solution index.
bool setCurrentJobCount(int jobCount)
Set the current job count.
int getNumberOfSolverOutputs()
bool getSolutionWeightedObjectives(int solIdx)
Get the [i]th optimization solution form of the objective.
bool setOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result,...
std::string getAvailableCPUSpeedDescription()
int getObjValueIdx(int solIdx, int objIdx)
std::string getVarValueName(int solIdx, int varIdx)
bool setNumberOfOtherSolutionResults(int solIdx, int numberOfOtherSolutionResults)
Set the [i]th optimization solution's other (non-standard/solver specific) solution-related results,...
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...
bool setTotalJobsSoFar(int number)
Set the total number of jobs so far.
int getOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx)
int m_iVariableNumber
m_iVariableNumber holds the variable number.
bool setOtherObjectiveResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) objective-related result,...
std::string getJobEndTime()
std::string getScheduledStartTime()
bool setSolverOutputName(int otherIdx, std::string name)
Set the name associated with the [j]th solver output.
std::string getOtherServiceResultValue(int idx)
bool setAvailableMemoryUnit(std::string unit)
Set the unit in which available memory is measured.
bool setActualStartTime(std::string actualStartTime)
Set the job's actual start time.
int getObjectiveNumber()
Get objective number.
bool setNumberOfOtherGeneralResults(int num)
Set number of other general results.
bool setNumberOfObjectiveValues(int solIdx, int n)
Set the [i]th optimization solution's number of objective values, where i equals the given solution i...
int getNumberOfOtherGeneralResults()
Get the number of other results in the <general> element.
bool setOtherJobResultValue(int idx, std::string value)
Set the job otherResult value.
bool setPrimalVariableValuesDense(int solIdx, double *x)
Set the [i]th optimization solution's primal variable values, where i equals the given solution index...
bool setAvailableCPUNumberValue(int value)
Set the available number of CPUs.
int getOtherConstraintResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
std::string getOtherSystemResultValue(int idx)
std::string getSolutionTargetObjectiveName(int solIdx)
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...
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...
int getOtherConstraintResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an <other> result for some solution.
bool setUsedCPUNumberValue(int value)
Set the used number of CPUs.
int getNumberOfSolutionSubstatuses(int solIdx)
std::vector< IndexValuePair * > primalVals
int getNumberOfGeneralSubstatuses()
Get the number of substatuses.
std::string getUsedDiskSpaceUnit()
OptimizationResult * optimization
optimization holds the fifth child of the OSResult specified by the OSrL Schema.
bool setOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfCon)
Set the number of <enumeration> children of another (non-standard/solver specific) constraint-related...
bool setUsedMemoryValue(double value)
Set the amount of used memory.
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...
double getOptimalObjValue(int objIdx, int solIdx)
Get one solution's optimal objective value.
std::string getTimingInfoUnit(int idx)
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...
std::string getSolutionMessage(int solIdx)
Get the [i]th optimization solution message, where i equals the given solution index.
bool setOtherConstraintResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) constraint-related result,...
bool setGeneralStatus(GeneralStatus *status)
Set the general status.
int getVarValueStringIdx(int solIdx, int varIdx)
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 "other" r...
double getVarValue(int solIdx, int varIdx)
int getNumberOfVarValues(int solIdx)
GeneralFileHeader * resultHeader
header information
double * m_mdDualValues
m_mdDualValues a vector of dual variables.
std::string getJobID()
Get the job id.
bool setOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx, int numberOfObj)
Set the number of <obj> children of another (non-standard/solver specific) objective-related result,...
std::vector< IndexValuePair * > getOptimalDualVariableValues(int solIdx)
Get one solution of optimal dual variable values.
std::string getOtherVariableResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
bool setOtherObjectiveResultSolver(int solIdx, int otherIdx, std::string solver)
Set the solver of another (non-standard/solver specific) objective-related result,...
bool setServiceName(std::string serviceName)
Set service name.
double getTimingInfoValue(int idx)
bool setNumberOfPrimalVariableValues(int solIdx, int n)
Set the [i]th optimization solution's number of primal variable values, where i equals the given solu...
std::vector< IndexValuePair * > getOptimalPrimalVariableValues(int solIdx)
Get one solution of optimal primal variable values.
std::string getSolverOutputCategory(int otherIdx)
OptimizationSolutionStatus * getSolutionStatus(int solIdx)
Get the [i]th optimization solution status, where i equals the given solution index.
bool setUsedMemoryDescription(std::string description)
Set the description of used memory.
bool setAvailableDiskSpaceValue(double value)
Set the amount of available disk space.
int getTimeNumber()
Get the number of time measurements.
bool setSolverInvoked(std::string solverInvoked)
Set solver invoked.
std::string getAvailableCPUSpeedUnit()
bool setOtherObjectiveResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) objective-related result,...
std::string getOtherConstraintResultName(int solIdx, int otherIdx)
bool setNumberOfOtherObjectiveResults(int solIdx, int numberOfOtherObjectiveResults)
Set the [i]th optimization solution's other (non-standard/solver specific) objective-related results,...
int getBasisInformationDense(int solIdx, int object, int *resultArray, int dim)
Get the basis information associated with the variables, objectives or constraints for some solution.
double getAvailableDiskSpaceValue()
bool setOtherSolutionResultDescription(int solIdx, int otherIdx, std::string description)
Set the description associated with the [j]th other solution result of solution [i].
bool setVariableNumber(int variableNumber)
Set the variable number.
~OSResult()
Class destructor.
int getNumberOfOtherSystemResults()
int getOtherObjectiveResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of an <obj> array or an <enumeration> associated with an <other> result for some solut...
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.
bool setAvailableCPUSpeedDescription(std::string description)
Set the description of available CPU speed.
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...
std::string getOtherSolutionResultCategory(int solIdx, int otherIdx)
bool setTime(double time)
Set time.
int getNumberOfOtherServiceResults()
bool setOtherVariableResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) variable-related result,...
std::string getGeneralMessage()
Get the general message.
std::string getTimingInfoCategory(int idx)
bool setNumberOfGeneralSubstatuses(int num)
Set the number of substatus elements.
std::string getOtherJobResultValue(int idx)
int getSolutionNumber()
get the number of solutions.
std::string getUsedMemoryUnit()
bool setDualVariableValuesDense(int solIdx, double *y)
Set the [i]th optimization solution's dual variable values, where i equals the given solution index.
int getOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx)
bool setSolutionSubstatusType(int solIdx, int substatusIdx, std::string type)
Set the solution substatus type.
bool setUsedCPUSpeedValue(double value)
Set the used CPU speed.
int getOtherObjectiveResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an <other> result for some solution.
std::string getSolutionSubstatusType(int solIdx, int substatusIdx)
bool setAnOtherVariableResultDense(int solIdx, int otherIdx, std::string name, std::string value, std::string description, std::string *s)
Set the [i]th optimization solution's other (non-standard/solver specific)variable-related results,...
std::string getOtherSolutionResultValue(int solIdx, int otherIdx)
SystemResult * system
system holds the second child of the OSResult specified by the OSrL Schema.
int getVarValueIdx(int solIdx, int varIdx)
bool setUsedDiskSpaceUnit(std::string unit)
Set the unit in which used disk space is measured.
int getSolutionTargetObjectiveIdx(int solIdx)
std::string getOtherObjectiveResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an <other> result for some solution.
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].
bool setOtherJobResultDescription(int idx, std::string description)
Set the job otherResult description.
bool setUsedDiskSpaceDescription(std::string description)
Set the description of used disk space.
bool setSolverOutputDescription(int otherIdx, std::string description)
Set the description associated with the [j]th solver output.
bool setGeneralSubstatusName(int idx, std::string name)
Set the general substatus name.
bool setSolutionMessage(int solIdx, std::string msg)
Set the [i]th optimization solution's message, where i equals the given solution index.
bool setOtherConstraintResultSolver(int solIdx, int otherIdx, std::string solver)
Set the solver of another (non-standard/solver specific) constraint-related result,...
std::string getSolverOutputName(int otherIdx)
bool setOtherVariableResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) variable-related result,...
std::string getUsedCPUSpeedUnit()
bool setUsedMemoryUnit(std::string unit)
Set the unit in which used memory is measured.
bool setCurrentState(std::string currentState)
Set the current state of the service.
std::string getCurrentState()
std::string getOtherObjectiveResultDescription(int solIdx, int otherIdx)
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...
bool setTimeNumber(int timeNumber)
Set the number of time measurements.
double getUsedDiskSpaceValue()
int getOtherSolutionResultNumberOfItems(int solIdx, int otherIdx)
bool setOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx, int idx)
Set the index of another (non-standard/solver specific) constraint-related result,...
bool setSolutionStatusDescription(int solIdx, std::string description)
Set the [i]th optimization solution status description.
int getNumberOfOtherSolutionResults(int solIdx)
double getUsedMemoryValue()
bool setOtherGeneralResultDescription(int idx, std::string description)
Set the general otherResult description.
bool setSolutionStatus(int solIdx, std::string type, std::string description)
Set the [i]th optimization solution status, where i equals the given solution index.
double getTimeValue()
Get the time measurement.
std::string getAvailableDiskSpaceDescription()
bool setObjValue(int solIdx, int number, int idx, std::string name, double val)
Set an objective value.
bool setOtherSolutionResultNumberOfItems(int solIdx, int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th other solution result of solution [i].
std::string getAvailableMemoryUnit()
bool setUsedCPUSpeedDescription(std::string description)
Set the description of used CPU speed.
GeneralStatus * getGeneralStatus()
Get the general status.
bool addTimingInformation(std::string type, std::string category, std::string unit, std::string description, double value)
Add timing information.
std::string getOtherSystemResultDescription(int idx)
int getNumberOfPrimalVariableValues(int solIdx)
std::string getVarValueStringName(int solIdx, int varIdx)
bool setOtherObjectiveResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) objective-related result,...
int getConstraintNumber()
Get constraint number.
std::string getAvailableDiskSpaceUnit()
bool setTimingInformation(int idx, std::string type, std::string category, std::string unit, std::string description, double value)
Set timing information.
std::string getOtherVariableResultVar(int solIdx, int otherIdx, int varIdx)
std::string getSystemInformation()
std::vector< IndexValuePair * > dualVals
bool setSolutionWeightedObjectives(int solIdx, bool weightedObjectives)
Record whether the [i]th optimization solution uses weighted objectives, where i equals the given sol...
std::string getOtherSolutionResultDescription(int solIdx, int otherIdx)
std::string getOtherVariableResultName(int solIdx, int otherIdx)
std::string getOtherConstraintResultType(int solIdx, int otherIdx)
std::string getOtherObjectiveResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the <obj> or <enumeration> array associated with an <other> resul...
int getAvailableCPUNumberValue()
std::string getObjValueName(int solIdx, int objIdx)
bool setOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
Set the number of <enumeration> children of another (non-standard/solver specific) variable-related r...
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's other (non-standard/solver specific)variable-related results,...
bool setSolverOutputCategory(int otherIdx, std::string category)
Set the category associated with the [j]th solver output.
bool setConstraintNumber(int constraintNumber)
Set the constraint number.
double getObjValue(int solIdx, int objIdx)
std::string getOtherGeneralResultDescription(int idx)
bool IsEqual(OSResult *that)
A function to check for the equality of two objects.
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,...
double getServiceUtilization()
bool setNumberOfOtherSystemResults(int num)
Set number of other system results.
bool setBasisStatus(int solIdx, int object, int status, int *i, int ni)
Set the basis status of a number of variables/constraints/objectives.
std::string getOtherConstraintResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
bool setAvailableMemoryValue(double value)
Set the amount of available memory.
bool setJobEndTime(std::string endTime)
Set the time when the job finished.
bool setServiceUtilization(double value)
Set the service utilitzation.
std::string getAvailableMemoryDescription()
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool setNumberOfOtherConstraintResults(int solIdx, int numberOfOtherConstraintResults)
Set the [i]th optimization solution's other (non-standard/solver specific) constraint-related results...
bool setOtherObjectiveResultObjType(int solIdx, int otherIdx, std::string objType)
Set the objType of another (non-standard/solver specific) objective-related result,...
bool setNumberOfObjValues(int solIdx, int numberOfObj)
Set the number of objectives to be given a value.
std::string getOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx)
int getOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx)
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...
bool setAvailableCPUSpeedUnit(std::string unit)
Set the unit in which available CPU speed is measured.
bool setOtherVariableResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) variable-related result,...
std::string getOtherServiceResultDescription(int idx)
bool setNumberOfVarValuesString(int solIdx, int numberOfVar)
Set the number of string-valued primal variables to be given a value.
std::string getOtherServiceResultName(int idx)
int getOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx)
std::string getUsedMemoryDescription()
bool setOtherConstraintResultCategory(int solIdx, int otherIdx, std::string category)
Set the category of another (non-standard/solver specific) constraint-related result,...
bool setScheduledStartTime(std::string scheduledStartTime)
Set the job's scheduled start time.
bool setServiceURI(std::string serviceURI)
Set service uri.
std::string getDualValueName(int solIdx, int objIdx)
int getDualValueIdx(int solIdx, int conIdx)
double getDualValue(int solIdx, int conIdx)
bool setDualValue(int solIdx, int number, int idx, std::string name, double val)
Set a dual value.
int getNumberOfOtherVariableResults(int solIdx)
Get numberOfOtherVariableResult.
bool setOtherServiceResultName(int idx, std::string name)
Set the service otherResult name.
bool setOtherSolutionResultValue(int solIdx, int otherIdx, std::string value)
Set the value associated with the [j]th other solution result of solution [i].
std::string getTimeStamp()
Get the time stamp.
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].
std::string getOtherObjectiveResultType(int solIdx, int otherIdx)
bool setOtherConstraintResultValue(int solIdx, int otherIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result,...
std::string getUsedCPUNumberDescription()
int getVariableNumber()
Get variable number.
bool setGeneralSubstatusDescription(int idx, std::string description)
Set the general substatus description.
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,...
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...
bool setSolutionTargetObjectiveIdx(int solIdx, int objectiveIdx)
Set the [i]th optimization solution's objective index, where i equals the given solution index.
JobResult * job
job holds the fourth child of the OSResult specified by the OSrL Schema.
bool setAvailableDiskSpaceUnit(std::string unit)
Set the unit in which available disk space is measured.
bool setOtherSystemResultDescription(int idx, std::string description)
Set the system otherResult description.
bool setSystemInformation(std::string systemInformation)
Set the system information.
int getOtherConstraintResultArrayDense(int solIdx, int otherIdx, std::string *resultArray, int dim)
Get the values of a <con> array or an <enumeration> associated with an <other> result for some soluti...
std::string getOtherJobResultName(int idx)
bool setAvailableMemoryDescription(std::string description)
Set the description of available memory.
int getAnOtherVariableResultNumberOfVar(int solIdx, int iOther)
Get getAnOtherVariableResultNumberOfVar.
std::string getOtherConstraintResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the <con> or <enumeration> array associated with an <other> resul...
bool setSolutionStatusType(int solIdx, std::string type)
Set the [i]th optimization solution status type.
bool setOtherGeneralResultValue(int idx, std::string value)
Set the general otherResult value.
std::string getOtherSystemResultName(int idx)
int getNumberOfOtherObjectiveResults(int solIdx)
bool setNumberOfSolverOutputs(int numberOfSolverOutputs)
Set the number of other solver outputs.
std::string getServiceURI()
Get service uri.
std::string getGeneralStatusType()
Get the general status type, which can be: success, error, warning.
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.
bool setOtherConstraintResultNumberOfCon(int solIdx, int otherIdx, int numberOfCon)
Set the number of <con> children of another (non-standard/solver specific) constraint-related result,...
std::string getOtherVariableResultArrayType(int solIdx, int otherIdx)
Get the type of values contained in the or <enumeration> array associated with an <other> result for...
int m_iConstraintNumber
m_iConstraintNumber holds the constraint number.
std::string getUsedCPUSpeedDescription()
bool setOtherSystemResultName(int idx, std::string name)
Set the system otherResult name.
bool setOtherSolutionResultCategory(int solIdx, int otherIdx, std::string category)
Set the category associated with the [j]th other solution result of solution [i].
int getOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx)
bool setOtherConstraintResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) constraint-related result,...
bool setConstraintValuesDense(int solIdx, double *constraintValues)
Set the [i]th optimization solution's constraint values, where i equals the given solution index.
bool setNumberOfVarValues(int solIdx, int numberOfVar)
Set the number of primal variables to be given a value.
int getOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx)
bool IsEqual(ObjValue *that)
A function to check for the equality of two objects.
ObjValue()
Default constructor.
~ObjValue()
Class destructor.
double value
the value of the objective indexed by idx
int idx
idx is the index on an objective function
std::string name
optional name
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
The ObjectiveSolution Class.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool IsEqual(ObjectiveSolution *that)
A function to check for the equality of two objects.
OtherObjectiveResult ** other
a pointer to an array of other pointer objects for objective functions
ObjectiveSolution()
Default constructor.
int numberOfOtherObjectiveResults
the number of types of objective function results other than the basic objective function values
~ObjectiveSolution()
Class destructor.
BasisStatus * basisStatus
a pointer to a BasisStatus object
ObjectiveValues * values
a pointer to an array of ObjectiveValues objects
The ObjectiveValues Class.
~ObjectiveValues()
Class destructor.
int numberOfObj
record the number of objective rows for which values are given
bool IsEqual(ObjectiveValues *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
ObjValue ** obj
obj is a pointer to an array of ObjValue objects that give an index and objective function value for ...
ObjectiveValues()
Default constructor.
The OptimizationResult Class.
int numberOfSolutions
numberOfSolutions is the number of objective functions reported.
OtherSolverOutput * otherSolverOutput
otherSolverOutput is a pointer to an OtherSolverOutput object
OptimizationResult()
Default constructor.
bool IsEqual(OptimizationResult *that)
A function to check for the equality of two objects.
int numberOfObjectives
numberOfObjectives is the number of objective functions reported in the solution.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
int numberOfVariables
numberOfVariables is the number of variables reported in the solution.
OptimizationSolution ** solution
solution is an array of pointers to OptimizationSolution objects
~OptimizationResult()
Class destructor.
int numberOfConstraints
numberOfConstrants is the number of constraint functions reported in the solution.
The OptimizationSolution Class.
VariableSolution * variables
variables holds the solution information for the variables
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
OptimizationSolution()
Default constructor.
ObjectiveSolution * objectives
objectives holds the solution information for the objectives
MatrixProgrammingSolution * matrixProgramming
matrixProgramming holds the solution information for the matrix programming components: matrix variab...
bool weightedObjectives
a marker to track whether the objectives are weighted
int targetObjectiveIdx
the index of the objective function for which we are reporting solution information
OtherSolutionResults * otherSolutionResults
otherSolutionResults is a pointer to an OtherSolutionResults object that is associated with this opti...
std::string targetObjectiveName
an optional name of the objective function for which we are reporting solution information
~OptimizationSolution()
Class destructor.
bool IsEqual(OptimizationSolution *that)
A function to check for the equality of two objects.
ConstraintSolution * constraints
constraints holds the solution information for the constraints
OptimizationSolutionStatus * status
status is a pointer to an OptimizationSolutionStatus object associated with this optimization solutio...
std::string message
a message associated with this solution
The OptimizationSolutionStatus Class.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
int numberOfSubstatuses
the number of substatus objects
OptimizationSolutionSubstatus ** substatus
a pointer to an array of substatus objects
bool IsEqual(OptimizationSolutionStatus *that)
A function to check for the equality of two objects.
std::string description
a description of the solution status type
OptimizationSolutionStatus()
Default constructor.
std::string type
the type of solution status
~OptimizationSolutionStatus()
Class destructor.
The OptimizationSolutionSubstatus Class.
bool IsEqual(OptimizationSolutionSubstatus *that)
A function to check for the equality of two objects.
std::string description
a description of the solution substatus
std::string type
the type of the solution substatus
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
~OptimizationSolutionSubstatus()
Class destructor.
OptimizationSolutionSubstatus()
Default constructor.
The OtherConResult Class.
int idx
idx is the index on the constraint
std::string name
optional name
~OtherConResult()
Class destructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool IsEqual(OtherConResult *that)
A function to check for the equality of two objects.
OtherConResult()
Default constructor.
std::string value
value is a value associated with the constraint indexed by idx, for example value might be the value ...
The OtherConstraintResult Class.
std::string conType
type of the values in the con array
int numberOfEnumerations
the number of distinct values for this particular type of result
bool IsEqual(OtherConstraintResult *that)
A function to check for the equality of two objects.
std::string description
a brief description of the type of result
std::string enumType
type of the values in the enumeration array
OtherConstraintResult()
Default constructor.
int numberOfCon
the number of constraints which have values for this particular type of result
~OtherConstraintResult()
Class destructor.
std::string name
the name of the result the user is defining
OtherOptionOrResultEnumeration ** enumeration
std::string type
type of the result value (integer, double, boolean, string)
std::string value
this element allows a specific value associated with this particular type of result
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
The in-memory representation of the <matrixVariables> <other> element.
std::string matrixType
the type of matrixVar
OtherOptionOrResultEnumeration ** enumeration
the enumeration.
int numberOfEnumerations
number of levels in an enumeration associated with this result
std::string enumType
the type of the enumeration
std::string name
Gives a name to this result.
OSMatrixWithMatrixVarIdx ** matrixVar
the list of matrices and their values
int numberOfMatrixVar
number of matrix variables affected by or associated with this result
std::string description
other data elements are optional
~OtherMatrixVariableResult()
The MatrixVariableValues class destructor.
OtherMatrixVariableResult()
The standard MatrixVariableValues class constructor.
The OtherObjResult Class.
~OtherObjResult()
Class destructor.
bool IsEqual(OtherObjResult *that)
A function to check for the equality of two objects.
OtherObjResult()
Default constructor.
std::string value
value is a value associated with an objective function indexed by idx
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
int idx
idx is the index on a objective function
std::string name
optional name
The OtherObjectiveResult Class.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string value
this element allows a specific value associated with this particular type of result
bool IsEqual(OtherObjectiveResult *that)
A function to check for the equality of two objects.
std::string objType
type of the values in the obj array
OtherObjectiveResult()
Default constructor.
int numberOfEnumerations
the number of distinct values for this particular type of result
std::string description
a brief description of the type of result
std::string enumType
type of the values in the enumeration array
OtherOptionOrResultEnumeration ** enumeration
int numberOfObj
the number of objectives which have values for this particular type of result
std::string type
type of the result value (integer, double, boolean, string)
~OtherObjectiveResult()
Class destructor.
std::string name
the name of the result the user is defining
std::string name
the name of the other result
OtherResult()
Default constructor.
~OtherResult()
Class destructor.
std::string description
the description of the other result
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool IsEqual(OtherResult *that)
A function to check for the equality of two objects.
std::string value
the value of the other result
int numberOfOtherResults
the number of other results
OtherResults()
Default constructor.
bool IsEqual(OtherResults *that)
A function to check for the equality of two objects.
OtherResult ** other
the array of other results
~OtherResults()
Class destructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
The OtherSolutionResult Class.
std::string name
the name of the result the user is defining
std::string * item
an array of items (string-valued)
std::string description
a brief description of the type of result
std::string value
the value associated with the result the user is defining
bool IsEqual(OtherSolutionResult *that)
A function to check for the equality of two objects.
std::string category
this element allows a specific category to be associated with this particular type of result
~OtherSolutionResult()
Class destructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
int numberOfItems
the number of items contained in this otherSolutionResult
OtherSolutionResult()
Default constructor.
The OtherSolutionResults Class.
int numberOfOtherSolutionResults
the number of elements in the pointer of OtherSolutionResult objects
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
OtherSolutionResults()
Default constructor.
OtherSolutionResult ** otherSolutionResult
otherSolutionResult is a pointer to an array of OtherSolutionResult objects
bool IsEqual(OtherSolutionResults *that)
A function to check for the equality of two objects.
~OtherSolutionResults()
Class destructor.
The OtherSolverOutput Class.
OtherSolverOutput()
Default constructor.
SolverOutput ** solverOutput
solverOutput is a pointer to an array of SolverOutput objects
bool IsEqual(OtherSolverOutput *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
~OtherSolverOutput()
Class destructor.
int numberOfSolverOutputs
the number of elements in the pointer of SolverOutput objects
OtherVarResult()
Default constructor.
std::string value
value holds a general value associated with a variable, for example, rather than the value of a varia...
~OtherVarResult()
Class destructor.
int idx
the index of a variable in the solution
bool IsEqual(OtherVarResult *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string name
optional name
The OtherVariableResult Class.
OtherVariableResult()
Default constructor.
int numberOfEnumerations
the number of distinct values for this particular type of result
std::string value
this element allows a specific value associated with this particular type of result
std::string varType
type of the values in the var array
std::string enumType
type of the values in the enumeration array
bool IsEqual(OtherVariableResult *that)
A function to check for the equality of two objects.
~OtherVariableResult()
Class destructor.
std::string type
type of the result value (integer, double, boolean, string)
std::string description
a brief description of the type of result
OtherOptionOrResultEnumeration ** enumeration
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string name
the name of the result the user is defining
int numberOfVar
the number of variables which have values for this particular type of result
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
double serviceUtilization
service utilization
int totalJobsSoFar
total jobs processed so far
bool IsEqual(ServiceResult *that)
A function to check for the equality of two objects.
~ServiceResult()
Class destructor.
int currentJobCount
the number of jobs currently running
OtherResults * otherResults
a pointer to the OtherResults class
ServiceResult()
Default constructor.
std::string currentState
a string describing the current state of the service
std::string timeServiceStarted
the time when the service was started
~SolverOutput()
Class destructor.
int numberOfItems
the number of items contained in this otherSolutionResult
std::string category
this element allows a specific category to be associated with this particular type of result
std::string name
the name of the result the user is defining
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string * item
an array of items (string-valued)
std::string description
a brief description of the type of result
bool IsEqual(SolverOutput *that)
A function to check for the equality of two objects.
SolverOutput()
Default constructor.
the StorageCapacity class.
OtherResults * otherResults
a pointer to the OtherResults class
std::string systemInformation
a string containing some basic system information
bool IsEqual(SystemResult *that)
A function to check for the equality of two objects.
StorageCapacity * availableMemory
a pointer to the MemorySize class
CPUNumber * availableCPUNumber
a pointer to the CPUNumber class
~SystemResult()
Class destructor.
StorageCapacity * availableDiskSpace
a pointer to the DiskSpace class
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
SystemResult()
Default constructor.
CPUSpeed * availableCPUSpeed
a pointer to the CPUSpeed class
std::string unit
The unit of time (tick/millisecond/second/minute/hour/day/week/month/year)
double value
The time measurement.
Time()
Default constructor.
std::string category
The category of time (total/input/preprocessing/optimization/postprocessing/output/other)
The TimeMeasurement Class.
std::string category
The category of time (total/input/preprocessing/optimization/postprocessing/output/other)
bool IsEqual(TimeMeasurement *that)
A function to check for the equality of two objects.
TimeMeasurement()
Default constructor.
std::string description
Further description on the timer used.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
std::string type
The type of timer used (cpuTime/elapsedTime/other)
~TimeMeasurement()
Class destructor.
bool IsEqual(TimeSpan *that)
A function to check for the equality of two objects.
std::string unit
the unit in which time is measured
TimeSpan()
Default constructor.
double value
the number of units
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
VarValue()
Default constructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
int idx
idx is the index on variable in the solution
~VarValue()
Class destructor.
bool IsEqual(VarValue *that)
A function to check for the equality of two objects.
std::string name
optional name
std::string name
optional name
int idx
idx is the index on variable in the solution
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool IsEqual(VarValueString *that)
A function to check for the equality of two objects.
VarValueString()
Default constructor.
~VarValueString()
Class destructor.
The VariableSolution Class.
VariableSolution()
Default constructor.
OtherVariableResult ** other
a pointer to an array of other pointer objects for variables
BasisStatus * basisStatus
a pointer to a BasisStatus object
bool IsEqual(VariableSolution *that)
A function to check for the equality of two objects.
int numberOfOtherVariableResults
the number of types of variable results other than the value of the variable
~VariableSolution()
Class destructor.
VariableValues * values
a pointer to a VariableValues object
VariableValuesString * valuesString
a pointer to a VariableValuesString object
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
The VariableValues Class.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
VariableValues()
Default constructor.
VarValue ** var
a vector of VarValue objects, there will be one for each variable in the solution
int numberOfVar
the number of variable values that are in the solution
~VariableValues()
Class destructor.
bool IsEqual(VariableValues *that)
A function to check for the equality of two objects.
The VariableValuesString Class.
VariableValuesString()
Default constructor.
bool IsEqual(VariableValuesString *that)
A function to check for the equality of two objects.
VarValueString ** var
a vector of VarValueString objects, there will be one for each variable in the solution
int numberOfVar
the number of string-valued variable values that are in the solution
~VariableValuesString()
Class destructor.
bool setRandom(double density, bool conformant)
A function to make a random instance of this class.
bool verifySolutionSubstatusType(std::string type)
bool verifySolutionStatus(std::string status)
bool verifyCPUSpeedUnit(std::string unit)
std::string returnMatrixTypeString(ENUM_MATRIX_TYPE type)
bool verifyJobStatus(std::string status)
bool verifySystemCurrentState(std::string status)
@ ENUM_OUTPUT_LEVEL_debug
@ ENUM_OUTPUT_LEVEL_trace
@ ENUM_OUTPUT_LEVEL_error
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
@ ENUM_MATRIX_TYPE_constant
bool verifyTimeUnit(std::string unit)
bool verifyTimeType(std::string type)
bool verifyGeneralResultStatus(std::string status)
@ ENUM_MATRIX_SYMMETRY_lower
@ ENUM_OUTPUT_AREA_OSOption
@ ENUM_OUTPUT_AREA_OSResult
@ ENUM_PROBLEM_COMPONENT_objectives
@ ENUM_PROBLEM_COMPONENT_constraints
@ ENUM_PROBLEM_COMPONENT_variables
bool verifyTimeCategory(std::string category)
bool verifyStorageUnit(std::string unit)
A commonly used structure holding an index-value pair.
int idx
idx holds the index of an entity (such as a variable, constraint, objective) that is part of a sparse...
double value
value is a double that holds the value of the entity