Public Member Functions | Public Attributes | List of all members
OSCommandLine Class Reference

This class is used to store command line options for the OSSolverService executable and to provide methods to manipulate them. More...

#include <OSCommandLine.h>

Collaboration diagram for OSCommandLine:
Collaboration graph
[legend]

Public Member Functions

 OSCommandLine ()
 constructor method More...
 
 ~OSCommandLine ()
 destructor method More...
 
void reset_options ()
 a function to reset the command line to default values useful especially in the interactive shell More...
 
std::string list_options ()
 a function to print the current command line option values More...
 
void convertSolverNameToLowerCase ()
 to avoid ambiguity it might be necessary to convert the solver name to lower case ... More...
 
void convertSolverNameToUpperCase ()
 ... More...
 

Public Attributes

OSInstanceosinstance
 osinstance is a representation of the instance in OSInstance format More...
 
OSOptionosoption
 osoption is a representation of the solver options in OSOption format More...
 
std::string serviceLocation
 serviceLocation is the URL of the remote solver when a local solver is not used More...
 
std::string serviceMethod
 the service method the OSSolverService should execute, i.e. More...
 
std::string solverName
 the name of the solver to be invoked locally, e.g -solver Ipopt More...
 
std::string configFile
 configFile is the name of the file that holds the configuration options if the OSSolverService reads its options from a file rather than command line inputs More...
 
std::string osilFile
 osilFile is the name of the file that holds the model instance in OSiL format More...
 
std::string osil
 osil is the content of the osilFile More...
 
std::string osilOutputFile
 osilOutputFile is the name of the file to which the instance can be written in OSiL format. More...
 
std::string osolFile
 osolFile is the name of the file that holds the solver options in OSoL format More...
 
std::string osol
 osol is the content of the osolFile More...
 
std::string osolOutputFile
 osolOutputFile is the name of the file to which the solver options can be written in OSoL format. More...
 
std::string osrlFile
 osrlFile is the name of the file where the solver should write the result (in OSrL format) More...
 
std::string insListFile
 name of the file containing the instance in LINDO instruction list format More...
 
std::string insList
 insList is the content of the insListFile – this is not implemented More...
 
std::string osplInputFile
 name of an input file with xml in OS process language format, used for example to knock on a server, for example -osplInput ../data/osplFiles/demo.ospl More...
 
std::string osplInput
 osplInput is the content of the osplInputFile More...
 
std::string osplOutputFile
 name of an output file where the solver should write the result of a knock or kill service request More...
 
std::string mpsFile
 the name of the file that holds an instance in MPS format More...
 
std::string mps
 the string that holds an instance in MPS format More...
 
std::string nlFile
 the name of the file that holds an instance in AMPL nl format More...
 
std::string nl
 the string that holds an instance in AMPL nl format More...
 
std::string datFile
 the name of the file that holds an instance in GAMS dat format More...
 
std::string dat
 the string that holds an instance in GAMS dat format More...
 
std::string gamsControlFile
 the name of the file that holds the GAMS control parameters More...
 
std::string browser
 this parameter is a path to the browser on the local machine. More...
 
int printLevel
 this parameter controls the amount of output to print the higher the number, the more output is generated details about print levels can be found in OSOutput.h More...
 
std::string logFile
 this optional parameter contains the path to a logfile that can be used as an alternate output stream in addition to the normal output to stdout More...
 
int filePrintLevel
 this parameter controls the amount of output to send to the log file (if used) the higher the number, the more output is generated details about print levels can be found in OSOutput.h More...
 
std::string jobID
 the JobID More...
 
bool invokeHelp
 if this parameter is true we print the contents of the file help.txt and return More...
 
bool listOptions
 if this parameter is true we echo the values of the options found on the command line More...
 
bool writeVersion
 if this parameter is true we print the current version of the OS project More...
 
bool printModel
 if this parameter is true we print the current instance as read from an osil, nl or mps file More...
 
