View Javadoc

1   package cz.cuni.amis.pogamut.base.agent.navigation;
2   
3   /**
4    * Interface for generic path planner. PathPlanner is responsible for finding 
5    * paths between two points in the map. 
6    * <p><p>
7    * There are several ways how to implement this interface, eg. Dijkstra, A*, 
8    * external A* from the environment, Floyd-Warshall, etc. ...
9    * <p><p>
10   * Bot programmers are able to supply their own implementation of PathPlanner,
11   * eg. for cars or flying vehicles, or path planners that aren't computing the 
12   * shortest path but paths with some other property (eg. paths without 
13   * jumps, movers etc.)
14   * <p><p>
15   * {@link IPathPlanner} should be independent of the bot.
16   * 
17   * @author Ik
18   * @author Jimmy
19   */
20  public interface IPathPlanner<PATH_ELEMENT> {
21  
22  	/**
23  	 * Returns a future where the path planner will set the result of its computation.
24  	 * <p><p>
25  	 * Note that the {@link IPathFuture} might already contain the path (i.e., the returned path was
26  	 * computed inside this method or it was a precomputed result). Always examine status of the future before
27  	 * attaching listeners to it.
28  	 * 
29  	 * @param from
30  	 * @param to
31  	 * @return
32  	 */
33  	public IPathFuture<PATH_ELEMENT> computePath(PATH_ELEMENT from, PATH_ELEMENT to);
34  	
35  }