Public Member Functions | Protected Attributes

CbcObject Class Reference

#include <CbcObject.hpp>

Inheritance diagram for CbcObject:
CbcBranchCut CbcBranchCut CbcClique CbcClique CbcFollowOn CbcFollowOn CbcFollowOn2 CbcGeneral CbcGeneral CbcLink CbcLotsize CbcLotsize CbcNWay CbcNWay CbcSimpleInteger CbcSimpleInteger CbcSOS CbcSOS

List of all members.

Public Member Functions

 CbcObject ()
 CbcObject (CbcModel *model)
 CbcObject (const CbcObject &)
CbcObjectoperator= (const CbcObject &rhs)
virtual CbcObjectclone () const =0
 Clone.
virtual ~CbcObject ()
 Destructor.
virtual double infeasibility (const OsiBranchingInformation *, int &preferredWay) const
 Infeasibility of the object.
virtual double infeasibility (int &) const
virtual void feasibleRegion ()=0
 For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
virtual double feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const
 Dummy one for compatibility.
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.
virtual CbcBranchingObjectcreateCbcBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
 Create a branching object and indicate which way to branch first.
virtual CbcBranchingObjectcreateBranch (OsiSolverInterface *, const OsiBranchingInformation *, int)
virtual OsiBranchingObject * createOsiBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
 Create an Osibranching object and indicate which way to branch first.
virtual OsiSolverBranch * solverBranch () const
 Create an OsiSolverBranch object.
