I want to keep a constant number of cars in my (long) simulation (OMNeT + Veins). I do not care about mobility, so I could probably use the built-in function Veins * .manager.numVehicles = 100. The fact is that if I do not specify any (sufficient) vehicle flows (from SUMO), my simulation stop immediately (due to lack of events). Therefore, I create some threads (which most likely go out of the simulation), and Veins is populated for cars when they disappear.
Is there a more elegant way to do this? I would prefer to just use the numVehicles function, as it is simpler, and cars move minimally, so they remain in the simulation for a long time.
I need a stationary density of vehicles (the number of vehicles is fixed - even if old ones leave and new ones come in to replace them at the same instant).
Thanks Andreas
source
share