Changeset 823 for stable/2.0/Cbc/src/unitTestClp.cpp
- Timestamp:
- Oct 12, 2007 11:54:25 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/2.0/Cbc/src/unitTestClp.cpp
r768 r823 76 76 //############################################################################# 77 77 78 voidCbcClpUnitTest (const CbcModel & saveModel, std::string& dirMiplib,78 int CbcClpUnitTest (const CbcModel & saveModel, std::string& dirMiplib, 79 79 bool unitTestOnly) 80 80 { … … 88 88 if (!doTest) { 89 89 printf("Not doing miplib run as can't find mps files - ? .gz without libz\n"); 90 return ;90 return -1; 91 91 } 92 92 /* … … 129 129 #endif 130 130 PUSH_MPS("air03",124,10757,340160,338864.25,7); 131 #if HOWMANY ==3131 #if HOWMANY>2 132 132 PUSH_MPS("air04",823,8904,56137,55535.436,8); 133 133 PUSH_MPS("air05",426,7195,26374,25877.609,8); … … 148 148 PUSH_MPS("egout",98,141,568.101,149.589,7); 149 149 PUSH_MPS("enigma",21,100,0.0,0.0,7); 150 #if HOWMANY ==3150 #if HOWMANY>3 151 151 PUSH_MPS("fast0507",507,63009,174,172.14556668,7); 152 152 #endif … … 164 164 PUSH_MPS("gesa3_o",1224,1152,27991042.648,27833632.451,7); 165 165 PUSH_MPS("gt2",29,188,21166.000,13460.233074,7); 166 #if HOWMANY ==3166 #if HOWMANY>2 167 167 PUSH_MPS("harp2",112,2993,-73899798.00,-74353341.502,7); 168 168 #endif … … 180 180 PUSH_MPS("mod008",6,319,307,290.9,7); 181 181 PUSH_MPS("mod010",146,2655,6548,6532.08,7); 182 #if HOWMANY ==3182 #if HOWMANY>2 183 183 PUSH_MPS("mod011",4480,10958,-54558535,-62121982.55,7); 184 184 PUSH_MPS("modglob",291,422,20740508,20430947.,7); 185 #endif 186 #if HOWMANY>3 185 187 PUSH_MPS("noswot",182,128,-43,-43.0,7); 186 188 #endif … … 193 195 PUSH_MPS("p0548",176,548,8691,315.29,7); 194 196 PUSH_MPS("p2756",755,2756,3124,2688.75,7); 195 #if HOWMANY ==3197 #if HOWMANY>2 196 198 PUSH_MPS("pk1",45,86,11.0,0.0,7); 197 199 #endif … … 200 202 PUSH_MPS("pp08aCUTS",246,240,7350.0,5480.6061563,7); 201 203 #endif 202 #if HOWMANY ==3204 #if HOWMANY>2 203 205 PUSH_MPS("qiu",1192,840,-132.873137,-931.638857,7); 204 206 #endif … … 207 209 PUSH_MPS("rentacar",6803,9557,30356761,28806137.644,7); 208 210 PUSH_MPS("rgn",24,180,82.1999,48.7999,7); 209 #if HOWMANY ==3211 #if HOWMANY>3 210 212 PUSH_MPS("rout",291,556,1077.56,981.86428571,7); 211 213 PUSH_MPS("set1ch",492,712,54537.75,32007.73,7); … … 224 226 int numProbSolved = 0; 225 227 double timeTaken=0.0; 228 int numberFailures=0; 226 229 227 230 /* … … 364 367 std::cout <<"cbc_clp" <<" " <<soln << " != " <<objValue[m] 365 368 << "; error=" << fabs(objValue[m] - soln); 369 numberFailures++; 366 370 } 367 371 } else { … … 372 376 delete model; 373 377 } 378 int returnCode=0; 374 379 std::cout 375 380 <<"cbc_clp" … … 377 382 <<numProbSolved 378 383 <<" out of " 379 <<objValue.size() 380 <<" and took " 384 <<objValue.size(); 385 int numberOnNodes = objValue.size()-numProbSolved-numberFailures; 386 if (numberFailures||numberOnNodes) { 387 if (numberOnNodes) { 388 std::cout<<" ("<<numberOnNodes<<" stopped on nodes)"; 389 returnCode = numberOnNodes; 390 } 391 if (numberFailures) { 392 std::cout<<" ("<<numberFailures<<" gave bad answer!)"; 393 returnCode += 100*numberFailures; 394 } 395 } 396 std::cout<<" and took " 381 397 <<timeTaken 382 398 <<" seconds." 383 399 <<std::endl; 400 return returnCode; 384 401 }
Note: See TracChangeset
for help on using the changeset viewer.