|
Minotaur 0.4.1
Docs for developers
|
The OsiLPEngine engine uses the OSI interface to CLP solver. More...
#include <OsiLPEngine.h>


Public Member Functions | |
| OsiLPEngine (EnvPtr env) | |
| Constructor with an environment. | |
| ~OsiLPEngine () | |
| Destroy. | |
| void | addConstraint (ConstraintPtr) |
| Add a new constraint to the engine. | |
| void | changeBound (ConstraintPtr cons, BoundType lu, double new_val) |
| Change a bound of a constraint. | |
| void | changeBound (VariablePtr var, BoundType lu, double new_val) |
| Change a bound of a variable. | |
| void | changeBound (VariablePtr var, double new_lb, double new_ub) |
| Change both bounds of a variable. | |
| void | changeConstraint (ConstraintPtr con, LinearFunctionPtr lf, double lb, double ub) |
| Change the linear function, and the bounds of a constraint. | |
| void | changeConstraint (ConstraintPtr c, NonlinearFunctionPtr nlf) |
| Change the nonlinear function, and the bounds of a constraint. | |
| void | changeObj (FunctionPtr f, double cb) |
| Change objective function. | |
| void | clear () |
| Clear the problem. | |
| void | disableStrBrSetup () |
| Restore settings after strong branching. | |
| EnginePtr | emptyCopy () |
| Return an empty OsiLPEngine pointer. | |
| void | enableFactorization () |
| void | disableFactorization () |
| void | enableStrBrSetup () |
| Make settings for strong branching. | |
| void | fillStats (std::vector< double > &) |
| Accumulate statistics from different threads in a common data. | |
| void | getBasics (int *index) |
| void | getBInvARow (int row, double *z, double *slack) |
| void | getBasisStatus (int *cstat, int *rstat) |
| const double * | getColLower () |
| const double * | getColUpper () |
| const double * | getRowLower () |
| const double * | getRowUpper () |
| const double * | getRightHandSide () |
| int | getNumCols () |
| int | getNumRows () |
| const double * | getRowActivity () |
| const double * | getOriginalTableau () |
| const int * | getRowStarts () |
| const int * | getIndicesofVars () |
| const int * | getRowLength () |
| double | getSolutionValue () |
| Return the solution value of the objective after solving the LP. | |
| ConstSolutionPtr | getSolution () |
| Get the solution obtained after solving the problem. | |
| EngineStatus | getStatus () |
| Get the status of the last solve command. | |
| int | getIterationCount () |
| std::string | getName () const |
| Get the name. | |
| ConstWarmStartPtr | getWarmStart () |
| Return the osilp interface. For hacks. | |
| WarmStartPtr | getWarmStartCopy () |
| bool | IsOptimalBasisAvailable () |
| void | load (ProblemPtr problem) |
| void | loadFromWarmStart (const WarmStartPtr ws) |
| void | loadDualWarmStart (int size, double *dualVec) |
| void | negateObj () |
| Negate the objective function. Min f is changed to Min -f. | |
| void | removeCons (std::vector< ConstraintPtr > &delcons) |
| Delete constraints from the engine. | |
| void | resetIterationLimit () |
| Reset the iteration limit to maximum possible. | |
| void | setIterationLimit (int limit) |
| int | setDualObjLimit (double) |
| Set the dual objective limit. | |
| EngineStatus | solve () |
| void | writeLP (const char *filename) const |
| Writes an LP file of the loaded LP. | |
| void | writeStats (std::ostream &out) const |
| Write statistics. | |
Public Member Functions inherited from Minotaur::LPEngine | |
| LPEngine () | |
| Constructor. May set default parameters/options here. | |
| virtual | ~LPEngine () |
| Destructor must be implemented if memory needs to be freed. | |
Public Member Functions inherited from Minotaur::Engine | |
| Engine () | |
| Default constructor. | |
| virtual | ~Engine () |
| Destroy. | |
| virtual std::string | getStatusString () |
| Return a string that describes the status in simple words. | |
| virtual LoggerPtr | getLogger () |
| Return pointer to the log manager. | |
| virtual void | setLogger (LoggerPtr logger) |
| Set a new log manager. | |
| virtual void | setOptionsForSingleSolve () |
| virtual void | setOptionsForRepeatedSolve () |
| Set options to solve the NLP repeatedly, with few changes. | |
Additional Inherited Members | |
Protected Attributes inherited from Minotaur::Engine | |
| EngineStatus | status_ |
| Status of the last solve. | |
| LoggerPtr | logger_ |
| Keep log. | |
The OsiLPEngine engine uses the OSI interface to CLP solver.
|
virtual |
Add a new constraint to the engine.
Implements Minotaur::Engine.
|
virtual |
Change a bound of a constraint.
Implements Minotaur::Engine.
|
virtual |
Change a bound of a variable.
Implements Minotaur::Engine.
|
virtual |
Change both bounds of a variable.
Implements Minotaur::Engine.
|
virtual |
Change the nonlinear function, and the bounds of a constraint.
| [in] | c | Original constraint that is to be changed. |
| [nlf] | The new nonlinear function. |
Implements Minotaur::Engine.
|
virtual |
Change the linear function, and the bounds of a constraint.
| [in] | c | Original constraint that is to be changed. |
| [lf] | The new linear function. | |
| [lb] | The new lower bound. | |
| [ub] | The new upper bound. |
Implements Minotaur::Engine.
|
virtual |
Change objective function.
Implements Minotaur::Engine.
|
virtual |
Clear the problem.
Implements Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Restore settings after strong branching.
Implements Minotaur::Engine.
|
virtual |
Return an empty OsiLPEngine pointer.
Reimplemented from Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Make settings for strong branching.
Implements Minotaur::Engine.
|
virtual |
Accumulate statistics from different threads in a common data.
Reimplemented from Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
| int OsiLPEngine::getIterationCount | ( | ) |
Return the number of iterations it took to solve the last problem.
|
virtual |
Get the name.
Implements Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Get the solution obtained after solving the problem.
Implements Minotaur::Engine.
|
virtual |
Return the solution value of the objective after solving the LP.
Implements Minotaur::Engine.
|
virtual |
Get the status of the last solve command.
Implements Minotaur::Engine.
|
inlinevirtual |
Return the osilp interface. For hacks.
Implements Minotaur::Engine.
|
virtual |
Get a full copy of warm start information from the engine. Does not change even if the engine starts solving something else later on.
Implements Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Load the problem into the engine. We create arrays of variables and constraints, the A matrix, rhs, objective etc from the problem and initialize the LP solver.
Implements Minotaur::Engine.
|
virtual |
Reimplemented from Minotaur::LPEngine.
|
virtual |
Use warm start information for solving the next problem. May Create a copy of WarmStart and use the copy inside the engine; the copy (but not the original) gets updated after solving a relaxation.
Implements Minotaur::Engine.
|
virtual |
Negate the objective function. Min f is changed to Min -f.
Implements Minotaur::Engine.
|
virtual |
Delete constraints from the engine.
| [in] | delcons | A vector of constraint pointers that should be deleted from the engine. |
Implements Minotaur::Engine.
|
virtual |
Reset the iteration limit to maximum possible.
Implements Minotaur::Engine.
|
inlinevirtual |
Set the dual objective limit.
Implements Minotaur::Engine.
|
virtual |
Set a limit on number of iterations. For strong-branching, for instance.
Implements Minotaur::Engine.
|
virtual |
Solve the problem that was loaded. Calls resolve() function of Osi. The resolve() function `‘smartly’' decides what method of clp should be called.
Implements Minotaur::Engine.
|
virtual |
Write statistics.
Reimplemented from Minotaur::Engine.