Main Page   Class Hierarchy   Compound List   File List   Contact   Download   Symbolic Constraints   Examples  

SCIL::ILP_Problem Class Reference

#include <ilp_problem.h>

Collaboration diagram for SCIL::ILP_Problem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ABA_SUB * firstSub ()
void set_silent ()
void primal_bound (double b)
bool save_solution (solution &S)

Public Attributes

primal_heuristicprimal_heur
implicatorimplic
QuadRefqr

Friends

class subproblem
class ABA_Constraint
class ABA_Variable

Creation



 ILP_Problem (Optsense optSense, bool price=false, int numcon=-1, const char *problemName="none")
 The constructor creates a new problem instance for the solution of an ILP.
virtual ~ILP_Problem ()
 The destructor cleans up dynamicaly alocated memory.

Creation of the Model



var add_binary_variable (double obj, Activation a=Static)
var add_variable (double obj, double lBound, double uBound, Vartype vt, Activation a=Static)
cons add_basic_constraint (cons_sense s, double r, Activation a=Static)
cons add_basic_constraint (cons_obj *c, Activation a=Static, quadRefStatus qrStatus=CHECK)
var add_variable (var_obj *v, Activation a=Static)
row add_polynomial (polynomial p, bool update=true)
 linearizes and adds the monomials in p to the monomial list
row add_polynomial (monomial m, bool update=true)
 linearizes and adds the monomial m to the monomial list
var add_boolfunction (boolfunction *bf, double c)
 linearizes and adds the boolfunction bf with coefficient c to the IP
void add_bool_constraint (std::list< boolfunction * > &bcl, bool_cons_type bct)
void add_bool_constraint (boolfunction *bf, bool_cons_type bct)
void add_sym_constraint (sym_constraint *c)
 adds the symbolic constraint c to the model.
void add_pol_constraint (pol_constraint c)
 adds the polynomial constraint c to the model.
void set_coefficient (var v, cons i, double d)
void set_obj_coefficient (var v, double d)
 sets the objective coefficient of variable v to value d
void set_primal_heuristic (primal_heuristic *P)
 adds a primal heuristic to the model.
void extendSolution (solution &S)
 extends the given solution with values for the linearization variables with respect to their factors
void set_implicator (implicator *P)
void set_monomial_split_strategy (mon_split_strategy *spst)
 sets the split strategy spst for the decomposition of monomials
void set_bool_split_strategy (bool_split_strategy *spst)
 sets the split strategy spst for the decomposition of boolfunctions
void set_qr_on_separate (bool qr)
 activates (if qr is true) or deactivates (if qr is false) the quadratic reformulation of constraints which are found during the separation
void set_qrType (quadRefStatus qt)
 sets (or deactivates) the quadratic reformulation strategy to one of {SQK2, SQK3, SQK2_SQK3, CHECK, NONE}

Inspection of the Model



int number_of_variables ()
 Returns the number of variables in the model.
int number_of_constraints ()
 Returns the number of basic constraints in the model.
double get_obj_coefficient (var v) const
 Returns the objective coefficient of variable v.
quadRefStatus get_qrType ()
 Returns the current quadratic reformulation strategy.
bool get_qr_on_separate ()
 Returns the status of quadratic reformulation of separated constraints.

Configurations



const std::string configuration (const std::string &) const
 get the configuration for a string.
void configuration (const std::string &, const std::string &)
 set the configuration.
void read_configuration_file (const char *)
 reads a configuration file.

Execution Commands



void optimize ()
 Computes the optimal solution for the current model.

Exploit the solution



Optsense opt_sense ()
double get_solution (var v)
 returns the value of v in the best found solution.
double get_solution (row &r)
 returns the solution found for the row r.
solution get_solution ()
 returns the best found solution.
double get_optimum ()
 returns the optimal value of the objective function.

Detailed Description

The class for Integer Linear Programming problems

Examples:

Diameter_Constraint_Minimum_Spanning_Tree, and Steiner_Arborescence.

Definition at line 41 of file ilp_problem.h.


