Public Member Functions | Private Member Functions | Private Attributes
CbcBranchDynamicDecision Class Reference

Branching decision dynamic class. More...

#include <CbcBranchDynamic.hpp>

Inheritance diagram for CbcBranchDynamicDecision:
CbcBranchDecision CbcBranchDecision

List of all members.

Public Member Functions

 CbcBranchDynamicDecision ()
 CbcBranchDynamicDecision (const CbcBranchDynamicDecision &)
virtual ~CbcBranchDynamicDecision ()
virtual CbcBranchDecisionclone () const
 Clone.
virtual void initialize (CbcModel *model)
 Initialize, e.g. before the start of branch selection at a node.
virtual int betterBranch (CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numInfUp, double changeDn, int numInfDn)
 Compare two branching objects.
virtual void setBestCriterion (double value)
 Sets or gets best criterion so far.
virtual double getBestCriterion () const
virtual int whichMethod ()
 Says whether this method can handle both methods - 1 better, 2 best, 3 both.
virtual void saveBranchingObject (OsiBranchingObject *object)
 Saves a clone of current branching object.
virtual void updateInformation (OsiSolverInterface *solver, const CbcNode *node)
 Pass in information on branch just done.
 CbcBranchDynamicDecision ()
 CbcBranchDynamicDecision (const CbcBranchDynamicDecision &)
virtual ~CbcBranchDynamicDecision ()
virtual CbcBranchDecisionclone () const
 Clone.
virtual void initialize (CbcModel *model)
 Initialize, e.g. before the start of branch selection at a node.
virtual int betterBranch (CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numInfUp, double changeDn, int numInfDn)
 Compare two branching objects.
virtual void setBestCriterion (double value)
 Sets or gets best criterion so far.
virtual double getBestCriterion () const
virtual int whichMethod ()
 Says whether this method can handle both methods - 1 better, 2 best, 3 both.
virtual void saveBranchingObject (OsiBranchingObject *object)
 Saves a clone of current branching object.
virtual void updateInformation (OsiSolverInterface *solver, const CbcNode *node)
 Pass in information on branch just done.

Private Member Functions

CbcBranchDynamicDecisionoperator= (const CbcBranchDynamicDecision &rhs)
 Illegal Assignment operator.
CbcBranchDynamicDecisionoperator= (const CbcBranchDynamicDecision &rhs)
 Illegal Assignment operator.

Private Attributes

double bestCriterion_
 data
double bestChangeUp_
 Change up for best.
int bestNumberUp_
 Number of infeasibilities for up.
double bestChangeDown_
 Change down for best.
int bestNumberDown_
 Number of infeasibilities for down.
CbcBranchingObjectbestObject_
 Pointer to best branching object.

Detailed Description

Branching decision dynamic class.

This class implements a simple algorithm (betterBranch()) for choosing a branching variable when dynamic pseudo costs.

Definition at line 17 of file CbcBranchDynamic.hpp.


Constructor & Destructor Documentation

CbcBranchDynamicDecision::CbcBranchDynamicDecision ( )
CbcBranchDynamicDecision::CbcBranchDynamicDecision ( const CbcBranchDynamicDecision )
virtual CbcBranchDynamicDecision::~CbcBranchDynamicDecision ( ) [virtual]
CbcBranchDynamicDecision::CbcBranchDynamicDecision ( )
CbcBranchDynamicDecision::CbcBranchDynamicDecision ( const CbcBranchDynamicDecision )
virtual CbcBranchDynamicDecision::~CbcBranchDynamicDecision ( ) [virtual]

Member Function Documentation

virtual CbcBranchDecision* CbcBranchDynamicDecision::clone ( ) const [virtual]

Clone.

Implements CbcBranchDecision.

virtual void CbcBranchDynamicDecision::initialize ( CbcModel model) [virtual]

Initialize, e.g. before the start of branch selection at a node.

Implements CbcBranchDecision.

virtual int CbcBranchDynamicDecision::betterBranch ( CbcBranchingObject thisOne,
CbcBranchingObject bestSoFar,
double  changeUp,
int  numInfUp,
double  changeDn,
int  numInfDn 
) [virtual]

Compare two branching objects.

Return nonzero if thisOne is better than bestSoFar.

The routine compares branches using the values supplied in numInfUp and numInfDn until a solution is found by search, after which it uses the values supplied in changeUp and changeDn. The best branching object seen so far and the associated parameter values are remembered in the CbcBranchDynamicDecision object. The nonzero return value is +1 if the up branch is preferred, -1 if the down branch is preferred.

As the names imply, the assumption is that the values supplied for numInfUp and numInfDn will be the number of infeasibilities reported by the branching object, and changeUp and changeDn will be the estimated change in objective. Other measures can be used if desired.

