Classes | Public Member Functions | Protected Member Functions | List of all members
Bonmin::OaDecompositionBase Class Referenceabstract

Base class for OA algorithms. More...

#include <BonOaDecBase.hpp>

Inheritance diagram for Bonmin::OaDecompositionBase:
Inheritance graph
[legend]
Collaboration diagram for Bonmin::OaDecompositionBase:
Collaboration graph
[legend]

Classes

struct  Parameters
 Parameters for algorithm. More...
 
class  solverManip
 Small class to manipulatee various things in an OsiSolverInterface and restore them. More...
 

Public Member Functions

 OaDecompositionBase (BabSetupBase &b, bool leaveSiUnchanged, bool reassignLpsolver)
 New usefull constructor. More...
 
 OaDecompositionBase (const OaDecompositionBase &copy)
 Copy constructor. More...
 
virtual ~OaDecompositionBase ()
 Destructor. More...
 
virtual void generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
 Standard cut generation methods. More...
 
void assignNlpInterface (OsiTMINLPInterface *nlp)
 Assign an OsiTMINLPInterface. More...
 
void assignLpInterface (OsiSolverInterface *si)
 Assign an OsiTMINLPInterface. More...
 
bool reassignLpsolver ()
 
void setObjects (OsiObject **objects, int nObjects)
 Set objects. More...
 
void setLeaveSiUnchanged (bool yesno)
 Set whether to leave the solverinterface unchanged. More...
 
Parametersparameter ()
 
const Parametersparameter () 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. More...
 
virtual bool doLocalSearch (BabInfo *babInfo) const =0
 virutal method to decide if local search is performed More...
 
Protected helper functions
bool post_nlp_solve (BabInfo *babInfo, double cutoff) const
 Solve the nlp and do output. More...
 

Protected Attributes

Protected members
OsiTMINLPInterfacenlp_
 Pointer to nlp interface. More...
 
BabSetupBases_
 Pointer to setup. More...
 
int nSolve_
 Number of nlp solved done. More...
 
OsiSolverInterface * lp_
 A linear solver. More...
 
OsiObject ** objects_
 Some objects the feasiblitiy of which to verify. More...
 
int nObjects_
 Number of objects.*/. More...
 
int nLocalSearch_
 number of local searches performed More...
 
CoinMessageHandler * handler_
 messages handler. More...
 
CoinMessages messages_
 Messages for OA. More...
 
bool leaveSiUnchanged_
 Wether or not we should remove cuts at the end of the procedure. More...
 
bool reassignLpsolver_
 Do we need to reassign the lp solver with Cbc. More...
 
double timeBegin_
 time of construction More...
 
int numSols_
 number of solutions found by OA_decomposition. More...
 
Parameters parameters_
 Parameters. More...
 
OsiCuts savedCuts_
 Saved cuts: in some cases when using OA to check feasible solution algorithm may loop because Cbc removes inactive cuts. More...
 
int currentNodeNumber_
 Store the current node number. More...
 

Detailed Description

Base class for OA algorithms.

Definition at line 27 of file BonOaDecBase.hpp.

Constructor & Destructor Documentation

Bonmin::OaDecompositionBase::OaDecompositionBase ( BabSetupBase b,
bool  leaveSiUnchanged,
bool  reassignLpsolver 
)

New usefull constructor.

Definition at line 38 of file BonOaDecBase.cpp.

Bonmin::OaDecompositionBase::OaDecompositionBase ( const OaDecompositionBase copy)

Copy constructor.

Definition at line 76 of file BonOaDecBase.cpp.

Bonmin::OaDecompositionBase::~OaDecompositionBase ( )
virtual

Destructor.

Definition at line 112 of file BonOaDecBase.cpp.

Member Function Documentation

void Bonmin::OaDecompositionBase::generateCuts ( const OsiSolverInterface &  si,
OsiCuts &  cs,
const CglTreeInfo  info = CglTreeInfo() 
)
virtual

Standard cut generation methods.

Definition at line 243 of file BonOaDecBase.cpp.

void Bonmin::OaDecompositionBase::assignNlpInterface ( OsiTMINLPInterface nlp)
inline

Assign an OsiTMINLPInterface.

Definition at line 118 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::assignLpInterface ( OsiSolverInterface *  si)
inline

Assign an OsiTMINLPInterface.

Definition at line 124 of file BonOaDecBase.hpp.

bool Bonmin::OaDecompositionBase::reassignLpsolver ( )
inline

