#include <OSnl2osil.h>
Collaboration diagram for OSnl2osil:
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 |
Definition at line 46 of file OSnl2osil.h.
OSnl2osil::OSnl2osil | ( | std::string | nlfilename | ) |
OSnl2osil::~OSnl2osil | ( | ) |
the OSnl2osil class destructor
Definition at line 107 of file OSnl2osil.cpp.
References asl, DoubleVector::bDeleteArrays, IntVector::bDeleteArrays, OSInstance::instanceData, InstanceData::linearConstraintCoefficients, osinstance, LinearConstraintCoefficients::rowIdx, LinearConstraintCoefficients::start, and LinearConstraintCoefficients::value.
bool OSnl2osil::createOSInstance | ( | ) |
create an OSInstance from the AMPL nl instance representation
Definition at line 415 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 doPrintModel(), doPrintRow(), getOSiLFromNl(), main(), and solve().
OSnLNode * OSnl2osil::walkTree | ( | expr * | e | ) |
parse an nl tree structure holding a nonlinear expression
Definition at line 120 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.
osinstance is a pointer to the OSInstance object that gets created from the instance represented in MPS format
Definition at line 72 of file OSnl2osil.h.
Referenced by createOSInstance(), doPrintModel(), doPrintRow(), getOSiLFromNl(), main(), solve(), walkTree(), and ~OSnl2osil().
std::vector<std::string> OSnl2osil::op_type |
std::vector<double> OSnl2osil::operand |
ograd* OSnl2osil::og [private] |
og is a pointer to the AMPL data structure holding the objective function coefficients
Definition at line 82 of file OSnl2osil.h.
Referenced by createOSInstance().
ASL* OSnl2osil::asl [private] |
asl is a pointer to basic AMPL data structure
Definition at line 86 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 90 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 94 of file OSnl2osil.h.
Referenced by OSnl2osil().