Вы находитесь на странице: 1из 35

CASE STUDY TRAFFIC MANAGEMENT SYSTEM

GROUP MEMBERS:
-Komal Sahita - 65 -Bhagya Maddula - 78 -Disha Vasyani - 60 -Urvi Vora - 61

ON

Mission Statement:
Government wishes to automate traffic management system: there are sensors at each traffic signal. Each sensor senses the traffic density and reports it to central control room. The control room sends signals (green signal and waiting time). All the signals follow a pattern for ON and OFF like when one signal is GREEN then opposite direction signal is RED and vice versa.

In case of accident, sensor sends signal to the control room, traffic at that time is regulated accordingly. Nearest hospital is contacted and is asked to report immediately.

In case of rally and processions and road maintenance, alternative ways/roads are flashed on the Flash Boards. During normal conditions boards display traffic status of nearby areas where the corresponding road leads.

In case someone breaks the signal or exceeds speed limit vehicle number and the direction in which it is going is noted. The traffic police at the next corresponding signal are informed about it so that appropriate action can be taken.

All the information about traffic density is Logged in the central server. It will help in providing statistical information while under taking new road or bridge construction.

CLASS DIAGRAM:
The analysis CLASS DIAGRAM for traffic management system is as shown in figure below:

CLASSSES WITH THEIR ATTRIBUTES AND OPERATION:


1.

Control Room:
Attributes:

Operator: Operator control room.

who

operates

the

Id: Id (proof) of the controller.

Name: Name of the controller

Operations : getOperatorDetails(): retrieves information about the control room operator

setOperatorDetails(): sets information about the control room operator

2.

Hospital :
Attributes: Name: Name of the hospital. Location: Address of the hospital. Telephone Number: Contact number of the hospital. Operations: getHospitalDetails(): retrieves Hospital information about the

setHospitalDetails(): sets information about the Hospital updateHospitalDeatils(): updates information about the Hospital

3.

Traffic Police:

Attributes: Id: Id proof of that constable. Name: Name of the constable. Location: Location of traffic signal to which constable is responsible for. Operations: getPoliceDetails(): retrieves information about the Police Constable. setPoliceDetails(): sets information Constable. updatePoliceLocation(): updates information about the Police Constable. about the Police

4.

ViolateTraffic:
Attributes:

Direction: This will show in which direction the driver is going by violating the law. Vehicle Number: This will show the number of the vehicle who violated the law. Operations: getTrafficViolationDetails(): Retrieves information about the Person Who violated the traffic setTrafficViolationDetails(): sets information about the Person Who violated the traffic getNextSignalLocation(): retrieves information about the next signal location

5.

Sensor:
Attributes: Type: Type of sensor. Date of periodic maintenance: Last maintenance: Date of last maintenance of sensor

nextMaintenence : Date of next maintenance of sensor Nearest control room: Address of nearest control room. Operations: getSensorDetails(): retrieves information about the Sensor. setMaintenenceDate(): sets information about the Maintenance date of the sensor getMaintenenceDate(): Retrieves information about Maintenance date of the sensor the

6.

TrafficLog
Attributes: DateTime: Date and time when density is measured and logged. Area: Location of place. Density: Traffic Density measured particular area at that time. Operations: in that

AddLogEntry(): Add entries into the log GenerateReport(): Generates Report to show statistics.

7.

Revenue:
Attributes: Name: Name of the Individual who violated the signal. Caught by: Police In charge of that area. Charge: Under what charge. Amount: Fine to be paid. Date: Date of that day. Time: At what time. Operations: AddLogEntry(): Add entries into the log GenerateReport(): Generates Report to show statistics.

PATTERNS: DESIGNING OF CLASSES:


The system requires only one log so designing of class log can be done using singleton pattern wherein
LOG private time private area private density static log thelog

static log getinstance() static update()

The sensor senses the traffic density and informs it to the control room. Here observer pattern can be implemented where sensor acts as observable class and control room acts as observer class.
<<observable>> Addobserver() Notify() Update() <<Observer>>

Sensor

Control room

USE CASE DIAGRAM:


The actors included are as follows:

-Control Room 0perator -Sensor -Hospital Receptionist -Vehicle Drivers -Traffic Police -Flash Boards -Pedestrians

The usecases involved with each actor are as follows:

1. Control Room 0perator

-Send ON and OFF time -Contact nearest hospital -Logs traffic status -Feed programs into the system

2.Sensor

-Senses traffic density -sends information to control room -Sense accidents

3.Hospital Receptionist

-Attend Emergency calls -Send ambulance

4.Vehicle Drivers

-Drive vehicle -meet accidents -Follow signal -violate traffic

5.Traffic Police

-Charge for traffic violation

6.Flash boards

-flash traffic density in nearby areas -Flash alternative ways

7.Pedestrians

-meet accidents -Walk when signal is red

State Transition Diagram:

For signal indicator:


