#include <OsiCut.hpp>
Inheritance diagram for OsiCut:
Public Member Functions | |
Effectiveness | |
void | setEffectiveness (double e) |
Set effectiveness. | |
double | effectiveness () const |
Get effectiveness. | |
GloballyValid | |
void | setGloballyValid (bool trueFalse) |
Set globallyValid. | |
void | setGloballyValid () |
Set globallyValid. | |
void | setNotGloballyValid () |
Set globallyValid. | |
bool | globallyValid () const |
Get globallyValid. | |
Debug stuff | |
virtual void | print () const |
Print cuts in collection. | |
Comparison operators | |
virtual bool | operator== (const OsiCut &rhs) const |
equal. 2 cuts are equal if there effectiveness are equal | |
virtual bool | operator!= (const OsiCut &rhs) const |
not equal | |
virtual bool | operator< (const OsiCut &rhs) const |
less than. True if this.effectiveness < rhs.effectiveness | |
virtual bool | operator> (const OsiCut &rhs) const |
less than. True if this.effectiveness > rhs.effectiveness | |
Sanity checks on cut | |
virtual bool | consistent () const =0 |
Returns true if the cut is consistent with respect to itself, without considering any data in the model. | |
virtual bool | consistent (const OsiSolverInterface &si) const =0 |
Returns true if cut is consistent when considering the solver interface's model. | |
virtual bool | infeasible (const OsiSolverInterface &si) const =0 |
Returns true if the cut is infeasible "with respect to itself" and cannot be satisfied. | |
virtual double | violated (const double *solution) const =0 |
Returns infeasibility of the cut with respect to solution passed in i.e. | |
Protected Member Functions | |
Constructors and destructors | |
OsiCut () | |
Default Constructor. | |
OsiCut (const OsiCut &) | |
Copy constructor. | |
OsiCut & | operator= (const OsiCut &rhs) |
Assignment operator. | |
virtual | ~OsiCut () |
Destructor. | |
Private Attributes | |
Private member data | |
double | effectiveness_ |
Effectiveness. | |
bool | globallyValid_ |
If cut has global validity i.e. can be used anywhere in tree. |
The Base cut class contains:
Definition at line 23 of file OsiCut.hpp.
|
Default Constructor.
|
|
Copy constructor.
|
|
Destructor.
|
|
Set effectiveness.
Definition at line 190 of file OsiCut.hpp. References effectiveness_. |
|
Get effectiveness.
Definition at line 191 of file OsiCut.hpp. Referenced by OsiCuts::OsiCutCompare::operator()(), operator<(), operator==(), and operator>(). |
|
Set globallyValid.
Definition at line 39 of file OsiCut.hpp. |
|
Set globallyValid.
Definition at line 41 of file OsiCut.hpp. |
|
Set globallyValid.
Definition at line 43 of file OsiCut.hpp. |
|
Get globallyValid.
Definition at line 46 of file OsiCut.hpp. |
|
Print cuts in collection.
Reimplemented in OsiColCut, and OsiRowCut. Definition at line 53 of file OsiCut.hpp. |
|
equal. 2 cuts are equal if there effectiveness are equal
Definition at line 207 of file OsiCut.hpp. References effectiveness(). |
|
not equal
Definition at line 212 of file OsiCut.hpp. Referenced by OsiColCut::operator==(). |
|
less than. True if this.effectiveness < rhs.effectiveness
Definition at line 217 of file OsiCut.hpp. References effectiveness(). |
|
less than. True if this.effectiveness > rhs.effectiveness
Definition at line 222 of file OsiCut.hpp. References effectiveness(). |
|
Returns true if the cut is consistent with respect to itself, without considering any data in the model. For example, it might check to ensure that a column index is not negative. |
|
Returns true if cut is consistent when considering the solver interface's model. For example, it might check to ensure that a column index is not greater than the number of columns in the model. Assumes consistent() is true. |
|
Returns true if the cut is infeasible "with respect to itself" and cannot be satisfied. This method does NOT check whether adding the cut to the solver interface's model will make the -model- infeasble. A cut which returns !infeasible(si) may very well make the model infeasible. (Of course, adding a cut with returns infeasible(si) will make the model infeasible.) The "with respect to itself" is in quotes becaues in the case where the cut simply replaces existing bounds, it may make sense to test infeasibility with respect to the current bounds held in the solver interface's model. For example, if the cut has a single variable in it, it might check that the maximum of new and existing lower bounds is greater than the minium of the new and existing upper bounds.
Assumes that consistent(si) is true. |
|
Returns infeasibility of the cut with respect to solution passed in i.e. is positive if cuts off that solution. solution is getNumCols() long.. |
|
Assignment operator.
|
|
Effectiveness.
Definition at line 174 of file OsiCut.hpp. Referenced by setEffectiveness(). |
|
If cut has global validity i.e. can be used anywhere in tree.
Definition at line 176 of file OsiCut.hpp. |