Autonomic road and traffic management system

AUTONOMIC ROAD AND TRAFFIC MANAGEMENT SYSTEM

Abstract

This project deals with the traffic management. Traffic management is a challenging task in many countries in the world. This is needed to regulate the traffic so that lot of fuel and time can be saved. But achieving this needs a systematic approach. The main functionalities that are to be achieved are

1. Find the shortest route between the two places when the source and destination is given.

2. This system shows whether the traffic is full in that routes

My project addresses these two techniques

1. Dijkstra Shortest path Algorithm.

This is popular algorithm used by the industrial experts in finding shortest path between any two nodes in a graph. I am using this technique for finding the shortest distance between two places in a map. Moreover, every path is provided with a number of vehicles traveling capacity at any given instant time. This application deals with that aspect also.

2. Global Positioning System (GPS)

This is one more emerging technologies in the world to monitor the required object that is present on the earth with the help of a satellite from space. By using this global Positioning System, it is possible to find out where the specified vehicle once a route is assigned to a route. If the vehicle stated from the source place and traveling in a route then the vehicle can be monitored in two different ways. One is by fixing a unit into the vehicle so that the vehicle is tracked by the satellite. The second one to count the number of vehicles passed through a particular point in a route a road side unit is also placed. With the help of these two techniques it is possible to monitor the vehicles in a specific route. If any route is overcrowded then it is possible to suggest another route to the customers.

Introduction

Objective:

In this project we will discuss about road traffic management. Here we can find shortest path. Based on the distance and the given parameter we can find the shortest path using shortest path algorithm. Based on every path the number of vehicles will be allocated. Compare to Input vehicle count the allocated vehicle count will less then remaining vehicles will be in traffic.

Existing System:

Current system is not sufficient for allocate vehicles to particular road to maintain traffic. It won't have a proper solution to identify the real theme of road traffic.

Since there is no proper system to control the traffic in particular route the Problems are faced with the existing system.

  1. Since there are no guidelines to know the shortest path to reach a specified destination the vehicles travel as they like.
  2. The consumption of fuel will be more
  3. The consumption of time is more
  4. Since there is no monitoring on the road traffic some of the routes are overcrowded and some of the routes are absolutely without any traffic.
  5. There may be a chance of traffic jam by thinking some route is shortest and every vehicle travels through the same route since there is no chance to know how many vehicles are currently traveling through a particular route.
  6. There may be having accidents more due to more vehicles travel through the same route.

Proposed System:

Proposed system will give us proper solution to solve the above mentioned problems. Here we are using shortest path algorithm to find the short root. Using java we can shows the simulations result to show our performances.

The proposed system is addressing all the above mentioned problems as follows.

1. It uses the Dijkstra Shortest path Algorithm to find out the shortest path between two given places. So the vehicle user can see this information and the vehicle can travel through the shortest route to save fuel as well as time.

2. This algorithm not only gives the shortest path but also provided all the other available paths between any given two places. This helps in selecting an alternate next shortest available route between any two given places in case of the overcrowding of the shortest route with many vehicles. This avoids traffic jam, accidents etc.

3. It is provided with the monitoring technique so that how many vehicles started at the given source place and how many vehicles reached at the specified destination. If the vehicle not yet reached the destination that indicates the vehicle is traveling in the specified route. This helps in how many vehicle are currently traveling through a given route. Every route is given a maximum capacity of how vehicles can be traveled. So by comparing the maximum capacity with the current capacity it is possible to give status information to the vehicles so that they can select an appropriate route to reach the destination in a economical way as well as short time. This can be achieved only by sing Global positioning system (GPS). Here in my application I used only a simulation technique to implement this aspect through java programming.

Scope of the Project:

The traffic management system project deals with the finding the shortest route between two given places, all available routes between any two given places and also give the total number of vehicles are traveling in a particular selected route. This project is totally implemented in a simulated manner only.

Targeted Users of the project:

This project can be used both by the Traffic control authority of the local governing body and individual vehicle drivers who are passing through that route. The governing body of the traffic control system can use this for many more purposes than the usages specified in this project.

Technology study for the project

In order to implement this project I studied many technologies related to the shortest path finding algorithms. But at last I found Dijkstra shortest path finding algorithm is more suitable to find out the shortest path. More over this algorithm can be implemented with various data structures such as arrays, Linked lists, trees in various languages such as c, c++, c#, java etc. But I found java is more suitable language to simulate this algorithm by using networking concept than using the regular data structures such as arrays, stacks, queues, linked lists and trees. In this technique, each place is represented as a port in a network and the distance can be represented in vector and finally the shortest path can be found with network communication by using Dijkstra shortest path finding algorithm using java networks. The other important issues are tracking the vehicle in the route. Generally finding a vehicle in this way is difficult in the standard data structures techniques. But here since I used java networking concepts it is possible to find out whether a particular vehicle started at a particular place in the form of a network signal initiation and on the other end that is destination we can observe the arrival of the vehicle as a signal reception on the other port in the java network. In ordinary data structures such as trees, linked lists finding this kind of information by standard list traversing or tree traversing techniques are very much complicated which leads to the complex implementation of Route finding and status of a specific route.

System Analysis

Overview:

The first step in developing anything is to state the requirements. This applies just as much to leading edge research as to simple programs and to personal programs, as well as to large team efforts. Being vague about your objective only postpones decisions to a later stage where changes are much more costly.

The problem statement should state what is to be done and not how it is to be done. It should be a statement of needs, not a proposal for a solution. A user manual for the desired system is a good problem statement. The requestor should indicate which features are mandatory and which are optional, to avoid overly constraining design decisions. The requestor should avoid describing system internals, as this restricts implementation flexibility. Performance specifications and protocols for interaction with external systems are legitimate requirements. Software engineering standards, such as modular construction, design for testability, and provision for future extensions, are also proper.

