Class LaneBasedStrategicalRoutePlannerFactory
- java.lang.Object
-
- org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner>
-
- org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlannerFactory
-
- All Implemented Interfaces:
Serializable
,LaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner>
public class LaneBasedStrategicalRoutePlannerFactory extends AbstractLaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner> implements Serializable
Factory for creatingLaneBasedStrategicalRoutePlanner
using anyLaneBasedTacticalPlannerFactory
.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 Aug 2, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory)
Constructor with factory for tactical planners.LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, ParameterFactory parametersFactory)
Constructor with factory for tactical planners.LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, ParameterFactory parametersFactory, RouteGeneratorOD routeGenerator)
Constructor with factory for tactical planners.LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, RouteGeneratorOD routeGenerator)
Constructor with factory for tactical planners.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LaneBasedStrategicalPlanner
create(LaneBasedGTU gtu, Route route, Node origin, Node destination)
Creates a new strategical planner for the given GTU.protected Parameters
getParameters()
Returns parameters specific to the strategical planner.String
toString()
-
Methods inherited from class org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlannerFactory
getTacticalPlannerFactory, nextParameters, nextTacticalPlanner, peekDesiredHeadway, peekDesiredSpeed
-
-
-
-
Constructor Detail
-
LaneBasedStrategicalRoutePlannerFactory
public LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory)
Constructor with factory for tactical planners.- Parameters:
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for tactical planners
-
LaneBasedStrategicalRoutePlannerFactory
public LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, RouteGeneratorOD routeGenerator)
Constructor with factory for tactical planners.- Parameters:
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for tactical plannersrouteGenerator
- RouteGeneratorOD; route generator
-
LaneBasedStrategicalRoutePlannerFactory
public LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, ParameterFactory parametersFactory)
Constructor with factory for tactical planners.- Parameters:
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for tactical plannersparametersFactory
- ParameterFactory; factory for parameters
-
LaneBasedStrategicalRoutePlannerFactory
public LaneBasedStrategicalRoutePlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, ParameterFactory parametersFactory, RouteGeneratorOD routeGenerator)
Constructor with factory for tactical planners.- Parameters:
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for tactical plannersparametersFactory
- ParameterFactory; factory for parametersrouteGenerator
- RouteGeneratorOD; route supplier
-
-
Method Detail
-
create
public final LaneBasedStrategicalPlanner 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.- Specified by:
create
in interfaceLaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner>
- 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
-
getParameters
protected Parameters getParameters()
Returns parameters specific to the strategical planner. The input already contains parameters from the tactical planner. After this method, theParameterFactory
sets or overwrites additional parameters. Hence, this method may set default (distributed) values for parameters specific to the strategical planner.- Specified by:
getParameters
in classAbstractLaneBasedStrategicalPlannerFactory<LaneBasedStrategicalPlanner>
- Returns:
- parameters Parameters; parameters for the strategical planner, may be
null
-
-