10 #include "CoinSmartPtr.hpp"
29 class BCP_cut :
public Coin::ReferencedObject {
82 inline double lb()
const {
return _lb; }
84 inline double ub()
const {
return _ub; }
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;
virtual ~BCP_cut_algo()=0
The destructor deletes the object.
void make_non_removable()
Mark the cut as NotRemovable.
pos
position where the operator should be printed when printing the expression
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.
void set_effective_count(const int cnt)
Set the effectiveness count to the given value.
Abstract base class that defines members common to all types of cuts.
This is the class from which the user should derive her own algorithmic cuts.
void set_bcpind(const int bcpind)
Set the internal index of the cut.
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(const BCP_vec< BCP_obj_change > &cc)
Set the lower/upper bound pairs and the stati of the first cc.
The object is to be removed next time when the formulation is compressed.
BCP_cut_set & operator=(const BCP_cut_set &)
The assignment operator is declared but not defined to disable it.
Core cuts are the cuts that always stay in the LP formulation.
double ub() const
Return the upper bound on the cut.
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.
double _ub
Upper bound of the cut.
This class is just a collection of pointers to cuts with a number of methods to manipulate these cuts...
~BCP_cut_core()
The destructor deletes the object.
BCP_cut_algo & operator=(const BCP_cut_algo &)
The assignment operator is declared but not defined to disable it.
The object is not removable from the LP formulation, even if the object becomes inactive.
BCP_object_t obj_type() const
Return BCP_AlgoObj indicating that the object is an algorithmic cut.
double _lb
Lower bound of the cut.
void append(const BCP_vec< BCP_cut * > &x)
Append the cuts in the vector x to the end of the cut set.
BCP_cut_core & operator=(const BCP_cut_core &)
The assignment operator is declared but not defined to disable it.
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
BCP_cut_core(const BCP_cut_core &x)
The copy constructor makes a replica of the argument.
int decrease_effective_count()
Decrease the effectiveness count by 1 (or to -1 if it was positive).
double lb() const
Return the lower bound on the cut.
int _bcpind
These data members are used only by BCP, the user need not worry about them.
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...
bool is_non_removable() const
Return whether the cut marked as NotRemovable.
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).
BCP_cut()
The default constructor is declared but not defined to disable it.
void set_lb(const double lb)
Set the lower bound on the cut.
void make_active()
Mark the cut as active.
BCP_obj_status status() const
Return the status of the cut.
No special information is given about the object.
void dont_send_to_pool(bool flag)
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process.
The object does not need to be sent to the variable/cut pool.
void set_status(const BCP_obj_status stat)
Set the status of the cut.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
BCP_cut_algo(const double lb, const double ub)
This constructor just sets the data members to the given values.
void set_ub(const double ub)
Set the upper bound on the cut.
BCP_object_t obj_type() const
Return BCP_CoreObj indicating that the object is a core cut.
int effective_count() const
Return the effectiveness count of the cut (only in LP process).
The class BCP_vec serves the same purpose as the vector class in the standard template library...
void change_bounds(const double lb, const double ub)
Change just the lower/upper bounds.
BCP_cut_set()
The default constructor creates a cut set with no cuts in it.
BCP_cut_core(const double lb, const double ub)
This constructor just sets the data members to the given values.
BCP_cut_core()
The default constructor is declared but not defined to disable it.
int _eff_cnt
Effectiveness counter (used only in the LP process).
BCP_cut & operator=(const BCP_cut &)
The assignment operator is declared but not defined to disable it.
virtual ~BCP_cut()
The destructor is virtual so that the appropriate destructor is invoked for every cut...
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_cut_set()
The destructor empties the cut set.
BCP_cut_algo()
The default constructor is declared but not defined to disable it.
void make_to_be_removed()
Mark the cut as ToBeRemoved.
bool is_to_be_removed() const
Return whether the cut must be removed from the formulation.
int bcpind() const
Return the internal index of the cut.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
void append(const BCP_vec< T > &x)
Append the entries in x to the end of the vector.
BCP_obj_status _status
The status of the cut.
void fint fint fint real fint real * x