gui
Class TSPModelRemote
java.lang.Object
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.
Constructor Summary |
TSPModelRemote(Point[] points,
int algo,
int threads,
long mit,
java.lang.String guiHost,
int guiPort,
int guiClientPort)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.
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.