8

Implementation of hajj traffic model in virtual environment

Embed Size (px)

Citation preview

Implementation of Hajj Traffic Model in Virtual Environment

Setyawan Widyarto,1) Rohayanti Hassan , 2) Muhammad Shafie Abdul Latif 3) 1,2, 3)Faculty of Computer Science and Information System, Universiti Teknologi Malaysia, 81310 UTM Skudai,

Johor, Email: [email protected], [email protected], [email protected]

SummaryHajj Traffic model is basically a mathematical model for traffic simulation. In this paper we try to implement this model to simulate the motion of Hajj, one of the ritual implementation of Muslim done every year in Mecca. The objective of this study is to simulate a congestion event and propose the solution to overcome the catastrophe situation from happen. An understanding of the relation of concentration (density) and flow is the basis for describing the traffic. The flow concentration curve is called the fundamental diagram of the traffic or the equation of state of traffic theory. However, the result is very in initial state, in which we have been able to demonstrate the integration of traffic model and directive method for three person to move around in two layers of virtual building.KeywordsTraffic, macroscopic, microscopic models, congestion, directive methods

1.Introduction

The traffic simulation models can be categorized into macroscopic [1, 2, 3], microscopic traffic simulation models [4, 5] which include cellular automaton models [6, 7, 8, 9, 10, 11, 12], and mixtures of both [13].

The mathematical models will be differentiated into two main models i.e. a macroscopic model and a microscopic model. Klar et al. [14] have surveyed different types of mathematical models for vehicular traffic.

The macroscopic models treat agents as if they are dynamically flowing or continuous and base on equations for collective quantities. On the other hand in the microscopic model, each agent is described by its own equation(s) of motion. Therefore, the microscopic models are more stochastic than the macroscopic model.

2.Problem Statement

The motivation for this research is the traffic congestion problem and then discussing the remedial measures. In the respect of human flow, the congestion could be fatal disaster or catastrophic. In fact, it has been realized that many traffic problems can be resolved by influencing (controlling) traffic flow by using various traffic control measures. However, an excellence performance of the traffic will be only achieved when we are able to control the traffic. Before we manage to control the traffic we may need some simulation of control variables and to make a simulation we need a model. Therefore, knowing a traffic flow model is a must.

3.Traffic Control in Hajj as a Case Study

Congestion is defined as the state that incoming traffics exceeds the capacity of the path or lane. Whereas, congestion control is aimed to prevent degrading performance because of congestion using feedbacks and adequate responses for them, keep the throughput under the control.

Traffic congestion is the level at which transportation system performance is no longer acceptable due to traffic interference. High lane occupancy percentages indicate congested conditions. The scale to define traffic congestion based on lane occupancy would vary.

The Hajj will be studied from traffic view. Some main occasions that involve huge pilgrims and are vulnerable for fatal accidents are processions of Tawaf, Jamarat, Sa’i and any other massive flowing processions.

4.Approaches of Hajj Traffic Models and Their Characteristics

We categorize liquid and gas are both fluids. Iin contrast to solids, they lack the ability to resist deformation. A fluid cannot resist the deformation force, it moves, it flows under the action of the force. Its shape will change continuously as long as the force is applied, Figure 1.

Fig 1. Shearing force, F, acting on a 3d fluid element.

If a group of agents can be maintained to be uniformly moving, any models compliant to fluid or gas features have possibilities to be applied. During Hajj, a grouping agents of Tawaf procession who have no interest in approaching the Hajr Aswad, the Hijr Ismail, the Rukun Yamani or any other parts of the Ka’abah may encounter macroscopic model. Sa’i may be compliant to a model as if liquid flows in a canal

On the other hand, a solid can resist a deformation force while at rest, this force may cause some displacement but the solid does not continue to move indefinitely. During Hajj, an individual agent who has interest in being different behavior from the collective behavior shall be treated as a particle that has its own motion equation,

From features of both fluids and solids, models for Hajj are inspired. It is a challenge to model the Hajj processions. The model must not so simple that the model will be unreal. However, the model is also not too complicated to be applied.

4.1Macroscopic Models

The macroscopic models base on equations for collective quantities and treat agents as if they are dynamically flowing or continuous (streams of fluid without a beginning or end). So that, they are not suitable for capturing the discrete dynamics that may arise from the interaction of individual agents. Thus, the overall flow rate that is influenced by density and velocity becomes the main feature.

