36 BCP_cut(
const BCP_cut&);
38 BCP_cut& operator=(
const BCP_cut&);
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;
195class BCP_cut_core :
public BCP_cut {
203 BCP_cut_core& operator=(
const BCP_cut_core&);
242class BCP_cut_algo :
public BCP_cut {
249 BCP_cut_algo(
const BCP_cut_algo&);
251 BCP_cut_algo& operator=(
const BCP_cut_algo&);
286 BCP_cut_set& operator=(
const BCP_cut_set&);
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_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_object_t obj_type() const
Return BCP_AlgoObj indicating that the object is an algorithmic cut.
BCP_cut_algo(const double lb, const double ub)
This constructor just sets the data members to the given values.
virtual ~BCP_cut_algo()=0
The destructor deletes the object.
BCP_object_t obj_type() const
Return BCP_CoreObj indicating that the object is a core cut.
BCP_cut_core(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.
~BCP_cut_core()
The destructor deletes the object.
void append(const BCP_vec< BCP_cut * > &x)
Append the cuts in the vector x to the end of the cut set.
BCP_cut_set()
The default constructor creates a cut set with no cuts in it.
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,...
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 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.
void set_lb_ub_st(BCP_vec< int >::const_iterator pos, const BCP_vec< BCP_obj_change > &cc)
Set the lower/upper bound pairs and the stati of the entries given by the content of [pos,...
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.
~BCP_cut_set()
The destructor empties the cut set.
double lb() const
Return the lower bound on the cut.
int bcpind() const
Return the internal index of the cut.
void make_non_removable()
Mark the cut as NotRemovable.
void make_to_be_removed()
Mark the cut as ToBeRemoved.
double _lb
Lower bound of the cut.
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...
void change_bounds(const double lb, const double ub)
Change just the lower/upper bounds.
void dont_send_to_pool(bool flag)
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process.
void set_bcpind_flip()
Flip the internal index of the variable to its negative.
int increase_effective_count()
Increase the effectiveness count by 1 (or to 1 if it was negative).
int effective_count() const
Return the effectiveness count of the cut (only in LP process).
void make_active()
Mark the cut as active.
void set_ub(const double ub)
Set the upper bound on the cut.
bool is_non_removable() const
Return whether the cut marked as NotRemovable.
void set_lb(const double lb)
Set the lower bound on the cut.
void set_effective_count(const int cnt)
Set the effectiveness count to the given value.
void set_bcpind(const int bcpind)
Set the internal index of the cut.
BCP_obj_status status() const
Return the status of the cut.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
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...
bool dont_send_to_pool() const
Return whether the cut should be sent to the Cut Pool process.
bool is_to_be_removed() const
Return whether the cut must be removed from the formulation.
double _ub
Upper bound of the cut.
int decrease_effective_count()
Decrease the effectiveness count by 1 (or to -1 if it was positive).
void set_status(const BCP_obj_status stat)
Set the status of the cut.
double ub() const
Return the upper bound on the cut.
virtual ~BCP_cut()
The destructor is virtual so that the appropriate destructor is invoked for every cut.
const BCP_cut ** const_iterator
BCP_vec(const size_t n, const_reference value)
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.