View Javadoc
1   package org.opentrafficsim.road.network.route;
2   
3   import org.opentrafficsim.core.gtu.GTUType;
4   import org.opentrafficsim.core.network.NetworkException;
5   import org.opentrafficsim.core.network.route.RouteNavigator;
6   import org.opentrafficsim.road.network.lane.Lane;
7   
8   /**
9    * The LaneBasedRouteNavigator interface defines helper methods are available to see if the GTU needs to change lanes to reach
10   * the next link on the route.
11   * <p>
12   * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
13   * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
14   * <p>
15   * $LastChangedDate: 2015-07-16 10:20:53 +0200 (Thu, 16 Jul 2015) $, @version $Revision: 1124 $, by $Author: pknoppers $,
16   * initial version Jul 22, 2015 <br>
17   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
18   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
19   */
20  public interface LaneBasedRouteNavigator extends RouteNavigator
21  {
22      /**
23       * Determine the suitability of being at a particular longitudinal position in a particular Lane for following this Route.
24       * @param lane Lane; the lane to consider
25       * @param longitudinalPosition DoubleScalar.Rel&lt;LengthUnit&gt;; the longitudinal position in the lane
26       * @param gtuType GTUType; the type of the GTU (used to check lane compatibility of lanes)
27       * @param timeHorizon DoubleScalar.Rel&lt;TimeUnit&gt;; the maximum time that a driver may want to look ahead
28       * @return DoubleScalar.Rel&lt;LengthUnit&gt;; a value that indicates within what distance the GTU should try to vacate this
29       *         lane.
30       * @throws NetworkException on network inconsistency, or when the continuation Link at a branch cannot be determined
31       */
32      Length.Rel suitability(final Lane lane, final Length.Rel longitudinalPosition, final GTUType gtuType,
33          final Time.Rel timeHorizon) throws NetworkException;
34  }