Because an CbcBranchDynamicDecision object remembers the current best branching candidate (bestObject_) as well as the values used in the comparison, the parameter bestSoFar is redundant, hence unused.

Implements CbcBranchDecision.

virtual void CbcBranchDynamicDecision::setBestCriterion ( double  value) [virtual]

Sets or gets best criterion so far.

Reimplemented from CbcBranchDecision.

virtual double CbcBranchDynamicDecision::getBestCriterion ( ) const [virtual]

Reimplemented from CbcBranchDecision.

virtual int CbcBranchDynamicDecision::whichMethod ( ) [inline, virtual]

Says whether this method can handle both methods - 1 better, 2 best, 3 both.

Reimplemented from CbcBranchDecision.

Definition at line 61 of file CbcBranchDynamic.hpp.

virtual void CbcBranchDynamicDecision::saveBranchingObject ( OsiBranchingObject *  object) [virtual]

Saves a clone of current branching object.

Can be used to update information on object causing branch - after branch

Reimplemented from CbcBranchDecision.

virtual void CbcBranchDynamicDecision::updateInformation ( OsiSolverInterface *  solver,
const CbcNode node 
) [virtual]

Pass in information on branch just done.

assumes object can get information from solver

Reimplemented from CbcBranchDecision.

CbcBranchDynamicDecision& CbcBranchDynamicDecision::operator= ( const CbcBranchDynamicDecision rhs) [private]

Illegal Assignment operator.

virtual CbcBranchDecision* CbcBranchDynamicDecision::clone ( ) const [virtual]

Clone.

Implements CbcBranchDecision.

virtual void CbcBranchDynamicDecision::initialize ( CbcModel model) [virtual]

Initialize, e.g. before the start of branch selection at a node.

Implements CbcBranchDecision.

virtual int CbcBranchDynamicDecision::betterBranch ( CbcBranchingObject thisOne,
CbcBranchingObject bestSoFar,
double  changeUp,
int  numInfUp,
double  changeDn,
int  numInfDn 
) [virtual]

Compare two branching objects.

Return nonzero if thisOne is better than bestSoFar.

The routine compares branches using the values supplied in numInfUp and numInfDn until a solution is found by search, after which it uses the values supplied in changeUp and changeDn. The best branching object seen so far and the associated parameter values are remembered in the CbcBranchDynamicDecision object. The nonzero return value is +1 if the up branch is preferred, -1 if the down branch is preferred.

As the names imply, the assumption is that the values supplied for numInfUp and numInfDn will be the number of infeasibilities reported by the branching object, and changeUp and changeDn will be the estimated change in objective. Other measures can be used if desired.

Because an CbcBranchDynamicDecision object remembers the current best branching candidate (bestObject_) as well as the values used in the comparison, the parameter bestSoFar is redundant, hence unused.

Implements CbcBranchDecision.

virtual void CbcBranchDynamicDecision::setBestCriterion ( double  value) [virtual]

Sets or gets best criterion so far.

Reimplemented from CbcBranchDecision.

virtual double CbcBranchDynamicDecision::getBestCriterion ( ) const [virtual]

Reimplemented from CbcBranchDecision.

virtual int CbcBranchDynamicDecision::whichMethod ( ) [inline, virtual]

Says whether this method can handle both methods - 1 better, 2 best, 3 both.

Reimplemented from CbcBranchDecision.

Definition at line 61 of file CbcBranchDynamic.hpp.

virtual void CbcBranchDynamicDecision::saveBranchingObject ( OsiBranchingObject *  object) [virtual]

Saves a clone of current branching object.

Can be used to update information on object causing branch - after branch

Reimplemented from CbcBranchDecision.

virtual void CbcBranchDynamicDecision::updateInformation ( OsiSolverInterface *  solver,
const CbcNode node 
) [virtual]

Pass in information on branch just done.

assumes object can get information from solver

Reimplemented from CbcBranchDecision.

CbcBranchDynamicDecision& CbcBranchDynamicDecision::operator= ( const CbcBranchDynamicDecision rhs) [private]

Illegal Assignment operator.


Member Data Documentation

data

"best" so far

Definition at line 82 of file CbcBranchDynamic.hpp.

Change up for best.

Definition at line 85 of file CbcBranchDynamic.hpp.

Number of infeasibilities for up.

Definition at line 88 of file CbcBranchDynamic.hpp.

Change down for best.

Definition at line 91 of file CbcBranchDynamic.hpp.

Number of infeasibilities for down.

Definition at line 94 of file CbcBranchDynamic.hpp.

Pointer to best branching object.

Definition at line 97 of file CbcBranchDynamic.hpp.


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