13#ifndef MINOTAURCPLEXMILPENGINE_H
14#define MINOTAURCPLEXMILPENGINE_H
16#include <ilcplex/cplexx.h>
29 typedef Environment* EnvPtr;
30 typedef Problem* ProblemPtr;
31 typedef Solution* SolutionPtr;
32 typedef WarmStart* WarmStartPtr;
69 double lb,
double ub);
122 void printx(
double *x,
UInt size);
125 void removeCons(std::vector<ConstraintPtr> &delcons);
158 void writeLP(
const char *filename)
const;
168 void free_(
char **ptr);
199 std::string mipStartFile_;
202 static const std::string me_;
220 bool writeMipStarts_;
226 typedef CplexMILPEngine* CplexMILPEnginePtr;
Declare the class MILPEngine for solving MILPs and getting solution.
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
The CplexMILPEngine class can be called to solve MILP problems.
Definition: CplexMILPEngine.h:41
WarmStartPtr getWarmStartCopy()
Definition: CplexMILPEngine.h:107
void loadFromWarmStart(const WarmStartPtr)
Definition: CplexMILPEngine.h:116
ConstWarmStartPtr getWarmStart()
Definition: CplexMILPEngine.h:105
void setIterationLimit(int)
Definition: CplexMILPEngine.cpp:607
std::string getName() const
Get the name.
Definition: CplexMILPEngine.cpp:226
ConstSolutionPtr getSolutionFromPool(int index)
Get a particular solution from solution pool.
Definition: CplexMILPEngine.cpp:250
void resetIterationLimit()
Reset the iteration limit to maximum possible.
Definition: CplexMILPEngine.cpp:602
EnginePtr emptyCopy()
Return an empty CplexMILPEngine pointer.
Definition: CplexMILPEngine.cpp:220
void writeLP()
Writes an LP file in the directory of problem file.
Definition: CplexMILPEngine.cpp:1504
CplexMILPEngine(EnvPtr env)
Constructor with an environment.
Definition: CplexMILPEngine.cpp:50
void clear()
Clear the problem.
Definition: CplexMILPEngine.cpp:214
void load(ProblemPtr problem)
Definition: CplexMILPEngine.cpp:285
void setUpperCutoff(double)
Set upper cutoff for an iteration.
Definition: CplexMILPEngine.cpp:618
ConstSolutionPtr getSolution()
Get the solution obtained after solving the problem.
Definition: CplexMILPEngine.cpp:244
void writeStats(std::ostream &out) const
Write statistics.
Definition: CplexMILPEngine.cpp:1514
void enableStrBrSetup()
Make settings for strong branching.
Definition: CplexMILPEngine.h:85
void changeBound(ConstraintPtr cons, BoundType lu, double new_val)
Change a bound of a constraint.
Definition: CplexMILPEngine.cpp:154
void negateObj()
Negate the objective function. Min f is changed to Min -f.
Definition: CplexMILPEngine.cpp:591
~CplexMILPEngine()
Destroy.
Definition: CplexMILPEngine.cpp:69
void removeCons(std::vector< ConstraintPtr > &delcons)
Delete constraints from the engine.
Definition: CplexMILPEngine.cpp:596
void changeObj(FunctionPtr f, double cb)
Change objective function.
Definition: CplexMILPEngine.cpp:208
UInt getNumSols()
Get the number of solutions in solution pool after recent solve.
Definition: CplexMILPEngine.cpp:232
double getSolutionValue()
Return the solution value of the objective after solving the LP.
Definition: CplexMILPEngine.cpp:238
int setDualObjLimit(double)
Set the dual objective limit.
Definition: CplexMILPEngine.h:134
void addConstraint(ConstraintPtr)
Add a new constraint to the engine.
Definition: CplexMILPEngine.cpp:114
void changeConstraint(ConstraintPtr con, LinearFunctionPtr lf, double lb, double ub)
Change the linear function, and the bounds of a constraint.
Definition: CplexMILPEngine.cpp:195
void disableStrBrSetup()
Restore settings after strong branching.
Definition: CplexMILPEngine.h:80
void setTimeLimit(double)
Set time limit for an iteration.
Definition: CplexMILPEngine.cpp:612
EngineStatus getStatus()
Get the status of the last solve command.
Definition: CplexMILPEngine.cpp:274
EngineStatus solve()
Solve the problem that was loaded previously.
Definition: CplexMILPEngine.cpp:624
Definition: Environment.h:28
Definition: Function.h:37
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
Handler for convex constraints, based on quesada-grossmann algorithm.
Definition: STOAHandler.h:44
Definition: Solution.h:30
Definition: Variable.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
SolveStatus
Different states an algorithm like branch-and-bound can be in.
Definition: Types.h:158
Statistics.
Definition: CplexMILPEngine.h:35
double time
Total number of calls to solve.
Definition: CplexMILPEngine.h:37