Initially, signal indicator is in OFF state i.e. RED in colour which indicates vehicle driver to stop and it indicates the pedestrians to walk. At the same time the sensor senses traffic density and sends this information to the control room which in turn sends ON and OFF time back to the sensor. When OFF time is equal to zero (event) the signal indicator changes its state to ON state i.e. GREEN in colour which indicates vehicle driver to drive the vehicle and it indicates the pedestrians to stop or not to walk. When ON time is equal to five (event), the signal indicator changes its state to AMBER colour indicating to slow down. When ON time is equal to zero (event) the signal indicator turns back to OFF state.

The STATE TRANSITION DIAGRAM for the above description is as shown below:

For sensor:
Initially, the sensor is in OFF state when it is turned ON it enters in to the MONITOR state. When the system

is in MONITOR state it transits between several sub states. Initially it is in SENSING state whereby it senses the traffic density then it transits to send states where it sends the information about traffic density to the control room. The control room operator processes this information and sends corresponding ON and OFF time back to the sensor. This time the sensor is in RECEIVE state. The sensor transits between senses these three states viz. SENSING, SEND and RECEIVE state until the sensor fails or is down for maintenance. In case of sensor failure or maintenance the sensor goes back to OFF state.

The STATE TRANSITION DIAGRAM for the above description is as shown below:

ACTIVITY DIAGRAM:
In normal conditions:

For regulating traffic under normal conditions. Check whether is sensor working or not. If No, then fixed ON and OFF time scheme is followed. If Yes, then sensor senses traffic and it computes traffic and sends information to control room. The control room simultaneously. operator performs various tasks

It sends ON and OFF time. It logs traffic density in traffic log. And it sends traffic density at the next signal on the flash board.

When OFF time is equal to zero, GREEN signal is send indicating the drivers to drive in desired direction. When ON time is equal to five (event), the signal indicator changes its state to AMBER colour indicating to slow down. When ON time is equal to zero (event) the signal indicator turns back to OFF state. This again indicates the driver to wait and so on.

In Case Of Accidents:
In case of accidents. Initially, let the signal be in ON state i.e. GREEN in colour which indicates vehicle driver to drive the vehicle. If someone met with an accident then the sensor will sense it and will sends this information to the control room.

In meanwhile, the control room will search for the nearest HOSPITAL. The incharge of the control room will contact to the hospital and gives information about the accident like the location where it held and whatever required. Sensor will then sends OFF time event to the signal indicator.

In case of Violation:

Initially, signal indicator is in OFF state i.e. RED in colour which indicates vehicle driver to stop and it indicates the pedestrians to walk.

But if someone tries to violate the rule, then some action has to be taken. The driver who had crossed the signal, when the signal is in its OFF state; the sensor will click the photo of vehicle number and its direction in which he is going.

The sensor will sends this information to the control room. The incharge of the control room will forward this information to the traffic police of the next signal, in the direction where the vehicle is moving.

SEQUENCE DIAGRAM:
In normal conditions:
Initially, signal indicator is in OFF state i.e. RED in colour which indicates vehicle driver to wait and it indicates the pedestrians to walk. At the same time the sensor senses traffic density and sends this information to the control room. The control room in turn sends density information to the FLASH BOARD. Flash board will display this information.

In the time, the control room will process and sends the ON time event to the signal indicator. When OFF time is zero Signal indicator will be GREEN in colour. This indicates the vehicle driver to go in their desired direction.

When ON time is equal to five (event), the signal indicator changes its state to AMBER colour indicating to slow down. When ON time is equal to zero (event) the signal indicator turns back to OFF state. This again indicates the driver to wait and so on.

The SEQUENCE DIAGRAM for the above description is as shown below:

In case of Accidents:

Initially, let the signal be in ON state i.e. GREEN in colour which indicates vehicle driver to drive the vehicle. If someone met with an accident then the sensor will sense it and will sends this information to the control room. In meanwhile, the control room will search for the nearest HOSPITAL. The incharge of the control room will contact to the hospital and gives information about the accident like the location where it held and whatever required. Sensor will then sends OFF time event to the signal indicator.

The SEQUENCE DIAGRAM for the above description is as shown below:

In case of Violation:
Initially, signal indicator is in OFF state i.e. RED in colour which indicates vehicle driver to stop and it indicates the pedestrians to walk. But if someone tries to violate the rule, then some action has to be taken. The driver who had crossed the signal, when the signal is in its OFF state; the sensor will click the photo of vehicle number and its direction in which he is going. The sensor will sends this information to the control room. The incharge of the control room will forward this information to the traffic police of the next signal, in the direction where the vehicle is moving.

The SEQUENCE DIAGRAM for the above description is as shown below:

COLLABORATION DIAGRAM
DURING NORMAL CONDITIONS

IN CASE OF ACCIDENT

IN CASE OF TRAFFIC VIOLATION

Вам также может понравиться