virtual CbcBranchingObjectpreferredNewFeasible () const
 Given a valid solution (with reduced costs, etc.
virtual CbcBranchingObjectnotPreferredNewFeasible () const
 Given a valid solution (with reduced costs, etc.
virtual void resetBounds (const OsiSolverInterface *)
 Reset variable bounds to their original values.
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 Returns floor and ceiling i.e.
virtual CbcObjectUpdateData createUpdateInformation (const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject)
 Pass in information on branch just done and create CbcObjectUpdateData instance.
virtual void updateInformation (const CbcObjectUpdateData &)
 Update object by CbcObjectUpdateData.
int id () const
 Identifier (normally column number in matrix).
void setId (int value)
 Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e.
bool optionalObject () const
 Return true if optional branching object i.e.
int position () const
 Get position in object_ list.
void setPosition (int position)
 Set position in object_ list.
void setModel (CbcModel *model)
 update model
CbcModelmodel () const
 Return model.
int preferredWay () const
 If -1 down always chosen first, +1 up always, 0 normal.
void setPreferredWay (int value)
 Set -1 down always chosen first, +1 up always, 0 normal.
virtual void redoSequenceEtc (CbcModel *, int, const int *)
 Redoes data when sequence numbers change.
 CbcObject ()
 CbcObject (CbcModel *model)
 CbcObject (const CbcObject &)
CbcObjectoperator= (const CbcObject &rhs)
virtual CbcObjectclone () const =0
 Clone.
virtual ~CbcObject ()
 Destructor.
virtual double infeasibility (const OsiBranchingInformation *, int &preferredWay) const
 Infeasibility of the object.
virtual double infeasibility (int &) const
virtual void feasibleRegion ()=0
 For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
virtual double feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const
 Dummy one for compatibility.
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.
virtual CbcBranchingObjectcreateCbcBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
 Create a branching object and indicate which way to branch first.
virtual CbcBranchingObjectcreateBranch (OsiSolverInterface *, const OsiBranchingInformation *, int)
virtual OsiBranchingObject * createOsiBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
 Create an Osibranching object and indicate which way to branch first.
virtual OsiSolverBranch * solverBranch () const
 Create an OsiSolverBranch object.
virtual CbcBranchingObjectpreferredNewFeasible () const
 Given a valid solution (with reduced costs, etc.
virtual CbcBranchingObjectnotPreferredNewFeasible () const
 Given a valid solution (with reduced costs, etc.
virtual void resetBounds (const OsiSolverInterface *)
 Reset variable bounds to their original values.
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 Returns floor and ceiling i.e.
virtual CbcObjectUpdateData createUpdateInformation (const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject)
 Pass in information on branch just done and create CbcObjectUpdateData instance.
virtual void updateInformation (const CbcObjectUpdateData &)
 Update object by CbcObjectUpdateData.
int id () const
 Identifier (normally column number in matrix).
void setId (int value)
 Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e.
bool optionalObject () const
 Return true if optional branching object i.e.
int position () const
 Get position in object_ list.
void setPosition (int position)
 Set position in object_ list.
void setModel (CbcModel *model)
 update model
CbcModelmodel () const
 Return model.
int preferredWay () const
 If -1 down always chosen first, +1 up always, 0 normal.
void setPreferredWay (int value)
 Set -1 down always chosen first, +1 up always, 0 normal.
virtual void redoSequenceEtc (CbcModel *, int, const int *)
 Redoes data when sequence numbers change.

Protected Attributes

CbcModelmodel_
 data
int id_
 Identifier (normally column number in matrix).
int position_
 Position in object list.
int preferredWay_
 If -1 down always chosen first, +1 up always, 0 normal.

Detailed Description

Definition at line 61 of file CbcObject.hpp.


Constructor & Destructor Documentation

CbcObject::CbcObject (  ) 
CbcObject::CbcObject ( CbcModel model  ) 
CbcObject::CbcObject ( const CbcObject  ) 
virtual CbcObject::~CbcObject (  )  [virtual]

Destructor.

CbcObject::CbcObject (  ) 
CbcObject::CbcObject ( CbcModel model  ) 
CbcObject::CbcObject ( const CbcObject  ) 
virtual CbcObject::~CbcObject (  )  [virtual]

Destructor.


Member Function Documentation

CbcObject& CbcObject::operator= ( const CbcObject rhs  ) 
virtual double CbcObject::infeasibility ( const OsiBranchingInformation *  ,
int &  preferredWay 
) const [inline, virtual]

Infeasibility of the object.

This is some measure of the infeasibility of the object. It should be scaled to be in the range [0.0, 0.5], with 0.0 indicating the object is satisfied.

The preferred branching direction is returned in preferredWay,

This is used to prepare for strong branching but should also think of case when no strong branching

The object may also compute an estimate of cost of going "up" or "down". This will probably be based on pseudo-cost ideas

Reimplemented in CbcBranchAllDifferent, CbcBranchCut, CbcLotsize, CbcBranchToFixLots, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSimpleIntegerDynamicPseudoCost, CbcSimpleIntegerPseudoCost, CbcSOS, CbcBranchAllDifferent, CbcBranchCut, CbcLotsize, CbcBranchToFixLots, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSimpleIntegerDynamicPseudoCost, CbcSimpleIntegerPseudoCost, and CbcSOS.

Definition at line 101 of file CbcObject.hpp.

virtual double CbcObject::infeasibility ( int &   )  const [inline, virtual]

Reimplemented in CbcFollowOn2, CbcLink, and CbcSimpleIntegerFixed.

Definition at line 105 of file CbcObject.hpp.

virtual void CbcObject::feasibleRegion (  )  [pure virtual]

For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.

Implemented in CbcFollowOn2, CbcLink, CbcBranchCut, CbcLotsize, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSOS, CbcBranchCut, CbcLotsize, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, and CbcSOS.

virtual double CbcObject::feasibleRegion ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info 
) const [virtual]

Dummy one for compatibility.

Reimplemented in CbcSimpleInteger, and CbcSimpleInteger.

virtual double CbcObject::feasibleRegion ( OsiSolverInterface *  solver  )  const [virtual]

For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.

Returns measure of how much it had to move solution to make feasible

virtual CbcBranchingObject* CbcObject::createCbcBranch ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info,
int  way 
) [inline, virtual]
virtual CbcBranchingObject* CbcObject::createBranch ( OsiSolverInterface *  ,
const OsiBranchingInformation *  ,
int   
) [inline, virtual]

Reimplemented in CbcSimpleIntegerFixed.

Definition at line 134 of file CbcObject.hpp.

virtual OsiBranchingObject* CbcObject::createOsiBranch ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info,
int  way 
) const [virtual]

Create an Osibranching object and indicate which way to branch first.

The branching object has to know how to create branches (fix variables, etc.)

virtual OsiSolverBranch* CbcObject::solverBranch (  )  const [virtual]

Create an OsiSolverBranch object.

This returns NULL if branch not represented by bound changes

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

virtual CbcBranchingObject* CbcObject::preferredNewFeasible (  )  const [inline, virtual]

Given a valid solution (with reduced costs, etc.

), return a branching object which would give a new feasible point in a good direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Reimplemented in CbcBranchCut, CbcLotsize, CbcBranchCut, and CbcLotsize.

Definition at line 159 of file CbcObject.hpp.

virtual CbcBranchingObject* CbcObject::notPreferredNewFeasible (  )  const [inline, virtual]

Given a valid solution (with reduced costs, etc.

), return a branching object which would give a new feasible point in a bad direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Reimplemented in CbcBranchCut, CbcLotsize, CbcBranchCut, and CbcLotsize.

Definition at line 171 of file CbcObject.hpp.

virtual void CbcObject::resetBounds ( const OsiSolverInterface *   )  [inline, virtual]

Reset variable bounds to their original values.

Bounds may be tightened, so it may be good to be able to set this info in object.

Reimplemented in CbcLotsize, CbcSimpleInteger, CbcLotsize, and CbcSimpleInteger.

Definition at line 179 of file CbcObject.hpp.

virtual void CbcObject::floorCeiling ( double &  floorValue,
double &  ceilingValue,
double  value,
double  tolerance 
) const [virtual]

Returns floor and ceiling i.e.

closest valid points

Reimplemented in CbcLotsize, and CbcLotsize.

virtual CbcObjectUpdateData CbcObject::createUpdateInformation ( const OsiSolverInterface *  solver,
const CbcNode node,
const CbcBranchingObject branchingObject 
) [virtual]

Pass in information on branch just done and create CbcObjectUpdateData instance.

If object does not need data then backward pointer will be NULL. Assumes can get information from solver

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

virtual void CbcObject::updateInformation ( const CbcObjectUpdateData  )  [inline, virtual]

Update object by CbcObjectUpdateData.

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

Definition at line 194 of file CbcObject.hpp.

int CbcObject::id (  )  const [inline]

Identifier (normally column number in matrix).

Definition at line 197 of file CbcObject.hpp.

void CbcObject::setId ( int  value  )  [inline]

Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e.

code would work without it

Definition at line 204 of file CbcObject.hpp.

bool CbcObject::optionalObject (  )  const [inline]

Return true if optional branching object i.e.

code would work without it

Definition at line 210 of file CbcObject.hpp.

int CbcObject::position (  )  const [inline]

Get position in object_ list.

Definition at line 215 of file CbcObject.hpp.

void CbcObject::setPosition ( int  position  )  [inline]

Set position in object_ list.

Definition at line 220 of file CbcObject.hpp.

void CbcObject::setModel ( CbcModel model  )  [inline]

update model

Definition at line 225 of file CbcObject.hpp.

CbcModel* CbcObject::model (  )  const [inline]

Return model.

Definition at line 230 of file CbcObject.hpp.

int CbcObject::preferredWay (  )  const [inline]

If -1 down always chosen first, +1 up always, 0 normal.

Definition at line 235 of file CbcObject.hpp.

void CbcObject::setPreferredWay ( int  value  )  [inline]

Set -1 down always chosen first, +1 up always, 0 normal.

Definition at line 239 of file CbcObject.hpp.

virtual void CbcObject::redoSequenceEtc ( CbcModel ,
int  ,
const int *   
) [inline, virtual]

Redoes data when sequence numbers change.

Reimplemented in CbcBranchToFixLots, CbcClique, CbcGeneral, CbcNWay, CbcSOS, CbcBranchToFixLots, CbcClique, CbcGeneral, CbcNWay, and CbcSOS.

Definition at line 243 of file CbcObject.hpp.

CbcObject& CbcObject::operator= ( const CbcObject rhs  ) 
virtual double CbcObject::infeasibility ( const OsiBranchingInformation *  ,
int &  preferredWay 
) const [inline, virtual]

Infeasibility of the object.

This is some measure of the infeasibility of the object. It should be scaled to be in the range [0.0, 0.5], with 0.0 indicating the object is satisfied.

The preferred branching direction is returned in preferredWay,

This is used to prepare for strong branching but should also think of case when no strong branching

The object may also compute an estimate of cost of going "up" or "down". This will probably be based on pseudo-cost ideas

Reimplemented in CbcBranchAllDifferent, CbcBranchCut, CbcLotsize, CbcBranchToFixLots, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSimpleIntegerDynamicPseudoCost, CbcSimpleIntegerPseudoCost, CbcSOS, CbcBranchAllDifferent, CbcBranchCut, CbcLotsize, CbcBranchToFixLots, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSimpleIntegerDynamicPseudoCost, CbcSimpleIntegerPseudoCost, and CbcSOS.

Definition at line 101 of file CbcObject.hpp.

virtual double CbcObject::infeasibility ( int &   )  const [inline, virtual]

Reimplemented in CbcFollowOn2, CbcLink, and CbcSimpleIntegerFixed.

Definition at line 105 of file CbcObject.hpp.

virtual void CbcObject::feasibleRegion (  )  [pure virtual]

For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.

Implemented in CbcFollowOn2, CbcLink, CbcBranchCut, CbcLotsize, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, CbcSOS, CbcBranchCut, CbcLotsize, CbcClique, CbcFollowOn, CbcGeneral, CbcNWay, CbcSimpleInteger, and CbcSOS.

virtual double CbcObject::feasibleRegion ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info 
) const [virtual]

