My Project
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>

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)
 
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.
 
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.
 
void reportErrors (OSCommandLine *oscommandline, std::string errormsg, OSnl2OS *nl2OS)
 Deal with any error messages generated by the call to one of the service methods.
 
int main (int argc, char **argv)
 

Variables

const SmartPtr< OSOutputosoutput
 

Typedef Documentation

◆ YY_BUFFER_STATE

Definition at line 127 of file OSAmplClient2.cpp.

Function Documentation

◆ osss_scan_string()

YY_BUFFER_STATE osss_scan_string ( const char * osss,
void * scanner )

◆ setyyextra()

void setyyextra ( OSCommandLine * oscommandline,
void * scanner )

Definition at line 3383 of file OSParseosss.cpp.

◆ ossslex()

int ossslex ( void * scanner)

◆ ossslex_init()

int ossslex_init ( void ** ptr)

Definition at line 3211 of file OSParseosss.cpp.

◆ ossslex_destroy()

int ossslex_destroy ( void * scanner)

Definition at line 3302 of file OSParseosss.cpp.

◆ get_help()

std::string get_help ( )

Definition at line 1031 of file OSAmplClient2.cpp.

◆ list_options()

void list_options ( OSCommandLine * oscommandline)

Definition at line 2537 of file OSSolverService.cpp.

◆ solve()

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)

Definition at line 598 of file OSAmplClient2.cpp.

◆ getJobID()

void getJobID ( OSCommandLine * oscommandline,
OSnl2OS * osnl2os )

Definition at line 699 of file OSAmplClient2.cpp.

◆ send()

void send ( OSCommandLine * oscommandline,
OSnl2OS * osnl2os )

Definition at line 637 of file OSAmplClient2.cpp.

◆ kill()

void kill ( OSCommandLine * oscommandline,
OSnl2OS * osnl2os )

Definition at line 848 of file OSAmplClient2.cpp.

◆ retrieve()

void retrieve ( OSCommandLine * oscommandline,
OSnl2OS * osnl2os )

Definition at line 787 of file OSAmplClient2.cpp.

◆ knock()

void knock ( OSCommandLine * oscommandline,
OSnl2OS * osnl2os )

Definition at line 730 of file OSAmplClient2.cpp.

◆ findInstance()

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
oscommandlinecontains the information processed so far
Returns
whether an instance was found or not

Definition at line 519 of file OSAmplClient2.cpp.

◆ makeStrings()

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)

Definition at line 543 of file OSAmplClient2.cpp.

◆ doPrintRow()

void doPrintRow ( OSInstance * osinstance,
std::string rownumberstring )

Definition at line 997 of file OSAmplClient2.cpp.

◆ reportResults()

void reportResults ( OSCommandLine * oscommandline,
std::string osrl,
OSnl2OS * osnl2OS )

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

Definition at line 913 of file OSAmplClient2.cpp.

◆ reportErrors()

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

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

Definition at line 973 of file OSAmplClient2.cpp.

◆ main()

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

◆ osoutput

const SmartPtr< OSOutput> osoutput
extern

Definition at line 39 of file OSOutput.cpp.