I wanted to simulate attack in VANET so I used SUMO and OMNETPP but in sumo when the car reaches the end of the path the car disappears, and i need it to stay in the map during the whole simulation, in order to complete specific attack in OLSR protocol. how can i keep the vehicles in the map during the whole simulation?
-
You can either simulate enough traffic in SUMO (s.t. your attack has enough time to be executed) or keep the node in the simulation artificially (but that could lead to weird effects with its' position). Simulating enough traffic is the easy approach; check out [Lara Codeca's luxembourg traffic scenario](https://github.com/lcodeca/LuSTScenario) – Rens van der Heijden Mar 09 '16 at 10:24
1 Answers
There are several ways of keeping vehicles longer in the network, SUMO even has a FAQ on a very related topic http://sumo.dlr.de/wiki/FAQ#How_do_I_maintain_a_constant_number_of_vehicles_in_the_net.3F
It mentions using rerouters which can be placed as additional elements in the network at the end of the route or adapting the routes of your vehicles using the randomTrips.py script with the --intermediate option to generate more via points your route. Both solutions will induce additional traffic and longer routes for your vehicle, I don't know whether it is desired.
Giving the vehicle a parking stop at the end of its route will not work because sumo removes it from the network then and it has no valid position any longer. So the only solution I see is to add a separate parking area / street where the vehicle can go and do a regular stop. So the steps are
- Edit your network, adding extra parking edges at all destinations with a virtual length of 10km
- Amend the routes of the vehicles to include the extra edge and a stop there

- 3,510
- 1
- 11
- 23