#include <BonOaDecBase.hpp>
Inheritance diagram for Bonmin::OaDecompositionBase:
Public Member Functions | |
OaDecompositionBase (BabSetupBase &b, bool leaveSiUnchanged, bool reassignLpsolver) | |
New usefull constructor. | |
OaDecompositionBase (const OaDecompositionBase ©) | |
Copy constructor. | |
virtual | ~OaDecompositionBase () |
Destructor. | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const |
Standard cut generation methods. | |
void | assignNlpInterface (OsiTMINLPInterface *nlp) |
Assign an OsiTMINLPInterface. | |
void | assignLpInterface (OsiSolverInterface *si) |
Assign an OsiTMINLPInterface. | |
bool | reassignLpsolver () |
void | setObjects (OsiObject **objects, int nObjects) |
Set objects. | |
void | setLeaveSiUnchanged (bool yesno) |
Set whether to leave the solverinterface unchanged. | |
Parameters & | parameter () |
const Parameters & | parameter () const |
void | setLogLevel (int level) |
void | setReassignLpSolver (bool v) |
void | passInMessageHandler (CoinMessageHandler *handler) |
Protected Member Functions | |
void | setupMipSolver (BabSetupBase &b, const std::string &prefix) |
virtual double | performOa (OsiCuts &cs, solverManip &lpManip, BabInfo *babInfo, double &, const CglTreeInfo &info) const =0 |
virtual method which performs the OA algorithm by modifying lp and nlp. | |
virtual bool | doLocalSearch (BabInfo *babInfo) const =0 |
virutal method to decide if local search is performed | |
Protected helper functions | |
bool | post_nlp_solve (BabInfo *babInfo, double cutoff) const |
Solve the nlp and do output. | |
Protected Attributes | |
Protected members | |
OsiTMINLPInterface * | nlp_ |
Pointer to nlp interface. | |
BabSetupBase * | s_ |
Pointer to setup. | |
int | nSolve_ |
Number of nlp solved done. | |
OsiSolverInterface * | lp_ |
A linear solver. | |
OsiObject ** | objects_ |
Some objects the feasiblitiy of which to verify. | |
int | nObjects_ |
Number of objects.*/. | |
int | nLocalSearch_ |
number of local searches performed | |
CoinMessageHandler * | handler_ |
messages handler. | |
CoinMessages | messages_ |
Messages for OA. | |
bool | leaveSiUnchanged_ |
Wether or not we should remove cuts at the end of the procedure. | |
bool | reassignLpsolver_ |
Do we need to reassign the lp solver with Cbc. | |
double | timeBegin_ |
time of construction | |
int | numSols_ |
number of solutions found by OA_decomposition. | |
Parameters | parameters_ |
Parameters. | |
OsiCuts | savedCuts_ |
Saved cuts: in some cases when using OA to check feasible solution algorithm may loop because Cbc removes inactive cuts. | |
int | currentNodeNumber_ |
Store the current node number. | |
Classes | |
struct | Parameters |
Parameters for algorithm. More... | |
class | solverManip |
Small class to manipulatee various things in an OsiSolverInterface and restore them. More... |
Definition at line 27 of file BonOaDecBase.hpp.
Bonmin::OaDecompositionBase::OaDecompositionBase | ( | BabSetupBase & | b, | |
bool | leaveSiUnchanged, | |||
bool | reassignLpsolver | |||
) |
New usefull constructor.
Bonmin::OaDecompositionBase::OaDecompositionBase | ( | const OaDecompositionBase & | copy | ) |
Copy constructor.
virtual Bonmin::OaDecompositionBase::~OaDecompositionBase | ( | ) | [virtual] |
Destructor.
virtual void Bonmin::OaDecompositionBase::generateCuts | ( | const OsiSolverInterface & | si, | |
OsiCuts & | cs, | |||
const CglTreeInfo | info = CglTreeInfo() | |||
) | const [virtual] |
void Bonmin::OaDecompositionBase::assignNlpInterface | ( | OsiTMINLPInterface * | nlp | ) | [inline] |
void Bonmin::OaDecompositionBase::assignLpInterface | ( | OsiSolverInterface * | si | ) | [inline] |
bool Bonmin::OaDecompositionBase::reassignLpsolver | ( | ) | [inline] |
void Bonmin::OaDecompositionBase::setObjects | ( | OsiObject ** | objects, | |
int | nObjects | |||
) | [inline] |
void Bonmin::OaDecompositionBase::setLeaveSiUnchanged | ( | bool | yesno | ) | [inline] |
Set whether to leave the solverinterface unchanged.
Definition at line 140 of file BonOaDecBase.hpp.
References leaveSiUnchanged_.
Parameters& Bonmin::OaDecompositionBase::parameter | ( | ) | [inline] |
const Parameters& Bonmin::OaDecompositionBase::parameter | ( | ) | const [inline] |
void Bonmin::OaDecompositionBase::setLogLevel | ( | int | level | ) | [inline] |
void Bonmin::OaDecompositionBase::setReassignLpSolver | ( | bool | v | ) | [inline] |
void Bonmin::OaDecompositionBase::passInMessageHandler | ( | CoinMessageHandler * | handler | ) |
void Bonmin::OaDecompositionBase::setupMipSolver | ( | BabSetupBase & | b, | |
const std::string & | prefix | |||
) | [protected] |
bool Bonmin::OaDecompositionBase::post_nlp_solve | ( | BabInfo * | babInfo, | |
double | cutoff | |||
) | const [protected] |
Solve the nlp and do output.
virtual double Bonmin::OaDecompositionBase::performOa | ( | OsiCuts & | cs, | |
solverManip & | lpManip, | |||
BabInfo * | babInfo, | |||
double & | , | |||
const CglTreeInfo & | info | |||
) | const [protected, pure virtual] |
virtual method which performs the OA algorithm by modifying lp and nlp.
virtual bool Bonmin::OaDecompositionBase::doLocalSearch | ( | BabInfo * | babInfo | ) | const [protected, pure virtual] |
virutal method to decide if local search is performed
Implemented in Bonmin::EcpCuts, Bonmin::MinlpFeasPump, Bonmin::OACutGenerator2, and Bonmin::OaFeasibilityChecker.
OsiTMINLPInterface* Bonmin::OaDecompositionBase::nlp_ [mutable, protected] |
Pointer to nlp interface.
Definition at line 238 of file BonOaDecBase.hpp.
Referenced by assignNlpInterface().
BabSetupBase* Bonmin::OaDecompositionBase::s_ [protected] |
int Bonmin::OaDecompositionBase::nSolve_ [mutable, protected] |
OsiSolverInterface* Bonmin::OaDecompositionBase::lp_ [mutable, protected] |
A linear solver.
Definition at line 244 of file BonOaDecBase.hpp.
Referenced by assignLpInterface().
OsiObject* * Bonmin::OaDecompositionBase::objects_ [protected] |
Some objects the feasiblitiy of which to verify.
Definition at line 246 of file BonOaDecBase.hpp.
Referenced by setObjects().
int Bonmin::OaDecompositionBase::nObjects_ [protected] |
int Bonmin::OaDecompositionBase::nLocalSearch_ [mutable, protected] |
CoinMessageHandler* Bonmin::OaDecompositionBase::handler_ [protected] |
CoinMessages Bonmin::OaDecompositionBase::messages_ [protected] |
bool Bonmin::OaDecompositionBase::leaveSiUnchanged_ [protected] |
Wether or not we should remove cuts at the end of the procedure.
Definition at line 256 of file BonOaDecBase.hpp.
Referenced by setLeaveSiUnchanged().
bool Bonmin::OaDecompositionBase::reassignLpsolver_ [protected] |
Do we need to reassign the lp solver with Cbc.
Definition at line 258 of file BonOaDecBase.hpp.
Referenced by reassignLpsolver(), and setReassignLpSolver().
double Bonmin::OaDecompositionBase::timeBegin_ [protected] |
int Bonmin::OaDecompositionBase::numSols_ [mutable, protected] |
Parameters Bonmin::OaDecompositionBase::parameters_ [protected] |
Definition at line 265 of file BonOaDecBase.hpp.
Referenced by parameter(), Bonmin::OACutGenerator2::setStrategy(), and Bonmin::MinlpFeasPump::setStrategy().
OsiCuts Bonmin::OaDecompositionBase::savedCuts_ [mutable, protected] |
Saved cuts: in some cases when using OA to check feasible solution algorithm may loop because Cbc removes inactive cuts.
To overcome this we can impose that no OA cut can be discarded by Cbc but this consumes too much memory in some cases. Here we do it another way: cuts generated at current node are saved if algorithm seems to enter a loop we impose the needed cuts to be kept.
Definition at line 270 of file BonOaDecBase.hpp.
int Bonmin::OaDecompositionBase::currentNodeNumber_ [mutable, protected] |