82 inline double lb()
const {
return _lb; }
84 inline double ub()
const {
return _ub; }
86 inline int bcpind()
const {
return _bcpind; }
119 _eff_cnt = _eff_cnt <= 0 ? 1 : _eff_cnt + 1;
125 _eff_cnt = _eff_cnt >= 0 ? -1 : _eff_cnt - 1;
137 _status = change.
stat;
160 _status = static_cast<BCP_obj_status>(flag ?
351 void nonzero_slack(
int first_to_check,
const double * slacks,
352 const double etol,
const int ineff_limit,
356 void zero_dual(
int first_to_check,
const double * duals,
357 const double etol,
const int ineff_limit,
367 void deletable(
const int bcutnum,
BCP_vec<int>& collection)
const;
BCP_object_t obj_type() const
Return BCP_CoreObj indicating that the object is a core cut.
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.
int decrease_effective_count()
Decrease the effectiveness count by 1 (or to -1 if it was positive).
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
This class is just a collection of pointers to cuts with a number of methods to manipulate these cuts...
virtual ~BCP_cut_algo()=0
The destructor deletes the object.
void change_lb_ub_st(const BCP_obj_change &change)
Set the lower/upper bounds and the status of the cut simultaneously to the values given in the data m...
Abstract base class that defines members common to all types of cuts.
double lb() const
Return the lower bound on the cut.
~BCP_cut_core()
The destructor deletes the object.
int bcpind() const
Return the internal index of the cut.
No special information is given about the object.
void set_lb(const double lb)
Set the lower bound on the cut.
void set_status(const BCP_obj_status stat)
Set the status of the cut.
void dont_send_to_pool(bool flag)
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process.
BCP_obj_status status() const
Return the status of the cut.
void set_effective_count(const int cnt)
Set the effectiveness count to the given value.
BCP_cut(const double lb, const double ub)
The constructor sets the internal index of the cut to zero and the other data members to the given ar...
Core cuts are the cuts that always stay in the LP formulation.
void set_bcpind(const int bcpind)
Set the internal index of the cut.
void make_non_removable()
Mark the cut as NotRemovable.
The object does not need to be sent to the variable/cut pool.
void set_ub(const double ub)
Set the upper bound on the cut.
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
void make_active()
Mark the cut as active.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
bool is_non_removable() const
Return whether the cut marked as NotRemovable.
virtual ~BCP_cut()
The destructor is virtual so that the appropriate destructor is invoked for every cut.
The object is to be removed next time when the formulation is compressed.
BCP_object_t obj_type() const
Return BCP_AlgoObj indicating that the object is an algorithmic cut.
void set_bcpind_flip()
Flip the internal index of the variable to its negative.
bool dont_send_to_pool() const
Return whether the cut should be sent to the Cut Pool process.
This is the class from which the user should derive her own algorithmic cuts.
~BCP_cut_set()
The destructor empties the cut set.
BCP_cut_core(const double lb, const double ub)
This constructor just sets the data members to the given values.
BCP_cut_set()
The default constructor creates a cut set with no cuts in it.
void set_lb_ub_st(const BCP_vec< BCP_obj_change > &cc)
Set the lower/upper bound pairs and the stati of the first cc.
void change_bounds(const double lb, const double ub)
Change just the lower/upper bounds.
bool is_to_be_removed() const
Return whether the cut must be removed from the formulation.
double _lb
Lower bound of the cut.
int effective_count() const
Return the effectiveness count of the cut (only in LP process).
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,...
int increase_effective_count()
Increase the effectiveness count by 1 (or to 1 if it was negative).
The object is not removable from the LP formulation, even if the object becomes inactive.
void append(const BCP_vec< BCP_cut * > &x)
Append the cuts in the vector x to the end of the cut set.
The class BCP_vec serves the same purpose as the vector class in the standard template library.
double _ub
Upper bound of the cut.
BCP_cut_algo(const double lb, const double ub)
This constructor just sets the data members to the given values.
BCP_cut_core(const BCP_cut_core &x)
The copy constructor makes a replica of the argument.
void append(BCP_cut_set::const_iterator first, BCP_cut_set::const_iterator last)
Append the cuts in [first, last) to the end of the cut set.
void make_to_be_removed()
Mark the cut as ToBeRemoved.
void move_deletable_to_pool(const BCP_vec< int > &deletable_cuts, BCP_vec< BCP_cut * > &pool)
Move the cut pointers whose indices are listed in deletable_cuts into the pool.
double ub() const
Return the upper bound on the cut.