Many problems statements, from individuals, companies, and government agencies, mixture requirements with design decisions. There may sometimes be a compelling reason to require a particular computer or language; there is rarely justification to specify the use of a particular algorithm. The analyst must separate the true requirements from design and implementation decisions disguised as requirements. The analyst should challenge such pseudo requirements, as they restrict flexibility. There may be politics or organizational reasons for the pseudo requirements, but at least the analyst should recognize that these externally imposed design decisions are not essential features of the problem domain.

A problem statement may have more or less detail. A requirement for a conventional product, such as a payroll program or a billing system, may have considerable detail. A requirement for a research effort in a new area may lack many details, but presumably the research has some objective, which should be clearly stated.

Most problem statements are ambiguous, incomplete, or even inconsistent. Some requirements are just plain wrong. Some requirements, although precisely stated, have unpleasant consequences on the system behavior or impose unreasonable implementation costs. Some requirements seem reasonable at first but do not work out as well as the request or thought. The problem statement is just a starting point for understanding the problem, not an immutable document. The purpose of the subsequent analysis is to fully understand the problem and its implications. There is no reasons to expect that a problem statement prepared without a fully analysis will be correct.

The analyst must work with the requestor to refine the requirements so they represent the requestor's true intent. This involves challenging the requirements and probing for missing information. The psychological, organizational, and political considerations of doing this are beyond the scope of this book, except for the following piece of advice: If you do exactly what the customer asked for, but the result does not meet the customer's real needs, you will probably be blamed anyway.

Modules:

  1. Neighbor Discovery
  2. Route Discovery
  3. Shortest Route Finding
  4. Sending Vehicles

Modules Description:

Neighbor Discovery

This module is used to finding the nearest road from my position. It is finding nearest road based on the distance of each road. My neighbor roads are directly reachable.

Route Discovery

Route discovery follows the route request procedure used by on-demand routing protocols, with several differences. Using this module we are requesting to our neighbor place to find out the destination route. So every place respond to requested place.

Shortest Route Finding

After the route discovery process we have available paths from that we are going to find the shortest path based on length of paths. Dijksta Algorithm used to find the shortest path.

Description of Dijksta Algorithm

Suppose you want to find the shortest path between two intersections on a map, a starting point and a destination. To accomplish this, you could highlight the streets (tracing the streets with a marker) in a certain order, until you have a route highlighted from the starting point to the destination. The order is conceptually simple: at each iteration, create a set of intersections consisting of everyunmarkedintersection that is directly connected to amarkedintersection, this will be your set ofconsidered intersections. From that set of considered intersections, find the closest intersection to the destination (this is the "greedy" part, as described above) and highlight it and mark that street to that intersection, draw an arrow with the direction, then repeat. In each stage mark just one new intersection. When you get to the destination, follow the arrows backwards. There will be only one path back against the arrows, the shortest one.

Sending Vehicles

After finalize the shortest path we need to travel to reach the destination. This module will show the simulation result how your vehicle traversed through the shortest path.

Feasibility Report

Introduction:

A feasibility study is a high-level capsule version of the entire System analysis and Design Process. The study begins by classifying the problem definition. Feasibility is to determine if it's worth doing. Once an acceptance problem definition has been generated, the analyst develops a logical model of the system. A search for alternatives is analyzed carefully. There are 3 parts in feasibility study.

Technical Feasibility:

Evaluating the technical feasibility is the trickiest part of a feasibility study. This is because, at this point in time, not too many detailed design of the system, making it difficult to access issues like performance, costs on (on account of the kind of technology to be deployed) etc. A number of issues have to be considered while doing a technical analysis. Understand the different technologies involved in the proposed system before commencing the project we have to be very clear about what are the technologies that are to be required for the development of the new system.

Operational Feasibility:

Proposed project is beneficial only if it can be turned into information systems that will meet the organizations operating requirements. Simply stated, this test of feasibility asks if the system will work when it is developed and installed. Are there major barriers to Implementation? Here are questions that will help test the operational feasibility of a project:

Is there sufficient support for the project from management from users? If the current system is well liked and used to the extent that persons will not be able to see reasons for change, there may be resistance.

Are the current business methods acceptable to the user? If they are not, Users may welcome a change that will bring about a more operational and useful systems.

Have the user been involved in the planning and development of the project?

Early involvement reduces the chances of resistance to the system and in general increases the likelihood of successful project.

Since the proposed system was to help reduce the hardships encountered. In the existing manual system, the new system was considered to be operational feasible.

Economic Feasibility:

Economic feasibility attempts 2 weigh the costs of developing and implementing a new system, against the benefits that would accrue from having the new system in place. This feasibility study gives the top management the economic justification for the new system. A simple economic analysis which gives the actual comparison of costs and benefits are much more meaningful in this case. In addition, this proves to be a useful point of reference to compare actual costs as the project progresses. There could be various types of intangible benefits on account of automation. These could include increased customer satisfaction, improvement in product quality better decision making timeliness of information, expediting activities, improved accuracy of operations, better documentation and record keeping, faster retrieval of information, better employee morale.

Requirements

SDLC Methodology:

This document play a vital role in the development of life cycle (SDLC) as it describes the complete requirement of the system. It means for use by developers and will be the basic during testing phase. Any changes made to the requirements in the future will have to go through formal change approval process.

SPIRAL MODEL was defined by Barry Boehm in his 1988 article, A spiral Model of Software Development and Enhancement. This model was not the first model to discuss iterative development, but it was the first model to explain why the iteration models.

