Changeset 576 for branches/devel


Ignore:
Timestamp:
Mar 14, 2007 7:52:07 AM (13 years ago)
Author:
forrest
Message:

try and fix heuristic solution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcModel.cpp

    r574 r576  
    64436443      solver_->initialSolve();
    64446444      if (!solver_->isProvenOptimal())
    6445         { //printf("checkSolution infeas! Retrying wihout scaling.\n");
    6446           bool saveTakeHint;
    6447           OsiHintStrength saveStrength;
    6448           bool savePrintHint;
     6445        {
     6446#ifdef COIN_DEVELOP
     6447          printf("checkSolution infeas! Retrying with primal.\n");
     6448#endif
     6449          //bool saveTakeHint;
     6450          //OsiHintStrength saveStrength;
     6451          //bool savePrintHint;
    64496452          //solver_->writeMps("infeas");
    6450           bool gotHint = (solver_->getHintParam(OsiDoReducePrint,savePrintHint,saveStrength));
    6451           gotHint = (solver_->getHintParam(OsiDoScale,saveTakeHint,saveStrength));
    6452           solver_->setHintParam(OsiDoScale,false,OsiHintTry);
     6453          //bool gotHint = (solver_->getHintParam(OsiDoReducePrint,savePrintHint,saveStrength));
     6454          //gotHint = (solver_->getHintParam(OsiDoScale,saveTakeHint,saveStrength));
     6455          //solver_->setHintParam(OsiDoScale,false,OsiHintTry);
    64536456          //solver_->setHintParam(OsiDoReducePrint,false,OsiHintTry) ;
    64546457          solver_->setHintParam(OsiDoDualInInitial,false,OsiHintTry);
    64556458          solver_->initialSolve();
    6456           solver_->setHintParam(OsiDoScale,saveTakeHint,saveStrength);
     6459          //solver_->setHintParam(OsiDoScale,saveTakeHint,saveStrength);
    64576460          //solver_->setHintParam(OsiDoReducePrint,savePrintHint,OsiHintTry) ;
     6461          // go from all slack now
     6462          specialOptions_ &= ~2;
     6463          if (!solver_->isProvenOptimal()) {
     6464            CoinWarmStartBasis *slack =
     6465              dynamic_cast<CoinWarmStartBasis *>(solver_->getEmptyWarmStart()) ;
     6466            solver_->setWarmStart(slack);
     6467            delete slack ;
     6468#ifdef COIN_DEVELOP
     6469            printf("checkSolution infeas! Retrying wihout basis and with primal.\n");
     6470#endif
     6471            solver_->initialSolve();
     6472#ifdef COIN_DEVELOP
     6473            if (!solver_->isProvenOptimal()) {
     6474              printf("checkSolution still infeas!\n");
     6475            }
     6476#endif
     6477          }
    64586478        }
    64596479      //assert(solver_->isProvenOptimal());
     
    66946714    if (objectiveValue>cutoff&&objectiveValue<cutoff+1.0e-8+1.0e-8*fabs(cutoff))
    66956715      cutoff = objectiveValue; // relax
    6696     if (objectiveValue > cutoff) {
     6716    if (objectiveValue > cutoff||objectiveValue>1.0e30) {
    66976717      if (objectiveValue>1.0e30)
    66986718        handler_->message(CBC_NOTFEAS1, messages_) << CoinMessageEol ;
Note: See TracChangeset for help on using the changeset viewer.