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.5k stars 1.41k forks source link

Vehicles do not move forward in the simulation #11350

Closed erev-84 closed 2 years ago

erev-84 commented 2 years ago

Hello,

Vehicles do not move forward in the simulation, they only turn to the right or left lanes. I tried to show this problem in the screen recording in the zip file I attached. What is the reason of this problem? and how can I fix this issue?

There are also network and trip files in the zip folder I attached.

Thanks in advance

Erol.zip

namdre commented 2 years ago

you are loading invalid routes. Note, that sumo-gui prints many warnings of the form

Warning: No connection between edge 'E8' and edge '-E8' found.
Warning: No route for vehicle 'passenger2' found.

The only reason why the simulation does not abort is because you are also setting option --ignore-route-errors but the consequence is then jamming and teleporting (a use case for that option is temporary road closing).

You can avoid this problem by setting randomTrips.py option --validate when generating your trips.

erev-84 commented 2 years ago

Hello,

Thank you very much my problem solved with the --validate option.

I have one more question. I generated 3600 passenger with the command below

python randomTrips.py -n test.net.xml --vehicle-class passenger --prefix passenger --trip-attributes="guiShape=\"passenger\"" -e 3600 --validate

but as shown in the screenshot below, only 2714 vehicles are loaded in the simulation. What is the reason for this? Shouldn't it be 3600 vehicles? and how can I reach the total number of 3600 vehicles?

image

image

namdre commented 2 years ago

invalid random trips are filtered out. As a workaround, you can generate a bit more traffic than needed to begin with. see #8843 and #https://sumo.dlr.de/docs/Tools/Trip.html#traffic_volume_arrival_rate

erev-84 commented 2 years ago

Hello

I tried the methods below (--insert-ratio & --period & --insert-density) but results are same on all the methods I tried.

I set the period to 1 and tried to generate 2000 vehicle but only 1515 vehicle loaded in the simultion as seen below. image

I set the insert-ratio to 10 and tried to generate 2000 vehicle but only 1515 vehicle loaded in the simultion as seen below. image

I set the insert-density to 10 and tried to generate 2000 vehicle but only 1515 vehicle loaded in the simultion as seen below. image

Is there have any way to get exact 2000 vehicle without generate more traffic because it is difficult to get exact 2000 vehicle by trying generate more traffic

namdre commented 2 years ago

the options are called --insertion-rate and --insertion-density rather than --insert-ratio and --insert-density (and due to a bug your misspelled option names do not trigger an error).

You can also use option -p 0.5 to generate more traffic. There is currently no way to generate exact trip counts for networks that are not fully connected. One way to ensure that all trips are valid would be to add turn-around connections at the outer ends of your network.

erev-84 commented 2 years ago

Hello @namdre

If I generate 4000 vehicles with -e 4000 and set the maximum number of vehicles to 2000 with -max-num-vehicles 2000, will I ensure that the number of vehicles is exactly 2000?

namdre commented 2 years ago

No. This will only ensure that the maximum number of vehicles at any given time during the simulation does not exceed 2000. You could still have more than 2000 vehicles run through the network after each other.