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-2018 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,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactory parametersFactory)
Constructor with factory for tactical planners.
|
Modifier and Type | Method and Description |
---|---|
protected abstract org.opentrafficsim.base.parameters.Parameters |
getParameters()
Returns parameters specific to the strategical planner.
|
protected LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> |
getTacticalPlannerFactory()
Returns the tactical planner factory.
|
protected org.opentrafficsim.base.parameters.Parameters |
nextParameters(org.opentrafficsim.core.gtu.GTUType gtuType)
Returns the parameters for the next GTU.
|
protected LaneBasedTacticalPlanner |
nextTacticalPlanner(LaneBasedGTU gtu)
Returns the next tactical planner.
|
org.djunits.value.vdouble.scalar.Length |
peekDesiredHeadway(org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Speed speed)
Peek to see the desired headway of the next GTU to be generated at the given speed.
|
org.djunits.value.vdouble.scalar.Speed |
peekDesiredSpeed(org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.djunits.value.vdouble.scalar.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
- factory for tactical plannerspublic AbstractLaneBasedStrategicalPlannerFactory(LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> tacticalPlannerFactory, org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterFactory parametersFactory)
tacticalPlannerFactory
- factory for tactical plannersparametersFactory
- factory for parameterspublic final org.djunits.value.vdouble.scalar.Speed peekDesiredSpeed(org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Speed maxGtuSpeed) throws org.opentrafficsim.core.gtu.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 speedorg.opentrafficsim.core.gtu.GTUException
- on parameter exception or network exceptionpublic final org.djunits.value.vdouble.scalar.Length peekDesiredHeadway(org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Speed speed) throws org.opentrafficsim.core.gtu.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 locationsorg.opentrafficsim.core.gtu.GTUException
- on parameter exception or network exceptionprotected abstract org.opentrafficsim.base.parameters.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 org.opentrafficsim.base.parameters.Parameters nextParameters(org.opentrafficsim.core.gtu.GTUType gtuType) throws org.opentrafficsim.core.gtu.GTUException
gtuType
- GTUType; GTU type of GTU to be generatedorg.opentrafficsim.core.gtu.GTUException
- on parameter exceptionprotected final LaneBasedTacticalPlanner nextTacticalPlanner(LaneBasedGTU gtu) throws org.opentrafficsim.core.gtu.GTUException
gtu
- LaneBasedGTU; GTU to be generatedorg.opentrafficsim.core.gtu.GTUException
- on exception during tactical planner creationprotected final LaneBasedTacticalPlannerFactory<? extends LaneBasedTacticalPlanner> getTacticalPlannerFactory()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.