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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_ACCELERATION
The default acceleration of a vehicle.static double
DEFAULT_DECELERATION
The default deceleration of a vehicle.static double
DEFAULT_MAX_SPEED_MS
The default maximum speed.static double
DEFAULT_MINIMAL_GAP
The default minimum distance between two vehicles.static double
DEFAULT_SIGMA
The default value for driver imperfection.static double
DEFAULT_SPEED_DEVIATION
The default deviation of the speed factor the vehicles driver.static double
DEFAULT_SPEED_FACTOR
The default speed factor of the vehicles driver.static double
DEFAULT_TAU
The default reaction time of the vehicles driver.static double
DEFAULT_VEHICLE_HEIGHT
The default height of a vehicle.static double
DEFAULT_VEHICLE_LENGTH
The default length of a vehicle.static double
DEFAULT_VEHICLE_WIDTH
The default width of a vehicle.
-
Constructor Summary
Constructors Constructor Description VehicleType(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getAccel()
String
getColor()
double
getDecel()
double
getEmergencyDecel()
double
getHeight()
LaneChangeMode
getLaneChangeMode()
double
getLength()
double
getMaxSpeed()
double
getMinGap()
String
getName()
double
getSigma()
double
getSpeedFactor()
SpeedMode
getSpeedMode()
double
getTau()
VehicleClass
getVehicleClass()
double
getWidth()
int
hashCode()
String
toString()
-
-
-
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()
-
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()
-
-