Class GTUTypeAssumptions

  • All Implemented Interfaces:
    java.io.Serializable

    public class GTUTypeAssumptions
    extends java.lang.Object
    implements java.io.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.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version May 27, 2016
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    See Also:
    Serialized Form
    • Constructor Detail

      • GTUTypeAssumptions

        public GTUTypeAssumptions()
    • 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 for
        carFollowingModel - 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 for
        parameters - 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 for
        laneType - LaneType; the laneType to set the speed for
        maxSpeed - 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 for
        laneType - 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 java.util.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
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object