#include <BonOaDecBase.hpp>
Public Member Functions | |
SubMipSolver (OsiSolverInterface *lp=NULL, const CbcStrategy *strategy=NULL) | |
Constructor. | |
~SubMipSolver () | |
void | setLpSolver (OsiSolverInterface *lp) |
Assign lp solver. | |
void | setStrategy (CbcStrategy *strategy) |
Assign a strategy. | |
const double * | getLastSolution () |
get the solution found in last local search (return NULL if no solution). | |
double | getLowerBound () |
void | performLocalSearch (double cutoff, int loglevel, double maxTime, int maxNodes) |
update cutoff and perform a new local search. | |
double | lowBound () |
Returns lower bound. | |
bool | optimal () |
returns optimality status. | |
int | nodeCount () |
Returns number of nodes in last solve. | |
int | iterationCount () |
Returns number of simplex iterations in last solve. | |
void | registerOptions (Ipopt::SmartPtr< Ipopt::RegisteredOptions > roptions) |
Register options for that Oa based cut generation method. | |
Private Attributes | |
OsiSolverInterface * | lp_ |
lp (potentially mip solver). | |
OsiClpSolverInterface * | clp_ |
If lp solver is clp (then have to use Cbc). | |
OsiCpxSolverInterface * | cpx_ |
If lp solver is cpx this points to it. | |
CbcModel * | cbc_ |
If cbc is used pointer to CbcModel. | |
double | lowBound_ |
lower bound obtained | |
bool | optimal_ |
Is optimality proven? | |
double * | integerSolution_ |
Has an integer solution? then it is here. | |
CbcStrategy * | strategy_ |
Strategy for solving sub mips with cbc. | |
int | nodeCount_ |
number of nodes in last mip solved. | |
int | iterationCount_ |
number of simplex iteration in last mip solved. |
Definition at line 35 of file BonOaDecBase.hpp.
Bonmin::OaDecompositionBase::SubMipSolver::SubMipSolver | ( | OsiSolverInterface * | lp = NULL , |
|
const CbcStrategy * | strategy = NULL | |||
) |
Bonmin::OaDecompositionBase::SubMipSolver::~SubMipSolver | ( | ) |
void Bonmin::OaDecompositionBase::SubMipSolver::setLpSolver | ( | OsiSolverInterface * | lp | ) |
Assign lp solver.
Definition at line 186 of file BonOaDecBase.cpp.
References clp_, cpx_, integerSolution_, lowBound_, lp_, and optimal_.
void Bonmin::OaDecompositionBase::SubMipSolver::setStrategy | ( | CbcStrategy * | strategy | ) | [inline] |
const double* Bonmin::OaDecompositionBase::SubMipSolver::getLastSolution | ( | ) | [inline] |
get the solution found in last local search (return NULL if no solution).
Definition at line 54 of file BonOaDecBase.hpp.
References integerSolution_.
double Bonmin::OaDecompositionBase::SubMipSolver::getLowerBound | ( | ) | [inline] |
void Bonmin::OaDecompositionBase::SubMipSolver::performLocalSearch | ( | double | cutoff, | |
int | loglevel, | |||
double | maxTime, | |||
int | maxNodes | |||
) |
update cutoff and perform a new local search.
Definition at line 206 of file BonOaDecBase.cpp.
References cbc_, clp_, cpx_, integerSolution_, iterationCount_, lowBound_, lp_, nodeCount_, OAModel, optimal_, and strategy_.
double Bonmin::OaDecompositionBase::SubMipSolver::lowBound | ( | ) | [inline] |
bool Bonmin::OaDecompositionBase::SubMipSolver::optimal | ( | ) | [inline] |
int Bonmin::OaDecompositionBase::SubMipSolver::nodeCount | ( | ) | [inline] |
Returns number of nodes in last solve.
Definition at line 82 of file BonOaDecBase.hpp.
References nodeCount_.
int Bonmin::OaDecompositionBase::SubMipSolver::iterationCount | ( | ) | [inline] |
Returns number of simplex iterations in last solve.
Definition at line 88 of file BonOaDecBase.hpp.
References iterationCount_.
void Bonmin::OaDecompositionBase::SubMipSolver::registerOptions | ( | Ipopt::SmartPtr< Ipopt::RegisteredOptions > | roptions | ) | [inline] |
Register options for that Oa based cut generation method.
Definition at line 95 of file BonOaDecBase.hpp.
OsiSolverInterface* Bonmin::OaDecompositionBase::SubMipSolver::lp_ [private] |
lp (potentially mip solver).
Definition at line 99 of file BonOaDecBase.hpp.
Referenced by performLocalSearch(), setLpSolver(), and SubMipSolver().
OsiClpSolverInterface* Bonmin::OaDecompositionBase::SubMipSolver::clp_ [private] |
If lp solver is clp (then have to use Cbc).
Definition at line 101 of file BonOaDecBase.hpp.
Referenced by performLocalSearch(), setLpSolver(), and SubMipSolver().
OsiCpxSolverInterface* Bonmin::OaDecompositionBase::SubMipSolver::cpx_ [private] |
If lp solver is cpx this points to it.
Definition at line 103 of file BonOaDecBase.hpp.
Referenced by performLocalSearch(), setLpSolver(), and SubMipSolver().
CbcModel* Bonmin::OaDecompositionBase::SubMipSolver::cbc_ [private] |
If cbc is used pointer to CbcModel.
Definition at line 105 of file BonOaDecBase.hpp.
Referenced by performLocalSearch(), and ~SubMipSolver().
double Bonmin::OaDecompositionBase::SubMipSolver::lowBound_ [private] |
lower bound obtained
Definition at line 107 of file BonOaDecBase.hpp.
Referenced by getLowerBound(), lowBound(), performLocalSearch(), and setLpSolver().
bool Bonmin::OaDecompositionBase::SubMipSolver::optimal_ [private] |
Is optimality proven?
Definition at line 109 of file BonOaDecBase.hpp.
Referenced by optimal(), performLocalSearch(), and setLpSolver().
double* Bonmin::OaDecompositionBase::SubMipSolver::integerSolution_ [private] |
Has an integer solution? then it is here.
Definition at line 111 of file BonOaDecBase.hpp.
Referenced by getLastSolution(), performLocalSearch(), setLpSolver(), and ~SubMipSolver().
CbcStrategy* Bonmin::OaDecompositionBase::SubMipSolver::strategy_ [private] |
Strategy for solving sub mips with cbc.
Definition at line 113 of file BonOaDecBase.hpp.
Referenced by performLocalSearch(), setStrategy(), SubMipSolver(), and ~SubMipSolver().
int Bonmin::OaDecompositionBase::SubMipSolver::nodeCount_ [private] |
number of nodes in last mip solved.
Definition at line 115 of file BonOaDecBase.hpp.
Referenced by nodeCount(), and performLocalSearch().
number of simplex iteration in last mip solved.
Definition at line 117 of file BonOaDecBase.hpp.
Referenced by iterationCount(), and performLocalSearch().