Each phase starts with a design goal and ends with a client reviewing the progress thus far. Analysis and engineering efforts are applied at each phase of the project, with an eye toward the end goal of the project.

The steps for Spiral Model can be generalized as follows:

  • The new system requirements are defined in as much details as possible. This usually involves interviewing a number of users representing all the external or internal users and other aspects of the existing system.
  • A preliminary design is created for the new system.
  • A first prototype of the new system is constructed from the preliminary design. This is usually a scaled-down system, and represents an approximation of the characteristics of the final product.
  • A second prototype is evolved by a fourfold procedure:
    1. Evaluating the first prototype in terms of its strengths, weakness, and risks.
    2. Defining the requirements of the second prototype.
    3. Planning and designing the second prototype.
    4. Constructing and testing the second prototype.
  • The existing prototype is evaluated in the same manner as was the previous prototype, and if necessary, another prototype is developed from it according to the fourfold procedure outlined above.
  • The preceding steps are iterated until the customer is satisfied that the refined prototype represents the final product desired.
  • The final system is constructed, based on the refined prototype.
  • The final system is thoroughly evaluated and tested. Routine maintenance is carried on a continuing basis to prevent large scale failures and to minimize down time.

The following diagram shows how a spiral model acts like:

ADVANTAGES:

  • Estimates(i.e. budget, schedule etc .) become more relistic as work progresses, because important issues discoved earlier.
  • It is more able to cope with the changes that are software development generally entails.
  • Software engineers can get their hands in and start woring on the core of a project earlier.

Functional Requirements:

  1. Enter the distance
  2. Update Route
  3. Find the neighbors
  4. Using Dijkstra's algorithm find the shortest path
  5. Send vehicle to selected path.

Non- Functional Requirements:

The major non-functional Requirements of the system are as follows

  1. Usability
  2. The system is designed with completely automated process hence there is no or less user intervention.

  3. Reliability
  4. The system is more reliable because of the qualities that are inherited from the chosen platform java.

  5. Performance
  6. This system is developing in the high level languages and using the advanced front-end and back-end technologies it will give response to the end user on client system with in very less time.

  7. Supportability
  8. The system is designed to be the cross platform supportable. The system is supported on a wide range of hardware and any software platform, which is having JVM, built into the system.

  9. Implementation
  10. The system is implemented in web environment. The apache tomcat is used as the web server and windows xp professional is used as the platform.

  11. Interface The user interface is based on HTML and XHTML.

Design Engineering

The design of the project is mainly based on the Dijkstra algorithm. Finding the short distance between two places is very useful. Now a day, this is more important due to the volume of the vehicles passing through a road is increasing day by day all countries in the world. So most advance countries such a United States of America, United King Dom and many more developed countries as well as developing countries such as India, China, Japan doing lot of research in this direction. Many countries are depending on computer based solutions to the vehicle drivers to inform which the shortest route from one given place to another given place and at the same time it also monitor the flow of the traffic in terms of no. of vehicles passed through that particular path in given time. In this method first, the vehicle which is started at a particular source point through a path is noted and it is also monitored at the destination place whether the vehicle left the destination or still it is in the middle of the path. Every route is given a maximum capacity. Once the route is filled with the vehicles to its maximum capacity then even though it is shortest path, the shortest path is not taken as the route for travel by the vehicle driver. He or she searches a next shortest path so that the vehicle driver can travel in another route with less traffic even though it is slightly more distance than the shortest path. In this case time is saved than the wasting time unnecessary going in the heavily crowded route. It saves the time and fuel also. In order to implement this concept there are many ways and techniques to find out the shortest path between any two given places. Some of those techniques are Dijkstra Softest Path Algorithm, Bellman Ford Algorithm, D* Search Algorithm, Breadth First Search Algorithm, Depth First Search Algorithm, Floyd Warshall Algorithm, Link State Routing Technique, Flood Fill Technique, Euclidean Shortest Path Algorithm etc. In the all the above algorithms or techniques I found the Dijkstra Shortest Path Finding Algorithm is simple easy and useful for the majority of cases. The issue of the project is to monitor whether the started vehicle at source place is reached at the destination place or not. This can be monitored in real time with the help of Global Positioning System (GPS) which will be explained in detailed in the later portion of this document.

Initially, I explain the details of the Dijkstra Shortest Path finding algorithm. This algorithm is released in the year 1959. It is basically used in the graphs to find out the shortest path as a graph searching algorithm. This algorithm is released by a Dutch Scientist and mathematician called Edsger Dijkstra. This algorithm is suitable to search a graph with a single source to finding out the shortest path with the nonnegative weights for the edges of the graph. It produces a shortest path tree. The same algorithm is started using in networks to find out the shortest path while communicating the data.

This algorithm is based on the directed graphs. The directed graph is made of nodes and each node of the directed graph is connected with the other node with a directed edges. Some times the edges may be directed or may not be directed also. Some of the people refer the nodes as vertexes also. Each edge is associated with a distance. This edge distance is called as a cost or weight. The distance between any two connected nodes such as n1 and n2 is referred with the notation [n1, n2]. The same thing can be explained as a formula as G= {V, E}, where G stands for the graph and V stands for the set of Vertexes or nodes and E stands for the collection or set of edges. Any graph can be measured with the help of the following parameter in order to compare with the other graphs as well as to know the complexity of the graph. Those parameters are one order and second one is size. The order of the graph indicates the number of nodes or vertices present in the graph. The size of the graph indicates the number of edges present in the graph. The problems with any graph are one to find out the shortest path from one given node to any other given node and second one is finding the maximum flow through an edge when the maximum flow capacity of a graph is defined in earlier. In order to address these two problems Dijkstra algorithm can be used as follows.