There are some important variables in this model. They are the average spatial density ρ(r; t) per lane (at place r and time t), the average velocity V (r; t), and maybe also the velocity variance Θ(r; t). Their simulation time and memory requirements mainly depend on the discretization Δr and Δt of space r and time t, but not on the number N of agents. Therefore, macroscopic traffic models are suitable for real-time traffic simulations. The quality and reliability

of the simulation results mainly depend on the correctness of the applied macroscopic equations and the choice of a suitable numerical integration method.

4.2Microscopic models

The microscopic model treat agents as if they independently move as an individual. Each agent is described by its own equation(s) of motion. This model strongly corresponds with the number N of simulated agents. In general, this model assumes uniform velocities for all agents Therefore, the individual characteristics of agents have big effect of group behavior, for example if an agent felt down. It happened in some cases of fatal The microscopic models are more stochastic than the macroscopic model.

In microscopic traffic models each agent is described by its own equation(s) of motion. Consequently, computer time and memory requirements of corresponding traffic simulations increase proportional to the number N of simulated agents. Therefore, this kind of models is mainly suitable for off-line traffic simulations.

For this reason, micro simulation models that allow bit-handling have been developed for the simulation of large freeways or freeway networks [6, 7]. However, although they reproduce the main effects of traffic flow, they are not very suitable for detailed predictions because of their coarse-grained description.

Therefore, some authors prefer macroscopic traffic models [24, 25, 26, 27, 28, 29].

4.3Directive Methods

We introduce directive method as a technique to convert action to motion animation. Collective behavior is an action generated from path planning algorithm. The result is a list of direction number to represent two orientations i.e. the new translation and a new rotation. The procedure below is used to map the list of directions into the actual move orientation in a 2D planar environment:

BeginFor every loop/frame displayed

if artificial actor starts to walknewTranslation = setLinearVelocity(direction_no);newRotation = setAngleOfRotation(direction_no);getNewTransformation(newTranslation,

newRotation);direction_no++;

end-ifend

end

The animation loop continues for every 20 milliseconds to generate the new frame. The new transformation occurs only when the agent starts to

walk. The setLinearVelocity( ) function is used to set the velocity at that particular time. This function will look up the direction/velocity conversion table (Table 1) and translate the direction number to velocity vector for the new translation. The setAngleOfRotation( ) function consequently sets the rotation for the whole body of the agent towards the direction of movement. Another look up table has been developed to synchronize the facing and the movement direction of the synthetic actor.

Table 1: The relation between rotation and velocity as well as direction number

Direction number

4.3.1.1.1.1.1Velocity value4.3.1.1.1.1.2Rotation value in °

0 North ( 0.0 , 0.0 , -0.5 ) π ↑1 North west ( -0.5 , 0.0 ,

-0.5 )π x -3/4

2 West ( -0.5 , 0.0 , 0.0 ) π x -1/2 ←3 South west ( -0.5 , 0.0 , 0.5 ) π x -1/34 South ( 0.0 , 0.0 , 0.5 ) 0 ↓5 South east ( 0.5 , 0.0 , 0.5 ) π x 1/36 East ( 0.5 , 0.0 , 0.0 ) π x 1/2 →7 North east ( 0.5 , 0.0 , -0.5 ) π x 3/48 Stop ( 0.0 , 0.0 , 0.0 ) 0 ↓

4.4Proposed System Architecture and Its Initial Implementation

A generic architecture for a system designer to produce our virtual environment simulation is proposed as seen in Figure.2. The main output from the system is a list of direction or a list of transformation for the movement of animated characters in virtual world by Path Planner based on user’s input. Path Planner is the path generator as a result from the merging of path finding and optimization algorithm.

On going development, a user is required to enter the coordinates of nodes to visit from the console. Nodes are referred as booths, rooms or point of interests in a virtual environment for animated character to visit. The nodes entered become an input to a path planner. In Hajj virtual environment, the list of nodes will be initially given based on real world. Tawaf is an example, it starts from Hajr Aswad corner, within unclockwise direction approaches the Kaabah, goes to Hijr Ismail, Golden water canal, Rukun Iraqi, Rukun Yamani, proceeds to Hajr Aswad, Multazam/the Door of Kaabah, and repeates seven times. Further development would be randomly generated crowd in Hajr Aswad, the Door of Kabaah, and Hijr Ismal If the crowds emerge, agents will avoid them.

Figure 2 - System Architecture of virtual environment

An algorithm used in path searching and optimization component can be altered to any other algorithm. In our development, we use A* algorithm as a search technique and Prim algorithm as an optimization method. Figure 3 shows the input console by the user. Figure 4 shows the exact locations of nodes to visit in virtual environment.

Figure 3 - User’s input console

