10 #include "CoinSmartPtr.hpp"
28 class BCP_var :
public Coin::ReferencedObject {
72 const double obj,
const double lb,
const double ub) :
87 inline double obj()
const {
return _obj; }
89 inline double lb()
const {
return _lb; }
91 inline double ub()
const {
return _ub; }
217 void display(
const double val)
const;
252 const double obj,
const double lb,
const double ub) :
253 BCP_var(var_type, obj, lb, ub) {}
295 const double obj,
const double lb,
const double ub) :
296 BCP_var(var_type, obj, lb, ub) {}
BCP_var_algo()
The default constructor is declared but not defined to disable it.
BCP_var()
The default constructor is declared but not defined to disable it.
~BCP_var_core()
The destructor deletes the object.
void set_ub(const double ub)
Set the upper bound.
void set_var_type(const BCP_var_t type)
Set the integrality type of the variable.
bool is_fixed() const
Return whether the variable is fixed or not.
pos
position where the operator should be printed when printing the expression
BCP_var & operator=(const BCP_var &)
The assignment operator is declared but not defined to disable it.
BCP_obj_status _status
The status of the variable.
virtual ~BCP_var()
The destructor is virtual so that the appropriate destructor is invoked for every variable...
~BCP_var_set()
The destructor empties the variable set.
void set_bcpind(const int bcpind)
Set the internal index of the variable.
The object is to be removed next time when the formulation is compressed.
The object is not removable from the LP formulation, even if the object becomes inactive.
void make_non_removable()
Mark the variable as NotRemovable.
void change_lb_ub_st(const BCP_obj_change &change)
Set the lower/upper bounds and the status of the variable simultaneously to the values given in the d...
BCP_var_core(const BCP_var_t var_type, const double obj, const double lb, const double ub)
This constructor just sets the data members to the given values.
Core variables are the variables that always stay in the LP formulation.
BCP_var_core()
The default constructor is declared but not defined to disable it.
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
void change_bounds(const double lb, const double ub)
Change the lower and upper bounds to the given values.
void fint fint fint real fint real real real real real real real real real * e
double _obj
The objective coefficient.
double ub() const
Return the upper bound.
void set_lb_ub(const double lb, const double ub)
Set both lower and upper bounds.
BCP_var_algo(const BCP_var_t var_type, const double obj, const double lb, const double ub)
This constructor just sets the data members to the given values.
BCP_var(const BCP_var_t var_type, const double obj, const double lb, const double ub)
The constructor sets the internal index of the variable to zero and the other data members to the giv...
BCP_var_core & operator=(const BCP_var_core &)
The assignment operator is declared but not defined to disable it.
BCP_object_t obj_type() const
Return BCP_AlgoObj indicating that the object is an algorithmic variable.
bool is_fixed_to_zero() const
Return whether the variable is fixed to zero or not.
BCP_var_t _var_type
The integrality type of the variable.
double _lb
Lower bound on the value the variable can take.
No special information is given about the object.
BCP_var_set & operator=(const BCP_var_set &)
The assignment operator is declared but not defined to disable it.
double obj() const
Return the objective coefficient.
BCP_object_t obj_type() const
Return BCP_CoreObj indicating that the object is a core variable.
The object does not need to be sent to the variable/cut pool.
bool is_removable() const
Return whether the variable is removable from the formulation at the time of the query.
void display(const double val) const
Display the object type, internal index, and the value given in the argument.
BCP_var_t var_type() const
Return the integrality type of the variable.
bool is_non_removable() const
Return whether the variable is marked NotRemovable.
void set_lb_ub(const BCP_vec< int > &pos, BCP_vec< double >::const_iterator bounds)
Set the lower/upper bound pairs of the entries given by the contents of pos to the values in [bounds...
Abstract base class that defines members common to all types of variables.
void make_active()
Mark the variable as active.
bool dont_send_to_pool() const
Return whether the variable should be sent to the Variable Pool process.
int bcpind() const
Return the internal index of the variable.
BCP_obj_status status() const
Return the status of the variable.
This class is just a collection of pointers to variables with a number of methods to manipulate these...
This is the class from which the user should derive her own algorithmic variables.
The class BCP_vec serves the same purpose as the vector class in the standard template library...
void deletable(const int bvarnum, BCP_vec< int > &collection)
Collect the indices of the variables marked to be removed.
void set_obj(const double obj)
Set the objective coefficient.
int _bcpind
The internal, unique index of the variable.
double lb() const
Return the lower bound.
void append(BCP_var_set::const_iterator first, BCP_var_set::const_iterator last)
Append the variables in [first, last) to the end of the variable set.
void append(const BCP_vec< BCP_var * > &x)
Append the variables in the vector x to the end of the variable set.
double _ub
Upper bound on the value the variable can take.
void set_lb(const double lb)
Set the lower bound.
BCP_var_algo & operator=(const BCP_var_algo &)
The assignment operator is declared but not defined to disable it.
void test_inactive()
Test (and set) whether the var is fixed (inactive)
void set_bcpind_flip()
Flip the internal index of the variable to its negative.
void set_status(const BCP_obj_status status)
Set the status of the variable.
BCP_var_set()
The default constructor creates a variable set with no variables in it.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
BCP_var_core(const BCP_var_core &x)
The copy constructor makes a replica of the argument.
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.
virtual ~BCP_var_algo()=0
The destructor deletes the object.
void make_to_be_removed()
Mark the variable as ToBeRemoved.
void set_lb_ub_st(const BCP_vec< BCP_obj_change > &vc)
Set the lower/upper bound pairs and the stati of the first cc.
BCP_var_t
This enumerative constant describes the integrality type of a variable.
void fint fint fint real fint real * x
bool is_to_be_removed() const
Return whether the variable must be removed from the formulation.
void dont_send_to_pool(bool flag)
Set/unset the flag controlling whether the variable could be sent to the Variable Pool process...