Bonmin 1.8.9
Loading...
Searching...
No Matches
Bonmin::Bab Class Reference

#include <BonCbc.hpp>

+ Collaboration diagram for Bonmin::Bab:

Public Types

enum  MipStatuses {
  FeasibleOptimal , ProvenInfeasible , Feasible , UnboundedOrInfeasible ,
  NoSolutionKnown , NumMipStats
}
 Integer optimization return codes. More...
 

Public Member Functions

 Bab ()
 Constructor.
 
virtual ~Bab ()
 destructor.
 
virtual void branchAndBound (BabSetupBase &s)
 Perform a branch-and-bound using 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.
 

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.
 
CoinMessageHandlermodelHandler_
 Message handler for CbcModel.
 
OsiObject ** objects_
 OsiObjects of the model.
 
int nObjects_
 number of objects.
 

Detailed Description

Definition at line 19 of file BonCbc.hpp.

Member Enumeration Documentation

◆ 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.

NumMipStats 

Definition at line 23 of file BonCbc.hpp.

Constructor & Destructor Documentation

◆ Bab()

Bonmin::Bab::Bab ( )

Constructor.

◆ ~Bab()

virtual Bonmin::Bab::~Bab ( )
virtual

destructor.

Member Function Documentation

◆ branchAndBound()

virtual void Bonmin::Bab::branchAndBound ( BabSetupBase & s)
virtual

Perform a branch-and-bound using given setup.

◆ operator()() [1/2]

virtual void Bonmin::Bab::operator() ( BabSetupBase & s)
virtual

operator() performs the branchAndBound

◆ operator()() [2/2]

virtual void Bonmin::Bab::operator() ( BabSetupBase * s)
inlinevirtual

operator() performs the branchAndBound

Definition at line 42 of file BonCbc.hpp.

◆ bestSolution()

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 47 of file BonCbc.hpp.

◆ bestObj()

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

return objective value of the bestSolution

Definition at line 52 of file BonCbc.hpp.

◆ mipStatus()

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

return Mip Status

Definition at line 58 of file BonCbc.hpp.

◆ bestBound()

double Bonmin::Bab::bestBound ( )

return the best known lower bound on the objective value

◆ numNodes()

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

return the total number of nodes explored.

Definition at line 67 of file BonCbc.hpp.

◆ iterationCount()

int Bonmin::Bab::iterationCount ( )
inline

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

Definition at line 72 of file BonCbc.hpp.

◆ continuousRelaxation()

double Bonmin::Bab::continuousRelaxation ( )
inline

returns the value of the continuous relaxation.

Definition at line 77 of file BonCbc.hpp.

◆ replaceIntegers()

virtual void Bonmin::Bab::replaceIntegers ( OsiObject ** objects,
int numberObjects )
inlinevirtual

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

This is called after CbcModel::findIntegers

Definition at line 84 of file BonCbc.hpp.

◆ model() [1/2]

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

Get cbc model used to solve.

Definition at line 87 of file BonCbc.hpp.

◆ model() [2/2]

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 94 of file BonCbc.hpp.

Member Data Documentation

◆ bestSolution_

double* Bonmin::Bab::bestSolution_
protected

Stores the solution of MIP.

Definition at line 101 of file BonCbc.hpp.

◆ mipStatus_

MipStatuses Bonmin::Bab::mipStatus_
protected

Status of the mip solved.

Definition at line 104 of file BonCbc.hpp.

◆ bestObj_

double Bonmin::Bab::bestObj_
protected

objValue of MIP

Definition at line 106 of file BonCbc.hpp.

◆ bestBound_

double Bonmin::Bab::bestBound_
protected

best known (lower) bound.

Definition at line 108 of file BonCbc.hpp.

◆ continuousRelaxation_

double Bonmin::Bab::continuousRelaxation_
protected

Continuous relaxation of the problem.

Definition at line 110 of file BonCbc.hpp.

◆ numNodes_

int Bonmin::Bab::numNodes_
protected

Number of nodes enumerated.

Definition at line 112 of file BonCbc.hpp.

◆ mipIterationCount_

int Bonmin::Bab::mipIterationCount_
protected

get total number of iterations in last mip solved.

Definition at line 114 of file BonCbc.hpp.

◆ model_

CbcModel Bonmin::Bab::model_
protected

CbcModel used to solve problem.

Definition at line 116 of file BonCbc.hpp.

◆ modelHandler_

CoinMessageHandler* Bonmin::Bab::modelHandler_
protected

Message handler for CbcModel.

Definition at line 118 of file BonCbc.hpp.

◆ objects_

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 122 of file BonCbc.hpp.

◆ nObjects_

int Bonmin::Bab::nObjects_
protected

number of objects.

Definition at line 124 of file BonCbc.hpp.


The documentation for this class was generated from the following file: