Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
OsiSOS Class Reference

Define Special Ordered Sets of type 1 and 2. More...

#include <OsiBranchingObject.hpp>

+ Inheritance diagram for OsiSOS:
+ Collaboration diagram for OsiSOS:

Public Member Functions

 OsiSOS ()
 
 OsiSOS (const OsiSolverInterface *solver, int numberMembers, const int *which, const double *weights, int type=1)
 Useful constructor - which are indices and weights are also given. More...
 
 OsiSOS (const OsiSOS &)
 
virtual OsiObjectclone () const
 Clone. More...
 
OsiSOSoperator= (const OsiSOS &rhs)
 
virtual ~OsiSOS ()
 
virtual double infeasibility (const OsiBranchingInformation *info, int &whichWay) const
 Infeasibility - large is 0.5. More...
 
virtual double feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const
 Set bounds to fix the variable at the current (integer) value. More...
 
virtual OsiBranchingObjectcreateBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
 Creates a branching object. More...
 
virtual double upEstimate () const
 Return "up" estimate (default 1.0e-5) More...
 
virtual double downEstimate () const
 Return "down" estimate (default 1.0e-5) More...
 
virtual void resetSequenceEtc (int numberColumns, const int *originalColumns)
 Redoes data when sequence numbers change. More...
 
int numberMembers () const
 Number of members. More...
 
const int * members () const
 Members (indices in range 0 ... numberColumns-1) More...
 
int sosType () const
 SOS type. More...
 
int setType () const
 SOS type. More...
 
const double * weights () const
 Array of weights. More...
 
virtual bool canDoHeuristics () const
 Return true if object can take part in normal heuristics. More...
 
void setIntegerValued (bool yesNo)
 Set whether set is integer valued or not. More...
 
virtual bool canHandleShadowPrices () const
 Return true if knows how to deal with Pseudo Shadow Prices. More...
 
void setNumberMembers (int value)
 Set number of members. More...
 
int * mutableMembers () const
 Members (indices in range 0 ... numberColumns-1) More...
 
void setSosType (int value)
 Set SOS type. More...
 
double * mutableWeights () const
 Array of weights. More...
 
- Public Member Functions inherited from OsiObject2
 OsiObject2 ()
 Default Constructor. More...
 
 OsiObject2 (const OsiObject2 &)
 Copy constructor. More...
 
OsiObject2operator= (const OsiObject2 &rhs)
 Assignment operator. More...
 
virtual ~OsiObject2 ()
 Destructor. More...
 
void setPreferredWay (int value)
 Set preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More...
 
virtual int preferredWay () const
 Get preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More...
 
- Public Member Functions inherited from OsiObject
 OsiObject ()
 Default Constructor. More...
 
 OsiObject (const OsiObject &)
 Copy constructor. More...
 
OsiObjectoperator= (const OsiObject &rhs)
 Assignment operator. More...
 
virtual ~OsiObject ()
 Destructor. More...
 
double infeasibility (const OsiSolverInterface *solver, int &whichWay) const
 Infeasibility of the object. More...
 
virtual double checkInfeasibility (const OsiBranchingInformation *info) const
 
virtual double feasibleRegion (OsiSolverInterface *solver) const
 For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More...
 
virtual bool canMoveToNearest () const
 Return true if object can take part in move to nearest heuristic. More...
 
virtual int columnNumber () const
 Column number if single column object -1 otherwise, Used by heuristics. More...
 
int priority () const
 Return Priority - note 1 is highest priority. More...
 
void setPriority (int priority)
 Set priority. More...
 
virtual bool boundBranch () const
 Return true if branch should only bound variables. More...
 
int numberWays () const
 Return maximum number of ways branch may have. More...
 
void setNumberWays (int numberWays)
 Set maximum number of ways branch may have. More...
 
void setWhichWay (int way)
 Return preferred way to branch. More...
 
int whichWay () const
 Return current preferred way to branch. More...
 
double infeasibility () const
 Return infeasibility. More...
 
virtual void resetBounds (const OsiSolverInterface *)
 Reset variable bounds to their original values. More...
 
virtual void updateBefore (const OsiObject *)
 Updates stuff like pseudocosts before threads. More...
 
virtual void updateAfter (const OsiObject *, const OsiObject *)
 Updates stuff like pseudocosts after threads finished. More...
 

Protected Attributes

int * members_
 data More...
 
double * weights_
 Weights. More...
 
int numberMembers_
 Number of members. More...
 
int sosType_
 SOS type. More...
 
bool integerValued_
 Whether integer valued. More...
 
- Protected Attributes inherited from OsiObject2
int preferredWay_
 Preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More...
 
double otherInfeasibility_
 "Infeasibility" on other way More...
 
- Protected Attributes inherited from OsiObject
double infeasibility_
 data More...
 
short whichWay_
 Computed preferred way to branch. More...
 
