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

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

# OSnl2osil Class Reference

The OSnl2osil Class. More...

`#include <OSnl2osil.h>`

Collaboration diagram for OSnl2osil:

[legend]
List of all members.

## Public Member Functions
| OSnl2osil (std::string nlfilename)
| the OSnl2osil class constructor
| ~OSnl2osil ()
| the OSnl2osil class destructor
bool | createOSInstance ()
| create an OSInstance from the AMPL nl instance representation
OSnLNode * | walkTree (expr *e)
| parse an nl tree structure holding a nonlinear expression
## Public Attributes
OSInstance * | osinstance
| osinstance is a pointer to the OSInstance object that gets created from the instance represented in MPS format
std::vector< std::string > | op_type
std::vector< double > | operand
int | numkount
## Private Attributes
ograd * | og
| og is a pointer to the AMPL data structure holding the objective function coefficients
ASL * | asl
| asl is a pointer to basic AMPL data structure
FILE * | nl
| nl is a pointer to the file with the nl instance
char * | stub
| stub is the name of the file with the nl instance

## Detailed Description

The OSnl2osil Class.

Author:
  Robert Fourer, Jun Ma, Kipp Martin

Version:
  1.0, 03/14/2004

Since:
  OS 1.0

Remarks:
  the OSnl2osil class is used for reading an instance in AMPL nl format and creating an OSInstance object in OSiL format

Definition at line 48 of file OSnl2osil.h.

## Constructor & Destructor Documentation

OSnl2osil::OSnl2osil | ( | std::string | nlfilename | ) |

the OSnl2osil class constructor

Definition at line 64 of file OSnl2osil.cpp.

References asl, nl, numkount, R_OPS, r_ops_int, and stub.

OSnl2osil::~OSnl2osil | ( |  | ) |

the OSnl2osil class destructor

Definition at line 100 of file OSnl2osil.cpp.

References asl, DoubleVector::bDeleteArrays, IntVector::bDeleteArrays, OSInstance::instanceData, InstanceData::linearConstraintCoefficients, osinstance, LinearConstraintCoefficients::rowIdx, LinearConstraintCoefficients::start, and LinearConstraintCoefficients::value.

## Member Function Documentation

bool OSnl2osil::createOSInstance | ( |  | ) |

create an OSInstance from the AMPL nl instance representation

Returns:
  whether the instance is created successfully.

Definition at line 396 of file OSnl2osil.cpp.

References OSInstance::addObjective(), OSInstance::addVariable(), SparseVector::indexes, og, OS_EPS, OSDBL_MAX, osinstance, OSInstance::setInstanceDescription(), OSInstance::setObjectiveNumber(), OSInstance::setVariableNumber(), and SparseVector::values.

Referenced by getOSiLFromNl(), main(), and solve().

OSnLNode * OSnl2osil::walkTree | ( | expr * | e | ) |

parse an nl tree structure holding a nonlinear expression

Returns:
  the AMPL nonlinear structure as an OSnLNode.

Definition at line 112 of file OSnl2osil.cpp.

References asl, OSnLNodeVariable::coef, OSInstance::getVariableNumber(), OSnLNodeVariable::idx, Intcast, OSnLNode::inumberOfChildren, OSnLNode::m_mChildren, numkount, op_type, operand, os_dtoa_format(), osinstance, OSnLNodeNumber::value, and VAR_E.

## Member Data Documentation

OSInstance* OSnl2osil::osinstance

osinstance is a pointer to the OSInstance object that gets created from the instance represented in MPS format

Definition at line 74 of file OSnl2osil.h.

Referenced by createOSInstance(), getOSiLFromNl(), main(), solve(), walkTree(), and ~OSnl2osil().

std::vector<std::string> OSnl2osil::op_type

Definition at line 76 of file OSnl2osil.h.

Referenced by walkTree().

std::vector<double> OSnl2osil::operand

Definition at line 77 of file OSnl2osil.h.

Referenced by walkTree().

int OSnl2osil::numkount

Definition at line 78 of file OSnl2osil.h.

Referenced by OSnl2osil(), and walkTree().

ograd* OSnl2osil::og`[private]`

og is a pointer to the AMPL data structure holding the objective function coefficients

Definition at line 84 of file OSnl2osil.h.

Referenced by createOSInstance().

ASL* OSnl2osil::asl`[private]`

asl is a pointer to basic AMPL data structure

Definition at line 88 of file OSnl2osil.h.

Referenced by OSnl2osil(), walkTree(), and ~OSnl2osil().

FILE* OSnl2osil::nl`[private]`

nl is a pointer to the file with the nl instance

Definition at line 92 of file OSnl2osil.h.

Referenced by OSnl2osil().

char* OSnl2osil::stub`[private]`

stub is the name of the file with the nl instance

Definition at line 96 of file OSnl2osil.h.

Referenced by OSnl2osil().

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

- /home/coin/SVN-release/OS-2.3.5/OS/src/OSModelInterfaces/OSnl2osil.h
- /home/coin/SVN-release/OS-2.3.5/OS/src/OSModelInterfaces/OSnl2osil.cpp