Go to the documentation of this file.
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; }
93 inline int bcpind()
const {
return _bcpind; }
166 _status = change.
stat;
217 void display(
const double val)
const;
252 const double obj,
const double lb,
const double ub) :
295 const double obj,
const double lb,
const double ub) :
void change_bounds(const double lb, const double ub)
Change the lower and upper bounds to the given values.
double obj() const
Return the objective coefficient.
void set_obj(const double obj)
Set the objective coefficient.
void test_inactive()
Test (and set) whether the var is fixed (inactive)
bool is_non_removable() const
Return whether the variable is marked NotRemovable.
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.
double _obj
The objective coefficient.
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
bool is_fixed_to_zero() const
Return whether the variable is fixed to zero or not.
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.
void set_bcpind(const int bcpind)
Set the internal index of the variable.
int bcpind() const
Return the internal index of the variable.
void set_lb_ub(const double lb, const double ub)
Set both lower and upper bounds.
void dont_send_to_pool(bool flag)
Set/unset the flag controlling whether the variable could be sent to the Variable Pool process.
BCP_object_t obj_type() const
Return BCP_AlgoObj indicating that the object is an algorithmic variable.
The class BCP_vec serves the same purpose as the vector class in the standard template library.
@ BCP_ObjDoNotSendToPool
The object does not need to be sent to the variable/cut pool.
virtual ~BCP_var()
The destructor is virtual so that the appropriate destructor is invoked for every variable.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
void set_ub(const double ub)
Set the upper bound.
@ BCP_ObjInactive
The object is inactive.
double ub() const
Return the upper bound.
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...
Core variables are the variables that always stay in the LP formulation.
void make_non_removable()
Mark the variable as NotRemovable.
void set_var_type(const BCP_var_t type)
Set the integrality type of the variable.
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,...
~BCP_var_set()
The destructor empties the variable set.
virtual ~BCP_var_algo()=0
The destructor deletes the object.
~BCP_var_core()
The destructor deletes the object.
bool is_to_be_removed() const
Return whether the variable must be removed from the formulation.
@ BCP_CoreObj
Base object.
BCP_var_core(const BCP_var_core &x)
The copy constructor makes a replica of the argument.
@ BCP_ObjToBeRemoved
The object is to be removed next time when the formulation is compressed.
BCP_var_set()
The default constructor creates a variable set with no variables in it.
void set_bcpind_flip()
Flip the internal index of the variable to its negative.
void display(const double val) const
Display the object type, internal index, and the value given in the argument.
This is the class from which the user should derive her own algorithmic variables.
double lb() const
Return the lower bound.
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...
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
bool is_fixed() const
Return whether the variable is fixed or not.
void deletable(const int bvarnum, BCP_vec< int > &collection)
Collect the indices of the variables marked to be removed.
bool is_removable() const
Return whether the variable is removable from the formulation at the time of the query.
BCP_var_t var_type() const
Return the integrality type of the variable.
BCP_var_t
This enumerative constant describes the integrality type of a variable.
bool dont_send_to_pool() const
Return whether the variable should be sent to the Variable Pool process.
double _lb
Lower bound on the value the variable can take.
@ BCP_AlgoObj
Algorithmic object.
BCP_var_t _var_type
The integrality type of the variable.
const typedef BCP_var * * const_iterator
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.
Abstract base class that defines members common to all types of variables.
This class is just a collection of pointers to variables with a number of methods to manipulate these...
void make_active()
Mark the variable as active.
void set_lb(const double lb)
Set the lower bound.
void append(const BCP_vec< BCP_var * > &x)
Append the variables in the vector x to the end of the variable set.
@ BCP_ObjNoInfo
No special information is given about the object.
double _ub
Upper bound on the value the variable can take.
BCP_obj_status status() const
Return the status of the variable.
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.
BCP_object_t obj_type() const
Return BCP_CoreObj indicating that the object is a core variable.
void set_status(const BCP_obj_status status)
Set the status of the variable.
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.
@ BCP_ObjNotRemovable
The object is not removable from the LP formulation, even if the object becomes inactive.