sumo icon indicating copy to clipboard operation
sumo copied to clipboard

Why did the vehicles stop suddenly even though the light was green?

Open suruotong opened this issue 2 years ago • 15 comments

Hi, I encounter a weird phenomenon that the cars can not go through the intersection when the traffic light keep green, just as the picture below. And If I move the first car in the queue, the remaining cars can move normally. But at the same time, left-turning cars can move, cars in the middle and right lane cannot. I use the reinforcement learning for training, this situation happens about 4 or 5 times in 100 episodes. And the remaining episodes is active normally. How to sovle it? Thank you in advance! File( (the network, routes and config files) is in the attachment. sumo_rou.zip スクリーンショット 2023-11-15 232931 スクリーンショット 2023-11-15 232946

suruotong avatar Nov 15 '23 14:11 suruotong

I cannot reproduce it. Which SUMO version do you use? Do you use a random seed you didn't put into to the download files?

m-kro avatar Nov 15 '23 15:11 m-kro

I cannot reproduce it. Which SUMO version do you use? Do you use a random seed you didn't put into to the download files?

I'm sorry, I don't understand what you cannot being able to reproduce?The netfile or the phenomenon that I mentioned above?

suruotong avatar Nov 15 '23 15:11 suruotong

When I run the simulation, the cars leave the intersection as planned.

m-kro avatar Nov 15 '23 15:11 m-kro

When I run the simulation, the cars leave the intersection as planned.

I used random seed in my research. I will upload the whole file in about 12 hours!thank you for the reminder!

suruotong avatar Nov 15 '23 15:11 suruotong

When I run the simulation, the cars leave the intersection as planned.

I've observed that the issue of stopping occurs when the 'Show current route' of the frontmost vehicle in each of the four directions doesn't match its actual position. Interestingly, when I select the first vehicle in the waiting queue in any direction and click 'remove,' all vehicles resume normal movement. However, I'm unsure about the underlying relationship between these actions. 2 1

suruotong avatar Nov 16 '23 08:11 suruotong

This has nothing to do with it. Routes are edge-based and are displayed on the first lane (rightmost in righthand networks, leftmost in lefthand networks).

m-kro avatar Nov 16 '23 09:11 m-kro

@suruotong I won't run your complex RL system. Please give me a ready-to-use case where I can spot the problem. You do not seem to use any internal SUMO random seed features but you create the traffic demand depending on random numbers as well as issue TraCI commands. This means I'll need the scenario files where the problem happens as well as a log of the TraCI commands (see docs on how to generate these) from the same simulation run.

m-kro avatar Nov 16 '23 12:11 m-kro

@suruotong I won't run your complex RL system. Please give me a ready-to-use case where I can spot the problem. You do not seem to use any internal SUMO random seed features but you create the traffic demand depending on random numbers as well as issue TraCI commands. This means I'll need the scenario files where the problem happens as well as a log of the TraCI commands (see docs on how to generate these) from the same simulation run. Is that what you are referring to? I'm sorry I don't know much about traci logs. traci.zip

suruotong avatar Nov 16 '23 13:11 suruotong

@suruotong No. Please follow the link to read how to get one. You have to define a TraCI log file path inside the traci.start command. And please provide only the files of the simulation where the vehicles block the intersection.

m-kro avatar Nov 16 '23 14:11 m-kro

@m-kro Thank you very much for your explanation. Is this it? traci.zip

suruotong avatar Nov 17 '23 08:11 suruotong

Now I can reproduce it. Thank you.

m-kro avatar Nov 17 '23 09:11 m-kro

@suruotong I'm currently working on finding the problem origin and solving it. Additionally I have seen your GUI settings file includes the setting personQuality="5" which makes sumo-gui crash. Did you edit the file and especially this setting manually? I cannot remember we have ever had 5 different person drawing styles...

m-kro avatar Jan 13 '24 15:01 m-kro

The vehicles stopped because they waited for others from the orthogonal direction to clear the intersection. A practical solution would be to increase the intergreen time to give vehicles more time. Still sumo has a problem when multiple vehicles drive into the intersection and get blocked by others.

m-kro avatar Jan 16 '24 15:01 m-kro

@namdre Can you give some advice where to look in the code when it comes to blocked vehicles inside the intersection?

m-kro avatar Feb 13 '24 17:02 m-kro

  • using 'select foes' (vehicle context menu) + color-by-selection helps to spot cycles in the foe relationship
  • reacting to junction foes is handled in MSLink::getLeaderInfo and MSVehicle::isLeader. It helps to enable debugging macro DEBUG_PLAN_MOVE_LEADERINFO in MSVehicle and then selecting the vehicle being suspected of erroneous behaviour in the simulation.

namdre avatar Feb 15 '24 10:02 namdre

There is a circular foe relationship between each vehicle and the next one in clockwise order at time 580

namdre avatar Feb 23 '24 09:02 namdre

The source of the problem lies in invalid right-of-way rules encoded in the network. Rebuilding the network with netconvert version 1.19 or later should fix this. For reference, the change that causes the network difference is de55a6d2f70d37243a12ab48d660fe0af279b0fd (#13542)

namdre avatar Feb 23 '24 11:02 namdre