Yuan Wen
Yuan Wen

Reputation: 1711

SUMO sim time and real time difference

I used traci.simulation.getTime to get the current sim time of SUMO. However, this time runs faster than real time.

For example, when sim time grow from 0-100, real time just grow from 0-20.

How can I make SUMO simulation time be the same with real time?

I tried --step-length = 1, but this didn't work

Upvotes: 1

Views: 1319

Answers (1)

thardes2
thardes2

Reputation: 1186

The --step-length property is a value in seconds describing the length of one simulation step. If you put a higher number here vehicles have less time to react, but your simulation probably runs faster. For the real time issue you might have a look to the sumo-user mailinglist. I think the mail gives a pretty good answer to your issue:

the current limit to the real time factor is the speed of your computer. If you want to slow the GUI down you can change the delay value (which is measured in milliseconds) so a value of 100 would add 100ms to every simulation step (if you simulation is small and runs with the default step length of 1s this means factor 10). If you want to speed it up, run without GUI or buy a faster computer ;-).

To check how close your simulation is to wall clock time, you can check the generated output from SUMO. The thing you're looking for is called Real time factor

Upvotes: 1

Related Questions