cad.simcad.pathfinding.astar
Class AStarSequential

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--cad.simcad.pathfinding.astar.AStarAlgo
              |
              +--cad.simcad.pathfinding.astar.AStarSequential
All Implemented Interfaces:
APSSPathFinder, PathFinder, java.lang.Runnable

public class AStarSequential
extends AStarAlgo
implements APSSPathFinder

Author:
Administrator

Field Summary
protected  double _heurFactor
           
 
Fields inherited from class cad.simcad.pathfinding.astar.AStarAlgo
_algoType, _assoId, _closed, _cp, _finish, _loop, _mapTable, _myMap, _open, _pu, _rebuildingFudgeFactor, _start, _state, FOUND, NO_PATH, NOT_FOUND
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AStarSequential(PathFindable map)
          Creates a new instance of AStarSequential
 
Method Summary
 PathPlaceSet getClosestPathPlace(java.util.Map placesToUsers, PathPlace dest)
          Returns the closest
 void run()
           
protected  void step()
           
 
Methods inherited from class cad.simcad.pathfinding.astar.AStarAlgo
buildReferences, buildReferencesFudged, firePathComputation, firePathPlaceChange, getFudgedLowestAdjacent, getLowestAdjacent, getShortestPath, getShortestPath, isApplicable, isSequential
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cad.simcad.objectserver.spec.pathfinding.PathFinder
getShortestPath, getShortestPath, isSequential
 

Field Detail

_heurFactor

protected double _heurFactor
Constructor Detail

AStarSequential

public AStarSequential(PathFindable map)
Creates a new instance of AStarSequential

Method Detail

run

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

step

protected void step()

getClosestPathPlace

public PathPlaceSet getClosestPathPlace(java.util.Map placesToUsers,
                                        PathPlace dest)
Returns the closest

Specified by:
getClosestPathPlace in interface APSSPathFinder
Parameters:
placesToUsers - Map object that map PathPlace to PathUser
dest - The destination
Pre:
a set of PathPlaces (keys) mapped to one PathUser (value). The mapped PathUser is actually on their mapped PathPlace
Returns:
a PathPlaceSet. Consisting of the best PathPlace with its PathUser
Post:
Be pathPlaceEnum an enumeration of map keys, this method returns P that belongs to pathPlaceEnum so that for all P' that belongs to pathPlaceEnum we have |Dest-P'| > |Dest-P|. All this knowing the PathUser walking the Path.

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be