next up previous contents
Next: The send Service Method Up: Solving Problems Remotely with Previous: Solving Problems Remotely with   Contents


The solve Service Method

First we illustrate a simple call to the OSSolverService.jws. The call on the client machine is

./OSSolverService -config ../data/configFiles/testremote.config
where the testremote.config file is
-osil ../data/osilFiles/parincLinear.osil
-serviceLocation http://gsbkip.chicagogsb.edu/os/OSSolverService.jws

No solver is specified and by default the Cbc solver is used by the OSSolverService. If, for example, the user wished to solve the problem with the Clp solver then this is accomplished either by using the -solver option on the command line

./OSSolverService -config ../data/configFiles/testremote.config -solver clp
or by adding the line
 -solver clp
to the testremote.config file.

Next we illustrate a call to the remote SolverService and specify an OSiL instance that is actually residing on the remote machine that is hosting the OSSolverService and not on the client machine.

./OSSolverService -osol ../data/osolFiles/remoteSolve1.osol
     -serviceLocation  http://gsbkip.chicagogsb.edu/os/OSSolverService.jws
where the remoteSolve1.osol file is
\begin{verbatimtab}[4]
<?xml version=''1.0'' encoding=''UTF-8''?>
<osol xmlns=''...
...ther name=''os_solver''>ipopt</other>
</optimization>
</osol>
\end{verbatimtab}

If we were to change to the locationType attribute in the <instanceLocation> element to http then we could specify the instance location to on yet another machine. This is illustrated below for remoteSolve2.osol. The scenario is depicted in Figure 18. The OSiL string passed from the client to the solver service is empty. However, the OSoL element <instanceLocation> has an attribute locationType equal to http. In this case, the text of the <instanceLoction> element contains the URL of a third machine which has the problem intance parincLinear.osil. The solver service will contact the machine with URL http://www.coin-or.org/OS/parincLinear.osil and download this test problem. So the OSSolverService is running on the server gsbkip.chicagogsb.edu which contacts the server www.coin-or.org for the model instance.
\begin{verbatimtab}[4]
<?xml version=''1.0'' encoding=''UTF-8''?>
<osol xmlns=''...
...ther name=''os_solver''>ipopt</other>
</optimization>
</osol>
\end{verbatimtab}

Figure 18: Downloading the instance from a remote source.
Image OSSolverService2


next up previous contents
Next: The send Service Method Up: Solving Problems Remotely with Previous: Solving Problems Remotely with   Contents
Kipp Martin 2008-01-16