13#ifndef MINOTAUROSILPENGINE_H
14#define MINOTAUROSILPENGINE_H
20class OsiSolverInterface;
29typedef Environment *EnvPtr;
30typedef Problem *ProblemPtr;
31typedef Solution *SolutionPtr;
32typedef WarmStart *WarmStartPtr;
83 void write(std::ostream &out)
const;
90 CoinWarmStart *coinWs_;
141 void enableFactorization();
143 void disableFactorization();
152 void getBasics(
int *index);
159 void getBInvARow(
int row,
double *z,
double *slack);
170 void getBasisStatus(
int *cstat,
int *rstat);
173 const double *getColLower();
176 const double *getColUpper();
179 const double *getRowLower();
182 const double *getRowUpper();
185 const double *getRightHandSide();
194 const double *getRowActivity();
197 const double *getOriginalTableau();
200 const int *getRowStarts();
203 const int *getIndicesofVars();
206 const int *getRowLength();
232 assert(!
"not implemented!");
240 bool IsOptimalBasisAvailable();
253 void loadDualWarmStart(
int size,
double *dualVec);
259 void removeCons(std::vector<ConstraintPtr> &delcons);
278 void writeLP(
const char *filename)
const;
295 OsiLPEngineName eName_;
301 static const std::string me_;
310 OsiSolverInterface *osilp_;
331 OsiSolverInterface *newSolver_(OsiLPEngineName ename);
334typedef OsiLPEngine *OsiLPEnginePtr;
Declare the class LPEngine for solving LPs and getting solution.
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
Definition: Environment.h:28
Definition: Function.h:37
Definition: LPEngine.h:29
The base class linear function is of the form c'x.
Definition: LinearFunction.h:31
Base class for nonlinear functions.
Definition: NonlinearFunction.h:31
The OsiLPEngine engine uses the OSI interface to CLP solver.
Definition: OsiLPEngine.h:102
void addConstraint(ConstraintPtr)
Add a new constraint to the engine.
Definition: OsiLPEngine.cpp:170
int setDualObjLimit(double)
Set the dual objective limit.
Definition: OsiLPEngine.h:268
~OsiLPEngine()
Destroy.
Definition: OsiLPEngine.cpp:156
void removeCons(std::vector< ConstraintPtr > &delcons)
Delete constraints from the engine.
Definition: OsiLPEngine.cpp:642
void changeBound(ConstraintPtr cons, BoundType lu, double new_val)
Change a bound of a constraint.
Definition: OsiLPEngine.cpp:191
void loadFromWarmStart(const WarmStartPtr ws)
Definition: OsiLPEngine.cpp:587
void writeLP(const char *filename) const
Writes an LP file of the loaded LP.
Definition: OsiLPEngine.cpp:762
ConstWarmStartPtr getWarmStart()
Return the osilp interface. For hacks.
Definition: OsiLPEngine.h:231
EnginePtr emptyCopy()
Return an empty OsiLPEngine pointer.
Definition: OsiLPEngine.cpp:315
int getIterationCount()
Definition: OsiLPEngine.cpp:329
void writeStats(std::ostream &out) const
Write statistics.
Definition: OsiLPEngine.cpp:767
void changeObj(FunctionPtr f, double cb)
Change objective function.
Definition: OsiLPEngine.cpp:272
void disableStrBrSetup()
Restore settings after strong branching.
Definition: OsiLPEngine.cpp:306
double getSolutionValue()
Return the solution value of the objective after solving the LP.
Definition: OsiLPEngine.cpp:436
void fillStats(std::vector< double > &)
Accumulate statistics from different threads in a common data.
Definition: OsiLPEngine.cpp:334
OsiLPEngine(EnvPtr env)
Constructor with an environment.
Definition: OsiLPEngine.cpp:109
void resetIterationLimit()
Reset the iteration limit to maximum possible.
Definition: OsiLPEngine.cpp:653
void changeConstraint(ConstraintPtr con, LinearFunctionPtr lf, double lb, double ub)
Change the linear function, and the bounds of a constraint.
Definition: OsiLPEngine.cpp:231
EngineStatus solve()
Definition: OsiLPEngine.cpp:665
std::string getName() const
Get the name.
Definition: OsiLPEngine.cpp:431
void enableStrBrSetup()
Make settings for strong branching.
Definition: OsiLPEngine.cpp:320
void setIterationLimit(int limit)
Definition: OsiLPEngine.cpp:659
EngineStatus getStatus()
Get the status of the last solve command.
Definition: OsiLPEngine.cpp:451
void load(ProblemPtr problem)
Definition: OsiLPEngine.cpp:473
WarmStartPtr getWarmStartCopy()
Definition: OsiLPEngine.cpp:456
void clear()
Clear the problem.
Definition: OsiLPEngine.cpp:288
ConstSolutionPtr getSolution()
Get the solution obtained after solving the problem.
Definition: OsiLPEngine.cpp:441
void negateObj()
Negate the objective function. Min f is changed to Min -f.
Definition: OsiLPEngine.cpp:603
Actual implementation of warm start for OsiLP Engine.
Definition: OsiLPEngine.h:55
CoinWarmStart * getCoinWarmStart() const
Get the warm-start description.
Definition: OsiLPEngine.cpp:78
void write(std::ostream &out) const
Write to an output stream.
Definition: OsiLPEngine.cpp:101
bool hasInfo()
Definition: OsiLPEngine.cpp:69
OsiLPWarmStart()
Default constructor.
Definition: OsiLPEngine.cpp:55
void setCoinWarmStart(CoinWarmStart *coin_ws, bool must_delete)
Definition: OsiLPEngine.cpp:83
void setDualWarmStart(int size, const double *dual)
Definition: OsiLPEngine.cpp:95
~OsiLPWarmStart()
Destroy.
Definition: OsiLPEngine.cpp:61
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
Statistics.
Definition: OsiLPEngine.h:35
double time
Calls to solve while strong branching.
Definition: OsiLPEngine.h:38
UInt strIters
Sum of number of iterations in all calls.
Definition: OsiLPEngine.h:41
UInt iters
time taken in strong branching alone.
Definition: OsiLPEngine.h:40
UInt strCalls
Total number of calls to solve.
Definition: OsiLPEngine.h:37
double strTime
Sum of time taken in all calls to solve.
Definition: OsiLPEngine.h:39