toruseo / UXsim

Vehicular traffic flow simulator in road network, written in pure Python
https://toruseo.jp/UXsim/docs/
MIT License
118 stars 56 forks source link

Question: direct link between time step size and platoon size #50

Closed EwoutH closed 5 months ago

EwoutH commented 5 months ago

I noticed that the time step size (DELTAT) is directly linked to the platoon size (DELTAN) through the reaction time (REACTION_TIME), as shown in the initialization DELTAT = REACTION_TIME * DELTAN.

I'm curious why this is modelled this way, could you clarify the rationale behind this direct linkage between time step size and platoon size?

toruseo commented 5 months ago

There is a theoretical reason. In this way, we can compute the exact solution of KW model (the underlying traffic flow model of UXsim) efficiently. In short, it eliminates numerical errors. If we use different setting, it will induce so-called numerical diffusion or instability.

If you want know the details, you need to read a paper: http://www.sciencedirect.com/science/article/pii/S0191261513000349

EwoutH commented 5 months ago

Thanks!

By the way, it might be useful if the Discussions tab could be enabled on this repository. Then users would have a place to discuss questions, configurations and new ideas, without adding noise here in the issues.

It can be enabled very easily, see Enabling GitHub Discussions on your repository.