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-2022 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 boolean
equals(Object obj)
CarFollowingModel
getCarFollowingModel(GTUType gtuType)
Return the car following model for a certain GTUType as an assumption for that GTUType.Speed
getLaneTypeMaxSpeed(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.org.opentrafficsim.base.parameters.Parameters
getParameters(GTUType gtuType)
Return the parameters model for a certain GTUType as an assumption for that GTUType.int
hashCode()
void
setCarFollowingModel(GTUType gtuType, CarFollowingModel carFollowingModel)
Set the car following model for a certain GTUType as an assumption for that GTUType.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.void
setParameters(GTUType gtuType, org.opentrafficsim.base.parameters.Parameters parameters)
Set the parameters for a certain GTUType as an assumption for that GTUType.String
toString()
-
-
-
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, org.opentrafficsim.base.parameters.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 org.opentrafficsim.base.parameters.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
-
-