Computer Science Project Topics

Generic Animation Tool for Traffic Simulation

Generic Animation Tool for Traffic Simulation

Generic Animation Tool for Traffic Simulation

Chapter One

OBJECTIVE OF THE STUDY

This project aims to design an animation/visualization tool for road traffic simulation, that is independent, generic (that is, can visualize output data from any traffic simulator), and has a realistic feel of traffic observation, as we will incorporate Google Maps in its dynamic form; the user only needs to pan to the road being observed on the map. The data source for this visualization will be XML based, as XML files can be efficiently read, exchanged and their format defined in a standardized way using XML schema.

CHAPTER TWO

LITERATURE REVIEW

INTRODUCTION TO TRAFFIC M & S

Eighty years ago, Bruce Greenshields presented the first traffic flow model at the Annual Meeting of the Highway Research Board. Since then, many models and simulation tools have been developed. Traffic flow models have been applied for almost a century to describe, simulate and predict traffic. The first model, by Greenshields, showed a relation between the distance between vehicles and their speed. Later, dynamics were included in the models and models were applied for predictions. Now, traffic flow simulation tools were used for long- term planning as well as for short-term predictions based on actual traffic data, dynamic traffic management, evacuation planning, to mention a few of its uses and benefits (TRC, 2015).

Figure 2.1 shows the historical development of traffic flow models as a model tree. From this diagram, it is observed that all traffic flow models have one common root: the fundamental relation (or fundamental diagram – FD). The other three families consist of the microscopic, mesoscopic and macroscopic models. After the introduction of the fundamental relation in  the 1930s, microscopic and macroscopic models were introduced simultaneously in the 1950s. Mesoscopic models are about a decade younger. Microscopic models distinguish and trace the behaviour of each individual vehicle while macroscopic models aggregate vehicles and traffic and they are usually described as a continuum. Mesoscopic models are categorized in between microscopic and macroscopic models as their (mesoscopic) aggregation level is between both (micro- and macroscopic models).

Traffic modelling theories seek to describe in a precise mathematical way the interactions between vehicles and their operators (the mobile components) and the infrastructure (the immobile components). The infrastructure consists of the road network and all its operational elements like control devices, signs and markings.

In the figure below, grey lines indicate descent; black dots indicate publications; black lines indicate that the model has (or multiple very similar models have) been published multiple times (Kessels, 2013). (Most labels are omitted for readability).

Digital computer programs to simulate traffic flow have been developed from 1950 onwards. Early simulation model developers of this period had to deal with an adverse computing environment. Not only were computers in limited supply and computer time very costly, but software developers also had to deal with severe computer storage and programming constraints. While the limited availability of computing equipment restricted the development of simulation software in the 1950s, theoretical developments were taking place which would profoundly promote the development and use of traffic simulation in the future. Pioneers involved in the emergence of transportation engineering in this decade include:

  • John Glen Wardrop, an English Mathematician and transport analyst, who in 1952 articulated principles that have been widely used to simplify the mathematics associated with routing in traffic models (www.wisdot.info). His equilibrium laws form the basis for traffic assignment and the present application of simulation-based network modelling (TRC,2014).
  • Sir Michael James Lighthill (a British applied mathematician) and Gerald B. Whitham (an American applied mathematician) developed together the fluid flow analogies of traffic flow in 1955 – comparing traffic flow on long crowded roads with the flood movements in long rivers. A year later, P.I. Richards complemented the idea with the introduction of “shock-waves on the highway” in 1956, thereby completing the so- called LWR model. This LWR theory forms the basis for most macroscopic simulation models (Wikipedia, TRC2014).
  • E. Chandler, Robert Herman and E.W. Montroll put forward, in 1958, the first prototype of a car-following model which led to the GHR model/formula by D.C. Gazis, Robert Herman and R.W. Rothery in the late 1950s and early 1960s. The car- following model forms the core of microscopic simulation models (Brackstone et al., 1998).

Traffic simulations were first developed, independently, by different countries, and often to investigate a small problem domain. The first simulations were developed on large government and university mainframe computers. Recent simulations are a combination of the work of many earlier simulations from many countries and therefore often cover a much wider problem domain (Fotherby, 2002). The increasing power of computers and computing technology enabled simulations to begin to incorporate animation techniques. This innovation allowed viewing the overall performance of a traffic system design while providing an excellent means of communicating the result patterns to officials, decision makers and the general public.

GRAPHICAL TRAFFIC SIMULATIONS

