|
Public Member Functions |
| | LP_Problem () |
| | Default constructor: builds a trivial LP problem.
|
| | LP_Problem (const Constraint_System &cs, const Linear_Expression &obj=Linear_Expression::zero(), Optimization_Mode mode=MAXIMIZATION) |
| | Builds an LP problem from the constraint system cs, the objective function obj and optimization mode mode.
|
|
| LP_Problem (const LP_Problem &y) |
| | Ordinary copy-constructor.
|
|
| ~LP_Problem () |
| | Destructor.
|
|
LP_Problem & | operator= (const LP_Problem &y) |
| | Assignment operator.
|
|
dimension_type | space_dimension () const |
| | Returns the space dimension of the current LP problem.
|
|
const Constraint_System & | constraints () const |
| | Returns the constraints defining the current feasible region.
|
|
const Linear_Expression & | objective_function () const |
| | Returns the current objective function.
|
|
Optimization_Mode | optimization_mode () const |
| | Returns the current optimization mode.
|
|
void | clear () |
| | Resets *this to be equal to the trivial LP problem.
|
| void | add_constraint (const Constraint &c) |
| | Adds a copy of constraint c to the current LP problem, increasing the number of space dimensions if needed.
|
| void | add_constraints (const Constraint_System &cs) |
| | Adds a copy of the constraints in cs to the current LP problem, increasing the number of space dimensions if needed.
|
| void | set_objective_function (const Linear_Expression &obj) |
| | Sets the objective function to obj.
|
|
void | set_optimization_mode (Optimization_Mode mode) |
| | Sets the optimization mode to mode.
|
| bool | is_satisfiable () const |
| | Checks satisfiability of *this.
|
| LP_Problem_Status | solve () const |
| | Optimizes the current LP problem using the primal simplex algorithm.
|
| void | evaluate_objective_function (const Generator &evaluating_point, Coefficient &num, Coefficient &den) const |
| | Sets num and den so that is the result of evaluating the objective function on evaluating_point.
|
| const Generator & | feasible_point () const |
| | Returns a feasible point for *this, if it exists.
|
| const Generator & | optimizing_point () const |
| | Returns an optimal point for *this, if it exists.
|
| void | optimal_value (Coefficient &num, Coefficient &den) const |
| | Sets num and den so that is the solution of the optimization problem.
|
|
bool | OK () const |
| | Checks if all the invariants are satisfied.
|
|
memory_size_type | total_memory_in_bytes () const |
| | Returns the total size in bytes of the memory occupied by *this.
|
|
memory_size_type | external_memory_in_bytes () const |
| | Returns the size in bytes of the memory managed by *this.
|
|
void | swap (LP_Problem &y) |
| | Swaps *this with y.
|
Static Public Member Functions |
|
static dimension_type | max_space_dimension () |
| | Returns the maximum space dimension a LP_Problem can handle.
|