Class VehicleType

    • Field Detail

      • DEFAULT_VEHICLE_LENGTH

        public static final double DEFAULT_VEHICLE_LENGTH
        The default length of a vehicle. Unit: [m]
        See Also:
        Constant Field Values
      • DEFAULT_VEHICLE_WIDTH

        public static final double DEFAULT_VEHICLE_WIDTH
        The default width of a vehicle. Unit: [m]
        See Also:
        Constant Field Values
      • DEFAULT_VEHICLE_HEIGHT

        public static final double DEFAULT_VEHICLE_HEIGHT
        The default height of a vehicle. Unit: [m]
        See Also:
        Constant Field Values
      • DEFAULT_MINIMAL_GAP

        public static final double DEFAULT_MINIMAL_GAP
        The default minimum distance between two vehicles. Unit: [m]
        See Also:
        Constant Field Values
      • DEFAULT_MAX_SPEED_MS

        public static final double DEFAULT_MAX_SPEED_MS
        The default maximum speed. Unit: [m/2]
        See Also:
        Constant Field Values
      • DEFAULT_ACCELERATION

        public static final double DEFAULT_ACCELERATION
        The default acceleration of a vehicle. Unit: [m/s^2]
        See Also:
        Constant Field Values
      • DEFAULT_DECELERATION

        public static final double DEFAULT_DECELERATION
        The default deceleration of a vehicle. Unit: [m/s^2]
        See Also:
        Constant Field Values
      • DEFAULT_SIGMA

        public static final double DEFAULT_SIGMA
        The default value for driver imperfection.
        See Also:
        Constant Field Values
      • DEFAULT_TAU

        public static final double DEFAULT_TAU
        The default reaction time of the vehicles driver. Unit: [m]
        See Also:
        Constant Field Values
      • DEFAULT_SPEED_FACTOR

        public static final double DEFAULT_SPEED_FACTOR
        The default speed factor of the vehicles driver.
        See Also:
        Constant Field Values
      • DEFAULT_SPEED_DEVIATION

        public static final double DEFAULT_SPEED_DEVIATION
        The default deviation of the speed factor the vehicles driver. Unit: [m]
        See Also:
        Constant Field Values
    • Constructor Detail

      • VehicleType

        public VehicleType​(String name,
                           Double length,
                           Double width,
                           Double height,
                           Double minGap,
                           Double maxSpeed,
                           VehicleClass vehicleClass,
                           Double accel,
                           Double decel,
                           Double emergencyDecel,
                           Double sigma,
                           Double tau,
                           Double speedFactor,
                           String color,
                           LaneChangeMode laneChangeMode,
                           SpeedMode speedMode)
        Constructor. Pass null values to use default values.
        Parameters:
        name - Name of the vehicle type.
        length - Length of the vehicle. Unit: [m].
        minGap - Distance between front bumper of a vehicle and the back bumper of its leader in a traffic jam. Unit: [m].
        maxSpeed - Maximal speed. Unit: [m/s].
        vehicleClass - Class of the vehicle.
        accel - Acceleration. Unit: [m/s^2].
        decel - Deceleration. Unit: [m/s^2].
        emergencyDecel - Emergency deceleration. Unit: [m/s^2]
        sigma - Driver imperfection.
        tau - Driver reaction time. Unit: [s].
        laneChangeMode - Lane change mode of the Vehicle.
        speedMode - Speed mode of the Vehicle.
      • VehicleType

        public VehicleType​(String name)
        Constructor which sets the type name. All other values are default values.
        Parameters:
        name - Name of the vehicle type
    • Method Detail

      • getName

        public String getName()
      • getLength

        public double getLength()
      • getWidth

        public double getWidth()
      • getHeight

        public double getHeight()
      • getMinGap

        public double getMinGap()
      • getMaxSpeed

        public double getMaxSpeed()
      • getAccel

        public double getAccel()
      • getDecel

        public double getDecel()
      • getEmergencyDecel

        public double getEmergencyDecel()
      • getSigma

        public double getSigma()
      • getTau

        public double getTau()
      • getSpeedFactor

        public double getSpeedFactor()
      • getColor

        public String getColor()
      • getSpeedMode

        public SpeedMode getSpeedMode()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object