In Dijkstra algorithm all the nodes present in a graph are initially divided into two groups. The first group of nodes is called as settled nodes group and the second group of nodes is referred as unsettled nodes. Some times these graph nodes are also referred as marked nodes and unmarked nodes. Initially all the nodes of the graph are treated as members of unsettled nodes set. All nodes are taken into consideration in finding shortest path in the given graph. Initially we select one node from the unsettled list and treat this node as initial node or source. Initially all the nodes that are present in the unsettled nodes set are treated as high distance nodes from the source. Then first one node from the unsettled nodes list is taken and it is placed in the settled nodes list. This node is referred as Source node. Then using the weights present on the edges from the source node to the other nodes present in the graph the shortest neighbor node is found. During this process each node distance from the source node to the unsettled node is evaluated and once the evaluation of the node is completed then the node is moved from unsettled nodes set to the settled nodes set. This process runs until the unsettled nodes set becomes empty to indicate no more nodes are required to be evaluated to find out the shortest path the given source node. This process is explained as follows with an example. First we take a node as the source node and it is treated as the current node. Its distance is initially taken as zero. Then the neighbor nodes to this source node are found. Then each neighbor node distance is calculated. For instance the source node is compared with one neighbor, the edge weight or distance between the source and this neighbor node is say 3, then the shortest distance is initially taken as 3. Later the same source is compared with the next available neighbor if ever any neighbor node present in the graph to the source node. Suppose if another neighbor node present then the distance between the source and this is calculated. Suppose if it is 2 then the previous short distance of 3 is replaced with the short distance 2 and the shortest node is remembered as this node. This way all the neighbor nodes of the source node are compared and finally a short distance node along with the distance is noted. Later the shortest neighbor node is considered as current node and the previous source node is marked as visited node. Once a node is marked as visited node then that node is not considered for future comparisons in the process of finding shortest path. Like this the process is repeated for all the nodes to complete the finding of shortest path.

User Interface Design:

The design of the project is implemented by using java technology. In order to create the user interface the screen is designed by using java Foundation Classes that are available as Java Swing Project. It is light weight user interface designed purely in java. Place class is declared as a derived class it is derived from the JFrame class of java swing package. This place class is used to create a window frame with the following controls.

  1. One label control is used to display a fixed source.
  2. One JTextField control is used to enter the destination node.
  3. Distance JTextField is used to show the distance between the source node and selected destination node.
  4. Find neighbor button is placed to find out the neighbor nodes for the selected node.
  5. Update route button is placed to update the route with the specified distance.
  6. Route discovery button is placed to find out all the routes with the shortest route also.
  7. A table control is placed to display all the available routes as a queue.
  8. A Label control is used to display the selected route from the table control.
  9. A Text Field is placed to enter a vehicle name that is to be sending to the destination.
  10. Arrival field is placed to represent the vehicle that is received at the destination.
  11. Send button is placed to initiate the sending of the vehicle from the source place to the destination place.
  12. Exit button is placed to close the application.

Global Positioning System (GPS)

This is U.S. based satellite communication system used to find out the position, speed, and time of a particular object on earth from any place, any time, any whether condition. It is initially used by the U.S. army in the world war II in a little different manner as that of the GPS what we are using today. Originally the GPS is used in the Russian satellite sputnik. But its performance is not up to the mark due to the Doppler Effect. A team of U.S. scientist observed this keenly and finally introduced GPS technology by changing many parameters and mixing many more techniques in to the world first for the military usage and later for civil usage by the public. The actual usage of GPS started later the year 1995 only.

Concept behind the Technology

A GPS receiver is used to calculate the exact position of an object on the earth surface along with the time, velocity etc. To achieve this it communicates signals at a higher range as follows.

It translates two carrier signals at L1 frequency that is 1575.42 MHz, and another one at L2 frequency that is at 1227.60 MHz capacity.

The exact functionality of the GPS can be seen as Satellite Navigation System.

It uses four satellite signals to compute the position of an object on the earth in three dimension and time offset in the receiver clock.

The GPS operations can be seen as follows

1. Space Segment

The Space segment of the GPS is managed by the Satellite only. It sends radio signals from space. The normal GPS system consists of 24 Satellites and each satellite orbits the earth in 12 hours. Some times more than 24 satellites are also used by the GPS because some of the satellites may undergo for maintenance. These satellites cover the same track on the earth every day. They provide the signal constantly to the earth so that the positioning can be made appropriately and accurately.

2. Control Segment

The control segment consists of tracking the various locations on the earth. All these earth stations control the GPS system for proper functionality. There is a master control station at Schriever Air Force Base in Colorado which controls the Space Vehicle signals and receiver clock so that GPS system quality is always maintained.

3. user Segment

This is GPS receiver Unit. These units are used by various purposes such as navigation of ships, aircrafts, ground vehicles and hand held transports etc. The GPS receiver receives four signals and divides them into four parts. The first three parts say A,B,C are used for the three dimensional position of an object on earth and the fourth signal such as D is used for the time offset.

The main uses of GPS are

  1. Navigation of vehicles, ships, aircrafts
  2. Space research
  3. Measuring atmospheric changes
  4. Monitoring movements of enemies in the War field
  5. Finding the targets in the war field
  6. Many more

How Exactly GPS Map Works?

GPS is an short form that stands for Global Positioning System, this system is global radio navigator system that is comprised from the interaction of 24 satellites orbiting the Earth, along with there corresponding ground stations.

A GPS positioning system utilizes the orbiting satellite as reference points in determining the distance from one point to another and to find certain objects on the planet. with the help the satellite data ,it would be fairly easy to calculate the distance of a certain place to another place, it can also calculate your position exactly down to the centimeter.

