Você está na página 1de 6


Title 1. Introduction 2. Why Road Simulation 3. Abstract 4. Entity States 5. Input Specification 6. Design & Data Structure 7. Data Structure 8. Output Page No. 2 2 2 3 3 4 5 6

Road Simulation
Road Simulator has an important role in meeting future transport objectives, especially with today's ever increasing congestion on our road networks. It gives us the information about the traffic intensity on a section of road. This information can be used to improve traffic control, to measure the consequences of collisions, to avoid traffic jams, etc. Adaptive control of road space over time is the principal advantage of using Road Simulation System.

Why Road Simulation?

Imagine doing a real life experiment with city blocks and highway system which are emptied for that specific purpose for a day. That would be too costly and even with sufficient budget, such an experiment cannot ever be allowed for the amount of inconvenience it would cause to the people. The study of road and its traffic flow, therefore, has to be performed virtually, on computers as numerical simulation. It becomes crucial to build models of traffic flow that capture the characteristics of real traffic yet sufficiently simple to understand. Thus comes the idea of simulation of road, or for that matter, any transportation system. Road simulation is the simulation of roads with an intention to be able to better help plan, design and operate roads.

Design module consist of how the Event simulation works, it includes discrete event system, entities, resources, entity states, entry points, exit points. Entity:-An entity designates a single unit of traffic. Events:-An event is a happening that changes the state of the system. a) Entering in the system b) Changing the lane c) Leaving the system d) Signaling Entering the system: Entry of the entity through main entrance or secondary entrance will change the state of the system. Changing the lane: This event is triggered in cases where the traffic ahead of the vehicle in the current lane is more compared to the next lane. Lane change is done by checking

for a threshold value of the distance and speed, between the vehicle just ahead and behind of the vehicle in discussion in the next lane. Leaving the system: When an entity leaves the system, this event will change the state of the system. Signaling: Whenever the vehicle wants to change the lane or want to enter the main road from side tunnel then the vehicle would give the signal to other vehicle so that the other vehicle could stop and it could move on.

Resources: Total number of services that can be provided by the system depends on the number of resources present in the system. Here, it will represent traffic that can be handled by the road at a time. So higher resources available means higher traffic handling capacity of the road.

Entity states
Waiting state Entity is waiting for other traffic to clear for entering in the road Processing State Entity is on the road travelling towards its exit point. The system provides different entry and exit point from where entity can enter/exit the system .An entity can use any use any entry/exit point for the service. Each entry point maintaining the number of entity entered and left the system. Each entity posses its entry point, exit point, speed of the entity (blocks/unit time).

Input Specification
Random, dynamic generation of vehicles is done which then enter the road from various possible entry points. All vehicles that are entering the section of road being simulated will have the following attributes. Entity ID, Entity Type, Entry Time, Speed, Entry Point, Exit Point, Lane. 1) Entity ID: This ID will be helpful for the identification for the entity, all the data associated with entity can be retrieved using this unique. 2) Entity Type: This will define the particular entity such as car, truck etc .Entity type will be helpful in deciding the space required by the entity on the system (road). 3) Entry Time: This will be useful in the analysis of the system, it helps in finding the time spent by the entity. 4) Entry point: It represents the location where entity will enter.

5) Speed of the entity: Speed of the entity will be defined in terms of blocks covered by the entity in the unit time. 6) Maximum allowed speed: This is the upper bound on the speed of any entity, every entity allowed to have velocity less than or equal to this velocity. 7) Exit point: Each entity has a desired destination which is represented as exit point.

Design & Data Structure

(Sample Model of Road)

We are simulating traffic problem, here we maintaining the road with desired number of lanes. Road has x number of entry/exit with one main entry and exit. Road is divided into number of blocks and each entity has size of certain number blocks.


When an entity enters from the main entry, it check for the traffic in the lanes of the road on the basis of traffic, we enter the entity in lane with the least traffic.


When an entity enters from any secondary entry point then it will wait till the block corresponding to the entry point is not empty. Otherwise every entity entering from the secondary entry will enter in lane first only.


1) First we check the entity in front of the entity if the distance between two entities is greater
than some threshold value then we will accelerate the entity. Acceleration of the entity depends on the distance between the entity and the entity next to it, thus we define the acceleration in term of the distance between the entities. 2) If the relative speed between two entities (speed of entity in front of the entity in check speed of entity in check ) is positive ,then we will accelerate the speed of the entity in check, in this case acceleration will depend on the relative speed of the two entities.


If the relative speed between two entities (speed of entity in front of the entity in check speed of entity in check) is negative, and the distance between the entities is less than some threshold value then we will retard the speed, retardation will depend on the blocks between them.


1) If the entity is exiting from the main exit then it will leave from the same lane as it was entered in

2) If Entity Want To Exit From The Secondary Exit:-After each unit time we decrease the
attribute remaining distance of the entity by the speed of the entity, and if any entity travelling in any lane other than the lane 1 and it wants to exit from one of the secondary exits then it has to change lane to lane number one ,changing of the lane occurs when the remaining distance the entity is less than some threshold value. Thus when its remaining distance is less than equal to twice of the speed entity it will be in the lane first.

Data Structure
Each lane is representing as a list can be inserted at and deleted from any position. data structure in which entity

Insertions may be because of an entry from either of the Main/Secondary entrances (Entry Event) or because of Lane Change. Similarly, Deletions may be because of an Exit Event in which case the element is not present in any of the different data structures (since one for each lane) or may be deleted because of a Lane Change in which case the element is deleted from the corresponding data structure of the lane and inserted into the data structure of the target lane.

A vehicle is said to be being serviced if it is in any of the lists and is said to be serviced if it is deleted forever because of an Exit Event.

For the analysis of the system, we have to check many aspects of the system

1) Average speed of the entity:-As the speed of entity is increasing and decreasing, so we
will calculate the average speed of the entity. 2) Average number of entities present on the road:- This will show at any time number of the entities present on the road. 3) Average time spent by the entity:- This will represent the average time spent by the entity.