Blis 0.94
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BlisBranchObjectInt Class Reference

#include <BlisBranchObjectInt.h>

+ Inheritance diagram for BlisBranchObjectInt:
+ Collaboration diagram for BlisBranchObjectInt:

Public Member Functions

 BlisBranchObjectInt ()
 Default constructor. More...
 
 BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double value)
 Construct a branching object, which branching on variable varInd. More...
 
 BlisBranchObjectInt (BlisModel *model, int varInd, int intScore, double dblScore, int direction, double value)
 Construct a branching object, which branching on variable varInd. More...
 
 BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double lowerValue, double upperValue)
 Create a degenerate branching object. More...
 
 BlisBranchObjectInt (const BlisBranchObjectInt &)
 Copy constructor. More...
 
BlisBranchObjectIntoperator= (const BlisBranchObjectInt &rhs)
 Assignment operator. More...
 
virtual BcpsBranchObjectclone () const
 Clone. More...
 
virtual ~BlisBranchObjectInt ()
 Destructor. More...
 
virtual double branch (bool normalBranch=false)
 Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. More...
 
virtual void print (bool normalBranch)
 Print something about branch - only if log level high. More...
 
const double * getDown () const
 Get down arm bounds. More...
 
const double * getUp () const
 Get upper arm bounds. More...
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 Pack to an encoded object. More...
 
virtual AlpsReturnStatus decode (AlpsEncoded &encoded)
 Unpack a branching object from an encoded object. More...
 
- Public Member Functions inherited from BcpsBranchObject
 BcpsBranchObject ()
 
 BcpsBranchObject (BcpsModel *model)
 
 BcpsBranchObject (BcpsModel *model, int objectIndex, int direction, double value)
 
 BcpsBranchObject (BcpsModel *model, int objectIndex, double upScore, double downScore, int direction, double value)
 
 BcpsBranchObject (const BcpsBranchObject &)
 
virtual ~BcpsBranchObject ()
 
BcpsBranchObjectoperator= (const BcpsBranchObject &rhs)
 
virtual BcpsBranchObjectclone () const=0
 
int getType ()
 
void setType (int t)
 
virtual int numBranches () const
 
virtual int numBranchesLeft () const
 
virtual double branch (bool normalBranch=false)=0
 
virtual void print (bool normalBranch)
 
virtual bool boundBranch () const
 
int getObjectIndex () const
 
void setObjectIndex (int ind)
 
double getUpScore () const
 
void setUpScore (double score)
 
double getDownScore () const
 
void setDownScore (double score)
 
int getDirection () const
 
void setDirection (int direction)
 
double getValue () const
 
BcpsModelmodel () const
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded) const
 
virtual AlpsReturnStatus decode (AlpsEncoded &encoded)
 

Protected Member Functions

AlpsReturnStatus encodeBlis (AlpsEncoded *encoded) const
 Pack Blis portion to an encoded object. More...
 
AlpsReturnStatus decodeBlis (AlpsEncoded &encoded)
 Unpack Blis portion from an encoded object. More...
 
- Protected Member Functions inherited from BcpsBranchObject
AlpsReturnStatus encodeBcps (AlpsEncoded *encoded) const
 
AlpsReturnStatus decodeBcps (AlpsEncoded &encoded)
 

Protected Attributes

double down_ [2]
 Down_[0]: the lower bound of down arm; Down_[1]: the upper bound of down arm;. More...
 
double up_ [2]
 Up_[0]: the lower bound of upper arm; Up_[1]: the upper bound of upper arm;. More...
 
- Protected Attributes inherited from BcpsBranchObject
int type_
 
BcpsModelmodel_
 
int objectIndex_
 
double upScore_
 
double downScore_
 
int direction_
 
double value_
 
int numBranchesLeft_
 

Detailed Description

Definition at line 38 of file BlisBranchObjectInt.h.

Constructor & Destructor Documentation

◆ BlisBranchObjectInt() [1/5]

BlisBranchObjectInt::BlisBranchObjectInt ( )
inline

Default constructor.

Definition at line 53 of file BlisBranchObjectInt.h.

◆ BlisBranchObjectInt() [2/5]

BlisBranchObjectInt::BlisBranchObjectInt ( BlisModel model,
int  varInd,
int  direction,
double  value 
)
inline

