OS  2.10.2
OSrLParserData.h
Go to the documentation of this file.
1 /* $Id: OSrLParserData.h 5284 2017-12-08 13:52:50Z stefan $ */
14 #ifndef OSRLPARSERDATA_H
15 #define OSRLPARSERDATA_H
16 
17 #include "OSnLNode.h"
18 #include "OSGeneral.h"
19 
20 #include <vector>
21 #include <sstream>
22 
23 
24 
30 {
34  std::string name;
35 
39  std::string description;
40 
44  std::string value;
45 
50 
57  std::string *otherVarText;
58 
59 
67 
68 };
69 
70 
84 {
85 public:
86 
88  OSrLParserData( );
89 
90  //** the OSrLParserData class destructor */
91  ~OSrLParserData() ;
92 
93 
95  std::string statusType;
96 
98  std::string statusDescription;
99 
102  double timeValue;
103  std::string timeType;
104  std::string timeCategory;
105  std::string timeUnit;
106  std::string timeDescription;
107 
111 
113  std::string tmpOtherValue;
114  std::string tmpOtherName;
115  std::string tmpOtherDescription;
116 
118  std::string itemContent;
119 
122  void* scanner;
123 
125  unsigned int numberOfSolutions;
126 
129 
132 
135 
140 
145 
150 
155 
156 
161 
163  int numberOf;
164 
166  int kounter;
167 
169  int iOther;
170 
172  int ivar;
173 
175  int idx;
176 
178  double tempVal;
179 
181  int tempInt;
182 
184  std::string tempStr;
185 
187  std::string name;
188 
190  std::ostringstream outStr;
191 
196 
201 
206 
211 
216 
218  unsigned int solutionIdx;
219 
221  int mult;
222 
224  int incr;
225 
253 
259  std::string categoryAttribute;
260  std::string descriptionAttribute;
261  std::string nameAttribute;
262  std::string typeAttribute;
263  std::string varTypeAttribute;
264  std::string objTypeAttribute;
265  std::string conTypeAttribute;
266  std::string unitAttribute;
267  std::string valueAttribute;
268  std::string solverAttribute;
269 
270 
274 
287 
297 
307 
322 
325 
326 
330  std::vector<IndexValuePair*> primalVals;
331 
332 
336  std::vector<IndexValuePair*> objVals;
337 
338 
342  std::vector<IndexValuePair*> dualVals;
343 
344 
347 
349  std::vector<OtherVariableResultStruct*> otherVarVec;
350 
354  char *errorText;
355 
359  std::string parser_errors;
360 
364 };
365 
366 #endif /*OSRLPARSERDATA_H_*/
OSrLParserData::mult
int mult
a multiplier or repeat count for compact representation of an array
Definition: OSrLParserData.h:221
OSrLParserData::jobUsedCPUSpeedPresent
bool jobUsedCPUSpeedPresent
Definition: OSrLParserData.h:319
OSrLParserData::timeServiceStartedPresent
bool timeServiceStartedPresent
Definition: OSrLParserData.h:304
OSrLParserData::conTypeAttribute
std::string conTypeAttribute
Definition: OSrLParserData.h:265
OSrLParserData::jobStatusPresent
bool jobStatusPresent
set job...Present to true if the corresponding element (child of the <job> element) has been parsed
Definition: OSrLParserData.h:311
OSrLParserData::jobUsedCPUNumberPresent
bool jobUsedCPUNumberPresent
Definition: OSrLParserData.h:320
OSrLParserData::numberOfOtherConstraintResults
int numberOfOtherConstraintResults
the number of types of constraint results other than the value of the constraint
Definition: OSrLParserData.h:205
OSrLParserData::timeDescription
std::string timeDescription
Definition: OSrLParserData.h:106
OtherVariableResultStruct::value
std::string value
value holds the text of the value attribute of the OtherVariableResult element
Definition: OSrLParserData.h:44
OSrLParserData::otherJobResultsPresent
bool otherJobResultsPresent
Definition: OSrLParserData.h:321
OSrLParserData::generalServiceNamePresent
bool generalServiceNamePresent
Definition: OSrLParserData.h:281
OSrLParserData::varTypeAttributePresent
bool varTypeAttributePresent
Definition: OSrLParserData.h:246
OSrLParserData::numberOfOtherMatrixVariableResults
int numberOfOtherMatrixVariableResults
the number of types of matrix variable results other than the value of the matrix variable
Definition: OSrLParserData.h:215
OSrLParserData::systemAvailableDiskSpacePresent
bool systemAvailableDiskSpacePresent
Definition: OSrLParserData.h:292
OtherVariableResultStruct::otherVarIndex
int * otherVarIndex
otherVarIndex is a pointer to an array with number of elements equal to the number of variables.
Definition: OSrLParserData.h:66
OSrLParserData::generalMessagePresent
bool generalMessagePresent
Definition: OSrLParserData.h:279
OSrLParserData::otherGeneralResultsPresent
bool otherGeneralResultsPresent
Definition: OSrLParserData.h:286
OSrLParserData::categoryAttribute
std::string categoryAttribute
many attributes, particularly those that return strings, are used multiple times, and the parser uses...
Definition: OSrLParserData.h:259
OSrLParserData::numberOfOtherVariableResults
int numberOfOtherVariableResults
the number of types of variable results other than the value of the variable
Definition: OSrLParserData.h:195
OSrLParserData::systemAvailableCPUSpeedPresent
bool systemAvailableCPUSpeedPresent
Definition: OSrLParserData.h:294
OSrLParserData::tempInt
int tempInt
a temporary variable to hold an integer value
Definition: OSrLParserData.h:181
OSrLParserData::descriptionAttributePresent
bool descriptionAttributePresent
Definition: OSrLParserData.h:237
OSrLParserData::multPresent
bool multPresent
Definition: OSrLParserData.h:234
OSrLParserData::statusType
std::string statusType
the status type of the result
Definition: OSrLParserData.h:95
OSrLParserData::actualStartTimePresent
bool actualStartTimePresent
Definition: OSrLParserData.h:314
OSrLParserData::tempStr
std::string tempStr
a temporary variable to hold a string
Definition: OSrLParserData.h:184
OtherVariableResultStruct::otherVarText
std::string * otherVarText
otherVarText is a pointer to an array with number of elements equal to the number of variables.
Definition: OSrLParserData.h:57
OSrLParserData::incr
int incr
an increment for compact representation of an array (used with mult)
Definition: OSrLParserData.h:224
OSrLParserData::jobSubmitTimePresent
bool jobSubmitTimePresent
Definition: OSrLParserData.h:312
OSrLParserData::idxAttributePresent
bool idxAttributePresent
Definition: OSrLParserData.h:235
OSrLParserData::solverAttributePresent
bool solverAttributePresent
Definition: OSrLParserData.h:251
OSrLParserData::nVarPresent
bool nVarPresent
Definition: OSrLParserData.h:271
OSrLParserData::generalServiceURIPresent
bool generalServiceURIPresent
Definition: OSrLParserData.h:280
OSrLParserData::generalJobIDPresent
bool generalJobIDPresent
Definition: OSrLParserData.h:283
OSrLParserData::otherServiceResultsPresent
bool otherServiceResultsPresent
Definition: OSrLParserData.h:306
OSrLParserData::numberOfObjAttributePresent
bool numberOfObjAttributePresent
Definition: OSrLParserData.h:241
OtherVariableResultStruct::name
std::string name
name holds the text of the name attribute of the OtherVariableResult element
Definition: OSrLParserData.h:34
OSrLParserData::unitAttributePresent
bool unitAttributePresent
Definition: OSrLParserData.h:249
OSrLParserData::numberOfConIdxAttributePresent
bool numberOfConIdxAttributePresent
Definition: OSrLParserData.h:244
OSrLParserData::objVals
std::vector< IndexValuePair * > objVals
Definition: OSrLParserData.h:336
OSrLParserData::nConPresent
bool nConPresent
Definition: OSrLParserData.h:273
OSrLParserData::scanner
void * scanner
scanner is used to store data in a reentrant lexer we use this to pass an OSrLParserData object to th...
Definition: OSrLParserData.h:122
OSrLParserData::tempVal
double tempVal
a temporary variable to hold an integer or double value
Definition: OSrLParserData.h:178
OSrLParserData::numberOfConAttributePresent
bool numberOfConAttributePresent
Definition: OSrLParserData.h:243
OSrLParserData::kounter
int kounter
a temporary counter to count variables, number of attributes, etc.
Definition: OSrLParserData.h:166
OSrLParserData::numberOfObjectives
int numberOfObjectives
total number of Objectives in the model instance
Definition: OSrLParserData.h:134
OSrLParserData::timeCategory
std::string timeCategory
Definition: OSrLParserData.h:104
OSrLParserData::numberOfOtherMatrixProgrammingResults
int numberOfOtherMatrixProgrammingResults
the number of types of matrix programming results other than those associated with matrix variables,...
Definition: OSrLParserData.h:210
OSrLParserData::idx
int idx
a temporary variable to hold an integer index value
Definition: OSrLParserData.h:175
OSrLParserData::outStr
std::ostringstream outStr
a temporary variable to hold an output stream value
Definition: OSrLParserData.h:190
OSrLParserData::generalSolverInvokedPresent
bool generalSolverInvokedPresent
Definition: OSrLParserData.h:284
OSrLParserData::generalStatusPresent
bool generalStatusPresent
set general...Present to true if the corresponding element (child of the <general> element) has been ...
Definition: OSrLParserData.h:278
OSrLParserData::numberOf
int numberOf
a temporary variable to hold the number of entries in a list
Definition: OSrLParserData.h:163
OSrLParserData::varTypeAttribute
std::string varTypeAttribute
Definition: OSrLParserData.h:263
OSrLParserData::valueAttributePresent
bool valueAttributePresent
Definition: OSrLParserData.h:250
OSrLParserData::numberOfSolutions
unsigned int numberOfSolutions
number of result solutions
Definition: OSrLParserData.h:125
OSrLParserData::numberOfVariables
int numberOfVariables
total number of variables in the model instance
Definition: OSrLParserData.h:128
OSrLParserData::numberOfTimes
int numberOfTimes
There could be more than one time measurement; numberOfTimes stores the number of them.
Definition: OSrLParserData.h:110
OSrLParserData::parser_errors
std::string parser_errors
used to accumulate error message so the parser does not die on the first error encountered
Definition: OSrLParserData.h:359
OSrLParserData::~OSrLParserData
~OSrLParserData()
OSrLParserData::suppressFurtherErrorMessages
bool suppressFurtherErrorMessages
Definition: OSrLParserData.h:363
OSrLParserData
The OSrLParserData Class.
Definition: OSrLParserData.h:83
OSrLParserData::jobEndTimePresent
bool jobEndTimePresent
Definition: OSrLParserData.h:315
OSrLParserData::unitAttribute
std::string unitAttribute
Definition: OSrLParserData.h:266
OSrLParserData::objTypeAttributePresent
bool objTypeAttributePresent
Definition: OSrLParserData.h:247
OSrLParserData::numberOfIdx
int numberOfIdx
number of indexes in a category of basis elements, may change from category to category and solution ...
Definition: OSrLParserData.h:139
OSrLParserData::primalValPair
struct IndexValuePair * primalValPair
for each solution we will build a vector of index-value pairs of primal values
Definition: OSrLParserData.h:329
OSrLParserData::systemInformationPresent
bool systemInformationPresent
set system...Present to true if the corresponding element (child of the <system> element) has been pa...
Definition: OSrLParserData.h:291
OSrLParserData::otherSystemResultsPresent
bool otherSystemResultsPresent
Definition: OSrLParserData.h:296
OSrLParserData::jobUsedDiskSpacePresent
bool jobUsedDiskSpacePresent
Definition: OSrLParserData.h:317
OSrLParserData::typeAttributePresent
bool typeAttributePresent
Definition: OSrLParserData.h:245
OSrLParserData::jobUsedMemoryPresent
bool jobUsedMemoryPresent
Definition: OSrLParserData.h:318
OSrLParserData::objTypeAttribute
std::string objTypeAttribute
Definition: OSrLParserData.h:264
OSrLParserData::weightedObjAttributePresent
bool weightedObjAttributePresent
Definition: OSrLParserData.h:252
OSrLParserData::valueAttribute
std::string valueAttribute
Definition: OSrLParserData.h:267
OSrLParserData::serviceUtilizationPresent
bool serviceUtilizationPresent
Definition: OSrLParserData.h:305
OtherVariableResultStruct::description
std::string description
description holds the text of the description attribute of the OtherVariableResult element
Definition: OSrLParserData.h:39
OSrLParserData::solutionIdx
unsigned int solutionIdx
an index of which solution we have found
Definition: OSrLParserData.h:218
OSrLParserData::nameAttribute
std::string nameAttribute
Definition: OSrLParserData.h:261
OSrLParserData::numberOfVarAttributePresent
bool numberOfVarAttributePresent
Definition: OSrLParserData.h:239
OSrLParserData::solverAttribute
std::string solverAttribute
Definition: OSrLParserData.h:268
OSrLParserData::numberOfVarIdxAttributePresent
bool numberOfVarIdxAttributePresent
Definition: OSrLParserData.h:240
OSrLParserData::typeAttribute
std::string typeAttribute
Definition: OSrLParserData.h:262
OSrLParserData::jobTimingInformationPresent
bool jobTimingInformationPresent
Definition: OSrLParserData.h:316
OSrLParserData::timeUnit
std::string timeUnit
Definition: OSrLParserData.h:105
OSrLParserData::serviceCurrentJobCountPresent
bool serviceCurrentJobCountPresent
Definition: OSrLParserData.h:302
OSrLParserData::serviceTotalJobsSoFarPresent
bool serviceTotalJobsSoFarPresent
Definition: OSrLParserData.h:303
OSrLParserData::tmpOtherName
std::string tmpOtherName
Definition: OSrLParserData.h:114
OSrLParserData::scheduledStartTimePresent
bool scheduledStartTimePresent
Definition: OSrLParserData.h:313
OSrLParserData::statusDescription
std::string statusDescription
the status Description of the solution
Definition: OSrLParserData.h:98
OSrLParserData::systemAvailableCPUNumberPresent
bool systemAvailableCPUNumberPresent
Definition: OSrLParserData.h:295
OSrLParserData::name
std::string name
a temporary variable to hold a variable, objective or constraint name
Definition: OSrLParserData.h:187
OSrLParserData::timeType
std::string timeType
Definition: OSrLParserData.h:103
OtherVariableResultStruct::numberOfVar
int numberOfVar
numberOfVar holds the number of variables in the array of the OtherVariableResult element
Definition: OSrLParserData.h:49
OSrLParserData::tmpOtherValue
std::string tmpOtherValue
Provide temporary storage for attribute values associated with an OtherVarResult.
Definition: OSrLParserData.h:113
OSrLParserData::numberOfConstraints
int numberOfConstraints
total number of constraints in the model instance
Definition: OSrLParserData.h:131
OSrLParserData::categoryAttributePresent
bool categoryAttributePresent
Definition: OSrLParserData.h:236
OSrLParserData::timeValue
double timeValue
the next few variables store a time measurement and associated attribute values
Definition: OSrLParserData.h:102
OSrLParserData::numberOfOtherObjectiveResults
int numberOfOtherObjectiveResults
the number of types of objective results other than the value of the objective
Definition: OSrLParserData.h:200
OSrLParserData::tmpOtherDescription
std::string tmpOtherDescription
Definition: OSrLParserData.h:115
OSrLParserData::otherVarStruct
struct OtherVariableResultStruct * otherVarStruct
a pointer to an OtherVariableResultStruct structure
Definition: OSrLParserData.h:346
OSrLParserData::dualValPair
struct IndexValuePair * dualValPair
for each solution we will build a vector of index-value pairs of dual values
Definition: OSrLParserData.h:341
OSrLParserData::numberOfObjIdxAttributePresent
bool numberOfObjIdxAttributePresent
Definition: OSrLParserData.h:242
OSGeneral.h
OSrLParserData::dualVals
std::vector< IndexValuePair * > dualVals
Definition: OSrLParserData.h:342
OSrLParserData::primalVals
std::vector< IndexValuePair * > primalVals
Definition: OSrLParserData.h:330
OSrLParserData::conTypeAttributePresent
bool conTypeAttributePresent
Definition: OSrLParserData.h:248
OSrLParserData::systemAvailableMemoryPresent
bool systemAvailableMemoryPresent
Definition: OSrLParserData.h:293
OSrLParserData::numberOfVar
int numberOfVar
number of variables in a solution instance, may change from solution to solution
Definition: OSrLParserData.h:144
OSrLParserData::OSrLParserData
OSrLParserData()
the OSrLParserData class constructor
OSrLParserData::itemContent
std::string itemContent
Provide temporary storage for a single <record> contained in an OtherSolutionResult.
Definition: OSrLParserData.h:118
OSrLParserData::incrPresent
bool incrPresent
Definition: OSrLParserData.h:233
OSrLParserData::numberOfCon
int numberOfCon
number of constraints in a solution instance, may change from solution to solution
Definition: OSrLParserData.h:154
OSrLParserData::numberOfObj
int numberOfObj
number of Objectives in a solution instance may change from solution to solution
Definition: OSrLParserData.h:160
IndexValuePair
A commonly used structure holding an index-value pair.
Definition: OSGeneral.h:630
OSrLParserData::nObjPresent
bool nObjPresent
Definition: OSrLParserData.h:272
OSrLParserData::serviceCurrentStatePresent
bool serviceCurrentStatePresent
set service...Present to true if the corresponding element (child of the <service> element) has been ...
Definition: OSrLParserData.h:301
OSrLParserData::otherVarVec
std::vector< OtherVariableResultStruct * > otherVarVec
store a vector of pointers to otherVarVec structures
Definition: OSrLParserData.h:349
OSrLParserData::numberOfItemsPresent
bool numberOfItemsPresent
Definition: OSrLParserData.h:323
OSrLParserData::descriptionAttribute
std::string descriptionAttribute
Definition: OSrLParserData.h:260
OSrLParserData::generalInstanceNamePresent
bool generalInstanceNamePresent
Definition: OSrLParserData.h:282
OSrLParserData::numberAttributePresent
bool numberAttributePresent
a number of boolean vriables to track which of the attributes have been found in the present list.
Definition: OSrLParserData.h:232
OSrLParserData::ivar
int ivar
a temporary counter to count second-level objects
Definition: OSrLParserData.h:172
OSrLParserData::errorText
char * errorText
if the parser finds invalid text it is held here and we delete if the file was not valid
Definition: OSrLParserData.h:354
OSrLParserData::nameAttributePresent
bool nameAttributePresent
Definition: OSrLParserData.h:238
OSrLParserData::numberOfItems
int numberOfItems
Definition: OSrLParserData.h:324
OSrLParserData::generalTimeStampPresent
bool generalTimeStampPresent
Definition: OSrLParserData.h:285
OSrLParserData::ignoreDataAfterErrors
bool ignoreDataAfterErrors
two booleans to govern the behavior after an error has been encountered
Definition: OSrLParserData.h:362
OSrLParserData::objValPair
struct IndexValuePair * objValPair
for each solution we will build a vector of index-value pairs of objective function values
Definition: OSrLParserData.h:335
OtherVariableResultStruct
A structure to information about an OtherVariableResult element.
Definition: OSrLParserData.h:29
OSrLParserData::numberOfVarIdx
int numberOfVarIdx
number of variables indices in other variable result enumeration, may change from solution to solutio...
Definition: OSrLParserData.h:149
OSrLParserData::iOther
int iOther
a temporary counter to count other variable, objective and constraint results
Definition: OSrLParserData.h:169
OSnLNode.h
This file defines the OSnLNode class along with its derived classes.