Definition at line 129 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::setObjects ( OsiObject **  objects,
int  nObjects 
)
inline

Set objects.

Definition at line 134 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::setLeaveSiUnchanged ( bool  yesno)
inline

Set whether to leave the solverinterface unchanged.

Definition at line 140 of file BonOaDecBase.hpp.

Parameters& Bonmin::OaDecompositionBase::parameter ( )
inline

Definition at line 200 of file BonOaDecBase.hpp.

const Parameters& Bonmin::OaDecompositionBase::parameter ( ) const
inline

Definition at line 205 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::setLogLevel ( int  level)
inline

Definition at line 210 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::setReassignLpSolver ( bool  v)
inline

Definition at line 215 of file BonOaDecBase.hpp.

void Bonmin::OaDecompositionBase::passInMessageHandler ( CoinMessageHandler *  handler)

Definition at line 233 of file BonOaDecBase.cpp.

void Bonmin::OaDecompositionBase::setupMipSolver ( BabSetupBase b,
const std::string &  prefix 
)
protected

Definition at line 409 of file BonOaDecBase.cpp.

bool Bonmin::OaDecompositionBase::post_nlp_solve ( BabInfo babInfo,
double  cutoff 
) const
protected

Solve the nlp and do output.

Do update after an nlp has been solved.

Returns
true if feasible

Definition at line 364 of file BonOaDecBase.cpp.

virtual double Bonmin::OaDecompositionBase::performOa ( OsiCuts &  cs,
solverManip lpManip,
BabInfo babInfo,
double &  ,
const CglTreeInfo &  info 
) const
protectedpure virtual

virtual method which performs the OA algorithm by modifying lp and nlp.

Implemented in Bonmin::EcpCuts, Bonmin::OACutGenerator2, Bonmin::MinlpFeasPump, and Bonmin::OaFeasibilityChecker.

virtual bool Bonmin::OaDecompositionBase::doLocalSearch ( BabInfo babInfo) const
protectedpure virtual

virutal method to decide if local search is performed

Implemented in Bonmin::EcpCuts, Bonmin::OACutGenerator2, Bonmin::MinlpFeasPump, and Bonmin::OaFeasibilityChecker.

Member Data Documentation

OsiTMINLPInterface* Bonmin::OaDecompositionBase::nlp_
mutableprotected

Pointer to nlp interface.

Definition at line 238 of file BonOaDecBase.hpp.

BabSetupBase* Bonmin::OaDecompositionBase::s_
protected

Pointer to setup.

Definition at line 240 of file BonOaDecBase.hpp.

int Bonmin::OaDecompositionBase::nSolve_
mutableprotected

Number of nlp solved done.

Definition at line 242 of file BonOaDecBase.hpp.

OsiSolverInterface* Bonmin::OaDecompositionBase::lp_
mutableprotected

A linear solver.

Definition at line 244 of file BonOaDecBase.hpp.

OsiObject* * Bonmin::OaDecompositionBase::objects_
protected

Some objects the feasiblitiy of which to verify.

Definition at line 246 of file BonOaDecBase.hpp.

int Bonmin::OaDecompositionBase::nObjects_
protected

Number of objects.*/.

Definition at line 248 of file BonOaDecBase.hpp.

int Bonmin::OaDecompositionBase::nLocalSearch_
mutableprotected

number of local searches performed

Definition at line 250 of file BonOaDecBase.hpp.

CoinMessageHandler* Bonmin::OaDecompositionBase::handler_
protected

messages handler.

Definition at line 252 of file BonOaDecBase.hpp.

CoinMessages Bonmin::OaDecompositionBase::messages_
protected

Messages for OA.

Definition at line 254 of file BonOaDecBase.hpp.

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.

bool Bonmin::OaDecompositionBase::reassignLpsolver_
protected

Do we need to reassign the lp solver with Cbc.

Definition at line 258 of file BonOaDecBase.hpp.

double Bonmin::OaDecompositionBase::timeBegin_
protected

time of construction

Definition at line 260 of file BonOaDecBase.hpp.

int Bonmin::OaDecompositionBase::numSols_
mutableprotected

number of solutions found by OA_decomposition.

Definition at line 262 of file BonOaDecBase.hpp.

Parameters Bonmin::OaDecompositionBase::parameters_
protected

Parameters.

Definition at line 265 of file BonOaDecBase.hpp.

OsiCuts Bonmin::OaDecompositionBase::savedCuts_
mutableprotected

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_
mutableprotected

Store the current node number.

Definition at line 272 of file BonOaDecBase.hpp.


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