I would like to re-enter the vehicles in VEINS after leaving scenario

109 views Asked by At

After the simulation time the vehicles leave the simulation scenario. I would like to re-enter the same vehicles with same previous ID and information in VEINS after leaving scenario. Is there a way to re-use the same vehicle after it exits the scenario.

1

There are 1 answers

2
Rens van der Heijden On BEST ANSWER

You should not re-insert vehicles that have left the simulation, because this means you'd copy your entire vehicle to another location. This will make your VANET application behave incorrectly, because the same vehicle is suddenly in a different location.

If you're looking for more traffic, I would recommend switching to another SUMO scenario (this scenario is a lot bigger and also approximates real traffic).

Alternatively you could change your existing SUMO simulation directly, e.g., to increase the amount of vehicles that are inserted, or to change the behavior of the vehicles (by changing the SUMO input, i.e., erlangen.rou.xml in the example simulation that comes with VEINS).

If you want to keep the same vehicles for some reason, you probably want to reroute them to some other location, which you can do over TraCI (using this method).