Class GTUTypeAssumptions
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.GTUTypeAssumptions
- All Implemented Interfaces:
Serializable
public class GTUTypeAssumptions extends Object implements Serializable
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.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description GTUTypeAssumptions() -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)CarFollowingModelgetCarFollowingModel(GTUType gtuType)Return the car following model for a certain GTUType as an assumption for that GTUType.SpeedgetLaneTypeMaxSpeed(GTUType gtuType, LaneType laneType)Return the maximum speed on a LaneType for a certain GTUType as an assumption for that GTUType.Map<LaneType,Speed>getMaxSpeeds(GTUType gtuType)Return a safe copy of the maximum speed for all LaneTypes for a certain GTUType as an assumption for that GTUType.ParametersgetParameters(GTUType gtuType)Return the parameters model for a certain GTUType as an assumption for that GTUType.inthashCode()voidsetCarFollowingModel(GTUType gtuType, CarFollowingModel carFollowingModel)Set the car following model for a certain GTUType as an assumption for that GTUType.voidsetLaneTypeMaxSpeed(GTUType gtuType, LaneType laneType, Speed maxSpeed)Set the maximum speed for a certain GTUType on a certain LaneType as an assumption for that GTUType.voidsetParameters(GTUType gtuType, Parameters parameters)Set the parameters for a certain GTUType as an assumption for that GTUType.StringtoString()
-
Constructor Details
-
GTUTypeAssumptions
public GTUTypeAssumptions()
-
-
Method Details
-
setCarFollowingModel
Set the car following model for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to set the model forcarFollowingModel- CarFollowingModel; the model to set for the GTUType
-
setParameters
Set the parameters for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to set the model forparameters- Parameters; the model to set for the GTUType
-
setLaneTypeMaxSpeed
Set the maximum speed for a certain GTUType on a certain LaneType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to set the model forlaneType- LaneType; the laneType to set the speed formaxSpeed- Speed; the maximum speed on the laneType for the given GTUType
-
getCarFollowingModel
Return the car following model for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to get the model for- Returns:
- the car following model for the GTUType, or null when there is no information for the gtuType
-
getParameters
Return the parameters model for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to get the model for- Returns:
- the parameters for the GTUType, or null when there is no information for the gtuType
-
getLaneTypeMaxSpeed
Return the maximum speed on a LaneType for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to get the maximum speed forlaneType- LaneType; the LaneType to get the maximum speed for- Returns:
- the maximum speed for the GTUType on the LaneType, or null when there is no information for the combination of gtuType and laneType
-
getMaxSpeeds
Return a safe copy of the maximum speed for all LaneTypes for a certain GTUType as an assumption for that GTUType.- Parameters:
gtuType- GTUType; the GTUType to get the maximum speed for- Returns:
- a map with a safe copy of the maximum speed for the GTUType on all LaneTypes, or null when there is no information for the gtuType
-
hashCode
public final int hashCode() -
equals
-
toString
-