Subway simulator Case study

Similar documents
SOFT 437. Software Performance Analysis. What is UML? UML Tutorial

UMLEmb: UML for Embedded Systems. II. Modeling in SysML. Eurecom

The AMADEOS SysML Profile for Cyber-physical Systems-of-Systems

University of Toronto. CSC340F Information Systems Analysis and Design

Design task: Pacman. Software engineering Szoftvertechnológia. Dr. Balázs Simon BME, IIT

Towards Integrated System and Software Modeling for Embedded Systems

A STUDY OF WAYFINDING IN TAIPEI METRO STATION TRANSFER: MULTI-AGENT SIMULATION APPROACH

Elmo HARmonica Hands-on Tuning Guide

SOUND: A Traffic Simulation Model for Oversaturated Traffic Flow on Urban Expressways

Printing: You may print to the printer at any time during the test.

Put Your Designs in Motion with Event-Based Simulation

Moving Obstacle Avoidance for Mobile Robot Moving on Designated Path

Servo Tuning Tutorial

Multi-Platform Soccer Robot Development System

Universal Control For Motorola Systems with Brake module

UML Use Case Diagrams

UML and Patterns.book Page 52 Thursday, September 16, :48 PM

ADAS Development using Advanced Real-Time All-in-the-Loop Simulators. Roberto De Vecchi VI-grade Enrico Busto - AddFor

To solve a problem (perform a task) in a virtual world, we must accomplish the following:

Requirements Analysis aka Requirements Engineering. Requirements Elicitation Process

Problem A: Ordering supermarket queues

Arcade Game Maker Product Line Requirements Model

Functional Verification of CSI-2 Rx-PHY using AMS Co-simulations

LAB II. INTRODUCTION TO LABVIEW

Lecture 4: State Machines for Real-Time Embedded Systems

MHEG Multimedia and hypermedia expert group

Developing a VR System. Mei Yii Lim

SYNTHESIZING AND SPECIFYING ARCHITECTURES FOR SYSTEM OF SYSTEMS

Requirement Definition

The Field of Systems Management, Graduate School of Engineering, Nagoya Institute of Technology, Nagoya, Aichi , Japan

Introduction. Keywords: Wingding machine; Control system; Motion controller

INTRODUCTION TO DATA STUDIO

STUDY OF VARIOUS TECHNIQUES FOR DRIVER BEHAVIOR MONITORING AND RECOGNITION SYSTEM

Graph Matching. walk back and forth in front of. Motion Detector

2

Unit 5: Unified Software Development Process. 3C05: Unified Software Development Process USDP. USDP for your project. Iteration Workflows.

UNIT-III LIFE-CYCLE PHASES

Rapid Array Scanning with the MS2000 Stage

Structural Analysis of Agent Oriented Methodologies

NASA Swarmathon Team ABC (Artificial Bee Colony)

House Design Tutorial

Course Outline Department of Computing Science Faculty of Science

Chapter 7 Requirements Engineering

Manual. ihss57-xx. Integrate Stepper Servo Motor.

Israel Railways No Fault Liability Renewal The Implementation of New Technological Safety Devices at Level Crossings. Amos Gellert, Nataly Kats

Volkswagen Group: Leveraging VIRES VTD to Design a Cooperative Driver Assistance System

Chapter 10 Digital PID

CSS 343 Data Structures, Algorithms, and Discrete Math II. Balanced Search Trees. Yusuf Pisan

DEVELOPMENT OF A MICROSCOPIC TRAFFIC SIMULATION MODEL FOR INTERACTIVE TRAFFIC ENVIRONMENT

Robus 600/1000. Programmable functions using the Oview programmer. STF ROBUS Rev00 Firmware: RF02

HAWK GLADIATOR MICROWAVE COLLISION PREVENTION SWITCHES

Automatic Tool Changer (ATC) for the prolight A Supplement to the prolight 1000 User s Guide

