OSSolverAgent Class Reference

Used by a client to invoke a remote solver. More...

#include <OSSolverAgent.h>

Inheritance diagram for OSSolverAgent:

OShL

List of all members.

Public Member Functions

 OSSolverAgent (string solverURI)
 Default constructor.
 ~OSSolverAgent ()
 Class destructor.
string solve (string osil, string osol)
 implement the solve() method which is a virtual function in OShL, this is synchronous
string getJobID (string osol)
 implement the getJobID() method which is a virtual function in OShL
bool send (string osil, string osol)
 implement the send() method which is a virtual function in OShL
string kill (string osol)
 implement the kill() method which is a virtual function in OShL
string retrieve (string osol)
 implement the retrieve() method which is a virtual function in OShL
string knock (string ospl, string osol)
 implement the knock() method which is a virtual function in OShL
string fileUpload (string osilFileName, string osil)
 implement the fileUpload() method which is a virtual function in OShL

Private Attributes

string solverAddress
 solverAddress is the URI for the solver
unsigned short solverPortNumber
 solverPortNumber is the port number for the sovler
string postURI
 postURI is the path to the solver that follows the first / in the solverAddress


Detailed Description

Used by a client to invoke a remote solver.

Remarks:
This is an implementation of the virtual class OShL. We need to implement the following virtual methods.

The following key methods are invoked:

  1. solve
  2. kill
  3. send
  4. retrieve
  5. knock
  6. getJobID

Definition at line 42 of file OSSolverAgent.h.


Constructor & Destructor Documentation

OSSolverAgent::OSSolverAgent ( string  solverURI  ) 

Default constructor.

Parameters:
solverURI is the location of remote solver or scheduler

Definition at line 28 of file OSSolverAgent.cpp.

References postURI, solverAddress, and solverPortNumber.

OSSolverAgent::~OSSolverAgent (  ) 

Class destructor.

Definition at line 50 of file OSSolverAgent.cpp.


Member Function Documentation

string OSSolverAgent::solve ( string  osil,
string  osol 
)

implement the solve() method which is a virtual function in OShL, this is synchronous

Parameters:
osil a string that holds the problem instance
osol is a string of options for the solver
Returns:
osrl which is a string with the result.

Definition at line 53 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by main(), solve(), and OSMatlab::solve().

string OSSolverAgent::getJobID ( string  osol  ) 

implement the getJobID() method which is a virtual function in OShL

Parameters:
osol is the string with the options in OSoL format
Returns:
a string which is the jobID

Definition at line 126 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by getJobID(), and send().

bool OSSolverAgent::send ( string  osil,
string  osol 
)

implement the send() method which is a virtual function in OShL

Parameters:
osil is the string with the instance in OSiL format
osol is the string with the options in OSoL format
Returns:
a bool which is true if the job is successfuly submitted

Definition at line 100 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by send().

string OSSolverAgent::kill ( string  osol  ) 

implement the kill() method which is a virtual function in OShL

Parameters:
osol is the string with the options in OSoL format
Returns:
a string which is in OSpL format

Definition at line 176 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by kill().

string OSSolverAgent::retrieve ( string  osol  ) 

implement the retrieve() method which is a virtual function in OShL

Parameters:
osol is the string with the options in OSoL format
Returns:
a string which is in the result of the optimization is OSrL fomrat

Definition at line 151 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by retrieve().

string OSSolverAgent::knock ( string  ospl,
string  osol 
)

implement the knock() method which is a virtual function in OShL

Parameters:
ospl is the string with the process information in OSpL format
osol is the string with the options in OSoL format
Returns:
a string which is the knock result in OSpL format.

Definition at line 201 of file OSSolverAgent.cpp.

References WSUtil::createSOAPMessage(), WSUtil::deSOAPify(), WSUtil::getOSxL(), postURI, WSUtil::sendSOAPMessage(), WSUtil::SOAPify(), solverAddress, and solverPortNumber.

Referenced by knock().

string OSSolverAgent::fileUpload ( string  osilFileName,
string  osil 
)

implement the fileUpload() method which is a virtual function in OShL

Parameters:
osilFileName is the name of the file with the OSiL instance to be written on the server
osil is a string with the OSiL problem instance

Definition at line 86 of file OSSolverAgent.cpp.

References WSUtil::createFormDataUpload(), postURI, WSUtil::sendSOAPMessage(), solverAddress, and solverPortNumber.

Referenced by main().


Member Data Documentation

string OSSolverAgent::solverAddress [private]

solverAddress is the URI for the solver

Definition at line 133 of file OSSolverAgent.h.

Referenced by fileUpload(), getJobID(), kill(), knock(), OSSolverAgent(), retrieve(), send(), and solve().

unsigned short OSSolverAgent::solverPortNumber [private]

solverPortNumber is the port number for the sovler

Definition at line 136 of file OSSolverAgent.h.

Referenced by fileUpload(), getJobID(), kill(), knock(), OSSolverAgent(), retrieve(), send(), and solve().

string OSSolverAgent::postURI [private]

postURI is the path to the solver that follows the first / in the solverAddress

Definition at line 141 of file OSSolverAgent.h.

Referenced by fileUpload(), getJobID(), kill(), knock(), OSSolverAgent(), retrieve(), send(), and solve().


The documentation for this class was generated from the following files:
Generated on Sat Mar 29 22:38:06 2008 by  doxygen 1.5.3