Train Gate System A one-directional railway track crosses a road A gate at the crossing may be...
-
Upload
peter-buswell -
Category
Documents
-
view
212 -
download
0
Transcript of Train Gate System A one-directional railway track crosses a road A gate at the crossing may be...
![Page 1: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/1.jpg)
Train Gate System
• A one-directional railway track crosses a road• A gate at the crossing may be lowered or raised
under computer control• A short distance from the crossing a sensor
detects entering trains• A short distance from the crossing a sensor
detects leaving trains.
![Page 2: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/2.jpg)
Physical Requirements
• The gate must be closed whenever there are trains in the area
• The gate must be kept open when there are no trains in the area
![Page 3: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/3.jpg)
Timing Requirements
• The arriving trains have an average inter-arrival period, avgP
• The gate takes z time units to close (or open).
![Page 4: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/4.jpg)
Simulation Outputs
• Trace of events
• Performance measures– Number of trains serviced– Worst reaction time– Worst response time– Number of deadlines missed:
• Gate opening/closing
• Communication timeouts
![Page 5: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/5.jpg)
Train Control
• A physical safety requirement of the system is that the gate is closed whenever there are trains in the area
• The physical liveness requirement is to keep the gate open if there are no trains in the area
• The controller C controls the gate with the openg (og) and closeg (cg) commands.
![Page 6: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/6.jpg)
Timeouts
• Activity timeouts
• Communications timeout
![Page 7: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/7.jpg)
Activity Timeouts
• The Gate takes a maximum of z time units to close or to open
• The controller process normally waits for the Gate to open or close
• If the Gate takes longer than the maximum allocated time, the controller flags a timeout for the gate and triggers an alarm
![Page 8: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/8.jpg)
Communication Timeouts
• The real-time systems uses synchronous communications
• In the normal case, one of the processes, either the sender or the receiver, will wait for the other to establish the communication
• A communication timer object will interrupt a process attempting to communicate, on timeout.
![Page 9: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/9.jpg)
Sequence Diagram for Train Arrival
![Page 10: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/10.jpg)
Main Class Diagram
![Page 11: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/11.jpg)
Train Gate SystemCommunication Diagram
![Page 12: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/12.jpg)
Entry Sensor
![Page 13: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/13.jpg)
Revised Entry sensor
![Page 14: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/14.jpg)
Exit Sensor
![Page 15: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/15.jpg)
Revised Exit Sensor
![Page 16: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/16.jpg)
Monitor
![Page 17: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/17.jpg)
Revised Monitor
![Page 18: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/18.jpg)
Controller Process
![Page 19: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/19.jpg)
Revised Controller Process
![Page 20: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/20.jpg)
Gate Process
![Page 21: Train Gate System A one-directional railway track crosses a road A gate at the crossing may be lowered or raised under computer control A short distance.](https://reader038.fdocuments.in/reader038/viewer/2022110304/5519b8af5503466f578b48b9/html5/thumbnails/21.jpg)
Revised Gate