wiki:PTVS_Tech

Version 3 (modified by sinziana.mazilu, 14 years ago) (diff)

--

<< Home

Overview of VNSim - the VANET simulator

VNSim is a discrete event simulator meaning that the simulation time advances with a fixed time resolution after executing the simulator code for the current moment of time. The VANET application consists of an event queue which can hold 4 types of events: Send, Receive, GPS and Cleanup.

A Send event for a specified node triggers the calling of the node’s procedure responsible for preparing a message. That send event is then inserted into the Event Queue. The Engine of the simulator checks this Event Queue at a regular fixed amount of time, and for any Send Event found it creates one Receive Event (if the Send Event is Unicast) or several Receive Events for everyone of the nodes which are in the wireless range of the sender. When a Receive Event is created first the Engine checks to see if there is another Receive Event corresponding to the same Receiver for the current simulation time, and if it is, it adds this Receive Event to the receiver’s event list. This makes it easier when the Receiver simulates the receive procedure of an Event, it has to check its Receive Event list and chooses one according to a receive power threshold and interference level.

The GPS Event is scheduled at a regular time interval for each node thus accurately simulating the way a real VANET application collects GPS data periodically. The mobility module updates periodically the position of each vehicle-node according to the vehicular mobility model. This model takes into consideration vehicle interactions, traffic rules and various driver behaviors.

The network model takes into consideration the position and the wireless range of the vehicles, medium access and the propagation model of radio waves according to the Two Ray Ground model. The Simulator delivers a message to all the receiving nodes in the wireless range using an optimized local search thru the nodes. This is possible due to indexing the map point locations of the nodes with a PeanoKey? mechanism which scans the geographical area around a node.

For a more accurate network model, the node’s protocol stack is taken into account and thus the simulator can have the packet encapsulation process by adding the corresponding headers to the message. The transport layer is UDP, and the IP network layer is replaced by a geographical routing and addressing scheme. The MAC layer is the one in 802.11b.

Structure

The events queue can hold three types of events: send, receive or GPS. A send event for a specified node triggers the calling of the node’s procedure responsible for preparing a message. It also schedules the corresponding receive event(s) for the receiver(s) the simulator decides to deliver the message to, according to the network module. The receive event is associated either with a node, or with a group of nodes (broadcast) and it calls the appropriate handler in each of the receiving nodes. The GPS event is scheduled at a regular time interval for each node, in order to simulate the way a real VANET application collects GPS data periodically. Besides these three types of events, the mobility module updates periodically the position of each node that is a vehicle, according to the vehicular mobility model. This model takes into account vehicle interactions (passing by, car following patterns etc), traffic rules and various driver behavior.

The main advantage of this architecture is that the simulator can execute (or emulate) the real application’s code without significant changes. Practically, we have succeeded to simulate the TrafficView? application [1] on each node, by calling the appropriate methods of the application when the corresponding events occur. Some minor changes were in order, because the original application was multithreaded which would be a serious limitation for the simulator. Figure 1 shows the top-down view of this simulation environment.