Sustainable vehicle density OMNeT ++ and Veins

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

+4
source share
1 answer

The autoShutdown parameter can be set to false to instruct the communication interface to continue working even if there are no more cars in the simulation. See https://github.com/sommer/veins/blob/veins-4.5/src/veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.ned#L55

0
source

Source: https://habr.com/ru/post/1676971/


All Articles