- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OSgams2osil Class Reference

Creating a OSInstance from a GAMS model given as GAMS Modeling Object (GMO). More...

`#include <OSgams2osil.hpp>`

Collaboration diagram for OSgams2osil:

[legend]
List of all members.

## Public Member Functions
| OSgams2osil (struct gmoRec *gmo_=NULL)
| OSgams2osil (std::string gamsControlFile)
| ~OSgams2osil ()
bool | initGMO (const char *datfile)
bool | createOSInstance ()
| Creates an OSInstance from the GAMS smag instance representation.
OSInstance * | takeOverOSInstance ()
| Gives OSInstance and ownership to calling function.
OSInstance * | getOSInstance ()
| Gives OSInstances but keeps ownership.
## Public Attributes
OSInstance * | osinstance
## Private Member Functions
OSnLNode * | parseGamsInstructions (int codelen, int *opcodes, int *fields, int constantlen, double *constants)
## Private Attributes
gevRec * | gev
gmoRec * | gmo

## Detailed Description

Creating a OSInstance from a GAMS model given as GAMS Modeling Object (GMO).

Definition at line 22 of file OSgams2osil.hpp.

## Constructor & Destructor Documentation

OSgams2osil::OSgams2osil | ( | struct gmoRec * | gmo_ = `NULL` | ) |

OSgams2osil::OSgams2osil | ( | std::string | gamsControlFile | ) |

Definition at line 28 of file OSgams2osil.cpp.

References initGMO().

OSgams2osil::~OSgams2osil | ( |  | ) |

Definition at line 34 of file OSgams2osil.cpp.

References gev, gmo, and osinstance.

## Member Function Documentation

OSnLNode * OSgams2osil::parseGamsInstructions | ( | int | codelen,
|  | int * | opcodes,
|  | int * | fields,
|  | int | constantlen,
|  | double * | constants |
| ) |  |  | `[private]`

Definition at line 338 of file OSgams2osil.cpp.

References OSnLNodeVariable::coef, OSInstance::getVariableNames(), gmo, OSnLNodeVariable::idx, osinstance, and OSnLNodeNumber::value.

Referenced by createOSInstance().

bool OSgams2osil::initGMO | ( | const char * | datfile | ) |

Definition at line 45 of file OSgams2osil.cpp.

References gev, gmo, and OSDBL_MAX.

Referenced by OSgams2osil().

bool OSgams2osil::createOSInstance | ( |  | ) |

Creates an OSInstance from the GAMS smag instance representation.

Returns:
  whether the instance is created successfully.

Definition at line 112 of file OSgams2osil.cpp.

References OSInstance::addConstraint(), OSInstance::addObjective(), OSInstance::getConstraintNames(), gev, gmo, Nl::idx, SparseVector::indexes, OSInstance::instanceData, OSnLNode::m_mChildren, OSExpressionTree::m_treeRoot, NonlinearExpressions::nl, InstanceData::nonlinearExpressions, NonlinearExpressions::numberOfNonlinearExpressions, OSDBL_MAX, Nl::osExpressionTree, osinstance, parseGamsInstructions(), OSInstance::setConstraintNumber(), OSInstance::setInstanceDescription(), OSInstance::setLinearConstraintCoefficients(), OSInstance::setObjectiveNumber(), OSInstance::setVariableNumber(), OSInstance::setVariables(), OSnLNodeNumber::value, and SparseVector::values.

Referenced by getOSiLFromGams(), and solve().

OSInstance * OSgams2osil::takeOverOSInstance | ( |  | ) |

Gives OSInstance and ownership to calling function.

This object forgets about the created instance.

Definition at line 332 of file OSgams2osil.cpp.

References osinstance.

OSInstance* OSgams2osil::getOSInstance | ( |  | ) | `[inline]`

Gives OSInstances but keeps ownership.

Destruction will destruct OSInstance.

Definition at line 54 of file OSgams2osil.hpp.

References osinstance.

## Member Data Documentation

struct gevRec* OSgams2osil::gev`[private]`

Definition at line 24 of file OSgams2osil.hpp.

Referenced by createOSInstance(), initGMO(), and ~OSgams2osil().

struct gmoRec* OSgams2osil::gmo`[private]`

Definition at line 25 of file OSgams2osil.hpp.

Referenced by createOSInstance(), initGMO(), parseGamsInstructions(), and ~OSgams2osil().

OSInstance* OSgams2osil::osinstance

Definition at line 31 of file OSgams2osil.hpp.

Referenced by createOSInstance(), getOSiLFromGams(), getOSInstance(), parseGamsInstructions(), solve(), takeOverOSInstance(), and ~OSgams2osil().

The documentation for this class was generated from the following files:

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSModelInterfaces/OSgams2osil.hpp
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSModelInterfaces/OSgams2osil.cpp