#include <OSiLWriter.h>
Public Member Functions | |
OSiLWriter () | |
Default constructor. | |
~OSiLWriter () | |
Class destructor. | |
std::string | writeOSiL (const OSInstance *theosinstance) |
create an osil string from an OSInstance object | |
Public Attributes | |
bool | m_bWriteBase64 |
m_bWriteBase64 is set to true if we encode the linear constraint coefficients in base64 binary | |
bool | m_bWhiteSpace |
m_bWhiteSpace is set to true if we write white space in the file | |
std::string | m_sB64encoded |
m_sB64encoded is a string of data (start, colIdx, rowIdx, or values) from linear constraints coefficients encoded in base64 binary | |
Private Attributes | |
const OSInstance * | m_OSInstance |
m_OSInstance is an object in the class OSInstance |
Definition at line 29 of file OSiLWriter.h.
OSiLWriter::OSiLWriter | ( | ) |
Default constructor.
Definition at line 33 of file OSiLWriter.cpp.
References m_bWhiteSpace, and m_bWriteBase64.
OSiLWriter::~OSiLWriter | ( | ) |
std::string OSiLWriter::writeOSiL | ( | const OSInstance * | theosinstance | ) |
create an osil string from an OSInstance object
theosinstance | is a pointer to an OSInstance object |
Definition at line 41 of file OSiLWriter.cpp.
References QuadraticTerm::coef, Objective::coef, LinearConstraintCoefficients::colIdx, Constraints::con, Constraint::constant, Objective::constant, InstanceData::constraints, InstanceHeader::description, DoubleVector::el, IntVector::el, Base64::encodeb64(), OSnLNode::getNonlinearExpressionInXML(), Nl::idx, QuadraticTerm::idx, ObjCoef::idx, QuadraticTerm::idxOne, QuadraticTerm::idxTwo, Variable::init, Variable::initString, OSInstance::instanceData, OSInstance::instanceHeader, CommonUtil::ISOSNAN(), Constraint::lb, Variable::lb, InstanceData::linearConstraintCoefficients, m_bWhiteSpace, m_bWriteBase64, m_OSInstance, OSExpressionTree::m_treeRoot, Objective::maxOrMin, Constraint::name, Objective::name, Variable::name, InstanceHeader::name, NonlinearExpressions::nl, InstanceData::nonlinearExpressions, Constraints::numberOfConstraints, NonlinearExpressions::numberOfNonlinearExpressions, Objective::numberOfObjCoef, Objectives::numberOfObjectives, QuadraticCoefficients::numberOfQuadraticTerms, LinearConstraintCoefficients::numberOfValues, Variables::numberOfVariables, Objectives::obj, InstanceData::objectives, os_dtoa_format(), OSDBL_MAX, Nl::osExpressionTree, OSNAN, QuadraticCoefficients::qTerm, InstanceData::quadraticCoefficients, LinearConstraintCoefficients::rowIdx, InstanceHeader::source, LinearConstraintCoefficients::start, Variable::type, Constraint::ub, Variable::ub, LinearConstraintCoefficients::value, ObjCoef::value, Variables::var, InstanceData::variables, and Objective::weight.
Referenced by getOSiLFromMps(), getOSiLFromNl(), main(), and OSMatlab::solve().
const OSInstance* OSiLWriter::m_OSInstance [private] |
m_OSInstance is an object in the class OSInstance
Definition at line 34 of file OSiLWriter.h.
Referenced by writeOSiL().
m_bWriteBase64 is set to true if we encode the linear constraint coefficients in base64 binary
Definition at line 63 of file OSiLWriter.h.
Referenced by main(), OSiLWriter(), and writeOSiL().
m_bWhiteSpace is set to true if we write white space in the file
Definition at line 67 of file OSiLWriter.h.
Referenced by main(), OSiLWriter(), OSMatlab::solve(), and writeOSiL().
std::string OSiLWriter::m_sB64encoded |
m_sB64encoded is a string of data (start, colIdx, rowIdx, or values) from linear constraints coefficients encoded in base64 binary
Definition at line 72 of file OSiLWriter.h.