For instance, if you are using a GPS device to find a certain area anywhere on the glob, it can pinpoint precisely where that area is and what that distances is from where you are standing. Exact nature of this technology within GPS system is such that when we refer to a GPA map, we can put your feet up confident that the information we can find within these GPS maps are easy to follow.GPS maps give police and other government services the ability to find a way around the city just as if they know every corner and every street by memory itself.

Traffic Message Channel is equipment to deliver traffic and travel information to the driver. It is typically digitally coded using DAB (Digital Audio Broadcast) or satellite radio. It allows silent delivery of high quality accurate, timely and relevant information, in the language chosen by the user and with out interrupting normal services

When data is integrated directly into a navigation system, this gives the driver the alterative routes to avoid traffic incidents, these traffic incidents are sent as TMC message. One message consists of an event code and the location code in addition to time details.

Location code table in maintained on a national level and assign number to location on the road network, Those location table are integrated in the maps provides by NAVTEQ and Tele Atlas.

Radio Data system and traffic message channel relies on the use of location tables, so the accuracy of traffic events when integrated into GPS devices by matching the reported location into the location table

Activity Diagram:

The purpose of activity diagram is to provide a view of flows and what is going on inside a use case or among several classes. Activity diagram can also be used to represent a class's method implementation. A token represents an operation. An activity is shown as a round box containing the name of the operation. An outgoing solid arrow attached to the end of activity symbol indicates a transition triggered by the completion.

Description:

Place is where we are giving source from where we are starting,

Now enter the distance and then update the network, which will updates the neighboring routes and then it stops.In the next phase the system will find the neighbors, where it displays all the neighboring routes, now enter the destination ,and then it gives all the available paths, from which the shortest path is selected, where the vehicle will reach the destination

Use Case Diagram:

A use case diagram is a graph of actors, a set of use cases enclosed by a system boundary, communication (participation) associations between the actors and users and generalization among use cases. The use case model defines the outside (actors) and inside (use case) of the system's behavior.

