Skip to content

EMob-Lab/Mobauto2-task1-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobauto2-task1-4

This project contains simulation configuration and data files for microscopic traffic modeling using SUMO for the MOBAUTO2 project.

Project Structure

  • Configuration Files

    • MOBAUTO2_simulation.sumocfg: Main SUMO simulation configuration file.
    • net.net.xml: Network definition for the simulation.
  • Public Transport

    • ptlines.xml, ptlines_baseline.xml: Public transport line definitions.
    • ptRoutes.rou.xml, ptRoutes_baseline.rou.xml: Public transport route files.
    • stopinfos.xml: Information about public transport stops.
  • Vehicle and Route Files

    • routes.rou.xml: General vehicle routes.
    • vtypes.add.xml, vtypes_withbaseline.add.xml, vtypes_withbaseline_leadsh.add.xml, vtypes_AlteredPerceptions.add.xml: Vehicle type definitions.
    • busStops.add.xml: Bus stop definitions.
  • Detectors and Emitters

    • detectors.det.xml, detectors.poi.xml: Detector and point of interest definitions.
    • emitters2.emi.xml, emitters2_extended.emi.xml, emitters2_extended_1.5x.emi.xml, emitters2_extended_2x.emi.xml: Vehicle emitter definitions.
  • Trips and Flows

    • trips.trips.xml: Trip definitions for the simulation.
    • Flows3.csv: CSV file with flow data.
  • Scripts

    • scripts/runner.py: Main script to execute the simulation.
      Arguments:
      • --sim_duration <int>: Simulation duration (steps)
      • --config_file <path>: Path to the SUMO configuration file
      • --scale_traffic <float>: Scale factor for traffic (e.g., 1.0, 1.5, 2.0)
      • --baseline <true|false>: Whether to run in baseline mode
    • scripts/params.py: Contains simulation parameters such as SCALE_TRAFFIC, BASELINE, road friction, ghost vehicle, altered perception, and scenario toggles.
    • scripts/utils.py: Utility functions for simulation logic, including:
      • create_cycle_traffic(): Adds bicycles to the simulation under certain conditions.
      • apply_speed_limit_shuttles(): Enforces speed limits for shuttles.
      • compute_ttc_threshold(): Calculates the Time-To-Collision-threshold below which emergency manoeuvre should be triggered
      • run_ttc_analysis(): Performs Time-To-Collision (TTC) analysis.
      • get_ttc_drac(), get_ttc_drac_leader(): Compute TTC and deceleration to avoid a crash.
      • get_merging(): Analyze merging conditions and compute PET/TTC.
      • get_total_network(): Loads the road network as a graph.
      • get_neighbours_buffer(): Finds vehicles within a buffer distance.
      • move_leader_ahead_shuttle_then_brake(): Moves and brakes the leader vehicle for dynamic scenarios.
      • get_emitter_file_from_scale_traffic(): Selects emitter file based on traffic scale.
      • choose_config_files(): Selects configuration files based on scenario.
      • get_emitter_file_from_scale_traffic: Returns the emitter file name based on the scale_traffic value.
      • model_road_condition(): Sets road friction, speed factor, and min gap.
      • execute_ghost_vehicle(): Simulates ghost vehicle scenario.
      • (More functions for scenario logic and analysis.)
    • scripts/utils_neigh_and_dynamic_scenario.py: Utility functions for neighborhood analysis and dynamic scenario, including:
      • get_shuttle_data(): Returns shuttle information (id, edge, position, speed, acceleration)
      • handle_leader(), handle_follower(), handle_right_leader(), handle_right_follower(), handle_left_leader(), handle_left_follower(), handle_extended_neighborhood(): Returns safety KPIs for the immediate neighbours and the extended neighborhood
      • handle_dyn_scenario_leader_braking(), write_leader_SH_file(): Launch and retrieve information on the dynamic scenario of sudden braking of the shuttle leader
    • GenerateFlows.sh: Shell script to generate flow files.
    • GeneratePTLines.sh: Shell script to generate public transport lines.
  • Output and Logs

    • vehroutes.xml: Output vehicle routes from simulation.
    • scripts/logs/: Directory for log files.
    • output/: Directory for simulation outputs.
    • trips.trips.xml.errorlog: Error log for trip generation.
  • Data post-processing

    • post_processing/: Jupyter notebooks for results analysis and visualisation
  • Miscellaneous

    • misc/: Directory for miscellaneous files.

Usage

  1. Set Simulation Parameters:
    Edit scripts/params.py to set the desired traffic scale (SCALE_TRAFFIC), baseline scenario (BASELINE), and other parameters.

  2. Run the Simulation:
    Execute the simulation using the scripts/runner.py script.
    Example:

    python runner.py --sim_duration 14400 --scale_traffic 1.5 --baseline false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages