Class VehicleType

java.lang.Object
org.eclipse.mosaic.lib.objects.vehicle.VehicleType
All Implemented Interfaces:
Serializable

@Immutable public class VehicleType extends Object implements Serializable
This class was created to represent a vehicle type.
See Also:
  • Field Details

    • DEFAULT_VEHICLE_LENGTH

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

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

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

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

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

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

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

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

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

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

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

    • 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 Details

    • getName

      public String getName()
    • getLength

      public double getLength()
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()
    • getMinGap

      public double getMinGap()
    • getMaxSpeed

      public double getMaxSpeed()
    • getVehicleClass

      public VehicleClass getVehicleClass()
    • 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()
    • getLaneChangeMode

      public LaneChangeMode getLaneChangeMode()
    • getSpeedMode

      public SpeedMode getSpeedMode()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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

      public String toString()
      Overrides:
      toString in class Object