9#ifndef BonOaDecBase_HPP
10#define BonOaDecBase_HPP
15#include "CbcModel.hpp"
17#include "CbcStrategy.hpp"
39 bool saveBasis=
true,
bool saveBounds=
false,
40 bool saveCutoff =
false,
bool resolve=
true);
66 int initialNumberRows_;
94 const double * siColLower_;
96 const double * siColUpper_;
179 if (strategy_)
delete strategy_;
185 if (strategy_)
delete strategy_;
196 CbcStrategy * strategy_;
281 void printEndOfProcedureDebugMessage(
const OsiCuts &cs,
287 std::ostream & os)
const;
Bonmin class for passing info between components of branch-and-cuts.
A class to have all elements necessary to setup a branch-and-bound.
Small class to manipulatee various things in an OsiSolverInterface and restore them.
void setObjects(OsiObject **objects, int nObjects)
Set objects.
OsiSolverInterface * si()
Get pointer to solver interface.
void restore()
Restore solver.
~solverManip()
Destructor.
solverManip(OsiSolverInterface *si, bool saveNumRows=true, bool saveBasis=true, bool saveBounds=false, bool saveCutoff=false, bool resolve=true)
Constructor.
solverManip(const OsiSolverInterface &si)
Constructor which clone an other interface.
Base class for OA algorithms.
int currentNodeNumber_
Store the current node number.
CoinMessages messages_
Messages for OA.
void setLogLevel(int level)
int nSolve_
Number of nlp solved done.
OsiTMINLPInterface * nlp_
Pointer to nlp interface.
void assignNlpInterface(OsiTMINLPInterface *nlp)
Assign an OsiTMINLPInterface.
OaDecompositionBase(const OaDecompositionBase ©)
Copy constructor.
int nObjects_
Number of objects.*/.
virtual bool doLocalSearch(BabInfo *babInfo) const =0
virutal method to decide if local search is performed
void setupMipSolver(BabSetupBase &b, const std::string &prefix)
double timeBegin_
time of construction
CoinMessageHandler * handler_
messages handler.
Parameters parameters_
Parameters.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Standard cut generation methods.
void setLeaveSiUnchanged(bool yesno)
Set whether to leave the solverinterface unchanged.
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.
void setObjects(OsiObject **objects, int nObjects)
Set objects.
void assignLpInterface(OsiSolverInterface *si)
Assign an OsiTMINLPInterface.
BabSetupBase * s_
Pointer to setup.
void passInMessageHandler(CoinMessageHandler *handler)
virtual ~OaDecompositionBase()
Destructor.
OsiCuts savedCuts_
Saved cuts: in some cases when using OA to check feasible solution algorithm may loop because Cbc rem...
bool leaveSiUnchanged_
Wether or not we should remove cuts at the end of the procedure.
OsiObject ** objects_
Some objects the feasiblitiy of which to verify.
bool post_nlp_solve(BabInfo *babInfo, double cutoff) const
Solve the nlp and do output.
int numSols_
number of solutions found by OA_decomposition.
int nLocalSearch_
number of local searches performed
OsiSolverInterface * lp_
A linear solver.
OaDecompositionBase(BabSetupBase &b, bool leaveSiUnchanged, bool reassignLpsolver)
New usefull constructor.
bool reassignLpsolver_
Do we need to reassign the lp solver with Cbc.
void setReassignLpSolver(bool v)
const Parameters & parameter() const
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
void setLogLevel(int value)
(C) Copyright International Business Machines Corporation 2007
Parameters for algorithm.
double gap_tol_
setting for gap tolerance.
void setStrategy(const CbcStrategy &strategy)
Strategy to apply when using Cbc as MILP sub-solver.
double logFrequency_
Frequency of log.
const CbcStrategy * strategy() const
Parameters(const Parameters &other)
Copy constructor.
bool addOnlyViolated_
Add only violated OA inequalities.
Parameters()
Constructor with default values.
double cbcCutoffIncrement_
cutoff min increase (has to be intialized trhough Cbc)
double maxLocalSearchTime_
maximum time for local searches
int subMilpLogLevel_
sub milp log level.
int maxLocalSearch_
Total max number of local searches.
double cbcIntegerTolerance_
integer tolerance (has to be the same as Cbc's)
int maxSols_
maximum number of solutions
bool global_
Add cuts as global.