- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# BcpsObject Class Reference

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

`#include <BcpsObject.h>`

Inheritance diagram for BcpsObject:

[legend]
Collaboration diagram for BcpsObject:

[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.
BcpsObject & | operator= (const BcpsObject &rhs)
| Assignment operator.
virtual BcpsObject * | clone () 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 BcpsBranchObject * | createBranchObject (BcpsModel *m, int way) const
| Create a branching object and indicate which way to branch first.
virtual BcpsBranchObject * | preferredNewFeasible (BcpsModel *m) const
| Given a valid solution (with reduced costs, etc.
virtual BcpsBranchObject * | notPreferredNewFeasible (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 AlpsKnowledge * | decode (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)
| Set the appropriate property.
void | setIntType (BcpsIntegral_t it)
| Set the appropriate property.
void | setValidRegion (BcpsValidRegion val)
| Set the appropriate property.
void | setStatus (int st)
| Set the appropriate property.
void | setLbHard (double lb)
| Set the appropriate property.
void | setUbHard (double ub)
| Set the appropriate property.
void | setLbSoft (double lb)
| Set the appropriate property.
void | setUbSoft (double ub)
| Set the appropriate property.
void | setNumInactive (int num)
| Set the appropriate property.
void | setEffectiveness (double eff)
| Set the appropriate property.
virtual void | hashing (BcpsModel *model=NULL)
| Hashing.
double | hashValue () const
| Hashing.
## 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.

References effectiveness_, hashValue_, intType_, lbHard_, lbSoft_, numInactive_, objectIndex_, repType_, status_, ubHard_, ubSoft_, and validRegion_.

## Member Function Documentation

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

Assignment operator.

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.

References objectIndex_.

BcpsObjRep_t BcpsObject::getRepType | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 186 of file BcpsObject.h.

References repType_.

BcpsIntegral_t BcpsObject::getIntType | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 187 of file BcpsObject.h.

References intType_.

BcpsValidRegion BcpsObject::getValidRegion | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 188 of file BcpsObject.h.

References validRegion_.

int BcpsObject::getStatus | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 189 of file BcpsObject.h.

References status_.

double BcpsObject::getLbHard | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 190 of file BcpsObject.h.

References lbHard_.

double BcpsObject::getUbHard | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 191 of file BcpsObject.h.

References ubHard_.

double BcpsObject::getLbSoft | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 192 of file BcpsObject.h.

References lbSoft_.

double BcpsObject::getUbSoft | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 193 of file BcpsObject.h.

References ubSoft_.

int BcpsObject::getNumInactive | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 194 of file BcpsObject.h.

References numInactive_.

double BcpsObject::getEffectiveness | ( |  | ) | const`[inline]`

Return the value of the appropriate field.

Definition at line 195 of file BcpsObject.h.

References effectiveness_.

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

Set the appropriate property.

Definition at line 200 of file BcpsObject.h.

References objectIndex_.

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

Set the appropriate property.

Definition at line 201 of file BcpsObject.h.

References repType_.

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

Set the appropriate property.

Definition at line 202 of file BcpsObject.h.

References intType_.

Referenced by VrpVariable::VrpVariable().

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

Set the appropriate property.

Definition at line 203 of file BcpsObject.h.

References validRegion_.

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

Set the appropriate property.

Definition at line 204 of file BcpsObject.h.

References status_.

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

Set the appropriate property.

Definition at line 205 of file BcpsObject.h.

References lbHard_.

Referenced by VrpVariable::VrpVariable().

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

Set the appropriate property.

Definition at line 206 of file BcpsObject.h.

References ubHard_.

Referenced by VrpVariable::VrpVariable().

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

Set the appropriate property.

Definition at line 207 of file BcpsObject.h.

References lbSoft_.

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

Set the appropriate property.

Definition at line 208 of file BcpsObject.h.

References ubSoft_.

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

Set the appropriate property.

Definition at line 209 of file BcpsObject.h.

References numInactive_.

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

Set the appropriate property.

Definition at line 210 of file BcpsObject.h.

References effectiveness_.

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

Hashing.

Reimplemented in BlisConstraint, and BlisConstraint.

Definition at line 215 of file BcpsObject.h.

References hashValue_.

double BcpsObject::hashValue | ( |  | ) | const`[inline]`

Hashing.

Definition at line 216 of file BcpsObject.h.

References hashValue_.

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.

References AlpsReturnStatusOk, hashValue_, intType_, lbHard_, lbSoft_, objectIndex_, repType_, status_, ubHard_, ubSoft_, validRegion_, and AlpsEncoded::writeRep().

Referenced by VrpVariable::encode(), and BlisVariable::encode().

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

Unpack Bcps part from a encode object.

Definition at line 308 of file BcpsObject.h.

References AlpsReturnStatusOk, hashValue_, intType_, lbHard_, lbSoft_, objectIndex_, AlpsEncoded::readRep(), repType_, status_, ubHard_, ubSoft_, and validRegion_.

Referenced by VrpVariable::decode(), and BlisVariable::decode().

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.

References AlpsReturnStatusOk.

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.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getObjectIndex(), and setObjectIndex().

BcpsObjRep_t BcpsObject::repType_`[protected]`

Core, indexed, or algorithmic.

Definition at line 84 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getRepType(), and setRepType().

BcpsIntegral_t BcpsObject::intType_`[protected]`

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.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getIntType(), and setIntType().

BcpsValidRegion BcpsObject::validRegion_`[protected]`

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.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getValidRegion(), and setValidRegion().

int BcpsObject::status_`[protected]`

The status of the object.

Definition at line 99 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getStatus(), and setStatus().

double BcpsObject::lbHard_`[protected]`

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

Definition at line 102 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getLbHard(), and setLbHard().

double BcpsObject::ubHard_`[protected]`

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

Definition at line 105 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getUbHard(), and setUbHard().

double BcpsObject::lbSoft_`[protected]`

The current lower bound of the object.

Definition at line 108 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getLbSoft(), and setLbSoft().

double BcpsObject::ubSoft_`[protected]`

The current upper bound of the object.

Definition at line 111 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), getUbSoft(), and setUbSoft().

double BcpsObject::hashValue_`[protected]`

The hash value of this object.

Definition at line 114 of file BcpsObject.h.

Referenced by BcpsObject(), decodeBcpsObject(), encodeBcpsObject(), hashing(), and hashValue().

int BcpsObject::numInactive_`[protected]`

Number of inactive when in formulation.

Definition at line 117 of file BcpsObject.h.

Referenced by BcpsObject(), getNumInactive(), and setNumInactive().

double BcpsObject::effectiveness_`[protected]`

Effectiveness: nonnegative value.

Definition at line 120 of file BcpsObject.h.

Referenced by BcpsObject(), getEffectiveness(), and setEffectiveness().

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

- /home/coin/SVN-release/Blis-0.91.2/Bcps/src/BcpsObject.h