Simulation and visualization are naturally connected. A simulation advances the state of a modelled system through time while visualization provides an abstract visual rendering of the state of that system at any point in time. Visualization offers one of the most promising means to convey information from a simulation model to decision makers in a meaningful way. In recent times, as outlined by Charles Macal, simulation and visualization can be viewed as encompassing four broad areas of research activity (Charles, 2001).

  • Animation (2D/3D) generated from the simulation: Animations are run as post- processors to simulations to depict the simulation results. The animations can be created with varying degrees of sophistication and degrees of realism. Important design decisions regarding an animation include the type and detail of information transferred from the simulation, and the benefits obtained relative to the cost of constructing the animation. The user is not able to interact with the simulation through the
  • Visual Interactive Simulation (VIS): In this case, the user interacts with all phases of the simulation through a visual interface. VIS is a simulation method that lets decision makers see what the model is doing and how it interacts with the decisions made, as they are made. VIS uses animated computer graphics display to present the impact of different decisions. It differs from regular graphics in that the user can adjust the decision-making process and see the results of the
  • Graphical interfaces for building simulation models: Visual languages have been developed along with systems for creating visual primitives for selected domains. These visual tools are expressive enough to be used to assemble complete simulation models and to specify alternative simulation runs. They use a high-level graphical representation formalism based on the activity-cycle diagrams to define simulation models in an interactive mode.
  • Immersive simulation and virtual simulation environment: Virtual reality refers to a set of techniques in which one interacts with a synthetic (“virtual”) environment that exists solely in the computer. In the typical conception of virtual reality,the representation of the synthetic environment is fed fairly directly to the eyes, ears and possibly hands. A variant of virtual reality is often called “Visualization”, which involves presentation of 3D structures (such as road structures and buildings) in ways that maximize learning and understanding of the simulation.

One of the best ways for non-technical users to understand the results of a traffic simulation is to actually view the simulation traces. To achieve this, graphical representation of the traffic simulation is a good method to examine what exactly happened on the road and at what periods in time it happened. Just as the advent of traffic simulation has been researched and simulators developed over the years, with improvements being implemented for each new version or package, so also the visualization part of it has witnessed tremendous growth. Graphical presentation of simulation appeared in the late 1960s (Matti, 1999) (see Figure 2.2).

In recent times, most simulation packages now include different graphical front ends; some packages exist which include a non-graphical simulation that only produces output files and statistics by which the events within the traffic network can be measured or determined.

 

CHAPTER THREE

DESIGN METHODOLOGY

OVERVIEW

As mentioned in the previous chapter, the main objective of this project is to design an animation tool to visualize traffic simulation traces/result on Google Maps. Google Maps is a web-based service that provides detailed information about geographical regions and sites around the world. In this chapter, we discuss in detail the concept of our design methodology.

DESIGN CONCEPT

 

For our animation software, we propose to develop a desktop application that implements a web-based user interface. This is because our software should accept input and provide output by generating a Google Map location. This output will be transmitted via the internet and viewed by the user using a web browser program. To achieve this, the application will be designed with JavaFx, which will include an html file. Also, we will need an XML file that will store the trace data obtained from the traffic simulation. Fig. 3.2 shows the package diagram depicting the relationship between these components. Also, we will elaborate, briefly, on these components so as to give an idea on why we want to use them to achieve our goal.

SOFTWARE COMPONENTS

JavaFX: JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. It has a user interface component, the JavaFX embedded browser, which provides a web viewer and full browsing functionality through its API. The embedded browser enables you to perform the following tasks in your JavaFX applications:

  • Render HTML content from local and remote URLs
  • Obtain web history
  • Execute JavaScript commands
  • Perform upcalls from JavaScript to JavaFX
  • Manage web pop-up windows
  • Apply effects to the embedded

The WebView and the WebEngine are classes from the javafx.scene.web package. The WebView is an extension of the Node class. It encapsulates a WebEngine object,  incorporates HTML content into an application’s scene and provides properties and methods to apply effects and transformations. The WebEngine on the other hand is a non-visual object capable of managing one web page at a time. It supports user interaction such as navigating links and submitting HTML forms, although it does not interact with users directly. The WebEngine class handles one web page at a time. It supports the basic browsing features of loading HTML content and accessing the DOM (Document Object Model) as well as executing JavaScript commands.

CHAPTER FOUR

IMPLEMENTATION AND TESTING

 INTRODUCTION

In this section, we will look at each component discussed in the previous chapter and translate them to their specific code formats. We will also mention/explain the functionalities of some fundamental elements of the component where necessary.

