Changeset 776
 Timestamp:
 Sep 3, 2007 12:24:04 PM (14 years ago)
 Location:
 trunk/Cbc/src
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcHeuristic.cpp
r765 r776 234 234 returnCode=model.isProvenInfeasible() ? 2 : 0; // so will be infeasible 235 235 } 236 if (model.status()==5) 237 returnCode=2; // stop 236 238 } 237 239 } else { 
trunk/Cbc/src/CbcHeuristicFPump.cpp
r774 r776 264 264 double time1 = CoinCpuTime(); 265 265 model_>solver()>resolve(); 266 if (!model_>solver()>isProvenOptimal()) { 267 // presumably max time or some such 268 return 0; 269 } 266 270 if (cutoff<1.0e50&&false) { 267 271 // Fix on djs … … 286 290 double * firstPerturbedObjective = NULL; 287 291 double * firstPerturbedSolution = NULL; 288 assert (model_>solver()>isProvenOptimal());289 292 if (when_>=11&&when_<=15) { 290 293 fixInternal = when_ >11&&when_<15; … … 364 367 solver>resolve(); 365 368 solver>setHintParam(OsiDoDualInResolve,takeHint,strength); 369 if (!solver>isProvenOptimal()) { 370 // presumably max time or some such 371 exitAll=true; 372 break; 373 } 366 374 } 367 375 solver>setDblParam(OsiDualObjectiveLimit,1.0e50); … … 369 377 // Solver may not be feasible 370 378 if (!solver>isProvenOptimal()) { 379 exitAll=true; 371 380 break; 372 381 } … … 479 488 returnCode = smallBranchAndBound(solver,numberNodes_,newSolution,newSolutionValue, 480 489 solutionValue,"CbcHeuristicFpump"); 481 if (returnCode<0) 482 returnCode=0; // returned on size 490 if (returnCode<0) { 491 if (returnCode==2) 492 exitAll=true; 493 returnCode=0; // returned on size or event 494 } 483 495 if ((returnCode&2)!=0) { 484 496 // could add cut … … 690 702 } 691 703 solver>resolve(); 692 assert (solver>isProvenOptimal()); 704 if (!solver>isProvenOptimal()) { 705 // presumably max time or some such 706 exitAll=true; 707 break; 708 } 693 709 for (i=0;i<numberIntegers;i++) { 694 710 int iColumn = integerVariable[i]; … … 770 786 } 771 787 solver>resolve(); 788 if (!solver>isProvenOptimal()) { 789 // presumably max time or some such 790 exitAll=true; 791 break; 792 } 772 793 if (numberTries==1&&numberPasses==1&&false) { 773 794 // save basis … … 792 813 } 793 814 #endif 794 assert (solver>isProvenOptimal()); 815 if (!solver>isProvenOptimal()) { 816 // presumably max time or some such 817 exitAll=true; 818 break; 819 } 795 820 // in case very dubious solver 796 821 lower = solver>getColLower(); … … 862 887 delete [] obj; 863 888 solver2>resolve(); 864 assert (solver2>isProvenOptimal()); 889 if (!solver2>isProvenOptimal()) { 890 // presumably max time or some such 891 exitAll=true; 892 break; 893 } 894 //assert (solver2>isProvenOptimal()); 865 895 if (nAdd) { 866 896 solver>setColSolution(solver2>getColSolution()); … … 971 1001 if (!newSolver>isProvenOptimal()) { 972 1002 //newSolver>writeMps("bad.mps"); 973 assert (newSolver>isProvenOptimal()); 1003 //assert (newSolver>isProvenOptimal()); 1004 exitAll=true; 974 1005 break; 975 1006 } … … 986 1017 returnCode = smallBranchAndBound(newSolver,numberNodes_,newSolution,newSolutionValue, 987 1018 cutoff,"CbcHeuristicLocalAfterFPump"); 988 if (returnCode<0) 989 returnCode=0; // returned on size  could try changing 1019 if (returnCode<0) { 1020 if (returnCode==2) 1021 exitAll=true; 1022 returnCode=0; // returned on size (or event)  could try changing 1023 } 990 1024 if ((returnCode&2)!=0) { 991 1025 // could add cut … … 1028 1062 } else { 1029 1063 //newSolver>writeMps("bad3.mps"); 1064 exitAll=true; 1065 break; 1030 1066 } 1031 1067 } 
trunk/Cbc/src/CbcModel.cpp
r774 r776 9888 9888 if (deleteHeuristicsAfterwards!=2) { 9889 9889 if (deleteHeuristicsAfterwards) { 9890 assert (!usedInSolution_);9890 delete [] usedInSolution_; 9891 9891 usedInSolution_ = new int [numberColumns]; 9892 9892 CoinZeroN(usedInSolution_,numberColumns); 
trunk/Cbc/src/CbcSolver.cpp
r774 r776 2593 2593 bool cleanModel = !model>numberIntegers()&&!model>numberObjects(); 2594 2594 model>findIntegers(false); 2595 model>doHeuristicsAtRoot( true);2595 model>doHeuristicsAtRoot(1); 2596 2596 if (cleanModel) 2597 2597 model>zapIntegerInformation(false);
Note: See TracChangeset
for help on using the changeset viewer.