CMSC 828V Programming Project

 

MULTIAGENT TRAFFIC SCENARIO

 

 

 

You are responsible for developing a multiagent traffic control system in a simplified environment.  You may assume that there are N roads V1,…,VN running north south and M roads  H1,…,HM running east-west.  An intersection of two of these roads is denoted by the pair (i,j) denoting the intersection of road Vi with road Hj.   

 

At each intersection, there is a traffic light.  There is a small traffic-light agent whose sole job is to determine three things: (a) how long will the traffic light stay red? (b) how long will the traffic light stay green? (c) how long will the traffic light be amber ?    Remember that this must be determined for each of the (possibly four) directions from which vehicles arrive at an intersection.

 

At each traffic light, there is a wait agent which tracks, on the average, how many vehicles were present at the traffic light just before the light turned red.  In addition, it tracks the average wait per vehicle.

 

The third category of agents are cars.  Each car has a speed (measured in the number of time units required to get from one traffic light to the next).  For purposes of simplicity, you may assume that the road grid is evenly spaced (i.e. the distance from any traffic light to another is constant).  Whenever a car reaches a traffic light, it informs the wait agent (associated with that traffic light) of its arrival time.

 

The key objective of your multiagent traffic system is to ensure smooth traffic flow. One way to measure this is to minimize the average wait time (aggregated across all cars across all traffic lights) For this purpose, the different traffic light agents must collaborate with one another so as to ensure that traffic flows smoothly. 

 

The traffic light agents must jointly ensure that ordinary principles of the road are satisfied. For example, a traffic light must not allow northbound cars to traverse the intersection at the same time as eastbound cars (otherwise there would be an accident).

 

You are required to develop agents representing each of the above entities and to build a prototype system that allows cars to “exit” the grid as well as to “enter” the grid. Exiting the grid corresponds to the car leaving the region to another region where the multiagent traffic system is not deployed. Entering the grid corresponds to a car entering the grid from such a region. 

 

1.       Car agents:  Develop a specification of the behavior of a car agent.  The car agent must obey the rules of the road.  Each car can, at any point in time, drive at a certain speed.  Write code that shows how car agents measure when they reach an intersection and send a message to the wait agent associated with the traffic light (for now, you can assume that cars randomly generate their speeds for a given road segment). 

2.       Wait agent:  The wait agent receives the message sent by the car agent to it and automatically computes how long the car has waited at the intersection.  It provides this information to the traffic light agent whenever asked.

3.       Traffic light agent:  This is the most challenging part of your task.  You must show how the different traffic light agents collaborate with one another and with their associated wait agents to successfully come up with a good way of regulating traffic. Items (1)-(3) must be demonstrated to the instructor on or before November 7.

4.       Simulation:  You are required to graphically develop a simulation that randomly removes cars from the grid and adds cars to the grid (clearly only cars at the edge of the grid can be removed and likewise, cars entering the grid must do so from the edge).  As the simulation proceeds, show how the traffic lights work at each intersection and show the cars moving along the different roads in accordance with the simulation.  It should be possible to stop the simulation at any time and obtain information about the average wait time per vehicle.  It should also be possible to slow or speed up the simulation by adjusting the speed of vehicles.  This must be demonstrated to the instructor on or before December 5.

 

It is important to note that this is an open-ended project. You can make reasonable choices and assumptions in implementing the scenario listed here.  If you have any questions about these choices or assumptions, please do email the instructor (vs@cs.umd.edu).

 

 

 

Web Accessibility