#include <BCP_cut.hpp>
Inheritance diagram for BCP_cut:
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) | |
virtual | ~BCP_cut () |
Query methods | |
virtual BCP_object_t | obj_type () const=0 |
int | effective_count () const |
double | lb () const |
double | ub () const |
BCP_IndexType | bcpind () const |
Query methods | |
BCP_obj_status | status () const |
bool | dont_send_to_pool () const |
bool | is_non_removable () const |
bool | is_to_be_removed () const |
Modifying methods | |
void | set_effective_count (const int cnt) |
int | increase_effective_count () |
int | decrease_effective_count () |
void | set_lb (const double lb) |
void | set_ub (const double ub) |
void | change_lb_ub_st (const BCP_obj_change &change) |
void | change_bounds (const double lb, const double ub) |
void | set_bcpind (const BCP_IndexType bcpind) |
Modifying methods | |
void | set_status (const BCP_obj_status stat) |
void | dont_send_to_pool (bool flag) |
void | make_active () |
void | make_non_removable () |
void | make_to_be_removed () |
Protected Attributes | |
double | _lb |
double | _ub |
Private Member Functions | |
Disabled methods | |
BCP_cut () | |
BCP_cut (const BCP_cut &) | |
BCP_cut & | operator= (const BCP_cut &) |
Private Attributes | |
BCP_IndexType | _bcpind |
BCP_obj_status | _status |
int | _eff_cnt |
Definition at line 28 of file BCP_cut.hpp.
|
The default constructor is declared but not defined to disable it. |
|
The copy constructor is declared but not defined to disable it. |
|
The constructor sets the internal index of the cut to zero and the other data members to the given arguments. Definition at line 67 of file BCP_cut.hpp. References _bcpind, _eff_cnt, _lb, _status, _ub, and ub().
|
|
The destructor is virtual so that the appropriate destructor is invoked for every cut. Definition at line 71 of file BCP_cut.hpp.
00071 {} |
|
Return the internal index of the cut. Definition at line 85 of file BCP_cut.hpp. References _bcpind. Referenced by BCP_problem_core::pack(), and BCP_cg_user::send_cut().
00085 { return _bcpind; } |
|
Change just the lower/upper bounds. Definition at line 141 of file BCP_cut.hpp. References _lb, _status, and _ub. Referenced by BCP_vg_prob::unpack_cut().
|
|
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 133 of file BCP_cut.hpp. References _lb, _status, and _ub.
|
|
Decrease the effectiveness count by 1 (or to -1 if it was positive). Return the new effectiveness count. Definition at line 123 of file BCP_cut.hpp. References _eff_cnt.
|
|
Set/unset the flag controlling whether the cut could be sent to the Cut Pool process. Definition at line 156 of file BCP_cut.hpp. References _status.
|
|
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 94 of file BCP_cut.hpp. References _status.
00094 { 00095 return _status & BCP_ObjDoNotSendToPool ? true : false; 00096 } |
|
Return the effectiveness count of the cut (only in LP process). Definition at line 79 of file BCP_cut.hpp. References _eff_cnt.
00079 { return _eff_cnt; } |
|
Increase the effectiveness count by 1 (or to 1 if it was negative). Return the new effectiveness count. Definition at line 117 of file BCP_cut.hpp. References _eff_cnt.
|
|
Return whether the cut marked as NotRemovable. Such cuts are, e.g., the branching cuts. Definition at line 99 of file BCP_cut.hpp. References _status.
00099 { 00100 return (_status & BCP_ObjNotRemovable) ? true : false; 00101 } |
|
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 105 of file BCP_cut.hpp. References _status.
00105 { 00106 return (_status & BCP_ObjToBeRemoved) != 0; 00107 } |
|
Return the lower bound on the cut. Definition at line 81 of file BCP_cut.hpp. References _lb. Referenced by BCP_problem_core::pack(), and BCP_cg_user::send_cut().
00081 { return _lb; } |
|
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 164 of file BCP_cut.hpp. References _status.
|
|
Mark the cut as NotRemovable. Definition at line 168 of file BCP_cut.hpp. References _status.
|
|
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 175 of file BCP_cut.hpp. References _status.
00175 { 00176 _status = BCP_ObjToBeRemoved; 00177 } |
|
Return the type of the variable. Implemented in BCP_cut_core, BCP_cut_indexed, and BCP_cut_algo. Referenced by BCP_cg_user::send_cut(). |
|
The assignment operator is declared but not defined to disable it. |
|
Set the internal index of the cut. Definition at line 148 of file BCP_cut.hpp. References _bcpind. Referenced by BCP_cut_core::BCP_cut_core(), BCP_problem_core::unpack(), and BCP_vg_prob::unpack_cut().
00148 { _bcpind = bcpind; } |
|
Set the effectiveness count to the given value. Definition at line 114 of file BCP_cut.hpp. References _eff_cnt. Referenced by BCP_cut_core::BCP_cut_core().
00114 { _eff_cnt = cnt; } |
|
Set the lower bound on the cut. Definition at line 128 of file BCP_cut.hpp. References _lb.
00128 { _lb = lb; } |
|
Set the status of the cut. Definition at line 153 of file BCP_cut.hpp. References _status. Referenced by BCP_cut_core::BCP_cut_core(), BCP_problem_core::unpack(), and BCP_vg_prob::unpack_cut().
00153 { _status = stat; } |
|
Set the upper bound on the cut. Definition at line 130 of file BCP_cut.hpp. References _ub.
00130 { _ub = ub; } |
|
Return the status of the cut. Definition at line 90 of file BCP_cut.hpp. References _status. Referenced by BCP_problem_core::pack(), and BCP_cg_user::send_cut().
00090 { return _status; } |
|
Return the upper bound on the cut. Definition at line 83 of file BCP_cut.hpp. References _ub. Referenced by BCP_cut(), BCP_problem_core::pack(), and BCP_cg_user::send_cut().
00083 { return _ub; } |
|
The internal, unique index of the cut. Definition at line 45 of file BCP_cut.hpp. Referenced by BCP_cut(), bcpind(), and set_bcpind(). |
|
Effectiveness counter (used only in the LP process). Definition at line 49 of file BCP_cut.hpp. Referenced by BCP_cut(), decrease_effective_count(), effective_count(), increase_effective_count(), and set_effective_count(). |
|
Lower bound of the cut. Definition at line 55 of file BCP_cut.hpp. Referenced by BCP_cut(), change_bounds(), change_lb_ub_st(), lb(), and set_lb(). |
|
The status of the cut. Definition at line 47 of file BCP_cut.hpp. Referenced by BCP_cut(), 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(). |
|
Upper bound of the cut. Definition at line 57 of file BCP_cut.hpp. Referenced by BCP_cut(), change_bounds(), change_lb_ub_st(), set_ub(), and ub(). |