24 #ifndef PPL_PIP_Problem_defs_hh
25 #define PPL_PIP_Problem_defs_hh 1
42 namespace IO_Operators {
47 operator<<(std::ostream& s,
const PIP_Problem& pip);
53 void swap(PIP_Problem& x, PIP_Problem& y);
538 template <
typename In>
713 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
714 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
733 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
734 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
804 #if PPL_USE_SPARSE_MATRIX
833 #endif // !defined(PPL_PIP_Problem_defs_hh)
PIP_Problem & operator=(const PIP_Problem &y)
Assignment operator.
dimension_type internal_space_dim
The space dimension of the current (partial) solution of the PIP problem; it may be smaller than exte...
const_iterator constraints_end() const
Returns a past-the-end read-only iterator to the sequence of constraints defining the feasible region...
A linear equality or inequality.
static dimension_type max_space_dimension()
Returns the maximum space dimension a PIP_Problem can handle.
void swap(CO_Tree &x, CO_Tree &y)
void add_constraint(const Constraint &c)
Adds a copy of constraint c to the PIP problem.
Number of different enumeration values.
A finite sequence of coefficients.
void set_control_parameter(Control_Parameter_Value value)
Sets control parameter value.
size_t dimension_type
An unsigned integral type for representing space dimensions.
PIP_Problem(dimension_type dim=0)
Builds a trivial PIP problem.
An std::set of variables' indexes.
void add_constraints(const Constraint_System &cs)
Adds a copy of the constraints in cs to the PIP problem.
Always generate all possible cuts.
Variables_Set parameters
A set containing all the indices of space dimensions that are interpreted as problem parameters...
dimension_type external_space_dim
The dimension of the vector space.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
PIP_Tree_Node * current_solution
The current solution decision tree.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
bool OK() const
Checks if all the invariants are satisfied.
A sparse matrix of Coefficient.
A finite sparse sequence of coefficients.
Constraint_Sequence::const_iterator const_iterator
A type alias for the read-only iterator on the constraints defining the feasible region.
dimension_type space_dimension() const
Returns the space dimension of the PIP problem.
Choose the first row with negative parameter sign.
void set_big_parameter_dimension(dimension_type big_dim)
Sets the dimension for the big parameter to big_dim.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
Status
An enumerated type describing the internal status of the PIP problem.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
A Parametric Integer (linear) Programming problem.
void m_swap(PIP_Problem &y)
Swaps *this with y.
Number of different enumeration values.
The PIP problem is unsatisfiable.
void control_parameters_init()
Initializes the control parameters with default values.
#define PPL_OUTPUT_DECLARATIONS
Constraint_Sequence input_cs
The sequence of constraints describing the feasible region.
Control_Parameter_Value control_parameters[CONTROL_PARAMETER_NAME_SIZE]
The control parameters for the problem object.
Control_Parameter_Value
Possible values for PIP_Problem control parameters.
const Variables_Set & parameter_space_dimensions() const
Returns a set containing all the variables' indexes representing the parameters of the PIP problem...
Choose row which generates the deepest cut.
dimension_type first_pending_constraint
The first index of `input_cs' containing a pending constraint.
void control_parameters_copy(const PIP_Problem &y)
Copies the control parameters from problem object y.
Status status
The internal state of the MIP problem.
The PIP problem is optimized; the solution tree has been computed.
Choose a row that generates a lexicographically maximal pivot column.
bool is_satisfiable() const
Checks satisfiability of *this.
The feasible region of the PIP problem has been changed by adding new variables, parameters or constr...
PIP_Problem_Status
Possible outcomes of the PIP_Problem solver.
std::vector< Constraint > Constraint_Sequence
A type alias for a sequence of constraints.
The entire library is confined to this namespace.
PIP_Problem_Status solve() const
Optimizes the PIP problem.
dimension_type big_parameter_dimension
The dimension for the big parameter, or not_a_dimension() if not set.
Matrix< Row > initial_context
The initial context.
void clear()
Resets *this to be equal to the trivial PIP problem.
PIP_Tree solution() const
Returns a feasible solution for *this, if it exists.
Control_Parameter_Name
Possible names for PIP_Problem control parameters.
Choose the first non-integer row.
A tree node representing part of the space of solutions.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
~PIP_Problem()
Destructor.
dimension_type get_big_parameter_dimension() const
Returns the space dimension for the big parameter.
void add_to_parameter_space_dimensions(const Variables_Set &p_vars)
Sets the space dimensions whose indexes which are in set p_vars to be parameter space dimensions...
const_iterator constraints_begin() const
Returns a read-only iterator to the first constraint defining the feasible region.
A node of the PIP solution tree.
Control_Parameter_Value get_control_parameter(Control_Parameter_Name name) const
Returns the value of control parameter name.
void add_space_dimensions_and_embed(dimension_type m_vars, dimension_type m_params)
Adds m_vars + m_params new space dimensions and embeds the old PIP problem in the new vector space...
void print_solution(std::ostream &s, int indent=0) const
Prints on s the solution computed for *this.
PIP_Tree optimizing_solution() const
Returns an optimizing solution for *this, if it exists.