algo
Class DistParClientTSP
java.lang.Object
algo.DistParClientTSP
- All Implemented Interfaces:
- RemoteExecutable, java.io.Serializable, java.lang.Runnable
class DistParClientTSP
- extends java.lang.Object
- implements RemoteExecutable
Objects of this class are to be send to a ExecutableServer.
i.e. these are the remote processes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
protected java.lang.String host
port
protected int port
graph
protected Graph graph
points
protected Point[] points
best
protected DistParBestStore best
number
protected int number
stack
protected java.util.ArrayList stack
count
protected int count
depth
protected int depth
iter
protected long iter
maxIter
protected long maxIter
globalWork
protected long globalWork
pushes
protected int pushes
runs
protected int runs
communi
protected DistParRemoteCommTSP communi
logger
private static Logger logger
DistParClientTSP
public DistParClientTSP(java.lang.String host,
int port,
Point[] points)
- Parameters:
host
- of master process.port
- of master process.points
- the cities.
actualBest
public Path actualBest()
- Returns:
- best.getPath().
setBest
public void setBest(Path b)
- Parameters:
b
- new best path.
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
getParBest
public void getParBest()
throws java.lang.InterruptedException
- Throws:
InterruptedException.
java.lang.InterruptedException
addEndMark
public void addEndMark()
putWork
public void putWork(Path path)
- Parameters:
path
- a Path.
getWork
public Path getWork()
- Returns:
- a Path.
isWorkAvailable
public boolean isWorkAvailable(int len)
- Parameters:
len
- length of current path.
- Returns:
- true if work is available, else false.
getBest
public void getBest(Path path)
- Parameters:
path
- some starting path.
getBestRec
public void getBestRec(Path path,
int depth)
- Parameters:
path
- some starting path.depth
- current path length.
getIterations
public long getIterations()
- Returns:
- iter.
getMaxIterations
public long getMaxIterations()
- Returns:
- maxIter.
setMaxIterations
public long setMaxIterations(long m)
- Parameters:
m
- new maximal number of iterations.
- Returns:
- old maxIter.
setGlobalWork
public void setGlobalWork(long w)
- Parameters:
w
- number of global work items.