0
votes

I have needed an equally spaced vehicle flow. As per the documentation , vehicles should be equally spaced unless someone randomizes the flow. I didn't randomize the flow, but I am experiencing that the vehicles do not have the same headway.

Here is my rou.xml file entry, and I set sigma = 0 as well.

<flow id = "f1" color="1,1,1"  begin = "0" type="Car" vehsPerHour="1500" number="100" route="route0" departSpeed="13.9"> </flow>

I am seeing majority of the vehicles have a headway around 27m and some other vehicles around 40m. There is a pattern. The first 2 vehicles of every 5 vehicles travel together (with 27m heading), and other other 3 travel together (with 27m heading) but with 40m gap between 3rd and the 2nd (e.g. V represents a vehicle VVV*****VV*****VVV*****VV****VVV*****V**V) enter image description here I tried this as well.

<flow id = "f1" color="1,1,1"  begin = "0" type="Car" period="2.4" number="100" route="route0" departSpeed="13.9">  </flow>

But it is the same as the previous.

Is there a workaround for this?

Thanks!

1

1 Answers

0
votes

It is a discretization error. Assuming you run with the default step length of one second the vehicles will be emitted at whole seconds only. To avoid this use only multiples of the step length as period (so either using a period of 2 or 3 or reducing the step length to 0.2 should help in your example). There is also a ticket concerning this topic: https://github.com/eclipse/sumo/issues/4277.