Sie sind auf Seite 1von 10

A Reality Based Model for Simulation- Based Study of the Traffic Movement of a City

Subrata Nandi sn_nitdgp@yahoo.co.in

Virupaksha Kanjilal v.kanjilal@gmail.com

Kushal Lakhotia lakhotia.kushal@gmail.com

Department of Computer Science and Engineering, National Institute of Technology, Durgapur (Deemed University) PIN-713209, WB, INDIA

INTRODUCTION

There has been growing interest in urban mesh networks in recent times. A mobility model dictates how the users move within a given service area. We propose a mobility model that aims at finding out the optimal path from a source to a destination in a given city map. In this paper we simulate a city’s map and study the movement of the users in such a service area. The optimal path is found out with respect to the time taken to reach from the source to destination and not the distance traversed in the path so taken.

THE SERVICE AREA

We have intuitively considered a city map which is a mesh of highways and streets. We have taken ‘s’ sources and ‘d’ destinations (which are taken as input). Wherever

street/highway criss-crosses another street/highway it results in a node. The map we have taken in our simulation includes thirty-three nodes. A source or destination is nothing but a node. Each path (street/highway) has a given length (the unit being km). We consider nodes 11 and 30 as the sources and nodes 2 and 16 as the destinations in our simulations

(refer to Figure 1). The vehicles moving in the city have been considered as two-wheelers and four-wheelers. Any vehicle has a greater peak speed while moving in a highway than in a street. Again, a four-wheeler has a greater speed than a two-wheeler in both, highway and street. Thus the speed

a

Fig 1. A Sample city map (service area) used to generate routes using the proposed

Fig 1. A Sample city map (service area) used to generate routes using the proposed mobility model

varies according to both, the type of path taken and the vehicle. But it also depends on the current traffic density of the path (street/highway). Any street/highway has a maximum limit to the number of vehicles that can move through that street/highway, beyond which any vehicle will not be able to move at its peak speed through that street/highway. The speed of the vehicle decreases depending on the number of vehicles in excess of the maximum limit, in the street/highway. The speed decreases according to the following function:

THE MOBILITY MODEL

(a) TRIP GENERATION:

Various users start from their sources at various times of the day but the starting time of a particular user is the same everyday. Any user has two attributes – knowledge and confidence. Knowledge of a user is nothing but a route from her source to destination. A user following whose route it takes lesser time to reach the destination from the source, has a better knowledge. Confidence of a user is the reflection of the quality of knowledge she has. As and when her knowledge gets better (in terms of time taken), her confidence increases. The increase of confidence is not linear. It increases according to the following function:

Confidence = Confidence + (InteractionCount*InteractionCount)/(4*625)

InteractionCount = Number of successful interactions.

On the first day (i.e.,the first run) all users have zero knowledge and zero confidence,i.e., none of the users has any idea about which route to take to reach her destination. So all users take a path randomly. As a user reaches a node she looks for the path she should take, from her knowledge. If her knowledge is insufficient, she again takes a path randomly from that node. When she encounters another user in her way, she checks whether that user has a better knowledge than her. If yes, then she refreshes her knowledge and consequently her confidence also increases according to the function given by (B). In this way by interacting with other users, she reaches her destination following a route. It might also happen that she does not reach her destination on the first day. A day is simulated by running a nested loop consisting of three loops. The outer loop runs for 24 times, the loop within it runs for 60 times and the innermost loop also runs for 60 times. As the control comes out of the outermost loop it marks the end of one day (i.e., end of one run). The next day she starts her journey again following the route she knows. If she had not reached her destination on the previous day she starts her journey afresh with zero knowledge and zero confidence. Again she might encounter a user who has a better knowledge and thus her knowledge gets bettered and confidence gets increased. In this way, all users find the best possible route (in terms of time taken) from their respective sources to destinations. At the end of each day (i.e., each run) we find out the following parameters:

1. Average Time Taken

2. The number of users that have reached their destination

3. The time at which the last person reaches her destination.

.(b) MODIFICATION OF THE SERVICE AREA:

We have now obtained an environment where the users have sufficient knowledge. They can move from their respective sources to destinations in a desirable time. Now, if we remove a path (street or highway) between any two nodes, it will affect the movement of a user that path forms a segment of the the route taken by her. She will now have to look for an alternate path to reach her destination. Here, she again looks for a known path from her knowledge, which can be taken. If she cannot find one, she randomly takes a path and interacts with more knowledgeable users to refresh her knowledge so that a new and effective route to her destination is obtained. Thus when the service area is disturbed, the user can adapt to the change.

The trip is as follows:

Enter the total number of users as Max Accept the Initial nodes and final nodes in two lists

If( time is between 8:00 and 20:00)