std::string printRowNumberAsString
 this parameter contains a string representation (!) of the row number if only a single row (constraint or objective) of the current instance is to be printed String representations are easier to parse in OSParseosss.l and are easier to recognize as being present or absent More...
 
bool quit
 if this parameter is true we quit/exit More...
 

Detailed Description

This class is used to store command line options for the OSSolverService executable and to provide methods to manipulate them.

Author
Horand Gassmann, Jun Ma, Kipp Martin
Remarks
the OSSolverService requires numerous options and these options are stored in the OSCommandLine class

Definition at line 36 of file OSCommandLine.h.

Constructor & Destructor Documentation

OSCommandLine::OSCommandLine ( )

constructor method

Definition at line 82 of file OSCommandLine.cpp.

OSCommandLine::~OSCommandLine ( )

destructor method

Definition at line 92 of file OSCommandLine.cpp.

Member Function Documentation

void OSCommandLine::reset_options ( )

a function to reset the command line to default values useful especially in the interactive shell

Definition at line 34 of file OSCommandLine.cpp.

std::string OSCommandLine::list_options ( )

a function to print the current command line option values

Definition at line 121 of file OSCommandLine.cpp.

void OSCommandLine::convertSolverNameToLowerCase ( )

to avoid ambiguity it might be necessary to convert the solver name to lower case ...

Definition at line 103 of file OSCommandLine.cpp.

void OSCommandLine::convertSolverNameToUpperCase ( )

...

or to upper case

Definition at line 112 of file OSCommandLine.cpp.

Member Data Documentation

OSInstance* OSCommandLine::osinstance

osinstance is a representation of the instance in OSInstance format

Definition at line 42 of file OSCommandLine.h.

OSOption* OSCommandLine::osoption

osoption is a representation of the solver options in OSOption format

Definition at line 47 of file OSCommandLine.h.

std::string OSCommandLine::serviceLocation

serviceLocation is the URL of the remote solver when a local solver is not used

Definition at line 52 of file OSCommandLine.h.

std::string OSCommandLine::serviceMethod

the service method the OSSolverService should execute, i.e.

solve, send, getJobID, kill, knock, or retrieve

Definition at line 57 of file OSCommandLine.h.

std::string OSCommandLine::solverName

the name of the solver to be invoked locally, e.g -solver Ipopt

Definition at line 62 of file OSCommandLine.h.

std::string OSCommandLine::configFile

configFile is the name of the file that holds the configuration options if the OSSolverService reads its options from a file rather than command line inputs

Definition at line 68 of file OSCommandLine.h.

std::string OSCommandLine::osilFile

osilFile is the name of the file that holds the model instance in OSiL format

Definition at line 73 of file OSCommandLine.h.

std::string OSCommandLine::osil

osil is the content of the osilFile

Definition at line 77 of file OSCommandLine.h.

std::string OSCommandLine::osilOutputFile

osilOutputFile is the name of the file to which the instance can be written in OSiL format.

This is especially useful for converting the instance from other representation formats such as AMPL nl format or MPS format. If this parameter is empty, the instance will not be saved.

Definition at line 84 of file OSCommandLine.h.

std::string OSCommandLine::osolFile

osolFile is the name of the file that holds the solver options in OSoL format

Definition at line 89 of file OSCommandLine.h.

std::string OSCommandLine::osol

osol is the content of the osolFile

Definition at line 93 of file OSCommandLine.h.

std::string OSCommandLine::osolOutputFile

osolOutputFile is the name of the file to which the solver options can be written in OSoL format.

This is especially useful when an instance represented in another representation format such as AMPL nl format or MPS format contains array-valued options such as initial values or basis information. If this parameter is empty, the solver options will not be saved.

Definition at line 101 of file OSCommandLine.h.

std::string OSCommandLine::osrlFile

osrlFile is the name of the file where the solver should write the result (in OSrL format)