Figure 4 - Nodes or locations to visit

Figure 5 shows the round motion of animated characters as the result of the user’s input. Based on the user’s input, node 1 at Level 1 was the first node to visit and path planner suggests that the path starts at Level 1, from node 1 to node 2, node 2 to node 4, node 4 to node 3 and finally proceeds to Exit 1. Animated character then will go up to Level 2 and move from Exit 2 and straightly to the nearest node which is node 3, later on continue from node 3 to node 1, node 1 to node 4 and finally end up from node 4 to node 2.

Console Path Planner

Simulation

User Optimization Algorithm

Search Algorithm

Figure 5. The round motion of animated characters

5.Research Development Overview and on Going Research Result

The result of proposed system architecture shows that the path generated is collision free with static obstacles. The algorithm runs in off-line process and has not been able to avoid a real time obstacle such as another animated characters or other moving object

The simulated outflow is well coordinated and regular, if the desired velocities v° = vp are normal. But for desired velocities above a certain velocity, that is, for people in a rush (Figure 6). However, when agents try to move faster can cause a smaller throughput.

It is actually not surprising that widening escape lanes can also occur jamming. It happens when some agents try to initiate their own path or their own motion equation. Consequently, agents get too close to each other, and then more agents move into the same and probably blocked direction. It is shown when a lane is widening, agents move faster but when the lane is narrowing a clogging happens (Figure 7).

Figure 6. Agents move regularly.

Figure 7. Agents move irregularly.

6.Conclusion

This paper has given overview of macroscopic and microscopic models for the flow and also given some results leading to the conclusion that ‘speeding’ will initiate congestion. The directive method as a technique to convert action to motion animation has been introduced. The generic architecture for a system designer to produce the virtual environment simulation has been proposed.

We would extend the project by developing the real lay out surrounding the Kaabah. In addition, we also on progress identify pilgrim’s requirements to ensure our generated path according their Islamic jurisprudence (mahzab).

Acknowledgments

We wish to acknowledge with gratitude the special communicating email with Tamas Vicsek one of the writers Simulating dynamical features of escape panic (Nature, Vol 407, 28 September 2000 |www.nature.com)

References[1] M. Cremer and A. D. May, ‘An Extended Traffic Model

for Freeway Control’ (Research Report UCB-ITS-RR-85-7, Institute of Transportation Studies, University of California, Berkeley), 1985

[2] R.D. Kühne and M.B. Rödiger. ‘Macroscopic simulation model for freeway traffic with jams and stop-start waves”. In B.L. Nelson, W.D. Kelton, and G.M. Clark, editors, Proceedings of the 1991 Winter Simulation Conference, page 762, 1991.

[3] B. S. Kerner and P. Konhäuser, “Cluster effect in initially homogeneous traffic flow”, Phys. Rev. E 48, 2335-2338 (1993).

[4] A. Alvarez, J. J. Brey, and J. M. Casado, “A simulation model for traffic flowwith passing,” Transportation Research B 24, 193-202 (1990).

[5] Rathi, A.K. and Santiago, A.J. "The new NETSIM simulation program,” Traff. Engng. Control, 31(5), pp 317-320, 1990

[6] M. Cremer and J. Ludwig. “A fast simulation model for traffic flow on the basis of boolean operations”,

Mathematics and Computers in Simulation, (28):297–303, 1986

[7] K. Nagel, A. Schleicher: “Microscopic Traffic Modeling on Parallel High Performance Computers,” Parallel Computing 20(1): 125-146 (1994)

[8] K. Nagel and S. Rasmussen, "Traffic at the edge of chaos," pages 222-235 in Proceedings of the Artificial Life IV meeting, edited by R. A. Brooks and P.Maes, MIT Press, 1994.

[9] K. Nagel and M. Schreckenberg. “Cellular automaton model for freeway traffic,” J. Physique I (France), 2:2221, 1992

[10] J. A. Cuesta, F. C. Martínez, J. M. Molera, and A. Sánchez, “Phase transitions in two-dimensional traffic-flow models,” Phys. Rev. E 48, R4175–R4178 1993

[11] T. Nagatani, “Jamming transition in the traffic-flow model with two-level crossings,” Phys. Rev. E 48, 3290 –3294, 1993.

[12] O. Biham, A. A. Middleton, and D. Levine, “Self-organization and a dynamical transition in traffic-flow models,” Phys. Rev. A 46, R6124 -R6127, 1992.

[13] R. Wiedemann and T. Schwerdtfeger, Straßenbau und Straßenverkehrstechnik (Bundesminister für Verkehr, Abteilung Straßenbau, Bonn, Germany), Vol. 500,. 1987