Dummy one for compatibility.

Reimplemented in CbcSimpleInteger, and CbcSimpleInteger.

virtual double CbcObject::feasibleRegion ( OsiSolverInterface *  solver  )  const [virtual]

For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.

Returns measure of how much it had to move solution to make feasible

virtual CbcBranchingObject* CbcObject::createCbcBranch ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info,
int  way 
) [inline, virtual]
virtual CbcBranchingObject* CbcObject::createBranch ( OsiSolverInterface *  ,
const OsiBranchingInformation *  ,
int   
) [inline, virtual]

Reimplemented in CbcSimpleIntegerFixed.

Definition at line 134 of file CbcObject.hpp.

virtual OsiBranchingObject* CbcObject::createOsiBranch ( OsiSolverInterface *  solver,
const OsiBranchingInformation *  info,
int  way 
) const [virtual]

Create an Osibranching object and indicate which way to branch first.

The branching object has to know how to create branches (fix variables, etc.)

virtual OsiSolverBranch* CbcObject::solverBranch (  )  const [virtual]

Create an OsiSolverBranch object.

This returns NULL if branch not represented by bound changes

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

virtual CbcBranchingObject* CbcObject::preferredNewFeasible (  )  const [inline, virtual]

Given a valid solution (with reduced costs, etc.

), return a branching object which would give a new feasible point in a good direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Reimplemented in CbcBranchCut, CbcLotsize, CbcBranchCut, and CbcLotsize.

