#include <OsiCut.hpp>
|
|
void | setEffectiveness (double e) |
| Set effectiveness.
|
|
double | effectiveness () const |
| Get effectiveness.
|
|
|
void | setGloballyValid (bool trueFalse) |
| Set globallyValid (nonzero true)
|
|
void | setGloballyValid () |
|
void | setNotGloballyValid () |
|
bool | globallyValid () const |
| Get globallyValid.
|
|
void | setGloballyValidAsInteger (int trueFalse) |
| Set globallyValid as integer (nonzero true)
|
|
int | globallyValidAsInteger () const |
| Get globallyValid.
|
|
|
virtual void | print () const |
| Print cuts in collection.
|
|
|
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
|
|
|
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.
|
|
Definition at line 35 of file OsiCut.hpp.
◆ OsiCut() [1/2]
◆ OsiCut() [2/2]
OsiCut::OsiCut |
( |
const OsiCut & | | ) |
|
|
protected |
◆ ~OsiCut()
virtual OsiCut::~OsiCut |
( |
| ) |
|
|
protectedvirtual |
◆ setEffectiveness()
void OsiCut::setEffectiveness |
( |
double | e | ) |
|
|
inline |
◆ effectiveness()
double OsiCut::effectiveness |
( |
| ) |
const |
|
inline |
◆ setGloballyValid() [1/2]
void OsiCut::setGloballyValid |
( |
bool | trueFalse | ) |
|
|
inline |
Set globallyValid (nonzero true)
Definition at line 50 of file OsiCut.hpp.
◆ setGloballyValid() [2/2]
void OsiCut::setGloballyValid |
( |
| ) |
|
|
inline |
◆ setNotGloballyValid()
void OsiCut::setNotGloballyValid |
( |
| ) |
|
|
inline |
◆ globallyValid()
bool OsiCut::globallyValid |
( |
| ) |
const |
|
inline |
Get globallyValid.
Definition at line 63 of file OsiCut.hpp.
◆ setGloballyValidAsInteger()
void OsiCut::setGloballyValidAsInteger |
( |
int | trueFalse | ) |
|
|
inline |
Set globallyValid as integer (nonzero true)
Definition at line 68 of file OsiCut.hpp.
◆ globallyValidAsInteger()
int OsiCut::globallyValidAsInteger |
( |
| ) |
const |
|
inline |
Get globallyValid.
Definition at line 73 of file OsiCut.hpp.
◆ print()
virtual void OsiCut::print |
( |
| ) |
const |
|
inlinevirtual |
◆ operator==()
bool OsiCut::operator== |
( |
const OsiCut & | rhs | ) |
const |
|
inlinevirtual |
◆ operator!=()
bool OsiCut::operator!= |
( |
const OsiCut & | rhs | ) |
const |
|
inlinevirtual |
◆ operator<()
bool OsiCut::operator< |
( |
const OsiCut & | rhs | ) |
const |
|
inlinevirtual |
less than. True if this.effectiveness < rhs.effectiveness
Definition at line 240 of file OsiCut.hpp.
◆ operator>()
bool OsiCut::operator> |
( |
const OsiCut & | rhs | ) |
const |
|
inlinevirtual |
less than. True if this.effectiveness > rhs.effectiveness
Definition at line 244 of file OsiCut.hpp.
◆ consistent() [1/2]
virtual bool OsiCut::consistent |
( |
| ) |
const |
|
inlinepure virtual |
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.
Implemented in OsiColCut, and OsiRowCut.
◆ consistent() [2/2]
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.
Implemented in OsiColCut, and OsiRowCut.
◆ infeasible()
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.
Infeasible cuts can be a useful mechanism for a cut generator to inform the solver interface that its detected infeasibility of the problem.
Implemented in OsiColCut, and OsiRowCut.
◆ violated()
virtual double OsiCut::violated |
( |
const double * | solution | ) |
const |
|
pure virtual |
Returns infeasibility of the cut with respect to solution passed in i.e.
is positive if cuts off that solution.
solution is getNumCols() long..
Implemented in OsiColCut, and OsiRowCut.
◆ operator=()
◆ effectiveness_
double OsiCut::effectiveness_ |
|
private |
◆ globallyValid_
int OsiCut::globallyValid_ |
|
private |
If cut has global validity i.e. can be used anywhere in tree.
Definition at line 203 of file OsiCut.hpp.
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/Osi-releases-0.108.9/Osi/src/Osi/OsiCut.hpp