Bonmin::Bab Class Reference

#include <BonCbc.hpp>

List of all members.

Public Types

 FeasibleOptimal
 Optimum solution has been found and its optimality proved.
 ProvenInfeasible
 Problem has been proven to be infeasible.
 Feasible
 An integer solution to the problem has been found.
 UnboundedOrInfeasible
 NoSolutionKnown
 No feasible solution to the problem is known.
enum  MipStatuses {
  FeasibleOptimal, ProvenInfeasible, Feasible, UnboundedOrInfeasible,
  NoSolutionKnown
}
 Integer optimization return codes. More...

Public Member Functions

 Bab ()
 Constructor.
virtual ~Bab ()
 Destructor.
virtual void branchAndBound (BabSetupBase &s)
 Perform a branch-and-bound on given setup.
virtual void operator() (BabSetupBase &s)
 operator() performs the branchAndBound
virtual void operator() (BabSetupBase *s)
 operator() performs the branchAndBound
const double * bestSolution () const
 get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).
double bestObj () const
 return objective value of the bestSolution
MipStatuses mipStatus () const
 return Mip Status
double bestBound ()
 return the best known lower bound on the objective value
int numNodes () const
 return the total number of nodes explored.
int iterationCount ()
 return the total number of iterations in the last mip solved.
double continuousRelaxation ()
 returns the value of the continuous relaxation.
virtual void replaceIntegers (OsiObject **objects, int numberObjects)
 virtual callback function to eventually modify objects for integer variable (replace with user set).
const CbcModel & model () const
 Get cbc model used to solve.
CbcModel & model ()
 Get cbc model used to solve as non-const, in case we want to change options before things happen.
void setUsingCouenne (bool v)
 Say that algorithm is using Couenne.
bool getUsingCouenne ()
 Get value of usingCouenne variable.

Protected Attributes

double * bestSolution_
 Stores the solution of MIP.
MipStatuses mipStatus_
 Status of the mip solved.
double bestObj_
 objValue of MIP
double bestBound_
 best known (lower) bound.
double continuousRelaxation_
 Continuous relaxation of the problem.
int numNodes_
 Number of nodes enumerated.
int mipIterationCount_
 get total number of iterations in last mip solved.
CbcModel model_
 CbcModel used to solve problem.
CoinMessageHandler * modelHandler_
 Message handler for CbcModel.
OsiObject ** objects_
 OsiObjects of the model.
int nObjects_
 number of objects.
bool usingCouenne_
 Say if current algorithm is Couenne.


Detailed Description

Definition at line 19 of file BonCbc.hpp.


Member Enumeration Documentation

enum Bonmin::Bab::MipStatuses

Integer optimization return codes.

Enumerator:
FeasibleOptimal  Optimum solution has been found and its optimality proved.
ProvenInfeasible  Problem has been proven to be infeasible.
Feasible  An integer solution to the problem has been found.
UnboundedOrInfeasible 
NoSolutionKnown  No feasible solution to the problem is known.

Definition at line 23 of file BonCbc.hpp.


Constructor & Destructor Documentation

Bonmin::Bab::Bab (  ) 

Constructor.

Definition at line 67 of file BonCbc.cpp.

Bonmin::Bab::~Bab (  )  [virtual]

Destructor.

Definition at line 83 of file BonCbc.cpp.

References bestSolution_, modelHandler_, nObjects_, and objects_.


Member Function Documentation

void Bonmin::Bab::branchAndBound ( BabSetupBase s  )  [virtual]

Perform a branch-and-bound on given setup.

Definition at line 103 of file BonCbc.cpp.

