BcpsObject Class Reference

A class for describing the objects that comprise a BCPS subproblem. More...

#include <BcpsObject.h>

Inheritance diagram for BcpsObject:
Inheritance graph
[legend]
Collaboration diagram for BcpsObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BcpsObject ()
 BcpsObject (double lbh, double ubh, double lbs, double ubs)
virtual ~BcpsObject ()
 BcpsObject (const BcpsObject &rhs)
 Copy constructor.
BcpsObjectoperator= (const BcpsObject &rhs)
 Assignment operator.
virtual BcpsObjectclone () const
 Clone an enity.
virtual double infeasibility (BcpsModel *m, int &preferredWay) const
 Infeasibility of the object This is some measure of the infeasibility of the object.
virtual void feasibleRegion (BcpsModel *m)
 Look at the current solution and set bounds to match the solution.
virtual BcpsBranchObjectcreateBranchObject (BcpsModel *m, int way) const
 Create a branching object and indicate which way to branch first.
virtual BcpsBranchObjectpreferredNewFeasible (BcpsModel *m) const
 Given a valid solution (with reduced costs, etc.
virtual BcpsBranchObjectnotPreferredNewFeasible (BcpsModel *m) const
 Given a valid solution (with reduced costs, etc.
virtual void resetBounds (BcpsModel *m)
 Reset variable bounds to their original values.
virtual bool boundBranch (BcpsModel *m) const
 Return true if branches created by object will modify variable bounds.
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 Returns floor and ceiling i.e.
virtual double upEstimate () const
 Return "up" estimate.
virtual double downEstimate () const
 Return "down" estimate.
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object.
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const
 Decode a constraint from an encoded object.



int getObjectIndex () const
 Return the value of the appropriate field.
BcpsObjRep_t getRepType () const
 Return the value of the appropriate field.
BcpsIntegral_t getIntType () const
 Return the value of the appropriate field.
BcpsValidRegion getValidRegion () const
 Return the value of the appropriate field.
int getStatus () const
 Return the value of the appropriate field.
double getLbHard () const
 Return the value of the appropriate field.
double getUbHard () const
 Return the value of the appropriate field.
double getLbSoft () const
 Return the value of the appropriate field.
double getUbSoft () const
 Return the value of the appropriate field.
int getNumInactive () const
 Return the value of the appropriate field.
double getEffectiveness () const
 Return the value of the appropriate field.
void setObjectIndex (int ind)
 Set the appropriate property.
void setRepType (BcpsObjRep_t rt)
 Return the value of the appropriate field.
void setIntType (BcpsIntegral_t it)
 Return the value of the appropriate field.
void setValidRegion (BcpsValidRegion val)
 Return the value of the appropriate field.
void setStatus (int st)
 Return the value of the appropriate field.
void setLbHard (double lb)
 Return the value of the appropriate field.
void setUbHard (double ub)
 Return the value of the appropriate field.
void setLbSoft (double lb)
 Return the value of the appropriate field.
void setUbSoft (double ub)
 Return the value of the appropriate field.
void setNumInactive (int num)
 Return the value of the appropriate field.
void setEffectiveness (double eff)
 Return the value of the appropriate field.
virtual void hashing (BcpsModel *model=NULL)
 Hashing.
double hashValue () const
 Return the value of the appropriate field.

Protected Member Functions

AlpsReturnStatus encodeBcpsObject (AlpsEncoded *encoded) const
 Pack Bcps part to a encode object.
AlpsReturnStatus decodeBcpsObject (AlpsEncoded &encoded)
 Unpack Bcps part from a encode object.

Protected Attributes

int objectIndex_
 Global index of this object.
BcpsObjRep_t repType_
 Core, indexed, or algorithmic.
BcpsIntegral_t intType_
 The integrality type of the object, i.e., what values it can take up between the specified bounds.
BcpsValidRegion validRegion_
 Valid in the whole tree or only the subtree rooted at the node that generate this object.
int status_
 The status of the object.
double lbHard_
 The lower bound of the object when it was first created.
double ubHard_
 The upper bound of the object when it was first created.
double lbSoft_
 The current lower bound of the object.
double ubSoft_
 The current upper bound of the object.
double hashValue_
 The hash value of this object.
int numInactive_
 Number of inactive when in formulation.
double effectiveness_
 Effectiveness: nonnegative value.

Detailed Description

A class for describing the objects that comprise a BCPS subproblem.

At the BCPS level, all that is assumed about an object is that it has bounds and that it has an integrality type. The concept that an object

Definition at line 76 of file BcpsObject.h.


Constructor & Destructor Documentation

BcpsObject::BcpsObject (  )  [inline]

Definition at line 124 of file BcpsObject.h.

BcpsObject::BcpsObject ( double  lbh,
double  ubh,
double  lbs,
double  ubs 
) [inline]

Definition at line 140 of file BcpsObject.h.

virtual BcpsObject::~BcpsObject (  )  [inline, virtual]

Definition at line 156 of file BcpsObject.h.

BcpsObject::BcpsObject ( const BcpsObject rhs  )  [inline]

Copy constructor.

Definition at line 159 of file BcpsObject.h.


Member Function Documentation

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

Assignment operator.

Reimplemented from AlpsKnowledge.

Reimplemented in BlisObjectInt, and BlisObjectInt.

virtual BcpsObject* BcpsObject::clone (  )  const [inline, virtual]

Clone an enity.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 178 of file BcpsObject.h.

int BcpsObject::getObjectIndex (  )  const [inline]

Return the value of the appropriate field.

Definition at line 185 of file BcpsObject.h.

BcpsObjRep_t BcpsObject::getRepType (  )  const [inline]

Return the value of the appropriate field.

Definition at line 186 of file BcpsObject.h.

BcpsIntegral_t BcpsObject::getIntType (  )  const [inline]

Return the value of the appropriate field.

Definition at line 187 of file BcpsObject.h.

BcpsValidRegion BcpsObject::getValidRegion (  )  const [inline]

Return the value of the appropriate field.

Definition at line 188 of file BcpsObject.h.

int BcpsObject::getStatus (  )  const [inline]

Return the value of the appropriate field.

Definition at line 189 of file BcpsObject.h.

double BcpsObject::getLbHard (  )  const [inline]

Return the value of the appropriate field.

Definition at line 190 of file BcpsObject.h.

double BcpsObject::getUbHard (  )  const [inline]

Return the value of the appropriate field.

Definition at line 191 of file BcpsObject.h.

double BcpsObject::getLbSoft (  )  const [inline]

Return the value of the appropriate field.

Definition at line 192 of file BcpsObject.h.

double BcpsObject::getUbSoft (  )  const [inline]

Return the value of the appropriate field.

Definition at line 193 of file BcpsObject.h.

int BcpsObject::getNumInactive (  )  const [inline]

Return the value of the appropriate field.

Definition at line 194 of file BcpsObject.h.

double BcpsObject::getEffectiveness (  )  const [inline]

Return the value of the appropriate field.

Definition at line 195 of file BcpsObject.h.

void BcpsObject::setObjectIndex ( int  ind  )  [inline]

Set the appropriate property.

Definition at line 200 of file BcpsObject.h.

void BcpsObject::setRepType ( BcpsObjRep_t  rt  )  [inline]

Return the value of the appropriate field.

Definition at line 201 of file BcpsObject.h.

void BcpsObject::setIntType ( BcpsIntegral_t  it  )  [inline]

Return the value of the appropriate field.

Definition at line 202 of file BcpsObject.h.

void BcpsObject::setValidRegion ( BcpsValidRegion  val  )  [inline]

Return the value of the appropriate field.

Definition at line 203 of file BcpsObject.h.

void BcpsObject::setStatus ( int  st  )  [inline]

Return the value of the appropriate field.

Definition at line 204 of file BcpsObject.h.

void BcpsObject::setLbHard ( double  lb  )  [inline]

Return the value of the appropriate field.

Definition at line 205 of file BcpsObject.h.

void BcpsObject::setUbHard ( double  ub  )  [inline]

Return the value of the appropriate field.

Definition at line 206 of file BcpsObject.h.

void BcpsObject::setLbSoft ( double  lb  )  [inline]

Return the value of the appropriate field.

Definition at line 207 of file BcpsObject.h.

void BcpsObject::setUbSoft ( double  ub  )  [inline]

Return the value of the appropriate field.

Definition at line 208 of file BcpsObject.h.

void BcpsObject::setNumInactive ( int  num  )  [inline]

Return the value of the appropriate field.

Definition at line 209 of file BcpsObject.h.

void BcpsObject::setEffectiveness ( double  eff  )  [inline]

Return the value of the appropriate field.

Definition at line 210 of file BcpsObject.h.

virtual void BcpsObject::hashing ( BcpsModel model = NULL  )  [inline, virtual]

Hashing.

Reimplemented in BlisConstraint, and BlisConstraint.

Definition at line 215 of file BcpsObject.h.

double BcpsObject::hashValue (  )  const [inline]

Return the value of the appropriate field.

Definition at line 216 of file BcpsObject.h.

virtual double BcpsObject::infeasibility ( BcpsModel m,
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 BlisObjectInt, and BlisObjectInt.

Definition at line 231 of file BcpsObject.h.

virtual void BcpsObject::feasibleRegion ( BcpsModel m  )  [inline, virtual]

Look at the current solution and set bounds to match the solution.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 236 of file BcpsObject.h.

virtual BcpsBranchObject* BcpsObject::createBranchObject ( BcpsModel m,
int  way 
) const [inline, virtual]

Create a branching object and indicate which way to branch first.

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

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 241 of file BcpsObject.h.

virtual BcpsBranchObject* BcpsObject::preferredNewFeasible ( BcpsModel m  )  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 BlisObjectInt, and BlisObjectInt.

Definition at line 252 of file BcpsObject.h.

virtual BcpsBranchObject* BcpsObject::notPreferredNewFeasible ( BcpsModel m  )  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 BlisObjectInt, and BlisObjectInt.

Definition at line 263 of file BcpsObject.h.

virtual void BcpsObject::resetBounds ( BcpsModel m  )  [inline, virtual]

Reset variable bounds to their original values.

Bounds may be tightened, so it may be good to be able to reset them to their original values.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 271 of file BcpsObject.h.

virtual bool BcpsObject::boundBranch ( BcpsModel m  )  const [inline, virtual]

Return true if branches created by object will modify variable bounds.

Definition at line 275 of file BcpsObject.h.

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

Returns floor and ceiling i.e.

closest valid points.

virtual double BcpsObject::upEstimate (  )  const [inline, virtual]

Return "up" estimate.

Default: 1.0e-5.

Definition at line 284 of file BcpsObject.h.

virtual double BcpsObject::downEstimate (  )  const [inline, virtual]

Return "down" estimate.

Default: 1.0e-5.

Definition at line 287 of file BcpsObject.h.

AlpsReturnStatus BcpsObject::encodeBcpsObject ( AlpsEncoded encoded  )  const [inline, protected]

Pack Bcps part to a encode object.

Definition at line 292 of file BcpsObject.h.

AlpsReturnStatus BcpsObject::decodeBcpsObject ( AlpsEncoded encoded  )  [inline, protected]

Unpack Bcps part from a encode object.

Definition at line 308 of file BcpsObject.h.

virtual AlpsReturnStatus BcpsObject::encode ( AlpsEncoded encoded  )  [inline, virtual]

Pack into a encode object.

Reimplemented from AlpsKnowledge.

Reimplemented in BlisConstraint, BlisVariable, VrpVariable, BlisConstraint, and BlisVariable.

Definition at line 329 of file BcpsObject.h.

virtual AlpsKnowledge* BcpsObject::decode ( AlpsEncoded encoded  )  const [inline, virtual]

Decode a constraint from an encoded object.

Reimplemented from AlpsKnowledge.

Reimplemented in BlisConstraint, BlisVariable, VrpVariable, BlisConstraint, and BlisVariable.

Definition at line 336 of file BcpsObject.h.


Member Data Documentation

int BcpsObject::objectIndex_ [protected]

Global index of this object.

Definition at line 81 of file BcpsObject.h.

Core, indexed, or algorithmic.

Definition at line 84 of file BcpsObject.h.

The integrality type of the object, i.e., what values it can take up between the specified bounds.

(Possible options: 'C' for continuous, 'I' for general integer, 'B' for binary and 'S' for semicontinuous)

Definition at line 90 of file BcpsObject.h.

Valid in the whole tree or only the subtree rooted at the node that generate this object.

Definition at line 94 of file BcpsObject.h.

int BcpsObject::status_ [protected]

The status of the object.

Definition at line 99 of file BcpsObject.h.

double BcpsObject::lbHard_ [protected]

The lower bound of the object when it was first created.

Definition at line 102 of file BcpsObject.h.

double BcpsObject::ubHard_ [protected]

The upper bound of the object when it was first created.

Definition at line 105 of file BcpsObject.h.

double BcpsObject::lbSoft_ [protected]

The current lower bound of the object.

Definition at line 108 of file BcpsObject.h.

double BcpsObject::ubSoft_ [protected]

The current upper bound of the object.

Definition at line 111 of file BcpsObject.h.

double BcpsObject::hashValue_ [protected]

The hash value of this object.

Definition at line 114 of file BcpsObject.h.

int BcpsObject::numInactive_ [protected]

Number of inactive when in formulation.

Definition at line 117 of file BcpsObject.h.

double BcpsObject::effectiveness_ [protected]

Effectiveness: nonnegative value.

Definition at line 120 of file BcpsObject.h.


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

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1