edu.harvard.econcs.jopt.solver.client
Class SolverClient

java.lang.Object
  extended by edu.harvard.econcs.jopt.solver.client.SolverClient
All Implemented Interfaces:
IMIPSolver

public class SolverClient
extends java.lang.Object
implements IMIPSolver

Local class that can be used to solve a MIP. Finds a remote Solver to actually do the calculation.

Since:
Apr 12, 2004
Version:
$Revision: 1.7 $ on $Date: 2005/02/28 10:10:29 $

Constructor Summary
SolverClient()
          Creates a default local solver
SolverClient(IMIPSolver solver)
          create a client using the given solver explicitly.
SolverClient(java.lang.String host, int port)
          Creates a client using the server at the given host and port.
SolverClient(TypedProperties props)
           
 
Method Summary
 java.lang.String getHost()
           
 java.lang.String getName()
           
 int getPort()
           
 IMIPResult solve(byte[] serializedMip)
          Solve the given serialized mip
 IMIPResult solve(IMIP mip)
          Solve the given mip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolverClient

public SolverClient(TypedProperties props)

SolverClient

public SolverClient()
Creates a default local solver


SolverClient

public SolverClient(java.lang.String host,
                    int port)
Creates a client using the server at the given host and port. This server can be either a a server or a load balancer.


SolverClient

public SolverClient(IMIPSolver solver)
create a client using the given solver explicitly.

Method Detail

getName

public java.lang.String getName()

getHost

public java.lang.String getHost()

getPort

public int getPort()

solve

public IMIPResult solve(IMIP mip)
                 throws MIPException
Solve the given mip

Specified by:
solve in interface IMIPSolver
Throws:
MIPException

solve

public IMIPResult solve(byte[] serializedMip)
Solve the given serialized mip