Changeset 404 for branches/devel/Cbc/src


Ignore:
Timestamp:
Jul 9, 2006 9:50:11 AM (13 years ago)
Author:
forrest
Message:

for infeasible problems

Location:
branches/devel/Cbc/src
Files:
2 edited

Legend:

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

    r397 r404  
    19361936*/
    19371937  globalCuts_= OsiCuts() ;
     1938  if (!bestSolution_) {
     1939    // make sure lp solver is infeasible
     1940    int numberColumns = solver_->getNumCols();
     1941    const double * columnLower = solver_->getColLower();
     1942    int iColumn;
     1943    for (iColumn=0;iColumn<numberColumns;iColumn++) {
     1944      if (solver_->isInteger(iColumn))
     1945        solver_->setColUpper(iColumn,columnLower[iColumn]);
     1946    }
     1947    solver_->initialSolve();
     1948  }
    19381949  if (strategy_&&strategy_->preProcessState()>0) {
    19391950    // undo preprocessing
  • branches/devel/Cbc/src/CbcStrategy.cpp

    r356 r404  
    299299    // solver_ should have been cloned outside
    300300    CglPreProcess * process = new CglPreProcess();
     301    // Pass in models message handler
     302    process->passInMessageHandler(model.messageHandler());
    301303    OsiSolverInterface * solver = model.solver();
    302304    int logLevel = model.messageHandler()->logLevel();
     
    325327    generator1.setRowCuts(3);
    326328    //generator1.messageHandler()->setLogLevel(logLevel);
    327     process->messageHandler()->setLogLevel(logLevel);
     329    // Not needed with pass in process->messageHandler()->setLogLevel(logLevel);
    328330    // Add in generators
    329331    process->addCutGenerator(&generator1);
Note: See TracChangeset for help on using the changeset viewer.