short numberWays_
 Maximum number of ways on branch. More...
 
int priority_
 Priority. More...
 

Detailed Description

Define Special Ordered Sets of type 1 and 2.

These do not have to be integer - so do not appear in lists of integers.

which_ points columns of matrix

Definition at line 674 of file OsiBranchingObject.hpp.

Constructor & Destructor Documentation

OsiSOS::OsiSOS ( )
OsiSOS::OsiSOS ( const OsiSolverInterface solver,
int  numberMembers,
const int *  which,
const double *  weights,
int  type = 1 
)

Useful constructor - which are indices and weights are also given.

If null then 0,1,2.. type is SOS type

OsiSOS::OsiSOS ( const OsiSOS )
virtual OsiSOS::~OsiSOS ( )
virtual

Member Function Documentation

virtual OsiObject* OsiSOS::clone ( ) const
virtual

Clone.

Implements OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

OsiSOS& OsiSOS::operator= ( const OsiSOS rhs)
virtual double OsiSOS::infeasibility ( const OsiBranchingInformation info,
int &  whichWay 
) const
virtual

Infeasibility - large is 0.5.

Implements OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

virtual double OsiSOS::feasibleRegion ( OsiSolverInterface solver,
const OsiBranchingInformation info 
) const
virtual

Set bounds to fix the variable at the current (integer) value.

Given an integer value, set the lower and upper bounds to fix the variable. Returns amount it had to move variable.

Implements OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

virtual OsiBranchingObject* OsiSOS::createBranch ( OsiSolverInterface solver,
const OsiBranchingInformation info,
int  way 
) const
virtual

Creates a branching object.

The preferred direction is set by way, 0 for down, 1 for up.

Reimplemented from OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

virtual double OsiSOS::upEstimate ( ) const
virtual

Return "up" estimate (default 1.0e-5)

Reimplemented from OsiObject.

virtual double OsiSOS::downEstimate ( ) const
virtual

Return "down" estimate (default 1.0e-5)

Reimplemented from OsiObject.

virtual void OsiSOS::resetSequenceEtc ( int  numberColumns,
const int *  originalColumns 
)
virtual

Redoes data when sequence numbers change.

Reimplemented from OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

int OsiSOS::numberMembers ( ) const
inline

Number of members.

Definition at line 726 of file OsiBranchingObject.hpp.

const int* OsiSOS::members ( ) const
inline

Members (indices in range 0 ... numberColumns-1)

Definition at line 730 of file OsiBranchingObject.hpp.

int OsiSOS::sosType ( ) const
inline

SOS type.

Definition at line 734 of file OsiBranchingObject.hpp.

int OsiSOS::setType ( ) const
inline

SOS type.

Definition at line 738 of file OsiBranchingObject.hpp.

const double* OsiSOS::weights ( ) const
inline

Array of weights.

Definition at line 742 of file OsiBranchingObject.hpp.

virtual bool OsiSOS::canDoHeuristics ( ) const
inlinevirtual

Return true if object can take part in normal heuristics.

Reimplemented from OsiObject.

Reimplemented in OsiLink, and OsiOldLink.

Definition at line 747 of file OsiBranchingObject.hpp.

void OsiSOS::setIntegerValued ( bool  yesNo)
inline

Set whether set is integer valued or not.

Definition at line 750 of file OsiBranchingObject.hpp.

virtual bool OsiSOS::canHandleShadowPrices ( ) const
inlinevirtual

Return true if knows how to deal with Pseudo Shadow Prices.

Reimplemented from OsiObject.

Definition at line 753 of file OsiBranchingObject.hpp.

void OsiSOS::setNumberMembers ( int  value)
inline

Set number of members.

Definition at line 756 of file OsiBranchingObject.hpp.

int* OsiSOS::mutableMembers ( ) const
inline

Members (indices in range 0 ... numberColumns-1)

Definition at line 760 of file OsiBranchingObject.hpp.

void OsiSOS::setSosType ( int  value)
inline

Set SOS type.

Definition at line 764 of file OsiBranchingObject.hpp.

double* OsiSOS::mutableWeights ( ) const
inline

Array of weights.

Definition at line 768 of file OsiBranchingObject.hpp.

Member Data Documentation

int* OsiSOS::members_
protected

data

Members (indices in range 0 ... numberColumns-1)

Definition at line 774 of file OsiBranchingObject.hpp.

double* OsiSOS::weights_
protected

Weights.

Definition at line 776 of file OsiBranchingObject.hpp.

int OsiSOS::numberMembers_
protected

Number of members.

Definition at line 779 of file OsiBranchingObject.hpp.

int OsiSOS::sosType_
protected

SOS type.

Definition at line 781 of file OsiBranchingObject.hpp.

bool OsiSOS::integerValued_
protected

Whether integer valued.

Definition at line 783 of file OsiBranchingObject.hpp.


The documentation for this class was generated from the following file: