Inherits parma_polyhedra_library.PPL_Object.
Public Member Functions |
|
native long | max_space_dimension () |
| Returns the maximum space dimension an MIP_Problem can handle.
|
native long | space_dimension () |
| Returns the space dimension of the MIP problem.
|
native Variables_Set | integer_space_dimensions () |
| Returns a set containing all the variables' indexes constrained to be integral.
|
native Constraint_System | constraints () |
| Returns the constraints .
|
native Linear_Expression | objective_function () |
| Returns the objective function.
|
native Optimization_Mode | optimization_mode () |
| Returns the optimization mode.
|
native String | ascii_dump () |
| Returns an ascii formatted internal representation of this .
|
native String | toString () |
| Returns a string representation of this .
|
native long | total_memory_in_bytes () |
| Returns the total size in bytes of the memory occupied by the underlying C++ object.
|
native boolean | OK () |
| Checks if all the invariants are satisfied.
|
|
native void | clear () |
| Resets this to be equal to the trivial MIP problem.
|
native void | add_space_dimensions_and_embed (long m) |
| Adds m new space dimensions and embeds the old MIP problem in the new vector space.
|
native void | add_to_integer_space_dimensions (Variables_Set i_vars) |
| Sets the variables whose indexes are in set i_vars to be integer space dimensions.
|
native void | add_constraint (Constraint c) |
| Adds a copy of constraint c to the MIP problem.
|
native void | add_constraints (Constraint_System cs) |
| Adds a copy of the constraints in cs to the MIP problem.
|
native void | set_objective_function (Linear_Expression obj) |
| Sets the objective function to obj .
|
native void | set_optimization_mode (Optimization_Mode mode) |
| Sets the optimization mode to mode .
|
|
native boolean | is_satisfiable () |
| Checks satisfiability of *this .
|
native MIP_Problem_Status | solve () |
| Optimizes the MIP problem.
|
native void | evaluate_objective_function (Generator evaluating_point, Coefficient num, Coefficient den) |
| Sets num and den so that is the result of evaluating the objective function on evaluating_point .
|
native Generator | feasible_point () |
| Returns a feasible point for *this , if it exists.
|
native Generator | optimizing_point () |
| Returns an optimal point for this , if it exists.
|
native void | optimal_value (Coefficient num, Coefficient den) |
| Sets num and den so that is the solution of the optimization problem.
|
|
native Control_Parameter_Value | get_control_parameter (Control_Parameter_Name name) |
| Returns the value of control parameter name .
|
native void | set_control_parameter (Control_Parameter_Value value) |
| Sets control parameter value .
|
Constructors and Destructor |
| MIP_Problem (long dim) |
| Builds a trivial MIP problem.
|
| MIP_Problem (long dim, Constraint_System cs, Linear_Expression obj, Optimization_Mode mode) |
| Builds an MIP problem having space dimension dim from the constraint system cs , the objective function obj and optimization mode mode .
|
| MIP_Problem (MIP_Problem y) |
| Builds a copy of y .
|
native void | free () |
| Releases all resources managed by this , also resetting it to a null reference.
|
native void | finalize () |
| Releases all resources managed by this .
|
A Mixed Integer (linear) Programming problem.
An object of this class encodes a mixed integer (linear) programming problem. The MIP problem is specified by providing:
- the dimension of the vector space;
- the feasible region, by means of a finite set of linear equality and non-strict inequality constraints;
- the subset of the unknown variables that range over the integers (the other variables implicitly ranging over the reals);
- the objective function, described by a Linear_Expression;
- the optimization mode (either maximization or minimization).
The class provides support for the (incremental) solution of the MIP problem based on variations of the revised simplex method and on branch-and-bound techniques. The result of the resolution process is expressed in terms of an enumeration, encoding the feasibility and the unboundedness of the optimization problem. The class supports simple feasibility tests (i.e., no optimization), as well as the extraction of an optimal (resp., feasible) point, provided the MIP_Problem is optimizable (resp., feasible).
By exploiting the incremental nature of the solver, it is possible to reuse part of the computational work already done when solving variants of a given MIP_Problem: currently, incremental resolution supports the addition of space dimensions, the addition of constraints, the change of objective function and the change of optimization mode.