The OSiLParserData Class, used to store parser data. More...
#include <OSiLParserData.h>
Public Member Functions | |
OSiLParserData () | |
the OSiLParserData class constructor | |
~OSiLParserData () | |
the OSiLParserData class destructor | |
Public Attributes | |
void * | scanner |
scanner is used to store data in a reentrant lexer we use this to pass an OSiLParserData object to the parser | |
int | osillineno |
if there is a parser error, osillineno holds the line number in the OSiL file where the error occured. | |
int | qtermcount |
These variables are used for processing the <quadraticCoefficients> element. | |
bool | qtermidxOneattON |
qtermidxOneattON is true if we have found the first index of the quadratic term | |
bool | qtermidxTwoattON |
qtermidxTwoattON is true if we have found the second index of the quadratic term | |
bool | qtermidxattON |
qtermidxattON is true if we have found the row index of the of a quadratic term | |
bool | qtermidattON |
qtermidattON is true if we have found the id of the quadratic term | |
bool | qtermcoefattON |
qtermcoefattON is true if we have found the coefficient of the quadratic term | |
OSnLNode * | nlNodePoint |
These entities are used for parsing <nonlinearExpressions>. | |
OSnLNodeVariable * | nlNodeVariablePoint |
a pointer to an OSnLNode object that is a variable | |
OSnLNodeNumber * | nlNodeNumberPoint |
a pointer to an OSnLNode object that is a number | |
int | nlnodecount |
nlnodecount is the number of nl nodes in the instance | |
int | tmpnlcount |
tmpnlcount counts the number of nl nodes actually found, if this number differs from nlnodecount, then an exception is thrown | |
bool | numbertypeattON |
numbertypeattON is set to true if the type attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one type attribute | |
bool | numbervalueattON |
numbervalueattON is set to true if the value attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one value attribute | |
bool | numberidattON |
numberidattON is set to true if the id attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one id attribute | |
bool | variableidxattON |
variableidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one idx attribute | |
bool | variablecoefattON |
variablecoefattON is set to true if the coeff attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one coeff attribute | |
std::vector< OSnLNode * > | nlNodeVec |
nlNodeVec holds a vector of pointers to OSnLNodes | |
std::vector< OSnLNode * > | sumVec |
the OSnLNodeSum node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children | |
std::vector< OSnLNode * > | allDiffVec |
the OSnLNodeallDiff node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children | |
std::vector< OSnLNode * > | productVec |
the OSnLNodeProduct node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children | |
std::vector< OSnLNode * > | maxVec |
the OSnLNodeMax node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children | |
std::vector< OSnLNode * > | minVec |
the OSnLNodeMin node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children | |
bool | timeDomainStages |
These variables are used to parse the <timeDomain> element. | |
bool | timeDomainInterval |
int | stagecount |
store the number of stages | |
bool | stagenameON |
stagenameON is true if the current stage was given a name | |
std::string | stagename |
store the name of the current stage | |
bool | stageVariablesON |
for each stage we need to track whether the <variables>, <constraints>, <objectives> elements are present. | |
bool | stageConstraintsON |
bool | stageObjectivesON |
bool | stageVariablesOrdered |
...we need to track whether the variables, constraints, objectives are given in temporal order. | |
bool | stageConstraintsOrdered |
bool | stageObjectivesOrdered |
int | stageVariableStartIdx |
...we need to track the first variable, constraint, objective are given in temporal order. | |
int | stageConstraintStartIdx |
int | stageObjectiveStartIdx |
int | stagevarcount |
...and we need to track the number of variables we have seen | |
int | stageconcount |
int | stageobjcount |
int | nvarcovered |
these two integers track how many variables and constraints have been assigned to a stage; this is used for consistency checks. | |
int | nconcovered |
int * | m_miVarStageInfo |
m_miVarStageInfo is an array that for each variable gives the stage to which it belongs. | |
int * | m_miConStageInfo |
m_miConStageInfo is an array that for each constraint gives the stage to which it belongs. | |
int * | m_miObjStageInfo |
m_miObjStageInfo is an array that for each objective gives the stage to which it belongs. | |
bool | intervalhorizonON |
intervalhorizonON is true if we have found a horizon for the time interval | |
double | intervalhorizon |
intervalhorizon holds the value of the end of the planning horizon | |
bool | intervalstartON |
intervalstartON is true if we have found a start time for the time interval | |
double | intervalstart |
intervalstart holds the value for the start of the planning horizon |
The OSiLParserData Class, used to store parser data.
Definition at line 35 of file OSiLParserData.h.
OSiLParserData::OSiLParserData | ( | ) |
the OSiLParserData class constructor
OSiLParserData::~OSiLParserData | ( | ) |
the OSiLParserData class destructor
void* OSiLParserData::scanner |
scanner is used to store data in a reentrant lexer we use this to pass an OSiLParserData object to the parser
Definition at line 45 of file OSiLParserData.h.
if there is a parser error, osillineno holds the line number in the OSiL file where the error occured.
Definition at line 50 of file OSiLParserData.h.
These variables are used for processing the <quadraticCoefficients> element.
store the number of quadratic terms
Definition at line 55 of file OSiLParserData.h.
qtermidxOneattON is true if we have found the first index of the quadratic term
Definition at line 59 of file OSiLParserData.h.
qtermidxTwoattON is true if we have found the second index of the quadratic term
Definition at line 63 of file OSiLParserData.h.
qtermidxattON is true if we have found the row index of the of a quadratic term
Definition at line 67 of file OSiLParserData.h.
qtermidattON is true if we have found the id of the quadratic term
Definition at line 70 of file OSiLParserData.h.
qtermcoefattON is true if we have found the coefficient of the quadratic term
Definition at line 75 of file OSiLParserData.h.
These entities are used for parsing <nonlinearExpressions>.
a pointer to an OSnLNode object
Definition at line 80 of file OSiLParserData.h.
a pointer to an OSnLNode object that is a variable
Definition at line 83 of file OSiLParserData.h.
a pointer to an OSnLNode object that is a number
Definition at line 86 of file OSiLParserData.h.
nlnodecount is the number of nl nodes in the instance
Definition at line 89 of file OSiLParserData.h.
tmpnlcount counts the number of nl nodes actually found, if this number differs from nlnodecount, then an exception is thrown
Definition at line 94 of file OSiLParserData.h.
numbertypeattON is set to true if the type attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one type attribute
Definition at line 100 of file OSiLParserData.h.
numbervalueattON is set to true if the value attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one value attribute
Definition at line 106 of file OSiLParserData.h.
numberidattON is set to true if the id attribute has been parsed for an OSnLNodeNumber object, an exception is thrown if there is more than one id attribute
Definition at line 112 of file OSiLParserData.h.
variableidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one idx attribute
Definition at line 118 of file OSiLParserData.h.
variablecoefattON is set to true if the coeff attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one coeff attribute
Definition at line 124 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::nlNodeVec |
nlNodeVec holds a vector of pointers to OSnLNodes
Definition at line 127 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::sumVec |
the OSnLNodeSum node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children
Definition at line 133 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::allDiffVec |
the OSnLNodeallDiff node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children
Definition at line 139 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::productVec |
the OSnLNodeProduct node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children
Definition at line 145 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::maxVec |
the OSnLNodeMax node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children
Definition at line 151 of file OSiLParserData.h.
std::vector<OSnLNode*> OSiLParserData::minVec |
the OSnLNodeMin node can have any number of children, including other children with an indeterminate number of children so when parsing we need to temporarily store all of its children
Definition at line 157 of file OSiLParserData.h.
These variables are used to parse the <timeDomain> element.
store the type of <timeDomain> (extend as needed)
Definition at line 163 of file OSiLParserData.h.
Definition at line 164 of file OSiLParserData.h.
store the number of stages
Definition at line 167 of file OSiLParserData.h.
stagenameON is true if the current stage was given a name
Definition at line 170 of file OSiLParserData.h.
std::string OSiLParserData::stagename |
store the name of the current stage
Definition at line 173 of file OSiLParserData.h.
for each stage we need to track whether the <variables>, <constraints>, <objectives> elements are present.
..
Definition at line 177 of file OSiLParserData.h.
Definition at line 178 of file OSiLParserData.h.
Definition at line 179 of file OSiLParserData.h.
...we need to track whether the variables, constraints, objectives are given in temporal order.
..
Definition at line 183 of file OSiLParserData.h.
Definition at line 184 of file OSiLParserData.h.
Definition at line 185 of file OSiLParserData.h.
...we need to track the first variable, constraint, objective are given in temporal order.
..
Definition at line 189 of file OSiLParserData.h.
Definition at line 190 of file OSiLParserData.h.
Definition at line 191 of file OSiLParserData.h.
...and we need to track the number of variables we have seen
Definition at line 194 of file OSiLParserData.h.
Definition at line 195 of file OSiLParserData.h.
Definition at line 196 of file OSiLParserData.h.
these two integers track how many variables and constraints have been assigned to a stage; this is used for consistency checks.
Definition at line 200 of file OSiLParserData.h.
Definition at line 201 of file OSiLParserData.h.
m_miVarStageInfo is an array that for each variable gives the stage to which it belongs.
Definition at line 206 of file OSiLParserData.h.
m_miConStageInfo is an array that for each constraint gives the stage to which it belongs.
Definition at line 211 of file OSiLParserData.h.
m_miObjStageInfo is an array that for each objective gives the stage to which it belongs.
Definition at line 216 of file OSiLParserData.h.
intervalhorizonON is true if we have found a horizon for the time interval
Definition at line 220 of file OSiLParserData.h.
intervalhorizon holds the value of the end of the planning horizon
Definition at line 223 of file OSiLParserData.h.
intervalstartON is true if we have found a start time for the time interval
Definition at line 227 of file OSiLParserData.h.
intervalstart holds the value for the start of the planning horizon
Definition at line 230 of file OSiLParserData.h.