Changeset 527 for stable


Ignore:
Timestamp:
Apr 30, 2007 4:11:26 PM (13 years ago)
Author:
pbonami
Message:

Better exit if initial relaxation can not be solved due to time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.1/Bonmin/src/CbcBonmin/CbcBonmin.cpp

    r526 r527  
    402402  CbcBranchUserDecision branch;
    403403  model.setBranchingMethod(&branch);
    404   TMINLP::SolverReturn status;
     404  TMINLP::SolverReturn status = TMINLP::LIMIT_EXCEEDED;
     405  mipStatus_ = NoSolutionKnown;
    405406
    406407  if(CoinCpuTime() > GlobalTimeEnd){
    407408    model.findIntegers(true);
    408     status = TMINLP::LIMIT_EXCEEDED;
    409     mipStatus_ = NoSolutionKnown;
    410409  }
    411410  else {
    412411  //Get the time and start.
    413412  model.initialSolve();
     413  if(CoinCpuTime() < GlobalTimeEnd){
    414414  continuousRelaxation_ =model.solver()->getObjValue();
    415415  if(par.algo == 0)//Set warm start point for Ipopt
     
    493493  }
    494494  }
    495 
     495  }
    496496  nlpSolver.model()->finalize_solution(status, nlpSolver.getNumCols(), bestSolution_,
    497497                                       nlpSolver.getObjValue());
Note: See TracChangeset for help on using the changeset viewer.