[14] A. Klar, R. Kuehne, and R. Wegener, “Mathematical models for vehicular traffic,” Surv. Math. Ind., 6, p. 215. 1996,

[15] http://www.umts-forum.org/ (last accessed: Thursday 29 | 04 | 2004)

[16] James Maxwell Buick, “Lattice Boltzmann Methods in Interfacial Wave Modelling” Ph D Thesis, the University of Edinburg, 1997.

[17] R. Wegener and A. Klar, “A kinetic model for vehicular traffic derived from a stochastic microscopic model,” Transport Theory and Statistical Physics, 25 (1996), p. 785.

[18] Serge P. Hoogendoorn and Piet H. L. Bovy, “Generic gas-kinetic traffic systems modeling with applications to vehicular traffic flow,” Transportation Research Part B: Methodological, Volume 35, Issue 4, Pages 317-336,. May 2001

[19] K. T. Waldeer, “The direct simulation Monte Carlo method applied to a Boltzmann-like vehicular traffic flow model,” Computer Physics Communications, Volume 156, Issue 1, Pages 1-12, 1 December-15 December 2003

[20] Helbing, D. “A Fluid Dynamic Model for the Movement of Pedestrians”. Complex Systems 6, 391-415, 1992.

[21] M. Günther, A. Klar and T. Materne R. Wegener, “An explicitly solvable kinetic model for vehicular traffic and associated macroscopic equations”, Mathematical and Computer Modelling Volume 35, Issues 5-6, Pages 591-606, 2002

[22] K. K. Leung, W. A. Massey and W. Whitt, “Traffic models for wireless communication networks,” IEEE J. Sel. Areas Commun. 12, 1353—1364, 1994.

[23] Helbing D, “ Gas-kinetic derivation of Navier-Stokes-like traffic equations,” Journal-ref: Physical Review E 53, 2366-2381, 1996.

[24] M. Papageorgiou, “Applications of Automatic Control Concepts to Traffic Flow Modeling and Control,” Springer, Heidelberg, Germany, 1983.

[25] S. A. Smulders,”Modelling and Simulation of Freeway Traffic Flow,” (Report OS-R8615, Centre for Mathematics and Computer Science, Amsterdam, 1986); in Proceedings of the 10th International Symposium on Transportation and Traffic Theory,ed. N. H. Gartner and N. H. M. Wilson (Elsevier, New York, 1987).

[26] D. Helbing,, “Improved fluid-dynamic model for vehicular traffic,”D. Phys. Rev. E 51, pp. 3164-3169, 1995.

[27] M. Hilliges and W. Weidlich, “A phenomenological model for dynamic traffic flow in networks,” Transportation Research B 29, 407-431, 1995.

[28] M. Hilliges, R. Reiner, and W. Weidlich, “A simulation model of dynamic traffic flow in networks,” in Proceedings of the 1993 European Modelling and Simulation Multiconference, pp.505-510 edited by A. Pave (Society for Computer Simulation International, Ghent, Belgium, 1993.

[29] B. S. Kerner and P. Konhäuser, “Structure and parameters of clusters in traffic flow,” Phys. Rev. E 50, 54 –83, 1994.

[30] Wolfram. S. “Universality and complexity in cellular automata,”. Physica D, 10:1-35, 1984.

[31] Nagel, K., "Particle Hopping Models and Traffic Flow Theory," Physical Review E,Vol.53, No. 5, pp. 4655-4672, 1996.

[32] M. Sipper, “Machine Nature: The Coming Age of Bio-Inspired Computing,” McGraw-Hill, New York, 2002

[33] M. Mitchell. “An Introduction to Genetic Algorithms,”. MIT Press, Cambridge, MA, 1996.

Setyawan Widyarto received the M.Sc. degrees in Manufacturing and Systems Engineering from the University of Bradford in 1998 and continued for advanced study in Automation and Control System Engineering, the University of Shefield till 2000. Now he is doing research for PhD in Computer Science and Information System, Universiti Teknologi MalaysiaRohayanti Hassan received the BSc, degree in Scinece (Computer Science) from Universiti Teknologi Malaysia in 2003. Now she is doing research for Masters degree in Computer Science and Information System, Universiti Teknologi Malaysia

Muhammad Shafie Abdul Latif received Diploma, BSc, and MSc degrees in Computer Science from Universiti Teknologi Malaysia in 1984, 1986 and 1995, respectively. PhD in Modelling, Simulation and Animation in Virtual

Environments (Bradford University, United Kingdom) February 2002