Definition at line 159 of file CbcObject.hpp.

virtual CbcBranchingObject* CbcObject::notPreferredNewFeasible (  )  const [inline, virtual]

Given a valid solution (with reduced costs, etc.

), return a branching object which would give a new feasible point in a bad direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Reimplemented in CbcBranchCut, CbcLotsize, CbcBranchCut, and CbcLotsize.

Definition at line 171 of file CbcObject.hpp.

virtual void CbcObject::resetBounds ( const OsiSolverInterface *   )  [inline, virtual]

Reset variable bounds to their original values.

Bounds may be tightened, so it may be good to be able to set this info in object.

Reimplemented in CbcLotsize, CbcSimpleInteger, CbcLotsize, and CbcSimpleInteger.

Definition at line 179 of file CbcObject.hpp.

virtual void CbcObject::floorCeiling ( double &  floorValue,
double &  ceilingValue,
double  value,
double  tolerance 
) const [virtual]

Returns floor and ceiling i.e.

closest valid points

Reimplemented in CbcLotsize, and CbcLotsize.

virtual CbcObjectUpdateData CbcObject::createUpdateInformation ( const OsiSolverInterface *  solver,
const CbcNode node,
const CbcBranchingObject branchingObject 
) [virtual]

Pass in information on branch just done and create CbcObjectUpdateData instance.

