gui
Class TSPModelRemote

java.lang.Object
  extended by gui.TSPModelRemote
All Implemented Interfaces:
RemoteExecutable, java.io.Serializable, java.lang.Runnable

 class TSPModelRemote
extends java.lang.Object
implements RemoteExecutable

Objects send to the compute server to execute TSP algorithm.


Field Summary
private  int algo
           
private  int guiClientPort
           
private  java.lang.String guiHost
           
private  int guiPort
           
private  boolean isBestPath
           
private  long iter
           
private  long maxIter
           
private  Path path
           
private  Point[] points
           
private  int threads
           
private  TSPInf tsp
           
 
Constructor Summary
TSPModelRemote(Point[] points, int algo, int threads, long mit, java.lang.String guiHost, int guiPort, int guiClientPort)
           
 
Method Summary
 Path getActualBestPath()
           
 Path getBestPath()
           
 long getIterations()
           
 long getMaxIterations()
           
 boolean isBestPath()
           
 boolean isRunning()
           
 void run()
           
 long setMaxIterations(long m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

points

private Point[] points

path

private Path path

threads

private int threads

algo

private int algo

tsp

private TSPInf tsp

iter

private long iter

maxIter

private long maxIter

isBestPath

private boolean isBestPath

guiHost

private java.lang.String guiHost

guiPort

private int guiPort

guiClientPort

private int guiClientPort
Constructor Detail

TSPModelRemote

public TSPModelRemote(Point[] points,
                      int algo,
                      int threads,
                      long mit,
                      java.lang.String guiHost,
                      int guiPort,
                      int guiClientPort)
Parameters:
points - array of cities.
algo - algorithm.
threads - number of threads.
mit - maximal iterations.
guiHost - host name of gui server. Unused because of firewalls.
guiPort - port of gui server. Unused because of firewalls.
guiClientPort - port at compute server.
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

isRunning

public boolean isRunning()
Returns:
true if tsp is executing.

getBestPath

public Path getBestPath()
Returns:
best known path.

isBestPath

public boolean isBestPath()
Returns:
true if path is best path.

getActualBestPath

public Path getActualBestPath()
Returns:
actual best path.

getIterations

public long getIterations()
Returns:
iteration count.

getMaxIterations

public long getMaxIterations()
Returns:
maximal iteration count.

setMaxIterations

public long setMaxIterations(long m)
Parameters:
m - new maximal iteration count.
Returns:
old maximal iteration count.