coin-Bcp
|
Abstract base class that defines members common to all types of cuts. More...
#include <BCP_cut.hpp>
Public Member Functions | |
Constructor and destructor | |
Note that there is no default constructor. There is no such thing as "default cut". | |
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 arguments. More... | |
virtual | ~BCP_cut () |
The destructor is virtual so that the appropriate destructor is invoked for every cut. More... | |
Query methods | |
virtual BCP_object_t | obj_type () const =0 |
Return the type of the variable. More... | |
int | effective_count () const |
Return the effectiveness count of the cut (only in LP process). More... | |
double | lb () const |
Return the lower bound on the cut. More... | |
double | ub () const |
Return the upper bound on the cut. More... | |
int | bcpind () const |
Return the internal index of the cut. More... | |
BCP_obj_status | status () const |
Return the status of the cut. More... | |
bool | dont_send_to_pool () const |
Return whether the cut should be sent to the Cut Pool process. More... | |
bool | is_non_removable () const |
Return whether the cut marked as NotRemovable. More... | |
bool | is_to_be_removed () const |
Return whether the cut must be removed from the formulation. More... | |
Modifying methods | |
void | set_effective_count (const int cnt) |
Set the effectiveness count to the given value. More... | |
int | increase_effective_count () |
Increase the effectiveness count by 1 (or to 1 if it was negative). More... | |
int | decrease_effective_count () |
Decrease the effectiveness count by 1 (or to -1 if it was positive). More... | |
void | set_lb (const double lb) |
Set the lower bound on the cut. More... | |
void | set_ub (const double ub) |
Set the upper bound on the cut. More... | |
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 members of the argument. More... | |
void | change_bounds (const double lb, const double ub) |
Change just the lower/upper bounds. More... | |
void | set_bcpind (const int bcpind) |
Set the internal index of the cut. More... | |
void | set_bcpind_flip () |
Flip the internal index of the variable to its negative. More... | |
void | set_status (const BCP_obj_status stat) |
Set the status of the cut. More... | |
void | dont_send_to_pool (bool flag) |
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process. More... | |
void | make_active () |
Mark the cut as active. More... | |
void | make_non_removable () |
Mark the cut as NotRemovable. More... | |
void | make_to_be_removed () |
Mark the cut as ToBeRemoved. More... | |
![]() | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
int | ReferenceCount () const |
void | AddRef () const |
void | ReleaseRef () const |
Protected Attributes | |
double | _lb |
Lower bound of the cut. More... | |
double | _ub |
Upper bound of the cut. More... | |
Private Member Functions | |
Disabled methods | |
BCP_cut () | |
The default constructor is declared but not defined to disable it. More... | |
BCP_cut (const BCP_cut &) | |
The copy constructor is declared but not defined to disable it. More... | |
BCP_cut & | operator= (const BCP_cut &) |
The assignment operator is declared but not defined to disable it. More... | |
Private Attributes | |
int | _bcpind |
These data members are used only by BCP, the user need not worry about them. More... | |
BCP_obj_status | _status |
The status of the cut. More... | |
int | _eff_cnt |
Effectiveness counter (used only in the LP process). More... | |
Abstract base class that defines members common to all types of cuts.
Classes describing the three types of cuts (core and algorithmic) are derived from this class. No object of type BCP_cut can exist (having purely virtual members in the class enforces this restriction).
Definition at line 29 of file BCP_cut.hpp.
|
private |
The default constructor is declared but not defined to disable it.
|
private |
The copy constructor is declared but not defined to disable it.
|
inline |
The constructor sets the internal index of the cut to zero and the other data members to the given arguments.
Definition at line 68 of file BCP_cut.hpp.
|
inlinevirtual |
The destructor is virtual so that the appropriate destructor is invoked for every cut.
Definition at line 72 of file BCP_cut.hpp.
The assignment operator is declared but not defined to disable it.
|
pure virtual |
Return the type of the variable.
Implemented in BCP_cut_algo, and BCP_cut_core.
|
inline |
Return the effectiveness count of the cut (only in LP process).
Definition at line 80 of file BCP_cut.hpp.
References _eff_cnt.
Referenced by BCP_cut_core::BCP_cut_core().
|
inline |
Return the lower bound on the cut.
Definition at line 82 of file BCP_cut.hpp.
References _lb.
Referenced by change_bounds(), and set_lb().
|
inline |
Return the upper bound on the cut.
Definition at line 84 of file BCP_cut.hpp.
References _ub.
Referenced by change_bounds(), and set_ub().
|
inline |
Return the internal index of the cut.
Definition at line 86 of file BCP_cut.hpp.
References _bcpind.
Referenced by BCP_cut_core::BCP_cut_core(), and set_bcpind().
|
inline |
Return the status of the cut.
Definition at line 91 of file BCP_cut.hpp.
References _status.
Referenced by BCP_cut_core::BCP_cut_core().
|
inline |
Return whether the cut should be sent to the Cut Pool process.
(Assuming that it stays in the formulation long enough to qualify to be sent to the Cut Pool at all.
Definition at line 95 of file BCP_cut.hpp.
References _status, and BCP_ObjDoNotSendToPool.
|
inline |
Return whether the cut marked as NotRemovable.
Such cuts are, e.g., the branching cuts.
Definition at line 100 of file BCP_cut.hpp.
References _status, and BCP_ObjNotRemovable.
|
inline |
Return whether the cut must be removed from the formulation.
There are very few circumstances when this flag is set; all of them are completely internal to BCP.
Definition at line 106 of file BCP_cut.hpp.
References _status, and BCP_ObjToBeRemoved.
|
inline |
Set the effectiveness count to the given value.
Definition at line 115 of file BCP_cut.hpp.
References _eff_cnt.
Referenced by BCP_cut_core::BCP_cut_core().
|
inline |
Increase the effectiveness count by 1 (or to 1 if it was negative).
Return the new effectiveness count.
Definition at line 118 of file BCP_cut.hpp.
References _eff_cnt.
|
inline |
Decrease the effectiveness count by 1 (or to -1 if it was positive).
Return the new effectiveness count.
Definition at line 124 of file BCP_cut.hpp.
References _eff_cnt.
|
inline |
Set the lower bound on the cut.
Definition at line 129 of file BCP_cut.hpp.
|
inline |
Set the upper bound on the cut.
Definition at line 131 of file BCP_cut.hpp.
|
inline |
Set the lower/upper bounds and the status of the cut simultaneously to the values given in the data members of the argument.
Definition at line 134 of file BCP_cut.hpp.
References _lb, _status, _ub, BCP_DBL_MAX, BCP_ObjInactive, BCP_obj_change::lb, BCP_obj_change::stat, and BCP_obj_change::ub.
|
inline |
Change just the lower/upper bounds.
Definition at line 142 of file BCP_cut.hpp.
References _lb, _status, _ub, BCP_DBL_MAX, BCP_ObjInactive, lb(), and ub().
|
inline |
Set the internal index of the cut.
Definition at line 149 of file BCP_cut.hpp.
References _bcpind, and bcpind().
Referenced by BCP_cut_core::BCP_cut_core().
|
inline |
Flip the internal index of the variable to its negative.
Definition at line 151 of file BCP_cut.hpp.
References _bcpind.
|
inline |
Set the status of the cut.
Definition at line 156 of file BCP_cut.hpp.
References _status.
Referenced by BCP_cut_core::BCP_cut_core().
|
inline |
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process.
Definition at line 159 of file BCP_cut.hpp.
References _status, and BCP_ObjDoNotSendToPool.
|
inline |
Mark the cut as active.
Note that when this method is invoked the lp formulation must be modified as well: the original bounds of the cut must be reset.
Definition at line 167 of file BCP_cut.hpp.
References _status, and BCP_ObjInactive.
|
inline |
Mark the cut as NotRemovable.
Definition at line 171 of file BCP_cut.hpp.
References _status, BCP_ObjNotRemovable, and BCP_ObjToBeRemoved.
|
inline |
Mark the cut as ToBeRemoved.
It will actually be removed immediately after all cuts that have to be marked this way are marked.
Definition at line 178 of file BCP_cut.hpp.
References _status, and BCP_ObjToBeRemoved.
|
private |
These data members are used only by BCP, the user need not worry about them.
The internal, unique index of the cut.
Definition at line 46 of file BCP_cut.hpp.
Referenced by bcpind(), set_bcpind(), and set_bcpind_flip().
|
private |
The status of the cut.
Definition at line 48 of file BCP_cut.hpp.
Referenced by change_bounds(), change_lb_ub_st(), dont_send_to_pool(), is_non_removable(), is_to_be_removed(), make_active(), make_non_removable(), make_to_be_removed(), set_status(), and status().
|
private |
Effectiveness counter (used only in the LP process).
Definition at line 50 of file BCP_cut.hpp.
Referenced by decrease_effective_count(), effective_count(), increase_effective_count(), and set_effective_count().
|
protected |
Lower bound of the cut.
Definition at line 56 of file BCP_cut.hpp.
Referenced by change_bounds(), change_lb_ub_st(), lb(), and set_lb().
|
protected |
Upper bound of the cut.
Definition at line 58 of file BCP_cut.hpp.
Referenced by change_bounds(), change_lb_ub_st(), set_ub(), and ub().