T
- class of the strategical planner generatedpublic abstract class AbstractLaneBasedStrategicalPlannerFactory<T extends LaneBasedStrategicalPlanner> extends Object implements LaneBasedStrategicalPlannerFactory<T>
LaneBasedStrategicalRoutePlanner
using any LaneBasedTacticalPlannerFactory
. This
abstract class deals with forwarding peeking from the GTU generator to the tactical planner factory. Parameters are set using
a ParameterFactory
, after the method setParameters()
has been called, which subclasses need to implement.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory)
Constructor with factory for tactical planners.
|
AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory,
ParameterFactory parametersFactory)
Constructor with factory for tactical planners.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Parameters |
getParameters()
Returns parameters specific to the strategical planner.
|
protected LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> |
getTacticalPlannerFactory()
Returns the tactical planner factory.
|
protected Parameters |
nextParameters(GTUType gtuType)
Returns the parameters for the next GTU.
|
protected LaneBasedTacticalPlanner |
nextTacticalPlanner(LaneBasedGTU gtu)
Returns the next tactical planner.
|
Length |
peekDesiredHeadway(GTUType gtuType,
Speed speed)
Peek to see the desired headway of the next GTU to be generated at the given speed.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory)
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for
tactical plannerspublic AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, ParameterFactory parametersFactory)
tacticalPlannerFactory
- LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner>; factory for
tactical plannersparametersFactory
- ParameterFactory; factory for parameterspublic final Speed peekDesiredSpeed(GTUType gtuType, Speed speedLimit, Speed maxGtuSpeed) throws GTUException
null
, at which point the GTU generator will use some other speed.peekDesiredSpeed
in interface LaneBasedStrategicalPlannerFactory<T extends LaneBasedStrategicalPlanner>
gtuType
- GTUType; GTU typespeedLimit
- Speed; speed limitmaxGtuSpeed
- Speed; maximum GTU speednull
at which point the GTU
generator will use some other speedGTUException
- on parameter exception or network exceptionpublic final Length peekDesiredHeadway(GTUType gtuType, Speed speed) throws GTUException
null
, at which point the GTU generator will only generate GTU's at fixed locations.peekDesiredHeadway
in interface LaneBasedStrategicalPlannerFactory<T extends LaneBasedStrategicalPlanner>
gtuType
- GTUType; GTU typespeed
- Speed; speed the GTU might be generated atnull
at which point
the GTU generator only generate GTU's at fixed locationsGTUException
- on parameter exception or network exceptionprotected abstract Parameters getParameters()
ParameterFactory
sets or overwrites additional parameters. Hence, this method may set
default (distributed) values for parameters specific to the strategical planner.null
protected final Parameters nextParameters(GTUType gtuType) throws GTUException
gtuType
- GTUType; GTU type of GTU to be generatedGTUException
- on parameter exceptionprotected final LaneBasedTacticalPlanner nextTacticalPlanner(LaneBasedGTU gtu) throws GTUException
gtu
- LaneBasedGTU; GTU to be generatedGTUException
- on exception during tactical planner creationprotected final LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> getTacticalPlannerFactory()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.