Operation performed by the user:

  1. Enter the distance: allows user to enter the distance from where he starts
  2. Update routes: The user will update the routes
  3. Find neighbors: Allows the user to find the neighboring routes
  4. Enter the destination: Allows the user to enter the destination place
  5. Get available path: User will find all the available routes
  6. Shortest path: User will select the shortest path
  7. Send vehicle to destination: Which shows the status of vehicle whether the vehicle is arrived or not.
  8. Sequence Diagram:

    Sequence diagram are an easy and intuitive way of describing the behavior of a system by viewing the interaction between the system and its environment. A Sequence diagram shows an interaction arranged in a time sequence. A sequence diagram has two dimensions: vertical dimension represents time; the horizontal Dimension represents different objects. The vertical line is called is the object's life line. The lifeline represents the object's existence during the interaction

    Discription:

    • User enters the distance
    • Update sends a request to neighbor discovery
    • User will enter the destination to find the routes
    • Find all shortest paths from all the routes
    • User will check whether the vehicle reached the destination or not

    Collaboration Diagram:

    The collaboration diagram represents a collaboration, which is a set of objects Related in a particular context, and interaction, which is a set of messages exchanged among the objects within the collaboration to achieve a designed Outcome.

    Class Diagram:

    UML Class diagram shows the static structure of the model. The class diagram is a collection of static modeling elements, such as classes and their relationships, connected as a graph to each other and to their contents

    Technology Description

    Java Technology

    Initially the language was called as oak but it was renamed as Java in 1995. The primary motivation of this language was the need for a platform-independent (i.e., architecture neutral) language that could be used to create software to be embedded in various consumer electronic devices.

    • Java is a programmer's language.
    • Java is cohesive and consistent.
    • Except for those constraints imposed by the Internet environment, Java gives the programmer, full control.
    • Finally, Java is to Internet programming where C was to system programming.

    Importance of Java to the Internet

    Java has had a profound effect on the Internet. This is because; Java expands the Universe of objects that can move about freely in Cyberspace. In a network, two categories of objects are transmitted between the Server and the Personal computer. They are: Passive information and Dynamic active programs. The Dynamic, Self-executing programs cause serious problems in the areas of Security and probability. But, Java addresses those concerns and by doing so, has opened the door to an exciting new form of program called the Applet.

    Features of Java Security

    Every time you download a normal program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those who did scan them for viruses prior to execution. Most users still worried about the possibility of infecting their systems with a virus. In addition, another type of malicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords. Java answers both these concerns by providing a firewall between a network application and your computer.

    When you use a Java-compatible Web browser, you can safely download Java applets without fear of virus infection or malicious intent.

    Portability

    For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed .As you will see, the same mechanism that helps ensure security also helps create portability. Indeed, Java's solution to these two problems is both elegant and efficient.

    The Byte code

    The key that allows the Java to solve the security and portability problems is that the output of Java compiler is Byte code. Byte code is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte code.

    Translating a Java program into byte code helps makes it much easier to run a program in a wide variety of environments. The reason is, once the run-time package exists for a given system, any Java program can run on it.

    Java Virtual Machine (JVM)

    Beyond the language, there is the JVM. The JVM is an important element of the Java technology. The virtual machine can be embedded within a web browser or an operating system. Once a piece of Java code is loaded onto a machine, it is verified. As part of the loading process, a class loader is invoked and does byte code verification makes sure that the code that's has been generated by the compiler will not corrupt the machine that it's loaded on. Byte code verification takes place at the end of the compilation process to make sure that is all accurate and correct. So byte code verification is integral to the compiling and executing of Java code.

    Overall Description

    Picture showing the development process of JAVA Program

    Java programming uses to produce byte codes and executes them. The first box indicates that the Java source code is located in a .Java file that is processed with a Java compiler called javac. The Java compiler produces a file called a .class file, which contains the byte code. The .Class file is then loaded across the network or loaded locally on your machine into the execution environment is the JVM, which interprets and executes the byte code.

    Java Architecture

    Java architecture provides a portable, robust, high performing environment for development. Java provides portability by compiling the byte codes for the JVM, which is then interpreted on each platform by the run-time environment. Java is a dynamic system, able to load code when needed from a machine in the same room or across the planet.

    Compilation of code

    When you compile the code, the Java compiler creates machine code (called byte code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte code. The JVM is created for overcoming the issue of portability. The code is written and compiled for one machine and interpreted on all machines. This machine is called Java Virtual Machine.

    Compiling and interpreting Java Source Code

    During run-time the Java interpreter tricks the byte code file into thinking that it is running on a Java Virtual Machine. In reality this could be an Intel Pentium Windows 95 or SunSARC station running Solaris or Apple Macintosh running system and all could receive code from any computer through Internet and run the Applets.

    Object-Oriented

    Java was not designed to be source-code compatible with any other language. This allowed the Java team the freedom to design with a blank slate. One outcome of this was a clean usable, pragmatic approach to objects. The object model in Java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects.

    Robust

    The multi-platform environment of the Web places extraordinary demands on a program, because the program must execute reliably in a variety of systems. The ability to create robust programs was given a high priority in the design of Java. Java is strictly typed language; it checks your code at compile time and run time.

    Java virtually eliminates the problems of memory management and de-allocation, which is completely automatic. In a well-written Java program, all run time errors can and should be managed by your program.

    JAVA SWING

    Swing is a widget toolkit for java. The main characteristics of the Swing toolkit are platform independent, customizable, extensible, configurable and lightweight.. It has a rich set of widgets. From basic widgets like Buttons, Labels, Scrollbars to advanced widgets like Trees and Tables.

    Swing is a part of JFC, Java Foundation Classes. It is a collection of packages for creating full featured desktop applications. JFC consists of AWT, Swing, Accessibility, Java 2D, and Drag and Drop.

    JComponent

    All Swing components whose names begin with "J" descend from the Jcomponent API class. For example, JPanel, JScrollPane, JButton, and JTable all inherit from JComponent. However, JFrame doesn't because it implements a top-level container. The JComponent class extends the Container API Class, which itself extends Component api . The Container class has support for adding components to the container and laying them out.

    JPanel

    The JPanel class provides general-purpose containers for lightweight components. By default, panels do not add colors to anything except their own background; however, you can easily add borders to them and otherwise customize their painting.

    JFrame

    Create a frame that is initially invisible

    JButton

    The JButton object generally consists of a text label and/or image icon that describes the purpose of the button , an empty area around the text/icon and border.

    JLabel

    JLabel, descended from JComponent, is used to create text labels. It can display text but images as well.

    JTextArea

    JTextArea component is used to accept several lines of text from user. JTextArea can be used in conjunction with class JScrollPane to achieve scrolling. The underlying JScrollPane can be forced to always or never have either the vertical or horizontal scrollbar.

    JList

    JList provides a scrollable set of items from which one or more may be selected. JList can be populated from an Array or Vector. JList does not support scrolling directly, instead, the list must be associated with a scrollpane. JList actions are handled using ListSelectionListener.

    The Swing Message Box

    Windowing environments commonly contain a standard set of message boxes that allow you to quickly post information to the user or to capture information from the user. In Swing, these message boxes are contained in JOptionPane sophisticated), but the ones most commonly used are probably the message dialog and confirmation dialog, invoked using the static JOptionPane.showMessageDialog() and JOptionPane. showConfirmDialog().

    Package Javax.Imageio Description

    The main package of the Java Image I/O API. Many common image I/O operations may be performed using the static methods of the ImageIO class.This package contains the basic classes and interfaces for describing the contents of image files, including metadata and thumbnails (IIOImage); for controlling the image reading process (ImageReader, ImageReadParam, and ImageTypeSpecifier) and image writing process (ImageWriter and ImageWriteParam); for performing transcoding between formats (ImageTranscoder), and for reporting errors (IIOException).

    JFileChooser

    File choosers provide a GUI for navigating the file system, and then either choosing a file or directory from a list, or entering the name of a file or directory. To display a file chooser, you usually use the JFileChooser API to show a modal dialog containing the file chooser.

    JFileChooser has supporting classes: FileFilter class, FileSystemView class, FileView.

    FileFilter class is for restricting files and directories to be listed in the FileView of the JFileChooser. The FileView controls how the directories and files are listed within the JFileChooser. The FileSystemView is an abstract class that tries to hide file system-related operating system specifics from the file chooser.

    JScrollPane

    JScrollPane is a JQuery plug-in which allows you to replace the browsers default vertical scrollbars on any block level element with an overflow: auto style. JScrollPane is cross browser, working on all browsers that support JQuery and it also degrades gracefully. If a user's browser doesn't support JQuery or has JavaScript turned off then they will see the browsers default scrollbars. If the mouse wheel plug-in is included in the page then the scroll panes will respond to mouse wheel events as well. JScrollPane is built on top of the awesome JQuery library and utilizes the dimensions plug-in and (optionally) the mouse wheel plug-in.

    JCreator

    JCreator is a powerful IDE for java. JCreator is the best development tool for programming. It is faster, more efficient and more reliable than other IDE's.

    JCreator provides the user with a wide range of functionality such as Project management, project templates, code-completion, debugger interface, editor with syntax highlighting, wizards and a fully customizable user interface

    With JCreator you can directly compile or run your Java program without activating the main document first JCreator is written entirely in C++, which makes it fast and efficient compared to the Java based editors/IDE's.

    Java Networking

    Networking is used for communication between various computers that are interconnected together as a network. The main purpose of interconnection between computers is to share data among themselves. This communication can be achieved in Local Area Network (LAN), Global Area Network (GAN), Wide Area Network (WAN), Internet or Intranet.

    Java Language being a machine independent and platform independent, it is able to provide communication among various computers that are installed with various platforms such as Windows, sun Solaris, Unix, Linux etc.

    In order to communicate we need socket programming. Java is provided with rich set of java.net API functions that are providing classes for communication for socket programming. There is a class for the implementation of server socket and another class for the client socket. It is possible to frame the message that is to be sent from one computer to the other computer with the help of these sockets. But communication among computers takes place on specific port. Port is a place where data exchange takes place between a sender and receiver. Another important aspect of the network is protocol. A protocol is a set of rules used for communication. These rules specify the type of communication in a network. Some of the standard protocols are Transmission control protocol/ Internet Protocol (TCP/IP), Sequential Packet Exchange/Internet Packet Exchange (SPX/IPX) etc. Java supports almost all the protocols and it is specially designed to deal with TCP/IP communication and UDP communication. It is possible to send the communication among various computers simultaneously because java programs are having capability of operating several ports at the same time and moreover several tasks can also be taken at the same instant of time with the help of multithreaded application. A thread is an executor which executes a segment of instructions at a time. If it is required to complete the execution of the java program quickly, several individual parts of the application can be given to more than one thread so that it is possible to complete the application quickly in a parallel manner. Multi threading widely needed when several tasks are required to be performed simultaneously. It is more suitable to the application of road traffic control system type of applications.

    Java Database Connectivity

    What Is JDBC?

    JDBC is a multi data base application programming interface(API) that provides java objects for working with database drivers, connections ,SQL statements, Query result sets. JDBC makes it easier to write java code for accessing SQL databases. Using a single API for working with disparate databases also simplifies programming. JDBC includes classes that wrap common SQL types and useful methods for working with dates, times and timestamps.

    What Does JDBC Do?

    JDBC program will get data from database server from the following steps

    1. Establish connection with database server
    2. Geting data by executing a statement from database server
    3. Then disconnect from database server

    JDBC Driver Types

    The JDBC drivers is classified into four types that are aware of at this time :

    • JDBC-ODBC bridge plus ODBC driver
    • Native-API partly-Java driver
    • JDBC-Net pure Java driver
    • Native-protocol pure Java driver

    JDBC- ODBC Bridge

    JDBC drivers are the bridge drivers such as the JDBC-ODBC bridge. These drivers rely on an intermediary such as ODBC to transfer the SQL calls to the database. Bridge drivers often rely on native code, although the JDBC-ODBC library native code is part of Java-2 virtual machine.

    NATIVE API-PARTLY JAVA DRIVER

    This driver use the existing database API to communicate with the database on the client. Although this driver is faster than JDBC-ODBC bridge driver, this driver use native code and require additional permissions to work in an applet. This type of driver might need client-side database code to connect over the network.

    JDBC-Net Pure Java Driver

    This driver calls the database API on the server. JDBC requests from the client or first peroxide to the JDBC driver on the server 2 run. This driver and NATIVE PROTOCOL PURE JAVA DRIVER can be used by thin clients as they need no native code.

    Native-Protocol Pure Java Driver

    The highest level of driver reimplements the database network API in the Java language. This driver can also be used on thin clients as they also have no native code.

    JDBC connectivity

    Once you have the correct JDBC driver installed, establishing a connection

    From your SQL database is pretty easy.

    Regardless of whether your trying to connect to Oracle, Sybase, Informix, MSQL, or Interbase or any other JDBC database source, establishing a connection to an SQL database with java JDBC is a simple two step process

    • Load the JDBC driver.
    • Establish the connection.

    Steps in a JDBC Program

    • Load the JDBC driver and establish the connection.
    • Connect to a database.
    • Create an SQL statement (use: statement/prepared statement/callable statement/interface).
    • Execute the statements.
    • Close the connection.

    DATABASE

    A Database Management System(DBMS) is data storage and retrieval systems which permits data to be stored non-redundantly while making it appear to the user as if the data is well integrated. A DBMS is a collection of programs that carry out activities on a database, including

    • Setting up storage structures.
    • Loading data.
    • Accepting and performing updates.
    • Accepting data requests from users and programs.

    DBMS manages data resources like an operating system manages hardware resources

    SQL

    Structured Query Language (SQL) is the standard language design to access relational databases. SQL is tied very closely with the relational model.

    In the relational model, data is stored in structures called relations or tables.

    SQL statements are issued for the purpose of:

    Data Definition Language (DDL): Allows you to define the data structures, such as tables, that make up a database.

    There are five basic types of DDL statements:

    • CREATE: Allows you to create a database structure. For example CREATE TABLE is used to create a table.
    • ALTER: Allows you to modify a database structure, for example ALTER TABLE is used to modify table.
    • DROP: Allows you to remove a database structure. For example, DROP TABLE is used to remove a table.
    • RENAME: Allows you to change the name of the table.
    • TRUNCATE: Allows you to delete the entire contents of the table.

    Data Manipulation Language (DML): Allows you to modify the contents of the tables. There are three DML statements:

    • INSERT: Allows you to add rows to a table.
    • UPDATE: Allows you to change a row.
    • DELETE: Allows you to remove rows.

    Data Transaction Control (DCL): Allows you to permanently record the changes made to the rows stored in a table or undo those changes.

    There are three TC statements:

    • COMMIT: Allows you to permanently record changes made to row.
    • ROLLBACK: Allows you to undo changes made to rows.
    • SAVE POINT: Allows you to set a save point to which you can roll back changes made to rows.

    Data Control Language(DCL):Allows you to change the permissions on the database structure. There are two DCL statements:

    • GRANT: Allows you to give another user access to your database structures such as tables.
    • REVOKE: Allows you to prevent another user from accessing to your database structures such as table.

    Tools Used

    My Eclipse 7.5 is an integrated development tool for developing applications in java. In general right from beginning sun Microsystems provides no specific editor, so many third party editors are released by various companies into the market. Out of which My Eclipse is most popular. It provides the best integration of java application program interface functions in the form of classes and interfaces so that any one can develop java applications of stand alone type or web application type or enterprises and distributed applications. In our application this tool is used to develop the application in a quick and effective manner.

    IMPLEMENTATION

    The application is implemented by writing the code in java. Total four five classes are declared. Place class is created as derived class from the JFrame and it is used as a container for placing all the user interface controls needed for the application interface. This class takes care about the placing the controls with the specific display attributes and action listeners and other listeners are added to enable the various operations as needed by the application.

    Source and port class is implemented with two methods. First method is used to obtain the source place and the second method is getport implemented to obtain the port number of a place.

    The action class is implemented to write the main logic needed to find out the neighbor nodes of a given node, display the distance of a source node with the neighbor node, update the distance of a node. In this application all the nodes are maintained in vector class. The distances are also maintained in vector. The places are represented as ports. All the required ports to run the application can be placed in a property file called ports.properties. This file is read in the action class to load all the places into the vector. The distances between various nodes placed in another property file called distance.properties file. This file is also read from the action class and all the places with the distances are loaded into the vector. This action class implemented all the functions needed to implement the Dijkstra algorithm to find out the shortest path. All the paths that are available can be found and displayed in a table as a queue.

    Another class called receive is implemented to send a vehicle from source to the selected destination through the selected path.

    This is for the simulation of GPS technique to find out the position of the vehicles. Since the usage of GPS for our application is costly I have selected a simulation technique in java by using java networking. Here the java program receive class implements the java networking with which it is possible to know where the position of the vehicle. Our user interface is showing an option to enter the vehicle to send from a specific source place. Later by selecting a shortest route or path it is possible to send the vehicle from source to the specified destination. Once it is reached the destination it is shown in the destination vehicles box in the users interface. This is achieved by the java program through java networking features. Here each place is represented as a port in the network. It is possible to send the signal from one port to another port. Here the signal indicates a vehicle and the two ports one indicates the source place and the second one indicates the destination place. This helps in not only monitor the reaching of the vehicle from one place to the other place but also count the number of vehicles are present or passing through the specified route at any given instant of time.

    Conclusion

    In our road traffic management simulation shows how to solve the road traffic in real world. Based on Dijkstra's shortest path algorithm we are selecting optimal path to reach our destination. Finally we shows compare with existing approach our algorithm provide the better results.

    More over an effort is made to represent the positioning of the vehicle in a specified route. So that it is possible to observe the traffic on particular route. It helps in understanding the current traffic is up to the maximum capacity of the route or not. If the maximum capacity is not reached then some more vehicles can travel through the same route other wise it shows all the available paths between the given source and destination places and from those routes it is possible to select a specific route to reach the required destination. It is very useful.

    Future Enhancements

    This Road Traffic management system can be extended further in many ways. Some of the ways struck to my mind are.

    13. It is possible to track the vehicle keenly. If any vehicle going excess speed then it can be controlled by sending a signal to the vehicle and an alert can be given to the driver of the vehicle. Still the driver is not listening to the instructions of the GPS then GPS can either take control of the vehicle or informing to the traffic control governing authorities so that the accidents can be avoided due to over speed.

    14. It is possible to send court notices and fines to the respective driver by observing the vehicle by GPS system

    15. It is possible to know exact time by which the vehicle is going to arrive to the required destination.

    16. Vehicle thefts can be traced out immediately so that a clues team can reach the place where the vehicle is absconded.

    17. A waning can be obtained from the traffic control authorities in case of any problem in the route due to floods, cyclones, any other causes. This information helps in taking alternative route for safety.

    References

    1. http://en.wikipedia.org/wiki/Dijkstra's_algorithm

    2. http://www.javabeginner.com/java-swing/java-swing-tutorial

    3. http://www.roseindia.net/java/example/java/swing/

    4. http://java.sun.com/docs/books/tutorial/networking/sockets/

    5. http://www.java2s.com/Code/JavaAPI/javax.net/SocketgetInputStream.htm

    18. Dijkstra. E. W. (1959) A note on two problems in connection with graph

    19. Moore. E.F. (1959), The shortest path through a maze. Proceedings of an International symposium on the theory of switching at Cambridge University.

    20. Cormen Thomas H, Leiserson charles E, Rivest Ronald L, Stain Clifford. Title Introduction to algorithms- Mc Graph Hill publication.

    21. An introduction to data structures through algorithmic approach- Soarson, Mc Graw Hill Publications.

    22. Shortest path algorithms: An evaluation using real road networks- Zhan. F. Benjamin.

    23. Dijkstra's algorithm revisited: the dynamic programming connexion Journal of Control and Cybernetics. Sniedovich, M (2006).

    24. A guide for the Global Positioning system (GPS) GPS Time Lime. Radio Shack.

    25. Why did the department of Defense develop GPS- Trimble Navigation

    26. United States updates Global positioning Technology America.gov.

    27. Global Positioning system and standard positioning service specification, 2nd Edition, US Defense Center,

Please be aware that the free essay that you were just reading was not written by us. This essay, and all of the others available to view on the website, were provided to us by students in exchange for services that we offer. This relationship helps our students to get an even better deal while also contributing to the biggest free essay resource in the UK!