DayuanTan / SUMO_Guide_with_Examples

Dayuan Tan's notes about learning SUMO. A very good guide for learning SUMO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SUMO

This includes SUMO offical packages.

Files tree:

Dir path Dir or File Notes
- data d Official dir.
- docs d Official dir.
- - tutorial d Official examples.
- tools d Official dir.
- dayuan d My sumo projects, examples.
- - aSimpleSumo.md f My example for a simple road net.
- - 2ndSimpleSumo.md f My 2nd SUMO example. A bit more complex then above one.
- - 3rdSumoTraCI.md f Third exmaple about how to use TraCI.
- - generateNetfileOSM.md, generate2_DCdowntown.md f About generate net file using OSM.
- - vTypeDist d How to set up different vehicle types in SUMO.
- - TL_reschedule d How to change/reschedule traffic lights cycles.
- - platoon d Setup platoon and get platoon info.
- - imgs d Some screenshots or recording vedios for my projects or examples.

File structure for a SUMO project

  • (*) Link geometry data can also be defined in the link file quickstart.edg.xml.
  • (**) It is an optional file. If this file is not given, lane connections and traffic movements will be generated by defaults.

For executing:


My simple SUMO example

I set up a simple SUMO, it's friednly to beginners. You can find it here.

Few screenshots about it:


Second SUMO example: a bit more complex

Difference & Improvement:

  • The road condition is more complex, two direction three lanes are added.
  • Different edge(road segment) types are used.
  • Different lane is assigned to specific lane.
  • Use netconvert -c dayuan.netccfg to generate "net.xml" file.

Few screenshots about it:

Third SUMO example: use TraCI

This is an example using TraCI to control and change traffic lights.

Generate urban net file using OpenStreetMap

Generate smaller net file using OpenStreetMap (DC downtown)

Generate NYC road net file using OpenStreetMap (updated 3/12/2022)

SUMO Example for Traffic Lights - Actuated TL (ATL)

ATL

Code file: <SUMO_HOME>/tests/sumo/basic/tls/actuated/dualring_simple/

To run it:

.../dualring_simple$ sumo-gui -n net.net.xml -r input_routes.rou.xml -a "input_additional.add.xml"

The original TL logic (programID="0") defined in net.net.xml don't work since an additional TL logic (programID="1") is defined in add.xml which actually works. We can observe the minDur and maxDur works.

The offcial wiki mentions the "next" option and it logic to select next phase. But I didn't see how it works in this example. So far only minDur/maxDur have been proved.

ref: 1 Simulation/Traffic Lights.

2 Actuated Traffic Lights.


Building a randomTrips scenario with different vehicle types.

This is a short tutorial about how to implement different vehicle types in one scenario composed by me.


How to change traffic lights schedule while sumo running?

This is a tutorial about how to change the current/default traffic lights schedule while sumo running, which will be useful for those traffic lights dynamic re-schedule project.


How to setup platoon and get platoon information?

There is no official good way to get platoon information like which vehicles are forming platoon.

I found a way that to check vehicle type. Those vehicles which are in platoons their vehicle type will be changed.

After SUMO 1.19.0 https://github.com/DayuanTan/simpla_official_example_run

About

Dayuan Tan's notes about learning SUMO. A very good guide for learning SUMO.

License:GNU General Public License v3.0


Languages

Language:Python 99.0%Language:Perl 0.5%Language:JavaScript 0.4%Language:HTML 0.1%Language:CSS 0.1%