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