Changeset 1684 for stable/2.7/Cbc
- Timestamp:
- Jul 2, 2011 10:07:44 AM (8 years ago)
- Location:
- stable/2.7/Cbc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/2.7/Cbc
- Property svn:mergeinfo changed
/trunk/Cbc merged: 1677,1679,1682-1683
- Property svn:mergeinfo changed
-
stable/2.7/Cbc/configure
r1675 r1684 20949 20949 if test -n "$PKG_CONFIG" ; then 20950 20950 if $PKG_CONFIG --exists "cgl osi coinutils"; then 20951 COINDEPEND_VERSIONS= "`$PKG_CONFIG --modversion "cgl osi coinutils" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"20951 COINDEPEND_VERSIONS=`$PKG_CONFIG --modversion "cgl osi coinutils" 2>/dev/null | tr '\n' ' '` 20952 20952 cflags=`$PKG_CONFIG --cflags "cgl osi coinutils" 2>/dev/null` 20953 20953 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 21498 21498 if test -n "$PKG_CONFIG" ; then 21499 21499 if $PKG_CONFIG --exists "osi-clp"; then 21500 CLP_VERSIONS= "`$PKG_CONFIG --modversion "osi-clp" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"21500 CLP_VERSIONS=`$PKG_CONFIG --modversion "osi-clp" 2>/dev/null | tr '\n' ' '` 21501 21501 cflags=`$PKG_CONFIG --cflags "osi-clp" 2>/dev/null` 21502 21502 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 22025 22025 if test -n "$PKG_CONFIG" ; then 22026 22026 if $PKG_CONFIG --exists "osi-unittests"; then 22027 OSITESTS_VERSIONS= "`$PKG_CONFIG --modversion "osi-unittests" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"22027 OSITESTS_VERSIONS=`$PKG_CONFIG --modversion "osi-unittests" 2>/dev/null | tr '\n' ' '` 22028 22028 cflags=`$PKG_CONFIG --cflags "osi-unittests" 2>/dev/null` 22029 22029 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 22506 22506 if test -n "$PKG_CONFIG" ; then 22507 22507 if $PKG_CONFIG --exists "coindatasample"; then 22508 SAMPLE_VERSIONS= "`$PKG_CONFIG --modversion "coindatasample" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"22508 SAMPLE_VERSIONS=`$PKG_CONFIG --modversion "coindatasample" 2>/dev/null | tr '\n' ' '` 22509 22509 cflags=`$PKG_CONFIG --cflags "coindatasample" 2>/dev/null` 22510 22510 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 22987 22987 if test -n "$PKG_CONFIG" ; then 22988 22988 if $PKG_CONFIG --exists "coindatanetlib"; then 22989 NETLIB_VERSIONS= "`$PKG_CONFIG --modversion "coindatanetlib" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"22989 NETLIB_VERSIONS=`$PKG_CONFIG --modversion "coindatanetlib" 2>/dev/null | tr '\n' ' '` 22990 22990 cflags=`$PKG_CONFIG --cflags "coindatanetlib" 2>/dev/null` 22991 22991 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 23468 23468 if test -n "$PKG_CONFIG" ; then 23469 23469 if $PKG_CONFIG --exists "coindatamiplib3"; then 23470 MIPLIB3_VERSIONS= "`$PKG_CONFIG --modversion "coindatamiplib3" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"23470 MIPLIB3_VERSIONS=`$PKG_CONFIG --modversion "coindatamiplib3" 2>/dev/null | tr '\n' ' '` 23471 23471 cflags=`$PKG_CONFIG --cflags "coindatamiplib3" 2>/dev/null` 23472 23472 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 24958 24958 if test -n "$PKG_CONFIG" ; then 24959 24959 if $PKG_CONFIG --exists "osi-dylp"; then 24960 DYLP_VERSIONS= "`$PKG_CONFIG --modversion "osi-dylp" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"24960 DYLP_VERSIONS=`$PKG_CONFIG --modversion "osi-dylp" 2>/dev/null | tr '\n' ' '` 24961 24961 cflags=`$PKG_CONFIG --cflags "osi-dylp" 2>/dev/null` 24962 24962 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 25458 25458 if test -n "$PKG_CONFIG" ; then 25459 25459 if $PKG_CONFIG --exists "osi-vol"; then 25460 VOL_VERSIONS= "`$PKG_CONFIG --modversion "osi-vol" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"25460 VOL_VERSIONS=`$PKG_CONFIG --modversion "osi-vol" 2>/dev/null | tr '\n' ' '` 25461 25461 cflags=`$PKG_CONFIG --cflags "osi-vol" 2>/dev/null` 25462 25462 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 25961 25961 if test -n "$PKG_CONFIG" ; then 25962 25962 if $PKG_CONFIG --exists "osi-cplex"; then 25963 CPX_VERSIONS= "`$PKG_CONFIG --modversion "osi-cplex" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"25963 CPX_VERSIONS=`$PKG_CONFIG --modversion "osi-cplex" 2>/dev/null | tr '\n' ' '` 25964 25964 cflags=`$PKG_CONFIG --cflags "osi-cplex" 2>/dev/null` 25965 25965 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 26491 26491 if test -n "$PKG_CONFIG" ; then 26492 26492 if $PKG_CONFIG --exists "osi-glpk"; then 26493 GLPK_VERSIONS= "`$PKG_CONFIG --modversion "osi-glpk" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"26493 GLPK_VERSIONS=`$PKG_CONFIG --modversion "osi-glpk" 2>/dev/null | tr '\n' ' '` 26494 26494 cflags=`$PKG_CONFIG --cflags "osi-glpk" 2>/dev/null` 26495 26495 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 26991 26991 if test -n "$PKG_CONFIG" ; then 26992 26992 if $PKG_CONFIG --exists "osi-gurobi"; then 26993 GRB_VERSIONS= "`$PKG_CONFIG --modversion "osi-gurobi" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"26993 GRB_VERSIONS=`$PKG_CONFIG --modversion "osi-gurobi" 2>/dev/null | tr '\n' ' '` 26994 26994 cflags=`$PKG_CONFIG --cflags "osi-gurobi" 2>/dev/null` 26995 26995 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 27483 27483 if test -n "$PKG_CONFIG" ; then 27484 27484 if $PKG_CONFIG --exists "osi-mosek"; then 27485 MSK_VERSIONS= "`$PKG_CONFIG --modversion "osi-mosek" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"27485 MSK_VERSIONS=`$PKG_CONFIG --modversion "osi-mosek" 2>/dev/null | tr '\n' ' '` 27486 27486 cflags=`$PKG_CONFIG --cflags "osi-mosek" 2>/dev/null` 27487 27487 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 27994 27994 if test -n "$PKG_CONFIG" ; then 27995 27995 if $PKG_CONFIG --exists "osi-soplex"; then 27996 SPX_VERSIONS= "`$PKG_CONFIG --modversion "osi-soplex" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"27996 SPX_VERSIONS=`$PKG_CONFIG --modversion "osi-soplex" 2>/dev/null | tr '\n' ' '` 27997 27997 cflags=`$PKG_CONFIG --cflags "osi-soplex" 2>/dev/null` 27998 27998 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 28494 28494 if test -n "$PKG_CONFIG" ; then 28495 28495 if $PKG_CONFIG --exists "osi-xpress"; then 28496 XPR_VERSIONS= "`$PKG_CONFIG --modversion "osi-xpress" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"28496 XPR_VERSIONS=`$PKG_CONFIG --modversion "osi-xpress" 2>/dev/null | tr '\n' ' '` 28497 28497 cflags=`$PKG_CONFIG --cflags "osi-xpress" 2>/dev/null` 28498 28498 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 28981 28981 if test -n "$PKG_CONFIG" ; then 28982 28982 if $PKG_CONFIG --exists "coinasl"; then 28983 ASL_VERSIONS= "`$PKG_CONFIG --modversion "coinasl" 2>/dev/null | sed -n -e "1h;2,\\$H;\\${g;s/\n/ /g;p}"`"28983 ASL_VERSIONS=`$PKG_CONFIG --modversion "coinasl" 2>/dev/null | tr '\n' ' '` 28984 28984 cflags=`$PKG_CONFIG --cflags "coinasl" 2>/dev/null` 28985 28985 # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files … … 30123 30123 30124 30124 fi 30125 30126 # On AIX, the default sed cannot deal with somewhat long sed commands executed by config.status.30127 # So we reduce the hardcoded number of commands given to sed from 48 to 5 in config.status, hoping this will suffice.30128 30129 30125 30130 30126 cat >confcache <<\_ACEOF … … 32096 32092 32097 32093 32098 case $build in32099 *-aix*)32100 { echo "$as_me:$LINENO: patching config.status to reduce ac_max_sed_lines to 5" >&532101 echo "$as_me: patching config.status to reduce ac_max_sed_lines to 5" >&6;}32102 sed -e 's/ac_max_sed_lines=48/ac_max_sed_lines=5/g' config.status > config.status.tmp32103 mv config.status.tmp config.status32104 ;;32105 esac32106 32107 32108 32094 # configure is writing to config.log, and then calls config.status. 32109 32095 # config.status does its own redirection, appending to config.log. -
stable/2.7/Cbc/src/CbcModel.cpp
r1681 r1684 2397 2397 doHeuristicsAtRoot(); 2398 2398 if (solverCharacteristics_->solutionAddsCuts()) { 2399 // With some heuristics solver needs a resolve here (don't know if this is bug in heuristics)2399 // With some heuristics solver needs a resolve here 2400 2400 solver_->resolve(); 2401 2401 if(!isProvenOptimal()){ … … 2414 2414 stoppedOnGap_ = false ; 2415 2415 // See if can stop on gap 2416 if (solverCharacteristics_->solutionAddsCuts()) {2417 // With some heuristics solver needs a resolve here (don't know if this is bug in heuristics)2418 solver_->resolve();2419 if(!isProvenOptimal()){2420 solver_->initialSolve();2421 }2422 }2423 2416 bestPossibleObjective_ = solver_->getObjValue() * solver_->getObjSense(); 2424 2417 double testGap = CoinMax(dblParam_[CbcAllowableGap], … … 2594 2587 } 2595 2588 currentNumberCuts_ = numberNewCuts_ ; 2589 if (solverCharacteristics_->solutionAddsCuts()) { 2590 // With some heuristics solver needs a resolve here (don't know if this is bug in heuristics) 2591 solver_->resolve(); 2592 if(!isProvenOptimal()){ 2593 solver_->initialSolve(); 2594 } 2595 } 2596 2596 // See if can stop on gap 2597 2597 bestPossibleObjective_ = solver_->getObjValue() * solver_->getObjSense(); … … 7108 7108 } 7109 7109 //Is Necessary for Bonmin? Always keepGoing if cuts have been generated in last iteration (taken from similar code in Cbc-2.4) 7110 7111 7112 7113 7114 7115 7116 7117 7110 if (solverCharacteristics_->solutionAddsCuts()&&numberViolated) { 7111 for (i = 0;i<numberCutGenerators_;i++) { 7112 if (generator_[i]->mustCallAgain()) { 7113 keepGoing=true; // say must go round 7114 break; 7115 } 7116 } 7117 } 7118 7118 if(!keepGoing){ 7119 7120 7121 7122 7123 7124 7125 7119 // Status for single pass of cut generation 7120 int status = 0; 7121 /* 7122 threadMode with bit 2^1 set indicates we should use threads for root cut 7123 generation. 7124 */ 7125 if ((threadMode_&2) == 0 || numberNodes_) { 7126 7126 status = serialCuts(theseCuts, node, slackCuts, lastNumberCuts); 7127 7127 } else { 7128 7128 // do cuts independently 7129 7129 #ifdef CBC_THREAD 7130 7130 status = parallelCuts(master, theseCuts, node, slackCuts, lastNumberCuts); 7131 7131 #endif 7132 7133 7134 7135 7132 } 7133 // Do we need feasible and violated? 7134 feasible = (status >= 0); 7135 if (status == 1) 7136 7136 keepGoing = true; 7137 7137 else if (status == 2) 7138 7138 numberTries = 0; 7139 7139 if (!feasible) 7140 7140 violated = -2; 7141 7141 } … … 12594 12594 #endif 12595 12595 currentNode_ = newNode; // so can be used elsewhere 12596 // Remember number of rows to restore at the end of the loop 12597 int saveNumberRows=solver_->getNumRows(); 12596 12598 /* 12597 12599 Enough preparation. Get down to the business of choosing a branching 12598 12600 variable. 12599 12601 */ 12600 int saveNumberRows=solver_->getNumRows();12601 12602 while (anyAction == -1) { 12602 12603 // Set objective value (not so obvious if NLP etc) … … 12745 12746 } 12746 12747 } 12748 //A candidate has been found; restore the subproblem. 12747 12749 if( saveNumberRows<solver_->getNumRows()) { 12748 12750 // delete rows - but leave solution
Note: See TracChangeset
for help on using the changeset viewer.