Typedefs | Functions | Variables
OSAmplClient2.cpp File Reference
#include "OSConfig.h"
#include "OSnl2OS.h"
#include "OSosrl2ampl.h"
#include "OSiLReader.h"
#include "OSiLWriter.h"
#include "OSoLReader.h"
#include "OSoLWriter.h"
#include "OSrLReader.h"
#include "OSrLWriter.h"
#include "OSInstance.h"
#include "OSOption.h"
#include "OSResult.h"
#include "OSOutput.h"
#include "OSDefaultSolver.h"
#include "OSCoinSolver.h"
#include "OSFileUtil.h"
#include "OSSolverAgent.h"
#include "OShL.h"
#include "OSErrorClass.h"
#include "CoinError.hpp"
#include "OSCommandLine.h"
#include "OSCommandLineReader.h"
#include "OSRunSolver.h"
#include <sstream>
#include "CoinHelperFunctions.hpp"
#include <iostream>
#include <asl.h>
Include dependency graph for OSAmplClient2.cpp:

Go to the source code of this file.

Typedefs

typedef struct yy_buffer_stateYY_BUFFER_STATE
 

Functions

YY_BUFFER_STATE osss_scan_string (const char *osss, void *scanner)
 
void setyyextra (OSCommandLine *oscommandline, void *scanner)
 
int ossslex (void *scanner)
 
int ossslex_init (void **ptr)
 
int ossslex_destroy (void *scanner)
 
std::string get_help ()
 
void list_options (OSCommandLine *oscommandline)
 
void solve (OSCommandLine *oscommandline, OSnl2OS *nl2OS)
 Next we have implementations of the six remote service methods solve, send, retrieve, knock, kill, getJobID (Do not bother with local solve; use runSolver instead) More...
 
void getJobID (OSCommandLine *oscommandline, OSnl2OS *osnl2os)
 
void send (OSCommandLine *oscommandline, OSnl2OS *osnl2os)
 
void kill (OSCommandLine *oscommandline, OSnl2OS *osnl2os)
 
void retrieve (OSCommandLine *oscommandline, OSnl2OS *osnl2os)
 
void knock (OSCommandLine *oscommandline, OSnl2OS *osnl2os)
 
bool findInstance (OSCommandLine *oscommandline, OSnl2OS *nl2os)
 This method tries to find the instance by reading the .nl file. More...
 
void makeStrings (OSCommandLine *oscommandline)
 
void doPrintRow (OSInstance *osinstance, std::string rownumberstring)
 
void reportResults (OSCommandLine *oscommandline, std::string osrl, OSnl2OS *nl2OS)
 Deal with the OSrL output generated by the call to one of the service methods. More...
 
void reportErrors (OSCommandLine *oscommandline, std::string errormsg, OSnl2OS *nl2OS)
 Deal with any error messages generated by the call to one of the service methods. More...
 
int main (int argc, char **argv)
 

Variables

const SmartPtr< OSOutputosoutput
 

Typedef Documentation

Definition at line 127 of file OSAmplClient2.cpp.

Function Documentation

YY_BUFFER_STATE osss_scan_string ( const char *  osss,
void scanner 
)
void setyyextra ( OSCommandLine oscommandline,
void scanner 
)

Definition at line 3383 of file OSParseosss.cpp.

int ossslex ( void scanner)
int ossslex_init ( void **  ptr)

Definition at line 3211 of file OSParseosss.cpp.

int ossslex_destroy ( void scanner)

Definition at line 3302 of file OSParseosss.cpp.

std::string get_help ( )
void list_options ( OSCommandLine oscommandline)

Definition at line 2537 of file OSSolverService.cpp.

void solve ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)

Next we have implementations of the six remote service methods solve, send, retrieve, knock, kill, getJobID (Do not bother with local solve; use runSolver instead)

void getJobID ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)
void send ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)
void kill ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)
void retrieve ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)
void knock ( OSCommandLine oscommandline,
OSnl2OS osnl2os 
)
bool findInstance ( OSCommandLine oscommandline,
OSnl2OS nl2os 
)

This method tries to find the instance by reading the .nl file.

This is the only acceptable format, since AMPL has just written the content of the model to a temporary file.

Parameters
oscommandline,:contains the information processed so far
Returns
whether an instance was found or not
void makeStrings ( OSCommandLine oscommandline)

With the options we need to be a little more careful: Options can be in osol and jobID strings (either can be missing) or in an osoption object (which would include both of the above) or missing entirely (in which case a dummy string needs to be created)

void doPrintRow ( OSInstance osinstance,
std::string  rownumberstring 
)
void reportResults ( OSCommandLine oscommandline,
std::string  osrl,
OSnl2OS osnl2OS 
)

Deal with the OSrL output generated by the call to one of the service methods.

void reportErrors ( OSCommandLine oscommandline,
std::string  errMsg,
OSnl2OS osnl2OS 
)

Deal with any error messages generated by the call to one of the service methods.

int main ( int  argc,
char **  argv 
)

Deal with action items: -printLevel, -logFile, -filePrintLevel, –help, –version

Definition at line 162 of file OSAmplClient2.cpp.

Variable Documentation

const SmartPtr< OSOutput> osoutput

Definition at line 39 of file OSOutput.cpp.