Construct a branching object, which branching on variable varInd.

Parameters
varIndthe index of integer variable in object set
directionthe direction of first branching: 1(up), -1(down)
valuethe fractional solution value of variable varInd

Definition at line 69 of file BlisBranchObjectInt.h.

◆ BlisBranchObjectInt() [3/5]

BlisBranchObjectInt::BlisBranchObjectInt ( BlisModel model,
int  varInd,
int  intScore,
double  dblScore,
int  direction,
double  value 
)
inline

Construct a branching object, which branching on variable varInd.

Parameters
varIndthe index of integer variable in object set
intScorethe integer score/goodness
dblScorethe double score/goodness
directionthe direction of first branching: 1(up), -1(down)
valuethe fractional solution value of variable varInd

Definition at line 91 of file BlisBranchObjectInt.h.

◆ BlisBranchObjectInt() [4/5]

BlisBranchObjectInt::BlisBranchObjectInt ( BlisModel model,
int  varInd,
int  direction,
double  lowerValue,
double  upperValue 
)
inline

Create a degenerate branching object.

Specifies a ‘one-direction branch’. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix a variable when lowerValue = upperValue.

Definition at line 113 of file BlisBranchObjectInt.h.

◆ BlisBranchObjectInt() [5/5]

BlisBranchObjectInt::BlisBranchObjectInt ( const BlisBranchObjectInt )

Copy constructor.

◆ ~BlisBranchObjectInt()

virtual BlisBranchObjectInt::~BlisBranchObjectInt ( )
inlinevirtual

Destructor.

Definition at line 141 of file BlisBranchObjectInt.h.

Member Function Documentation

◆ operator=()

BlisBranchObjectInt & BlisBranchObjectInt::operator= ( const BlisBranchObjectInt rhs)

Assignment operator.

◆ clone()

virtual BcpsBranchObject * BlisBranchObjectInt::clone ( ) const
inlinevirtual

Clone.

Implements BcpsBranchObject.

Definition at line 136 of file BlisBranchObjectInt.h.

◆ branch()

virtual double BlisBranchObjectInt::branch ( bool  normalBranch = false)
virtual

Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm.

Returns change in guessed objective on next branch.

Implements BcpsBranchObject.

◆ print()

virtual void BlisBranchObjectInt::print ( bool  normalBranch)
virtual

Print something about branch - only if log level high.

Reimplemented from BcpsBranchObject.

◆ getDown()

const double * BlisBranchObjectInt::getDown ( ) const
inline

Get down arm bounds.

Definition at line 152 of file BlisBranchObjectInt.h.

◆ getUp()

const double * BlisBranchObjectInt::getUp ( ) const
inline

Get upper arm bounds.

Definition at line 155 of file BlisBranchObjectInt.h.

◆ encodeBlis()

AlpsReturnStatus BlisBranchObjectInt::encodeBlis ( AlpsEncoded encoded) const
inlineprotected

Pack Blis portion to an encoded object.

Definition at line 160 of file BlisBranchObjectInt.h.

◆ decodeBlis()

AlpsReturnStatus BlisBranchObjectInt::decodeBlis ( AlpsEncoded encoded)
inlineprotected

Unpack Blis portion from an encoded object.

Definition at line 176 of file BlisBranchObjectInt.h.

◆ encode()

virtual AlpsReturnStatus BlisBranchObjectInt::encode ( AlpsEncoded encoded) const
inlinevirtual

Pack to an encoded object.

Reimplemented from BcpsBranchObject.

Definition at line 193 of file BlisBranchObjectInt.h.

◆ decode()

virtual AlpsReturnStatus BlisBranchObjectInt::decode ( AlpsEncoded encoded)
inlinevirtual

Unpack a branching object from an encoded object.

Reimplemented from BcpsBranchObject.

Definition at line 203 of file BlisBranchObjectInt.h.

Member Data Documentation

◆ down_

double BlisBranchObjectInt::down_[2]
protected

Down_[0]: the lower bound of down arm; Down_[1]: the upper bound of down arm;.

Definition at line 44 of file BlisBranchObjectInt.h.

◆ up_

double BlisBranchObjectInt::up_[2]
protected

Up_[0]: the lower bound of upper arm; Up_[1]: the upper bound of upper arm;.

Definition at line 48 of file BlisBranchObjectInt.h.


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