toruseo / UXsim

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

Allow different vehicle lengths / weights #142

Closed EwoutH closed 1 month ago

EwoutH commented 2 months ago

Currently, all vehicles have the same "length", or the same impact on the traffic flow/density. However, some vehicles are longer or smaller than others, and it would be interesting to allow.

I would propose a vehicle "scale" factor, which is 1.0 by default. If it's set smaller or larger on initialization, it has a larger or smaller impact on the traffic density. So a vehicle with scale=2.0 is basically equivalent to 2 vehicles, etc.

toruseo commented 2 months ago

This is also impossible for the current framework. And this may be against the macroscopic philosophy.

EwoutH commented 2 months ago

Okay, thanks for getting back, then I will model it outside UXsim (by generating more or less vehicles).

For some context: I'm modelling self driving cars, and one of the things I want to explore is what will happen is they are more or less efficient (in road use, reaction time, etc.).

toruseo commented 2 months ago

Since reaction time is a fixed global parameter in uxsim, it is not possible to directly model such AVs. But it may be reasonable to assume 1 vehicle in uxsim is actually 2 AVs that have 1/2 reaction time?

FYI: I will not able to work with uxsim for a while again