Changeset 160 for trunk


Ignore:
Timestamp:
Aug 26, 2005 11:05:18 AM (15 years ago)
Author:
forrest
Message:

for Jon

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcModel.cpp

    r159 r160  
    15081508  assert (solver_);
    15091509  solver_->initialSolve();
     1510  // But set up so Jon Lee will be happy
     1511  status_=-1;
     1512  originalContinuousObjective_ = solver_->getObjValue()*solver_->getObjSense();
     1513  delete [] continuousSolution_;
     1514  continuousSolution_ = CoinCopyOfArray(solver_->getColSolution(),
     1515                                             solver_->getNumCols());
    15101516}
    15111517
     
    59275933  }
    59285934}
     5935// Are there numerical difficulties (for initialSolve) ?
     5936bool
     5937CbcModel::isInitialSolveAbandoned() const
     5938{
     5939  if (status_!=-1) {
     5940    return false;
     5941  } else {
     5942    return solver_->isAbandoned();
     5943  }
     5944}
     5945// Is optimality proven (for initialSolve) ?
     5946bool
     5947CbcModel::isInitialSolveProvenOptimal() const
     5948{
     5949  if (status_!=-1) {
     5950    return originalContinuousObjective_<1.0e50;
     5951  } else {
     5952    return solver_->isProvenOptimal();
     5953  }
     5954}
     5955// Is primal infeasiblity proven (for initialSolve) ?
     5956bool
     5957CbcModel::isInitialSolveProvenPrimalInfeasible() const
     5958{
     5959  if (status_!=-1) {
     5960    return originalContinuousObjective_>=1.0e50;
     5961  } else {
     5962    return solver_->isProvenPrimalInfeasible();
     5963  }
     5964}
     5965// Is dual infeasiblity proven (for initialSolve) ?
     5966bool
     5967CbcModel::isInitialSolveProvenDualInfeasible() const
     5968{
     5969  if (status_!=-1) {
     5970    return originalContinuousObjective_>=1.0e50;
     5971  } else {
     5972    return solver_->isProvenDualInfeasible();
     5973  }
     5974}
  • trunk/include/CbcModel.hpp

    r159 r160  
    637637    inline int status() const
    638638    { return status_;};
    639  
     639    /// Are there numerical difficulties (for initialSolve) ?
     640    bool isInitialSolveAbandoned() const ;
     641    /// Is optimality proven (for initialSolve) ?
     642    bool isInitialSolveProvenOptimal() const ;
     643    /// Is primal infeasiblity proven (for initialSolve) ?
     644    bool isInitialSolveProvenPrimalInfeasible() const ;
     645    /// Is dual infeasiblity proven (for initialSolve) ?
     646    bool isInitialSolveProvenDualInfeasible() const ;
     647
    640648  //@}
    641649
     
    773781  /**@name Methods related to querying the solution */
    774782  //@{
    775   /// Holds solution at continuous (after cuts)
     783  /// Holds solution at continuous (after cuts if branchAndBound called)
    776784  inline double * continuousSolution() const
    777785  { return continuousSolution_;};
     
    897905  void setObjSense(double s) { solver_->setObjSense(s);};
    898906
    899   /// Value of objective at continuous
     907  /// Value of objective at continuous 
    900908  inline double getContinuousObjective() const
    901909  { return originalContinuousObjective_;};
Note: See TracChangeset for help on using the changeset viewer.