A class for describing the objects that comprise a BCPS subproblem. More...
#include <BcpsObject.h>
Public Member Functions | |
BcpsObject () | |
BcpsObject (double lbh, double ubh, double lbs, double ubs) | |
virtual | ~BcpsObject () |
BcpsObject (const BcpsObject &rhs) | |
Copy constructor. More... | |
BcpsObject & | operator= (const BcpsObject &rhs) |
Assignment operator. More... | |
virtual BcpsObject * | clone () const |
Clone an enity. More... | |
virtual double | infeasibility (BcpsModel *m, int &preferredWay) const |
Infeasibility of the object This is some measure of the infeasibility of the object. More... | |
virtual void | feasibleRegion (BcpsModel *m) |
Look at the current solution and set bounds to match the solution. More... | |
virtual BcpsBranchObject * | createBranchObject (BcpsModel *m, int way) const |
Create a branching object and indicate which way to branch first. More... | |
virtual BcpsBranchObject * | preferredNewFeasible (BcpsModel *m) const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction. More... | |
virtual BcpsBranchObject * | notPreferredNewFeasible (BcpsModel *m) const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction. More... | |
virtual void | resetBounds (BcpsModel *m) |
Reset variable bounds to their original values. More... | |
virtual bool | boundBranch (BcpsModel *m) const |
Return true if branches created by object will modify variable bounds. More... | |
virtual void | floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const |
Returns floor and ceiling i.e. More... | |
virtual double | upEstimate () const |
Return "up" estimate. More... | |
virtual double | downEstimate () const |
Return "down" estimate. More... | |
virtual void | printDesc () |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
Pack into a encode object. More... | |
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const |
Decode a constraint from an encoded object. More... | |
int | getObjectIndex () const |
Return the value of the appropriate field. More... | |
BcpsObjRep_t | getRepType () const |
Return the value of the appropriate field. More... | |
BcpsIntegral_t | getIntType () const |
Return the value of the appropriate field. More... | |
BcpsValidRegion | getValidRegion () const |
Return the value of the appropriate field. More... | |
int | getStatus () const |
Return the value of the appropriate field. More... | |
double | getLbHard () const |
Return the value of the appropriate field. More... | |
double | getUbHard () const |
Return the value of the appropriate field. More... | |
double | getLbSoft () const |
Return the value of the appropriate field. More... | |
double | getUbSoft () const |
Return the value of the appropriate field. More... | |
int | getNumInactive () const |
Return the value of the appropriate field. More... | |
double | getEffectiveness () const |
Return the value of the appropriate field. More... | |
void | setObjectIndex (int ind) |
Set the appropriate property. More... | |
void | setRepType (BcpsObjRep_t rt) |
Set the appropriate property. More... | |
void | setIntType (BcpsIntegral_t it) |
Set the appropriate property. More... | |
void | setValidRegion (BcpsValidRegion val) |
Set the appropriate property. More... | |
void | setStatus (int st) |
Set the appropriate property. More... | |
void | setLbHard (double lb) |
Set the appropriate property. More... | |
void | setUbHard (double ub) |
Set the appropriate property. More... | |
void | setLbSoft (double lb) |
Set the appropriate property. More... | |
void | setUbSoft (double ub) |
Set the appropriate property. More... | |
void | setNumInactive (int num) |
Set the appropriate property. More... | |
void | setEffectiveness (double eff) |
Set the appropriate property. More... | |
virtual void | hashing (BcpsModel *model=NULL) |
Hashing. More... | |
double | hashValue () const |
Hashing. More... | |
![]() | |
AlpsKnowledge () | |
virtual | ~AlpsKnowledge () |
KnowledgeType | getType () |
void | setType (KnowledgeType t) |
virtual AlpsEncoded * | encode () const |
This method should encode the content of the object and return a pointer to the encoded form. More... | |
AlpsEncoded * | getEncoded () const |
Get/set encoded. More... | |
void | setEncoded (AlpsEncoded *e) |
Protected Member Functions | |
AlpsReturnStatus | encodeBcpsObject (AlpsEncoded *encoded) const |
Pack Bcps part to a encode object. More... | |
AlpsReturnStatus | decodeBcpsObject (AlpsEncoded &encoded) |
Unpack Bcps part from a encode object. More... | |
Protected Attributes | |
int | objectIndex_ |
Global index of this object. More... | |
BcpsObjRep_t | repType_ |
Core, indexed, or algorithmic. More... | |
BcpsIntegral_t | intType_ |
The integrality type of the object, i.e., what values it can take up between the specified bounds. More... | |
BcpsValidRegion | validRegion_ |
Valid in the whole tree or only the subtree rooted at the node that generate this object. More... | |
int | status_ |
The status of the object. More... | |
double | lbHard_ |
The lower bound of the object when it was first created. More... | |
double | ubHard_ |
The upper bound of the object when it was first created. More... | |
double | lbSoft_ |
The current lower bound of the object. More... | |
double | ubSoft_ |
The current upper bound of the object. More... | |
double | hashValue_ |
The hash value of this object. More... | |
int | numInactive_ |
Number of inactive when in formulation. More... | |
double | effectiveness_ |
Effectiveness: nonnegative value. More... | |
![]() | |
KnowledgeType | type_ |
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.
|
inline |
Definition at line 124 of file BcpsObject.h.
|
inline |
Definition at line 140 of file BcpsObject.h.
|
inlinevirtual |
Definition at line 156 of file BcpsObject.h.
|
inline |
Copy constructor.
Definition at line 159 of file BcpsObject.h.
BcpsObject& BcpsObject::operator= | ( | const BcpsObject & | rhs | ) |
Assignment operator.
|
inlinevirtual |
Clone an enity.
Reimplemented in BlisObjectInt, and BlisObjectInt.
Definition at line 178 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 185 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 186 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 187 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 188 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 189 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 190 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 191 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 192 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 193 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 194 of file BcpsObject.h.
|
inline |
Return the value of the appropriate field.
Definition at line 195 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 200 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 201 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 202 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 203 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 204 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 205 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 206 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 207 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 208 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 209 of file BcpsObject.h.
|
inline |
Set the appropriate property.
Definition at line 210 of file BcpsObject.h.
Hashing.
Reimplemented in BlisConstraint, and BlisConstraint.
Definition at line 215 of file BcpsObject.h.
|
inline |
Hashing.
Definition at line 216 of file BcpsObject.h.
|
inlinevirtual |
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.
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.
|
inlinevirtual |
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.
|
inlinevirtual |
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.
|
inlinevirtual |
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.
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.
|
inlinevirtual |
Return true if branches created by object will modify variable bounds.
Definition at line 275 of file BcpsObject.h.
|
virtual |
Returns floor and ceiling i.e.
closest valid points.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in VrpVariable.
Definition at line 289 of file BcpsObject.h.
|
inlineprotected |
Pack Bcps part to a encode object.
Definition at line 294 of file BcpsObject.h.
|
inlineprotected |
Unpack Bcps part from a encode object.
Definition at line 310 of file BcpsObject.h.
|
inlinevirtual |
Pack into a encode object.
Reimplemented from AlpsKnowledge.
Reimplemented in BlisVariable, BlisVariable, BlisConstraint, VrpVariable, and BlisConstraint.
Definition at line 331 of file BcpsObject.h.
|
inlinevirtual |
Decode a constraint from an encoded object.
Reimplemented from AlpsKnowledge.
Reimplemented in BlisVariable, BlisVariable, VrpVariable, BlisConstraint, and BlisConstraint.
Definition at line 338 of file BcpsObject.h.
|
protected |
Global index of this object.
Definition at line 81 of file BcpsObject.h.
|
protected |
Core, indexed, or algorithmic.
Definition at line 84 of file BcpsObject.h.
|
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.
|
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.
|
protected |
The status of the object.
Definition at line 99 of file BcpsObject.h.
|
protected |
The lower bound of the object when it was first created.
Definition at line 102 of file BcpsObject.h.
|
protected |
The upper bound of the object when it was first created.
Definition at line 105 of file BcpsObject.h.
|
protected |
The current lower bound of the object.
Definition at line 108 of file BcpsObject.h.
|
protected |
The current upper bound of the object.
Definition at line 111 of file BcpsObject.h.
|
protected |
The hash value of this object.
Definition at line 114 of file BcpsObject.h.
|
protected |
Number of inactive when in formulation.
Definition at line 117 of file BcpsObject.h.
|
protected |
Effectiveness: nonnegative value.
Definition at line 120 of file BcpsObject.h.