Size 23 Single Stack Size 23 Double Stack. 30-in (760 mm) 225 lbs (1,000 N) lbs-ft (30.5 Nm) lbs-ft (26.25 Nm) lbs-ft (30.

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Arcade Game Maker Product Line Production Plan

CS 4667 Software Engineering Test 1 5 Oct 2007 Page 1 NAME:

Autodesk Advance Steel. Drawing Style Manager s guide

Cotton Belt Corridor. Area Focus Group (AFG) Carrollton/Addison August 29, John Hoppie, Capital Planning

Domain Understanding and Requirements Elicitation

Model-Based Systems Engineering Methodologies. J. Bermejo Autonomous Systems Laboratory (ASLab)

By the end of this chapter, you should: Understand what is meant by engineering design. Understand the phases of the engineering design process.

Activity P07: Acceleration of a Cart (Acceleration Sensor, Motion Sensor)

Introduction to Systems Engineering

TRANSIT 148 HIGH ROOF WALL LINERS INSTALLATION INSTRUCTIONS

Advance Steel. Drawing Style Manager s guide

Croatian Olympiad in Informatics 2002

Skip Lists S 3 S 2 S 1. 2/6/2016 7:04 AM Skip Lists 1

DESIGN AND CAPABILITIES OF AN ENHANCED NAVAL MINE WARFARE SIMULATION FRAMEWORK. Timothy E. Floore George H. Gilman

UNIT VI. Current approaches to programming are classified as into two major categories:

Pedestrian Dynamics Tutorial 1

Virtual Engineering: Challenges and Solutions for Intuitive Offline Programming for Industrial Robot

Daniel Sasso William E. Biles. Department of Industrial Engineering University of Louisville Louisville, KY 40292, USA

Teacher s notes Induction of a voltage in a coil: A set of simple investigations

Appendix Traffic Engineering Checklist - How to Complete. (Refer to Template Section for Word Format Document)

ME scope Application Note 02 Waveform Integration & Differentiation

Game Programming Paradigms. Michael Chung

Engineering Diploma Resource Guide ST150 ETP Research & Design (Engineering)

SOFT 423: Software Requirements

PHYSICS 220 LAB #1: ONE-DIMENSIONAL MOTION

Methodology for Agent-Oriented Software

Turtlebot Laser Tag. Jason Grant, Joe Thompson {jgrant3, University of Notre Dame Notre Dame, IN 46556

Pedestrian Simulation in Transit Stations Using Agent-Based Analysis

Physics 253 Fundamental Physics Mechanic, September 9, Lab #2 Plotting with Excel: The Air Slide

Annex IV - Stencyl Tutorial

The Toyota Motor approach from basic research to product realization

GIS Module GMS 7.0 TUTORIALS. 1 Introduction. 1.1 Contents

Distributed Slap Jack

Chapter 6 Title Blocks

PROMASTER 136 WB LOW ROOF WALL LINERS INSTALLATION INSTRUCTIONS

v. 8.0 GMS 8.0 Tutorial GIS Module Shapefile import, display, and conversion Prerequisite Tutorials None Time minutes

PLANLAB: A Planetary Environment Surface & Subsurface Emulator Facility

Label Dispenser Option

Moving Man - Velocity vs. Time Graphs

Algorithms and Data Structures CS 372. The Sorting Problem. Insertion Sort - Summary. Merge Sort. Input: Output:

ME 434 MEMS Tuning Fork Gyroscope Amanda Bristow Stephen Nary Travis Barton 12/9/10

Intelligent Technology for More Advanced Autonomous Driving

ETICA E GOVERNANCE DELL INTELLIGENZA ARTIFICIALE

Lesson 4 Extrusions OBJECTIVES. Extrusions

Prasanth. Lathe Machining

Project 14361: Engineering Applications Lab

Transcription:

Subway simulator Case study Marco Scotto 2004/2005

Outline Requirements Use cases Class Identification Class Diagrams Sequence & Activity Diagrams 2

Vision of the subway control system Terminal station S tation Left track S tation Terminal station Train Train Train Right track Develop a system whose purpose is to control a subway line where trains run with no driver Line is composed by two tracks, one in each direction Along the line, there is a sequence of stations, where the trains must stop In the two terminal stations, the trains change direction, passing to the opposite track 3

Trains The train movement is controlled by signals. Red signal: the train must stop until the signal color changes to green Green signal, the train may proceed Protection signals are placed before any station, to control the entrance to the station. becomes green when the tail of the train overcomes the next start signal Start signals are placed and at the end of the station platform to allow trains to exit safely becomes green if the tail of the train overcomes the next protection signal Protection signal Train Start signal Start signal Platform Station Protection signal 4

Sensors Sensors on the tracks signal when the head of a train goes over a signal, the tail of the train goes over a signal. Sensors on the train signal that all its doors are closed. Trains are prevented from starting when any door is open. Control System The subway control system must manage the signal state the train speed The subway control system is also equipped of a simulator of train movement. to check the effectiveness of the control system in absence of the actual railway simulates the running of the trains, and the activation of track sensors 5

Scenario Trains go along the line in both ways A train: stops at every station opens its doors lets them open for a given time period depending on the station it closes the doors if such operation is successful and if no train is present on the track between it and the following station (the start signal is green), it leaves 6

Outline Requirements Use cases Class Identification Class Diagrams Sequence & Activity Diagrams 7

Actors User a person in charge of setting-up and running the system. Sensor an external device signaling the presence of a train Train 8

Use cases (simulator) Loading the subway Loading the trains Starting the control system Starting the simulation System visualization A train arrives at a signal The tail of a train overcomes a signal Train at a start signal Train at a terminal station Train start command 9

Use cases (UML) 10

Loading the subway A parser reads the file and builds the subway description. If Error: signals the error in an error file and stops A subway is composed of a line with stations and tracks The line: two tracks (left and right direction) along the subway line, there is a sequence of stations, where the trains stop. The track: sequence of track sections line sections connecting two stations station sections 11

Loading the trains The user defines the trains specifying their data in a file with a proper format A parser reads the file and builds the train descriptions. If error: signals the error in an error file and stops Train data include their identifier, length, acceleration, deceleration and maximum speed. A train cannot be longer than a track section Trains must be on station sections, stopped at start signals 12

Starting the control system After loading the subway and trains description, the user gives the system the command to start The software connections to actual track and train sensors are made. These sensors are initialized and checked A consistency check of the whole system is made If OK: the control system is started Else, the errors are signaled 13

Starting the simulation Simulator allows simulation of: the running of the trains to check the effectiveness of the control system in absence of the actual railway computes the train movement generates the proper sensor output signals, and the door closed signals the activation of track sensors The user gives the system the command to start the simulation of the system When the simulation is started, the user may visually control the system and the train motion 14

System visualization A user interface shows: the line the train positions on the line the color of the signals is updated at every event concerning train movement the user may stop the simulation with a proper command 15

A train arrives at a signal Signals are always positioned at the end of track sections Every signal is associated to a track end sensor If the head of the train is at a signal the sensor signals to the system the event If the signal is red: the train stops (until the signal changes it color) green: the train proceeds (adjusting its movement to reach the train s maximum speed) The train movement is computed: trying to minimize the time the train takes to arrive to the next signal taking into account train acceleration, deceleration and maximum speed the velocity the train must have when its head arrived to the next signal (always zero in this case study) When the train overcomes a signal, the signal s color immediately changes to red 16

The tail of a train overcomes a signal When the tail of the train overcomes a signal, the sensor signals to the system the event The overcome signal remains red, but the signal before it becomes green, since the protected track section is now free 17

Train at a start signal At a start signal train always stops and opens its doors the train is in a station, and must let passengers exit from and enter into the train accomplished by letting the start signal always being red After a proper time delay, depending on the station, the train closes its doors the doors sensors sense that they are closed the start signal may change color If there is a train on the line section after the station section ended by the signal, this remains red becomes green when the tail of the train will free the section If there is no train on the two subsequent sections, it becomes green 18

Train at a terminal station A train can enter a terminal station only if no other train is in on its sections Once arrived at the end of the platform, where there is a signal whose color is always red, the train: changes direction is ready to leave the station, when the start signal becomes green Start signal Start signal (always red) Platform Protection signal Station 19

Train start command A train is stopped in front of a signal whose color became green: the control system sends the train a start command The train computes its optimal motion up to the next red signal, and follows this motion trying to minimize the time the train takes to arrive at zero speed to the next red signal, taking into account train: acceleration, deceleration maximum speed 20

Outline Requirements Use cases Class Identification Class Diagrams Sequence & Activity Diagrams 21

Nouns user subway layout file with a proper format parser description error error file line station track left and right direction subway line train sequence track section line section station section protection signal access start signal interchange section terminal station course way identifier name length meter delay minimum time train door sensor head of a train tail of the train succession of stations and line sections data length value second acceleration deceleration maximum speed speed train direction Km/hour m/sec2 command to start (simulation or system) software connection track sensor train sensor check of consistency control system simulator train movement effectiveness absence railway activation sensor output signal door closed signal train motion user interface train positions color of the signal event command end of section track end sensor red green time passenger time delay doors sensor platform start command (from a signal) 22

Nouns (continued) Entities external to the system: User, file with a proper format, error file, passenger, train door, platform. Synonyms: Railway (subway), subway line (line), course (direction), way (direction), succession of stations and line sections (line), length value (length), track end sensor (track sensor), train sensor (doors sensor) Nouns denoting actions: Access, command to start (simulation or system), check of consistency, train movement, activation, train motion, command 23

Nouns (continued) Low-level data, attributes, data types: Left and right direction, identifier, name, length, meter, delay, minimum time, second, acceleration, deceleration, maximum speed, speed, train direction, Km/hour, m/sec2, train position, color of the signal, red, green, time, time delay Irrelevant nouns: Layout, description, sequence, data, software connection, effectiveness, absence, user interface Potential objects of the system: Subway, parser, line, error, station, track, train, track section, line section, station section, protection signal, start signal, interchange section, terminal station, sensor, track sensor, control system, simulator, sensor output signal, door closed signal, event, doors sensor, start command (from a signal) To be defined: Head of a train, tail of the train, end of section 24

Classes Objects describing the layout of the subway Subway, line, station, track, track section, line section, station section, protection signal, start signal, interchange section, terminal station, sensor, track sensor Objects describing the trains and their movement Train, sensor output signal, door closed signal, event, doors sensor, start command (from a signal) System objects and design objects Parser, error, control system, simulator 25

Class Diagram 26

Note Class Line simply holds two tracks, and has no specific data or behavior It can be merged with class Subway A Sensor should have an identifier. Track Sensor and Signal are a kind of Device (a more complex hierarchy, with class Device at its root) In the model, there are obvious constraints, such as: A LineSection is associated to the protection signal at its end A StationSection is associated to the start signal at its end A TerminalStation has an InterchangeSection 27

Class Diagram (adjusted) 28

Note Relationships among Stations and TrackSections are clumsy. A Station has two StationSections, and this association is inherited by class TerminalStation, clearly referring to InterchangeSection. Unclear if (terminal station) a TerminalStation has a single InterchangeSection, or one InterchangeSection and two other track sections In reality, a TerminalStation contains three TrackSections, but here: Start signal Interchange section Platform Protection signal Terminal Station 29

Class Diagram (adjusted) 30

First Iteration: Subway Parser The subway parser is an object able to read from a file the description of a subway, and to create the corresponding subway objects the key object of the subway parser the parser itself object holding the station data (StationRecord registers all station data reported in the description file) 31

Subway Parser (class diagram) 32

Subway Dynamic Objects The dynamic objects continuously change states during the simulation the train has a position on a track section, a speed and a doors status (open or closed) the signal has a color the simulator manages an event queue. The events that may occur during the simulation are: a train is put on a track section (when the simulation starts) a train head arrives at a signal a train tail overcomes a signal the doors of the train are closed the simulation is ended 33

Event hierarchy 34

Insert into the queue the events of train inputs Event queue Pop from the queue the event with lower time Executes the event possibly generating and inserting other events into the queue is the queue empty? NO YES End of simulation 35