1

My project is to build a VANET-based smart parking simulation for a small-scale urban area. I dynamically define a route for vehicles to traverse to, then park for 'x' amount of time. Implementation for that is complete, the next step was to define a new exit route for them to exit the simulation after the 'x' amount of time is up. Reason being is that I want to simulate cars vacating parking spaces so that other vehicles may be able to avail of them (I don't want them to simply just to disappear upon reaching the end of their route)

So my question is, is it true that they just exit simulation after route is complete? Is it possible to avoid this?

wesleyfung
  • 100
  • 1
  • 7

1 Answers1

0

Veins uses SUMO to simulate vehicle mobility. After a SUMO vehicle reaches the end of its route, it is removed from the simulation. You can, however, use SUMO to simulate a vehicle that drives to an intermediate point, parks for a set duration, then starts driving to its final destination. Such a vehicle will simply be marked as stopped/parking and will remain in the simulation.

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • Thanks Christoph. Correct me if I'm wrong, but I'd like to add to this for those who stumble across this. Christoph's answer provides a clear and concise explanation, and it is likely the optimal solution. An alternative that I managed, is to save the road id of the parked vehicle and then re-insert it into the simulation through TraCIScenarioManager after '_x_' amount of time has elapsed. – wesleyfung Apr 30 '17 at 22:56
  • 1
    This should work nicely for your application. Note, though, that (as far as both simulators are concerned) the vehicle driving *to* the parking place and the vehicle driving *from* the parking place will be completely different vehicles. – Christoph Sommer May 01 '17 at 17:35