Cbc 2.10.12
Loading...
Searching...
No Matches
CbcIntegerPseudoCostBranchingObject Class Reference

Simple branching object for an integer variable with pseudo costs. More...

#include <CbcSimpleIntegerDynamicPseudoCost.hpp>

Inheritance diagram for CbcIntegerPseudoCostBranchingObject:
Collaboration diagram for CbcIntegerPseudoCostBranchingObject:

Public Member Functions

 CbcIntegerPseudoCostBranchingObject ()
 Default constructor.
 CbcIntegerPseudoCostBranchingObject (CbcModel *model, int variable, int way, double value)
 Create a standard floor/ceiling branch object.
virtual double branch ()
 Create a degenerate branch object.
*Change in guessed double changeInGuessed () const
*Set change in guessed void setChangeInGuessed (double value)
virtual CbcBranchObjType type () const
 Return the type (an integer identifier) of this.
virtual CbcRangeCompare compareBranchingObject (const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
 Compare the this with brObj.
Public Member Functions inherited from CbcIntegerBranchingObject
 CbcIntegerBranchingObject ()
 Default constructor.
 CbcIntegerBranchingObject (CbcModel *model, int variable, int way, double value)
 Create a standard floor/ceiling branch object.
virtual void fix (OsiSolverInterface *solver, double *lower, double *upper, int branchState) const
 Update bounds in solver as in 'branch' and update given bounds.
virtual bool tighten (OsiSolverInterface *)
 Change (tighten) bounds in object to reflect bounds in solver.
virtual void print ()
 Print something about branch - only if log level high.
*Lower and upper bounds for down branch const double * downBounds () const
*Lower and upper bounds for up branch const double * upBounds () const
*Set lower and upper bounds for down branch void setDownBounds (const double bounds[2])
*Set lower and upper bounds for up branch void setUpBounds (const double bounds[2])
virtual void print () const
 Print something about branch - only if log level high.
Public Member Functions inherited from CbcBranchingObject
 CbcBranchingObject ()
 Default Constructor.
 CbcBranchingObject (CbcModel *model, int variable, int way, double value)
 Constructor.
 CbcBranchingObject (const CbcBranchingObject &)
 Copy constructor.
CbcBranchingObjectoperator= (const CbcBranchingObject &rhs)
 Assignment operator.
virtual CbcBranchingObjectclone () const =0
 Clone.
virtual ~CbcBranchingObject ()
 Destructor.
virtual int fillStrongInfo (CbcStrongInfo &)
 Some branchingObjects may claim to be able to skip strong branching.
void resetNumberBranchesLeft ()
 Reset number of branches left to original.
void setNumberBranches (int value)
 Set number of branches to do.
virtual double branch (OsiSolverInterface *)
 Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.
virtual void previousBranch ()
 Reset every information so that the branching object appears to point to the previous child.
int variable () const
 Index identifying the associated CbcObject within its class.
int way () const
 Get the state of the branching object.
void way (int way)
 Set the state of the branching object.
void setModel (CbcModel *model)
 update model
CbcModelmodel () const
 Return model.
CbcObject * object () const
 Return pointer back to object which created.
void setOriginalObject (CbcObject *object)
 Set pointer back to object which created.
virtual int compareOriginalObject (const CbcBranchingObject *brObj) const
 Compare the original object of this with the original object of brObj.

Protected Attributes

*Change in guessed objective value for next branch double changeInGuessed_
Protected Attributes inherited from CbcBranchingObject
CbcModelmodel_
 The model that owns this branching object.
CbcObject * originalCbcObject_
 Pointer back to object which created.
int variable_
 Branching variable (0 is first integer).
int way_
 The state of the branching object.

Additional Inherited Members

Protected Member Functions inherited from CbcIntegerBranchingObject
*Lower[0] and upper[1] bounds for the down arm (way_=-1) double down_[2]
*Lower[0] and upper[1] bounds for the up arm (way_=1) double up_[2]

Detailed Description

Simple branching object for an integer variable with pseudo costs.

This object can specify a two-way branch on an integer variable. For each arm of the branch, the upper and lower bounds on the variable can be independently specified.

Variable_ holds the index of the integer variable in the integerVariable_ array of the model.

Definition at line 433 of file CbcSimpleIntegerDynamicPseudoCost.hpp.

Constructor & Destructor Documentation

◆ CbcIntegerPseudoCostBranchingObject() [1/2]

CbcIntegerPseudoCostBranchingObject::CbcIntegerPseudoCostBranchingObject ( )

Default constructor.

◆ CbcIntegerPseudoCostBranchingObject() [2/2]

CbcIntegerPseudoCostBranchingObject::CbcIntegerPseudoCostBranchingObject ( CbcModel * model,
int variable,
int way,
double value )

Create a standard floor/ceiling branch object.

Specifies a simple two-way branch. Let value = x*. One arm of the branch will be is lb <= x <= floor(x*), the other ceil(x*) <= x <= ub. Specify way = -1 to set the object state to perform the down arm first, way = 1 for the up arm.

Member Function Documentation

◆ branch()

virtual double CbcIntegerPseudoCostBranchingObject::branch ( )
virtual

Create a degenerate branch object.

Specifies a `one-way branch'. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix a variable when lowerValue = upperValue. */

CbcIntegerPseudoCostBranchingObject(CbcModel *model, int variable, int way, double lowerValue, double upperValue);

Copy constructor CbcIntegerPseudoCostBranchingObject(const CbcIntegerPseudoCostBranchingObject &);

Assignment operator CbcIntegerPseudoCostBranchingObject &operator=(const CbcIntegerPseudoCostBranchingObject &rhs);

Clone virtual CbcBranchingObject *clone() const;

Destructor virtual ~CbcIntegerPseudoCostBranchingObject();

using CbcBranchingObject::branch; /** Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. This version also changes guessed objective value

Reimplemented from CbcIntegerBranchingObject.

◆ changeInGuessed()

*Change in guessed double CbcIntegerPseudoCostBranchingObject::changeInGuessed ( ) const
inline

Definition at line 479 of file CbcSimpleIntegerDynamicPseudoCost.hpp.

◆ setChangeInGuessed()

*Set change in guessed void CbcIntegerPseudoCostBranchingObject::setChangeInGuessed ( double value)
inline

Definition at line 484 of file CbcSimpleIntegerDynamicPseudoCost.hpp.

◆ type()

virtual CbcBranchObjType CbcIntegerPseudoCostBranchingObject::type ( ) const
inlinevirtual

Return the type (an integer identifier) of this.

Reimplemented from CbcIntegerBranchingObject.

Definition at line 490 of file CbcSimpleIntegerDynamicPseudoCost.hpp.

◆ compareBranchingObject()

virtual CbcRangeCompare CbcIntegerPseudoCostBranchingObject::compareBranchingObject ( const CbcBranchingObject * brObj,
const bool replaceIfOverlap = false )
virtual

Compare the this with brObj.

this and brObj must be os the same type and must have the same original object, but they may have different feasible regions. Return the appropriate CbcRangeCompare value (first argument being the sub/superset if that's the case). In case of overlap (and if replaceIfOverlap is true) replace the current branching object with one whose feasible region is the overlap.

Reimplemented from CbcIntegerBranchingObject.

Member Data Documentation

◆ changeInGuessed_

* Change in guessed objective value for next branch double CbcIntegerPseudoCostBranchingObject::changeInGuessed_
protected

Definition at line 507 of file CbcSimpleIntegerDynamicPseudoCost.hpp.


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