Class VehicleType
java.lang.Object
org.eclipse.mosaic.lib.objects.vehicle.VehicleType
- All Implemented Interfaces:
Serializable
This class was created to represent a vehicle type.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
The default acceleration of a vehicle.static final double
The default deceleration of a vehicle.static final double
The default maximum speed.static final double
The default minimum distance between two vehicles.static final double
The default value for driver imperfection.static final double
The default deviation of the speed factor the vehicles driver.static final double
The default speed factor of the vehicles driver.static final double
The default reaction time of the vehicles driver.static final double
The default height of a vehicle.static final double
The default length of a vehicle.static final double
The default width of a vehicle. -
Constructor Summary
ConstructorsConstructorDescriptionVehicleType
(String name) Constructor which sets the type name.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. -
Method Summary
-
Field Details
-
DEFAULT_VEHICLE_LENGTH
public static final double DEFAULT_VEHICLE_LENGTHThe default length of a vehicle. Unit: [m]- See Also:
-
DEFAULT_VEHICLE_WIDTH
public static final double DEFAULT_VEHICLE_WIDTHThe default width of a vehicle. Unit: [m]- See Also:
-
DEFAULT_VEHICLE_HEIGHT
public static final double DEFAULT_VEHICLE_HEIGHTThe default height of a vehicle. Unit: [m]- See Also:
-
DEFAULT_MINIMAL_GAP
public static final double DEFAULT_MINIMAL_GAPThe default minimum distance between two vehicles. Unit: [m]- See Also:
-
DEFAULT_MAX_SPEED_MS
public static final double DEFAULT_MAX_SPEED_MSThe default maximum speed. Unit: [m/2]- See Also:
-
DEFAULT_ACCELERATION
public static final double DEFAULT_ACCELERATIONThe default acceleration of a vehicle. Unit: [m/s^2]- See Also:
-
DEFAULT_DECELERATION
public static final double DEFAULT_DECELERATIONThe default deceleration of a vehicle. Unit: [m/s^2]- See Also:
-
DEFAULT_SIGMA
public static final double DEFAULT_SIGMAThe default value for driver imperfection.- See Also:
-
DEFAULT_TAU
public static final double DEFAULT_TAUThe default reaction time of the vehicles driver. Unit: [m]- See Also:
-
DEFAULT_SPEED_FACTOR
public static final double DEFAULT_SPEED_FACTORThe default speed factor of the vehicles driver.- See Also:
-
DEFAULT_SPEED_DEVIATION
public static final double DEFAULT_SPEED_DEVIATIONThe 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
Constructor which sets the type name. All other values are default values.- Parameters:
name
- Name of the vehicle type
-
-
Method Details
-
getName
-
getLength
public double getLength() -
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getMinGap
public double getMinGap() -
getMaxSpeed
public double getMaxSpeed() -
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
-
getLaneChangeMode
-
getSpeedMode
-
hashCode
public int hashCode() -
equals
-
toString
-