MipSolver
Declared in lemon/lp_base.h, in the group LP and MIP Solvers; the same class on the Doxygen site.
-
class MipSolver : public virtual LpBase
Common base class for MIP solvers.
This class is an abstract base class for MIP solvers. This class provides a full interface for set and modify an MIP problem, solve it and retrieve the solution. You can use one of the descendants as a concrete implementation, or the
Lpdefault MIP solver. However, if you would like to handle MIP solvers as reference or pointer in a generic way, you can use this class directly.Subclassed by CbcMip, CplexMip, GlpkMip, MipSkeleton
Set Column Type
-
enum ColTypes
Possible variable (column) types (e.g. real, integer, binary etc.).
Values:
-
enumerator REAL
= 0. Continuous variable (default).
-
enumerator INTEGER
= 1. Integer variable.
-
enumerator REAL
Solve the MIP
-
inline SolveExitStatus solve()
-
Solve the MIP problem at hand
- Returns:
The result of the optimization procedure. Possible values and their meanings can be found in the documentation of
Obtain the Solution
-
inline ProblemType type() const
The type of the MIP problem.
-
inline Value sol( Col c ) const
Return the value of the row in the solution.
- Pre:
The problem is solved.
-
inline Value sol( const Expr & e ) const
Return the value of the expression in the solution.
Return the value of the expression in the solution, i.e. the dot product of the solution and the expression.
- Pre:
The problem is solved.
Public Types
-
enum ProblemType
The problem types for MIP problems.
Values:
-
enumerator UNDEFINED
= 0. Feasible solution hasn’t been found (but may exist).
-
enumerator INFEASIBLE
= 1. The problem has no feasible solution.
-
enumerator FEASIBLE
= 2. Feasible solution found.
-
enumerator OPTIMAL
= 3. Optimal solution exists and found.
-
enumerator UNDEFINED
Public Functions
-
enum ColTypes