Class LmrsFactoryOld
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlannerFactory<Lmrs>
org.opentrafficsim.road.gtu.lane.tactical.lmrs.LmrsFactoryOld
- All Implemented Interfaces:
LaneBasedTacticalPlannerFactory<Lmrs>,ModelComponentFactory
Deprecated.
Factory for a tactical planner using LMRS with any car-following model.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLmrsFactoryOld(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory, PerceptionFactory perceptionFactory, Synchronization synchronization, Cooperation cooperation, GapAcceptance gapAcceptance, Tailgating tailgating, Set<Supplier<? extends MandatoryIncentive>> mandatoryIncentives, Set<Supplier<? extends VoluntaryIncentive>> voluntaryIncentives, Set<Supplier<? extends AccelerationIncentive>> accelerationIncentives) Deprecated.Constructor with full control over incentives and type of synchronization. -
Method Summary
Modifier and TypeMethodDescriptionfinal Lmrscreate(LaneBasedGtu gtu) Deprecated.Creates a new tactical planner for the given GTU.final ParametersgetParameters(GtuType gtuType) Deprecated.Returns parameters for the given component.final StringtoString()Deprecated.Methods inherited from class org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlannerFactory
getCarFollowingModelFactoryString, getCarFollowingParameters, getPerceptionFactory, nextCarFollowingModel, peekDesiredHeadway, peekDesiredSpeed
-
Constructor Details
-
LmrsFactoryOld
protected LmrsFactoryOld(CarFollowingModelFactory<? extends CarFollowingModel> carFollowingModelFactory, PerceptionFactory perceptionFactory, Synchronization synchronization, Cooperation cooperation, GapAcceptance gapAcceptance, Tailgating tailgating, Set<Supplier<? extends MandatoryIncentive>> mandatoryIncentives, Set<Supplier<? extends VoluntaryIncentive>> voluntaryIncentives, Set<Supplier<? extends AccelerationIncentive>> accelerationIncentives) Deprecated.Constructor with full control over incentives and type of synchronization.- Parameters:
carFollowingModelFactory- factory of the car-following modelperceptionFactory- perception factorysynchronization- type of synchronizationcooperation- type of cooperationgapAcceptance- gap-acceptancetailgating- tail gatingmandatoryIncentives- note that order may mattervoluntaryIncentives- note that order may matteraccelerationIncentives- acceleration incentives
-
-
Method Details
-
getParameters
Deprecated.Description copied from interface:ModelComponentFactoryReturns parameters for the given component. These parameters should contain, and possibly overwrite, parameters from sub-components. A parameter factory at the highest level (strategical planner) may overwrite any parameter. This combination allows that for sub-components, default factories can be used, while the parameter factory only overwrites parameters different for specific GTU types. The default implementation returns all default parameter values declared at the class.
Conventional use is:
Parameters parameters = this.subComponent1Factory.getParameters(); this.subComponent2Factory.getParameters().setAllIn(parameters); parameters.setDefaultParameters(componentClass); parameters.setDefaultParameters(staticUtilityClass); return parameters;
where all parameters used incomponentClassare defined or forwarded incomponentClass.
// 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.
Because high-level model components might determine what low-level components to use depending on GTU type, and hence which parameters might be required, the GTU type is given as input. Many components will however not need it to return the required parameters.
- Parameters:
gtuType- GTU type- Returns:
- parameters for the given component
- Throws:
ParameterException- on parameter exception
-
create
Deprecated.Description copied from interface:LaneBasedTacticalPlannerFactoryCreates a new tactical planner for the given GTU.- Parameters:
gtu- GTU- Returns:
- tactical planner for the given GTU
- Throws:
GtuException- if the gtu is not suitable in any way for the creation of the tactical planner
-
toString
Deprecated.
-