If object does not need data then backward pointer will be NULL. Assumes can get information from solver

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

virtual void CbcObject::updateInformation ( const CbcObjectUpdateData  )  [inline, virtual]

Update object by CbcObjectUpdateData.

Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSOS, CbcSimpleIntegerDynamicPseudoCost, and CbcSOS.

Definition at line 194 of file CbcObject.hpp.

int CbcObject::id (  )  const [inline]

Identifier (normally column number in matrix).

Definition at line 197 of file CbcObject.hpp.

void CbcObject::setId ( int  value  )  [inline]

Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e.

code would work without it

Definition at line 204 of file CbcObject.hpp.

bool CbcObject::optionalObject (  )  const [inline]

Return true if optional branching object i.e.

code would work without it

Definition at line 210 of file CbcObject.hpp.

int CbcObject::position (  )  const [inline]

Get position in object_ list.

Definition at line 215 of file CbcObject.hpp.

void CbcObject::setPosition ( int  position  )  [inline]

Set position in object_ list.

Definition at line 220 of file CbcObject.hpp.

void CbcObject::setModel ( CbcModel model  )  [inline]

update model

Definition at line 225 of file CbcObject.hpp.

CbcModel* CbcObject::model (  )  const [inline]

Return model.

Definition at line 230 of file CbcObject.hpp.

int CbcObject::preferredWay (  )  const [inline]

If -1 down always chosen first, +1 up always, 0 normal.

Definition at line 235 of file CbcObject.hpp.

void CbcObject::setPreferredWay ( int  value  )  [inline]

Set -1 down always chosen first, +1 up always, 0 normal.

Definition at line 239 of file CbcObject.hpp.

virtual void CbcObject::redoSequenceEtc ( CbcModel ,
int  ,
const int *   
) [inline, virtual]

Redoes data when sequence numbers change.

Reimplemented in CbcBranchToFixLots, CbcClique, CbcGeneral, CbcNWay, CbcSOS, CbcBranchToFixLots, CbcClique, CbcGeneral, CbcNWay, and CbcSOS.

Definition at line 243 of file CbcObject.hpp.


Member Data Documentation

CbcModel * CbcObject::model_ [protected]

data

Model

Definition at line 249 of file CbcObject.hpp.

int CbcObject::id_ [protected]

Identifier (normally column number in matrix).

Definition at line 251 of file CbcObject.hpp.

int CbcObject::position_ [protected]

Position in object list.

Definition at line 253 of file CbcObject.hpp.

int CbcObject::preferredWay_ [protected]

If -1 down always chosen first, +1 up always, 0 normal.

Reimplemented in CbcSimpleInteger.

Definition at line 255 of file CbcObject.hpp.


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