14#include "CbcModel.hpp"
A class to have all elements necessary to setup a branch-and-bound.
double bestObj() const
return objective value of the bestSolution
double bestBound()
return the best known lower bound on the objective value
int numNodes_
Number of nodes enumerated.
CbcModel & model()
Get cbc model used to solve as non-const, in case we want to change options before things happen.
const CbcModel & model() const
Get cbc model used to solve.
double bestObj_
objValue of MIP
int numNodes() const
return the total number of nodes explored.
virtual ~Bab()
destructor.
MipStatuses mipStatus() const
return Mip Status
MipStatuses
Integer optimization return codes.
@ Feasible
An integer solution to the problem has been found.
@ FeasibleOptimal
Optimum solution has been found and its optimality proved.
@ ProvenInfeasible
Problem has been proven to be infeasible.
@ NoSolutionKnown
No feasible solution to the problem is known.
OsiObject ** objects_
OsiObjects of the model.
int nObjects_
number of objects.
virtual void replaceIntegers(OsiObject **objects, int numberObjects)
virtual callback function to eventually modify objects for integer variable (replace with user set).
virtual void operator()(BabSetupBase &s)
operator() performs the branchAndBound
int iterationCount()
return the total number of iterations in the last mip solved.
virtual void branchAndBound(BabSetupBase &s)
Perform a branch-and-bound using given setup.
double bestBound_
best known (lower) bound.
MipStatuses mipStatus_
Status of the mip solved.
const double * bestSolution() const
get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).
double continuousRelaxation_
Continuous relaxation of the problem.
CbcModel model_
CbcModel used to solve problem.
int mipIterationCount_
get total number of iterations in last mip solved.
virtual void operator()(BabSetupBase *s)
operator() performs the branchAndBound
CoinMessageHandler * modelHandler_
Message handler for CbcModel.
double * bestSolution_
Stores the solution of MIP.
double continuousRelaxation()
returns the value of the continuous relaxation.
(C) Copyright International Business Machines Corporation 2007