References Bonmin::BabSetupBase::AllowableFractionGap, Bonmin::BabSetupBase::AllowableGap, Bonmin::BabSetupBase::BabLogInterval, Bonmin::BabSetupBase::BabLogLevel, Bonmin::BabSetupBase::bestBound, bestBound_, Bonmin::BabSetupBase::bestGuess, Bonmin::AuxInfo::bestObj2(), bestObj_, Bonmin::AuxInfo::bestSolution2(), bestSolution_, Bonmin::BabSetupBase::BFS, Bonmin::TMINLP::CONTINUOUS_UNBOUNDED, continuousRelaxation_, currentBranchModel, Bonmin::BabSetupBase::Cutoff, CUTOFF_TOL, Bonmin::BabSetupBase::CutoffDecr, Bonmin::BabSetupBase::DFS, Bonmin::BabSetupBase::DfsDiveDynamic, Bonmin::BabSetupBase::DfsDiveFromBest, Bonmin::BabSetupBase::DisableSos, Bonmin::BabSetupBase::DiveFromBest, Bonmin::BabSetupBase::dynamic, Bonmin::BabSetupBase::FailureBehavior, Feasible, FeasibleOptimal, Bonmin::OsiTMINLPInterface::forceSolverOutput(), Bonmin::LinearCutsGenerator::generateCuts(), Bonmin::OsiTMINLPInterface::getNewCutoffDecr(), Bonmin::TNLPSolver::getWarmStart(), Bonmin::CbcNlpStrategy::hasFailed(), Bonmin::BabSetupBase::HeapOnly, Bonmin::TMINLP::SosInfo::indices, Bonmin::TMINLP::INFEASIBLE, Bonmin::LinearCutsGenerator::initialize(), Bonmin::BabSetupBase::IntTol, Bonmin::TMINLP::LIMIT_EXCEEDED, Bonmin::BabSetupBase::MaxFailures, Bonmin::BabSetupBase::MaxInfeasible, Bonmin::BabSetupBase::MaxIterations, Bonmin::BabSetupBase::MaxNodes, Bonmin::BabSetupBase::MaxSolutions, Bonmin::BabSetupBase::MaxTime, Bonmin::TMINLP::MINLP_ERROR, Bonmin::BabSetupBase::MinReliability, mipIterationCount_, mipStatus_, model_, modelHandler_, nObjects_, NoSolutionKnown, Bonmin::TMINLP::SosInfo::num, Bonmin::BabSetupBase::NumberStrong, Bonmin::BabSetupBase::NumCutPasses, Bonmin::BabSetupBase::NumCutPassesAtRoot, numNodes_, objects_, Bonmin::TMINLP::SosInfo::priorities, Bonmin::BabSetupBase::ProbedDive, Bonmin::OsiTMINLPInterface::problem(), ProvenInfeasible, replaceIntegers(), Bonmin::BabSetupBase::RootLogLevel, s, Bonmin::BabInfo::setBabPtr(), Bonmin::BonChooseVariable::setCbcModel(), Bonmin::DiverCompare::setComparisonBound(), Bonmin::DiverCompare::setComparisonDive(), Bonmin::DiverCompare::setDiver(), Bonmin::OsiTMINLPInterface::setSolverOutputToDefault(), Bonmin::TNLPSolver::setWarmStart(), signal_handler(), Bonmin::OsiTMINLPInterface::solver(), Bonmin::BabSetupBase::SpecialOption, Bonmin::TMINLP::SosInfo::starts, Bonmin::TMINLP::SUCCESS, Bonmin::TMINLPLinObj::tminlp(), Bonmin::TMINLP::SosInfo::types, UnboundedOrInfeasible, Bonmin::UNSUPPORTED_CBC_OBJECT, usingCouenne_, and Bonmin::TMINLP::SosInfo::weights.

Referenced by operator()().

void Bonmin::Bab::operator() ( BabSetupBase s  )  [virtual]

operator() performs the branchAndBound

Definition at line 96 of file BonCbc.cpp.

References branchAndBound(), and s.

Referenced by operator()().

virtual void Bonmin::Bab::operator() ( BabSetupBase s  )  [inline, virtual]

operator() performs the branchAndBound

Definition at line 39 of file BonCbc.hpp.

References operator()(), and s.

const double* Bonmin::Bab::bestSolution (  )  const [inline]

get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).

if no solution is known returns NULL.

Definition at line 44 of file BonCbc.hpp.

References bestSolution_.

Referenced by Bonmin::LocalSolverBasedHeuristic::doLocalSearch(), CouenneSolver::writeResult(), BonminSolver::writeResult(), and CouenneAmplInterface::writeSolution().

double Bonmin::Bab::bestObj (  )  const [inline]

return objective value of the bestSolution

Definition at line 49 of file BonCbc.hpp.

References bestObj_.

Referenced by Bonmin::LocalSolverBasedHeuristic::doLocalSearch().

MipStatuses Bonmin::Bab::mipStatus (  )  const [inline]

return Mip Status

Definition at line 55 of file BonCbc.hpp.

References mipStatus_.

double Bonmin::Bab::bestBound (  ) 

return the best known lower bound on the objective value

Definition at line 643 of file BonCbc.cpp.

References bestBound_, bestObj_, FeasibleOptimal, mipStatus_, and ProvenInfeasible.

int Bonmin::Bab::numNodes (  )  const [inline]

return the total number of nodes explored.

Definition at line 62 of file BonCbc.hpp.

References numNodes_.

Referenced by main().

int Bonmin::Bab::iterationCount (  )  [inline]

return the total number of iterations in the last mip solved.

Definition at line 67 of file BonCbc.hpp.

References mipIterationCount_.

double Bonmin::Bab::continuousRelaxation (  )  [inline]

returns the value of the continuous relaxation.

Definition at line 72 of file BonCbc.hpp.

References continuousRelaxation_.

virtual void Bonmin::Bab::replaceIntegers ( OsiObject **  objects,
int  numberObjects 
) [inline, virtual]

virtual callback function to eventually modify objects for integer variable (replace with user set).

This is called after CbcModel::findIntegers

Definition at line 79 of file BonCbc.hpp.

Referenced by branchAndBound().

const CbcModel& Bonmin::Bab::model (  )  const [inline]

Get cbc model used to solve.

Definition at line 82 of file BonCbc.hpp.

References model_.

Referenced by Bonmin::OaNlpOptim::generateCuts(), Bonmin::OaDecompositionBase::generateCuts(), Bonmin::EcpCuts::generateCuts(), main(), CouenneSolver::solve(), BonminSolver::solve(), and CouenneSolver::writeResult().

CbcModel& Bonmin::Bab::model (  )  [inline]

Get cbc model used to solve as non-const, in case we want to change options before things happen.

Definition at line 89 of file BonCbc.hpp.

References model_.

void Bonmin::Bab::setUsingCouenne ( bool  v  )  [inline]

Say that algorithm is using Couenne.

Definition at line 94 of file BonCbc.hpp.

References usingCouenne_.

Referenced by main(), and CouenneSolver::solve().

bool Bonmin::Bab::getUsingCouenne (  )  [inline]

Get value of usingCouenne variable.

Definition at line 100 of file BonCbc.hpp.

References usingCouenne_.


Member Data Documentation

double* Bonmin::Bab::bestSolution_ [protected]

Stores the solution of MIP.

Definition at line 106 of file BonCbc.hpp.

Referenced by bestSolution(), branchAndBound(), and ~Bab().

MipStatuses Bonmin::Bab::mipStatus_ [protected]

Status of the mip solved.

Definition at line 109 of file BonCbc.hpp.

Referenced by bestBound(), branchAndBound(), and mipStatus().

double Bonmin::Bab::bestObj_ [protected]

objValue of MIP

Definition at line 111 of file BonCbc.hpp.

Referenced by bestBound(), bestObj(), and branchAndBound().

double Bonmin::Bab::bestBound_ [protected]

best known (lower) bound.

Definition at line 113 of file BonCbc.hpp.

Referenced by bestBound(), and branchAndBound().

double Bonmin::Bab::continuousRelaxation_ [protected]

Continuous relaxation of the problem.

Definition at line 115 of file BonCbc.hpp.

Referenced by branchAndBound(), and continuousRelaxation().

int Bonmin::Bab::numNodes_ [protected]

Number of nodes enumerated.

Definition at line 117 of file BonCbc.hpp.

Referenced by branchAndBound(), and numNodes().

int Bonmin::Bab::mipIterationCount_ [protected]

get total number of iterations in last mip solved.

Definition at line 119 of file BonCbc.hpp.

Referenced by branchAndBound(), and iterationCount().

CbcModel Bonmin::Bab::model_ [protected]

CbcModel used to solve problem.

Definition at line 121 of file BonCbc.hpp.

Referenced by branchAndBound(), and model().

CoinMessageHandler* Bonmin::Bab::modelHandler_ [protected]

Message handler for CbcModel.

Definition at line 123 of file BonCbc.hpp.

Referenced by branchAndBound(), and ~Bab().

OsiObject** Bonmin::Bab::objects_ [protected]

OsiObjects of the model.

this is not null if and only if there are some non-simple-integer branching objects such as SOS constraints. It is up to Bab to pass them over to appropriate components of the algorithm.

Definition at line 127 of file BonCbc.hpp.

Referenced by branchAndBound(), and ~Bab().

int Bonmin::Bab::nObjects_ [protected]

number of objects.

Definition at line 129 of file BonCbc.hpp.

Referenced by branchAndBound(), and ~Bab().

bool Bonmin::Bab::usingCouenne_ [protected]

Say if current algorithm is Couenne.

Definition at line 132 of file BonCbc.hpp.

Referenced by branchAndBound(), getUsingCouenne(), and setUsingCouenne().


The documentation for this class was generated from the following files:
Generated on Thu Aug 5 03:12:22 2010 by  doxygen 1.4.7