This class implements wrappers for the different service methods. By exposing the API these methods can be used by the OSAmplClient and OSSolverService executable as well as other third-party programs . More...
#include <OSServiceMethods.h>
Public Member Functions | |
OSServiceMethods () | |
default constructor | |
~OSServiceMethods () | |
default destructor | |
OSServiceMethods (OSCommandLine *oscommandline) | |
nonstandard constructor This version can be used to process the information contained in the command line (reading of files, preparation of instance, etc. | |
bool | executeServiceMethod (OSCommandLine *oscommandline) |
executeServiceMethod is a wrapper around the six service methods implemented in OS: solve, send, retrieve, knock, kill, getJobID | |
std::string | get_help () |
print help | |
Public Attributes | |
std::string | resultString |
the string containing the output generated by the service method called via executeServiceMethod() |
This class implements wrappers for the different service methods. By exposing the API these methods can be used by the OSAmplClient and OSSolverService executable as well as other third-party programs .
Definition at line 32 of file OSServiceMethods.h.
OSServiceMethods::OSServiceMethods | ( | ) |
default constructor
Definition at line 86 of file OSServiceMethods.cpp.
OSServiceMethods::~OSServiceMethods | ( | ) |
default destructor
Definition at line 94 of file OSServiceMethods.cpp.
OSServiceMethods::OSServiceMethods | ( | OSCommandLine * | oscommandline | ) |
nonstandard constructor This version can be used to process the information contained in the command line (reading of files, preparation of instance, etc.
)
oscommandline | holds the command line information and location of the instance, options, etc. |
Prepare the OSInstance and OSOption objects if needed. The objects are needed if 1. any output is based on the instance ((i.e, printModel, printRow or osilOutputFile is specified) OR 2. a solve/send command is based on input other than OSiL format
Search for an instance in the following order 1. osil file 2. non-proprietary formats (only MPS for now) 3. proprietary formats (AMPL nl, GAMS dat, etc.)
Definition at line 102 of file OSServiceMethods.cpp.
bool OSServiceMethods::executeServiceMethod | ( | OSCommandLine * | oscommandline | ) |
executeServiceMethod is a wrapper around the six service methods implemented in OS: solve, send, retrieve, knock, kill, getJobID
oscommandline | holds the command line information and location of the instance, options, etc. |
The required file conversions are all assumed to have been taken care of in the nonstandard constructor, so this wrapper merely directs traffic
the only local service method is solve()
Here we have a remote call --- reuse as much code as possible
Definition at line 289 of file OSServiceMethods.cpp.
std::string OSServiceMethods::get_help | ( | ) |
print help
std::string OSServiceMethods::resultString |
the string containing the output generated by the service method called via executeServiceMethod()
Definition at line 39 of file OSServiceMethods.h.