Skip to content

M-Colley/sumo-micromobility

Repository files navigation

Enhanced Micromobility in SUMO

Added Features

  • Script to allow e-scooters to drive on sidewalks
    • Adds custom vehicle type "escooter", using SUMO's vehicle class "scooter"
    • Adds scooters to the list of allowed vehicles on all roads, which allows pedestrians
  • An adjustable percentage of vehicles in the simulation get converted to pedestrians, trying to reach their destination by using Micromobility
  • E-scooters automatically select their preferred lane based on the type of road and current traffic conditions
  • Extensive logging for scientific studies

How to use

Prerequisites

  • sumo installed (requires version 1.21 or newer)
  • rtree installed (see requirements.txt)
  • Python installed
  • installed sumo additions (run pip install -r "%PYTHONPATH%\requirements.txt" --upgrade under WINDOWS)

Allowing e-scooters on sidewalks

As of September 26th 2024, e-scooters are not allowed to drive on sidewalks in SUMO. Even though driving on sidewalks with an e-scooter is against the law in many countries around the world, many micromobility users ignore those restrictions. We added this to SUMO to simulate a more realistic usage of e-scooters.

The following steps are required to add this to a simulation:

  1. requires a valid .sumocfg, in which an unzipped .net.xml and an unzipped route file are specified
  2. run py allowEscootersOnSidewalks.py <path_to_sumocfg>

This adds e-scooters to the list of allowed vehicles on any road where pedestrians are allowed. Note that e-scooters are allowed on normal roads by default. The new vehicle type escooter is added to the specified route file.

Running the simulation

Run the simulation by calling py mmTraCI.py. Without further arguments, the default settings configured in the simConfig_mm.py will be used. For the available command line parameters, run py mmTraCI.py --help.

Custom scenarios can be run by adding the --scenario_path <path_to_scenario> command line option.

Example command: py mmTraCI.py --nogui --loop --mm_step_size 0.05 --mm_start_density 0.0 --mm_upper_bound 0.3 --scenario_path .\scenarios\manhattan\5_uam_hubs_manhattan.sumocfg

If further adjustments to the parameters used during the simulation are desired, edit simConfig_mm.py as needed.

Results after a simulation

  • mm-log.csv (logged creation, termination and lane selections of e-scooters)
    • timestamp: date
    • step: integer
    • scenario: string
    • escooterID (ID of newly created UAM e-scooter): string
    • x: integer
    • y: integer
    • laneType: 'standard': normal road, 'sidewalk', 'bicycle': bicycle only lane
    • laneOccupancy: float
    • laneMeanSpeed: float
    • laneMeanVehicleLength: float
    • routeStartX (original starting point): integer
    • routeStartY (original starting point): integer
    • routeDestX: integer
    • routeDestY: integer
    • originalVehicleID: string
    • originalVType (type of vehicle that got converted): string
    • mmDensity (percentage of vehicles converted to e-scooters): float
    • lane_change_duration: integer
    • lane_find_frequency: integer
    • sidewalk_occupancy_threshold (threshold to categorize a sidewalk as uncomfortably full): float
    • road_occupancy_threshold: float
    • road_speed_threshold (threshold to differentiate between slow moving and fast moving traffic): integer
    • road_vehicle_length_threshold (threshold for large vehicles): float
    • event (what triggered the log entry): 'new': e-scooter was newly created, 'terminated': left the simulation, 'laneSelection': selected the preferred lane
  • mm-encounter-log.csv (logged close encounters between e-scooters and pedestrians)
    • timestamp: date
    • step: integer
    • scenario: string
    • escooterID (ID of e-scooter): string
    • escooter_x: integer
    • escooter_y: integer
    • pedID (ID of pedestrian): string
    • ped_x: integer
    • ped_y: integer
    • distance (distance in meters between e-scooter and pedestrian): float
    • laneOccupancy: float
    • laneMeanSpeed: float
    • laneMeanVehicleLength: float
    • routeStartX (original starting point): integer
    • routeStartY (original starting point): integer
    • routeDestX: integer
    • routeDestY: integer
    • originalId: string
    • originalVType (type of vehicle that got converted): string
    • mmDensity (percentage of vehicles converted to e-scooters): float
    • lane_change_duration: integer
    • lane_find_frequency: integer
    • sidewalk_occupancy_threshold (threshold to categorize a sidewalk as uncomfortably full): float
    • road_occupancy_threshold: float
    • road_speed_threshold (threshold to differentiate between slow moving and fast moving traffic): integer
    • road_vehicle_length_threshold (threshold for large vehicles): float
    • log_escooter_ped_distance_threshold (threshold for distance between e-scooter and pedestrian to create log entry): float

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •