 Timestamp:
 Aug 17, 2005 5:26:32 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/CbcModel.cpp
r157 r158 3441 3441 if (clpSolver) { 3442 3442 // Maybe solver might like to know only column bounds will change 3443 int options = clpSolver>specialOptions();3444 clpSolver>setSpecialOptions(options128);3443 //int options = clpSolver>specialOptions(); 3444 //clpSolver>setSpecialOptions(options128); 3445 3445 clpSolver>synchronizeModel(); 3446 3446 } … … 4343 4343 for (i=0;i<numberObjects_;i++) 4344 4344 object_[i]>feasibleRegion(); 4345 /* 4346 Remove any existing warm start information to be sure there is no 4347 residual influence on initialSolve(). 4348 */ 4349 CoinWarmStartBasis *slack = 4350 dynamic_cast<CoinWarmStartBasis *>(solver_>getEmptyWarmStart()) ; 4351 solver_>setWarmStart(slack); 4352 delete slack ; 4353 // Give a hint not to do scaling 4354 //bool saveTakeHint; 4355 //OsiHintStrength saveStrength; 4356 //bool gotHint = (solver_>getHintParam(OsiDoScale,saveTakeHint,saveStrength)); 4357 //assert (gotHint); 4358 //solver_>setHintParam(OsiDoScale,false,OsiHintTry); 4359 solver_>initialSolve(); 4360 //solver_>setHintParam(OsiDoScale,saveTakeHint,saveStrength); 4361 if (!solver_>isProvenOptimal()) 4362 { printf("checkSolution infeas! Retrying wihout scaling.\n"); 4363 bool saveTakeHint; 4364 OsiHintStrength saveStrength; 4365 bool savePrintHint; 4366 solver_>writeMps("infeas"); 4367 bool gotHint = (solver_>getHintParam(OsiDoReducePrint,savePrintHint,saveStrength)); 4368 gotHint = (solver_>getHintParam(OsiDoScale,saveTakeHint,saveStrength)); 4369 solver_>setHintParam(OsiDoScale,false,OsiHintTry); 4370 solver_>setHintParam(OsiDoReducePrint,false,OsiHintTry) ; 4345 // We can switch off check 4346 if ((specialOptions_&4)==0) { 4347 if ((specialOptions_&2)==0) { 4348 /* 4349 Remove any existing warm start information to be sure there is no 4350 residual influence on initialSolve(). 4351 */ 4352 CoinWarmStartBasis *slack = 4353 dynamic_cast<CoinWarmStartBasis *>(solver_>getEmptyWarmStart()) ; 4354 solver_>setWarmStart(slack); 4355 delete slack ; 4356 } 4357 // Give a hint not to do scaling 4358 //bool saveTakeHint; 4359 //OsiHintStrength saveStrength; 4360 //bool gotHint = (solver_>getHintParam(OsiDoScale,saveTakeHint,saveStrength)); 4361 //assert (gotHint); 4362 //solver_>setHintParam(OsiDoScale,false,OsiHintTry); 4371 4363 solver_>initialSolve(); 4372 solver_>setHintParam(OsiDoScale,saveTakeHint,saveStrength); 4373 solver_>setHintParam(OsiDoReducePrint,savePrintHint,OsiHintTry) ; 4374 } 4375 //assert(solver_>isProvenOptimal()); 4364 //solver_>setHintParam(OsiDoScale,saveTakeHint,saveStrength); 4365 if (!solver_>isProvenOptimal()) 4366 { printf("checkSolution infeas! Retrying wihout scaling.\n"); 4367 bool saveTakeHint; 4368 OsiHintStrength saveStrength; 4369 bool savePrintHint; 4370 solver_>writeMps("infeas"); 4371 bool gotHint = (solver_>getHintParam(OsiDoReducePrint,savePrintHint,saveStrength)); 4372 gotHint = (solver_>getHintParam(OsiDoScale,saveTakeHint,saveStrength)); 4373 solver_>setHintParam(OsiDoScale,false,OsiHintTry); 4374 solver_>setHintParam(OsiDoReducePrint,false,OsiHintTry) ; 4375 solver_>initialSolve(); 4376 solver_>setHintParam(OsiDoScale,saveTakeHint,saveStrength); 4377 solver_>setHintParam(OsiDoReducePrint,savePrintHint,OsiHintTry) ; 4378 } 4379 //assert(solver_>isProvenOptimal()); 4380 } 4376 4381 double objectiveValue = solver_>getObjValue()*solver_>getObjSense(); 4377 4382 … … 4387 4392 Perhaps an opportunity for a sanity check? 4388 4393 */ 4389 if ( solver_>isProvenOptimal() && objectiveValue <= cutoff)4394 if ((solver_>isProvenOptimal()(specialOptions_&4)!=0) && objectiveValue <= cutoff) 4390 4395 { 4391 4396 double * solution = new double[numberColumns];
Note: See TracChangeset
for help on using the changeset viewer.