Constructor & Destructor Documentation

ILP_Problem::ILP_Problem ( Optsense  optSense,
bool  price = false,
int  _numcon = -1,
const char *  problemName = "none" 
)

The constructor needs only the optimization sense, i.e. one of Optsense_Min and Optsense_Max

The constructor takes the optimization sense (opt_min or opt_max)

Parameters:
optSense Sense of the optimization.

Definition at line 77 of file ilp_problem.cc.


Member Function Documentation

cons ILP_Problem::add_basic_constraint ( cons_obj c,
Activation  a = Static,
quadRefStatus  qrStatus = CHECK 
)

adds an instance of a basic-constraint-schema to the root of the BCP-tree. qrStatus specifies if and which quadratic reformulation takes place

Definition at line 177 of file ilp_problem.cc.

References SCIL::QuadRef::addCons().

cons ILP_Problem::add_basic_constraint ( cons_sense  s,
double  r,
Activation  a = Static 
)

adds a primitive basic constraint to the root of the BCP-tree. s specifies the sense (one of Less, Equal, or Greater) and r the right-hand-side of the constraint.

Definition at line 191 of file ilp_problem.cc.

Referenced by add_bool_constraint(), add_boolfunction(), add_pol_constraint(), SCIL::QuadRef::check_and_reformulate(), and SCIL::QuadRef::reformulate_forced_constraints().

var ILP_Problem::add_binary_variable ( double  obj,
Activation  a = Static 
)

adds a primitve variable to the root of the BCP-tree. obj specifies the objective function value, lBound and uBound the lower and upper bound of the variable and vt the type of the variable (one of Vartype_Integer, Vartype_Binary or Vartype_Continous). Activation specifies, if the system is allowed to remove the variable from the LP or not.

Examples:
Diameter_Constraint_Minimum_Spanning_Tree.

Definition at line 146 of file ilp_problem.cc.

References add_variable().

Referenced by add_boolfunction().

void ILP_Problem::add_bool_constraint ( boolfunction bf,
bool_cons_type  bct 
)

adds a boolean constraint of type bct which is one of C0 (if bf must be false for every feasible solution), C1 (if bf must be true for every feasible solution),

Definition at line 327 of file ilp_problem.cc.

References add_bool_constraint().

void ILP_Problem::add_bool_constraint ( std::list< boolfunction * > &  bcl,
bool_cons_type  bct 
)

adds a boolean constraint of type bct which is one of C0 (if every element of bcl must be false for every feasible solution), C1 (if every element of bcl must be true for every feasible solution), CS (if at most one element of bcl may be true for every feasible solution), CE (if exactly one element of bcl must be true for every feasible solution)

Definition at line 333 of file ilp_problem.cc.

References SCIL::boolfunction::add(), add_basic_constraint(), add_boolfunction(), and SCIL::boolfunction::copy().

Referenced by add_bool_constraint().

var ILP_Problem::add_variable ( var_obj v,
Activation  a = Static 
)

adds the instance of the variable-schema to the root of the BCP-tree.

Definition at line 162 of file ilp_problem.cc.

References SCIL::var_obj::obj(), and SCIL::var_obj::vt.

var ILP_Problem::add_variable ( double  obj,
double  lBound,
double  uBound,
Vartype  vt,
Activation  a = Static 
)

adds a primitve variable to the root of the BCP-tree. obj specifies the objectiv function value, lBound and uBound the lower and upper bound of the variable and vt the type of the variable (one of Vartype_Integer, Vartype_Binary or Vartype_Continous). Activation specifies, if the system is allowed to remove the variable from the LP or not.

Definition at line 151 of file ilp_problem.cc.

Referenced by add_binary_variable().

void ILP_Problem::set_coefficient ( var  v,
cons  i,
double  d 
)

sets the coefficient for variable v and ineqality i to d in the LP-Matrix.

Definition at line 393 of file ilp_problem.cc.


The documentation for this class was generated from the following files:
Generated on Mon Mar 28 22:03:53 2011 for SCIL by  doxygen 1.6.3