141 #include <cppad/cppad.hpp>
146 #include "OSResult.h"
154 #include "OSInstance.h"
157 #include "CoinError.hpp"
167 #include <CoinMpsIO.hpp>
168 #include <CoinPackedMatrix.hpp>
169 #include "CoinError.hpp"
170 #include "CoinHelperFunctions.hpp"
171 #include "OsiSolverInterface.hpp"
174 #include <OsiGlpkSolverInterface.hpp>
177 #ifdef COIN_HAS_COUENNE
186 #ifdef COIN_HAS_LINDO
190 #ifdef COIN_HAS_IPOPT
194 #ifdef COIN_HAS_BONMIN
203 #include "OsiCpxSolverInterface.hpp"
207 #include "OsiGrbSolverInterface.hpp"
211 #include "OsiMskSolverInterface.hpp"
214 #ifdef COIN_HAS_SOPLEX
215 #include "OsiSpxSolverInterface.hpp"
219 #include "OsiXprSolverInterface.hpp"
222 #ifdef COIN_HAS_GAMSUTILS
232 # error "don't have header file for time"
250 # error "don't have header file for stdio"
265 using std::ostringstream;
269 int main(
int argC,
char* argV[])
272 WindowsErrorPopupBlocker();
289 std::string testConfig =
"install";
292 std::cout <<
"Too Many Input Parameters" << std::endl;
296 testConfig = argV[ 1];
297 std::cout <<
"test configuration = \'" << testConfig <<
"\'"<< std::endl;
301 testConfig =
"parser";
304 if (testConfig ==
"install") testLevel = 1;
305 if (testConfig ==
"parser" ) testLevel = 2;
306 if (testConfig ==
"parsers") testLevel = 2;
307 if (testConfig ==
"solver" ) testLevel = 3;
308 if (testConfig ==
"solvers") testLevel = 3;
309 if (testConfig ==
"release") testLevel = 4;
310 if (testConfig ==
"nightlyBuild") testLevel = 4;
311 if (testConfig ==
"all") testLevel = 4;
312 if (testConfig ==
"NB") testLevel = 4;
313 if (testConfig ==
"nb") testLevel = 4;
320 PARSER_TESTS =
false;
325 SOLVER_TESTS =
false;
334 PARSER_TESTS =
false;
347 if (BASIC_TESTS) std::cout <<
"Perform basic tests" << std::endl;
350 std::cout <<
"Perform thorough solver tests" << std::endl;
352 std::cout <<
"Perform simple solver tests" << std::endl;
354 if (PARSER_TESTS) std::cout <<
"Perform parser tests" << std::endl;
355 if (OTHER_TESTS) std::cout <<
"Perform other tests" << std::endl;
356 std::cout << std::endl << std::endl;
360 cout <<
"START UNIT TEST" << endl;
394 std::string *nodeNames1 = NULL;
395 std::string *nodeNames2 = NULL;
399 std::string osilFileName;
400 std::string osolFileName;
401 std::string osrlFileName;
402 std::string nlFileName;
403 std::string mpsFileName;
406 ostringstream unitTestResult;
407 ostringstream unitTestResultFailure;
410 const char dirsep = CoinFindDirSeparator();
413 dataDir = dirsep ==
'/' ?
"../data/" :
"..\\data\\";
415 dataDir =
"C:\\datafiles\\research\\OS\\OS-trunk-work\\OS\\data\\";
420 if(BASIC_TESTS ==
true){
424 std::cout << endl <<
"TEST " << ++nOfTest <<
": Try to read a sample file" << endl << endl;
430 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinearByRow.osil";
432 std::cout <<
"The file is: " ;
433 std::cout << osilFileName << std::endl;
435 std::cout <<
"Done reading the test file" << std::endl;
436 osinstance = osilreader->
readOSiL( osil);
438 unitTestResult <<
"TEST " << nOfTest <<
": Reading files successfully" << std::endl;
439 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
449 unitTestResultFailure <<
"Sorry Unit Test Failed Test " << nOfTest <<
": Reading from file " + eclass.
errormsg << endl;
451 unitTestResultFailure <<
"Since we can't read files we are terminating" << endl;
452 cout << unitTestResultFailure.str() << endl << endl;
453 cout <<
"Conclusion: FAILURE" << endl;
454 if (fileUtil != NULL)
459 if (osilreader != NULL)
464 if (osilwriter != NULL)
474 cout << endl <<
"TEST " << ++nOfTest <<
": Lossless I/O" << endl << endl;
479 mpsFileName = dataDir +
"mpsFiles" + dirsep +
"parinc.mps";
480 mps2osil =
new OSmps2OS( mpsFileName);
486 std::string sOSiL = osilwriter->
writeOSiL( osinstance1 );
488 cout << sOSiL << endl;
495 double theDiff, theMax;
498 for(
int i = 0; i < nvals; i++){
501 if(theDiff > theMax){
506 std::cout <<
"MAXIMUM DIFF = " << theMax << std::endl;
510 std::cout <<
"MAXIMUM DIFF INDEX = " << theIndex << std::endl;
511 unitTestResult <<
"WARNING: you do not have lossless IO" << std::endl;
512 temp <<
"Large discrepancy at position " << theIndex <<
": " << theMax << std::endl;
517 unitTestResult <<
"TEST " << nOfTest <<
": Passed lossless IO test" << std::endl;
518 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
529 unitTestResultFailure <<
"Unit Test Failed Lossless I/O test -- Test " << nOfTest <<
": " + eclass.
errormsg<< endl;
530 if (mps2osil != NULL)
533 if (osilreader != NULL)
536 if (osilwriter != NULL)
543 cout << endl <<
"TEST " << ++nOfTest <<
": nonlinear operators" << endl << endl;
550 std::string operatorTest = dataDir +
"osilFiles" + dirsep +
"testOperators.osil";
552 cout <<
"Read testOperators.osil...";
553 osinstance = osilreader->
readOSiL( osil);
554 cout <<
"Done" << endl;
556 std::string osil2 = osilwriter->
writeOSiL( osinstance);
557 std::cout << osil2 << endl;
558 cout <<
"Read osil again...";
560 cout <<
"Done" << endl;
563 std::vector<ExprNode*> postfixVec;
565 int n = postfixVec.size();
566 nodeNames1 =
new std::string[
n];
567 for (
int i = 0 ; i <
n; i++)
569 std::cout <<
"node " << i <<
"@" << postfixVec[i] <<
": " << postfixVec[i]->getTokenName();
570 std::cout <<
" scalar kids = " << postfixVec[i]->inumberOfChildren;
571 std::cout <<
" matrix kids = " << postfixVec[i]->inumberOfMatrixChildren << std::endl;
572 nodeNames1[i] = postfixVec[i]->getTokenName();
591 if (ok ==
false)
throw ErrorClass(
" Problem evaluating expression tree");
592 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of nonlinear operators using file testOperators.osil" << std::endl;
593 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
597 unitTestResultFailure <<
"Sorry Unit Test Failed Test " << nOfTest <<
": nonlinear operators " + eclass.
errormsg << endl;
598 cout << endl << endl << endl;
599 unitTestResultFailure << eclass.
errormsg << endl;
603 if (nodeNames1 != NULL)
606 if (osilreader != NULL)
609 if (osilwriter != NULL)
612 if (fileUtil != NULL)
620 cout << endl <<
"TEST " << ++nOfTest <<
": Automatic differentiation" << endl << endl;
625 std::string expTreeTest = dataDir +
"osilFiles" + dirsep +
"CppADTestLag.osil";
636 cout <<
"Read file" << endl;
637 osinstance = osilreader->
readOSiL( osil);
646 cout <<
"Perform gradient computations" << endl;
651 double checkPartial2Con1 = 7.0 ;
653 if(ok ==
false)
throw ErrorClass(
" Fail testing gradient calculation");
654 double checkPartial0Con1 = (1./x[0]) ;
656 if(ok ==
false)
throw ErrorClass(
" Fail testing gradient calculation");
657 double checkPartial3Con1 = (1./x[3]) ;
659 if(ok ==
false)
throw ErrorClass(
" Fail testing gradient calculation");
664 cout <<
"Perform Hessian computations" << endl;
668 if(ok ==
false)
throw ErrorClass(
" Fail testing Hessian calculation");
670 if(ok ==
false)
throw ErrorClass(
" Fail testing Hessian calculation");
672 if(ok ==
false)
throw ErrorClass(
" Fail testing Hessian calculation");
679 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of AD gradient and Hessian calculations" << std::endl;
680 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
684 unitTestResultFailure <<
"Sorry Unit Test Failed Test " << nOfTest <<
": Automatic differentiation " + eclass.
errormsg << endl;
685 cout << endl << endl << endl;
686 unitTestResultFailure <<
"Failed test " << nOfTest << endl << eclass.
errormsg << endl;
690 if (osilreader != NULL)
693 if (fileUtil != NULL)
704 cout << endl <<
"TEST " << ++nOfTest <<
": Test parsing an OSiL file (parincLinear.osil)" << endl << endl;
710 clock_t start, finish;
712 cout <<
"Test parsing a model" << endl;
713 cout <<
"First read the file into a string" << endl;
715 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinear.osil";
718 duration = (double) (finish - start) / CLOCKS_PER_SEC;
719 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
721 cout <<
"PARSE THE OSIL STRING INTO AN OSINSTANCE OBJECT" << endl;
733 duration = (double) (finish - start) / CLOCKS_PER_SEC;
734 cout <<
"Parsing took (seconds): "<< duration << endl;
735 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSiL parser on problem parincLinear.osil" << std::endl;
736 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
740 unitTestResultFailure <<
"Sorry Unit Test Failed Test " << nOfTest <<
": OSiL parser " + eclass.
errormsg << endl;
741 cout << endl << endl << endl;
743 unitTestResultFailure <<
"Sorry Unit Test Failed Testing An OSiL Parser (Test " << nOfTest <<
")" << endl;
745 if (osilreader != NULL)
748 if (osilwriter != NULL)
751 if (fileUtil != NULL)
762 cout << endl <<
"TEST " << ++nOfTest <<
": OSInstance get() and set() methods" << endl << endl;
767 cout <<
"Read file" << endl;
768 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockmod.osil";
770 osinstance = osilreader->
readOSiL( osil);
774 cout <<
"Copy header information" << endl;
775 std::string name, source, description, fileCreator, licence;
790 cout <<
"Copy variables" << endl;
804 if (!osinstance2->
setVariables(nvar, varname, varlb, varub, vartype))
throw ErrorClass(
"Error duplicating variable information");
808 cout <<
"Copy objectives" << endl;
823 if (!osinstance2->
setObjectives(nobj, objname, objdir, objconst, objweight, objcoeff))
throw ErrorClass(
"Error duplicating objective information");
827 cout <<
"Copy constraints" << endl;
841 if (!osinstance2->
setConstraints(ncon, conname, conlb, conub, con_c))
throw ErrorClass(
"Error duplicating constraint information");
845 cout <<
"Copy linear constraint coefficient matrix" << endl;
867 coeff->
values, 0, ncoef-1,
869 coeff->
starts, 0, nstart))
870 throw ErrorClass(
"Error duplicating linear constraint coefficients");
874 cout <<
"Copy quadratic terms" << endl;
884 throw ErrorClass(
"Error duplicating quadratic coefficients");
888 cout <<
"Copy nonlinear expressions" << endl;
902 throw ErrorClass(
"Error duplicating nonlinear expressions");
906 cout <<
"Compare the two instances" << endl;
907 if (!osinstance2->
IsEqual(osinstance))
throw ErrorClass(
"Loss of data during duplication");
912 unitTestResult <<
"TEST " << nOfTest <<
": Passed OSInstance get() and set() methods" << std::endl;
913 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
932 unitTestResultFailure <<
"Unit Test Failed OSInstance get() and set() methods (Test "
933 << nOfTest <<
"): " + eclass.
errormsg<< endl;
934 if (osinstance2 != NULL)
937 if (osilreader != NULL)
940 if (osilwriter != NULL)
943 if (fileUtil != NULL)
949 if( THOROUGH ==
true)
952 cout << endl <<
"TEST " << ++nOfTest <<
": Test parsing another OSiL file (testMatricesAndCones.osil)" << endl << endl;
960 cout <<
"First read the file into a string" << endl;
961 osilFileName = dataDir +
"osilFiles" + dirsep +
"testMatricesAndCones.osil";
963 cout <<
"PARSE THE OSIL STRING INTO AN OSINSTANCE OBJECT" << endl;
964 instance1 = osilreader->
readOSiL( osil);
966 cout <<
"Write the OSInstance object to a temporary file (i.e., string)" << endl;
967 std::string temposil = osilwriter->
writeOSiL(instance1);
968 cout << temposil << endl;
969 cout <<
"Parse the temporary string again" << endl;
971 instance2 = osilreader2->
readOSiL( temposil);
973 cout <<
"compare the two objects" << endl;
974 if (!instance2->
IsEqual(instance1))
975 throw ErrorClass(
"<matrices> and <cones> not processed correctly");
985 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSiL parser on problem testMatricesAndCones.osil" << std::endl;
986 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
990 cout << endl <<
"TEST " << ++nOfTest <<
": Test matrix manipulation routines (using testMatricesAndCones.osil)" << endl << endl;
1040 cout << endl <<
"Test matrix expansion in column major form" << endl;
1045 throw ErrorClass(
"Failed column expansion of matrix 32 (by columns)");
1047 throw ErrorClass(
"Failed diagonality assessment of matrix 32");
1049 int rowPartition1[3];
1050 rowPartition1[0]= 0;
1051 rowPartition1[1]= 3;
1052 rowPartition1[2]= 7;
1054 int colPartition1[3];
1055 colPartition1[0]= 0;
1056 colPartition1[1]= 2;
1057 colPartition1[2]= 6;
1059 cout << endl <<
"Test matrix expansion in blocks form" << endl;
1062 ->
getBlocks(rowPartition1,3,colPartition1,3,
false,
false);
1064 throw ErrorClass(
"Failed block expansion of matrix 32");
1066 throw ErrorClass(
"Failed block expansion of matrix 32");
1068 throw ErrorClass(
"Failed block expansion of matrix 32");
1070 throw ErrorClass(
"Failed block expansion of matrix 32");
1072 cout << endl <<
"Test matrix expansion in row major form" << endl;
1076 throw ErrorClass(
"Failed row expansion of matrix 32");
1078 throw ErrorClass(
"Failed diagonality assessment of matrix 32 (by rows)");
1081 cout << endl <<
"Another matrix expansion in column major form" << endl;
1086 throw ErrorClass(
"Failed column expansion of matrix 35 (by columns)");
1088 int rowPartition2[6];
1089 rowPartition1[0]= 0;
1090 rowPartition1[1]= 5;
1091 rowPartition1[2]= 10;
1092 rowPartition1[3]= 15;
1093 rowPartition1[4]= 20;
1094 rowPartition1[5]= 25;
1096 int colPartition2[5];
1097 colPartition1[0]= 0;
1098 colPartition1[1]= 6;
1099 colPartition1[2]= 12;
1100 colPartition1[3]= 18;
1101 colPartition1[4]= 24;
1103 cout << endl <<
"Another matrix expansion in blocks format" << endl;
1106 ->
getBlocks(rowPartition2,6,colPartition2,5,
false,
false);
1108 throw ErrorClass(
"Failed block expansion of matrix 35");
1110 throw ErrorClass(
"Failed block expansion of matrix 35");
1112 throw ErrorClass(
"Failed block expansion of matrix 35");
1114 throw ErrorClass(
"Failed block expansion of matrix 35");
1116 throw ErrorClass(
"Failed block expansion of matrix 35");
1118 throw ErrorClass(
"Failed block expansion of matrix 35");
1121 cout << endl <<
"Another matrix expansion in row major form" << endl;
1125 throw ErrorClass(
"Failed column expansion of matrix 35 (by rows)");
1135 cout << endl <<
"Test matrix expansion 3_a" << endl;
1139 ->
getBlocks(partition3,4,partition3,4,
false,
true);
1141 if (test3_a == NULL)
1142 throw ErrorClass(
"Failed block expansion of matrix 36");
1144 throw ErrorClass(
"Failed block expansion of matrix 36");
1146 throw ErrorClass(
"Failed block expansion of matrix 36");
1148 cout << endl <<
"Test matrix expansion 3_b" << endl;
1151 throw ErrorClass(
"Failed block expansion of matrix 36");
1153 throw ErrorClass(
"Failed block expansion of matrix 36");
1155 cout << endl <<
"Test matrix expansion 3_c" << endl;
1158 throw ErrorClass(
"Failed block expansion of matrix 36");
1160 throw ErrorClass(
"Failed block expansion of matrix 36");
1162 cout << endl <<
"Test matrix expansion 3_d" << endl;
1164 if (test3_d != NULL)
1165 throw ErrorClass(
"Failed block expansion of matrix 36");
1168 cout << endl <<
"Test matrix expansion 6_a" << endl;
1172 throw ErrorClass(
"Failed diagonality assessment of matrix 11 (by columns)");
1174 cout << endl <<
"Test matrix expansion 6_b" << endl;
1178 throw ErrorClass(
"Failed diagonality assessment of matrix 11 (by rows)");
1189 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of matrix manipulation routines" << std::endl;
1190 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
1194 cout << endl << endl << endl;
1196 unitTestResultFailure <<
"Sorry Unit Test Failed Testing OSiL <matrix> Parser (Test "
1197 << nOfTest <<
")" << endl;
1199 if (osilreader != NULL)
1202 if (osilreader2 != NULL)
1205 if (osilwriter != NULL)
1208 if (fileUtil != NULL)
1218 std::string *sncheck =
new std::string[6];
1219 int *nvcheck =
new int[6];
1220 int *nccheck =
new int[6];
1221 int *nocheck =
new int[6];
1222 int **lvcheck =
new int*[6];
1223 int **lccheck =
new int*[6];
1224 int **locheck =
new int*[6];
1225 std::string *sn1 =
new std::string[6];
1226 int *nv1=
new int[6];
1227 int *nc1 =
new int[6];
1228 int *no1 =
new int[6];
1229 int **
lv1 =
new int*[6];
1230 int **
lc1 =
new int*[6];
1231 int **lo1 =
new int*[6];
1232 int *nelem =
new int[4];
1233 int *startIdx =
new int[4];
1234 int **VI =
new int*[4];
1237 cout << endl <<
"TEST " << ++nOfTest <<
": Stochastic extensions to OSiL" << endl << endl;
1242 clock_t start, finish;
1244 cout <<
"\nTest parsing a stochastic model" << endl;
1245 cout <<
"First read the file into a string" << endl;
1247 osilFileName = dataDir +
"osilFiles" + dirsep +
"finplan1.osil";
1250 duration = (double) (finish - start) / CLOCKS_PER_SEC;
1251 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
1253 cout <<
"PARSE THE OSIL STRING INTO AN OSINSTANCE OBJECT" << endl;
1256 duration = (double) (finish - start) / CLOCKS_PER_SEC;
1257 cout <<
"Parsing took (seconds): "<< duration << endl;
1258 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSiL parser on problem finplan1.osil" << std::endl;
1259 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
1266 cout << endl << endl << endl;
1268 unitTestResultFailure <<
"Error parsing an osil file with time domain information (Test " << nOfTest <<
")" << endl;
1270 if (osilreader != NULL)
1273 if (fileUtil != NULL)
1281 cout << endl <<
"TEST " << ++nOfTest <<
": GET() AND SET() METHODS FOR TimeDomain OBJECT" << endl << endl;
1286 osinstance = osilreader->
readOSiL( osil);
1288 ok = (f ==
"stages");
1295 sncheck[3] =
"test";
1296 sncheck[4] =
"Wha'zzup?";
1301 for (
int i = 0; i < 6; i++)
1302 ok &= (sn[i] == sncheck[i]);
1313 for (
int i = 0; i < 6; i++)
1314 ok &= (nv[i] == nvcheck[i]);
1325 for (
int i = 0; i < 6; i++)
1326 ok &= (nc[i] == nccheck[i]);
1337 for (
int i = 0; i < 6; i++)
1338 ok &= (no[i] == nocheck[i]);
1344 for (
int i = 0; i < 6; i++)
1346 lvcheck[i] =
new int[2];
1347 lccheck[i] =
new int[2];
1348 locheck[i] =
new int[2];
1368 for (
int i = 0; i < 6; i++) {
1369 for (
int j = 0;
j < nv[i];
j++)
1370 ok &= (lvcheck[i][
j] == lv[i][
j]);
1371 for (
int j = 0; j < nc[i]; j++)
1372 ok &= (lccheck[i][j] == lc[i][j]);
1373 for (
int j = 0; j < no[i]; j++)
1374 ok &= (locheck[i][j] == lo[i][j]);
1378 for (
int i = 0; i < 6; i++) {
1383 lv1[i] =
new int[2];
1384 lc1[i] =
new int[2];
1385 lo1[i] =
new int[2];
1386 for (
int j = 0;
j < nv[i];
j++) {
1387 lv1[i][
j] = lv[i][
j];
1389 for (
int j = 0;
j < nc[i];
j++) {
1390 lc1[i][
j] = lc[i][
j];
1392 for (
int j = 0;
j < no[i];
j++) {
1393 lo1[i][
j] = lo[i][
j];
1405 for (
int i = 0; i < 4; i++)
1414 for (
int i = 0; i < 4; i++)
1420 for (
int i = 0; i < 4; i++)
1432 ok &= (lower == 0.0);
1434 ok &= (upper == 1.0);
1451 for (
int i = 0; i < n2; i++)
1452 { ok &= (sn2[i] == sncheck[i]);
1453 ok &= (nv2[i] == nvcheck[i]);
1454 ok &= (nc2[i] == nccheck[i]);
1455 ok &= (no2[i] == nocheck[i]);
1456 for (
int j = 0;
j < nv2[i];
j++)
1457 ok &= (lv2[i][
j] == lvcheck[i][
j]);
1458 for (
int j = 0; j < nc2[i]; j++)
1459 ok &= (lc2[i][j] == lccheck[i][j]);
1460 for (
int j = 0; j < no2[i]; j++)
1461 ok &= (lo2[i][j] == locheck[i][j]);
1464 if (sncheck != NULL)
1467 if (nvcheck != NULL)
1470 if (nccheck != NULL)
1473 if (nocheck != NULL)
1477 for (
int i = 0; i < 6; i++) {
1478 if (lvcheck[i] != NULL)
1479 delete [] lvcheck[i];
1480 if (lccheck[i] != NULL)
1481 delete [] lccheck[i];
1482 if (locheck[i] != NULL)
1483 delete [] locheck[i];
1491 if (lvcheck != NULL)
1494 if (lccheck != NULL)
1497 if (locheck != NULL)
1524 if (startIdx != NULL)
1529 for (
int i = 0; i < 4; i++) {
1537 if (osilreader != NULL)
1540 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of osinstance get() and set() methods" << std::endl;
1541 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
1545 cout << endl << endl << endl;
1547 unitTestResultFailure <<
"Sorry Unit Test Failed osinstance get() and set() Methods (Test "<< nOfTest <<
")" << endl;
1549 if (sncheck != NULL)
1552 if (nvcheck != NULL)
1555 if (nccheck != NULL)
1558 if (nocheck != NULL)
1562 for (
int i = 0; i < 6; i++) {
1563 if (lvcheck[i] != NULL)
1564 delete [] lvcheck[i];
1565 if (lccheck[i] != NULL)
1566 delete [] lccheck[i];
1567 if (locheck[i] != NULL)
1568 delete [] locheck[i];
1576 if (lvcheck != NULL)
1579 if (lccheck != NULL)
1582 if (locheck != NULL)
1609 if (startIdx != NULL)
1614 for (
int i = 0; i < 4; i++) {
1622 if (osilreader != NULL)
1626 #endif // test of <timeDomain> and various set() and get) methods
1646 cout << endl <<
"TEST " << ++nOfTest <<
": OSoL parser" << endl << endl;
1652 std::string tmpOSoL;
1653 clock_t start, finish;
1655 cout <<
"Test parsing an OSoL file" << endl;
1656 cout <<
"First read the OSoL file into a string" << endl;
1657 osolFileName = dataDir +
"osolFiles" + dirsep +
"parsertest.osol";
1658 cout << osolFileName << endl;
1662 duration = (double) (finish - start) / CLOCKS_PER_SEC;
1663 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
1665 cout <<
"PARSE THE OSOL STRING INTO AN OSOPTION OBJECT" << endl;
1666 osoption = osolreader->
readOSoL( osol);
1669 cout << endl <<
"Test the add() methods" << endl;
1697 std::string SOS3nam[2];
1702 SOS3nam[0] =
"a name";
1703 SOS3nam[1] =
"another";
1715 cout << endl <<
"another SOS has been added" << endl << endl;
1720 varopt->
name =
"testVarOpt";
1735 cout << endl <<
"another variable option has been added" << endl << endl;
1740 objopt->
name =
"testObjOpt";
1747 cout << endl <<
"another objective option has been added" << endl << endl;
1755 conopt->
name =
"testConOpt";
1775 cout << endl <<
"another constraint option has been added" << endl << endl;
1781 throw ErrorClass(
" Could not add to osoption data structure");
1784 std::string optionstring, fileName, fileSource, fileDescription, fileCreator, fileLicence;
1790 cout << endl <<
"transfer osoption to another OSOption object" << endl;
1797 ok = osoption2->
setHeader(fileName, fileSource, fileDescription, fileCreator, fileLicence);
1800 throw ErrorClass(
" error in get/set option header");
1808 throw ErrorClass(
" error in get/set ServiceURI");
1815 throw ErrorClass(
" error in get/set ServiceName");
1822 throw ErrorClass(
" error in get/set InstanceName");
1829 throw ErrorClass(
" error in get/set InstanceLocation");
1836 throw ErrorClass(
" error in get/set InstanceLocationtype");
1839 optionstring = osoption->
getJobID();
1840 ok = osoption2->
setJobID(optionstring) && ok;
1850 throw ErrorClass(
" error in get/set SolverToInvoke");
1857 throw ErrorClass(
" error in get/set InstanceLocationType");
1864 throw ErrorClass(
" error in get/set UserName");
1870 throw ErrorClass(
" error in get/set Password");
1875 ok = osoption2->
setContact(optionstring) && ok;
1878 throw ErrorClass(
" error in get/set Contact");
1885 throw ErrorClass(
" error in get/set TransportType");
1895 throw ErrorClass(
" error in get/set OtherGeneralOption");
1898 std::string tempDescription;
1903 ok = osoption2->
setMinDiskSpace(optionstring,tempDescription,option_d) && ok;
1906 throw ErrorClass(
" error in get/set MinDiskSpace");
1912 ok = osoption2->
setMinMemorySize(optionstring,tempDescription,option_d) && ok;
1915 throw ErrorClass(
" error in get/set MinMemorySize");
1921 ok = osoption2->
setMinCPUSpeed(optionstring,tempDescription,option_d) && ok;
1924 throw ErrorClass(
" error in get/set MinCPUSpeed");
1932 throw ErrorClass(
" error in get/set MinCPUNumber");
1941 throw ErrorClass(
" error in get/set OtherSystemOptions");
1949 throw ErrorClass(
" error in get/set ServiceType");
1958 throw ErrorClass(
" error in get/set OtherServiceOptions");
1966 throw ErrorClass(
" error in get/set MaxTime");
1973 throw ErrorClass(
" error in get/set MaxTimeUnit");
1980 throw ErrorClass(
" error in get/set RequestedStartTime");
1988 throw ErrorClass(
" error in get/set JobDependencies");
1996 throw ErrorClass(
" error in get/set RequiredDirectories");
2004 throw ErrorClass(
" error in get/set RequiredFiles");
2012 throw ErrorClass(
" error in get/set DirectoriesToMake");
2020 throw ErrorClass(
" error in get/set FilesToMake");
2028 throw ErrorClass(
" error in get/set InputDirectoriesToMove");
2036 throw ErrorClass(
" error in get/set InputFilesToMove");
2044 throw ErrorClass(
" error in get/set OutputFilesToMove");
2052 throw ErrorClass(
" error in get/set OutputDirectoriesToMove");
2060 throw ErrorClass(
" error in get/set FilesToDelete");
2068 throw ErrorClass(
" error in get/set DirectoriesToDelete");
2076 throw ErrorClass(
" error in get/set ProcessesToKill");
2085 throw ErrorClass(
" error in get/set OtherJobOptions");
2088 int nvar, nobj, ncon;
2101 throw ErrorClass(
" error in get/set problem dimensions");
2111 throw ErrorClass(
" error in get/set InitVarValues");
2121 throw ErrorClass(
" error in get/set InitVarValuesString");
2129 IBS =
new int[nvar];
2135 throw ErrorClass(
" error in get/set InitBasisStatus");
2142 IBS =
new int[nvar];
2149 throw ErrorClass(
" error in get/set InitBasisStatus");
2156 IBS =
new int[nvar];
2162 throw ErrorClass(
" error in get/set InitBasisStatus");
2169 IBS =
new int[nvar];
2175 throw ErrorClass(
" error in get/set InitBasisStatus");
2182 IBS =
new int[nvar];
2188 throw ErrorClass(
" error in get/set InitBasisStatus");
2195 IBS =
new int[nvar];
2201 throw ErrorClass(
" error in get/set InitBasisStatus");
2208 IBS =
new int[nvar];
2214 throw ErrorClass(
" error in get/set InitBasisStatus");
2225 throw ErrorClass(
" error in get/set IntegerVariableBranchingWeights");
2234 throw ErrorClass(
" error in get/set SOSVariableBranchingWeights");
2243 throw ErrorClass(
" error in get/set OtherVariableOptions");
2249 for (
int lmn=0; lmn < nobj; lmn++)
2254 throw ErrorClass(
" error in get/set InitObjValues");
2263 throw ErrorClass(
" error in get/set InitObjBounds");
2269 IBS =
new int[nvar];
2275 throw ErrorClass(
" error in get/set InitBasisStatus");
2282 IBS =
new int[nvar];
2288 throw ErrorClass(
" error in get/set InitBasisStatus");
2295 IBS =
new int[nvar];
2301 throw ErrorClass(
" error in get/set InitBasisStatus");
2308 IBS =
new int[nvar];
2314 throw ErrorClass(
" error in get/set InitBasisStatus");
2321 IBS =
new int[nvar];
2327 throw ErrorClass(
" error in get/set InitBasisStatus");
2334 IBS =
new int[nvar];
2340 throw ErrorClass(
" error in get/set InitBasisStatus");
2347 IBS =
new int[nvar];
2353 throw ErrorClass(
" error in get/set InitBasisStatus");
2363 throw ErrorClass(
" error in get/set OtherObjectiveOptions");
2373 throw ErrorClass(
" error in get/set InitConValues");
2382 throw ErrorClass(
" error in get/set InitDualVarValues");
2388 IBS =
new int[nvar];
2394 throw ErrorClass(
" error in get/set InitBasisStatus");
2401 IBS =
new int[nvar];
2407 throw ErrorClass(
" error in get/set InitBasisStatus");
2414 IBS =
new int[nvar];
2420 throw ErrorClass(
" error in get/set InitBasisStatus");
2427 IBS =
new int[nvar];
2433 throw ErrorClass(
" error in get/set InitBasisStatus");
2440 IBS =
new int[nvar];
2446 throw ErrorClass(
" error in get/set InitBasisStatus");
2453 IBS =
new int[nvar];
2459 throw ErrorClass(
" error in get/set InitBasisStatus");
2466 IBS =
new int[nvar];
2472 throw ErrorClass(
" error in get/set InitBasisStatus");
2482 throw ErrorClass(
" error in get/set OtherConstraintOptions");
2494 throw ErrorClass(
" error in get/set SolverOptions");
2497 ok = osoption->
IsEqual(osoption2) && ok;
2499 cout <<
"get/set methods successfully duplicate OSOption object" << std::endl << std::endl;
2501 throw ErrorClass(
"OSOption get() and set() methods do not work correctly");
2503 cout <<
"Write the content to a new file" << endl;
2504 tmpOSoL = osolwriter->
writeOSoL( osoption);
2505 cout << endl <<
"Here is tmpOSoL:" <<endl;
2506 cout << endl << endl << tmpOSoL << endl;
2507 cout <<
"-----------------------------------------" << endl << endl;
2511 cout <<
"Read the string back" << endl;
2513 osoption3 = osolreader2->
readOSoL( tmpOSoL);
2515 cout <<
"Compare the two OSOption objects" << endl;
2520 ok = osoption->
IsEqual(osoption3);
2522 throw ErrorClass(
" Loss of information in OSoL write/read");
2536 "TEST " << nOfTest <<
": Successful test of OSoL set() and get() methods"
2538 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
2542 cout << endl << endl << endl;
2544 unitTestResultFailure <<
"Sorry Unit Test Failed OSoL set() and get() methods (Test " << nOfTest <<
")" << endl;
2546 if (osoption2 != NULL)
2550 if (osolreader2 != NULL)
2554 if (osolwriter != NULL)
2558 if (osolreader != NULL)
2562 if (fileUtil != NULL)
2569 cout << endl <<
"TEST " << ++nOfTest <<
": Parse another .osol file" << endl << endl;
2575 std::string tmpOSoL;
2576 clock_t start, finish;
2581 cout <<
"First read the OSoL file into a string" << endl;
2582 osolFileName = dataDir +
"osolFiles" + dirsep +
"parsertest2.osol";
2585 duration = (double) (finish - start) / CLOCKS_PER_SEC;
2586 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
2587 cout << endl << osol << endl;
2588 cout <<
"Parse the OSoL string into an OSOption object" << endl;
2589 osoption = osolreader->
readOSoL( osol);
2591 std::cout <<
"string read; now write again" << std::endl;
2592 tmpOSoL = osolwriter->
writeOSoL( osoption) ;
2594 std::cout <<
"object written; delete osolreader" << std::endl;
2608 cout <<
"Test parsing another OSoL file" << endl;
2614 cout <<
"First read the OSoL file into a string" << endl;
2615 osolFileName = dataDir +
"osolFiles" + dirsep +
"parsertest3.osol";
2618 duration = (double) (finish - start) / CLOCKS_PER_SEC;
2619 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
2620 cout <<
"Parse the OSoL string into an OSOption object" << endl;
2621 osoption = osolreader->
readOSoL( osol);
2622 tmpOSoL = osolwriter->
writeOSoL( osoption) ;
2636 cout <<
"Test parsing a trivial string" << endl;
2640 osol =
"<osol></osol>";
2641 cout <<
"Parse the OSoL string into an OSOption object" << endl;
2642 osoption = osolreader->
readOSoL( osol);
2646 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSoL parser" << std::endl;
2647 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
2652 std::cout <<
"Content of error msg:" << std::endl <<
"-------------------------------" << std::endl;
2653 std::cout << eclass.
errormsg << endl;
2654 std::cout <<
"-------------------------------" << std::endl;
2656 unitTestResultFailure << eclass.
errormsg << endl;
2657 unitTestResultFailure <<
"There was a failure in the test for reading OSoL (Test " << nOfTest <<
")" << endl;
2659 if(osolwriter != NULL)
2662 if(osolreader != NULL)
2665 if (fileUtil != NULL)
2673 cout << endl <<
"TEST " << ++nOfTest <<
": Parse faulty .osol file" << endl << endl;
2679 std::string tmpOSoL;
2681 cout <<
"First read the OSoL file into a string" << endl;
2682 osolFileName = dataDir +
"osolFiles" + dirsep +
"parsertestWithErrors.osol";
2685 cout <<
"Parse the OSoL string into an OSOption object" << endl;
2686 osoption = osolreader->
readOSoL( osol);
2700 unitTestResultFailure <<
"OSoL parser: error detection failed in faulty OSoL file (Test " << nOfTest <<
")" << endl;
2705 std::string resultFileName, resultFileContent;
2706 resultFileName = dataDir +
"osolFiles" + dirsep +
"parsertestWithErrors.result";
2707 resultFileContent = fileUtil->
getFileAsString( resultFileName.c_str() );
2709 std::cout << std::endl << std::endl <<
"error message should be:" << resultFileContent << std::endl;
2710 std::cout << std::endl << std::endl <<
"error message now reads:" << eclass.
errormsg << std::endl;
2712 if (resultFileContent == eclass.
errormsg)
2714 unitTestResult <<
"TEST " << nOfTest <<
": Successful error handling of faulty OSoL input" << std::endl;
2715 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
2722 ni = resultFileContent.size() - 1;
2727 if (i >= ni || j >= nj)
break;
2730 if (resultFileContent[i] !=
'\n' && resultFileContent[i] !=
'\r' &&
2731 resultFileContent[i] !=
'\t' && resultFileContent[i] !=
' ' )
break;
2743 ok &= (resultFileContent[i] == eclass.
errormsg[
j]);
2751 unitTestResult <<
"TEST " << nOfTest <<
": Successful error handling of faulty OSoL input" << std::endl;
2752 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
2755 unitTestResultFailure <<
"Test " << nOfTest <<
": There was a failure in the error handling of the OSoL parser" << endl;
2758 if(osolwriter != NULL)
2761 if(osolreader != NULL)
2764 if (fileUtil != NULL)
2774 cout << endl <<
"TEST " << ++nOfTest <<
": Test deep copy of OSOption object" << endl << endl;
2779 osolFileName = dataDir +
"osolFiles" + dirsep +
"parsertest.osol";
2781 cout <<
"Read osol file" << endl;
2782 osoption = osolreader->
readOSoL( osol);
2784 cout <<
"Duplicate OSOption object" << endl;
2786 cout <<
"Compare the two objects" << endl;
2787 ok = (osoption->
IsEqual(osoption2));
2798 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSOption deep copy methods" << std::endl;
2799 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
2802 unitTestResultFailure <<
"Test " << nOfTest <<
": OSOption deep copy method is not working" << endl;
2807 unitTestResultFailure <<
"Sorry Unit Test Failed Test " << nOfTest <<
": Deep copy of OSOoption object " + eclass.
errormsg << endl;
2808 if(osolreader != NULL)
2811 if (fileUtil != NULL)
2814 if(osoption2 != NULL)
2833 intArray =
new int[3];
2834 int* tempArray =
new int[3];
2837 cout << endl <<
"TEST " << ++nOfTest <<
": OSrL set() tools" << endl << endl;
2843 ok &= (osresult1->
IsEqual(osresult2));
2845 throw ErrorClass(
"Empty osresult objects do not compare equal!");
2848 cout <<
"Set <general> element" << endl;
2851 throw ErrorClass(
"Error during setGeneralStatusType!");
2852 ok &= (!osresult1->
IsEqual(osresult2));
2854 throw ErrorClass(
"setGeneralStatusType: osresult objects falsely compare equal!");
2857 throw ErrorClass(
"Error during setGeneralStatusType!");
2858 ok &= (osresult1->
IsEqual(osresult2));
2860 throw ErrorClass(
"setGeneralStatusType: osresult objects falsely compare unequal!");
2864 throw ErrorClass(
"Error during setGeneralStatusDescription!");
2865 ok &= (!osresult1->
IsEqual(osresult2));
2867 throw ErrorClass(
"setGeneralStatusDescription: osresult objects falsely compare equal!");
2870 throw ErrorClass(
"Error during setGeneralStatusDescription!");
2871 ok &= (osresult1->
IsEqual(osresult2));
2873 throw ErrorClass(
"setGeneralStatusDescription: osresult objects falsely compare unequal!");
2877 throw ErrorClass(
"Error during setNumberOfGeneralSubstatuses!");
2878 ok &= (!osresult1->
IsEqual(osresult2));
2880 throw ErrorClass(
"setNumberOfGeneralSubstatuses: osresult objects falsely compare equal!");
2883 throw ErrorClass(
"Error during setNumberOfGeneralSubstatuses!");
2884 ok &= (osresult1->
IsEqual(osresult2));
2886 throw ErrorClass(
"setNumberOfGeneralSubstatuses: osresult objects falsely compare unequal!");
2888 for (
int i=0; i < 3; ++i)
2892 throw ErrorClass(
"Error during setGeneralSubstatusName!");
2893 ok &= (!osresult1->
IsEqual(osresult2));
2895 throw ErrorClass(
"setGeneralSubstatusName: osresult objects falsely compare equal!");
2898 throw ErrorClass(
"Error during setGeneralSubstatusName!");
2899 ok &= (osresult1->
IsEqual(osresult2));
2901 throw ErrorClass(
"setGeneralSubstatusName: osresult objects falsely compare unequal!");
2905 throw ErrorClass(
"Error during setGeneralSubstatusDescription!");
2906 ok &= (!osresult1->
IsEqual(osresult2));
2908 throw ErrorClass(
"setGeneralSubstatusDescription: osresult objects falsely compare equal!");
2911 throw ErrorClass(
"Error during setGeneralSubstatusDescription!");
2912 ok &= (osresult1->
IsEqual(osresult2));
2914 throw ErrorClass(
"setGeneralSubstatusDescription: osresult objects falsely compare unequal!");
2919 throw ErrorClass(
"Error during setGeneralMessage!");
2920 ok &= (!osresult1->
IsEqual(osresult2));
2922 throw ErrorClass(
"setGeneralMessage: osresult objects falsely compare equal!");
2925 throw ErrorClass(
"Error during setGeneralMessage!");
2926 ok &= (osresult1->
IsEqual(osresult2));
2928 throw ErrorClass(
"setGeneralMessage: osresult objects falsely compare unequal!");
2932 throw ErrorClass(
"Error during setServiceName!");
2933 ok &= (!osresult1->
IsEqual(osresult2));
2935 throw ErrorClass(
"setServiceName: osresult objects falsely compare equal!");
2938 throw ErrorClass(
"Error during setServiceName!");
2939 ok &= (osresult1->
IsEqual(osresult2));
2941 throw ErrorClass(
"setServiceName: osresult objects falsely compare unequal!");
2945 throw ErrorClass(
"Error during setServiceURI!");
2946 ok &= (!osresult1->
IsEqual(osresult2));
2948 throw ErrorClass(
"setServiceURI: osresult objects falsely compare equal!");
2951 throw ErrorClass(
"Error during setServiceURI!");
2952 ok &= (osresult1->
IsEqual(osresult2));
2954 throw ErrorClass(
"setServiceURI: osresult objects falsely compare unequal!");
2958 throw ErrorClass(
"Error during setInstanceName!");
2959 ok &= (!osresult1->
IsEqual(osresult2));
2961 throw ErrorClass(
"setInstanceName: osresult objects falsely compare equal!");
2964 throw ErrorClass(
"Error during setInstanceName!");
2965 ok &= (osresult1->
IsEqual(osresult2));
2967 throw ErrorClass(
"setInstanceName: osresult objects falsely compare unequal!");
2969 ok &= osresult1->
setJobID(
"testing 123");
2972 ok &= (!osresult1->
IsEqual(osresult2));
2974 throw ErrorClass(
"setJobID: osresult objects falsely compare equal!");
2975 ok &= osresult2->
setJobID(
"testing 123");
2978 ok &= (osresult1->
IsEqual(osresult2));
2980 throw ErrorClass(
"setJobID: osresult objects falsely compare unequal!");
2984 throw ErrorClass(
"Error during setSolverInvoked!");
2985 ok &= (!osresult1->
IsEqual(osresult2));
2987 throw ErrorClass(
"setSolverInvoked: osresult objects falsely compare equal!");
2990 throw ErrorClass(
"Error during setSolverInvoked!");
2991 ok &= (osresult1->
IsEqual(osresult2));
2993 throw ErrorClass(
"setSolverInvoked: osresult objects falsely compare unequal!");
2995 ok &= osresult1->
setTimeStamp(
"2001-12-17T09:30:47.0Z");
2997 throw ErrorClass(
"Error during setTimeStamp!");
2998 ok &= (!osresult1->
IsEqual(osresult2));
3000 throw ErrorClass(
"setTimeStamp: osresult objects falsely compare equal!");
3001 ok &= osresult2->
setTimeStamp(
"2001-12-17T09:30:47.0Z");
3003 throw ErrorClass(
"Error during setTimeStamp!");
3004 ok &= (osresult1->
IsEqual(osresult2));
3006 throw ErrorClass(
"setTimeStamp: osresult objects falsely compare unequal!");
3010 throw ErrorClass(
"Error during setNumberOfOtherGeneralResults!");
3011 ok &= (!osresult1->
IsEqual(osresult2));
3013 throw ErrorClass(
"setNumberOfOtherGeneralResults: osresult objects falsely compare equal!");
3016 throw ErrorClass(
"Error during setNumberOfOtherGeneralResults!");
3017 ok &= (osresult1->
IsEqual(osresult2));
3019 throw ErrorClass(
"setNumberOfOtherGeneralResults: osresult objects falsely compare unequal!");
3021 for (
int i=0; i < 3; ++i)
3025 throw ErrorClass(
"Error during setOtherGeneralResultName!");
3026 ok &= (!osresult1->
IsEqual(osresult2));
3028 throw ErrorClass(
"setOtherGeneralResultName: osresult objects falsely compare equal!");
3031 throw ErrorClass(
"Error during setOtherGeneralResultName!");
3032 ok &= (osresult1->
IsEqual(osresult2));
3034 throw ErrorClass(
"setOtherGeneralResultName: osresult objects falsely compare unequal!");
3038 throw ErrorClass(
"Error during setOtherGeneralResultValue!");
3039 ok &= (!osresult1->
IsEqual(osresult2));
3041 throw ErrorClass(
"setOtherGeneralResultValue: osresult objects falsely compare equal!");
3044 throw ErrorClass(
"Error during setOtherGeneralResultValue!");
3045 ok &= (osresult1->
IsEqual(osresult2));
3047 throw ErrorClass(
"setOtherGeneralResultValue: osresult objects falsely compare unequal!");
3051 throw ErrorClass(
"Error during setOtherGeneralResultDescription!");
3052 ok &= (!osresult1->
IsEqual(osresult2));
3054 throw ErrorClass(
"setOtherGeneralResultDescription: osresult objects falsely compare equal!");
3057 throw ErrorClass(
"Error during setOtherGeneralResultDescription!");
3058 ok &= (osresult1->
IsEqual(osresult2));
3060 throw ErrorClass(
"setOtherGeneralResultDescription: osresult objects falsely compare unequal!");
3064 cout <<
"Set <system> element" << endl;
3067 throw ErrorClass(
"Error during setSystemInformation!");
3068 ok &= (!osresult1->
IsEqual(osresult2));
3070 throw ErrorClass(
"setSystemInformation: osresult objects falsely compare equal!");
3073 throw ErrorClass(
"Error during setSystemInformation!");
3074 ok &= (osresult1->
IsEqual(osresult2));
3076 throw ErrorClass(
"setSystemInformation: osresult objects falsely compare unequal!");
3080 throw ErrorClass(
"Error during setAvailableDiskSpaceUnit!");
3081 ok &= (!osresult1->
IsEqual(osresult2));
3083 throw ErrorClass(
"setAvailableDiskSpaceUnit: osresult objects falsely compare equal!");
3086 throw ErrorClass(
"Error during setAvailableDiskSpaceUnit!");
3087 ok &= (osresult1->
IsEqual(osresult2));
3089 throw ErrorClass(
"setAvailableDiskSpaceUnit: osresult objects falsely compare unequal!");
3093 throw ErrorClass(
"Error during setAvailableDiskSpaceDescription!");
3094 ok &= (!osresult1->
IsEqual(osresult2));
3096 throw ErrorClass(
"setAvailableDiskSpaceDescription: osresult objects falsely compare equal!");
3099 throw ErrorClass(
"Error during setAvailableDiskSpaceDescription!");
3100 ok &= (osresult1->
IsEqual(osresult2));
3102 throw ErrorClass(
"setAvailableDiskSpaceDescription: osresult objects falsely compare unequal!");
3106 throw ErrorClass(
"Error during setAvailableDiskSpaceValue!");
3107 ok &= (!osresult1->
IsEqual(osresult2));
3109 throw ErrorClass(
"setAvailableDiskSpaceValue: osresult objects falsely compare equal!");
3112 throw ErrorClass(
"Error during setAvailableDiskSpaceValue!");
3113 ok &= (osresult1->
IsEqual(osresult2));
3115 throw ErrorClass(
"setAvailableDiskSpaceValue: osresult objects falsely compare unequal!");
3119 throw ErrorClass(
"Error during setAvailableMemoryUnit!");
3120 ok &= (!osresult1->
IsEqual(osresult2));
3122 throw ErrorClass(
"setAvailableMemoryUnit: osresult objects falsely compare equal!");
3125 throw ErrorClass(
"Error during setAvailableMemoryUnit!");
3126 ok &= (osresult1->
IsEqual(osresult2));
3129 throw ErrorClass(
"setAvailableMemoryUnit: osresult objects falsely compare unequal!");
3133 throw ErrorClass(
"Error during setAvailableMemoryDescription!");
3134 ok &= (!osresult1->
IsEqual(osresult2));
3136 throw ErrorClass(
"setAvailableMemoryDescription: osresult objects falsely compare equal!");
3139 throw ErrorClass(
"Error during setAvailableMemoryDescription!");
3140 ok &= (osresult1->
IsEqual(osresult2));
3142 throw ErrorClass(
"setAvailableMemoryDescription: osresult objects falsely compare unequal!");
3146 throw ErrorClass(
"Error during setAvailableMemoryValue!");
3147 ok &= (!osresult1->
IsEqual(osresult2));
3149 throw ErrorClass(
"setAvailableMemoryValue: osresult objects falsely compare equal!");
3152 throw ErrorClass(
"Error during setAvailableMemoryValue!");
3153 ok &= (osresult1->
IsEqual(osresult2));
3155 throw ErrorClass(
"setAvailableMemoryValue: osresult objects falsely compare unequal!");
3159 throw ErrorClass(
"Error during setAvailableCPUSpeedUnit!");
3160 ok &= (!osresult1->
IsEqual(osresult2));
3162 throw ErrorClass(
"setAvailableCPUSpeedUnit: osresult objects falsely compare equal!");
3165 throw ErrorClass(
"Error during setAvailableCPUSpeedUnit!");
3166 ok &= (osresult1->
IsEqual(osresult2));
3168 throw ErrorClass(
"setAvailableCPUSpeedUnit: osresult objects falsely compare unequal!");
3172 throw ErrorClass(
"Error during setAvailableCPUSpeedDescription!");
3173 ok &= (!osresult1->
IsEqual(osresult2));
3175 throw ErrorClass(
"setAvailableCPUSpeedDescription: osresult objects falsely compare equal!");
3178 throw ErrorClass(
"Error during setAvailableCPUSpeedDescription!");
3179 ok &= (osresult1->
IsEqual(osresult2));
3181 throw ErrorClass(
"setAvailableCPUSpeedDescription: osresult objects falsely compare unequal!");
3185 throw ErrorClass(
"Error during setAvailableCPUSpeedValue!");
3186 ok &= (!osresult1->
IsEqual(osresult2));
3188 throw ErrorClass(
"setAvailableCPUSpeedValue: osresult objects falsely compare equal!");
3191 throw ErrorClass(
"Error during setAvailableCPUSpeedValue!");
3192 ok &= (osresult1->
IsEqual(osresult2));
3194 throw ErrorClass(
"setAvailableCPUSpeedValue: osresult objects falsely compare unequal!");
3198 throw ErrorClass(
"Error during setAvailableCPUNumberDescription!");
3199 ok &= (!osresult1->
IsEqual(osresult2));
3201 throw ErrorClass(
"setAvailableCPUNumberDescription: osresult objects falsely compare equal!");
3204 throw ErrorClass(
"Error during setAvailableCPUNumberDescription!");
3205 ok &= (osresult1->
IsEqual(osresult2));
3207 throw ErrorClass(
"setAvailableCPUNumberDescription: osresult objects falsely compare unequal!");
3211 throw ErrorClass(
"Error during setAvailableCPUNumberValue!");
3212 ok &= (!osresult1->
IsEqual(osresult2));
3214 throw ErrorClass(
"setAvailableCPUNumberValue: osresult objects falsely compare equal!");
3217 throw ErrorClass(
"Error during setAvailableCPUNumberValue!");
3218 ok &= (osresult1->
IsEqual(osresult2));
3220 throw ErrorClass(
"setAvailableCPUNumberValue: osresult objects falsely compare unequal!");
3224 throw ErrorClass(
"Error during setNumberOfOtherSystemResults!");
3225 ok &= (!osresult1->
IsEqual(osresult2));
3227 throw ErrorClass(
"setNumberOfOtherSystemResults: osresult objects falsely compare equal!");
3230 throw ErrorClass(
"Error during setNumberOfOtherSystemResults!");
3231 ok &= (osresult1->
IsEqual(osresult2));
3233 throw ErrorClass(
"setNumberOfOtherSystemResults: osresult objects falsely compare unequal!");
3235 for (
int i=0; i < 3; ++i)
3239 throw ErrorClass(
"Error during setOtherSystemResultName!");
3240 ok &= (!osresult1->
IsEqual(osresult2));
3242 throw ErrorClass(
"setOtherSystemResultName: osresult objects falsely compare equal!");
3245 throw ErrorClass(
"Error during setOtherSystemResultName!");
3246 ok &= (osresult1->
IsEqual(osresult2));
3248 throw ErrorClass(
"setOtherSystemResultName: osresult objects falsely compare unequal!");
3252 throw ErrorClass(
"Error during setOtherSystemResultValue!");
3253 ok &= (!osresult1->
IsEqual(osresult2));
3255 throw ErrorClass(
"setOtherSystemResultValue: osresult objects falsely compare equal!");
3258 throw ErrorClass(
"Error during setOtherSystemResultValue!");
3259 ok &= (osresult1->
IsEqual(osresult2));
3261 throw ErrorClass(
"setOtherSystemResultValue: osresult objects falsely compare unequal!");
3265 throw ErrorClass(
"Error during setSOtherSystemResultDescription!");
3266 ok &= (!osresult1->
IsEqual(osresult2));
3268 throw ErrorClass(
"setOtherSystemResultDescription: osresult objects falsely compare equal!");
3271 throw ErrorClass(
"Error during setOtherSystemResultDescription!");
3272 ok &= (osresult1->
IsEqual(osresult2));
3274 throw ErrorClass(
"setOtherSystemResultDescription: osresult objects falsely compare unequal!");
3278 cout <<
"Set <service> element" << endl;
3281 throw ErrorClass(
"Error during setCurrentState!");
3282 ok &= (!osresult1->
IsEqual(osresult2));
3284 throw ErrorClass(
"setCurrentState: osresult objects falsely compare equal!");
3287 throw ErrorClass(
"Error during setCurrentState!");
3288 ok &= (osresult1->
IsEqual(osresult2));
3290 throw ErrorClass(
"setCurrentState: osresult objects falsely compare unequal!");
3294 throw ErrorClass(
"Error during setCurrentJobCount!");
3295 ok &= (!osresult1->
IsEqual(osresult2));
3297 throw ErrorClass(
"setCurrentJobCount: osresult objects falsely compare equal!");
3300 throw ErrorClass(
"Error during setCurrentJobCount!");
3301 ok &= (osresult1->
IsEqual(osresult2));
3303 throw ErrorClass(
"setCurrentJobCount: osresult objects falsely compare unequal!");
3307 throw ErrorClass(
"Error during setTotalJobsSoFar!");
3308 ok &= (!osresult1->
IsEqual(osresult2));
3310 throw ErrorClass(
"setTotalJobsSoFar: osresult objects falsely compare equal!");
3313 throw ErrorClass(
"Error during setTotalJobsSoFar!");
3314 ok &= (osresult1->
IsEqual(osresult2));
3316 throw ErrorClass(
"setTotalJobsSoFar: osresult objects falsely compare unequal!");
3320 throw ErrorClass(
"Error during setTimeServiceStarted!");
3321 ok &= (!osresult1->
IsEqual(osresult2));
3323 throw ErrorClass(
"setTimeServiceStarted: osresult objects falsely compare equal!");
3326 throw ErrorClass(
"Error during setTimeServiceStarted!");
3327 ok &= (osresult1->
IsEqual(osresult2));
3329 throw ErrorClass(
"setTimeServiceStarted: osresult objects falsely compare unequal!");
3333 throw ErrorClass(
"Error during setServiceUtilization!");
3334 ok &= (!osresult1->
IsEqual(osresult2));
3336 throw ErrorClass(
"setServiceUtilization: osresult objects falsely compare equal!");
3339 throw ErrorClass(
"Error during setServiceUtilization!");
3340 ok &= (osresult1->
IsEqual(osresult2));
3342 throw ErrorClass(
"setServiceUtilization: osresult objects falsely compare unequal!");
3346 throw ErrorClass(
"Error during setNumberOfOtherServiceResults!");
3347 ok &= (!osresult1->
IsEqual(osresult2));
3349 throw ErrorClass(
"setNumberOfOtherServiceResults: osresult objects falsely compare equal!");
3352 throw ErrorClass(
"Error during setNumberOfOtherServiceResults!");
3353 ok &= (osresult1->
IsEqual(osresult2));
3355 throw ErrorClass(
"setNumberOfOtherServiceResults: osresult objects falsely compare unequal!");
3357 for (
int i=0; i < 3; ++i)
3361 throw ErrorClass(
"Error during setOtherServiceResultName!");
3362 ok &= (!osresult1->
IsEqual(osresult2));
3364 throw ErrorClass(
"setOtherServiceResultName: osresult objects falsely compare equal!");
3367 throw ErrorClass(
"Error during setOtherServiceResultName!");
3368 ok &= (osresult1->
IsEqual(osresult2));
3370 throw ErrorClass(
"setOtherServiceResultName: osresult objects falsely compare unequal!");
3374 throw ErrorClass(
"Error during setOtherServiceResultValue!");
3375 ok &= (!osresult1->
IsEqual(osresult2));
3377 throw ErrorClass(
"setOtherServiceResultValue: osresult objects falsely compare equal!");
3380 throw ErrorClass(
"Error during setOtherServiceResultValue!");
3381 ok &= (osresult1->
IsEqual(osresult2));
3383 throw ErrorClass(
"setOtherServiceResultValue: osresult objects falsely compare unequal!");
3388 throw ErrorClass(
"Error during setOtherServiceResultDescription!");
3389 ok &= (!osresult1->
IsEqual(osresult2));
3391 throw ErrorClass(
"setOtherServiceResultDescription: osresult objects falsely compare equal!");
3394 throw ErrorClass(
"Error during setOtherServiceResultDescription!");
3395 ok &= (osresult1->
IsEqual(osresult2));
3397 throw ErrorClass(
"setOtherServiceResultDescription: osresult objects falsely compare unequal!");
3401 cout <<
"Set <job> element" << endl;
3404 throw ErrorClass(
"Error during setJobStatus!");
3405 ok &= (!osresult1->
IsEqual(osresult2));
3407 throw ErrorClass(
"setJobStatus: osresult objects falsely compare equal!");
3410 throw ErrorClass(
"Error during setJobStatus!");
3411 ok &= (osresult1->
IsEqual(osresult2));
3413 throw ErrorClass(
"setJobStatus: osresult objects falsely compare unequal!");
3417 throw ErrorClass(
"Error during setJobSubmitTime!");
3418 ok &= (!osresult1->
IsEqual(osresult2));
3420 throw ErrorClass(
"setJobSubmitTime: osresult objects falsely compare equal!");
3423 throw ErrorClass(
"Error during setJobSubmitTime!");
3424 ok &= (osresult1->
IsEqual(osresult2));
3426 throw ErrorClass(
"setJobSubmitTime: osresult objects falsely compare unequal!");
3430 throw ErrorClass(
"Error during setScheduledStartTime!");
3431 ok &= (!osresult1->
IsEqual(osresult2));
3433 throw ErrorClass(
"setScheduledStartTime: osresult objects falsely compare equal!");
3436 throw ErrorClass(
"Error during setScheduledStartTime!");
3437 ok &= (osresult1->
IsEqual(osresult2));
3439 throw ErrorClass(
"setScheduledStartTime: osresult objects falsely compare unequal!");
3443 throw ErrorClass(
"Error during setActualStartTime!");
3444 ok &= (!osresult1->
IsEqual(osresult2));
3446 throw ErrorClass(
"setActualStartTime: osresult objects falsely compare equal!");
3449 throw ErrorClass(
"Error during setActualStartTime!");
3450 ok &= (osresult1->
IsEqual(osresult2));
3452 throw ErrorClass(
"setActualStartTime: osresult objects falsely compare unequal!");
3456 throw ErrorClass(
"Error during setJobEndTime!");
3457 ok &= (!osresult1->
IsEqual(osresult2));
3459 throw ErrorClass(
"setJobEndTime: osresult objects falsely compare equal!");
3462 throw ErrorClass(
"Error during setJobEndTime!");
3463 ok &= (osresult1->
IsEqual(osresult2));
3465 throw ErrorClass(
"setJobEndTime: osresult objects falsely compare unequal!");
3469 throw ErrorClass(
"Error during setNumberOfTimes!");
3470 ok &= (!osresult1->
IsEqual(osresult2));
3472 throw ErrorClass(
"setNumberOfTimes: osresult objects falsely compare equal!");
3475 throw ErrorClass(
"Error during setNumberOfTimes!");
3476 ok &= (osresult1->
IsEqual(osresult2));
3478 throw ErrorClass(
"setNumberOfTimes: osresult objects falsely compare unequal!");
3480 for (
int i=0; i < 3; ++i)
3484 throw ErrorClass(
"Error during setTimingInformation!");
3485 ok &= (!osresult1->
IsEqual(osresult2));
3487 throw ErrorClass(
"setTimingInformation: osresult objects falsely compare equal!");
3490 throw ErrorClass(
"Error during setTimingInformation!");
3491 ok &= (osresult1->
IsEqual(osresult2));
3493 throw ErrorClass(
"setTimingInformation: osresult objects falsely compare unequal!");
3499 throw ErrorClass(
"Error during setUsedDiskSpaceUnit!");
3500 ok &= (!osresult1->
IsEqual(osresult2));
3502 throw ErrorClass(
"setUsedDiskSpaceUnit: osresult objects falsely compare equal!");
3505 throw ErrorClass(
"Error during setUsedDiskSpaceUnit!");
3506 ok &= (osresult1->
IsEqual(osresult2));
3508 throw ErrorClass(
"setUsedDiskSpaceUnit: osresult objects falsely compare unequal!");
3512 throw ErrorClass(
"Error during setUsedDiskSpaceDescription!");
3513 ok &= (!osresult1->
IsEqual(osresult2));
3515 throw ErrorClass(
"setUsedDiskSpaceDescription: osresult objects falsely compare equal!");
3518 throw ErrorClass(
"Error during setUsedDiskSpaceDescription!");
3519 ok &= (osresult1->
IsEqual(osresult2));
3521 throw ErrorClass(
"setUsedDiskSpaceDescription: osresult objects falsely compare unequal!");
3525 throw ErrorClass(
"Error during setUsedDiskSpaceValue!");
3526 ok &= (!osresult1->
IsEqual(osresult2));
3528 throw ErrorClass(
"setUsedDiskSpaceValue: osresult objects falsely compare equal!");
3531 throw ErrorClass(
"Error during setUsedDiskSpaceValue!");
3532 ok &= (osresult1->
IsEqual(osresult2));
3534 throw ErrorClass(
"setUsedDiskSpaceValue: osresult objects falsely compare unequal!");
3538 throw ErrorClass(
"Error during setUsedMemoryUnit!");
3539 ok &= (!osresult1->
IsEqual(osresult2));
3541 throw ErrorClass(
"setUsedMemoryUnit: osresult objects falsely compare equal!");
3544 throw ErrorClass(
"Error during setUsedMemoryUnit!");
3545 ok &= (osresult1->
IsEqual(osresult2));
3547 throw ErrorClass(
"setUsedMemoryUnit: osresult objects falsely compare unequal!");
3551 throw ErrorClass(
"Error during setUsedMemoryDescription!");
3552 ok &= (!osresult1->
IsEqual(osresult2));
3554 throw ErrorClass(
"setUsedMemoryDescription: osresult objects falsely compare equal!");
3557 throw ErrorClass(
"Error during setUsedMemoryDescription!");
3558 ok &= (osresult1->
IsEqual(osresult2));
3560 throw ErrorClass(
"setUsedMemoryDescription: osresult objects falsely compare unequal!");
3564 throw ErrorClass(
"Error during setUsedMemoryValue!");
3565 ok &= (!osresult1->
IsEqual(osresult2));
3567 throw ErrorClass(
"setUsedMemoryValue: osresult objects falsely compare equal!");
3570 throw ErrorClass(
"Error during setUsedMemoryValue!");
3571 ok &= (osresult1->
IsEqual(osresult2));
3573 throw ErrorClass(
"setUsedMemoryValue: osresult objects falsely compare unequal!");
3577 throw ErrorClass(
"Error during setUsedCPUSpeedUnit!");
3578 ok &= (!osresult1->
IsEqual(osresult2));
3580 throw ErrorClass(
"setUsedCPUSpeedUnit: osresult objects falsely compare equal!");
3583 throw ErrorClass(
"Error during setUsedCPUSpeedUnit!");
3584 ok &= (osresult1->
IsEqual(osresult2));
3586 throw ErrorClass(
"setUsedCPUSpeedUnit: osresult objects falsely compare unequal!");
3590 throw ErrorClass(
"Error during setUsedCPUSpeedDescription!");
3591 ok &= (!osresult1->
IsEqual(osresult2));
3593 throw ErrorClass(
"setUsedCPUSpeedDescription: osresult objects falsely compare equal!");
3596 throw ErrorClass(
"Error during setUsedCPUSpeedDescription!");
3597 ok &= (osresult1->
IsEqual(osresult2));
3599 throw ErrorClass(
"setUsedCPUSpeedDescription: osresult objects falsely compare unequal!");
3603 throw ErrorClass(
"Error during setUsedCPUSpeedValue!");
3604 ok &= (!osresult1->
IsEqual(osresult2));
3606 throw ErrorClass(
"setUsedCPUSpeedValue: osresult objects falsely compare equal!");
3609 throw ErrorClass(
"Error during setUsedCPUSpeedValue!");
3610 ok &= (osresult1->
IsEqual(osresult2));
3612 throw ErrorClass(
"setUsedCPUSpeedValue: osresult objects falsely compare unequal!");
3616 throw ErrorClass(
"Error during setUsedCPUNumberDescription!");
3617 ok &= (!osresult1->
IsEqual(osresult2));
3619 throw ErrorClass(
"setUsedCPUNumberDescription: osresult objects falsely compare equal!");
3622 throw ErrorClass(
"Error during setUsedCPUNumberDescription!");
3623 ok &= (osresult1->
IsEqual(osresult2));
3625 throw ErrorClass(
"setUsedCPUNumberDescription: osresult objects falsely compare unequal!");
3629 throw ErrorClass(
"Error during setUsedCPUNumberValue!");
3630 ok &= (!osresult1->
IsEqual(osresult2));
3632 throw ErrorClass(
"setUsedCPUNumberValue: osresult objects falsely compare equal!");
3635 throw ErrorClass(
"Error during setUsedCPUNumberValue!");
3636 ok &= (osresult1->
IsEqual(osresult2));
3638 throw ErrorClass(
"setUsedCPUNumberValue: osresult objects falsely compare unequal!");
3642 throw ErrorClass(
"Error during setNumberOfOtherJobResults!");
3643 ok &= (!osresult1->
IsEqual(osresult2));
3645 throw ErrorClass(
"setNumberOfOtherJobResults: osresult objects falsely compare equal!");
3648 throw ErrorClass(
"Error during setNumberOfOtherJobResults!");
3649 ok &= (osresult1->
IsEqual(osresult2));
3651 throw ErrorClass(
"setNumberOfOtherJobResults: osresult objects falsely compare unequal!");
3653 for (
int i=0; i < 3; ++i)
3657 throw ErrorClass(
"Error during setOtherJobResultName!");
3658 ok &= (!osresult1->
IsEqual(osresult2));
3660 throw ErrorClass(
"setOtherJobResultName: osresult objects falsely compare equal!");
3663 throw ErrorClass(
"Error during setOtherJobResultName!");
3664 ok &= (osresult1->
IsEqual(osresult2));
3666 throw ErrorClass(
"setOtherJobResultName: osresult objects falsely compare unequal!");
3670 throw ErrorClass(
"Error during setOtherJobResultValue!");
3671 ok &= (!osresult1->
IsEqual(osresult2));
3673 throw ErrorClass(
"setOtherJobResultValue: osresult objects falsely compare equal!");
3676 throw ErrorClass(
"Error during setOtherJobResultValue!");
3677 ok &= (osresult1->
IsEqual(osresult2));
3679 throw ErrorClass(
"setOtherJobResultValue: osresult objects falsely compare unequal!");
3683 throw ErrorClass(
"Error during setOtherJobResultDescription!");
3684 ok &= (!osresult1->
IsEqual(osresult2));
3686 throw ErrorClass(
"setOtherJobResultDescription: osresult objects falsely compare equal!");
3689 throw ErrorClass(
"Error during setOtherJobResultDescription!");
3690 ok &= (osresult1->
IsEqual(osresult2));
3692 throw ErrorClass(
"setOtherJobResultDescription: osresult objects falsely compare unequal!");
3695 cout <<
"Set <optimization> element" << endl;
3698 throw ErrorClass(
"Error during setSolutionNumber!");
3699 ok &= (!osresult1->
IsEqual(osresult2));
3701 throw ErrorClass(
"setSolutionNumber: osresult objects falsely compare equal!");
3704 throw ErrorClass(
"Error during setSolutionNumber!");
3705 ok &= (osresult1->
IsEqual(osresult2));
3707 throw ErrorClass(
"setSolutionNumber: osresult objects falsely compare unequal!");
3711 throw ErrorClass(
"Error during setVariableNumber!");
3712 ok &= (!osresult1->
IsEqual(osresult2));
3714 throw ErrorClass(
"setVariableNumber: osresult objects falsely compare equal!");
3717 throw ErrorClass(
"Error during setVariableNumber!");
3718 ok &= (osresult1->
IsEqual(osresult2));
3720 throw ErrorClass(
"setVariableNumber: osresult objects falsely compare unequal!");
3724 throw ErrorClass(
"Error during setObjectiveNumber!");
3725 ok &= (!osresult1->
IsEqual(osresult2));
3727 throw ErrorClass(
"setObjectiveNumber: osresult objects falsely compare equal!");
3730 throw ErrorClass(
"Error during setObjectiveNumber!");
3731 ok &= (osresult1->
IsEqual(osresult2));
3733 throw ErrorClass(
"setObjectiveNumber: osresult objects falsely compare unequal!");
3737 throw ErrorClass(
"Error during setConstraintNumber!");
3738 ok &= (!osresult1->
IsEqual(osresult2));
3740 throw ErrorClass(
"setConstraintNumber: osresult objects falsely compare equal!");
3743 throw ErrorClass(
"Error during setConstraintNumber!");
3744 ok &= (osresult1->
IsEqual(osresult2));
3746 throw ErrorClass(
"setConstraintNumber: osresult objects falsely compare unequal!");
3748 for (
int i=0; i < 2; ++i)
3752 throw ErrorClass(
"Error during setSolutionTargetObjectiveIdx!");
3753 ok &= (!osresult1->
IsEqual(osresult2));
3755 throw ErrorClass(
"setSolutionTargetObjectiveIdx: osresult objects falsely compare equal!");
3758 throw ErrorClass(
"Error during setSolutionTargetObjectiveIdx!");
3759 ok &= (osresult1->
IsEqual(osresult2));
3761 throw ErrorClass(
"setSolutionTargetObjectiveIdx: osresult objects falsely compare unequal!");
3765 throw ErrorClass(
"Error during setSolutionTargetObjectiveName!");
3766 ok &= (!osresult1->
IsEqual(osresult2));
3768 throw ErrorClass(
"setSolutionTargetObjectiveName: osresult objects falsely compare equal!");
3771 throw ErrorClass(
"Error during setSolutionTargetObjectiveName!");
3772 ok &= (osresult1->
IsEqual(osresult2));
3774 throw ErrorClass(
"setSolutionTargetObjectiveName: osresult objects falsely compare unequal!");
3778 throw ErrorClass(
"Error during setSolutionWeightedObjectives!");
3779 ok &= (!osresult1->
IsEqual(osresult2));
3781 throw ErrorClass(
"setSolutionWeightedObjectives: osresult objects falsely compare equal!");
3784 throw ErrorClass(
"Error during setSolutionWeightedObjectives!");
3785 ok &= (osresult1->
IsEqual(osresult2));
3787 throw ErrorClass(
"setSolutionWeightedObjectives: osresult objects falsely compare unequal!");
3791 throw ErrorClass(
"Error during setSolutionStatusType!");
3792 ok &= (!osresult1->
IsEqual(osresult2));
3794 throw ErrorClass(
"setSolutionStatusType: osresult objects falsely compare equal!");
3797 throw ErrorClass(
"Error during setSolutionStatusType!");
3798 ok &= (osresult1->
IsEqual(osresult2));
3800 throw ErrorClass(
"setSolutionStatusType: osresult objects falsely compare unequal!");
3804 throw ErrorClass(
"Error during setSolutionStatusDescription!");
3805 ok &= (!osresult1->
IsEqual(osresult2));
3807 throw ErrorClass(
"setSolutionStatusDescription: osresult objects falsely compare equal!");
3810 throw ErrorClass(
"Error during setSolutionStatusDescription!");
3811 ok &= (osresult1->
IsEqual(osresult2));
3813 throw ErrorClass(
"setSolutionStatusDescription: osresult objects falsely compare unequal!");
3817 throw ErrorClass(
"Error during setNumberOfSolutionSubstatuses!");
3818 ok &= (!osresult1->
IsEqual(osresult2));
3820 throw ErrorClass(
"setNumberOfSolutionSubstatuses: osresult objects falsely compare equal!");
3823 throw ErrorClass(
"Error during setNumberOfSolutionSubstatuses!");
3824 ok &= (osresult1->
IsEqual(osresult2));
3826 throw ErrorClass(
"setNumberOfSolutionSubstatuses: osresult objects falsely compare unequal!");
3828 for (
int j=0;
j < 3; ++
j)
3832 throw ErrorClass(
"Error during setSolutionSubstatusType!");
3833 ok &= (!osresult1->
IsEqual(osresult2));
3835 throw ErrorClass(
"setSolutionSubstatusType: osresult objects falsely compare equal!");
3838 throw ErrorClass(
"Error during setSolutionSubstatusType!");
3839 ok &= (osresult1->
IsEqual(osresult2));
3841 throw ErrorClass(
"setSolutionSubstatusType: osresult objects falsely compare unequal!");
3845 throw ErrorClass(
"Error during setSolutionSubstatusDescription!");
3846 ok &= (!osresult1->
IsEqual(osresult2));
3848 throw ErrorClass(
"setSolutionSubstatusDescription: osresult objects falsely compare equal!");
3851 throw ErrorClass(
"Error during setSolutionSubstatusDescription!");
3852 ok &= (osresult1->
IsEqual(osresult2));
3854 throw ErrorClass(
"setSolutionSubstatusDescription: osresult objects falsely compare unequal!");
3859 throw ErrorClass(
"Error during setSolutionMessage!");
3860 ok &= (!osresult1->
IsEqual(osresult2));
3862 throw ErrorClass(
"setSolutionMessage: osresult objects falsely compare equal!");
3865 throw ErrorClass(
"Error during setSolutionMessage!");
3866 ok &= (osresult1->
IsEqual(osresult2));
3868 throw ErrorClass(
"setSolutionMessage: osresult objects falsely compare unequal!");
3872 throw ErrorClass(
"Error during setNumberOfVarValues!");
3873 ok &= (!osresult1->
IsEqual(osresult2));
3875 throw ErrorClass(
"setNumberOfVarValues: osresult objects falsely compare equal!");
3878 throw ErrorClass(
"Error during setNumberOfVarValues!");
3879 ok &= (osresult1->
IsEqual(osresult2));
3881 throw ErrorClass(
"setNumberOfVarValues: osresult objects falsely compare unequal!");
3883 for (
int j=0;
j < 3; ++
j)
3887 throw ErrorClass(
"Error during setVarValue!");
3888 ok &= (!osresult1->
IsEqual(osresult2));
3890 throw ErrorClass(
"setVarValue: osresult objects falsely compare equal!");
3893 throw ErrorClass(
"Error during setVarValue!");
3894 ok &= (osresult1->
IsEqual(osresult2));
3896 throw ErrorClass(
"setVarValue: osresult objects falsely compare unequal!");
3901 throw ErrorClass(
"Error during setNumberOfVarValuesString!");
3902 ok &= (!osresult1->
IsEqual(osresult2));
3904 throw ErrorClass(
"setNumberOfVarValuesString: osresult objects falsely compare equal!");
3909 throw ErrorClass(
"Error during setNumberOfVarValuesString!");
3910 ok &= (osresult1->
IsEqual(osresult2));
3912 throw ErrorClass(
"setNumberOfVarValuesString: osresult objects falsely compare unequal!");
3914 for (
int j=0;
j < 3; ++
j)
3918 throw ErrorClass(
"Error during setVarValueString!");
3919 ok &= (!osresult1->
IsEqual(osresult2));
3921 throw ErrorClass(
"setVarValueString: osresult objects falsely compare equal!");
3924 throw ErrorClass(
"Error during setVarValueString!");
3925 ok &= (osresult1->
IsEqual(osresult2));
3927 throw ErrorClass(
"setVarValueString: osresult objects falsely compare unequal!");
3930 intArray[0]=1000*i + 1100 + 10 + 1;
3931 intArray[1]=1000*i + 1100 + 10 + 2;
3932 intArray[2]=1000*i + 1100 + 10 + 3;
3936 throw ErrorClass(
"Error during setBasisStatus (variables basic)!");
3937 ok &= (!osresult1->
IsEqual(osresult2));
3939 throw ErrorClass(
"setBasisStatus (variables basic): osresult objects falsely compare equal!");
3942 throw ErrorClass(
"Error during setBasisStatus (variables basic)!");
3943 ok &= (osresult1->
IsEqual(osresult2));
3945 throw ErrorClass(
"setBasisStatus (variables basic): osresult objects falsely compare unequal!");
3947 intArray[0] = intArray[0] + 10;
3948 intArray[1] = intArray[1] + 10;
3949 intArray[2] = intArray[2] + 10;
3954 throw ErrorClass(
"Error during setBasisStatus (variables atLower)!");
3955 ok &= (!osresult1->
IsEqual(osresult2));
3957 throw ErrorClass(
"setBasisStatus (variables atLower): osresult objects falsely compare equal!");
3960 throw ErrorClass(
"Error during setBasisStatus (variables atLower)!");
3961 ok &= (osresult1->
IsEqual(osresult2));
3963 throw ErrorClass(
"setBasisStatus (variables atLower): osresult objects falsely compare unequal!");
3964 intArray[0] = intArray[0] + 10;
3965 intArray[1] = intArray[1] + 10;
3967 intArray[2] = intArray[2] + 10;
3972 throw ErrorClass(
"Error during setBasisStatus (variables atUpper)!");
3973 ok &= (!osresult1->
IsEqual(osresult2));
3975 throw ErrorClass(
"setBasisStatus (variables atUpper): osresult objects falsely compare equal!");
3978 throw ErrorClass(
"Error during setBasisStatus (variables atUpper)!");
3979 ok &= (osresult1->
IsEqual(osresult2));
3981 throw ErrorClass(
"setBasisStatus (variables atUpper): osresult objects falsely compare unequal!");
3982 intArray[0] = intArray[0] + 10;
3983 intArray[1] = intArray[1] + 10;
3985 intArray[2] = intArray[2] + 10;
3990 throw ErrorClass(
"Error during setBasisStatus (variables atEquality)!");
3991 ok &= (!osresult1->
IsEqual(osresult2));
3993 throw ErrorClass(
"setBasisStatus (variables atEquality): osresult objects falsely compare equal!");
3996 throw ErrorClass(
"Error during setBasisStatus (variables atEquality)!");
3997 ok &= (osresult1->
IsEqual(osresult2));
3999 throw ErrorClass(
"setBasisStatus (variables atEquality): osresult objects falsely compare unequal!");
4001 intArray[0] = intArray[0] + 10;
4002 intArray[1] = intArray[1] + 10;
4003 intArray[2] = intArray[2] + 10;
4007 throw ErrorClass(
"Error during setBasisStatus (variables isFree)!");
4008 ok &= (!osresult1->
IsEqual(osresult2));
4010 throw ErrorClass(
"setBasisStatus (variables isFree): osresult objects falsely compare equal!");
4013 throw ErrorClass(
"Error during setBasisStatus (variables isFree)!");
4014 ok &= (osresult1->
IsEqual(osresult2));
4016 throw ErrorClass(
"setBasisStatus (variables isFree): osresult objects falsely compare unequal!");
4018 intArray[0] = intArray[0] + 10;
4019 intArray[1] = intArray[1] + 10;
4020 intArray[2] = intArray[2] + 10;
4024 throw ErrorClass(
"Error during setBasisStatus (variables superbasic)!");
4025 ok &= (!osresult1->
IsEqual(osresult2));
4027 throw ErrorClass(
"setBasisStatus (variables superbasic): osresult objects falsely compare equal!");
4030 throw ErrorClass(
"Error during setBasisStatus (variables superbasic)!");
4031 ok &= (osresult1->
IsEqual(osresult2));
4033 throw ErrorClass(
"setBasisStatus (variables superbasic): osresult objects falsely compare unequal!");
4035 intArray[0] = intArray[0] + 10;
4036 intArray[1] = intArray[1] + 10;
4037 intArray[2] = intArray[2] + 10;
4041 throw ErrorClass(
"Error during setBasisStatus (variables unknown)!");
4042 ok &= (!osresult1->
IsEqual(osresult2));
4044 throw ErrorClass(
"setBasisStatus (variables unknown): osresult objects falsely compare equal!");
4047 throw ErrorClass(
"Error during setBasisStatus (variables unknown)!");
4048 ok &= (osresult1->
IsEqual(osresult2));
4050 throw ErrorClass(
"setBasisStatus (variables unknown): osresult objects falsely compare unequal!");
4054 throw ErrorClass(
"Error during setNumberOfOtherVariableResults!");
4055 ok &= (!osresult1->
IsEqual(osresult2));
4057 throw ErrorClass(
"setNumberOfOtherVariableResults: osresult objects falsely compare equal!");
4060 throw ErrorClass(
"Error during setNumberOfOtherVariableResults!");
4061 ok &= (osresult1->
IsEqual(osresult2));
4063 throw ErrorClass(
"setNumberOfOtherVariableResults: osresult objects falsely compare unequal!");
4065 for (
int j=0;
j < 2; ++
j)
4069 throw ErrorClass(
"Error during setOtherVariableResultName!");
4070 ok &= (!osresult1->
IsEqual(osresult2));
4072 throw ErrorClass(
"setOtherVariableResultName: osresult objects falsely compare equal!");
4075 throw ErrorClass(
"Error during setOtherVariableResultName!");
4076 ok &= (osresult1->
IsEqual(osresult2));
4078 throw ErrorClass(
"setOtherVariableResultName: osresult objects falsely compare unequal!");
4082 throw ErrorClass(
"Error during setOtherVariableResultDescription!");
4083 ok &= (!osresult1->
IsEqual(osresult2));
4085 throw ErrorClass(
"setOtherVariableResultDescription: osresult objects falsely compare equal!");
4088 throw ErrorClass(
"Error during setOtherVariableResultDescription!");
4089 ok &= (osresult1->
IsEqual(osresult2));
4091 throw ErrorClass(
"setOtherVariableResultDescription: osresult objects falsely compare unequal!");
4095 throw ErrorClass(
"Error during setOtherVariableResultValue!");
4096 ok &= (!osresult1->
IsEqual(osresult2));
4098 throw ErrorClass(
"setOtherVariableResultValue: osresult objects falsely compare equal!");
4101 throw ErrorClass(
"Error during setOtherVariableResultValue!");
4102 ok &= (osresult1->
IsEqual(osresult2));
4104 throw ErrorClass(
"setOtherVariableResultValue: osresult objects falsely compare unequal!");
4108 throw ErrorClass(
"Error during setOtherVariableResultNumberOfVar!");
4109 ok &= (!osresult1->
IsEqual(osresult2));
4111 throw ErrorClass(
"setOtherVariableResultNumberOfVar: osresult objects falsely compare equal!");
4114 throw ErrorClass(
"Error during setOtherVariableResultNumberOfVar!");
4115 ok &= (osresult1->
IsEqual(osresult2));
4117 throw ErrorClass(
"setOtherVariableResultNumberOfVar: osresult objects falsely compare unequal!");
4119 for (
int k=0;
k < 3; ++
k)
4123 throw ErrorClass(
"Error during setOtherVariableResultVarIdx!");
4124 ok &= (!osresult1->
IsEqual(osresult2));
4126 throw ErrorClass(
"setOtherVariableResultVarIdx: osresult objects falsely compare equal!");
4129 throw ErrorClass(
"Error during setOtherVariableResultVarIdx!");
4130 ok &= (osresult1->
IsEqual(osresult2));
4132 throw ErrorClass(
"setOtherVariableResultVarIdx: osresult objects falsely compare unequal!");
4136 throw ErrorClass(
"Error during setOtherVariableResultVar!");
4137 ok &= (!osresult1->
IsEqual(osresult2));
4139 throw ErrorClass(
"setOtherVariableResultVar: osresult objects falsely compare equal!");
4142 throw ErrorClass(
"Error during setOtherVariableResultVar!");
4143 ok &= (osresult1->
IsEqual(osresult2));
4145 throw ErrorClass(
"setOtherVariableResultVar: osresult objects falsely compare unequal!");
4153 throw ErrorClass(
"Error during setOtherVariableResultName!");
4154 ok &= (!osresult1->
IsEqual(osresult2));
4156 throw ErrorClass(
"setOtherVariableResultName: osresult objects falsely compare equal!");
4159 throw ErrorClass(
"Error during setOtherVariableResultName!");
4161 ok &= (osresult1->
IsEqual(osresult2));
4163 throw ErrorClass(
"setOtherVariableResultName: osresult objects falsely compare unequal!");
4167 throw ErrorClass(
"Error during setOtherVariableResultDescription!");
4168 ok &= (!osresult1->
IsEqual(osresult2));
4170 throw ErrorClass(
"setOtherVariableResultDescription: osresult objects falsely compare equal!");
4173 throw ErrorClass(
"Error during setOtherVariableResultDescription!");
4174 ok &= (osresult1->
IsEqual(osresult2));
4176 throw ErrorClass(
"setOtherVariableResultDescription: osresult objects falsely compare unequal!");
4180 throw ErrorClass(
"Error during setOtherVariableResultValue!");
4181 ok &= (!osresult1->
IsEqual(osresult2));
4183 throw ErrorClass(
"setOtherVariableResultValue: osresult objects falsely compare equal!");
4186 throw ErrorClass(
"Error during setOtherVariableResultValue!");
4187 ok &= (osresult1->
IsEqual(osresult2));
4189 throw ErrorClass(
"setOtherVariableResultValue: osresult objects falsely compare unequal!");
4194 throw ErrorClass(
"Error during setOtherVariableResultNumberOfEnumerations!");
4195 ok &= (!osresult1->
IsEqual(osresult2));
4197 throw ErrorClass(
"setOtherVariableResultNumberOfEnumerations: osresult objects falsely compare equal!");
4200 throw ErrorClass(
"Error during setOtherVariableResultNumberOfEnumerations!");
4201 ok &= (osresult1->
IsEqual(osresult2));
4203 throw ErrorClass(
"setOtherVariableResultNumberOfEnumerations: osresult objects falsely compare unequal!");
4205 for (
int k=0;
k < 2; ++
k)
4207 intArray[0] = 1000*i + 1130 + 10*
k + 1;
4208 intArray[1] = 1000*i + 1130 + 10*k + 2;
4209 intArray[2] = 1000*i + 1130 + 10*k + 3;
4215 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration!");
4216 ok &= (!osresult1->
IsEqual(osresult2));
4218 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare equal!");
4222 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration!");
4223 ok &= (osresult1->
IsEqual(osresult2));
4225 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare unequal!");
4231 throw ErrorClass(
"Error during setNumberOfObjValues!");
4232 ok &= (!osresult1->
IsEqual(osresult2));
4234 throw ErrorClass(
"setNumberOfObjValues: osresult objects falsely compare equal!");
4237 throw ErrorClass(
"Error during setNumberOfObjValues!");
4238 ok &= (osresult1->
IsEqual(osresult2));
4240 throw ErrorClass(
"setNumberOfObjValues: osresult objects falsely compare unequal!");
4242 for (
int j=0;
j < 2; ++
j)
4246 throw ErrorClass(
"Error during setObjValue!");
4247 ok &= (!osresult1->
IsEqual(osresult2));
4249 throw ErrorClass(
"setObjValue: osresult objects falsely compare equal!");
4252 throw ErrorClass(
"Error during setObjValue!");
4253 ok &= (osresult1->
IsEqual(osresult2));
4255 throw ErrorClass(
"setObjValue: osresult objects falsely compare unequal!");
4257 intArray[0] = -1000*i - 1200 - 10 - 1;
4258 intArray[1] = -1000*i - 1200 - 10 - 2;
4259 intArray[2] = -1000*i - 1200 - 10 - 3;
4263 throw ErrorClass(
"Error during setBasisStatus (objectives basic)!");
4264 ok &= (!osresult1->
IsEqual(osresult2));
4266 throw ErrorClass(
"setBasisStatus (objectives basic): osresult objects falsely compare equal!");
4269 throw ErrorClass(
"Error during setBasisStatus (objectives basic)!");
4270 ok &= (osresult1->
IsEqual(osresult2));
4272 throw ErrorClass(
"setBasisStatus (objectives basic): osresult objects falsely compare unequal!");
4274 intArray[0] = intArray[0] - 10;
4275 intArray[1] = intArray[1] - 10;
4276 intArray[2] = intArray[2] - 10;
4280 throw ErrorClass(
"Error during setBasisStatus (objectives atLower)!");
4281 ok &= (!osresult1->
IsEqual(osresult2));
4283 throw ErrorClass(
"setBasisStatus (objectives atLower): osresult objects falsely compare equal!");
4286 throw ErrorClass(
"Error during setBasisStatus (objectives atLower)!");
4287 ok &= (osresult1->
IsEqual(osresult2));
4289 throw ErrorClass(
"setBasisStatus (objectives atLower): osresult objects falsely compare unequal!");
4291 intArray[0] = intArray[0] - 10;
4292 intArray[1] = intArray[1] - 10;
4293 intArray[2] = intArray[2] - 10;
4298 throw ErrorClass(
"Error during setBasisStatus (objectives atUpper)!");
4299 ok &= (!osresult1->
IsEqual(osresult2));
4301 throw ErrorClass(
"setBasisStatus (objectives atUpper): osresult objects falsely compare equal!");
4304 throw ErrorClass(
"Error during setBasisStatus (objectives atUpper)!");
4305 ok &= (osresult1->
IsEqual(osresult2));
4307 throw ErrorClass(
"setBasisStatus (objectives atUpper): osresult objects falsely compare unequal!");
4309 intArray[0] = intArray[0] - 10;
4310 intArray[1] = intArray[1] - 10;
4311 intArray[2] = intArray[2] - 10;
4316 throw ErrorClass(
"Error during setBasisStatus (objectives atEquality)!");
4317 ok &= (!osresult1->
IsEqual(osresult2));
4319 throw ErrorClass(
"setBasisStatus (objectives atEquality): osresult objects falsely compare equal!");
4322 throw ErrorClass(
"Error during setBasisStatus (objectives atEquality)!");
4323 ok &= (osresult1->
IsEqual(osresult2));
4325 throw ErrorClass(
"setBasisStatus (objectives atEquality): osresult objects falsely compare unequal!");
4328 intArray[0] = intArray[0] - 10;
4329 intArray[1] = intArray[1] - 10;
4330 intArray[2] = intArray[2] - 10;
4334 throw ErrorClass(
"Error during setBasisStatus (objectives isFree)!");
4335 ok &= (!osresult1->
IsEqual(osresult2));
4337 throw ErrorClass(
"setBasisStatus (objectives isFree): osresult objects falsely compare equal!");
4340 throw ErrorClass(
"Error during setBasisStatus (objectives isFree)!");
4341 ok &= (osresult1->
IsEqual(osresult2));
4343 throw ErrorClass(
"setBasisStatus (objectives isFree): osresult objects falsely compare unequal!");
4346 intArray[0] = intArray[0] - 10;
4347 intArray[1] = intArray[1] - 10;
4348 intArray[2] = intArray[2] - 10;
4352 throw ErrorClass(
"Error during setBasisStatus (objectives superbasic)!");
4353 ok &= (!osresult1->
IsEqual(osresult2));
4355 throw ErrorClass(
"setBasisStatus (objectives superbasic): osresult objects falsely compare equal!");
4358 throw ErrorClass(
"Error during setBasisStatus (objectives superbasic)!");
4360 ok &= (osresult1->
IsEqual(osresult2));
4362 throw ErrorClass(
"setBasisStatus (objectives superbasic): osresult objects falsely compare unequal!");
4365 intArray[0] = intArray[0] - 10;
4366 intArray[1] = intArray[1] - 10;
4367 intArray[2] = intArray[2] - 10;
4371 throw ErrorClass(
"Error during setBasisStatus (objectives unknown)!");
4372 ok &= (!osresult1->
IsEqual(osresult2));
4374 throw ErrorClass(
"setBasisStatus (objectives unknown): osresult objects falsely compare equal!");
4377 throw ErrorClass(
"Error during setBasisStatus (objectives unknown)!");
4378 ok &= (osresult1->
IsEqual(osresult2));
4380 throw ErrorClass(
"setBasisStatus (objectives unknown): osresult objects falsely compare unequal!");
4384 throw ErrorClass(
"Error during setNumberOfOtherObjectiveResults!");
4385 ok &= (!osresult1->
IsEqual(osresult2));
4387 throw ErrorClass(
"setNumberOfOtherObjectiveResults: osresult objects falsely compare equal!");
4390 throw ErrorClass(
"Error during setNumberOfOtherObjectiveResults!");
4391 ok &= (osresult1->
IsEqual(osresult2));
4393 throw ErrorClass(
"setNumberOfOtherObjectiveResults: osresult objects falsely compare unequal!");
4395 for (
int j=0;
j < 2; ++
j)
4399 throw ErrorClass(
"Error during setOtherObjectiveResultName!");
4400 ok &= (!osresult1->
IsEqual(osresult2));
4402 throw ErrorClass(
"setOtherObjectiveResultName: osresult objects falsely compare equal!");
4405 throw ErrorClass(
"Error during setOtherObjectiveResultName!");
4406 ok &= (osresult1->
IsEqual(osresult2));
4408 throw ErrorClass(
"setOtherObjectiveResultName: osresult objects falsely compare unequal!");
4412 throw ErrorClass(
"Error during setOtherObjectiveResultDescription!");
4413 ok &= (!osresult1->
IsEqual(osresult2));
4415 throw ErrorClass(
"setOtherObjectiveResultDescription: osresult objects falsely compare equal!");
4418 throw ErrorClass(
"Error during setOtherObjectiveResultDescription!");
4419 ok &= (osresult1->
IsEqual(osresult2));
4421 throw ErrorClass(
"setOtherObjectiveResultDescription: osresult objects falsely compare unequal!");
4425 throw ErrorClass(
"Error during setOtherObjectiveResultValue!");
4426 ok &= (!osresult1->
IsEqual(osresult2));
4428 throw ErrorClass(
"setOtherObjectiveResultValue: osresult objects falsely compare equal!");
4431 throw ErrorClass(
"Error during setOtherObjectiveResultValue!");
4432 ok &= (osresult1->
IsEqual(osresult2));
4434 throw ErrorClass(
"setOtherObjectiveResultValue: osresult objects falsely compare unequal!");
4438 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfObj!");
4439 ok &= (!osresult1->
IsEqual(osresult2));
4441 throw ErrorClass(
"setOtherObjectiveResultNumberOfObj: osresult objects falsely compare equal!");
4445 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfObj!");
4446 ok &= (osresult1->
IsEqual(osresult2));
4448 throw ErrorClass(
"setOtherObjectiveResultNumberOfObj: osresult objects falsely compare unequal!");
4450 for (
int k=0;
k < 2; ++
k)
4454 throw ErrorClass(
"Error during setOtherObjectiveResultObjIdx!");
4455 ok &= (!osresult1->
IsEqual(osresult2));
4457 throw ErrorClass(
"setOtherObjectiveResultObjIdx: osresult objects falsely compare equal!");
4460 throw ErrorClass(
"Error during setOtherObjectiveResultObjIdx!");
4461 ok &= (osresult1->
IsEqual(osresult2));
4463 throw ErrorClass(
"setOtherObjectiveResultObjIdx: osresult objects falsely compare unequal!");
4467 throw ErrorClass(
"Error during setOtherObjectiveResultObj!");
4468 ok &= (!osresult1->
IsEqual(osresult2));
4470 throw ErrorClass(
"setOtherObjectiveResultObj: osresult objects falsely compare equal!");
4473 throw ErrorClass(
"Error during setOtherObjectiveResultObj!");
4474 ok &= (osresult1->
IsEqual(osresult2));
4476 throw ErrorClass(
"setOtherObjectiveResultObj: osresult objects falsely compare unequal!");
4483 throw ErrorClass(
"Error during setOtherObjectiveResultName!");
4484 ok &= (!osresult1->
IsEqual(osresult2));
4486 throw ErrorClass(
"setOtherObjectiveResultName: osresult objects falsely compare equal!");
4489 throw ErrorClass(
"Error during setOtherObjectiveResultName!");
4490 ok &= (osresult1->
IsEqual(osresult2));
4492 throw ErrorClass(
"setOtherObjectiveResultName: osresult objects falsely compare unequal!");
4496 throw ErrorClass(
"Error during setOtherObjectiveResultDescription!");
4497 ok &= (!osresult1->
IsEqual(osresult2));
4499 throw ErrorClass(
"setOtherObjectiveResultDescription: osresult objects falsely compare equal!");
4502 throw ErrorClass(
"Error during setOtherObjectiveResultDescription!");
4503 ok &= (osresult1->
IsEqual(osresult2));
4505 throw ErrorClass(
"setOtherObjectiveResultDescription: osresult objects falsely compare unequal!");
4509 throw ErrorClass(
"Error during setOtherObjectiveResultValue!");
4510 ok &= (!osresult1->
IsEqual(osresult2));
4512 throw ErrorClass(
"setOtherObjectiveResultValue: osresult objects falsely compare equal!");
4515 throw ErrorClass(
"Error during setOtherObjectiveResultValue!");
4516 ok &= (osresult1->
IsEqual(osresult2));
4518 throw ErrorClass(
"setOtherObjectiveResultValue: osresult objects falsely compare unequal!");
4522 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfEnumerations!");
4523 ok &= (!osresult1->
IsEqual(osresult2));
4525 throw ErrorClass(
"setOtherObjectiveResultNumberOfEnumerations: osresult objects falsely compare equal!");
4528 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfEnumerations!");
4529 ok &= (osresult1->
IsEqual(osresult2));
4531 throw ErrorClass(
"setOtherObjectiveResultNumberOfEnumerations: osresult objects falsely compare unequal!");
4533 for (
int k=0;
k < 2; ++
k)
4536 intArray[0] = -(1000*i + 1230 + 10*
k + 1);
4537 intArray[1] = -(1000*i + 1230 + 10*
k + 2);
4538 intArray[2] = -(1000*i + 1230 + 10*
k + 3);
4543 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration (objective)!");
4544 ok &= (!osresult1->
IsEqual(osresult2));
4546 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare equal!");
4550 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration (objective)!");
4551 ok &= (osresult1->
IsEqual(osresult2));
4553 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare unequal!");
4559 throw ErrorClass(
"Error during setNumberOfDualValues!");
4560 ok &= (!osresult1->
IsEqual(osresult2));
4562 throw ErrorClass(
"setNumberOfDualValues: osresult objects falsely compare equal!");
4565 throw ErrorClass(
"Error during setNumberOfDualValues!");
4566 ok &= (osresult1->
IsEqual(osresult2));
4568 throw ErrorClass(
"setNumberOfDualValues: osresult objects falsely compare unequal!");
4570 for (
int j=0;
j < 3; ++
j)
4574 throw ErrorClass(
"Error during setDualValue!");
4575 ok &= (!osresult1->
IsEqual(osresult2));
4577 throw ErrorClass(
"setDualValue: osresult objects falsely compare equal!");
4580 throw ErrorClass(
"Error during setDualValue!");
4581 ok &= (osresult1->
IsEqual(osresult2));
4583 throw ErrorClass(
"setDualValue: osresult objects falsely compare unequal!");
4586 intArray[0] = 1000*i + 1300 + 10 + 1;
4587 intArray[1] = 1000*i + 1300 + 10 + 2;
4588 intArray[2] = 1000*i + 1300 + 10 + 3;
4592 throw ErrorClass(
"Error during setBasisStatus (constraints basic)!");
4593 ok &= (!osresult1->
IsEqual(osresult2));
4595 throw ErrorClass(
"setBasisStatus (constraints basic): osresult objects falsely compare equal!");
4598 throw ErrorClass(
"Error during setBasisStatus (constraints basic)!");
4599 ok &= (osresult1->
IsEqual(osresult2));
4601 throw ErrorClass(
"setBasisStatus (constraints basic): osresult objects falsely compare unequal!");
4603 intArray[0] = intArray[0] + 10;
4604 intArray[1] = intArray[1] + 10;
4605 intArray[2] = intArray[2] + 10;
4609 throw ErrorClass(
"Error during setBasisStatus (constraints atLower)!");
4610 ok &= (!osresult1->
IsEqual(osresult2));
4612 throw ErrorClass(
"setBasisStatus (constraints atLower): osresult objects falsely compare equal!");
4615 throw ErrorClass(
"Error during setBasisStatus (constraints atLower)!");
4616 ok &= (osresult1->
IsEqual(osresult2));
4618 throw ErrorClass(
"setBasisStatus (constraints atLower): osresult objects falsely compare unequal!");
4620 intArray[0] = intArray[0] + 10;
4621 intArray[1] = intArray[1] + 10;
4622 intArray[2] = intArray[2] + 10;
4627 throw ErrorClass(
"Error during setBasisStatus (constraints atUpper)!");
4628 ok &= (!osresult1->
IsEqual(osresult2));
4630 throw ErrorClass(
"setBasisStatus (constraints atUpper): osresult objects falsely compare equal!");
4633 throw ErrorClass(
"Error during setBasisStatus (constraints atUpper)!");
4634 ok &= (osresult1->
IsEqual(osresult2));
4636 throw ErrorClass(
"setBasisStatus (constraints atUpper): osresult objects falsely compare unequal!");
4638 intArray[0] = intArray[0] + 10;
4639 intArray[1] = intArray[1] + 10;
4640 intArray[2] = intArray[2] + 10;
4645 throw ErrorClass(
"Error during setBasisStatus (constraints atEquality)!");
4646 ok &= (!osresult1->
IsEqual(osresult2));
4648 throw ErrorClass(
"setBasisStatus (constraints atEquality): osresult objects falsely compare equal!");
4651 throw ErrorClass(
"Error during setBasisStatus (constraints atEquality)!");
4652 ok &= (osresult1->
IsEqual(osresult2));
4654 throw ErrorClass(
"setBasisStatus (constraints atEquality): osresult objects falsely compare unequal!");
4657 intArray[0] = intArray[0] + 10;
4658 intArray[1] = intArray[1] + 10;
4659 intArray[2] = intArray[2] + 10;
4663 throw ErrorClass(
"Error during setBasisStatus (constraints isFree)!");
4664 ok &= (!osresult1->
IsEqual(osresult2));
4666 throw ErrorClass(
"setBasisStatus (constraints isFree): osresult objects falsely compare equal!");
4669 throw ErrorClass(
"Error during setBasisStatus (constraints isFree)!");
4670 ok &= (osresult1->
IsEqual(osresult2));
4672 throw ErrorClass(
"setBasisStatus (constraints isFree): osresult objects falsely compare unequal!");
4675 intArray[0] = intArray[0] + 10;
4676 intArray[1] = intArray[1] + 10;
4677 intArray[2] = intArray[2] + 10;
4681 throw ErrorClass(
"Error during setBasisStatus (constraints superbasic)!");
4682 ok &= (!osresult1->
IsEqual(osresult2));
4684 throw ErrorClass(
"setBasisStatus (constraints superbasic): osresult objects falsely compare equal!");
4687 throw ErrorClass(
"Error during setBasisStatus (constraints superbasic)!");
4688 ok &= (osresult1->
IsEqual(osresult2));
4690 throw ErrorClass(
"setBasisStatus (constraints superbasic): osresult objects falsely compare unequal!");
4692 intArray[0] = intArray[0] + 10;
4693 intArray[1] = intArray[1] + 10;
4694 intArray[2] = intArray[2] + 10;
4699 throw ErrorClass(
"Error during setBasisStatus (constraints unknown)!");
4700 ok &= (!osresult1->
IsEqual(osresult2));
4702 throw ErrorClass(
"setBasisStatus (constraints unknown): osresult objects falsely compare equal!");
4705 throw ErrorClass(
"Error during setBasisStatus (constraints unknown)!");
4706 ok &= (osresult1->
IsEqual(osresult2));
4708 throw ErrorClass(
"setBasisStatus (constraints unknown): osresult objects falsely compare unequal!");
4712 throw ErrorClass(
"Error during setNumberOfOtherConstraintResults!");
4713 ok &= (!osresult1->
IsEqual(osresult2));
4715 throw ErrorClass(
"setNumberOfOtherConstraintResults: osresult objects falsely compare equal!");
4718 throw ErrorClass(
"Error during setNumberOfOtherConstraintResults!");
4719 ok &= (osresult1->
IsEqual(osresult2));
4721 throw ErrorClass(
"setNumberOfOtherConstraintResults: osresult objects falsely compare unequal!");
4723 for (
int j=0;
j < 2; ++
j)
4727 throw ErrorClass(
"Error during setOtherConstraintResultName!");
4728 ok &= (!osresult1->
IsEqual(osresult2));
4730 throw ErrorClass(
"setOtherConstraintResultName: osresult objects falsely compare equal!");
4733 throw ErrorClass(
"Error during setOtherConstraintResultName!");
4734 ok &= (osresult1->
IsEqual(osresult2));
4736 throw ErrorClass(
"setOtherConstraintResultName: osresult objects falsely compare unequal!");
4740 throw ErrorClass(
"Error during setOtherConstraintResultDescription!");
4741 ok &= (!osresult1->
IsEqual(osresult2));
4743 throw ErrorClass(
"setOtherConstraintResultDescription: osresult objects falsely compare equal!");
4746 throw ErrorClass(
"Error during setOtherConstraintResultDescription!");
4747 ok &= (osresult1->
IsEqual(osresult2));
4749 throw ErrorClass(
"setOtherConstraintResultDescription: osresult objects falsely compare unequal!");
4753 throw ErrorClass(
"Error during setOtherConstraintResultValue!");
4754 ok &= (!osresult1->
IsEqual(osresult2));
4756 throw ErrorClass(
"setOtherConstraintResultValue: osresult objects falsely compare equal!");
4759 throw ErrorClass(
"Error during setOtherConstraintResultValue!");
4760 ok &= (osresult1->
IsEqual(osresult2));
4762 throw ErrorClass(
"setOtherConstraintResultValue: osresult objects falsely compare unequal!");
4766 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfCon!");
4767 ok &= (!osresult1->
IsEqual(osresult2));
4769 throw ErrorClass(
"setOtherConstraintResultNumberOfCon: osresult objects falsely compare equal!");
4772 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfCon!");
4773 ok &= (osresult1->
IsEqual(osresult2));
4775 throw ErrorClass(
"setOtherConstraintResultNumberOfCon: osresult objects falsely compare unequal!");
4777 for (
int k=0;
k < 3; ++
k)
4781 throw ErrorClass(
"Error during setOtherConstraintResultConIdx!");
4782 ok &= (!osresult1->
IsEqual(osresult2));
4784 throw ErrorClass(
"setOtherConstraintResultConIdx: osresult objects falsely compare equal!");
4787 throw ErrorClass(
"Error during setOtherConstraintResultConIdx!");
4788 ok &= (osresult1->
IsEqual(osresult2));
4790 throw ErrorClass(
"setOtherConstraintResultConIdx: osresult objects falsely compare unequal!");
4794 throw ErrorClass(
"Error during setOtherConstraintResultCon!");
4795 ok &= (!osresult1->
IsEqual(osresult2));
4797 throw ErrorClass(
"setOtherConstraintResultCon: osresult objects falsely compare equal!");
4800 throw ErrorClass(
"Error during setOtherConstraintResultCon!");
4801 ok &= (osresult1->
IsEqual(osresult2));
4803 throw ErrorClass(
"setOtherConstraintResultCon: osresult objects falsely compare unequal!");
4812 throw ErrorClass(
"Error during setOtherConstraintResultName!");
4813 ok &= (!osresult1->
IsEqual(osresult2));
4815 throw ErrorClass(
"setOtherConstraintResultName: osresult objects falsely compare equal!");
4818 throw ErrorClass(
"Error during setOtherConstraintResultName!");
4819 ok &= (osresult1->
IsEqual(osresult2));
4821 throw ErrorClass(
"setOtherConstraintResultName: osresult objects falsely compare unequal!");
4825 throw ErrorClass(
"Error during setOtherConstraintResultDescription!");
4826 ok &= (!osresult1->
IsEqual(osresult2));
4828 throw ErrorClass(
"setOtherConstraintResultDescription: osresult objects falsely compare equal!");
4831 throw ErrorClass(
"Error during setOtherConstraintResultDescription!");
4832 ok &= (osresult1->
IsEqual(osresult2));
4834 throw ErrorClass(
"setOtherConstraintResultDescription: osresult objects falsely compare unequal!");
4838 throw ErrorClass(
"Error during setOtherConstraintResultValue!");
4839 ok &= (!osresult1->
IsEqual(osresult2));
4841 throw ErrorClass(
"setOtherConstraintResultValue: osresult objects falsely compare equal!");
4844 throw ErrorClass(
"Error during setOtherConstraintResultValue!");
4845 ok &= (osresult1->
IsEqual(osresult2));
4847 throw ErrorClass(
"setOtherConstraintResultValue: osresult objects falsely compare unequal!");
4851 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfEnumerations!");
4852 ok &= (!osresult1->
IsEqual(osresult2));
4854 throw ErrorClass(
"setOtherConstraintResultNumberOfEnumerations: osresult objects falsely compare equal!");
4857 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfEnumerations!");
4858 ok &= (osresult1->
IsEqual(osresult2));
4860 throw ErrorClass(
"setOtherConstraintResultNumberOfEnumerations: osresult objects falsely compare unequal!");
4862 for (
int k=0;
k < 2; ++
k)
4864 intArray[0] = 1000*i + 1330 + 10*
k + 1;
4865 intArray[1] = 1000*i + 1330 + 10*k + 2;
4866 intArray[2] = 1000*i + 1330 + 10*k + 3;
4871 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration (constraint)!");
4872 ok &= (!osresult1->
IsEqual(osresult2));
4874 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare equal!");
4878 throw ErrorClass(
"Error during setOtherOptionOrResultEnumeration (constraint)!");
4879 ok &= (osresult1->
IsEqual(osresult2));
4881 throw ErrorClass(
"setOtherOptionOrResultEnumeration: osresult objects falsely compare unequal!");
4887 throw ErrorClass(
"Error during setNumberOfOtherSolutionResults!");
4888 ok &= (!osresult1->
IsEqual(osresult2));
4890 throw ErrorClass(
"setNumberOfOtherSolutionResults: osresult objects falsely compare equal!");
4893 throw ErrorClass(
"Error during setNumberOfOtherSolutionResults!");
4894 ok &= (osresult1->
IsEqual(osresult2));
4896 throw ErrorClass(
"setNumberOfOtherSolutionResults: osresult objects falsely compare unequal!");
4898 for (
int j=0;
j < 3; ++
j)
4902 throw ErrorClass(
"Error during setOtherSolutionResultName!");
4903 ok &= (!osresult1->
IsEqual(osresult2));
4905 throw ErrorClass(
"setOtherSolutionResultName: osresult objects falsely compare equal!");
4908 throw ErrorClass(
"Error during setOtherSolutionResultName!");
4909 ok &= (osresult1->
IsEqual(osresult2));
4911 throw ErrorClass(
"setOtherSolutionResultName: osresult objects falsely compare unequal!");
4915 throw ErrorClass(
"Error during setOtherSolutionResultCategory!");
4916 ok &= (!osresult1->
IsEqual(osresult2));
4918 throw ErrorClass(
"setOtherSolutionResultCategory: osresult objects falsely compare equal!");
4921 throw ErrorClass(
"Error during setOtherSolutionResultCategory!");
4922 ok &= (osresult1->
IsEqual(osresult2));
4924 throw ErrorClass(
"setOtherSolutionResultCategory: osresult objects falsely compare unequal!");
4928 throw ErrorClass(
"Error during setOtherSolutionResultDescription!");
4929 ok &= (!osresult1->
IsEqual(osresult2));
4931 throw ErrorClass(
"setOtherSolutionResultDescription: osresult objects falsely compare equal!");
4934 throw ErrorClass(
"Error during setOtherSolutionResultDescription!");
4935 ok &= (osresult1->
IsEqual(osresult2));
4937 throw ErrorClass(
"setOtherSolutionResultDescription: osresult objects falsely compare unequal!");
4941 throw ErrorClass(
"Error during setOtherSolutionResultNumberOfItems!");
4942 ok &= (!osresult1->
IsEqual(osresult2));
4944 throw ErrorClass(
"setOtherSolutionResultNumberOfItems: osresult objects falsely compare equal!");
4947 throw ErrorClass(
"Error during setOtherSolutionResultNumberOfItems!");
4948 ok &= (osresult1->
IsEqual(osresult2));
4950 throw ErrorClass(
"setOtherSolutionResultNumberOfItems: osresult objects falsely compare unequal!");
4952 for (
int k=0;
k < 3; ++
k)
4956 throw ErrorClass(
"Error during setOtherSolutionResultItem!");
4957 ok &= (!osresult1->
IsEqual(osresult2));
4959 throw ErrorClass(
"setOtherSolutionResultItem: osresult objects falsely compare equal!");
4962 throw ErrorClass(
"Error during setOtherSolutionResultItem!");
4963 ok &= (osresult1->
IsEqual(osresult2));
4965 throw ErrorClass(
"setOtherSolutionResultItem: osresult objects falsely compare unequal!");
4972 throw ErrorClass(
"Error during setNumberOfSolverOutputs!");
4973 ok &= (!osresult1->
IsEqual(osresult2));
4975 throw ErrorClass(
"setNumberOfSolverOutputs: osresult objects falsely compare equal!");
4978 throw ErrorClass(
"Error during setNumberOfSolverOutputs!");
4979 ok &= (osresult1->
IsEqual(osresult2));
4981 throw ErrorClass(
"setNumberOfSolverOutputs: osresult objects falsely compare unequal!");
4983 for (
int i=0; i < 3; ++i)
4987 throw ErrorClass(
"Error during setSolverOutputName!");
4988 ok &= (!osresult1->
IsEqual(osresult2));
4990 throw ErrorClass(
"setSolverOutputName: osresult objects falsely compare equal!");
4993 throw ErrorClass(
"Error during setSolverOutputName!");
4994 ok &= (osresult1->
IsEqual(osresult2));
4996 throw ErrorClass(
"setSolverOutputName: osresult objects falsely compare unequal!");
5000 throw ErrorClass(
"Error during setSolverOutputCategory!");
5001 ok &= (!osresult1->
IsEqual(osresult2));
5003 throw ErrorClass(
"setSolverOutputCategory: osresult objects falsely compare equal!");
5006 throw ErrorClass(
"Error during setSolverOutputCategory!");
5007 ok &= (osresult1->
IsEqual(osresult2));
5009 throw ErrorClass(
"setSolverOutputCategory: osresult objects falsely compare unequal!");
5013 throw ErrorClass(
"Error during setSolverOutputDescription!");
5014 ok &= (!osresult1->
IsEqual(osresult2));
5016 throw ErrorClass(
"setSolverOutputDescription: osresult objects falsely compare equal!");
5019 throw ErrorClass(
"Error during setSolverOutputDescription!");
5020 ok &= (osresult1->
IsEqual(osresult2));
5022 throw ErrorClass(
"setSolverOutputDescription: osresult objects falsely compare unequal!");
5026 throw ErrorClass(
"Error during setSolverOutputNumberOfItems!");
5027 ok &= (!osresult1->
IsEqual(osresult2));
5029 throw ErrorClass(
"setSolverOutputNumberOfItems: osresult objects falsely compare equal!");
5032 throw ErrorClass(
"Error during setSolverOutputNumberOfItems!");
5033 ok &= (osresult1->
IsEqual(osresult2));
5035 throw ErrorClass(
"setSolverOutputNumberOfItems: osresult objects falsely compare unequal!");
5037 for (
int j=0;
j < 3; ++
j)
5041 throw ErrorClass(
"Error during setSolverOutputItem!");
5042 ok &= (!osresult1->
IsEqual(osresult2));
5044 throw ErrorClass(
"setSolverOutputItem: osresult objects falsely compare equal!");
5047 throw ErrorClass(
"Error during setSolverOutputItem!");
5048 ok &= (osresult1->
IsEqual(osresult2));
5050 throw ErrorClass(
"setSolverOutputItem: osresult objects falsely compare unequal!");
5055 throw ErrorClass(
"Unspecified error while testing set() methods");
5057 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSrL set() tools" << std::endl;
5058 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
5060 cout << endl <<
"TEST " << ++nOfTest <<
": OSrLWriter and OSrLReader " << endl << endl;
5065 std::string tempOSrL;
5067 cout <<
"write out the OSResult object from previous test" << endl;
5069 tempOSrL = osrlwriter->
writeOSrL( osresult1);
5071 cout << tempOSrL << endl;
5073 cout <<
"Read the string back into memory" << endl;
5075 osresult3 = osrlreader->
readOSrL( tempOSrL);
5077 cout <<
"write out the new object created" << endl;
5079 tempOSrL = osrlwriter->
writeOSrL( osresult3);
5081 std::cout <<
"Here is the temporary OSrL string produced from OSrLReader" << std::endl << tempOSrL << std::endl;
5083 cout <<
"verify that the old and new objects are equal" << endl;
5085 ok &= (osresult1->
IsEqual(osresult3));
5087 throw ErrorClass(
"Writing an osresult then reading leads to loss of data");
5089 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSrLWriter and OSrLReader" << std::endl;
5090 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
5097 cout << endl <<
"TEST " << ++nOfTest <<
": OSrL get() methods" << endl << endl;
5100 if (osresult2 != NULL)
delete osresult2;
5103 std::string tempStr;
5110 throw ErrorClass(
"Error during setGeneralStatusType!");
5114 throw ErrorClass(
"Error during setGeneralStatusDescription!");
5119 throw ErrorClass(
"Error during setNumberOfGeneralSubstatuses!");
5120 for (
int i=0; i < tempInt; i++)
5125 throw ErrorClass(
"Error during setGeneralSubstatusName!");
5129 throw ErrorClass(
"Error during setGeneralSubstatusDescription!");
5135 throw ErrorClass(
"Error during setGeneralMessage!");
5139 throw ErrorClass(
"Error during setServiceURI!");
5143 throw ErrorClass(
"Error during setServiceName!");
5147 throw ErrorClass(
"Error during setInstanceName!");
5149 ok &= osresult2->
setJobID(tempStr);
5155 throw ErrorClass(
"Error during setSolverInvoked!");
5159 throw ErrorClass(
"Error during setTimeStamp!");
5164 throw ErrorClass(
"Error during setNumberOfOtherGeneralResults!");
5165 for (
int i=0; i < tempInt; i++)
5170 throw ErrorClass(
"Error during setOtherGeneralResultName!");
5174 throw ErrorClass(
"Error during setOtherGeneralResultValue!");
5178 throw ErrorClass(
"Error during setOtherGeneralResultDescription!");
5184 throw ErrorClass(
"Error during setSystemInformation!");
5188 throw ErrorClass(
"Error during setAvailableDiskSpaceUnit!");
5192 throw ErrorClass(
"Error during setAvailableDiskSpaceDescription!");
5196 throw ErrorClass(
"Error during setAvailableDiskSpaceValue!");
5200 throw ErrorClass(
"Error during setAvailableMemoryUnit!");
5204 throw ErrorClass(
"Error during setAvailableMemoryDescription!");
5208 throw ErrorClass(
"Error during setAvailableMemoryValue!");
5212 throw ErrorClass(
"Error during setAvailableCPUSpeedUnit!");
5216 throw ErrorClass(
"Error during setAvailableCPUSpeedDescription!");
5220 throw ErrorClass(
"Error during setAvailableCPUSpeedValue!");
5224 throw ErrorClass(
"Error during setAvailableCPUNumberDescription!");
5228 throw ErrorClass(
"Error during setAvailableCPUNumberValue!");
5233 throw ErrorClass(
"Error during setNumberOfOtherSystemResults!");
5234 for (
int i=0; i < tempInt; i++)
5239 throw ErrorClass(
"Error during setOtherSystemResultName!");
5243 throw ErrorClass(
"Error during setOtherSystemResultValue!");
5247 throw ErrorClass(
"Error during setOtherSystemResultDescription!");
5253 throw ErrorClass(
"Error during setCurrentState!");
5257 throw ErrorClass(
"Error during setCurrentJobCount!");
5261 throw ErrorClass(
"Error during setTotalJobsSoFar!");
5265 throw ErrorClass(
"Error during setTimeServiceStarted!");
5269 throw ErrorClass(
"Error during setServiceUtilization!");
5274 throw ErrorClass(
"Error during setNumberOfOtherServiceResults!");
5275 for (
int i=0; i < tempInt; i++)
5280 throw ErrorClass(
"Error during setOtherServiceResultName!");
5284 throw ErrorClass(
"Error during setOtherServiceResultValue!");
5288 throw ErrorClass(
"Error during setOtherServiceResultDescription!");
5294 throw ErrorClass(
"Error during setJobStatus!");
5298 throw ErrorClass(
"Error during setJobSubmitTime!");
5302 throw ErrorClass(
"Error during setScheduledStartTime!");
5306 throw ErrorClass(
"Error during setActualStartTime!");
5310 throw ErrorClass(
"Error during setJobEndTime!");
5315 throw ErrorClass(
"Error during setNumberOfTimes!");
5316 for (
int i=0; i < tempInt; i++)
5318 string tempStr1,tempStr2,tempStr3,tempStr4;
5326 throw ErrorClass(
"Error during setTimingInformation!");
5332 throw ErrorClass(
"Error during setUsedDiskSpaceUnit!");
5336 throw ErrorClass(
"Error during setUsedDiskSpaceDescription!");
5340 throw ErrorClass(
"Error during setUsedDiskSpaceValue!");
5344 throw ErrorClass(
"Error during setUsedMemoryUnit!");
5348 throw ErrorClass(
"Error during setUsedMemoryDescription!");
5352 throw ErrorClass(
"Error during setUsedMemoryValue!");
5356 throw ErrorClass(
"Error during setUsedCPUSpeedUnit!");
5360 throw ErrorClass(
"Error during setUsedCPUSpeedDescription!");
5364 throw ErrorClass(
"Error during setUsedCPUSpeedValue!");
5368 throw ErrorClass(
"Error during setUsedCPUNumberDescription!");
5372 throw ErrorClass(
"Error during setUsedCPUNumberValue!");
5377 throw ErrorClass(
"Error during setNumberOfOtherJobResults!");
5378 for (
int i=0; i < tempInt; i++)
5383 throw ErrorClass(
"Error during setOtherJobResultName!");
5387 throw ErrorClass(
"Error during setOtherJobResultValue!");
5391 throw ErrorClass(
"Error during setOtherJobResultDescription!");
5397 throw ErrorClass(
"Error during setSolutionNumber!");
5398 int nSoln = tempInt;
5399 int nVar, nObj, nCon, nOther, nItem;
5404 throw ErrorClass(
"Error during setVariableNumber!");
5408 throw ErrorClass(
"Error during setObjectiveNumber!");
5412 throw ErrorClass(
"Error during setConstraintNumber!");
5414 for (
int i=0; i < nSoln; ++i)
5419 throw ErrorClass(
"Error during setSolutionTargetObjectiveIdx!");
5423 throw ErrorClass(
"Error during getSolutionTargetObjectiveName!");
5427 throw ErrorClass(
"Error during setSolutionWeightedObjectives!");
5431 throw ErrorClass(
"Error during setSolutionStatusType!");
5435 throw ErrorClass(
"Error during setSolutionStatusDescription!");
5440 throw ErrorClass(
"Error during setNumberOfSolutionSubstatuses!");
5442 for (
int j=0;
j < tempInt; ++
j)
5447 throw ErrorClass(
"Error during setSolutionSubstatusType!");
5451 throw ErrorClass(
"Error during setSolutionSubstatusDescription!");
5457 throw ErrorClass(
"Error during setSolutionMessage!");
5462 throw ErrorClass(
"Error during setNumberOfVarValues!");
5465 for (
int j=0;
j < nVar; ++
j)
5470 ok &= osresult2->
setVarValue(i,
j,tempInt,tempStr,tempDbl);
5472 throw ErrorClass(
"Error during setVarValue!");
5478 throw ErrorClass(
"Error during setNumberOfVarValuesString!");
5481 std::string tempStr1, tempStr2;
5483 for (
int j=0;
j < nVar; ++
j)
5490 throw ErrorClass(
"Error during setVarValueString!");
5495 for (
int j=0;
j<tempInt; ++
j)
5499 throw ErrorClass(
"Error during setBasisStatus (variables basic)!");
5502 for (
int j=0;
j<tempInt; ++
j)
5506 throw ErrorClass(
"Error during setBasisStatus (variables atLower)!");
5509 for (
int j=0;
j<tempInt; ++
j)
5513 throw ErrorClass(
"Error during setBasisStatus (variables atUpper)!");
5516 for (
int j=0;
j<tempInt; ++
j)
5520 throw ErrorClass(
"Error during setBasisStatus (variables atEquality)!");
5523 for (
int j=0;
j<tempInt; ++
j)
5527 throw ErrorClass(
"Error during setBasisStatus (variables isFree)!");
5530 for (
int j=0;
j<tempInt; ++
j)
5534 throw ErrorClass(
"Error during setBasisStatus (variables superbasic)!");
5537 for (
int j=0;
j<tempInt; ++
j)
5541 throw ErrorClass(
"Error during setBasisStatus (variables unknown)!");
5547 throw ErrorClass(
"Error during setNumberOfOtherVariableResults!");
5549 for (
int j=0;
j < nOther; ++
j)
5554 throw ErrorClass(
"Error during setOtherVariableResultName!");
5558 throw ErrorClass(
"Error during setOtherVariableResultDescription!");
5562 throw ErrorClass(
"Error during setOtherVariableResultValue!");
5567 throw ErrorClass(
"Error during setOtherVariableResultNumberOfVar!");
5570 for (
int k=0;
k < nVar; ++
k)
5575 throw ErrorClass(
"Error during setOtherVariableResultVarIdx!");
5579 throw ErrorClass(
"Error during setOtherVariableResultVar!");
5585 throw ErrorClass(
"Error during setOtherVariableResultNumberOfEnumerations!");
5587 for (
int k=0;
k < nEnum; ++
k)
5593 for (
int l=0; l<tempInt; ++l)
5598 throw ErrorClass(
"Error during setOtherVariableResultEnumeration!");
5605 throw ErrorClass(
"Error during setNumberOfObjValues!");
5607 for (
int j=0;
j < nObj; ++
j)
5612 ok &= osresult2->
setObjValue(i,
j,tempInt,tempStr,tempDbl);
5614 throw ErrorClass(
"Error during setObjValue!");
5619 for (
int j=0;
j<tempInt; ++
j)
5623 throw ErrorClass(
"Error during setBasisStatus (objectives basic)!");
5626 for (
int j=0;
j<tempInt; ++
j)
5630 throw ErrorClass(
"Error during setBasisStatus (objectives atLower)!");
5633 for (
int j=0;
j<tempInt; ++
j)
5637 throw ErrorClass(
"Error during setBasisStatus (objectives atUpper)!");
5640 for (
int j=0;
j<tempInt; ++
j)
5644 throw ErrorClass(
"Error during setBasisStatus (objectives atEquality)!");
5647 for (
int j=0;
j<tempInt; ++
j)
5651 throw ErrorClass(
"Error during setBasisStatus (objectives isFree)!");
5654 for (
int j=0;
j<tempInt; ++
j)
5658 throw ErrorClass(
"Error during setBasisStatus (objectives superbasic)!");
5661 for (
int j=0;
j<tempInt; ++
j)
5665 throw ErrorClass(
"Error during setBasisStatus (objectives unknown)!");
5672 throw ErrorClass(
"Error during setNumberOfOtherObjectiveResults!");
5674 for (
int j=0;
j < nOther; ++
j)
5679 throw ErrorClass(
"Error during setOtherObjectiveResultName!");
5683 throw ErrorClass(
"Error during setOtherObjectiveResultDescription!");
5687 throw ErrorClass(
"Error during setOtherObjectiveResultValue!");
5692 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfObj!");
5695 for (
int k=0;
k < nObj; ++
k)
5700 throw ErrorClass(
"Error during setOtherObjectiveResultObjIdx!");
5704 throw ErrorClass(
"Error during setOtherObjectiveResultObj!");
5710 throw ErrorClass(
"Error during setOtherObjectiveResultNumberOfEnumerations!");
5711 std::string tempStr1, tempStr2;
5713 for (
int k=0;
k < nEnum; ++
k)
5719 for (
int l=0; l<tempInt; ++l)
5724 throw ErrorClass(
"Error during setOtherObjectiveResultEnumeration!");
5732 throw ErrorClass(
"Error during setNumberOfDualValues!");
5734 for (
int j=0;
j < nCon; ++
j)
5741 throw ErrorClass(
"Error during setDualValue!");
5746 for (
int j=0;
j<tempInt; ++
j)
5750 throw ErrorClass(
"Error during setBasisStatus (constraints basic)!");
5753 for (
int j=0;
j<tempInt; ++
j)
5757 throw ErrorClass(
"Error during setBasisStatus (constraints atLower)!");
5760 for (
int j=0;
j<tempInt; ++
j)
5764 throw ErrorClass(
"Error during setBasisStatus (constraints atUpper)!");
5767 for (
int j=0;
j<tempInt; ++
j)
5771 throw ErrorClass(
"Error during setBasisStatus (constraints atEquality)!");
5774 for (
int j=0;
j<tempInt; ++
j)
5778 throw ErrorClass(
"Error during setBasisStatus (constraints isFree)!");
5781 for (
int j=0;
j<tempInt; ++
j)
5785 throw ErrorClass(
"Error during setBasisStatus (constraints superbasic)!");
5788 for (
int j=0;
j<tempInt; ++
j)
5792 throw ErrorClass(
"Error during setBasisStatus (constraints unknown)!");
5800 throw ErrorClass(
"Error during setNumberOfOtherConstraintResults!");
5802 for (
int j=0;
j < nOther; ++
j)
5807 throw ErrorClass(
"Error during setOtherConstraintResultName!");
5811 throw ErrorClass(
"Error during setOtherConstraintResultDescription!");
5815 throw ErrorClass(
"Error during setOtherConstraintResultValue!");
5819 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfCon!");
5822 for (
int k=0;
k < nCon; ++
k)
5827 throw ErrorClass(
"Error during setOtherConstraintResultConIdx!");
5831 throw ErrorClass(
"Error during setOtherConstraintResultCon!");
5839 throw ErrorClass(
"Error during setOtherConstraintResultNumberOfEnumerations!");
5840 std::string tempStr1, tempStr2;
5842 for (
int k=0;
k < nEnum; ++
k)
5847 for (
int l=0; l<tempInt; ++l)
5853 throw ErrorClass(
"Error during setOtherConstraintResultEnumeration!");
5861 throw ErrorClass(
"Error during setNumberOfOtherSolutionResults!");
5863 for (
int j=0;
j < nOther; ++
j)
5868 throw ErrorClass(
"Error during setOtherSolutionResultName!");
5872 throw ErrorClass(
"Error during setOtherSolutionResultCategory!");
5876 throw ErrorClass(
"Error during setOtherSolutionResultDescription!");
5880 throw ErrorClass(
"Error during setOtherSolutionResultNumberOfItems!");
5883 for (
int k=0;
k < nItem; ++
k)
5888 throw ErrorClass(
"Error during setSolutionResultItem!");
5896 throw ErrorClass(
"Error during setNumberOfSolverOutputs!");
5898 for (
int i=0; i < nOther; ++i)
5903 throw ErrorClass(
"Error during setSolverOutputName!");
5907 throw ErrorClass(
"Error during setSolverOutputCategory!");
5911 throw ErrorClass(
"Error during setSolverOutputDescription!");
5915 throw ErrorClass(
"Error during setSolverOutputNumberOfItems!");
5916 for (
int j=0;
j < tempInt; ++
j)
5921 throw ErrorClass(
"Error during setSolverOutputItem!");
5926 ok &= osresult1->
IsEqual(osresult2);
5928 throw ErrorClass(
"Error duplicating OSResult object using get() and set() methods");
5930 if (osrlwriter != NULL)
delete osrlwriter;
5932 if (osrlreader != NULL)
delete osrlreader;
5934 if (osresult1 != NULL)
delete osresult1;
5936 if (osresult2 != NULL)
delete osresult2;
5940 if (tempArray != NULL)
delete[] tempArray;
5943 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of OSrL tools" << std::endl;
5944 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
5949 cout << endl << endl << endl;
5950 if (osrlwriter != NULL)
delete osrlwriter;
5952 if (osrlreader != NULL)
delete osrlreader;
5954 if (osresult1 != NULL)
delete osresult1;
5956 if (osresult2 != NULL)
delete osresult2;
5961 if (tempArray != NULL)
delete[] tempArray;
5964 unitTestResultFailure << eclass.
errormsg << endl;
5965 unitTestResultFailure <<
"Test " << nOfTest <<
": There was a failure in the test of OSrL get() methods" << endl;
5980 cout << endl <<
"TEST " << ++nOfTest <<
": OSrL parser" << endl << endl;
5986 std::string tmpOSrL;
5987 clock_t start, finish;
5990 cout <<
"Test parsing an OSrL file" << endl;
5991 cout <<
"First read the OSrL file into a string" << endl;
5992 osrlFileName = dataDir +
"osrlFiles" + dirsep +
"parserTest.osrl";
5996 duration = (double) (finish - start) / CLOCKS_PER_SEC;
5997 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
5998 cout << osrl << endl;
6000 cout <<
"PARSE THE OSRL STRING INTO AN OSRESULT OBJECT" << endl;
6001 osresult = osrlreader->
readOSrL( osrl);
6002 cout <<
"Finished read; write OSResult object to temporary string" << endl;
6004 tmpOSrL = osrlwriter->
writeOSrL( osresult);
6006 cout << tmpOSrL << endl;
6024 cout << endl <<
"Test parsing another OSrL file" << endl;
6027 cout <<
"FIRST READ THE OSrL FILE INTO A STRING" << endl;
6029 osrlFileName = dataDir +
"osrlFiles" + dirsep +
"errorExample.osrl";
6032 duration = (double) (finish - start) / CLOCKS_PER_SEC;
6033 cout <<
"Reading the file into a string took (seconds): "<< duration << endl;
6034 cout <<
"PARSE THE OSRL STRING INTO AN OSRESULT OBJECT" << endl;
6035 osresult = osrlreader->
readOSrL( osrl);
6036 tmpOSrL = osrlwriter->
writeOSrL( osresult) ;
6046 "TEST " << nOfTest <<
": Successful test of OSrL parser on file parserTest.osrl"
6048 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6052 unitTestResultFailure << eclass.
errormsg << endl;
6053 unitTestResultFailure <<
"Test " << nOfTest <<
": There was a failure in the test for reading OSrL" << endl;
6055 if(osrlwriter != NULL)
delete osrlwriter;
6057 if(osrlreader != NULL)
delete osrlreader;
6059 if (fileUtil != NULL)
6064 if (intArray !=NULL)
6075 cout << endl <<
"TEST " << ++nOfTest <<
": Clp solver on parincLinearByRow.osil" << endl << endl;
6085 std::cout <<
"create a new COIN Clp for OSiL string solution" << std::endl;
6086 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinearByRow.osil";
6087 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincLinearByRow_clp.osol";
6093 std::cout <<
" Done reading the OSiL" << std::endl;
6096 std::cout <<
" Write the OSiL" << std::endl;
6099 std::cout <<
" Done writing the OSiL" << std::endl;
6101 cout <<
"call the COIN - clp Solver for parincLinearbyRow" << endl;
6103 std::cout <<
"call solver" << std::endl;
6105 std::cout <<
"returned from solver" << std::endl;
6111 cout << solver->
osrl << endl;
6113 cout <<
"COIN clp solver solution for parincLinearByRow checks." << endl;
6116 { cout <<
"COIN clp solver solution for parincLinearByRow in error:" << endl;
6117 cout << solver->
osrl << endl;
6119 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp on parincLinearByRow.osil");
6122 cout <<
"\nThe osrl file:\n" << solver->
osrl << endl;
6123 cout <<
"Start parsing the file" << endl;
6127 cout <<
"read successfully" << endl;
6132 cout <<
"osilreader successfully deleted" << endl;
6137 cout <<
"osolreader successfully deleted" << endl;
6142 cout <<
"solver successfully deleted" << endl;
6147 cout <<
"osilwriter successfully deleted" << endl;
6152 cout <<
"osrlreader successfully deleted" << endl;
6157 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincLinearByRow.osil with Clp" << std::endl;
6158 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6162 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Clp Solver:"
6165 if (osilreader != NULL)
6168 if (osolreader != NULL)
6174 if (osilwriter != NULL)
6177 if (osrlreader != NULL)
6180 if (fileUtil != NULL)
6188 cout << endl <<
"TEST " << ++nOfTest <<
": Clp warmstart tests with parincLinear.osil" << endl << endl;
6204 std::cout <<
"simply size the warmstart" << std::endl;
6205 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinear.osil";
6217 std::cout <<
"call the COIN - clp Solver for parincLinear" << std::endl;
6219 std::cout <<
"returned from solver" << std::endl;
6222 std::cout <<
"initial solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6226 cout <<
"COIN clp solver interface passes initial warmstart test." << endl;
6230 cout <<
"COIN clp solver interface warmstart error:" << endl;
6231 cout << cSolver->
osrl << endl;
6234 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6237 std::cout << std::endl <<
"put a complete advanced basis" << std::endl;
6262 if(ok ==
false)
throw ErrorClass(
" Fail setting warmstart advanced basis for clp");
6264 std::cout <<
"call the COIN - clp Solver" << std::endl;
6266 std::cout <<
"returned from solver" << std::endl;
6269 std::cout <<
"warmstart solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6274 cout <<
"COIN clp solver interface passes complete basis warmstart test." << endl;
6278 cout <<
"COIN clp solver interface warmstart error:" << endl;
6279 cout << cSolver->
osrl << endl;
6282 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6286 std::cout << std::endl <<
"put a partial basis" << std::endl;
6304 if(ok ==
false)
throw ErrorClass(
" Fail setting warmstart partial basis for clp");
6305 std::cout <<
"call the COIN - clp Solver" << std::endl;
6307 std::cout <<
"returned from solver" << std::endl;
6310 std::cout <<
"warmstart solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6314 cout <<
"COIN clp solver interface passes partial basis warmstart test." << endl;
6318 cout <<
"COIN clp solver interface warmstart error:" << endl;
6319 cout << cSolver->
osrl << endl;
6322 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6326 std::cout << std::endl <<
"test unusual basis statuses" << std::endl;
6351 if(ok ==
false)
throw ErrorClass(
" Fail setting unusual basis statuses for clp");
6352 std::cout <<
"call the COIN - clp Solver" << std::endl;
6354 std::cout <<
"returned from solver" << std::endl;
6357 std::cout <<
"warmstart solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6361 cout <<
"COIN clp solver interface passes unusual basis warmstart test." << endl;
6365 cout <<
"COIN clp solver interface warmstart error:" << endl;
6366 cout << cSolver->
osrl << endl;
6369 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6372 std::cout << std::endl <<
"test over-saturated basis" << std::endl;
6396 if(ok ==
false)
throw ErrorClass(
" Fail setting over-saturated basis for clp");
6397 std::cout <<
"call the COIN - clp Solver" << std::endl;
6399 std::cout <<
"returned from solver" << std::endl;
6402 std::cout <<
"warmstart solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6406 cout <<
"COIN clp solver interface passes over-saturated basis warmstart test." << endl;
6410 cout <<
"COIN clp solver interface warmstart error:" << endl;
6411 cout << cSolver->
osrl << endl;
6413 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6416 std::cout << std::endl <<
"test using optimal basis" << std::endl;
6439 double* iv =
new double[2];
6440 iv[0] = 539.9999999999999;
6441 iv[1] = 252.0000000000001;
6443 if (!ok)
throw ErrorClass(
" Fail setting starting values during warmstart tests");
6446 std::cout <<
"call the COIN - clp Solver" << std::endl;
6448 std::cout <<
"returned from solver" << std::endl;
6451 std::cout <<
"solve from optimal solution took " <<
getItCount(cSolver->
osrl) <<
" iterations" << std::endl;
6456 cout <<
"COIN clp solver interface passes warmstart from optimal basis." << endl;
6460 cout <<
"COIN clp solver interface warmstart error:" << endl;
6461 cout << cSolver->
osrl << endl;
6464 cout << cSolver->
osrl << endl;
6465 if(ok ==
false)
throw ErrorClass(
" Fail unit test with clp warmstarts on parincLinear.osil");
6470 cout <<
"solver successfully deleted" << endl;
6475 unitTestResult <<
"TEST " << nOfTest <<
": Warmstarts for problem parincLinear.osil with Clp" << std::endl;
6476 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6480 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Clp Solver Warmstarts:"
6483 if (cSolver != NULL)
6486 if (fileUtil != NULL)
6495 cout << endl <<
"TEST " << ++nOfTest <<
": Clp solver on parincQuadratic.osil" << endl << endl;
6496 cout <<
"create a new Clp Solver for OSiL string solution" << endl;
6502 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
6506 solver->
osil = osil;
6507 cout <<
"call the clp Solver" << endl;
6515 cout << solver->
osrl << endl;
6517 cout <<
"Clp solver solution for parincQuadratic checks." << endl;
6520 { cout <<
"Clp solver solution for parincQuadratic in error:" << endl;
6521 cout << solver->
osrl << endl;
6523 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Clp on parincQuadradic.osil");
6530 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with Clp" << std::endl;
6531 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6535 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Clp Solver:"
6537 if (osilreader != NULL)
6543 if (fileUtil != NULL)
6551 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver on p0033.osil" << endl << endl;
6558 std::cout <<
"create a new COIN Cbc for OSiL string solution" << std::endl;
6560 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
6566 solver->
osil = osil;
6567 solver->
osol = osol;
6570 cout <<
"call the COIN - Cbc Solver for p0033" << endl;
6578 cout << solver->
osrl << endl;
6580 cout <<
"Coin cbc solution for p0033 checks" << endl;
6583 { cout <<
"Coin cbc solution for p0033 in error:" << endl;
6584 cout << solver->
osrl << endl;
6586 if (ok ==
false)
throw ErrorClass(
" Fail unit test with Cbc on p0033.osil");
6596 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with Cbc" << std::endl;
6597 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6601 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Cbc Solver:"
6606 if (osilreader != NULL)
6609 if (osolreader != NULL)
6612 if (fileUtil != NULL)
6617 if( THOROUGH ==
true){
6621 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver on p0033MULT.osil" << endl << endl;
6628 std::cout <<
"create a new COIN Cbc for OSiL string solution" << std::endl;
6630 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033MULT.osil";
6636 solver->
osil = osil;
6637 solver->
osol = osol;
6640 cout <<
"call the COIN - Cbc Solver for p0033MULT" << endl;
6648 cout << solver->
osrl << endl;
6650 cout <<
"Coin cbc solution for p0033MULT checks" << endl;
6653 { cout <<
"Coin cbc solution for p0033MULT in error:" << endl;
6654 cout << solver->
osrl << endl;
6656 if (ok ==
false)
throw ErrorClass(
" Fail unit test with Cbc on p0033MULT.osil");
6665 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033MULT.osil with Cbc" << std::endl;
6666 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6670 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Cbc Solver:"
6675 if (osilreader != NULL)
6678 if (osolreader != NULL)
6681 if (fileUtil != NULL)
6689 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver on p0033.osil - node limit set" << endl << endl;
6697 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
6698 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_cbc.osol";
6702 solver->
osil = osil;
6703 solver->
osol = osol;
6706 cout <<
"call the COIN - Cbc Solver for p0033" << endl;
6711 if( solver->
osrl.find(
"node limit reached") != std::string::npos)
6715 if (ok ==
false)
throw ErrorClass(
" node limit option on p0033.osil not processed properly");
6724 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with Cbc node limit" << std::endl;
6725 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6729 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Cbc Solver:"
6734 if (osilreader != NULL)
6737 if (osolreader != NULL)
6740 if (fileUtil != NULL)
6747 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver on p0201.osil" << endl << endl;
6755 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0201.osil";
6756 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0201_cbc.osol";
6760 solver->
osil = osil;
6761 solver->
osol = osol;
6764 cout <<
"call the COIN - Cbc Solver for p0201" << endl;
6766 cout <<
"Here is the COIN Cbc solver solution for p0201" << endl;
6767 std::cout << solver->
osrl << std::endl;
6771 string::size_type
pos;
6772 pos = solver->
osrl.find(
"node limit");
6773 if(pos == std::string::npos)
throw ErrorClass(
" Error with p0201 on Cbc");
6785 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0201.osil with Cbc" << std::endl;
6786 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6790 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Cbc Solver:"
6795 if (osilreader != NULL)
6798 if (osolreader != NULL)
6801 if (fileUtil != NULL)
6807 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver on parincInteger.osil" << endl << endl;
6815 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincInteger.osil";
6816 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincInteger_cbc.osol";
6820 cout <<
"parse OSiL file" << endl;
6822 solver->
osol = osol;
6823 cout <<
"call the COIN - Cbc Solver for parincInteger" << endl;
6831 cout << solver->
osrl << endl;
6833 cout <<
"COIN cbc solver solution for parincInteger checks." << endl;
6838 { cout <<
"COIN cbc solver solution for parincInteger in error:" << endl;
6839 cout << solver->
osrl << endl;
6841 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Cbc on parincInteger.osil");
6850 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincInteger.osil with Cbc" << std::endl;
6851 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6855 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Cbc Solver:"
6860 if (osilreader != NULL)
6863 if (osolreader != NULL)
6866 if (fileUtil != NULL)
6872 #ifdef COIN_HAS_SYMPHONY
6874 cout << endl <<
"TEST " << ++nOfTest <<
": SYMPHONY solver on p0033.osil" << endl << endl;
6881 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
6882 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_sym.osol";
6886 solver->
osil = osil;
6889 cout <<
"build the solver instance for COIN - SYMPHONY" << endl;
6899 cout << solver->
osrl << endl;
6901 cout <<
"COIN SYMPHONY solver solution for p0033 checks." << endl;
6904 { cout <<
"COIN SYMPHONY solver solution for p0033 in error:" << endl;
6905 cout << solver->
osrl << endl;
6907 if(ok ==
false)
throw ErrorClass(
" Fail unit test with SYMPHONY on p0033.osil");
6914 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with SYMPHONY" << std::endl;
6915 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6919 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the SYMPHONY Solver:"
6920 << endl << eclass.
errormsg << endl;
6924 if (osolreader != NULL)
6927 if (fileUtil != NULL)
6935 #ifdef COIN_HAS_DYLP
6937 cout << endl <<
"TEST " << ++nOfTest <<
": DyLP solver on parincLinear.osil" << endl << endl;
6944 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinear.osil";
6945 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincLinear_dylp.osol";
6949 solver->
osol = osol;
6951 cout <<
"call the COIN - DyLP solver for parincLinear" << endl;
6960 cout << solver->
osrl << endl;
6962 cout <<
"COIN DyLP solver solution for parincLinear checks." << endl;
6965 { cout <<
"COIN DyLP solver solution for parincLinear in error:" << endl;
6966 cout << solver->
osrl << endl;
6968 if(ok ==
false)
throw ErrorClass(
" Fail unit test with DyLP on parincLinear.osil");
6975 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincLinear.osil with DyLP" << std::endl;
6976 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
6980 cout <<
"OSrL = " << solver->
osrl << endl;
6981 cout << endl << endl << endl;
6982 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the DyLP Solver:"
6983 << endl << eclass.
errormsg << endl;
6987 if (osilreader != NULL)
6990 if (fileUtil != NULL)
6999 cout << endl <<
"TEST " << ++nOfTest <<
": Vol solver on volumeTest.osil" << endl << endl;
7006 osilFileName = dataDir +
"osilFiles" + dirsep +
"volumeTest.osil";
7007 osolFileName = dataDir +
"osolFiles" + dirsep +
"volumeTest_vol.osol";
7011 solver->
osil = osil;
7014 cout <<
"call the COIN - Vol solver for volumeTest" << endl;
7023 cout << solver->
osrl << endl;
7025 cout <<
"COIN Vol solver solution for volumeTest checks." << endl;
7028 { cout <<
"COIN Vol solver solution for volumeTest in error:" << endl;
7029 cout << solver->
osrl << endl;
7031 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Vol on volumeTest.osil");
7038 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem volumeTest.osil with Vol" << std::endl;
7039 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7043 cout <<
"OSrL = " << solver->
osrl << endl;
7044 cout << endl << endl << endl;
7045 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Vol Solver:"
7046 << endl << eclass.
errormsg << endl;
7050 if (osolreader != NULL)
7053 if (fileUtil != NULL)
7059 #ifdef COIN_HAS_GLPK
7061 cout << endl <<
"TEST " << ++nOfTest <<
": GLPK solver on p0033.osil" << endl << endl;
7069 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
7070 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_glpk.osol";
7076 cout <<
"call the GLPK Solver for p0033" << endl;
7085 cout << solver->
osrl << endl;
7087 cout <<
"GLPK solver solution for p0033 checks." << endl;
7090 { cout <<
"GLPK solver solution for p0033 in error:" << endl;
7091 cout << solver->
osrl << endl;
7093 if(ok ==
false)
throw ErrorClass(
" Fail unit test with GLPK on p0033.osil");
7102 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with GLPK" << std::endl;
7103 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7107 cout <<
"OSrL = " << solver->
osrl << endl;
7108 cout << endl << endl << endl;
7109 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Glpk Solver:"
7110 << endl << eclass.
errormsg << endl;
7114 if (osilreader != NULL)
7117 if (osolreader != NULL)
7120 if (fileUtil != NULL)
7128 cout << endl <<
"TEST " << ++nOfTest <<
": Cplex solver on p0033.osil" << endl << endl;
7134 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
7135 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_cpx.osol";
7139 solver->
osil = osil;
7140 solver->
osol = osol;
7142 cout <<
"call the CPLEX Solver for p0033" << endl;
7151 cout << solver->
osrl << endl;
7153 cout <<
"CPLEX solver solution for p0033 checks." << endl;
7156 { cout <<
"CPLEX solver solution for p0033 in error:" << endl;
7157 cout << solver->
osrl << endl;
7159 if(ok ==
false)
throw ErrorClass(
" Fail unit test with CPLEX on p0033.osil");
7164 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with CPLEX" << std::endl;
7165 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7169 cout <<
"OSrL = " << solver->
osrl << endl;
7170 cout << endl << endl << endl;
7171 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Cplex Solver:"
7172 << endl << eclass.
errormsg << endl;
7176 if (fileUtil != NULL)
7185 cout << endl <<
"TEST " << ++nOfTest <<
": Cplex solver on parincQuadratic.osil" << endl << endl;
7186 cout <<
"create a new Cplex Solver for OSiL string solution" << endl;
7192 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
7196 solver->
osil = osil;
7197 cout <<
"call the Cplex Solver" << endl;
7205 cout << solver->
osrl << endl;
7207 cout <<
"Cplex solver solution for parincQuadratic checks." << endl;
7210 { cout <<
"Cplex solver solution for parincQuadratic in error:" << endl;
7211 cout << solver->
osrl << endl;
7213 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Cplex on parincQuadradic.osil");
7220 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with Cplex" << std::endl;
7221 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7225 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Cplex Solver:"
7227 if (osilreader != NULL)
7233 if (fileUtil != NULL)
7238 #endif //ifdef COIN_HAS_CPX
7243 cout << endl <<
"TEST " << ++nOfTest <<
": Gurobi solver on p0033.osil" << endl << endl;
7249 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
7250 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_cpx.osol";
7254 solver->
osil = osil;
7255 solver->
osol = osol;
7257 cout <<
"call the Gurobi Solver for p0033" << endl;
7266 cout << solver->
osrl << endl;
7268 cout <<
"Gurobi solver solution for p0033 checks." << endl;
7271 { cout <<
"Gurobi solver solution for p0033 in error:" << endl;
7272 cout << solver->
osrl << endl;
7274 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Gurobi on p0033.osil");
7279 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with Gurobi" << std::endl;
7280 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7284 cout <<
"OSrL = " << solver->
osrl << endl;
7285 cout << endl << endl << endl;
7286 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Gurobi Solver:"
7287 << endl << eclass.
errormsg << endl;
7291 if (fileUtil != NULL)
7300 cout << endl <<
"TEST " << ++nOfTest <<
": Gurobi solver on parincQuadratic.osil" << endl << endl;
7301 cout <<
"create a new Gurobi Solver for OSiL string solution" << endl;
7307 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
7311 solver->
osil = osil;
7312 cout <<
"call the Gurobi Solver" << endl;
7320 cout << solver->
osrl << endl;
7322 cout <<
"Gurobi solver solution for parincQuadratic checks." << endl;
7325 { cout <<
"Gurobi solver solution for parincQuadratic in error:" << endl;
7326 cout << solver->
osrl << endl;
7328 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Gurobi on parincQuadradic.osil");
7335 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with Gurobi" << std::endl;
7336 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7340 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Gurobi Solver:"
7342 if (osilreader != NULL)
7348 if (fileUtil != NULL)
7353 #endif //ifdef COIN_HAS_GRB
7357 cout << endl <<
"TEST " << ++nOfTest <<
": MOSEK solver on p0033.osil" << endl << endl;
7363 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
7364 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_cpx.osol";
7368 solver->
osil = osil;
7369 solver->
osol = osol;
7371 cout <<
"call the MOSEK Solver for p0033" << endl;
7380 cout << solver->
osrl << endl;
7382 cout <<
"MOSEK solver solution for p0033 checks." << endl;
7385 { cout <<
"MOSEK solver solution for p0033 in error:" << endl;
7386 cout << solver->
osrl << endl;
7388 if(ok ==
false)
throw ErrorClass(
" Fail unit test with MOSEK on p0033.osil");
7393 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with MOSEK" << std::endl;
7394 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7398 cout <<
"OSrL = " << solver->
osrl << endl;
7399 cout << endl << endl << endl;
7400 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the MOSEK Solver:"
7401 << endl << eclass.
errormsg << endl;
7405 if (fileUtil != NULL)
7414 cout << endl <<
"TEST " << ++nOfTest <<
": MOSEK solver on parincQuadratic.osil" << endl << endl;
7415 cout <<
"create a new MOSEK Solver for OSiL string solution" << endl;
7421 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
7425 solver->
osil = osil;
7426 cout <<
"call the MOSEK Solver" << endl;
7434 cout << solver->
osrl << endl;
7436 cout <<
"MOSEK solver solution for parincQuadratic checks." << endl;
7439 { cout <<
"MOSEK solver solution for parincQuadratic in error:" << endl;
7440 cout << solver->
osrl << endl;
7442 if(ok ==
false)
throw ErrorClass(
" Fail unit test with MOSEK on parincQuadradic.osil");
7449 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with MOSEK" << std::endl;
7450 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7454 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the MOSEK Solver:"
7456 if (osilreader != NULL)
7462 if (fileUtil != NULL)
7467 #endif //ifdef COIN_HAS_MSK
7469 #ifdef COIN_HAS_SOPLEX
7471 cout << endl <<
"TEST " << ++nOfTest <<
": SoPlex solver on parincLinear.osil" << endl << endl;
7477 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinear.osil";
7480 solver->
osil = osil;
7482 cout <<
"call the SoPlex Solver for parincLinear" << endl;
7491 cout << solver->
osrl << endl;
7493 cout <<
"SoPlex solver solution for parincLinear checks." << endl;
7497 cout <<
"SoPlex solver solution for parincLinear in error:" << endl;
7498 cout << solver->
osrl << endl;
7500 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Soplex on parincLinear.osil");
7505 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincLinear.osil with SoPlex" << std::endl;
7506 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7510 cout <<
"OSrL = " << solver->
osrl << endl;
7511 cout << endl << endl << endl;
7512 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the SoPlex Solver:"
7513 << endl << eclass.
errormsg << endl;
7517 if (fileUtil != NULL)
7525 cout << endl <<
"TEST " << ++nOfTest <<
": XPRESS solver on p0033.osil" << endl << endl;
7531 osilFileName = dataDir +
"osilFiles" + dirsep +
"p0033.osil";
7532 osolFileName = dataDir +
"osolFiles" + dirsep +
"p0033_cpx.osol";
7536 solver->
osil = osil;
7537 solver->
osol = osol;
7539 cout <<
"call the XPRESS Solver for p0033" << endl;
7548 cout << solver->
osrl << endl;
7550 cout <<
"XPRESS solver solution for p0033 checks." << endl;
7553 { cout <<
"XPRESS solver solution for p0033 in error:" << endl;
7554 cout << solver->
osrl << endl;
7556 if(ok ==
false)
throw ErrorClass(
" Fail unit test with XPRESS on p0033.osil");
7561 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem p0033.osil with XPRESS" << std::endl;
7562 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7566 cout <<
"OSrL = " << solver->
osrl << endl;
7567 cout << endl << endl << endl;
7568 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the XPRESS Solver:"
7569 << endl << eclass.
errormsg << endl;
7573 if (fileUtil != NULL)
7582 cout << endl <<
"TEST " << ++nOfTest <<
": XPRESS solver on parincQuadratic.osil" << endl << endl;
7583 cout <<
"create a new XPRESS Solver for OSiL string solution" << endl;
7589 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
7593 solver->
osil = osil;
7594 cout <<
"call the XPRESS Solver" << endl;
7602 cout << solver->
osrl << endl;
7604 cout <<
"XPRESS solver solution for parincQuadratic checks." << endl;
7607 { cout <<
"XPRESS solver solution for parincQuadratic in error:" << endl;
7608 cout << solver->
osrl << endl;
7610 if(ok ==
false)
throw ErrorClass(
" Fail unit test with XPRESS on parincQuadradic.osil");
7617 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with XPRESS" << std::endl;
7618 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7622 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the XPRESS Solver:"
7624 if (osilreader != NULL)
7630 if (fileUtil != NULL)
7635 #endif //ifdef COIN_HAS_XPR
7638 #ifdef COIN_HAS_IPOPT
7641 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver with avion2.osil" << endl << endl;
7648 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7652 osilFileName = dataDir +
"osilFiles" + dirsep +
"avion2.osil";
7653 osolFileName = dataDir +
"osolFiles" + dirsep +
"avion2_ipopt.osol";
7656 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7657 ipoptSolver->
osol = osol;
7659 ipoptSolver->
osol = osol;
7660 cout <<
"call the IPOPT Solver" << endl;
7662 ipoptSolver->
solve();
7663 check = 9.46801e+07;
7669 cout << ipoptSolver->
osrl << endl;
7671 cout <<
"IPOPT solver solution for avion2 checks." << endl;
7674 { cout <<
"IPOPT solver solution for avion2 in error:" << endl;
7675 cout << ipoptSolver->
osrl << endl;
7677 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on avion2.osil");
7686 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem avion2.osil with Ipopt" << std::endl;
7687 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7692 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
7694 if (osilreader != NULL)
7697 if (osolreader != NULL)
7700 if (ipoptSolver != NULL)
7703 if (fileUtil != NULL)
7708 if(THOROUGH ==
true){
7711 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver with HS071_NLPMod.osil" << endl << endl;
7712 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7720 osilFileName = dataDir +
"osilFiles" + dirsep +
"HS071_NLPMod.osil";
7721 osolFileName = dataDir +
"osolFiles" + dirsep +
"HS071_NLPMod_ipopt.osol";
7724 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7728 ipoptSolver->
osol = osol;
7730 ipoptSolver->
solve();
7731 cout <<
"Here is the IPOPT solver solution for HS071_NLP" << endl;
7738 cout << ipoptSolver->
osrl << endl;
7740 cout <<
"IPOPT solver solution for HS071_NLP checks." << endl;
7743 { cout <<
"IPOPT solver solution for HS071_NLP in error:" << endl;
7744 cout << ipoptSolver->
osrl << endl;
7754 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on HS071_NLP.osil");
7755 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem HS071.osil with Ipopt" << std::endl;
7756 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7760 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
7762 if (osilreader != NULL)
7765 if (osolreader != NULL)
7768 if (ipoptSolver != NULL)
7771 if (fileUtil != NULL)
7779 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on rosenbrockmod.osil" << endl << endl;
7780 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7787 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockmod.osil";
7788 osolFileName = dataDir +
"osolFiles" + dirsep +
"rosenbrockmod_ipopt.osol";
7791 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7792 ipoptSolver->
osil = osil;
7794 cout <<
"call the IPOPT Solver" << endl;
7796 ipoptSolver->
solve();
7803 cout << ipoptSolver->
osrl << endl;
7805 cout <<
"Ipopt solver solution for rosenbrockmod checks." << endl;
7808 { cout <<
"Ipopt solver solution for rosenbrockmod in error:" << endl;
7809 cout << ipoptSolver->
osrl << endl;
7812 throw ErrorClass(
" Fail unit test with Ipopt on rosenbrockmod.osil");
7821 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockmod.osil with Ipopt" << std::endl;
7822 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7827 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
7829 if (osilreader != NULL)
7832 if (osolreader != NULL)
7835 if (ipoptSolver != NULL)
7838 if (fileUtil != NULL)
7846 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on parincQuadratic.osil" << endl << endl;
7847 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7854 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
7855 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincQuadratic_ipopt.osol";
7858 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7860 ipoptSolver->
osil = osil;
7861 ipoptSolver->
osol = osol;
7862 cout <<
"call the IPOPT Solver" << endl;
7864 ipoptSolver->
solve();
7871 cout << ipoptSolver->
osrl << endl;
7873 cout <<
"IPOPT solver solution for parincQuadratic checks." << endl;
7876 { cout <<
"IPOPT solver solution for parincQuadratic in error:" << endl;
7877 cout << ipoptSolver->
osrl << endl;
7879 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on parincQuadradic.osil");
7888 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with Ipopt" << std::endl;
7889 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7893 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
7895 if (osilreader != NULL)
7898 if (osolreader != NULL)
7901 if (ipoptSolver != NULL)
7904 if (fileUtil != NULL)
7912 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on parincLinear.osil" << endl << endl;
7913 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7920 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincLinear.osil";
7921 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincLinear_ipopt.osol";
7924 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7927 ipoptSolver->
osol =
"";
7928 cout <<
"call the IPOPT Solver" << endl;
7930 ipoptSolver->
solve();
7937 cout << ipoptSolver->
osrl << endl;
7939 cout <<
"IPOPT solver solution for parincLinear checks." << endl;
7942 { cout <<
"IPOPT solver solution for parincLinear in error:" << endl;
7943 cout << ipoptSolver->
osrl << endl;
7945 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on parincLinear.osil");
7954 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincLinear.osil with Ipopt" << std::endl;
7955 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
7959 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
7961 if (osilreader != NULL)
7964 if (osolreader != NULL)
7967 if (ipoptSolver != NULL)
7970 if (fileUtil != NULL)
7978 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on callBackTest.osil" << endl << endl;
7979 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
7986 osilFileName = dataDir +
"osilFiles" + dirsep +
"callBackTest.osil";
7987 osolFileName = dataDir +
"osolFiles" + dirsep +
"callBackTest_ipopt.osol";
7990 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
7993 ipoptSolver->
osol = osol;
7994 cout <<
"call the IPOPT Solver" << endl;
7996 ipoptSolver->
solve();
7997 check = 1.00045e+06;
8003 cout << ipoptSolver->
osrl << endl;
8005 cout <<
"IPOPT solver solution for callBackTest checks." << endl;
8008 { cout <<
"IPOPT solver solution for callBackTest in error:" << endl;
8009 cout << ipoptSolver->
osrl << endl;
8011 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on callBackTest.osil");
8020 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem callBackTest.osil with Ipopt" << std::endl;
8021 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8025 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
8027 if (osilreader != NULL)
8030 if (osolreader != NULL)
8033 if (ipoptSolver != NULL)
8036 if (fileUtil != NULL)
8044 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on callBackTestRowMajor.osil" << endl << endl;
8045 cout <<
"create a new IPOPT Solver for OSiL string solution" << endl;
8052 osilFileName = dataDir +
"osilFiles" + dirsep +
"callBackTestRowMajor.osil";
8053 osolFileName = dataDir +
"osolFiles" + dirsep +
"callBackTestRowMajor_ipopt.osol";
8056 cout <<
"IPOPT Solver created for OSiL string solution" << endl;
8059 ipoptSolver->
osil = osil;
8060 ipoptSolver->
osol = osol;
8061 cout <<
"call the IPOPT Solver" << endl;
8063 ipoptSolver->
solve();
8064 check = 1.00045e+06;
8070 cout << ipoptSolver->
osrl << endl;
8072 cout <<
"IPOPT solver solution for callBackTestRowMajor checks." << endl;
8075 { cout <<
"IPOPT solver solution for callBackTestRowMajor in error:" << endl;
8076 cout << ipoptSolver->
osrl << endl;
8078 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on callBackTestRowMajor.osil");
8087 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem callBackRowMajor.osil with Ipopt" << std::endl;
8088 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8092 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
8094 if (osilreader != NULL)
8098 if (osolreader != NULL)
8101 if (ipoptSolver != NULL)
8104 if (fileUtil != NULL)
8110 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on rosenbrockorig.osil" << endl << endl;
8118 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockorig.osil";
8124 ipoptSolver->
osil = osil;
8125 ipoptSolver->
osol = osol;
8128 cout <<
"call the COIN - Ipopt Solver for rosenbrockorig" << endl;
8129 cout << endl << endl << osil << endl << endl;
8135 std::cout <<
" CALL SOLVE " << std::endl;
8136 ipoptSolver->
solve();
8142 cout << ipoptSolver->
osrl << endl;
8144 cout <<
"Ipopt solver solution for rosenbrockorig checks." << endl;
8147 { cout <<
"Ipopt solver solution for rosenbrockorig in error:" << endl;
8148 cout << ipoptSolver->
osrl << endl;
8150 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on rosenbrockorig.osil");
8160 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockorig.osil with Ipopt" << std::endl;
8161 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8165 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
8167 if (osilreader != NULL)
8170 if (osolreader != NULL)
8173 if (ipoptSolver != NULL)
8176 if (fileUtil != NULL)
8182 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on HS071_feas.osil" << endl << endl;
8188 osilFileName = dataDir +
"osilFiles" + dirsep +
"HS071_feas.osil";
8194 ipoptSolver->
osil = osil;
8195 ipoptSolver->
osol = osol;
8200 cout <<
"call the COIN - Ipopt Solver for HS071_feas.osil" << endl;
8201 ipoptSolver->
solve();
8207 check = 3.162277659974328;
8209 check = 3.1622776613181367;
8211 check = 3.1622776594067235;
8213 check = 3.162277659974329;
8219 cout << ipoptSolver->
osrl << endl;
8221 cout <<
"Ipopt feasible point for HS071_feas checks." << endl;
8224 { cout <<
"Ipopt feasible point for HS071_feas in error:" << endl;
8225 cout << ipoptSolver->
osrl << endl;
8227 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on HS071_feas.osil");
8236 unitTestResult <<
"TEST " << nOfTest <<
": Correctly solved problem HS071_feas with Ipopt" << std::endl;
8237 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8241 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
8243 if (osilreader != NULL)
8246 if (osolreader != NULL)
8249 if (osrlreader != NULL)
8252 if (ipoptSolver != NULL)
8255 if (fileUtil != NULL)
8261 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on HS071_no-obj.osil" << endl << endl;
8268 osilFileName = dataDir +
"osilFiles" + dirsep +
"HS071_no-obj.osil";
8272 ipoptSolver->
osil = osil;
8273 ipoptSolver->
osol = osol;
8278 cout <<
"call the COIN - Ipopt Solver for HS071_no-obj.osil" << endl;
8279 ipoptSolver->
solve();
8284 "Ipopt NEEDS AN OBJECTIVE FUNCTION\n(For pure feasibility problems, use zero function.)");
8286 { cout <<
"Ipopt solver returns:" << endl;
8287 cout << ipoptSolver->
osrl << endl;
8288 throw ErrorClass(
" Fail unit test with Ipopt on HS071_no-obj.osil");
8292 cout <<
"Received error message from Ipopt: \"Ipopt NEEDS AN OBJECTIVE FUNCTION\"" << endl;
8299 unitTestResult <<
"TEST " << nOfTest <<
": Correctly diagnosed problem HS071_no-obj with Ipopt" << std::endl;
8300 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8304 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Ipopt Solver:"
8306 if (osilreader != NULL)
8309 if (osolreader != NULL)
8312 if (ipoptSolver != NULL)
8315 if (fileUtil != NULL)
8322 #endif // end #ifdef COIN_HAS_IPOPT
8325 #ifdef COIN_HAS_BONMIN
8327 cout << endl <<
"TEST " << ++nOfTest <<
": Bonmin solver on bonminEx1.osil" << endl << endl;
8335 osilFileName = dataDir +
"osilFiles" + dirsep +
"bonminEx1.osil";
8336 osolFileName = dataDir +
"osolFiles" + dirsep +
"bonminEx1_Bonmin.osol";
8341 solver->
osil = osil;
8343 cout <<
"call the COIN - Bonmin Solver for bonminEx1" << endl;
8346 check = -17.07106795327683;
8352 cout << solver->
osrl << endl;
8354 cout <<
"Bonmin solver solution for bonminEx1 checks." << endl;
8357 { cout <<
"Bonmin solver solution for bonminEx1 in error:" << endl;
8358 cout << solver->
osrl << endl;
8360 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Bonmin on bonminEx1.osil");
8369 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem bonminEx1.osil with Bonmin" << std::endl;
8370 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8374 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Bonmin Solver:"
8375 << endl << eclass.
errormsg << endl;
8379 if (osilreader != NULL)
8382 if (osolreader != NULL)
8385 if (fileUtil != NULL)
8390 if (THOROUGH ==
true){
8392 cout << endl <<
"TEST " << ++nOfTest <<
": Bonmin solver on wayneQuadratic.osil" << endl << endl;
8399 osilFileName = dataDir +
"osilFiles" + dirsep +
"wayneQuadratic.osil";
8400 osolFileName = dataDir +
"osolFiles" + dirsep +
"wayneQuadratic_Bonmin1.osol";
8403 solver->
osol = osol;
8405 cout <<
"call the Bonmin Solver for wayneQuadratic" << endl;
8415 cout << solver->
osrl << endl;
8417 cout <<
"Bonmin solver solution for wayneQuadratic checks." << endl;
8420 { cout <<
"Bonmin solver solution for wayneQuadratic in error:" << endl;
8421 cout << solver->
osrl << endl;
8423 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Bonmin on wayneQuadratic.osil");
8430 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem wayneQuadratic.osil with Bonmin" << std::endl;
8431 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8435 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Bonmin Solver:"
8436 << endl << eclass.
errormsg << endl;
8440 if (osilreader != NULL)
8443 if (fileUtil != NULL)
8449 cout << endl <<
"TEST " << ++nOfTest <<
": Bonmin solver on wayneQuadratic.osil" << endl << endl;
8457 osilFileName = dataDir +
"osilFiles" + dirsep +
"wayneQuadratic.osil";
8458 osolFileName = dataDir +
"osolFiles" + dirsep +
"wayneQuadratic_Bonmin2.osol";
8461 solver->
osol = osol;
8464 cout <<
"call the Bonmin Solver for wayneQuadratic" << endl;
8474 cout << solver->
osrl << endl;
8476 cout <<
"Bonmin solver solution for wayneQuadratic checks." << endl;
8479 { cout <<
"Bonmin solver solution for wayneQuadratic in error:" << endl;
8480 cout << solver->
osrl << endl;
8482 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Bonmin on wayneQuadratic.osil");
8491 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem wayneQuadratic.osil with Bonmin" << std::endl;
8492 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8496 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Bonmin Solver:"
8497 << endl << eclass.
errormsg << endl;
8501 if (osilreader != NULL)
8504 if (osolreader != NULL)
8507 if (fileUtil != NULL)
8513 cout << endl <<
"TEST " << ++nOfTest <<
": Bonmin solver on rosenbrockorig.osil" << endl << endl;
8520 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockorig.osil";
8524 cout <<
"build solver instance" << endl;
8526 cout <<
"call the Bonmin Solver for rosenbrockorig" << endl;
8529 cout <<
"Verify solution" <<endl;
8535 cout << solver->
osrl << endl;
8537 cout <<
"Bonmin solver solution for rosenbrockorig checks." << endl;
8540 { cout <<
"Bonmin solver solution for rosenbrockorig in error:" << endl;
8541 cout << solver->
osrl << endl;
8543 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Bonmin on rosenbrockorig.osil");
8550 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockorig.osil with Bonmin" << std::endl;
8551 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8555 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Bonmin Solver:"
8556 << endl << eclass.
errormsg << endl;
8560 if (osilreader != NULL)
8563 if (fileUtil != NULL)
8569 cout << endl <<
"TEST " << ++nOfTest <<
": Bonmin solver on rosenbrockorigInt.osil" << endl << endl;
8576 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockorigInt.osil";
8580 cout <<
"call the Bonmin Solver for rosenbrockinteger" << endl;
8588 cout << solver->
osrl << endl;
8590 cout <<
"Bonmin solver solution for rosenbrockorigInt checks." << endl;
8593 { cout <<
"Bonmin solver solution for rosenbrockorigInt in error:" << endl;
8594 cout << solver->
osrl << endl;
8596 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Bonmin on rosenbrockorigInt.osil");
8603 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockorigInt.osil with Bonmin" << std::endl;
8604 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8608 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Bonmin Solver:"
8609 << endl << eclass.
errormsg << endl;
8613 if (osilreader != NULL)
8616 if (fileUtil != NULL)
8621 #endif // end of #ifdef COIN_HAS_BONMIN
8624 #ifdef COIN_HAS_COUENNE
8627 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on bonminEx1.osil" << endl << endl;
8635 osilFileName = dataDir +
"osilFiles" + dirsep +
"bonminEx1.osil";
8636 osolFileName = dataDir +
"osolFiles" + dirsep +
"bonminEx1_Couenne.osol";
8640 solver->
osil = osil;
8641 solver->
osol = osol;
8642 cout <<
"call the COIN - Couenne Solver for bonminEx1" << endl;
8645 std::cout <<
" CALL SOLVE " << std::endl;
8648 check = -17.07106795327683;
8654 cout << solver->
osrl << endl;
8656 cout <<
"Couenne solver solution for bonminEx1 checks." << endl;
8659 { cout <<
"Couenne solver solution for bonminEx1 in error:" << endl;
8660 cout << solver->
osrl << endl;
8662 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Couenne on bonminEx1.osil");
8672 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem bonminEx1.osil with Couenne" << std::endl;
8673 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8677 cout <<
"OSrL = " << solver->
osrl << endl;
8678 cout << endl << endl << endl;
8679 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
8680 << endl << eclass.
errormsg << endl;
8684 if (osilreader != NULL)
8687 if (osolreader != NULL)
8690 if (fileUtil != NULL)
8695 if( THOROUGH ==
true){
8697 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on bonminEx1_Nonlinear.osil" << endl << endl;
8705 osilFileName = dataDir +
"osilFiles" + dirsep +
"bonminEx1_Nonlinear.osil";
8710 solver->
osil = osil;
8711 solver->
osol = osol;
8715 cout <<
"call the COIN - Couenne Solver for bonminEx1_Nonlinear" << endl;
8718 std::cout <<
" CALL SOLVE " << std::endl;
8727 cout << solver->
osrl << endl;
8729 cout <<
"Couenne solver solution for bonminEx1_Nonlinear checks." << endl;
8732 { cout <<
"Couenne solver solution for bonminEx1_Nonlinear in error:" << endl;
8733 cout << solver->
osrl << endl;
8735 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Couenne on bonminEx1_Nonlinear.osil");
8745 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem bonminEx1_Nonlinear with Couenne" << std::endl;
8746 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8750 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
8751 << endl << eclass.
errormsg << endl;
8755 if (osilreader != NULL)
8758 if (osolreader != NULL)
8761 if (fileUtil != NULL)
8767 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on nonconvex.osil" << endl << endl;
8775 osilFileName = dataDir +
"osilFiles" + dirsep +
"nonconvex.osil";
8780 solver->
osil = osil;
8781 solver->
osol = osol;
8784 cout <<
"call the COIN - Couenne Solver for nonconvex.osil" << endl;
8787 std::cout <<
"CALL SOLVE" << std::endl;
8796 cout << solver->
osrl << endl;
8798 cout <<
"Couenne solver solution for nonconvex.osil checks." << endl;
8802 cout <<
"Couenne solver solution for nonconvex.osil in error:" << endl;
8803 cout << solver->
osrl << endl;
8805 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Couenne on nonconvex.osil");
8815 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem nonconvex.osil with Couenne" << std::endl;
8816 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8820 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
8821 << endl << eclass.
errormsg << endl;
8825 if (osilreader != NULL)
8828 if (osolreader != NULL)
8831 if (fileUtil != NULL)
8837 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on rosenbrockorig.osil" << endl << endl;
8845 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockorig.osil";
8850 solver->
osil = osil;
8851 solver->
osol = osol;
8854 cout <<
"call the COIN - Couenne Solver for rosenbrockorig" << endl;
8857 std::cout <<
" CALL SOLVE " << std::endl;
8866 cout << solver->
osrl << endl;
8868 cout <<
"Couenne solver solution for rosenbrockorig checks." << endl;
8871 { cout <<
"Couenne solver solution for rosenbrockorig in error:" << endl;
8873 cout << solver->
osrl << endl;
8875 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Couenne on rosenbrockorig.osil");
8885 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockorig.osil with Couenne" << std::endl;
8886 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8890 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
8891 << endl << eclass.
errormsg << endl;
8895 if (osilreader != NULL)
8898 if (osolreader != NULL)
8901 if (fileUtil != NULL)
8907 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on wayneQuadratic.osil" << endl << endl;
8915 osilFileName = dataDir +
"osilFiles" + dirsep +
"wayneQuadratic.osil";
8922 solver->
osil = osil;
8923 solver->
osol = osol;
8926 cout <<
"call the COIN - Couenne Solver for wayneQuadraticr" << endl;
8928 std::cout <<
" CALL SOLVE " << std::endl;
8938 cout << solver->
osrl << endl;
8940 cout <<
"Couenne solver solution for wayneQuadratic checks." << endl;
8943 { cout <<
"Couenne solver solution for wayneQuadratic in error:" << endl;
8944 cout << solver->
osrl << endl;
8946 if(ok ==
false)
throw ErrorClass(
" Fail unit test with Couenne on wayneQuadratic.osil");
8956 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem wayneQuadratic.osil with Couenne (default settings)" << std::endl;
8957 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
8961 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
8962 << endl << eclass.
errormsg << endl;
8966 if (osilreader != NULL)
8969 if (osolreader != NULL)
8972 if (fileUtil != NULL)
8980 cout << endl <<
"TEST " << ++nOfTest <<
": Couenne solver on wayneQuadratic.osil" << endl << endl;
8988 osilFileName = dataDir +
"osilFiles" + dirsep +
"wayneQuadratic.osil";
8989 osolFileName = dataDir +
"osolFiles" + dirsep +
"wayneQuadratic_Couenne.osol";
8992 solver->
osil = osil;
8993 solver->
osol = osol;
8994 cout <<
"call the COIN - Couenne Solver for wayneQuadratic.osil" << endl;
8997 std::cout <<
" CALL SOLVE " << std::endl;
9000 cout <<
"Here is the Couenne solver solution for wayneQuadratic" << endl;
9007 string::size_type
pos;
9008 pos = solver->
osrl.find(
"LIMIT_EXCEEDED[COUENNE]");
9009 if(pos == std::string::npos)
9011 cout << solver->
osrl << endl << endl;
9012 throw ErrorClass(
" Error with wayneQuadratic.osil running on Couenne (incorrect diagnostics)");
9017 cout << solver->
osrl << endl << endl;
9028 unitTestResult <<
"TEST " << nOfTest <<
": Correctly diagnosed wayneQuadratic.osil with Couenne (limit exceeded)" << std::endl;
9029 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9033 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Couenne Solver:"
9034 << endl << eclass.
errormsg << endl;
9038 if (osilreader != NULL)
9041 if (osolreader != NULL)
9044 if (fileUtil != NULL)
9049 #endif // end of #ifdef COIN_HAS_COUENNE
9052 #ifdef COIN_HAS_CSDP
9054 cout << endl <<
"TEST " << ++nOfTest <<
": CSDP solver on SDPA_ex.osil" << endl << endl;
9061 osilFileName = dataDir +
"osilFiles" + dirsep +
"SDPA_ex.osil";
9065 cout <<
"create a new Csdp Solver for OSiL string solution" << endl;
9068 cout <<
"call the Csdp Solver" << endl;
9077 cout << solver->
osrl << endl;
9079 cout <<
"Csdp solver solution for SDPA_ex checks." << endl;
9082 { cout <<
"Csdp solver solution for SDPA_ex in error:" << endl;
9083 cout << solver->
osrl << endl;
9085 if(ok ==
false)
throw ErrorClass(
"Fail solving problem SDPA_ex.osil with Csdp");
9087 std::cout << std::endl <<
"now test matrix extensions to OSrL" << std::endl;
9093 std::cout << std::endl <<
"Read OSrL string" << std::endl;
9098 std::cout << std::endl <<
"Write OSrL string" << std::endl;
9099 std::string osrl2 = osrlwriter2->
writeOSrL( osresult2);
9103 std::cout << std::endl << std::endl <<
"Here is osrl2: " << std::endl << std::endl;
9104 std::cout << osrl2 << std::endl;
9107 ok &= osresult2->
IsEqual(osresult3);
9108 if (!ok)
throw ErrorClass(
"OSrL reader/writer loses information in matrix extensions");
9126 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem SDPA_ex.osil with Csdp" << std::endl;
9127 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9132 cout << endl << endl << endl;
9133 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Csdp Solver:"
9134 << endl << eclass.
errormsg << endl << endl;
9138 if (osilreader != NULL)
9141 if (fileUtil != NULL)
9148 #ifdef COIN_HAS_LINDO
9150 cout << endl <<
"TEST " << ++nOfTest <<
": Lindo solver on lindoapiaddins.osil" << endl << endl;
9157 osilFileName = dataDir +
"osilFiles" + dirsep +
"lindoapiaddins.osil";
9158 osolFileName = dataDir +
"osolFiles" + dirsep +
"lindoapiaddins_lindo.osol";
9161 cout <<
"create a new LINDO Solver for OSiL string solution" << endl;
9163 solver->
osol = osol;
9164 cout <<
"call the LINDO Solver" << endl;
9173 cout << solver->
osrl << endl;
9175 cout <<
"LINDO solver solution for lindoapiaddins checks." << endl;
9178 { cout <<
"LINDO solver solution for lindoapiaddins in error:" << endl;
9179 cout << solver->
osrl << endl;
9181 if(ok ==
false)
throw ErrorClass(
" Fail unit test with LINDO on lindoapiaddins.osil");
9189 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem lindoapiaddins.osil with Lindo" << std::endl;
9190 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9195 cout << endl << endl << endl;
9196 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the LINDO Solver:"
9197 << endl << eclass.
errormsg << endl << endl;
9201 if (osilreader != NULL)
9204 if (fileUtil != NULL)
9209 if (THOROUGH ==
true){
9212 cout << endl <<
"TEST " << ++nOfTest <<
": Lindo solver on rosenbrockmod.osil" << endl << endl;
9217 osilFileName = dataDir +
"osilFiles" + dirsep +
"rosenbrockmod.osil";
9218 osolFileName = dataDir +
"osolFiles" + dirsep +
"rosenbrockmod_lindo.osol";
9221 solver->
osil = osil;
9222 solver->
osol = osol;
9224 cout <<
"call the LINDO Solver" << endl;
9233 cout << solver->
osrl << endl;
9235 cout <<
"LINDO solver solution for rosenbrockmod checks." << endl;
9238 { cout <<
"LINDO solver solution for rosenbrockmod in error:" << endl;
9239 cout << solver->
osrl << endl;
9241 if(ok ==
false)
throw ErrorClass(
" Fail unit test with LINDO on rosenbrockmod.osil");
9247 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem rosenbrockmod.osil with Lindo" << std::endl;
9248 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9252 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the Lindo Solver:"
9253 << endl << eclass.
errormsg << endl;
9257 if (fileUtil != NULL)
9264 cout << endl <<
"TEST " << ++nOfTest <<
": Lindo solver on parincQuadratic.osil" << endl << endl;
9270 osilFileName = dataDir +
"osilFiles" + dirsep +
"parincQuadratic.osil";
9271 osolFileName = dataDir +
"osolFiles" + dirsep +
"parincQuadratic_lindo.osol";
9274 solver->
osil = osil;
9275 solver->
osol = osol;
9278 cout <<
"call the LINDO Solver" << endl;
9287 cout << solver->
osrl << endl;
9289 cout <<
"LINDO solver solution for parincQuadratic checks." << endl;
9292 { cout <<
"LINDO solver solution for parincQuadratic in error:" << endl;
9293 cout << solver->
osrl << endl;
9295 if(ok ==
false)
throw ErrorClass(
" Fail unit test with LINDO on parincQuadratic.osil");
9302 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.osil with Lindo" << std::endl;
9303 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9307 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the LINDO Solver:"
9308 << endl << eclass.
errormsg << endl;
9312 if (osolreader != NULL)
9315 if (fileUtil != NULL)
9375 #endif // end of #ifdef COIN_HAS_LINDO
9383 cout << endl <<
"TEST " << ++nOfTest <<
": Cbc solver using MPS file" << endl << endl;
9385 mpsFileName = dataDir +
"mpsFiles" + dirsep +
"parinc.mps";
9386 mps2osil =
new OSmps2OS( mpsFileName);
9392 cout <<
"create a COIN Solver for MPS - OSInstance solution" << endl;
9396 osol =
"<osol></osol>";
9397 solver->
osol = osol;
9398 cout <<
"call COIN Solve" << endl;
9407 cout << solver->
osrl << endl;
9409 cout <<
"COIN solver solution for parinc.mps checks." << endl;
9412 { cout <<
"COIN solver solution for parinc.mps in error:" << endl;
9413 cout << solver->
osrl << endl;
9415 if(ok ==
false)
throw ErrorClass(
" Fail unit test with COIN Solver on MPS test problem parincLinear.mps");
9422 unitTestResult <<
"TEST " << nOfTest <<
": Test the MPS -> OSiL converter on parinc.mps using Cbc" << std::endl;
9423 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9427 cout <<
"OSrL = " << solver->
osrl << endl;
9428 cout << endl << endl << endl;
9429 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the MPS converter:"
9430 << endl << eclass.
errormsg << endl;
9435 if (mps2osil != NULL)
9440 #ifdef COIN_HAS_IPOPT
9444 cout << endl <<
"TEST " << ++nOfTest <<
": Ipopt solver on parincQuadratic.mps" << endl << endl;
9446 mpsFileName = dataDir +
"mpsFiles" + dirsep +
"parincQuadratic.mps";
9447 mps2osil =
new OSmps2OS( mpsFileName);
9453 cout <<
"create an IPOPT Solver for MPS - OSInstance solution" << endl;
9458 osol =
"<osol></osol>";
9459 solver->
osol = osol;
9460 cout <<
"call the IPOPT Solver" << endl;
9470 cout << solver->
osrl << endl;
9472 cout <<
"IPOPT solver solution for parincQuadratic checks." << endl;
9476 cout <<
"IPOPT solver solution for parincQuadratic in error:" << endl;
9477 cout << solver->
osrl << endl;
9480 if (ok ==
false)
throw ErrorClass(
" Fail unit test with Ipopt on parincQuadratic.mps");
9485 unitTestResult <<
"TEST " << nOfTest <<
": Solved problem parincQuadratic.mps with Ipopt" << std::endl;
9486 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9490 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the quadratic MPS converter:"
9495 if (mps2osil != NULL)
9505 #ifdef COIN_HAS_GAMSUTILS
9508 std::cout <<
"Working with GAMSIO " << std::endl;
9511 std::string gmsControlFile = dataDir +
"gamsFiles" + dirsep +
"225a" + dirsep +
"gamscntr.dat";
9516 std::cout <<
"Done Working with GAMSIO " << std::endl;
9522 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the GAMS interface:"
9523 << endl << eclass.
errormsg << endl;
9525 if (gams2osil != NULL)
9535 cout << endl <<
"TEST " << ++nOfTest <<
": AMPL solver interface" << endl << endl;
9537 nlFileName = dataDir +
"amplFiles" + dirsep +
"parinc.nl";
9540 cw = ASL_alloc(ASL_read_fg);
9541 rw = ASL_alloc(ASL_read_fg);
9544 jac0dim((
char*)nlFileName.c_str(), (
fint)strlen(nlFileName.c_str()));
9548 nl2osil->
readNl(nlFileName) ;
9552 cout <<
"create a cbc Solver for AMPL nl - OSInstance solution" << endl;
9564 cout <<
"call Cbc Solve" << endl;
9573 cout << solver->
osrl << endl;
9575 cout <<
"COIN cbc solver solution for parinc.nl checks." << endl;
9579 cout <<
"COIN cbc solver solution for parinc.nl in error:" << endl;
9580 cout << solver->
osrl << endl;
9581 throw ErrorClass(
" Fail unit test with OSnl2osil on problem parinc.nl");
9589 unitTestResult <<
"TEST " << nOfTest <<
": Test the AMPL nl -> OSiL converter on parinc.nl using Cbc" << std::endl;
9590 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
9594 cout <<
"OSrL = " << solver->
osrl << endl;
9595 cout << endl << endl << endl;
9596 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing the AMPL interface:"
9597 << endl << eclass.
errormsg << endl;
9602 if (nl2osil != NULL)
9612 double *xval = NULL;
9613 double *zval = NULL;
9618 cout << endl <<
"TEST " << ++nOfTest <<
": AMPL suffix handler and solution writer" << endl << endl;
9620 nlFileName = dataDir +
"amplFiles" + dirsep +
"suffixTest.nl";
9623 cw = ASL_alloc(ASL_read_fg);
9624 rw = ASL_alloc(ASL_read_fg);
9627 jac0dim((
char*)nlFileName.c_str(), (
fint)strlen(nlFileName.c_str()));
9629 nl2osil =
new OSnl2OS(cw, rw, asl);
9631 nl2osil->
readNl(nlFileName);
9634 osolFileName = dataDir +
"osolFiles" + dirsep +
"suffixTest.osol";
9639 std::cout << std::endl <<
"Create OS objects" << std::endl << std::endl;
9645 std::cout <<
"transfer suffix information from osol to osrl" << std::endl;
9658 xval =
new double[nVars];
9659 for (
int i=0; i < nVars; i++)
9662 zval =
new double[nCons];
9663 for (
int i=0; i < nCons; i++)
9667 throw ErrorClass(
" Fail setting primal variables in AMPL suffix handler");
9669 throw ErrorClass(
" Fail setting dual variables in AMPL suffix handler");
9679 IBS =
new int[nvar];
9681 throw ErrorClass(
" Fail basis retrieval in AMPL suffix handler");
9683 throw ErrorClass(
" Fail basis transfer in AMPL suffix handler");
9684 delete[] IBS; IBS = NULL;
9696 IBS =
new int[ncon];
9698 throw ErrorClass(
" Fail basis retrieval in AMPL suffix handler");
9700 throw ErrorClass(
" Fail basis transfer in AMPL suffix handler");
9701 delete[] IBS; IBS = NULL;
9709 throw ErrorClass(
" Fail setting numberOfOtherVariableResults in AMPL suffix handler");
9710 for (
int i=0; i<nOther; i++)
9715 std::cout <<
"transfer variable suffix " << otherVar->
name << std::endl;
9719 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9721 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9723 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9725 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9727 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9729 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9731 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9733 throw ErrorClass(
" Fail setting OtherVariableResult in AMPL suffix handler");
9735 if (otherVar->
var != NULL)
9740 throw ErrorClass(
" Fail setting OtherVariableResult <var> array in AMPL suffix handler");
9742 throw ErrorClass(
" Fail setting OtherVariableResult <var> array in AMPL suffix handler");
9754 throw ErrorClass(
" Fail setting OtherVariableResult enumeration in AMPL suffix handler");
9761 std::cout <<
"add variable suffix morevarinteger" << std::endl;
9765 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9767 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9769 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9771 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9773 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9775 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9777 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9779 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9781 for (
int j=0;
j < nVars;
j++)
9784 static_cast<ostringstream*>( &(ostringstream() << (2*
j - 2)) )->str()))
9785 throw ErrorClass(
" Fail setting OtherVariableResult <var> array in AMPL suffix handler");
9787 throw ErrorClass(
" Fail setting OtherVariableResult <var> array in AMPL suffix handler");
9794 std::cout <<
"add variable suffix with enumeration" << std::endl;
9798 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9800 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9802 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9804 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9806 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9808 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9810 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9812 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9819 0,
"11",
"First value", enumArray, 2) )
9820 throw ErrorClass(
" Fail adding OtherVariableResult enumeration in AMPL suffix handler");
9825 1,
"12",
"Last value",
9827 throw ErrorClass(
" Fail adding OtherVariableResult enumeration in AMPL suffix handler");
9831 std::cout <<
"add variable suffix with value only" << std::endl;
9835 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9837 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9839 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9841 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9843 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9845 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9847 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9849 throw ErrorClass(
" Fail adding OtherVariableResult in AMPL suffix handler");
9855 throw ErrorClass(
" Fail setting numberOfOtherConstraintResults in AMPL suffix handler");
9856 for (
int i=0; i<nOther; i++)
9860 std::cout <<
"transfer constraint suffix " << otherCon->
name << std::endl;
9864 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9866 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9868 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9870 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9872 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9874 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9876 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9878 throw ErrorClass(
" Fail setting OtherConstraintResult in AMPL suffix handler");
9880 if (otherCon->
con != NULL)
9885 throw ErrorClass(
" Fail setting OtherConstraintResult <con> array in AMPL suffix handler");
9887 throw ErrorClass(
" Fail setting OtherConstraintResult <con> array in AMPL suffix handler");
9899 throw ErrorClass(
" Fail setting OtherConstraintResult enumeration in AMPL suffix handler");
9906 std::cout <<
"add variable suffix moreconinteger" << std::endl;
9910 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9912 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9914 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9916 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9918 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9920 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9922 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9924 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9926 for (
int j=0;
j < nCons;
j++)
9929 throw ErrorClass(
" Fail setting OtherConstraintResult <con> array in AMPL suffix handler");
9931 throw ErrorClass(
" Fail setting OtherConstraintResult <con> array in AMPL suffix handler");
9937 std::cout <<
"add constraint suffix with enumeration" << std::endl;
9941 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9943 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9945 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9947 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9949 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9951 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9953 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9955 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9960 0,
"21",
"First value", enumArray, 2) )
9961 throw ErrorClass(
" Fail adding OtherConstraintResult enumeration in AMPL suffix handler");
9966 1,
"22",
"Last value",
9968 throw ErrorClass(
" Fail adding OtherConstraintResult enumeration in AMPL suffix handler");
9972 std::cout <<
"add constraint suffix with value only" << std::endl;
9976 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9978 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9980 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9982 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9984 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9986 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9988 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9990 throw ErrorClass(
" Fail adding OtherConstraintResult in AMPL suffix handler");
9997 throw ErrorClass(
" Fail setting numberOfOtherVariableResults in AMPL suffix handler");
9998 for (
int i=0; i<nOther; i++)
10002 std::cout <<
"transfer objective suffix " << otherObj->
name << std::endl;
10006 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10008 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10010 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10012 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10014 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10016 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10018 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10020 throw ErrorClass(
" Fail setting OtherObjectiveResult in AMPL suffix handler");
10022 if (otherObj->
obj != NULL)
10027 throw ErrorClass(
" Fail setting OtherObjectiveResult <obj> array in AMPL suffix handler");
10029 throw ErrorClass(
" Fail setting OtherObjectiveResult <obj> array in AMPL suffix handler");
10041 throw ErrorClass(
" Fail setting OtherObjectiveResult enumeration in AMPL suffix handler");
10049 std::cout <<
"add variable suffix moreobjinteger" << std::endl;
10053 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10055 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10057 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10059 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10061 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10063 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10065 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10067 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10069 for (
int j=0;
j < nObjs;
j++)
10072 throw ErrorClass(
" Fail setting OtherObjectiveResult <obj> array in AMPL suffix handler");
10074 throw ErrorClass(
" Fail setting OtherObjectiveResult <obj> array in AMPL suffix handler");
10079 std::cout <<
"add objective suffix with enumeration" << std::endl;
10083 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10085 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10087 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10089 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10091 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10093 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10095 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10097 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10102 0,
"31",
"Only value",
10104 throw ErrorClass(
" Fail adding OtherObjectiveResult enumeration in AMPL suffix handler");
10108 std::cout <<
"add objective suffix with value only" << std::endl;
10112 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10114 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10116 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10118 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10120 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10122 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10124 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10126 throw ErrorClass(
" Fail adding OtherObjectiveResult in AMPL suffix handler");
10131 throw ErrorClass(
" Fail setting solution status in AMPL suffix handler");
10136 std::cout << std::endl <<
"convert OSResult to string" << std::endl << std::endl;
10140 std::string osrl = temp_writer->
writeOSrL( osresult);
10141 std::cout << osrl << std::endl;
10146 std::cout << std::endl <<
"write AMPL solution file" << std::endl << std::endl;
10148 writeOK = solWriter->
writeSolFile(osrl, nl2osil->
getASL(
"asl"), dataDir +
"amplFiles" + dirsep +
"suffixTest.sol");
10153 std::cout << std::endl <<
"compare results" << std::endl << std::endl;
10155 std::string osrl1FileName = dataDir +
"amplFiles" + dirsep +
"suffixTest.sol";
10156 std::string osrl2FileName = dataDir +
"amplFiles" + dirsep +
"suffixTest.cmp";
10159 std::string osrl1 = fileUtil->
getFileAsString( osrl1FileName.c_str());
10160 std::string osrl2 = fileUtil->
getFileAsString( osrl2FileName.c_str());
10162 if (osrl1 == osrl2)
10165 cout << osrl1 << endl;
10167 cout <<
"AMPL .sol file writer creates consistent output" << endl;
10171 cout <<
"AMPL .sol file writer creates incorrect output" << endl;
10172 cout << osrl1 << endl;
10173 throw ErrorClass(
" Fail unit test with AMPL .sol writer");
10193 delete temp_writer;
10194 temp_writer = NULL;
10196 unitTestResult <<
"TEST " << nOfTest <<
": Test the AMPL .sol writer" << std::endl;
10197 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
10201 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing AMPL .sol writer:"
10202 << endl << eclass.
errormsg << endl;
10205 if (nl2osil != NULL)
10209 if (fileUtil != NULL)
10212 if (solWriter != NULL)
10215 if (temp_writer != NULL)
10216 delete temp_writer;
10217 temp_writer = NULL;
10218 if (osresult != NULL)
10231 #endif // end of ifdef COIN_HAS_ASL
10237 cout << endl <<
"TEST " << ++nOfTest <<
": b64 operations" << endl << endl;
10239 mpsFileName = dataDir +
"mpsFiles" + dirsep +
"parinc.mps";
10240 mps2osil =
new OSmps2OS( mpsFileName);
10248 osol =
"<osol></osol>";
10249 solver->
osol = osol;
10255 cout << endl << endl;
10260 { cout <<
"COIN solution of an OSiL string in b64 format." << endl;
10262 cout << solver->
osrl << endl;
10267 cout <<
"COIN solution of a OSiL string in b64 format:" << endl;
10268 cout << solver->
osrl << endl;
10270 if(ok ==
false)
throw ErrorClass(
" Fail unit test with COIN Cbc Solver on b64 test problem parincLinear.mps");
10276 unitTestResult <<
"TEST " << nOfTest <<
": Test a problem written in b64 and then converted to OSInstance" << std::endl;
10277 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
10281 cout << endl << endl;
10282 cout << eclass.
errormsg << endl << endl;
10283 cout <<
"OSrL = " << solver->
osrl << endl;
10284 cout << endl << endl << endl;
10285 unitTestResultFailure <<
"Test " << nOfTest <<
": Unit Test Failed Testing Use of Base 64" << endl;
10287 if (solver != NULL)
10290 if (mps2osil != NULL)
10298 cout << endl <<
"TEST " << ++nOfTest <<
": postfix and prefix routines" << endl << endl;
10303 std::string expTreeTest = dataDir +
"osilFiles" + dirsep +
"rosenbrockmod.osil";
10306 osinstance = osilreader->
readOSiL( osil);
10308 if(expTree == NULL)
throw ErrorClass(
" Null expression tree when testing prefix and postfix routines");
10309 std::vector<ExprNode*> postfixVec;
10313 unsigned int n = postfixVec.size();
10315 nodeNames1 =
new std::string[
n];
10316 nodeNames2 =
new std::string[
n];
10317 for (i = 0 ; i <
n; i++){
10319 nodeNames1[i] = postfixVec[i]->getTokenName();
10326 std::vector<ExprNode*> prefixVec;
10336 if(postfixVec.size() !=
n)
throw ErrorClass(
" Problem with creating expression trees");
10338 for (i = 0 ; i <
n; i++){
10340 nodeNames2[i] = postfixVec[i]->getTokenName();
10341 if( nodeNames1[i] != nodeNames2[ i])
throw ErrorClass(
" Problem with creating expression trees");
10344 delete[] nodeNames1;
10346 delete[] nodeNames2;
10352 unitTestResult <<
"TEST " << nOfTest <<
": Successful test of prefix and postfix conversion routines" << std::endl;
10353 cout << endl <<
"TEST " << nOfTest <<
": Completed successfully" << endl << endl;
10357 cout << endl << endl << endl;
10358 unitTestResultFailure <<
"Test " << nOfTest <<
": prefix and postfix conversion"
10359 << endl << eclass.
errormsg << endl;
10360 if (osilreader != NULL)
10363 if (nodeNames1 != NULL)
10364 delete[] nodeNames1;
10366 if (nodeNames2 != NULL)
10367 delete[] nodeNames2;
10369 if (fileUtil != NULL)
10375 if(unitTestResultFailure.str().length() > 0){
10376 cout << endl <<
"THE UNIT TEST PASSED THE FOLLOWING:" << endl << endl;
10377 cout << unitTestResult.str() << endl << endl;
10378 cout <<
"UNFORTUNATELY, YOU FAILED ON THE FOLLOWING:" << endl << endl;
10379 cout << unitTestResultFailure.str() << endl << endl;
10380 cout <<
"Conclusion: FAILURE" << endl;
10384 cout << endl <<
"THE UNIT TEST PASSED THE FOLLOWING:" << endl << endl;
10385 cout << unitTestResult.str() << endl << endl;
10386 cout <<
"All tests completed successfully" << endl << endl;
10388 cout <<
"Make sure to #undef GUS_DEBUG before committing!!!" << endl << endl;
10396 std::string sObjVal;
10398 string::size_type pos2;
10399 string::size_type pos1 = osrl.find(
"<obj ");
10400 if(pos1 != std::string::npos){
10402 pos1 = osrl.find(
">", pos1 + 1);
10403 if(pos1 != std::string::npos){
10406 pos2 = osrl.find(
"</obj", pos1 + 1);
10407 if( pos2 != std::string::npos){
10409 sObjVal = osrl.substr( pos1 + 1, pos2 - pos1 - 1);
10412 return dObjVal =
os_strtod(sObjVal.c_str(), NULL);
10427 osresult = osrlreader->
readOSrL(osrl);
10432 nIter = atoi(temp.c_str());
10433 if (osrlreader != NULL)
delete osrlreader;
10439 if (osrlreader != NULL)
delete osrlreader;
10449 std::cout <<
"Print out array content" << std::endl;
10452 std::cout <<
"solution " << i << std::endl << std::endl;
10453 std::cout <<
"variables basic ";
10457 std::cout <<
"variables atLower ";
10461 std::cout <<
"variables atUpper ";
10465 std::cout <<
"variables atEquality ";
10469 std::cout <<
"variables isFree ";
10473 std::cout <<
"variables superbasic ";
10477 std::cout <<
"variables unknown ";
10482 std::cout << std::endl;
10485 std::cout <<
"objectives basic ";
10489 std::cout <<
"objectives atLower ";
10493 std::cout <<
"objectives atUpper ";
10497 std::cout <<
"objectives atEquality ";
10501 std::cout <<
"objectives isFree ";
10505 std::cout <<
"objectives superbasic ";
10509 std::cout <<
"objectives unknown ";
10514 std::cout << std::endl;
10516 std::cout <<
"constraints basic ";
10520 std::cout <<
"constraints atLower ";
10524 std::cout <<
"constraints atUpper ";
10528 std::cout <<
"constraints atEquality ";
10532 std::cout <<
"constraints isFree ";
10536 std::cout <<
"constraints superbasic ";
10540 std::cout <<
"constraints unknown ";
10545 std::cout << std::endl;
10550 std::cout <<
"other variable results --- enum " <<
k;
10555 std::cout << std::endl;
10558 std::cout << std::endl;
10562 std::cout <<
"other objective results --- enum " <<
k;
10567 std::cout << std::endl;
10570 std::cout << std::endl;
10574 std::cout <<
"other constraint results --- enum " <<
k;
10579 std::cout << std::endl;
int getNumberOfOutputFilesToMove()
Get the number of output files to move.
void tempPrintArrays(OSResult *os)
bool setUsedDiskSpaceUnit(std::string unit)
Set the unit in which used disk space is measured.
a data structure for holding quadratic terms
bool setAnotherSOSVariableBranchingWeight(int sosIdx, int nvar, double weight, int *idx, double *value, std::string *name)
double * getConstraintLowerBounds()
Get constraint lower bounds.
double * getVariableLowerBounds()
Get variable lower bounds.
double * getConstraintUpperBounds()
Get constraint upper bounds.
std::string value
value of the option
std::string getJobID()
Get the job ID.
int getObjectiveNumber()
Get objective number.
std::string getVarValueStringName(int solIdx, int varIdx)
int * getTimeDomainStageNumberOfConstraints()
Get the number of constraints contained in each time stage.
std::string getAvailableCPUSpeedUnit()
bool setAvailableMemoryUnit(std::string unit)
Set the unit in which available memory is measured.
std::string getOtherObjectiveResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
std::string getGeneralMessage()
Get the general message.
bool setOtherJobOptions(int numberOfOptions, OtherOption **other)
bool setAnotherFileToDelete(std::string path)
double getTimingInfoValue(int idx)
bool setOtherJobResultDescription(int idx, std::string description)
Set the job otherResult description.
Constraints * constraints
constraints is a pointer to a Constraints object
bool setQuadraticCoefficients(int number, int *rowIndexes, int *varOneIndexes, int *varTwoIndexes, double *coefficients, int begin, int end)
set quadratic coefficients into the QuadraticCoefficients->qTerm data structure
double os_strtod(const char *s00, char **se)
int getNumberOfOtherObjectiveResults(int solIdx)
the OtherConstraintOption class.
bool setInitBasisStatus(int object, int status, int *i, int ni)
int getNumberOfInitVarValues()
Get the number of initial variable values.
int getOtherConstraintResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an <other> result for some solution.
OtherOptionOrResultEnumeration ** enumeration
bool setNumberOfObjValues(int solIdx, int numberOfObj)
Set the number of objectives to be given a value.
std::string getDualValueName(int solIdx, int objIdx)
OtherObjectiveOption ** getAllOtherObjectiveOptions()
Get all <other> objective options.
OtherConstraintResult ** other
a pointer to an array of other pointer objects for constraint functions
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...
char * getVariableTypes()
Get variable initial values.
std::string getTimingInfoDescription(int idx)
bool setGeneralStatusDescription(std::string description)
Set the general status description.
double getDualValue(int solIdx, int conIdx)
int getOtherObjectiveResultObjIdx(int solIdx, int otherIdx, int objIdx)
the LindoSolver class solves problems using Lindo.
ScalarExpressionTree * getNonlinearExpressionTree(int rowIdx)
Get the expression tree for a given row index.
bool setDualValue(int solIdx, int number, int idx, std::string name, double val)
Set a dual value.
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 getMaxTime()
Get the maximum allowed time.
double getUsedDiskSpaceValue()
bool setJobEndTime(std::string endTime)
Set the time when the job finished.
int getNumberOfOtherGeneralResults()
Get the number of other results in the <general> element.
std::string getOtherServiceResultName(int idx)
bool setPrimalVariableValuesDense(int solIdx, double *x)
Set the [i]th optimization solution's primal variable values, where i equals the given solution index...
int getDualValueIdx(int solIdx, int conIdx)
int getOptionInt(std::string optionName)
Get any of the integer-valued options.
bool setAnOtherGeneralOption(std::string name, std::string value, std::string description)
Add another general option to the <other> option array.
a sparse matrix data structure for matrices that can hold nonconstant values
std::string getGeneralStatusType()
Get the general status type, which can be: success, error, warning.
bool setAnotherInitVarValue(int idx, double value)
double getObjValue(int solIdx, int objIdx)
std::string getGeneralSubstatusName(int i)
Get the i_th general substatus name.
int * getTimeDomainStageNumberOfVariables()
Get the number of variables contained in each time stage.
std::string getSolutionStatusType(int solIdx)
Get the [i]th optimization solution status type, where i equals the given solution index...
std::string getInstanceLocationType()
Get the location type.
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 setAvailableMemoryDescription(std::string description)
Set the description of available memory.
int getSolverOutputNumberOfItems(int otherIdx)
std::string value
value of the option
std::string getOtherGeneralResultValue(int idx)
int getNumberOfSOS()
Get the number of special ordered sets for which branching weights are provided.
int getNumberOfOtherConstraintOptions()
Get the number of other constraint options.
InitConValue ** getInitConValuesSparse()
Get the initial values associated with the constraints in sparse form.
int numberOfCon
number of <con> children
bool setOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfCon)
Set the number of <enumeration> children of another (non-standard/solver specific) constraint-related...
The CsdpSolver class solves problems using Csdp.
bool setInitObjBoundsSparse(int numberOfObj, InitObjBound **obj)
bool setAvailableMemoryValue(double value)
Set the amount of available memory.
std::string getInstanceName()
Get the instance name.
NonlinearExpressions * nonlinearExpressions
nonlinearExpressions is a pointer to a NonlinearExpressions object
std::string getOtherObjectiveResultValue(int solIdx, int otherIdx)
bool setSolverOptions(int numberOfSolverOptions, SolverOption **solverOption)
bool setTimeDomainStageObjectivesOrdered(int numberOfStages, int *numberOfObjectives, int *startIdx)
This sets the objectives associated with each time domain stage in temporal order.
pos
position where the operator should be printed when printing the expression
The CouenneSolver class solves problems using Ipopt.
std::string value
value of the option
int getVariableNumber()
Get number of variables.
int getOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx)
bool setJobSubmitTime(std::string submitTime)
Set the time when the job was submitted.
bool setAnotherJobDependency(std::string jobID)
std::string printModel()
Print the infix representation of the problem.
bool setAnotherSolverOption(std::string name, std::string value, std::string solver, std::string category, std::string type, std::string description)
int getNumberOfRequiredFiles()
Get the number of required files.
bool setOtherGeneralResultName(int idx, std::string name)
Set the general otherResult name.
bool setTimeDomainStageVariablesUnordered(int numberOfStages, int *numberOfVariables, int **varIndex)
This sets the variables associated with each time domain stage in srbitrary order.
std::string getUsedDiskSpaceDescription()
std::string osrl
osrl holds the solution or result of the model
bool setUsedCPUSpeedValue(double value)
Set the used CPU speed.
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].
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 setNumberOfSolutionSubstatuses(int solIdx, int num)
Set the [i]th optimization solution's number of substatus elements.
std::string getAvailableMemoryDescription()
bool setMinDiskSpace(std::string unit, std::string description, double value)
Set the minimum disk space required for the current job.
bool setServiceName(std::string serviceName)
Set service name.
std::string getOtherVariableResultDescription(int solIdx, int otherIdx)
int getOtherVariableResultVarIdx(int solIdx, int otherIdx, int varIdx)
bool setUsedDiskSpaceDescription(std::string description)
Set the description of used disk space.
bool setNumberOfSolverOutputs(int numberOfSolverOutputs)
Set the number of other solver outputs.
bool setVariableNumber(int variableNumber)
Set the variable number.
int getNumberOfInitConValues()
Get the number of initial constraint values.
bool setObjectives(int number, std::string *names, std::string *maxOrMins, double *constants, double *weights, SparseVector **objectitiveCoefficients)
set all the objectives related elements.
SparseHessianMatrix * calculateHessian(double *x, int idx, bool new_x)
Calculate the Hessian of a constraint or objective function.
std::string osil
osil holds the problem instance as a std::string
std::string errormsg
errormsg is the error that is causing the exception to be thrown
bool setMinMemorySize(std::string unit, std::string description, double value)
Set the minimum memory size required for the current job.
bool setSolutionSubstatusType(int solIdx, int substatusIdx, std::string type)
Set the solution substatus type.
bool setAnOtherVariableOption(OtherVariableOption *varOption)
SOSVariableBranchingWeights * sosVariableBranchingWeights
branching weights for SOS variables and groups
std::string getMinMemoryDescription()
get the memory description
bool setOtherServiceResultValue(int idx, std::string value)
Set the service otherResult value.
bool setUsedCPUSpeedUnit(std::string unit)
Set the unit in which used CPU speed is measured.
bool setSOSVariableBranchingWeights(int numberOfSOS, SOSWeights **sos)
virtual std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to the expression tree in postfix format...
std::string getAvailableDiskSpaceDescription()
int main(int argc, char *argv[])
OtherOptionOrResultEnumeration ** enumeration
int getNumberOfVarValues(int solIdx)
double getUsedMemoryValue()
int getNumberOfDualValues(int solIdx)
bool setNumberOfConstraints(int numberOfConstraints)
int getLinearConstraintCoefficientNumber()
Get number of specified (usually nonzero) linear constraint coefficient values.
bool setOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfObj)
Set the number of <enumeration> children of another (non-standard/solver specific) objective-related ...
bool setSolutionTargetObjectiveName(int solIdx, std::string objectiveName)
Set the [i]th optimization solution's objective name, where i equals the given solution index...
bool setUserName(std::string userName)
Set the username.
std::string getOtherObjectiveResultDescription(int solIdx, int otherIdx)
bool setUsedCPUSpeedDescription(std::string description)
Set the description of used CPU speed.
bool setOtherObjectiveResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
std::string getOtherSolutionResultDescription(int solIdx, int otherIdx)
bool setOtherSolutionResultDescription(int solIdx, int otherIdx, std::string description)
Set the description associated with the [j]th other solution result of solution [i].
bool setNumberOfTimes(int numberOfTimes)
Set the number of time measurements and initial the time array.
SparseVector ** getObjectiveCoefficients()
Get objective coefficients.
std::string getOtherSolutionResultName(int solIdx, int otherIdx)
bool setSolverOutputCategory(int otherIdx, std::string category)
Set the category associated with the [j]th solver output.
bool setInitVarValuesDense(int numberOfVar, double *value)
double getObjVal(std::string osrl)
int getNumberOfOtherConstraintResults(int solIdx)
OSResult * readOSrL(const std::string &posrl)
Get an OSResult object from an OSrL string.
bool setOtherConstraintResultNumberOfCon(int solIdx, int otherIdx, int numberOfCon)
Set the number of <con> children of another (non-standard/solver specific) constraint-related result...
bool setSolutionStatusDescription(int solIdx, std::string description)
Set the [i]th optimization solution status description.
bool setSolutionStatusType(int solIdx, std::string type)
Set the [i]th optimization solution status type.
OSInstance * osinstance
osinstance is a pointer to the OSInstance object that gets created from the instance represented in M...
bool readNl(std::string stub)
read the nl file
std::string getMinMemoryUnit()
Get the memory unit.
ExpandedMatrixBlocks * getBlocks(int *rowPartition, int rowPartitionSize, int *colPartition, int colPartitionSize, bool rowMajor, bool appendToBlockArray)
A method to extract a block from a larger matrix The result is a sparse matrix object, depending on the matrixType, of constant matrix elements, variable references, linear or nonlinear expressions, or objective and constraint references (possibly mixed).
std::string getOtherServiceResultDescription(int idx)
std::string getSolverToInvoke()
Get the solver name.
bool setJobStatus(std::string status)
Set the job status.
bool setCurrentState(std::string currentState)
Set the current state of the service.
std::string getFileLicence()
Get licence information associated with the file.
Constraint ** con
con is pointer to an array of Constraint object pointers
bool setNumberOfOtherSolutionResults(int solIdx, int numberOfOtherSolutionResults)
Set the [i]th optimization solution's other (non-standard/solver specific) solution-related results...
bool createOSObjects()
create an OSInstance and OSOption representation from the AMPL nl content (Some of the information in...
bool m_bWriteBase64
m_bWriteBase64 is set to true if we encode the linear constraint coefficients in base64 binary ...
bool setSolverInvoked(std::string solverInvoked)
Set solver invoked.
bool setInitVarValuesStringSparse(int numberOfVar, InitVarValueString **var)
bool setAnotherInputFileToMove(std::string fromPath, std::string toPath, bool makeCopy)
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...
int numberOfEnumerations
number of <enumeration> child elements
bool setOtherObjectiveResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
std::string getUsedMemoryUnit()
PathPair ** getInputDirectoriesToMove()
Get the array of input directories to move.
std::string getSolverOutputCategory(int otherIdx)
bool setAnOtherJobOption(std::string name, std::string value, std::string description)
std::string type
type of the option value (integer, double, boolean, string)
std::string getOtherJobResultDescription(int idx)
int getOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx)
bool IsEqual(OSInstance *that)
A function to check for the equality of two objects.
int getNumberOfJobDependencies()
Get the number of job dependencies.
Take an OSResult object and write a string that validates against OSrL.
int getOtherSolutionResultNumberOfItems(int solIdx, int otherIdx)
bool setRequiredDirectories(int numberOfPaths, std::string *paths)
Bonmin::BqpdSolver::fint fint
OptimizationResult * optimization
optimization holds the fifth child of the OSResult specified by the OSrL Schema.
int blockNumber
blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays)...
OSResult * osresult
osresult holds the solution or result of the model in-memory as an OSResult object ...
bool setAvailableCPUSpeedDescription(std::string description)
Set the description of available CPU speed.
std::string name
name of the option
std::string getTimeServiceStarted()
std::string getAvailableMemoryUnit()
ConstraintOption * constraints
the options for the constraints
bool setOtherJobResultName(int idx, std::string name)
Set the job otherResult name.
int getNumberOfRequiredDirectories()
Get the number of required directories.
bool setSolverToInvoke(std::string solverToInvoke)
Set the solver to be invoked.
bool setOutputFilesToMove(int numberOfPathPairs, PathPair **pathPair)
bool setGeneralSubstatusName(int idx, std::string name)
Set the general substatus name.
bool setSolutionTargetObjectiveIdx(int solIdx, int objectiveIdx)
Set the [i]th optimization solution's objective index, where i equals the given solution index...
std::string name
name of the option
Take an OSOption object and write a string that validates against the OSoL schema.
bool getSolutionWeightedObjectives(int solIdx)
Get the [i]th optimization solution form of the objective.
std::string * getRequiredFiles()
Get the array of required files.
bool setDualVariableValuesDense(int solIdx, double *y)
Set the [i]th optimization solution's dual variable values, where i equals the given solution index...
std::string getContactTransportType()
Get the transport type.
int getObjectiveNumber()
Get number of objectives.
bool setUsedMemoryValue(double value)
Set the amount of used memory.
bool setNumberOfDualValues(int solIdx, int numberOfCon)
Set the number of constraints to be given a value.
bool setServiceURI(std::string serviceURI)
Set service uri.
OtherOptionOrResultEnumeration ** enumeration
std::string getOtherVariableResultName(int solIdx, int otherIdx)
std::string getServiceURI()
Get the service URI.
int getOtherConstraintResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
std::string getServiceType()
Get the service type.
bool setObjectiveNumber(int objectiveNumber)
Set the objective number.
BasisStatus * basisStatus
a pointer to a BasisStatus object
bool setInstanceName(std::string instanceName)
Set instance name.
virtual void solve()
solve results in an instance being read into the Ipopt data structures and optimize ...
int numberOfVariables
numberOfVariables is the number of variables in the instance
std::string getFileDescription()
Get a description for the file or problem.
bool setAnOtherServiceOption(std::string name, std::string value, std::string description)
int getNumberOfDirectoriesToMake()
Get the number of directories to make.
std::string getMinDiskSpaceDescription()
get the disk space description
bool getInitialBasisElements(int type, int status, int *elem)
Get the initial basis elements for a particular variable type and basis status.
bool setSolutionMessage(int solIdx, std::string msg)
Set the [i]th optimization solution's message, where i equals the given solution index.
OSInstance * readOSiL(const std::string &osil)
parse the OSiL model instance.
The IpoptSolver class solves problems using Ipopt.
std::string * getVariableNames()
Get variable names.
bool setOtherSystemResultValue(int idx, std::string value)
Set the system otherResult value.
bool setAvailableCPUSpeedUnit(std::string unit)
Set the unit in which available CPU speed is measured.
bool setInputDirectoriesToMove(int numberOfPathPairs, PathPair **pathPair)
bool setAnOtherObjectiveOption(OtherObjectiveOption *objOption)
int getNumberOfOtherJobResults()
bool setOtherVariableResultVarType(int solIdx, int otherIdx, std::string varType)
Set the varType of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
int getNumberOfNonlinearExpressions()
Get number of nonlinear expressions.
std::string name
optional variable name
bool setNumberOfOtherGeneralResults(int num)
Set number of other general results.
OtherVariableOption ** getAllOtherVariableOptions()
Get all <other> variable options.
bool isBlockDiagonal()
a method to determine whether the collection is blockDiagonal
std::string * getRequiredDirectories()
Get the array of required directories.
std::string getMinCPUNumberDescription()
Get the CPU description.
bool setNumberOfVariables(int numberOfVariables)
std::string conType
type of the values in the con array
double getAvailableCPUSpeedValue()
bool setOtherSolutionResultNumberOfItems(int solIdx, int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th other solution result of solution [i]...
ObjectiveSolution * objectives
objectives holds the solution information for the objectives
double getAvailableMemoryValue()
bool setRequestedStartTime(std::string time)
std::string writeOSrL(OSResult *theosresult)
create an osrl string from an OSResult object
The in-memory representation of the <constraints> element.
InitDualVarValue ** getInitDualVarValuesSparse()
Get the initial bounds associated with the dual variables in sparse form.
std::string getOtherServiceResultValue(int idx)
int numberOfObjectives
numberOfObjectives is the number of objective functions in the instance
std::string getUsedMemoryDescription()
std::string getOtherConstraintResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an <other> result for some solution.
int getOtherObjectiveResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
bool setFilesToMake(int numberOfPaths, std::string *paths)
int getNumberOfOutputDirectoriesToMove()
Get the number of output directories to move.
void fint fint fint real fint real real real real * f
std::string name
name of the option
bool setSystemInformation(std::string systemInformation)
Set the system information.
std::string getGeneralStatusDescription()
Get the general status description.
bool setVarValueString(int solIdx, int number, int idx, std::string name, std::string str)
Set a string-valued primal variable value.
int getOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx)
bool setAnotherDirectoryToDelete(std::string path)
bool setNumberOfOtherConstraintResults(int solIdx, int numberOfOtherConstraintResults)
Set the [i]th optimization solution's other (non-standard/solver specific) constraint-related results...
bool setAnotherIntegerVariableBranchingWeight(int idx, double value)
std::string getOtherVariableResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
bool setOtherConstraintResultConIdx(int solIdx, int otherIdx, int conIdx, int idx)
Set the index of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
std::string getTimingInfoType(int idx)
bool setTimeDomainStages(int number, std::string *names)
This sets the number (and optionally names) of the time stages.
std::string getSystemInformation()
std::string getActualStartTime()
std::string getJobSubmitTime()
GeneralSparseMatrix * getMatrixCoefficientsInRowMajor()
int getNumberOfOtherSolutionResults(int solIdx)
double * getObjectiveWeights()
Get objective weights.
bool setNumberOfVarValues(int solIdx, int numberOfVar)
Set the number of primal variables to be given a value.
std::string getOtherSystemResultName(int idx)
std::string * getProcessesToKill()
Get the array of processes to kill.
std::string varType
type of the values in the var array
int * indexes
indexes holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix).
std::string osol
osol holds the options for the solver
bool setTimeDomainStageConstraintsUnordered(int numberOfStages, int *numberOfConstraints, int **conIndex)
This sets the constraints associated with each time domain stage in srbitrary order.
bool setGeneralSubstatusDescription(int idx, std::string description)
Set the general substatus description.
the OtherVarOption class.
bool setInstanceName(std::string name)
set the instance name.
virtual void solve()=0
solve is a virtual function – the actual solvers will implement their own solve method ...
bool setSolutionNumber(int number)
set the number of solutions.
double OSNaN()
returns the value for NaN used in OS
std::string getOtherSystemResultDescription(int idx)
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...
bool createOSInstance()
Creates an OSInstance from the GAMS smag instance representation.
int getNumberOfSolverOutputs()
bool setBasisStatus(int solIdx, int object, int status, int *i, int ni)
Set the basis status of a number of variables/constraints/objectives.
bool setOtherGeneralResultDescription(int idx, std::string description)
Set the general otherResult description.
bool setHeader(std::string name, std::string source, std::string description, std::string fileCreator, std::string licence)
A function to populate an instance of the option header element.
std::string getContact()
Get the contact information.
int getNumberOfOtherObjectiveOptions()
Get the number of other objective options.
int numberOfEnumerations
number of <enumeration> child elements
bool setScheduledStartTime(std::string scheduledStartTime)
Set the job's scheduled start time.
SparseJacobianMatrix * getJacobianSparsityPattern()
Used to hold part of the instance in memory.
int numberOfVar
number of child elements
std::string getServiceName()
Get service name.
std::string getOtherSolutionResultItem(int solIdx, int otherIdx, int itemIdx)
int getUsedCPUNumberValue()
double getTimeDomainIntervalStart()
Get the start for the time domain interval.
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...
std::string * getDirectoriesToMake()
Get the array of directories to make.
bool setMaxTime(double value, std::string unit)
bool setAvailableDiskSpaceUnit(std::string unit)
Set the unit in which available disk space is measured.
std::string getSolutionMessage(int solIdx)
Get the [i]th optimization solution message, where i equals the given solution index.
PathPair ** getOutputFilesToMove()
Get the array of output files to move.
std::string getMinCPUSpeedUnit()
Get the CPU speed unit.
bool setServiceName(std::string serviceName)
Set the service name.
int getNumberOfInitDualVarValues()
Get the number of initial dual variable values.
int getOtherObjectiveResultEnumerationEl(int solIdx, int otherIdx, int enumIdx, int j)
Get one index of an enum associated with an <other> result for some solution.
int numberOfEnumerations
the number of distinct values for this particular type of result
std::string * getJobDependencies()
Get the array of job dependencies.
bool setInstanceCreator(std::string fileCreator)
set the instance creator.
BasisStatus * initialBasisStatus
initial basis information
int getNumberOfObjValues(int solIdx)
the OptimizationOption class.
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 setOtherConstraintResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
VariableSolution * variables
variables holds the solution information for the variables
std::string getJobID()
Get the job id.
std::string * getFilesToMake()
Get the array of files to make.
BranchingWeight ** var
branching weights for individual variables
bool setNumberOfOtherSystemResults(int num)
Set number of other system results.
double getServiceUtilization()
std::string getVarValueName(int solIdx, int varIdx)
Used to read an OSiL string.
The in-memory representation of the <obj> element.
bool setNumberOfOtherVariableResults(int solIdx, int numberOfOtherVariableResults)
Set the [i]th optimization solution's other (non-standard/solver specific) variable-related results...
bool setOtherObjectiveOptions(int numberOfObj, OtherObjectiveOption **obj)
the VariableOption class.
bool setDirectoriesToDelete(int numberOfPaths, std::string *paths)
bool setObjValue(int solIdx, int number, int idx, std::string name, double val)
Set an objective value.
Nl ** nl
nl is pointer to an array of Nl object pointers
std::string enumType
type of the values in the enumeration array
std::string getScheduledStartTime()
int getNumberOfOtherSystemResults()
DoubleVector * value
a pointer to the array of nonzero values being stored
int numberOfSolutions
numberOfSolutions is the number of objective functions reported.
bool setOtherGeneralOptions(int numberOfOptions, OtherOption **other)
Set the other general options as an entire array.
bool setAvailableCPUNumberDescription(std::string description)
Set the description of available number of CPUs.
OSOption * osoption
osoption is a pointer to the OSOption object that gets created from the information in the nl file (a...
bool writeSolFile(std::string osrl, ASL *asl, std::string filename)
Convert the solution to AMPL .sol format.
The in-memory representation of the <objectives> element.
std::string getOtherObjectiveResultName(int solIdx, int otherIdx)
bool setAnotherInitDualVarValue(int idx, double lbValue, double ubValue)
int getNumberOfOtherGeneralOptions()
Get the number of <other> options in the <general> element.
bool setAnotherInitConValue(int idx, double value)
a sparse matrix data structure
double getMinDiskSpace()
Get the minimum required disk space.
int getNumberOfGeneralSubstatuses()
Get the number of substatuses.
OtherOption ** getOtherServiceOptions()
Get the array of other options associated with the <service> element.
bool setAnotherRequiredFile(std::string path)
bool setJobDependencies(int numberOfDependencies, std::string *jobDependencies)
bool setAnotherOutputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy)
std::string getSolutionSubstatusDescription(int solIdx, int substatusIdx)
double value
branching weight
double getAvailableDiskSpaceValue()
Variable ** var
Here we define a pointer to an array of var pointers.
int getBasisStatusNumberOfEl(int solIdx, int object, int status)
Get the number of indices that belong to a particular basis status.
std::string getAvailableCPUNumberDescription()
std::string getAvailableDiskSpaceUnit()
the OtherObjectiveOption class.
std::string getAvailableCPUSpeedDescription()
bool setServiceURI(std::string serviceURI)
Set the serviceURI.
std::string getObjValueName(int solIdx, int objIdx)
SolverOption ** getAllSolverOptions()
Get all solver options.
OSnLNode * createExpressionTreeFromPostfix(std::vector< ExprNode * > nlNodeVec)
Take a vector of ExprNodes (OSnLNodes and OSnLMNodes) in postfix format and create a scalar-valued OS...
int * varOneIndexes
varOneIndexes holds an integer array of the first variable indexes of all the quadratic terms...
std::string getVarValueString(int solIdx, int varIdx)
bool setUsedMemoryUnit(std::string unit)
Set the unit in which used memory is measured.
SparseMatrix * getLinearConstraintCoefficientsInRowMajor()
Get linear constraint coefficients in row major.
bool setOtherVariableResultNumberOfEnumerations(int solIdx, int otherIdx, int numberOfEnumerations)
Set the number of <enumeration> children of another (non-standard/solver specific) variable-related r...
bool setUsedMemoryDescription(std::string description)
Set the description of used memory.
std::string getOtherConstraintResultName(int solIdx, int otherIdx)
std::string writeOSoL(OSOption *theosoption)
create an osol string from an OSOption object
std::string description
description of the option
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...
GeneralSparseMatrix * getMatrixCoefficientsInColumnMajor()
SparseVector * calculateConstraintFunctionGradient(double *x, double *objLambda, double *conLambda, int idx, bool new_x, int highestOrder)
Calculate the gradient of the constraint function indexed by idx.
int idx
index of the variable
SparseHessianMatrix * getLagrangianHessianSparsityPattern()
bool setInitObjValuesSparse(int numberOfObj, InitObjValue **obj)
bool setAnotherInitBasisStatus(int type, int idx, int status)
Set the basis status for another variable, objective or constraint/slack.
the ConstraintOption class.
OSOption * osoption
osoption holds the solver options in-memory as an OSOption object
bool setNonlinearExpressions(int nexpr, Nl **root)
set nonlinear expressions
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...
The Default Solver Class.
bool setTimeDomainStageObjectivesUnordered(int numberOfStages, int *numberOfObjectives, int **varIndex)
This sets the objectives associated with each time domain stage in arbitrary order.
bool setInstanceLocationType(std::string locationType)
Set the instance location type.
int numberOfValues
numberOfValues is the number of nonzero elements stored in the <linearConstraintCoefficients> element...
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 setOtherConstraintResultConType(int solIdx, int otherIdx, std::string conType)
Set the conType of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
int getVarValueStringIdx(int solIdx, int varIdx)
std::string getServiceName()
Get the service name.
bool setTimeDomain(std::string format)
This sets the format of the time domain ("stages"/"interval"/"none")
std::string * getObjectiveMaxOrMins()
Get objective maxOrMins.
bool setTimeDomainStageConstraintsOrdered(int numberOfStages, int *numberOfConstraints, int *startIdx)
This sets the constraints associated with each time domain stage in temporal order.
PathPair ** getInputFilesToMove()
Get the array of input files to move.
a sparse vector data structure
double * hessValues
hessValues is a double array of the Hessian values.
Variables * variables
variables is a pointer to a Variables object
bool setOtherJobResultValue(int idx, std::string value)
Set the job otherResult value.
PathPair ** getOutputDirectoriesToMove()
Get the array of output directories to move.
bool setInputFilesToMove(int numberOfPathPairs, PathPair **pathPair)
bool setNumberOfObjectives(int numberOfObjectives)
std::string enumType
type of the values in the enumeration array
OtherOption ** getOtherSystemOptions()
Get the array of other options associated with the <system> element.
double getVarValue(int solIdx, int varIdx)
int getSolutionNumber()
get the number of solutions.
int getNumberOfInitObjBounds()
Get the number of initial objective bounds.
SparseMatrix * getLinearConstraintCoefficientsInColumnMajor()
Get linear constraint coefficients in column major.
bool setOtherSystemResultDescription(int idx, std::string description)
Set the system otherResult description.
int getTimeDomainStageNumber()
Get the number of stages that make up the time domain.
OSOption * readOSoL(const std::string &osol)
parse the OSoL solver options.
bool setAnotherInitVarValueString(int idx, std::string value)
int getSolutionTargetObjectiveIdx(int solIdx)
bool setGeneralMessage(std::string message)
Set the general message.
std::string getOtherGeneralResultDescription(int idx)
std::string getInstanceName()
Get instance name.
bool setVariables(int number, std::string *names, double *lowerBounds, double *upperBounds, char *types)
set all the variable related elements.
bool setOtherVariableOptions(int numberOfVar, OtherVariableOption **var)
bool m_bWhiteSpace
m_bWhiteSpace is set to true if we write white space in the file
std::string value
value of the option
std::string getTimeStamp()
Get the time stamp.
double * values
values holds a double array of value elements in coefMatrix (AMatrix), which contains nonzero element...
double * getConstraintConstants()
Get constraint constants.
OSInstance * osinstance
osinstance holds the problem instance in-memory as an OSInstance object
OtherOption ** getOtherJobOptions()
Get the array of other options associated with the <job> element.
bool setOtherServiceResultName(int idx, std::string name)
Set the service otherResult name.
double * getObjectiveConstants()
Get objective constants.
int numberOfConstraints
numberOfConstraints is the number of constraints in the instance
OtherOptionOrResultEnumeration ** enumeration
OtherObjectiveOption * getOtherObjectiveOption(int optionNumber)
Get one particular <other> objective option from the array of options.
bool setGeneralStatusType(std::string type)
Set the general status type, which can be: success, error, warning.
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
std::string getMaxTimeUnit()
Get the time unit.
bool setUsedCPUNumberValue(int value)
Set the used number of CPUs.
bool createOSObjects()
create an OSInstance from the MPS instance representation and an OSOption in case of nonstandard sect...
std::string getInstanceName()
Get instance name.
bool setAnOtherSystemOption(std::string name, std::string value, std::string description)
BranchingWeight ** getIntegerVariableBranchingWeightsSparse()
Get the integer branching weights in sparse form.
bool setUsedCPUNumberDescription(std::string description)
Set the description of used number of CPUs.
int getNumberOfInputFilesToMove()
Get the number of input files to move.
InstanceData * instanceData
A pointer to an InstanceData object.
bool deepCopyFrom(OSOption *that)
A function to make a deep copy of an OSOption object.
std::string getOtherObjectiveResultObj(int solIdx, int otherIdx, int objIdx)
bool setAnotherFileToMake(std::string path)
bool setIntegerVariableBranchingWeightsSparse(int numberOfVar, BranchingWeight **var)
#define OS_NEAR_EQUAL
we use OS_NEAR_EQUAL in unitTest to see if we are close to the optimal obj value
bool IsEqual(OSOption *that)
A function to check for the equality of two objects.
OptimizationSolution ** solution
solution is an array of pointers to OptimizationSolution objects
int getObjValueIdx(int solIdx, int objIdx)
bool setSolverOutputDescription(int otherIdx, std::string description)
Set the description associated with the [j]th solver output.
std::string getFileCreator()
Get the name of the person who created the file.
The in-memory representation of the <nl> element.
std::string description
description of the option
std::string getUserName()
Get the user name.
VariableOption * variables
the options for the variables
int ** getTimeDomainStageConList()
Get the list of constraints in each stage.
bool setOtherSolutionResultName(int solIdx, int otherIdx, std::string name)
Set the name associated with the [j]th other solution result of solution [i].
OtherVarOption ** var
array of option values
std::string getTimingInfoCategory(int idx)
ConstraintSolution * constraints
constraints holds the solution information for the constraints
bool setOtherObjectiveResultNumberOfObj(int solIdx, int otherIdx, int numberOfObj)
Set the number of <obj> children of another (non-standard/solver specific) objective-related result...
bool setNumberOfOtherJobResults(int num)
Set number of other job results.
std::string value
value of the option
int getOtherVariableResultNumberOfVar(int solIdx, int otherIdx)
SOSWeights ** getSOSVariableBranchingWeightsSparse()
Get the SOS branching weights in sparse form.
bool setServiceType(std::string serviceType)
set() options in the <service> element
std::string * getObjectiveNames()
Get objective names.
int getNumberOfOtherServiceResults()
OtherOption ** getOtherGeneralOptions()
Get the array of other options associated with the <general> element.
std::string getJobEndTime()
int getConstraintNumber()
Get number of constraints.
Objective ** obj
coef is pointer to an array of ObjCoef object pointers
bool getLinearConstraintCoefficientMajor()
Get whether the constraint coefficients is in column major (true) or row major (false).
bool setConstraintNumber(int constraintNumber)
Set the constraint number.
std::string sSolverName
sSolverName is the name of the Coin solver used, e.g.
GeneralSparseMatrix ** blocks
blocks holds the blocks that make up the matrix.
std::string osol
osol is a string containing the content of the OS option file (it may be empty if no option file was ...
std::string getOtherSolutionResultValue(int solIdx, int otherIdx)
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...
double getTimeDomainIntervalHorizon()
Get the horizon for the time domain interval.
bool setOtherVariableResultDescription(int solIdx, int otherIdx, std::string description)
Set the description of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
OtherConOption ** con
array of option values
bool setAnotherProcessToKill(std::string process)
bool setInstanceSource(std::string source)
set the instance source.
Matrices * matrices
matrices is a pointer to a Matrices object
int getNumberOfInitVarValuesString()
Get the number of initial variable strings.
SOSWeights ** sos
branching weights for the SOS
bool setAvailableDiskSpaceDescription(std::string description)
Set the description of available disk space.
std::string * getTimeDomainStageNames()
Get the names of the stages (NULL or empty string ("") if a stage has not been given a name...
bool setInstanceDescription(std::string description)
set the instance description.
std::string getSolverOutputName(int otherIdx)
std::string getJobStatus()
bool setOtherServiceOptions(int numberOfOptions, OtherOption **other)
int getNumberOfProcessesToKill()
Get the number of processes to kill.
virtual void setSolverOptions()=0
setSolverOptions is a virtual function – the actual solvers will implement their own setSolverOptions...
int getNumberOfSolverOptions()
Get the number of solver options.
std::string writeOSiL(const OSInstance *theosinstance)
create an osil string from an OSInstance object
the InitDualVarValue class.
std::string getSolutionStatusDescription(int solIdx)
Get the [i]th optimization solution status description, where i equals the given solution index...
BasisStatus * basisStatus
a pointer to a BasisStatus object
std::string getTimingInfoUnit(int idx)
bool setSolverOutputNumberOfItems(int otherIdx, int numberOfItems)
Set the number of items associated with the [j]th solver output.
int getNumberOfFilesToDelete()
Get the number of files to delete.
std::string value
value of the option
int getNumberOfQuadraticTerms()
Get the number of specified (usually nonzero) qTerms in the quadratic coefficients.
int getMinCPUNumber()
Get the minimum required number of CPUs.
OtherVariableResult ** other
a pointer to an array of other pointer objects for variables
bool setMinCPUSpeed(std::string unit, std::string description, double value)
Set the minimum CPU speed required for the current job.
Used to read an OSoL string.
bool setActualStartTime(std::string actualStartTime)
Set the job's actual start time.
std::string returnBasisStatusString(ENUM_BASIS_STATUS status)
std::string getSolverInvoked()
Get the solver invoked.
int getNumberOfOtherSystemOptions()
Get the number of <other> options in the <system> element.
std::string type
type of the option value (integer, double, boolean, string)
Objectives * objectives
objectives is a pointer to a Objectives object
std::string getOtherVariableResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description 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 setOtherSolutionResultCategory(int solIdx, int otherIdx, std::string category)
Set the category associated with the [j]th other solution result of solution [i]. ...
int getOtherConstraintResultNumberOfCon(int solIdx, int otherIdx)
std::string getSolverOutputDescription(int otherIdx)
ASL * getASL(std::string name)
return a pointer to an ASL object
bool setJobID(std::string jobID)
Set job id.
std::string objType
type of the values in the obj array
std::vector< ExprNode * > getNonlinearExpressionTreeInPrefix(int rowIdx)
Get the prefix tokens for a given row index.
std::string getInstanceSource()
Get instance source.
Implements a solve method for the Coin solvers.
bool setOtherSystemResultName(int idx, std::string name)
Set the system otherResult name.
std::string getFileAsString(const char *fname)
read a file and return contents as a string.
InitVarValue ** getInitVarValuesSparse()
Get the initial values associated with the variables in sparse form.
std::string ubValue
lower bound on the value
int getNumberOfSolutionSubstatuses(int solIdx)
std::string getOtherSolutionResultCategory(int solIdx, int otherIdx)
int ** getTimeDomainStageObjList()
Get the list of objectives in each stage.
int * rowIndexes
rowIndexes holds an integer array of row indexes of all the quadratic terms.
bool setCurrentJobCount(int jobCount)
Set the current job count.
bool setOtherConstraintResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
int getNumberOfOtherJobOptions()
Get the number of <other> options in the <job> element.
int * starts
starts holds an integer array of start elements in coefMatrix (AMatrix), which points to the start of...
double * values
values holds a double array of nonzero values.
bool setAnotherInputDirectoryToMove(std::string fromPath, std::string toPath, bool makeCopy)
QuadraticTerms * getQuadraticTerms()
Get all the quadratic terms in the instance.
std::string getOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx)
OtherOptionOrResultEnumeration ** enumeration
int numberOfEnumerations
the number of distinct values for this particular type of result
bool setNumberOfOtherServiceResults(int num)
Set number of other service results.
bool IsEqual(OSResult *that)
A function to check for the equality of two objects.
std::string getSolutionTargetObjectiveName(int solIdx)
bool setSolutionSubstatusDescription(int solIdx, int substatusIdx, std::string description)
Set the solution substatus description.
int numberOfObj
number of <obj> children
std::string getRequestedStartTime()
Get the requested starting time.
int getNumberOfVarValuesString(int solIdx)
double * getVariableUpperBounds()
Get variable upper bounds.
bool setNumberOfVarValuesString(int solIdx, int numberOfVar)
Set the number of string-valued primal variables to be given a value.
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 ** getTimeDomainStageVarList()
Get the list of variables in each stage.
std::string type
type of the option value (integer, double, boolean, string)
bool setUsedDiskSpaceValue(double value)
Set the amount of used disk space.
bool setOtherServiceResultDescription(int idx, std::string description)
Set the service otherResult description.
bool setJobID(std::string jobID)
Set the job ID.
OtherObjectiveResult ** other
a pointer to an array of other pointer objects for objective functions
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.
InitVarValueString ** getInitVarValuesStringSparse()
Get the initial value strings associated with the variables in sparse form.
OptimizationOption * optimization
optimizationOption holds the fifth child of the OSOption specified by the OSoL Schema.
bool copyLinearConstraintCoefficients(int numberOfValues, bool isColumnMajor, double *values, int valuesBegin, int valuesEnd, int *indexes, int indexesBegin, int indexesEnd, int *starts, int startsBegin, int startsEnd)
copy linear constraint coefficients: perform a deep copy of the sparse matrix
int numberOfEnumerations
number of <enumeration> child elements
bool setOtherGeneralResultValue(int idx, std::string value)
Set the general otherResult value.
std::string getOtherSystemResultValue(int idx)
int getNumberOfOtherVariableResults(int solIdx)
Get numberOfOtherVariableResult.
int valueSize
valueSize is the dimension of the index and value arrays
bool setProcessesToKill(int numberOfProcesses, std::string *processes)
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...
The BonminSolver class solves problems using Ipopt.
the OtherVariableOption class.
std::string getUsedCPUSpeedDescription()
int getOtherConstraintResultNumberOfEnumerations(int solIdx, int otherIdx)
std::string lbValue
lower bound on the value
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...
bool setDirectoriesToMake(int numberOfPaths, std::string *paths)
std::string description
description of the option
bool setInitVarValuesSparse(int numberOfVar, InitVarValue **var)
bool setAnotherDirectoryToMake(std::string path)
bool setSolverOutputName(int otherIdx, std::string name)
Set the name associated with the [j]th solver output.
a sparse matrix data structure for matrices that can hold nonconstant values and have block structure...
bool setInitConValuesSparse(int numberOfCon, InitConValue **con)
std::string getUsedCPUNumberDescription()
int getNumberOfOtherVariableOptions()
Get the number of other variable options.
bool setMinCPUNumber(int number, std::string description)
Set the minimum number of CPU cores required for the current job.
virtual void buildSolverInstance()=0
buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverIn...
bool setOtherConstraintOptions(int numberOfOptions, OtherConstraintOption **other)
bool setInstanceLocation(std::string instanceLocation)
Set the instance location.
std::string getServiceURI()
Get service uri.
OtherOptionOrResultEnumeration ** enumeration
double getMinCPUSpeed()
Get the minimum required CPU speed.
std::string getInstanceCreator()
Get instance fileCreator.
int getOtherObjectiveResultNumberOfEnumerations(int solIdx, int otherIdx)
bool setContactTransportType(std::string transportType)
Set the transport type for contact.
std::string * getFilesToDelete()
Get the array of files to delete.
std::string getInstanceLicence()
Get instance licence.
bool setSolutionWeightedObjectives(int solIdx, bool weightedObjectives)
Record whether the [i]th optimization solution uses weighted objectives, where i equals the given sol...
bool setAnOtherConstraintOption(OtherConstraintOption *optionValue)
std::string getSolverOutputItem(int otherIdx, int itemIdx)
int getNumberOfInputDirectoriesToMove()
Get the number of input directories to move.
bool setOtherVariableResultEnumType(int solIdx, int otherIdx, std::string enumType)
Set the enumType of another (non-standard/solver specific) variable-related result, for the [i]th solution, where i equals the given solution index.
The in-memory representation of an OSiL instance..
double getMinMemorySize()
Get the minimum required memory.
std::string getCurrentState()
the InitVarValueString class.
bool setSolverOutputItem(int otherIdx, int itemIdx, std::string item)
Set one item associated with the [j]th solver output.
The in-memory representation of the variables element.
BasisStatus * initialBasisStatus
initial basis status for the slack variables
BasisStatus * basisStatus
a pointer to a BasisStatus object
The OSnLNode Class for nonlinear expressions.
bool setTotalJobsSoFar(int number)
Set the total number of jobs so far.
bool setOtherConstraintResultCon(int solIdx, int otherIdx, int conIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
std::string getMinCPUSpeedDescription()
Get the CPU speed description.
QuadraticCoefficients * quadraticCoefficients
quadraticCoefficients is a pointer to a QuadraticCoefficients object
int getNumberOfIntegerVariableBranchingWeights()
Get the number of variables for which integer branching weights are provided.
class used to make it easy to read and write files.
bool isDiagonal()
a method to determine whether the matrix is diagonal
std::string getOtherVariableResultValue(int solIdx, int otherIdx)
bool setAnotherOutputFileToMove(std::string fromPath, std::string toPath, bool makeCopy)
virtual void solve()
The implementation of the corresponding virtual function.
double * coefficients
coefficients holds a double array all the quadratic term coefficients.
OSMatrix ** matrix
matrix is a pointer to an array of OSMatrix object pointers
std::string getOtherGeneralResultName(int idx)
Get the name of the i-th other result in the <general> element.
bool setConstraints(int number, std::string *names, double *lowerBounds, double *upperBounds, double *constants)
set all the constraint related elements.
bool setTimeDomainInterval(double start, double horizon)
This sets the start and end of the time interval.
bool setRequiredFiles(int numberOfPaths, std::string *paths)
bool setNumberOfGeneralSubstatuses(int num)
Set the number of substatus elements.
OtherObjOption ** obj
array of option values
int * varTwoIndexes
varTwoIndexes holds an integer array of the second variable indexes of all the quadratic terms...
int * getTimeDomainStageNumberOfObjectives()
Get the number of objectives contained in each time stage.
bool setOtherConstraintResultValue(int solIdx, int otherIdx, std::string value)
Set the value of another (non-standard/solver specific) constraint-related result, for the [i]th solution, where i equals the given solution index.
int getNumberOfInitObjValues()
Get the number of initial objective values.
std::string * getDirectoriesToDelete()
Get the array of directories to delete.
int getAvailableCPUNumberValue()
The in-memory representation of a SparseHessianMatrix..
OSInstance * osinstance
osinstance is a pointer to the OSInstance object that gets created from the information in the nl fil...
int getNumberOfFilesToMake()
Get the number of files to make.
std::string * getConstraintNames()
Get constraint names.
Creating a OSInstance from a GAMS model given as GAMS Modeling Object (GMO).
OSnLNode * createExpressionTreeFromPrefix(std::vector< ExprNode * > nlNodeVec)
Take a vector of ExprNodes (OSnLNodes and OSnLMNodes) in prefix format and create a scalar-valued OSE...
bool setInstanceLicence(std::string licence)
set the instance licence.
std::string getFileSource()
Get the source of the file or problem.
std::string getFileName()
Get the name of the file.
std::string getOtherJobResultValue(int idx)
int getOtherVariableResultEnumerationNumberOfEl(int solIdx, int otherIdx, int enumIdx)
Get the size of an enum associated with an <other> result for some solution.
int getNumberOfOtherServiceOptions()
Get the number of <other> options in the <service> element.
bool setInitDualVarValuesSparse(int numberOfCon, InitDualVarValue **con)
bool setFilesToDelete(int numberOfPaths, std::string *paths)
used for throwing exceptions.
bool setInstanceName(std::string instanceName)
Set the instance name.
int getNumberOfDirectoriesToDelete()
Get the number of directories to delete.
OtherConstraintOption ** getAllOtherConstraintOptions()
Get all <other> constraint options.
std::string getMinDiskSpaceUnit()
Get the disk space unit.
bool setMaxTimeUnit(std::string unit)
std::string getGeneralSubstatusDescription(int i)
Get the i_th general substatus description.
LinearConstraintCoefficients * linearConstraintCoefficients
linearConstraintCoefficients is a pointer to a LinearConstraintCoefficients object ...
bool setTimingInformation(int idx, std::string type, std::string category, std::string unit, std::string description, double value)
Set timing information.
std::string getUsedDiskSpaceUnit()
OtherConstraintOption * getOtherConstraintOption(int optionNumber)
Get one particular <other> constraint option from the array of options.
std::string getUsedCPUSpeedUnit()
bool setTimeStamp(std::string timeStamp)
Set time stamp.
ENUM_BASIS_STATUS
Enumeration for the different states that can be used in representating a basis The last state...
int getVarValueIdx(int solIdx, int varIdx)
int getVariableNumber()
Get variable number.
InitObjValue ** getInitObjValuesSparse()
Get the initial values associated with the objectives in sparse form.
OtherVariableOption * getOtherVariableOption(int optionNumber)
Get one particular <other> variable option from the array of options.
Take an OSInstance object and write a string that validates against the OSiL schema.
int numberOfEnumerations
the number of distinct values for this particular type of result
bool setNumberOfOtherObjectiveResults(int solIdx, int numberOfOtherObjectiveResults)
Set the [i]th optimization solution's other (non-standard/solver specific) objective-related results...
bool setOtherVariableResultNumberOfVar(int solIdx, int otherIdx, int numberOfVar)
Set the number of children of another (non-standard/solver specific) variable-related result...
std::string getOtherConstraintResultValue(int solIdx, int otherIdx)
std::string getSolutionSubstatusType(int solIdx, int substatusIdx)
std::string getPassword()
Get the password.
virtual double calculateFunction(double *x)=0
Calculate the function value given the current variable values.
a data structure to represent an LP basis on both input and output
bool setAvailableCPUNumberValue(int value)
Set the available number of CPUs.
The in-memory representation of the variable element.
int getItCount(std::string osrl)
int getNumberOfInitialBasisElements(int type, int status)
Get the number of initial basis elements for a particular variable type and basis status...
GeneralSparseMatrix * getBlock(int rowIdx, int colIdx)
a method to retrieve a particular block from a collection
bool setTimeServiceStarted(std::string startTime)
Set the time the service was started.
bool setOtherSystemOptions(int numberOfOptions, OtherOption **other)
std::string getOtherJobResultName(int idx)
bool setServiceUtilization(double value)
Set the service utilitzation.
int getConstraintNumber()
Get constraint number.
the BranchingWeight class.
bool setOutputDirectoriesToMove(int numberOfPathPairs, PathPair **pathPair)
std::string getInstanceDescription()
Get instance description.
InitObjBound ** getInitObjBoundsSparse()
Get the initial bounds associated with the objectives in sparse form.
virtual void buildSolverInstance()
The implementation of the virtual functions.
std::string getOtherVariableResultVar(int solIdx, int otherIdx, int varIdx)
std::string getOtherObjectiveResultEnumerationDescription(int solIdx, int otherIdx, int enumIdx)
Get the description of an enum associated with an <other> result for some solution.
bool setAvailableDiskSpaceValue(double value)
Set the amount of available disk space.
void fint fint fint real fint real * x
The in-memory representation of the <con> element.
bool setContact(std::string contact)
Set the contact information.
std::string getOtherConstraintResultDescription(int solIdx, int otherIdx)
double getUsedCPUSpeedValue()
std::string getTimeDomainFormat()
Get the format of the time domain ("stages"/"interval")
bool setOtherObjectiveResultObjType(int solIdx, int otherIdx, std::string objType)
Set the objType of another (non-standard/solver specific) objective-related result, for the [i]th solution, where i equals the given solution index.
bool setAnotherRequiredDirectory(std::string path)
bool setPassword(std::string password)
Set the password.
std::string getOtherConstraintResultEnumerationValue(int solIdx, int otherIdx, int enumIdx)
Get the value of an enum associated with an <other> result for some solution.
std::string getInstanceLocation()
Get the instance location.
std::vector< ExprNode * > getNonlinearExpressionTreeInPostfix(int rowIdx)
Get the postfix tokens for a given row index.
bool setAvailableCPUSpeedValue(double value)
Set the available CPU speed.
std::string enumType
type of the values in the enumeration array