For a given type, the objectVecStorage_ structure holds the description. More...
#include <BcpsNodeDesc.h>
Public Member Functions | |
BcpsNodeDesc () | |
Default constructor. More... | |
BcpsNodeDesc (BcpsModel *m) | |
Useful constructor. More... | |
virtual | ~BcpsNodeDesc () |
Destructor. More... | |
void | initToNull () |
Initialize member data. More... | |
void | setVars (int numRem, const int *posRem, int numAdd, const BcpsObject **objects, bool relvlh, int numvlh, const int *vlhp, const double *vlhe, bool relvuh, int numvuh, const int *vuhp, const double *vuhe, bool relvls, int numvls, const int *vlsp, const double *vlse, bool relvus, int numvus, const int *vusp, const double *vuse) |
Set variable objects. More... | |
void | assignVars (int numRem, int *&posRem, int numAdd, BcpsObject **&objects, bool relvlh, int numvlh, int *&vlhp, double *&vlhe, bool relvuh, int numvuh, int *&vuhp, double *&vuhe, bool relvls, int numvls, int *&vlsp, double *&vlse, bool relvus, int numvus, int *&vusp, double *&vuse) |
Assign variable objects. More... | |
void | setCons (int numRem, const int *posRem, int numAdd, const BcpsObject **objects, bool relclh, int numclh, const int *clhp, const double *clhe, bool relcuh, int numcuh, const int *cuhp, const double *cuhe, bool relcls, int numcls, const int *clsp, const double *clse, bool relcus, int numcus, const int *cusp, const double *cuse) |
Set constraint objects. More... | |
void | assignCons (int numRem, int *&posRem, int numAdd, BcpsObject **&objects, bool relclh, int numclh, int *&clhp, double *&clhe, bool relcuh, int numcuh, int *&cuhp, double *&cuhe, bool relcls, int numcls, int *&clsp, double *&clse, bool relcus, int numcus, int *&cusp, double *&cuse) |
Assign constraint objects. More... | |
BcpsObjectListMod * | getVars () const |
Get variable objects. More... | |
BcpsObjectListMod * | getCons () const |
Get constraint objects. More... | |
BcpsObjectListMod * | vars () |
Accesss varaibles. More... | |
BcpsObjectListMod * | cons () |
Accesss constraints. More... | |
void | assignVarSoftBound (int numModSoftVarLB, int *&varLBi, double *&varLBv, int numModSoftVarUB, int *&varUBi, double *&varUBv) |
Set variable soft bounds. More... | |
void | setVarSoftBound (int numModSoftVarLB, const int *varLBi, const double *varLBv, int numModSoftVarUB, const int *varUBi, const double *varUBv) |
Set variable soft bounds. More... | |
void | assignVarHardBound (int numModHardVarLB, int *&varLBi, double *&varLBv, int numModHardVarUB, int *&varUBi, double *&varUBv) |
Set variable hard bounds. More... | |
void | setConSoftBound (int numModSoftConLB, const int *conLBi, const double *conLBv, int numModSoftConUB, const int *conUBi, const double *conUBv) |
Set constraint soft bounds. More... | |
void | setVarHardBound (int numModHardVarLB, const int *varLBi, const double *varLBv, int numModHardVarUB, const int *varUBi, const double *varUBv) |
Set variable hard bounds. More... | |
void | setConHardBound (int numModHardConLB, const int *conLBi, const double *conLBv, int numModHardConUB, const int *conUBi, const double *conUBv) |
Set constraint hard bounds. More... | |
void | appendAddedConstraints (int numAdd, BcpsObject **addCons) |
Recode the added constraints. More... | |
void | setAddedConstraints (int numAdd, BcpsObject **addCons) |
Recode the added constraints. More... | |
void | delConstraints (int numDel, int *indices) |
Record the constraints are deleted. More... | |
void | addVariables (int numAdd, BcpsObject **addVars) |
Record added variables. More... | |
void | delVariables (int numDel, int *indices) |
Record deleted variables. More... | |
AlpsReturnStatus | encodeBcps (AlpsEncoded *encoded) const |
Pack bcps node description into an encoded. More... | |
AlpsReturnStatus | decodeBcps (AlpsEncoded &encoded) |
Unpack bcps node description into an encoded. More... | |
![]() | |
AlpsNodeDesc () | |
AlpsNodeDesc (AlpsModel *m) | |
virtual | ~AlpsNodeDesc () |
AlpsModel * | getModel () const |
void | setModel (AlpsModel *m) |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Pack node description into an encoded. More... | |
virtual AlpsReturnStatus | decode (AlpsEncoded &encoded) |
Unpack a node description from an encoded. More... | |
Protected Member Functions | |
AlpsReturnStatus | encodeDblFieldMods (AlpsEncoded *encoded, BcpsFieldListMod< double > *field) const |
Pack a double field into an encoded object. More... | |
AlpsReturnStatus | encodeIntFieldMods (AlpsEncoded *encoded, BcpsFieldListMod< int > *field) const |
Pack a integer field into an encoded object. More... | |
AlpsReturnStatus | encodeObjectMods (AlpsEncoded *encoded, BcpsObjectListMod *objMod) const |
Pack object modifications to an encoded object. More... | |
AlpsReturnStatus | decodeDblFieldMods (AlpsEncoded &encoded, BcpsFieldListMod< double > *field) |
Unpack a double field from an encoded object. More... | |
AlpsReturnStatus | decodeIntFieldMods (AlpsEncoded &encoded, BcpsFieldListMod< int > *field) |
Unpack a integer field from an encoded object. More... | |
AlpsReturnStatus | decodeObjectMods (AlpsEncoded &encoded, BcpsObjectListMod *objMod) |
Unpack object modifications to an encoded object. More... | |
Protected Attributes | |
BcpsObjectListMod * | vars_ |
Variable objects. More... | |
BcpsObjectListMod * | cons_ |
Constraint objects. More... | |
![]() | |
AlpsModel * | model_ |
A pointer to model. More... | |
For a given type, the objectVecStorage_ structure holds the description.
This description is explicit if the numRemoved
member is -1. In this case, the objects
member holds the full list of objects of the given type. If an explicit description of the parent is given together with a relative description of the current node then the process of reconstructing the explicit description of the current node is as follows:
If the numRemoved field is -1, that means that the current description is explicit. In this case, the contents of the vectorMod_ members are largely irrelevant, except for the relative
fields which indicate whether the appropriate vectorMod_
member can ever be expressed as a relative description or not.
If the numRemoved
field is >=0, then the current description is considered relative even if every vectorMod_ member contains explicit data.The description of a node can be either explicit or relative to its parent. In the node there are a number of object types and for each object type the explicit/relative description is considered separately.
If the information on an object type is relative, it means that at least one of the fields (lbHard, ubHard, etc.) has a relative description.
Definition at line 128 of file BcpsNodeDesc.h.
|
inline |
Default constructor.
Definition at line 141 of file BcpsNodeDesc.h.
|
inline |
Useful constructor.
Definition at line 144 of file BcpsNodeDesc.h.
|
virtual |
Destructor.
void BcpsNodeDesc::initToNull | ( | ) |
Initialize member data.
void BcpsNodeDesc::setVars | ( | int | numRem, |
const int * | posRem, | ||
int | numAdd, | ||
const BcpsObject ** | objects, | ||
bool | relvlh, | ||
int | numvlh, | ||
const int * | vlhp, | ||
const double * | vlhe, | ||
bool | relvuh, | ||
int | numvuh, | ||
const int * | vuhp, | ||
const double * | vuhe, | ||
bool | relvls, | ||
int | numvls, | ||
const int * | vlsp, | ||
const double * | vlse, | ||
bool | relvus, | ||
int | numvus, | ||
const int * | vusp, | ||
const double * | vuse | ||
) |
Set variable objects.
void BcpsNodeDesc::assignVars | ( | int | numRem, |
int *& | posRem, | ||
int | numAdd, | ||
BcpsObject **& | objects, | ||
bool | relvlh, | ||
int | numvlh, | ||
int *& | vlhp, | ||
double *& | vlhe, | ||
bool | relvuh, | ||
int | numvuh, | ||
int *& | vuhp, | ||
double *& | vuhe, | ||
bool | relvls, | ||
int | numvls, | ||
int *& | vlsp, | ||
double *& | vlse, | ||
bool | relvus, | ||
int | numvus, | ||
int *& | vusp, | ||
double *& | vuse | ||
) |
Assign variable objects.
Take over memory ownership.
void BcpsNodeDesc::setCons | ( | int | numRem, |
const int * | posRem, | ||
int | numAdd, | ||
const BcpsObject ** | objects, | ||
bool | relclh, | ||
int | numclh, | ||
const int * | clhp, | ||
const double * | clhe, | ||
bool | relcuh, | ||
int | numcuh, | ||
const int * | cuhp, | ||
const double * | cuhe, | ||
bool | relcls, | ||
int | numcls, | ||
const int * | clsp, | ||
const double * | clse, | ||
bool | relcus, | ||
int | numcus, | ||
const int * | cusp, | ||
const double * | cuse | ||
) |
Set constraint objects.
void BcpsNodeDesc::assignCons | ( | int | numRem, |
int *& | posRem, | ||
int | numAdd, | ||
BcpsObject **& | objects, | ||
bool | relclh, | ||
int | numclh, | ||
int *& | clhp, | ||
double *& | clhe, | ||
bool | relcuh, | ||
int | numcuh, | ||
int *& | cuhp, | ||
double *& | cuhe, | ||
bool | relcls, | ||
int | numcls, | ||
int *& | clsp, | ||
double *& | clse, | ||
bool | relcus, | ||
int | numcus, | ||
int *& | cusp, | ||
double *& | cuse | ||
) |
Assign constraint objects.
Take over memory ownership.
|
inline |
Get variable objects.
Definition at line 243 of file BcpsNodeDesc.h.
|
inline |
Get constraint objects.
Definition at line 246 of file BcpsNodeDesc.h.
|
inline |
Accesss varaibles.
Definition at line 249 of file BcpsNodeDesc.h.
|
inline |
Accesss constraints.
Definition at line 252 of file BcpsNodeDesc.h.
void BcpsNodeDesc::assignVarSoftBound | ( | int | numModSoftVarLB, |
int *& | varLBi, | ||
double *& | varLBv, | ||
int | numModSoftVarUB, | ||
int *& | varUBi, | ||
double *& | varUBv | ||
) |
Set variable soft bounds.
Take ownerships of arraies.
void BcpsNodeDesc::setVarSoftBound | ( | int | numModSoftVarLB, |
const int * | varLBi, | ||
const double * | varLBv, | ||
int | numModSoftVarUB, | ||
const int * | varUBi, | ||
const double * | varUBv | ||
) |
Set variable soft bounds.
Don't take ownerships of arraies.
void BcpsNodeDesc::assignVarHardBound | ( | int | numModHardVarLB, |
int *& | varLBi, | ||
double *& | varLBv, | ||
int | numModHardVarUB, | ||
int *& | varUBi, | ||
double *& | varUBv | ||
) |
Set variable hard bounds.
Take ownerships of arraies.
void BcpsNodeDesc::setConSoftBound | ( | int | numModSoftConLB, |
const int * | conLBi, | ||
const double * | conLBv, | ||
int | numModSoftConUB, | ||
const int * | conUBi, | ||
const double * | conUBv | ||
) |
Set constraint soft bounds.
Don't take ownerships of arraies.
void BcpsNodeDesc::setVarHardBound | ( | int | numModHardVarLB, |
const int * | varLBi, | ||
const double * | varLBv, | ||
int | numModHardVarUB, | ||
const int * | varUBi, | ||
const double * | varUBv | ||
) |
Set variable hard bounds.
Don't take ownerships of arraies.
void BcpsNodeDesc::setConHardBound | ( | int | numModHardConLB, |
const int * | conLBi, | ||
const double * | conLBv, | ||
int | numModHardConUB, | ||
const int * | conUBi, | ||
const double * | conUBv | ||
) |
Set constraint hard bounds.
Don't take ownerships of arraies.
|
inline |
Recode the added constraints.
Take over the memory ownship of aguments. Append to previous constraints.
Definition at line 304 of file BcpsNodeDesc.h.
|
inline |
Recode the added constraints.
Take over the memory ownship of aguments. Delete already added constraints.
Definition at line 323 of file BcpsNodeDesc.h.
|
inline |
Record the constraints are deleted.
Take over the memory ownship of arguments.
Definition at line 337 of file BcpsNodeDesc.h.
|
inline |
Record added variables.
Take over the memory ownship of arguments.
Definition at line 344 of file BcpsNodeDesc.h.
|
inline |
Record deleted variables.
Take over the memory ownship of arguemnts.
Definition at line 357 of file BcpsNodeDesc.h.
|
protected |
Pack a double field into an encoded object.
|
protected |
Pack a integer field into an encoded object.
|
protected |
Pack object modifications to an encoded object.
|
protected |
Unpack a double field from an encoded object.
|
protected |
Unpack a integer field from an encoded object.
|
protected |
Unpack object modifications to an encoded object.
AlpsReturnStatus BcpsNodeDesc::encodeBcps | ( | AlpsEncoded * | encoded | ) | const |
Pack bcps node description into an encoded.
AlpsReturnStatus BcpsNodeDesc::decodeBcps | ( | AlpsEncoded & | encoded | ) |
Unpack bcps node description into an encoded.
|
protected |
Variable objects.
Definition at line 133 of file BcpsNodeDesc.h.
|
protected |
Constraint objects.
Definition at line 136 of file BcpsNodeDesc.h.