Class VehicleSpeedChange

java.lang.Object
org.eclipse.mosaic.rti.api.Interaction
org.eclipse.mosaic.interactions.vehicle.VehicleSpeedChange
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Interaction>

public final class VehicleSpeedChange extends Interaction
This represents a 'change of speed' instruction to the used traffic simulator. The instruction basically only needs the target speed as well as the timeframe to reach that speed. Seeing as some traffic simulators can't seem to detect if this represents a speed up or a slow down compared to the current speed a VehicleSpeedChange.VehicleSpeedChangeType needs to be given to determine that data.
 As a special bonus VehicleSpeedChange.VehicleSpeedChangeType.RESET tells the traffic simulator to control the
 speed on its own again. In that case speed as well as interval should be disregarded by
 the respective traffic simulator ambassadors.
 
See Also:
  • Field Details

    • TYPE_ID

      public static final String TYPE_ID
      String identifying the type of this interaction.
  • Constructor Details

    • VehicleSpeedChange

      public VehicleSpeedChange(long time, String vehicleId, VehicleSpeedChange.VehicleSpeedChangeType type, double newSpeed, long duration, double acceleration)
      Creates a new VehicleSpeedChange interaction.
      Parameters:
      time - Timestamp of this interaction, unit: [ns]
      vehicleId - vehicle identifier
      type - change speed type
      newSpeed - New desired speed, unit [m/s]
      duration - Duration in which the desired speed shall be reached, unit [ns]
      acceleration - desired acceleration
  • Method Details