Class CSumo

java.lang.Object
org.eclipse.mosaic.fed.sumo.config.CSumo
All Implemented Interfaces:
Serializable

public class CSumo extends Object implements Serializable
The SUMO Ambassador configuration class.
See Also:
  • Field Details

    • visualizer

      public boolean visualizer
      Starts the GUI interface of SUMO, if set to true (default: false).
    • updateInterval

      public Long updateInterval
      The Interval after which positions are published. Define the size of one simulation step in sumo (minimal value: 1). The default value is 1000 (1s). Unit: [ms].
    • sumoConfigurationFile

      public String sumoConfigurationFile
      Name of the main SUMO scenario configuration (*.sumocfg). If this member equals null, the SUMO ambassador will try to find a ".sumocfg" file.
    • exitOnInsertionError

      public boolean exitOnInsertionError
      If too many vehicles try to enter the simulation, SUMO might skip some vehicles and tries to enter them later again. This behavior can lead to wrong simulation results. This parameter defines, if the ambassador should try to continue the simulation in such cases. Quit SUMO, if an error occurs while inserting a new vehicle (e.g. due to high vehicle densities) (recommended: true).
    • additionalSumoParameters

      public String additionalSumoParameters
      Add additional parameter to the SUMO start command. Prepend always a blank. The default is a seed of 100000. Set a particular seed for the random number generator. By using different values you can have different but still reproducible simulation runs. Ignore possible waiting times by setting time-to-teleport to 0. This avoid unmoved "vehicles" (in our case also RSUs) being removed from simulation.
    • trafficFlowMeasurementWindowInS

      public int trafficFlowMeasurementWindowInS
      Defines the time window in seconds in which vehicle counts on induction loops should be aggregated to traffic flow (veh/h).
    • timeGapOffset

      public double timeGapOffset
      This offset is added to all time-gap related parametrizations of vehicles. (e.g. declaring vehicle types to SUMO, changing time-gap/reaction time during simulation) This could be helpful as IDM should be parametrized with lower time gaps to achieve specific time gap values.
    • subscribeToAllVehicles

      public boolean subscribeToAllVehicles
      If set to true all vehicles will be subscribed (see SimulationFacade.subscribeForVehicle(String, long, long)). If set to false only vehicles with applications mapped to them will be subscribed.
    • debugTraciCalls

      public boolean debugTraciCalls
      Prints out all traci calls.
    • simulationClientOrder

      public int simulationClientOrder
      This parameter can be used to handle multiple SUMO clients at a time. Typically, MOSAIC will start the SUMO simulation and then connect to it as the first client, hence the default value of 1. For further information read this SUMO documentation and consult MOSAIC's documentation.
    • subscriptions

      public Collection<String> subscriptions
      A optional list of subscriptions for each vehicle in the simulation. The less subscriptions given, the faster the simulation. Per default (if this list is set to null), all subscriptions are activated. Please note, that some components expect specific information, such as the road position. If those information is not subscribed, these components may fail.

      Possible values are: "roadposition", "signals", "emissions", "leader"
    • SUBSCRIPTION_ROAD_POSITION

      public static final String SUBSCRIPTION_ROAD_POSITION
      Subscription identifier for everything which is related to the position of the vehicle on the road, such as the ID of the road.
      See Also:
    • SUBSCRIPTION_SIGNALS

      public static final String SUBSCRIPTION_SIGNALS
      Subscription identifier for everything which is related to the signals on the vehicle.
      See Also:
    • SUBSCRIPTION_EMISSIONS

      public static final String SUBSCRIPTION_EMISSIONS
      Subscription identifier for everything which is related to the emissions on the vehicle, such as CO2, NOX, and more, including fuel consumption.
      See Also:
    • SUBSCRIPTION_LEADER

      public static final String SUBSCRIPTION_LEADER
      Subscription identifier for subscribing to leader and follower information for each vehicle.
      See Also:
    • SUBSCRIPTION_TRAINS

      public static final String SUBSCRIPTION_TRAINS
      Subscription identifier for subscribing to train information such next stops and line information.
      See Also:
    • trafficSignLaneWidth

      public double trafficSignLaneWidth
      The default lane width to be used when adding traffic signs per lane (default: 3.2) (only relevant when using SUMO-GUI)
    • highlights

      public Collection<String> highlights
      Configure to highlight a vehicle in the GUI if it's performing a route or lane change, e.g. for debugging purposes (only relevant when using SUMO-GUI).

      Possible values are: "changeLane", "changeRoute"
    • additionalVehicleTypeParameters

      public Map<String,Map<String,String>> additionalVehicleTypeParameters
      Allows configuring specialised vType parameters, which can't be configured via Mapping. E.g. parameters for the lane change model of vehicles.
    • moveToXyMode

      public VehicleSetMoveToXY.Mode moveToXyMode
      Configure the mode with which a vehicle is moved to a explicit postion with the SUMO command moveToXY(). (SWITCH_ROUTE, KEEP_ROUTE or EXACT_POSITION)
    • HIGHLIGHT_CHANGE_LANE

      public static final String HIGHLIGHT_CHANGE_LANE
      See Also:
    • HIGHLIGHT_CHANGE_ROUTE

      public static final String HIGHLIGHT_CHANGE_ROUTE
      See Also:
  • Constructor Details

    • CSumo

      public CSumo()