org.optimizationservices.oscommon.communicationagent
Class OSAnalyzerAgent

java.lang.Object
  extended by org.optimizationservices.oscommon.communicationagent.OSAnalyzerAgent
All Implemented Interfaces:
OShL

public class OSAnalyzerAgent
extends java.lang.Object
implements OShL

The OSAnalyzerAgent class implements the OShL interface. Thus it is OS-type analyzer. It implements all the methods as specified in the Optimization Services (OS) Framework, specifically the Optimization Services hook-up Language (OShL).

The OSAnalyzerAgent class is a library class that contains methods to help analyzer agents communicate with Optimization Services (OS) analyzers as specified by the Optimization Services framework. It hides all the SOAP protocol related technical details from an optimization user.

Since:
OS 1.0
Version:
1.0, 03/14/2004
Author:
Robert Fourer, Jun Ma, Kipp Martin
See Also:
OShL

Field Summary
 java.lang.String analyzerAddress
          analyzerAddress holds the address (uri/url) of the Optimization Services (OS) analyzer.
 
Constructor Summary
OSAnalyzerAgent()
          Constructor.
OSAnalyzerAgent(java.lang.String analyzerAddress)
          Constructor.
 
Method Summary
 java.lang.String getJobID(java.lang.String osol)
          Methods in OShL that are not implemented.
 java.lang.String kill(java.lang.String osol)
          Methods in OShL that are not implemented.
 java.lang.String knock(java.lang.String ospl, java.lang.String osol)
          Methods in OShL that are not implemented.
static void main(java.lang.String[] args)
          main for test purposes.
 java.lang.String retrieve(java.lang.String osol)
          Methods in OShL that are not implemented.
 boolean send(java.lang.String osil, java.lang.String osol)
          Methods in OShL that are not implemented.
 java.lang.String solve(java.lang.String osil, java.lang.String osol)
          Analyze an optimization problem with options.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

analyzerAddress

public java.lang.String analyzerAddress
analyzerAddress holds the address (uri/url) of the Optimization Services (OS) analyzer.

Constructor Detail

OSAnalyzerAgent

public OSAnalyzerAgent()
Constructor.


OSAnalyzerAgent

public OSAnalyzerAgent(java.lang.String analyzerAddress)
Constructor.

Parameters:
analyzerAddress - holds the address (uri/url) of the Optimization Services (OS) analyzer.
Method Detail

solve

public java.lang.String solve(java.lang.String osil,
                              java.lang.String osol)
Analyze an optimization problem with options. The problem instance is given by a string following the Optimization Services instance Language (OSiL) schema. The options are given in a string following the Optimization Services option Language (OSoL) schema. The function returns the solution in a string that follows the Optimization Services result Language (OSrL) schema.

Specified by:
solve in interface OShL
Parameters:
osil - holds the optimization instance in a string which format follows the Optimization Services instance Language (OSiL) schema.
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema.
Returns:
the optimization result in a string which format follows the Optimization Services result Language (OSrL) schema.

send

public boolean send(java.lang.String osil,
                    java.lang.String osol)
Methods in OShL that are not implemented.

Specified by:
send in interface OShL
Parameters:
osil - holds the optimization instance in a string which format follows the Optimization Services instance Language (OSiL) schema.
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema. It should contain the jobID information that is previous obtained from the optimization service.
Returns:
success, whether the asynchronous communication is successful or not.

getJobID

public java.lang.String getJobID(java.lang.String osol)
Methods in OShL that are not implemented.

Specified by:
getJobID in interface OShL
Parameters:
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema.
Returns:
jobID, a unique job ID generated by the service.

retrieve

public java.lang.String retrieve(java.lang.String osol)
Methods in OShL that are not implemented.

Specified by:
retrieve in interface OShL
Parameters:
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema. It should contain the jobID information that is previous obtained from the optimization service.
Returns:
osrl, the optimization result in a string which format follows the Optimization Services result Language (OSrL) schema. If the result cannot be retrieved, it should be indicated in the message/status section of OSrL.

kill

public java.lang.String kill(java.lang.String osol)
Methods in OShL that are not implemented.

Specified by:
kill in interface OShL
Parameters:
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema. It should contain the jobID information that is previous obtained from the optimization service.
Returns:
ospl, the ouput kill process information in a string which format follows the OSpL schema.

knock

public java.lang.String knock(java.lang.String ospl,
                              java.lang.String osol)
Methods in OShL that are not implemented.

Specified by:
knock in interface OShL
Parameters:
ospl - holds the input process information a string which format follows the Optimization Services process Language (OSpL) schema.
osol - holds the optimization option in a string which format follows the Optimization Services option Language (OSoL) schema.
Returns:
osplOutput, the ouput process information in a string which format follows the OSpL schema.

main

public static void main(java.lang.String[] args)
main for test purposes.

Parameters:
argv - command line arguments.