As mentioned in the previous chapter, our application will be designed with JavaFx. The Java IDE used is NetBeans IDE 8.1. Our source package will comprise of the java file that renders the GUI, the html code, containing scripts (JavaScript) that transmits the browser (Google Map), and an XML file used for specifying and storing the data that will be used for the visualization of the traffic simulation.

CHAPTER FIVE

GENERAL CONCLUSION

 OBSERVATION

As we conclude our work, we can say that we were able to achieve our aim to a large extent because we were able to achieve dynamic interactions with the Google Map via its API. For what it is worth, the difficulty of building a target road from scratch with an editor was tremendously reduced. This sets/adds to the framework of knowledge in designing/developing a traffic animation tool which developers can use and build upon to achieve a state of the art design.

ASSUMPTIONS AND LIMITATIONS

Due to the constraint for delivery time that we had to design this application, we made certain assumptions to enable us realize the workability of the idea we had in mind. After our realization, we could not give enough time to implement other algorithms that govern road traffic movement. One of such notable assumptions that we made was the speed of the car.

We assumed that the vehicles were moving at the same speed and that vehicles were generated to enter the road at a fixed time interval. By doing so, we were able to display an animation that seemed to comply with the car-following and gap acceptance algorithm of traffic simulations. Although we tried to define different times at which the cars are generated and a different speed for each car that enters the road by increasing/decreasing the animation time it will take the car to get to its destination (since speed is distance/time), we could not come up with a solution that will ensure that the car following will reduce its speed when it is close enough to the car in front of it, even when we tried to use a delay function to check to see if the car will wait when it is close to the leading car. Rather, when the car behind approaches the one in front of it, it goes over the car in a bid to overtake it.

One other limitation we had was that we could not implement the lane-changing algorithm. This is peculiar to the second approach of our design. We realize that when the Directions Service calculates and returns the route, it returns a route that is centred on the road, not giving room for having separate lanes. Also, due to the dynamic style we adopted for this approach, we could not get two cars to enter road at the same time, side by side – one will be on top of the other

FUTURE WORK

Research can go into the limitations we outlined above to see how the issue of dynamic car- following, gap acceptance and lane changing can be solved. One other solution to consider is how to incorporate traffic light phases in the design to give an extended realistic feel, especially in the second approach of our work.

REFERENCES

  • (Barcelo, 2010) Fundamentals of Traffic Simulation, Springer Book, edited by James Barcelo, Preface page (pp vii) & pp 273
  • (Payne, 1979) Payne Harold, 1979. FREFLO, A Macroscopic Simulation Model of Freeway Traffic
  • (Messmer et al, 1990-9) Messmer A. & Papageorgiou M., (1990-9). METANET: A Macroscopic Simulation Program for Motorway Networks, pp 466-470
  • (Shekar et al, 1997) Shekar S., C.T. Lu, R. Liu, & C. Zhou, University of Minnesota, (1999).
  • CubeView: A System for Traffic Data Visualization, page 1 https://sourceforge.net/projects/transims-metro
  • (Wenger et al, 2013) Wenger A., & Matthew F., (2013). 3D Visualization for microscopic traffic data sources, pp. 81
  • (Sharon et al, 2001) Sharon A.B. & Lei Y. (2001). An Evaluation of Traffic Simulation Models for Supporting ITS Development, pp 21-24.
  • (Matthew et al, 2007) Matthew B., Kathy D., David K., Kevin M., Euneka R., Duane W., Adam S., John M., & Mark H., (2007). A Guide to Documenting VISSIM-Based Microscopic Traffic Simulation Models, pp 12.
  • (TRC, 2015) Transportation Research Circular, 2014. Traffic and Transportation Simulation, Looking Back and Looking Ahead, Traffic Flow Theory 50th Anniversary, pp 9, 12.
  • (Kessels, 2013) Femke Van Wageningen-Kessels (2013). Multi-Class Continuum Traffic Flow Models: Analysis and Simulation Methods, pp 44.
  • www.wisdot.info
  • https://en.wikipedia.org/wiki/James_Lighthill, accessed 13th April, 2016 https://en.wikipedia.org/wiki/Macroscopic_Traffic, accessed 13th April, 2016 (Brackstone et al, 1998) Brackstone M., & McDonald M. (1998). Car-Following: A
  • Historical Review, pp 182.
  • (Fotherby, 2002) Thomas Fotherby (2002). Visual Traffic Simulation, an MEng Thesis Report, pp 17.
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!