Public Types | Public Member Functions

MipSolver Class Reference


Detailed Description

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 Lp default 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.

#include <lemon/lp_base.h>

Inheritance diagram for MipSolver:

List of all members.

Set Column Type

enum  ColTypes { REAL = 0, INTEGER = 1 }
 

Possible variable (column) types (e.g. real, integer, binary etc.)

More...
void colType (Col c, ColTypes col_type)
ColTypes colType (Col c) const

Public Types

enum  ProblemType {
  UNDEFINED = 0, INFEASIBLE = 1, FEASIBLE = 2, OPTIMAL = 3,
  UNBOUNDED = 4
}
 

The problem types for MIP problems.

More...

Public Member Functions

virtual MipSolvernewSolver () const =0
 Allocate a new MIP problem instance.
virtual MipSolvercloneSolver () const =0
 Make a copy of the MIP problem.
Solve the MIP
SolveExitStatus solve ()
Obtain the Solution
ProblemType type () const
 The type of the MIP problem.
Value sol (Col c) const
 Return the value of the row in the solution.
Value sol (const Expr &e) const
 Return the value of the expression in the solution.
Value solValue () const
 The value of the objective function.

Member Enumeration Documentation

Enumerator:
UNDEFINED 

= 0. Feasible solution hasn't been found (but may exist).

INFEASIBLE 

= 1. The problem has no feasible solution.

FEASIBLE 

= 2. Feasible solution found.

OPTIMAL 

= 3. Optimal solution exists and found.

UNBOUNDED 

= 4. The cost function is unbounded. The Mip or at least the relaxed problem is unbounded.

enum ColTypes
Enumerator:
REAL 

= 0. Continuous variable (default).

INTEGER 

= 1. Integer variable.


Member Function Documentation

SolveExitStatus solve ( ) [inline]

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 SolveExitStatus.
void colType ( Col  c,
ColTypes  col_type 
) [inline]

Sets the type of the given column to the given type.

ColTypes colType ( Col  c) const [inline]

Gives back the type of the column.

Value sol ( Col  c) const [inline]

Return the value of the row in the solution.

Precondition:
The problem is solved.
Value sol ( const Expr e) const [inline]

Return the value of the expression in the solution, i.e. the dot product of the solution and the expression.

Precondition:
The problem is solved.
Value solValue ( ) const [inline]
Returns:
  • INF or -INF means either infeasibility or unboundedness of the problem, depending on whether we minimize or maximize.
  • NaN if no primal solution is found.
  • The (finite) objective value if an optimal solution is found.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines