public class LMRSFactory extends AbstractLaneBasedTacticalPlannerFactory<LMRS> implements Serializable
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 |
---|
LMRSFactory(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory,
PerceptionFactory perceptionFactory)
Constructor using default incentives and passive synchronization.
|
LMRSFactory(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory,
PerceptionFactory perceptionFactory,
Synchronization synchronization,
Cooperation cooperation,
GapAcceptance gapAcceptance,
Tailgating tailGating,
Set<MandatoryIncentive> mandatoryIncentives,
Set<VoluntaryIncentive> voluntaryIncentives,
Set<AccelerationIncentive> accelerationIncentives)
Constructor with full control over incentives and type of synchronization.
|
Modifier and Type | Method and Description |
---|---|
LMRS |
create(LaneBasedGTU gtu)
Creates a new tactical planner for the given GTU.
|
Parameters |
getParameters()
Returns parameters for the given component.
|
String |
toString() |
getCarFollowingModelFactoryString, getCarFollowingParameters, getPerceptionFactory, nextCarFollowingModel, peekDesiredHeadway, peekDesiredSpeed
public LMRSFactory(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory, PerceptionFactory perceptionFactory) throws GTUException
carFollowingModelFactory
- CarFollowingModelFactory<? extends CarFollowingModel>; factory of the car-following
modelperceptionFactory
- PerceptionFactory; perception factoryGTUException
- if the supplied car-following model does not have an accessible empty constructorpublic LMRSFactory(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory, PerceptionFactory perceptionFactory, Synchronization synchronization, Cooperation cooperation, GapAcceptance gapAcceptance, Tailgating tailGating, Set<MandatoryIncentive> mandatoryIncentives, Set<VoluntaryIncentive> voluntaryIncentives, Set<AccelerationIncentive> accelerationIncentives)
carFollowingModelFactory
- CarFollowingModelFactory<? extends CarFollowingModel>; factory of the car-following
modelperceptionFactory
- PerceptionFactory; perception factorysynchronization
- Synchronization; type of synchronizationcooperation
- Cooperation; type of cooperationgapAcceptance
- GapAcceptance; gap-acceptancetailGating
- Tailgating; tail gatingmandatoryIncentives
- mandatory incentives; note that order may mattervoluntaryIncentives
- voluntary incentives; note that order may matteraccelerationIncentives
- Set<AccelerationIncentive>; acceleration incentivespublic final Parameters getParameters() throws ParameterException
Parameters parameters = this.subComponent1Factory.getParameters(); this.subComponent2Factory.getParameters().setAllIn(parameters); parameters.setDefaultParameters(componentClass); parameters.setDefaultParameters(staticUtilityClass); return parameters;where all parameters used in
componentClass
are defined or forwarded in componentClass
.// forwarded public static final ParameterTypeAcceleration A = ParameterTypes.A; // defined public static final ParameterTypeDouble FACTOR = new ParameterTypeDouble("factor", "factor on response", 1.0);The same holds for static utilities that are used. Parameters should be defined at the utility class, and parameters of used utilities should be included.
getParameters
in interface ModelComponentFactory
ParameterException
- on parameter exceptionpublic final LMRS create(LaneBasedGTU gtu) throws GTUException
create
in interface LaneBasedTacticalPlannerFactory<LMRS>
gtu
- LaneBasedGTU; GTUGTUException
- if the gtu is not suitable in any way for the creation of the tactical plannerCopyright © 2014–2019 Delft University of Technology. All rights reserved.