Interface LaneBasedStrategicalPlannerFactory<T extends LaneBasedStrategicalPlanner>
-
- Type Parameters:
T
- class of the strategical planner generated
- All Known Implementing Classes:
AbstractLaneBasedStrategicalPlannerFactory
,LaneBasedStrategicalRoutePlannerFactory
public interface LaneBasedStrategicalPlannerFactory<T extends LaneBasedStrategicalPlanner>
A factory class is used to generate strategical planners as the strategical planner is state-full.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Jul 29, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
create(LaneBasedGTU gtu, Route route, Node origin, Node destination)
Creates a new strategical planner for the given GTU.default Length
peekDesiredHeadway(GTUType gtuType, Speed speed)
Peek to see the desired headway of the next GTU to be generated at the given speed.default Speed
peekDesiredSpeed(GTUType gtuType, Speed speedLimit, Speed maxGtuSpeed)
Peek to see the desired speed of the next GTU to be generated at the given location.
-
-
-
Method Detail
-
create
T create(LaneBasedGTU gtu, Route route, Node origin, Node destination) throws GTUException
Creates a new strategical planner for the given GTU. This method should also set the parameters at the GTU.- Parameters:
gtu
- LaneBasedGTU; GTUroute
- Route; route, may be nullorigin
- Node; origin, may be nulldestination
- Node; destination, may be null- Returns:
- strategical planner for the given GTU
- Throws:
GTUException
- if the gtu is not suitable in any way for the creation of the strategical planner
-
peekDesiredSpeed
default Speed peekDesiredSpeed(GTUType gtuType, Speed speedLimit, Speed maxGtuSpeed) throws GTUException
Peek to see the desired speed of the next GTU to be generated at the given location. The default implementation returnsnull
, at which point the GTU generator will use some other speed.- Parameters:
gtuType
- GTUType; GTU typespeedLimit
- Speed; speed limitmaxGtuSpeed
- Speed; maximum GTU speed- Returns:
- desired speed of the next GTU to be generated at the given location, may be
null
at which point the GTU generator will use some other speed - Throws:
GTUException
- on parameter exception or network exception
-
peekDesiredHeadway
default Length peekDesiredHeadway(GTUType gtuType, Speed speed) throws GTUException
Peek to see the desired headway of the next GTU to be generated at the given speed. The default implementation returnsnull
, at which point the GTU generator will only generate GTU's at fixed locations.- Parameters:
gtuType
- GTUType; GTU typespeed
- Speed; speed the GTU might be generated at- Returns:
- Length; desired headway of the next GTU to be generated at the given speed, may be
null
at which point the GTU generator only generate GTU's at fixed locations - Throws:
GTUException
- on parameter exception or network exception
-
-