Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
OsiCut Class Referenceabstract

#include <OsiCut.hpp>

+ Inheritance diagram for OsiCut:

Public Member Functions

Effectiveness
void setEffectiveness (double e)
 Set effectiveness. More...
 
double effectiveness () const
 Get effectiveness. More...
 
GloballyValid
void setGloballyValid (bool trueFalse)
 Set globallyValid (nonzero true) More...
 
void setGloballyValid ()
 
void setNotGloballyValid ()
 
bool globallyValid () const
 Get globallyValid. More...
 
void setGloballyValidAsInteger (int trueFalse)
 Set globallyValid as integer (nonzero true) More...
 
int globallyValidAsInteger () const
 Get globallyValid. More...
 
Debug stuff
virtual void print () const
 Print cuts in collection. More...
 
Comparison operators
virtual bool operator== (const OsiCut &rhs) const
 equal. 2 cuts are equal if there effectiveness are equal More...
 
virtual bool operator!= (const OsiCut &rhs) const
 not equal More...
 
virtual bool operator< (const OsiCut &rhs) const
 less than. True if this.effectiveness < rhs.effectiveness More...
 
virtual bool operator> (const OsiCut &rhs) const
 less than. True if this.effectiveness > rhs.effectiveness More...
 
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. More...
 
virtual bool consistent (const OsiSolverInterface &si) const =0
 Returns true if cut is consistent when considering the solver interface's model. More...
 
virtual bool infeasible (const OsiSolverInterface &si) const =0
 Returns true if the cut is infeasible "with respect to itself" and cannot be satisfied. More...
 
virtual double violated (const double *solution) const =0
 Returns infeasibility of the cut with respect to solution passed in i.e. More...
 

Protected Member Functions

Constructors and destructors
 OsiCut ()
 Default Constructor. More...
 
 OsiCut (const OsiCut &)
 Copy constructor. More...
 
OsiCutoperator= (const OsiCut &rhs)
 Assignment operator. More...
 
virtual ~OsiCut ()
 Destructor. More...
 

Private Attributes

Private member data
double effectiveness_
 Effectiveness. More...
 
int globallyValid_
 If cut has global validity i.e. can be used anywhere in tree. More...
 

Detailed Description

Definition at line 35 of file OsiCut.hpp.

Constructor & Destructor Documentation

OsiCut::OsiCut ( )
protected

Default Constructor.

OsiCut::OsiCut ( const OsiCut )
protected

Copy constructor.

virtual OsiCut::~OsiCut ( )
protectedvirtual

Destructor.

Member Function Documentation

void OsiCut::setEffectiveness ( double  e)
inline

Set effectiveness.

Definition at line 216 of file OsiCut.hpp.

double OsiCut::effectiveness ( ) const
inline

Get effectiveness.

Definition at line 217 of file OsiCut.hpp.

void OsiCut::setGloballyValid ( bool  trueFalse)
inline

Set globallyValid (nonzero true)

Definition at line 50 of file OsiCut.hpp.

void OsiCut::setGloballyValid ( )
inline

Definition at line 54 of file OsiCut.hpp.

void OsiCut::setNotGloballyValid ( )
inline

Definition at line 58 of file OsiCut.hpp.

bool OsiCut::globallyValid ( ) const
inline

Get globallyValid.

Definition at line 63 of file OsiCut.hpp.

void OsiCut::setGloballyValidAsInteger ( int  trueFalse)
inline

Set globallyValid as integer (nonzero true)

Definition at line 68 of file OsiCut.hpp.

int OsiCut::globallyValidAsInteger ( ) const
inline

Get globallyValid.

Definition at line 73 of file OsiCut.hpp.

virtual void OsiCut::print ( ) const
inlinevirtual

Print cuts in collection.

Reimplemented in OsiRowCut, and OsiColCut.

Definition at line 82 of file OsiCut.hpp.

bool OsiCut::operator== ( const OsiCut rhs) const
inlinevirtual

equal. 2 cuts are equal if there effectiveness are equal

Definition at line 232 of file OsiCut.hpp.

bool OsiCut::operator!= ( const OsiCut rhs) const
inlinevirtual

not equal

Definition at line 236 of file OsiCut.hpp.

bool OsiCut::operator< ( const OsiCut rhs) const
inlinevirtual

less than. True if this.effectiveness < rhs.effectiveness

Definition at line 240 of file OsiCut.hpp.

bool OsiCut::operator> ( const OsiCut rhs) const
inlinevirtual

less than. True if this.effectiveness > rhs.effectiveness

Definition at line 244 of file OsiCut.hpp.

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 OsiRowCut, and OsiColCut.

virtual bool OsiCut::consistent ( const OsiSolverInterface si) const
inlinepure virtual

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 OsiRowCut, and OsiColCut.

virtual bool OsiCut::infeasible ( const OsiSolverInterface si) const
inlinepure virtual

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 OsiRowCut, and OsiColCut.

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 OsiRowCut, and OsiColCut.

OsiCut& OsiCut::operator= ( const OsiCut rhs)
protected

Assignment operator.

Member Data Documentation

double OsiCut::effectiveness_
private

Effectiveness.

Definition at line 201 of file OsiCut.hpp.

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: