This class implements the common interface of the CPLEX LP and MIP solvers.
|
const CplexEnv & | env () const |
| Returns the used CplexEnv instance.
|
|
const cpxenv * | cplexEnv () const |
| Returns the const cpxenv pointer.
|
|
cpxenv * | cplexEnv () |
| Returns the const cpxenv pointer.
|
|
cpxlp * | cplexLp () |
| Returns the cplex problem object.
|
|
const cpxlp * | cplexLp () const |
| Returns the cplex problem object.
|
|
void | write (std::string file, std::string format="MPS") const |
| Write the problem or the solution to a file in the given format.
|
|
virtual | ~LpBase () |
| Virtual destructor.
|
|
const char * | solverName () const |
| Gives back the name of the solver.
|
|
Col | addCol () |
| Add a new empty column (i.e a new variable) to the LP.
|
|
template<class T > |
int | addColSet (T &t) |
| Adds several new columns (i.e variables) at once.
|
|
void | col (Col c, const DualExpr &e) |
| Set a column (i.e a dual constraint) of the LP.
|
|
DualExpr | col (Col c) const |
| Get a column (i.e a dual constraint) of the LP.
|
|
Col | addCol (const DualExpr &e, Value o=0) |
| Add a new column to the LP.
|
|
Row | addRow () |
| Add a new empty row (i.e a new constraint) to the LP.
|
|
template<class T > |
int | addRowSet (T &t) |
| Add several new rows (i.e constraints) at once.
|
|
void | row (Row r, Value l, const Expr &e, Value u) |
| Set a row (i.e a constraint) of the LP.
|
|
void | row (Row r, const Constr &c) |
| Set a row (i.e a constraint) of the LP.
|
|
Expr | row (Row r) const |
| Get a row (i.e a constraint) of the LP.
|
|
Row | addRow (Value l, const Expr &e, Value u) |
| Add a new row (i.e a new constraint) to the LP.
|
|
Row | addRow (const Constr &c) |
| Add a new row (i.e a new constraint) to the LP.
|
|
void | erase (Col c) |
| Erase a column (i.e a variable) from the LP.
|
|
void | erase (Row r) |
| Erase a row (i.e a constraint) from the LP.
|
|
std::string | colName (Col c) const |
| Get the name of a column.
|
|
void | colName (Col c, const std::string &name) |
| Set the name of a column.
|
|
Col | colByName (const std::string &name) const |
| Get the column by its name.
|
|
std::string | rowName (Row r) const |
| Get the name of a row.
|
|
void | rowName (Row r, const std::string &name) |
| Set the name of a row.
|
|
Row | rowByName (const std::string &name) const |
| Get the row by its name.
|
|
void | coeff (Row r, Col c, Value val) |
| Set an element of the coefficient matrix of the LP.
|
|
Value | coeff (Row r, Col c) const |
| Get an element of the coefficient matrix of the LP.
|
|
void | colLowerBound (Col c, Value value) |
| Set the lower bound of a column (i.e a variable)
|
|
Value | colLowerBound (Col c) const |
| Get the lower bound of a column (i.e a variable)
|
|
template<class T > |
void | colLowerBound (T &t, Value value) |
| Set the lower bound of several columns (i.e variables) at once.
|
|
void | colUpperBound (Col c, Value value) |
| Set the upper bound of a column (i.e a variable)
|
|
Value | colUpperBound (Col c) const |
| Get the upper bound of a column (i.e a variable)
|
|
template<class T > |
void | colUpperBound (T &t, Value value) |
| Set the upper bound of several columns (i.e variables) at once.
|
|
void | colBounds (Col c, Value lower, Value upper) |
| Set the lower and the upper bounds of a column (i.e a variable)
|
|
template<class T > |
void | colBounds (T &t, Value lower, Value upper) |
| Set the lower and the upper bound of several columns (i.e variables) at once.
|
|
void | rowLowerBound (Row r, Value value) |
| Set the lower bound of a row (i.e a constraint)
|
|
Value | rowLowerBound (Row r) const |
| Get the lower bound of a row (i.e a constraint)
|
|
void | rowUpperBound (Row r, Value value) |
| Set the upper bound of a row (i.e a constraint)
|
|
Value | rowUpperBound (Row r) const |
| Get the upper bound of a row (i.e a constraint)
|
|
void | objCoeff (Col c, Value v) |
| Set an element of the objective function.
|
|
Value | objCoeff (Col c) const |
| Get an element of the objective function.
|
|
void | obj (const Expr &e) |
| Set the objective function.
|
|
Expr | obj () const |
| Get the objective function.
|
|
void | sense (Sense sense) |
| Set the direction of optimization.
|
|
Sense | sense () const |
| Query the direction of the optimization.
|
|
void | max () |
| Set the sense to maximization.
|
|
void | min () |
| Set the sense to maximization.
|
|
void | clear () |
| Clear the problem.
|
|
void | messageLevel (MessageLevel level) |
| Set the message level of the solver.
|
|
void | write (std::string file, std::string format="MPS") const |
| Write the problem to a file in the given format.
|
|