{

/* The ‘day’ time*/

for( each user having serial number 0 – Max)

{

if( the user has started)

{

/* different users have different time of starting the time of staring are randomly allotted */

If( the user does not have a path in his

{

knowledge)

If(User is at a node waiting to go to another

node)

{

Get C = CurrentNode() Get D = DestinationNodeRandomly( C) Move( the user from C to D)

}

else

{

If(user has reached destination)

{

/* Make the necessary record and stop the user */

HasReachedDestination()

}

Else

{

Make the user interact with other users.

}

}

 

}

Else

{

/*THE SECOND CASE*/ /* If the user has a knowledge of the path */

 

If(User is at a node waiting to go to another node)

{

Get C = CurrentNode() Get D = DestinationNodefrom knowledge(C) Move( the user from C to D)

}

else

{

If(user has reached destination)

{

/* Make the necessary record and stop the user*/ HasReachedDestination()

}

else

{

Make the user interact with other users.

}

 

}

}

The user moves along the path by hopping from one node to another. The next node is calculated randomly if the user does not possess enough knowledge to complete the trip on his own, or the next node is looked up from the acquired knowledge. In both the cases the user is moved according to the following algorithm

Move(D)

{

/* d -> The destination node */ Get C = CurrentNode Get S = Speed(C, D) Get distance = GetDistance (C,D); Get capacity = GetCapacity(C,D); Get P = GetPeopleActuallyOnRoad(C,D);

/* Update the Counter variable which stores the seconds required to reach D from C */ Return D

}

On moving from one node to another the user cannot always go at his top speed. The user will be slowed down because of traffic on the road. Each road stretch has a traffic capacity. That maximum capacity (after which delay starts) depends on the type of road i.e., Highway has more capacity than streets. The delay as well as the total time is calculated as

GetTimeAndDelay(speed, distance, capacity, people_on_road)

{

 

Get counter = int (distance/speed * 60 * 60) Get time = (float)speed/distance get excess_car = people_on_road - capacity

if(excess_car <= 0) return counter

/* if there are excess car on the road then the delay increases */

Get a = 250/time;

Get

delay = (excess_car * excess_car)/ (4 * a );

counter = int (distance/speed * 60 * 60);

counter = counter + delay; return counter;

}

* 60); counter = counter + delay; return counter; } Fig 2. The delay curve (delay

Fig 2. The delay curve (delay with respect to traffic on road)

RESULTS AND DISCUSSIONS:

We observe that the simulation of the model yields results which are practically feasible. We take the average time taken by the users at the end of each run and observe that it decreases with each run. The number of users reaching the destination increases at the end of each run. And, the time at which the last user reaches the destination also earlier. Decreasing average time shows that with each successive day the users are able to follow better routes which are more time-efficient. Increasing number of users reaching their destination at the end of each day indicates that with each successive day more number of users are able to find out a route to their destinations. Again the last user reaching earlier

than the previous day shows that better routes (in terms of time) are being explored by the users moving in the city. After the termination of the simulation we obtain the following parameters for a particular source-destination pair:

1. Average time taken in moving from a particular source to a particular destination (time_avg)

2. The total number users moving from that source to destination and the number of users who have reached that destination from that source

3. The optimal route for the source-destination pair

4. Total time taken in the optimal route (time_opt)

5. The number of users using the optimal route

We observe that for each pair of source-destination the number of users moving from that source to destination and the number of users succeeding in reaching the destination is same,i.e., 100% users find a route from their source to destination. If we compare the total time taken in covering the optimal route and the average time for the users moving from the given source to given destination, we find that time_opt < time_avg which should also be the case from the practical point of view. The fraction of users taking the optimal path is observed to be varying. In some cases it is quite high while in others it is low. Finally, we

Average time take for 1Source-1Destination Vs No. of persons

3560 3540 3520 3500 3480 3460 3440 3420 3400 3380 3360 0 1000 2000 3000
3560
3540
3520
3500
3480
3460
3440
3420
3400
3380
3360
0
1000
2000
3000
Average time taken in
seconds

No. of persons

Fig 3

: In one source and o

ne destination, the source node was

node 11 and the destination was node 16.

observe the optimal route. I f we see the distance traver sed in following this route, it might not be the shortest. There might be a route which is shorter in terms of distance but our focus is time. Thus a route which a larger distance might take lesser time as other routes might be congested and the traffic movement in such routes is not smooth. A s a result the time taken in su ch routes becomes higher in spite of the fact that distance to be covered through such routes is shorter than the optimal route we’ve found.

Average time take for 1Source-2Destination Vs No. of persons

3550 3500 3450 3400 3350 3300 0 500 1000 1500 2000 2500 Average time taken
3550
3500
3450
3400
3350
3300
0
500
1000
1500
2000
2500
Average time taken
in seconds

No. of persons

Fig 4: In case of 1 source and two destinations, the source node remains 11 while the destination nodes are 2 and 16

Average time take for 2Source-2Destination Vs No. of persons

3850 3800 3750 3700 3650 3600 3550 3500 3450 3400 0 500 1000 1500 2000
3850
3800
3750
3700
3650
3600
3550
3500
3450
3400
0
500
1000
1500
2000
2500
Average time taken in
seconds

No. of persons

Fig 5. In case of two sources and two destinations, the source nodes are 30, 11 while the destination nodes are 2 and 16

A PPLICATION:

T raffic Monitering in a City:

Any person in a given city can be guided to her

destination if she is not aware of the route. Again if any road in the city is closed, the a lternate routes can also be found out. The model can also be utilized for dynamic solutions to any traffic problem in a city. Suppose a road is blocked during a particular time of the day, then any user can be guided to an alternate path for that period of time till normal cy

resumes. Again if we consider a particular road of a city which is one-way during particular times of the day, then any user who wishes to take such a road can be guided according to the time of the day at which she wants to take the road. The traffic guidance to the people of a city can thus be provided through an automated system. This will h elp save time and provide an efficient traffic guidance system.

S UMMARY AND CONCLUDING REMARKS

W e presented a mobility model with the details of trip generation and route generation, which works for any arbitrary service area layout. The pr oposed mobility model generates re alistic trips and trip routes. The model can be useful for extracting the user movement profiles, which are highly regular for majority of user as population increases exponentially. Trip routes can be summarized and used for better prediction of user location, which can reduce location management cost. This prediction can be useful in allocating resource (ex. bandwidth) for certain users who access real-time data requiring high QOS. The approach can be extended for use in pico-cellular environment. In pico-cell environment, details of street and highway layout are to be stored in the form of graphs i.e . the entire ser vice area is modeled in the form of two level graphs. The actual shortest path within a cell can be obtained using the Djikstra algorithm.