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.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version May 27, 2016
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
All Methods Instance Methods Concrete Methods 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()
-
-
-
Method Detail
-
setCarFollowingModel
public final void setCarFollowingModel(GtuType gtuType, CarFollowingModel carFollowingModel)
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
public final void setParameters(GtuType gtuType, Parameters parameters)
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
public final void setLaneTypeMaxSpeed(GtuType gtuType, LaneType laneType, Speed maxSpeed)
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
public final CarFollowingModel getCarFollowingModel(GtuType gtuType)
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
public final Parameters getParameters(GtuType gtuType)
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
public final Speed getLaneTypeMaxSpeed(GtuType gtuType, LaneType laneType)
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
public final 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.- 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
-
-