13#ifndef MINOTAURCBCENGINE_H
14#define MINOTAURCBCENGINE_H
18class OsiSolverInterface;
27 typedef Environment* EnvPtr;
28 typedef Problem* ProblemPtr;
29 typedef Solution* SolutionPtr;
30 typedef WarmStart* WarmStartPtr;
61 double lb,
double ub);
114 void removeCons(std::vector<ConstraintPtr> &delcons);
139 void writeLP(
const char *filename)
const;
159 static const std::string me_;
167 OsiSolverInterface *osilp_;
185 typedef CbcEngine* CbcEnginePtr;
Declare the class MILPEngine for solving MILPs and getting solution.
The CbcEngine class can be called to solve MILP problems.
Definition CbcEngine.h:39
ConstSolutionPtr getSolution()
Get the solution obtained after solving the problem.
Definition CbcEngine.cpp:142
EngineStatus getStatus()
Get the status of the last solve command.
Definition CbcEngine.cpp:148
EngineStatus solve()
Definition CbcEngine.cpp:319
void loadFromWarmStart(const WarmStartPtr)
Definition CbcEngine.h:108
UInt getNumSols()
Get the number of solutions in the solution pool of Cbc.
Definition CbcEngine.h:80
void resetIterationLimit()
Reset the iteration limit to maximum possible.
Definition CbcEngine.cpp:299
void changeBound(ConstraintPtr cons, BoundType lu, double new_val)
Change a bound of a constraint.
Definition CbcEngine.cpp:83
void setIterationLimit(int limit)
Definition CbcEngine.cpp:304
EnginePtr emptyCopy()
Return an empty CbcEngine pointer.
Definition CbcEngine.cpp:124
ConstSolutionPtr getSolutionFromPool(int)
Get a particular solution from solution pool.
Definition CbcEngine.h:89
void enableStrBrSetup()
Make settings for strong branching.
Definition CbcEngine.h:77
void removeCons(std::vector< ConstraintPtr > &delcons)
Delete constraints from the engine.
Definition CbcEngine.cpp:293
~CbcEngine()
Destroy.
Definition CbcEngine.cpp:57
double getSolutionValue()
Return the solution value of the objective after solving the LP.
Definition CbcEngine.cpp:136
void writeLP(const char *filename) const
Writes an LP file of the loaded LP.
Definition CbcEngine.cpp:383
void setTimeLimit(double)
Set time limit for an iteration.
Definition CbcEngine.cpp:309
void changeConstraint(ConstraintPtr con, LinearFunctionPtr lf, double lb, double ub)
Change the linear function, and the bounds of a constraint.
Definition CbcEngine.cpp:98
WarmStartPtr getWarmStartCopy()
Definition CbcEngine.h:99
void negateObj()
Negate the objective function. Min f is changed to Min -f.
Definition CbcEngine.cpp:288
void clear()
Clear the problem.
Definition CbcEngine.cpp:115
void load(ProblemPtr problem)
Definition CbcEngine.cpp:154
void changeObj(FunctionPtr f, double cb)
Change objective function.
Definition CbcEngine.cpp:110
int setDualObjLimit(double)
Set the dual objective limit.
Definition CbcEngine.h:123
void disableStrBrSetup()
Restore settings after strong branching.
Definition CbcEngine.h:72
void writeStats(std::ostream &out) const
Write statistics.
Definition CbcEngine.cpp:388
void setUpperCutoff(double)
Set upper cutoff for an iteration.
Definition CbcEngine.cpp:314
void addConstraint(ConstraintPtr)
Add a new constraint to the engine.
Definition CbcEngine.cpp:78
ConstWarmStartPtr getWarmStart()
Definition CbcEngine.h:97
std::string getName() const
Get the name.
Definition CbcEngine.cpp:130
The Constraint class is used to manage a constraint.
Definition Constraint.h:61
Definition Environment.h:28
The base class linear function is of the form c'x.
Definition LinearFunction.h:31
Definition MILPEngine.h:28
Base class for nonlinear functions.
Definition NonlinearFunction.h:31
Definition WarmStart.h:45
Definition ActiveNodeStore.h:20
BoundType
Different types of variable-bounds.
Definition Types.h:131
unsigned int UInt
Unsigned integer.
Definition Types.h:30
EngineStatus
Different status that an external engine may report.
Definition Types.h:176
Statistics.
Definition CbcEngine.h:33
double time
Total number of calls to solve.
Definition CbcEngine.h:35