Definition at line 106 of file OSCommandLine.h.

std::string OSCommandLine::insListFile

name of the file containing the instance in LINDO instruction list format

Definition at line 111 of file OSCommandLine.h.

std::string OSCommandLine::insList

insList is the content of the insListFile – this is not implemented

Definition at line 115 of file OSCommandLine.h.

std::string OSCommandLine::osplInputFile

name of an input file with xml in OS process language format, used for example to knock on a server, for example -osplInput ../data/osplFiles/demo.ospl

Definition at line 121 of file OSCommandLine.h.

std::string OSCommandLine::osplInput

osplInput is the content of the osplInputFile

Definition at line 125 of file OSCommandLine.h.

std::string OSCommandLine::osplOutputFile

name of an output file where the solver should write the result of a knock or kill service request

Definition at line 131 of file OSCommandLine.h.

std::string OSCommandLine::mpsFile

the name of the file that holds an instance in MPS format

Definition at line 134 of file OSCommandLine.h.

std::string OSCommandLine::mps

the string that holds an instance in MPS format

Definition at line 137 of file OSCommandLine.h.

std::string OSCommandLine::nlFile

the name of the file that holds an instance in AMPL nl format

Definition at line 140 of file OSCommandLine.h.

std::string OSCommandLine::nl

the string that holds an instance in AMPL nl format

Definition at line 143 of file OSCommandLine.h.

std::string OSCommandLine::datFile

the name of the file that holds an instance in GAMS dat format

Definition at line 146 of file OSCommandLine.h.

std::string OSCommandLine::dat

the string that holds an instance in GAMS dat format

Definition at line 149 of file OSCommandLine.h.

std::string OSCommandLine::gamsControlFile

the name of the file that holds the GAMS control parameters

Definition at line 152 of file OSCommandLine.h.

std::string OSCommandLine::browser

this parameter is a path to the browser on the local machine.

If this optional parameter is specified then the solver result in OSrL format is transformed using XSLT into HTML and displayed in the browser, e.g. -browser /Applications/Firefox.app/Contents/MacOS/firefox

Definition at line 160 of file OSCommandLine.h.

int OSCommandLine::printLevel

this parameter controls the amount of output to print the higher the number, the more output is generated details about print levels can be found in OSOutput.h

Definition at line 166 of file OSCommandLine.h.

std::string OSCommandLine::logFile

this optional parameter contains the path to a logfile that can be used as an alternate output stream in addition to the normal output to stdout

Definition at line 172 of file OSCommandLine.h.

int OSCommandLine::filePrintLevel

this parameter controls the amount of output to send to the log file (if used) the higher the number, the more output is generated details about print levels can be found in OSOutput.h

Definition at line 179 of file OSCommandLine.h.

std::string OSCommandLine::jobID

the JobID

Definition at line 182 of file OSCommandLine.h.

bool OSCommandLine::invokeHelp

if this parameter is true we print the contents of the file help.txt and return

Definition at line 187 of file OSCommandLine.h.

bool OSCommandLine::listOptions

if this parameter is true we echo the values of the options found on the command line

Definition at line 192 of file OSCommandLine.h.

bool OSCommandLine::writeVersion

if this parameter is true we print the current version of the OS project

Definition at line 197 of file OSCommandLine.h.

bool OSCommandLine::printModel

if this parameter is true we print the current instance as read from an osil, nl or mps file

Definition at line 202 of file OSCommandLine.h.

std::string OSCommandLine::printRowNumberAsString

this parameter contains a string representation (!) of the row number if only a single row (constraint or objective) of the current instance is to be printed String representations are easier to parse in OSParseosss.l and are easier to recognize as being present or absent

Definition at line 210 of file OSCommandLine.h.

bool OSCommandLine::quit

if this parameter is true we quit/exit

  • only used in the interactive shell

Definition at line 215 of file OSCommandLine.h.


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