eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

Change the right-of-way of vehicles at intersections #8626

Open Jianhua-Jiang opened 3 years ago

Jianhua-Jiang commented 3 years ago

Hello! I am trying to change the priority of left turning and straight driving at intersections by define the traffic as “g” or "G". The left turn traffic light phase is set to “G” and the opposite straight traffic light phase is set to “g". But straight cars don't give way to left turning cars. I don't know its reason. What should I do? Thanks!!!

namdre commented 3 years ago

Changing the right-of-way dynamically is currently not supported since parts of the intersection rules are hard-coded in the .net.xml file and cannot be changed at runtime. Your only remedy is to give a red light to the straight traffic for the duration where the left-turning traffic shall have priority.

If you want the left-turn to always have priority over the straight traffic then you can give higher priority to the turning road and set attribute 'rightOfWay' for the junction to 'edgePriority'.

namdre commented 2 years ago

a proposed solution for dynamic changing of right-of-way is outlined at #11737 All that is needed then is to build a symmetrical response matrix to ensure that the straight stream may respond to the left-turn stream.

This could be set at runtime if mutual green is loaded for conflicting links