View Javadoc

1   package cz.cuni.amis.pogamut.base.agent.navigation;
2   
3   import java.util.List;
4   
5   /**
6    * Simple interface that defines a method for estimating timeout for traveling along the path.
7    * <p><p>
8    * Implementors can be used to provide maximum time (timeout) that is needed to reach the end of the path.
9    * It is useful for {@link IPathExecutor} so it won't stuck whenever the execution fails unexpectedly.  
10   * 
11   * @author Jimmy
12   *
13   * @param <PATH_ELEMENT>
14   */
15  public interface IPathExecutionEstimator<PATH_ELEMENT> {
16  	
17  	/**
18  	 * Returns maximum amount of time (in ms) that is needed to follow the path and reach its end.
19  	 * <p><p>
20  	 * Usually used to determine timeout for path execution by {@link IPathExecutor}.
21  	 * 
22  	 * @param path
23  	 * @return time in ms
24  	 */
25  	public double getTimeout(List<PATH_ELEMENT> path);
26  
27  }