The OSnl2OS Class.
More...
#include <OSnl2OS.h>
|
| OSnl2OS () |
| the OSnl2OS class constructor More...
|
|
| OSnl2OS (ASL *cw, ASL *rw, ASL *asl) |
| alternate constructor which does not allocate the ASL structs More...
|
|
| ~OSnl2OS () |
| the OSnl2OS class destructor More...
|
|
ASL * | getASL (std::string name) |
| return a pointer to an ASL object More...
|
|
bool | readNl (std::string stub) |
| read the nl file More...
|
|
void | setOsol (std::string osol) |
| set the osol string More...
|
|
void | setJobID (std::string jobID) |
| set the job ID More...
|
|
bool | setASL (ASL *asl, ASL *rw, ASL *cw) |
| set the pointers to the three ASL objects More...
|
|
bool | createOSObjects () |
| create an OSInstance and OSOption representation from the AMPL nl content (Some of the information in the nl file — such as initial values, basis information, branching priorities, etc. More...
|
|
void | setVar (OSInstance *osinstance, int lower, int upper, char vartype) |
| store a number of variables into an OSInstance object More...
|
|
void | setIBVar (OSInstance *osinstance, int lower, int upper) |
| special version of the previous method because AMPL makes no distinction between integer and binary variables that occur in nonlinear expressions. More...
|
|
OSnLNode * | walkTree (expr *e) |
| parse an nl tree structure holding a nonlinear expression More...
|
|
|
OSoLReader * | osolreader |
| we may need to parse an OSoL file if there is suffix information indicated in the AMPL nl content More...
|
|
OSInstance * | osinstance |
| osinstance is a pointer to the OSInstance object that gets created from the information in the nl file More...
|
|
OSOption * | osoption |
| osoption is a pointer to the OSOption object that gets created from the information in the nl file (and the OSoL string if present) More...
|
|
std::string | osol |
| osol is a string containing the content of the OS option file (it may be empty if no option file was provided). More...
|
|
std::string | jobID |
| jobID is a string containing a jobID that may have been supplied on the command line (it may be empty). More...
|
|
std::vector< std::string > | op_type |
|
std::vector< double > | operand |
|
int | numkount |
|
The OSnl2OS Class.
- Author
- Horand Gassmann, Jun Ma, Kipp Martin
Definition at line 78 of file OSnl2OS.h.
OSnl2OS::OSnl2OS |
( |
ASL * |
cw, |
|
|
ASL * |
rw, |
|
|
ASL * |
asl |
|
) |
| |
alternate constructor which does not allocate the ASL structs
¶m cw a pointer to a (previously allocated) struct used for column-wise representation ¶m rw a pointer to a (previously allocated) struct used for row-wise representation ¶m asl an extra pointer that can be used to switch between rw and cw
ASL* OSnl2OS::getASL |
( |
std::string |
name | ) |
|
return a pointer to an ASL object
- Parameters
-
name | carries the name of the ASL object (there are three of them: asl, rw, cw) |
- Returns
- the pointer to the object named
bool OSnl2OS::readNl |
( |
std::string |
stub | ) |
|
read the nl file
- Parameters
-
stub | is the (relevant part of the) file name |
- Returns
- whether the read was successful
void OSnl2OS::setOsol |
( |
std::string |
osol | ) |
|
void OSnl2OS::setJobID |
( |
std::string |
jobID | ) |
|
bool OSnl2OS::setASL |
( |
ASL * |
asl, |
|
|
ASL * |
rw, |
|
|
ASL * |
cw |
|
) |
| |
set the pointers to the three ASL objects
- Parameters
-
asl | carries a pointer to the object named "asl" |
rw | carries a pointer to the object named "rw" |
cw | carries a pointer to the object named "cw" (asl should point to the same location as either rw or cw) |
- Returns
- whether the operation was successful
bool OSnl2OS::createOSObjects |
( |
| ) |
|
create an OSInstance and OSOption representation from the AMPL nl content (Some of the information in the nl file — such as initial values, basis information, branching priorities, etc.
— cannot be stored into an OSInstance and must be stored in an OSOption object instead.)
- Returns
- whether the objects were created successfully.
void OSnl2OS::setVar |
( |
OSInstance * |
osinstance, |
|
|
int |
lower, |
|
|
int |
upper, |
|
|
char |
vartype |
|
) |
| |
store a number of variables into an OSInstance object
- Parameters
-
osinstance | a pointer to the OSInstance object |
lower | index of the first variable to be set in this call |
upper | set all variables from lower...upper-1 |
vartype | the type of the variable (in AMPL this is 'C', 'B' or 'I') |
void OSnl2OS::setIBVar |
( |
OSInstance * |
osinstance, |
|
|
int |
lower, |
|
|
int |
upper |
|
) |
| |
special version of the previous method because AMPL makes no distinction between integer and binary variables that occur in nonlinear expressions.
The actual type ('B' or 'I') must be inferred from the variable bounds.
- Parameters
-
osinstance | a pointer to the OSInstance object |
lower | index of the first variable to be set in this call |
upper | set all variables from lower...upper-1 |
parse an nl tree structure holding a nonlinear expression
- Returns
- the AMPL nonlinear structure as an OSnLNode.
we may need to parse an OSoL file if there is suffix information indicated in the AMPL nl content
Definition at line 160 of file OSnl2OS.h.
osinstance is a pointer to the OSInstance object that gets created from the information in the nl file
Definition at line 172 of file OSnl2OS.h.
osoption is a pointer to the OSOption object that gets created from the information in the nl file (and the OSoL string if present)
Definition at line 177 of file OSnl2OS.h.
std::string OSnl2OS::osol |
osol is a string containing the content of the OS option file (it may be empty if no option file was provided).
If osoption is NULL, the option information is found in osol.
Definition at line 183 of file OSnl2OS.h.
std::string OSnl2OS::jobID |
jobID is a string containing a jobID that may have been supplied on the command line (it may be empty).
If osoption is not NULL, the jobID has been duplicated to osoption.
Definition at line 189 of file OSnl2OS.h.
std::vector<std::string> OSnl2OS::op_type |
std::vector<double> OSnl2OS::operand |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/OS-2.9.3/src/OSModelInterfaces/OSnl2OS.h