Class GtuTypeAssumptions

java.lang.Object
org.opentrafficsim.road.gtu.perception.GtuTypeAssumptions

public class GtuTypeAssumptions extends Object
Assumptions at GTU type level.

Copyright (c) 2013-2026 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
  • Constructor Details

    • GtuTypeAssumptions

      public GtuTypeAssumptions()
      Constructor.
  • Method Details

    • 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 - the GtuType to set the model for
      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 - the GtuType to set the model for
      parameters - the model to set for the GtuType
    • setLaneTypeMaxSpeed

      public final void setLaneTypeMaxSpeed(GtuType gtuType, LaneType laneType, org.djunits.value.vdouble.scalar.Speed maxSpeed)
      Set the maximum speed for a certain GtuType on a certain LaneType as an assumption for that GtuType.
      Parameters:
      gtuType - the GtuType to set the model for
      laneType - the laneType to set the speed for
      maxSpeed - 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 - 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 - 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 org.djunits.value.vdouble.scalar.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 - the GtuType to get the maximum speed for
      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,org.djunits.value.vdouble.scalar.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 - 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()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object