Modelling of signal - level crossing system
Abstract
The author presents an object-oriented model of a railway level-crossing system created for the purpose of functional requirements specification. Unified Modelling Language (UML), version 1.4, which enables specification, visualisation, construction and documentation of software system artefacts, was used. The main attention was paid to analysis and design phases. The former phase resulted in creation of use case diagrams and sequential diagrams, the latter in creation of class/object diagrams and statechart diagrams.
Full text
Modelling of signal – level crossing system 151 MODELLING OF SIGNAL - LEVEL CROSSING SYSTEM D. Novák Czech Railways, joint stock company, Nábeží Ludvíka Svobody 1222/12, 110 15 Praha 1 e-mail: [email protected] Summary The author presents an object-oriented model of a railway level-crossing system created for the purpose of functional requirements specification. Unified Modelling Language (UML), version 1.4, which enables specification, visualisation, construction and documentation of software system artefacts, was used. The main attention was paid to analysis and design phases. The former phase resulted in creation of use case diagrams and sequential diagrams, the latter in creation of class/object diagrams and statechart diagrams. 1. INTRODUCTION For the purpose of modelling of a concrete railway application a system of railway levelcrossing installation was chosen. Resource for requirements laid on the model is informal specification of functional requirements according to the Czech Technical Standard SN 34 2650 [2] and European Standards applicable for railway applications. Nowadays, there is variety of tools, which support such a process. It is important to support not only solution of problems connected with specification and coding, but also problems connected with validation of designed software solution. One of possible techniques usable for making such models seems to be the Unified Modelling Language. Contribution of application of an objectoriented modelling can be seen in consolidation of principles and approaches when designing a documentation. Then in simplifying of design software process. And last, in developing suitable background for communication not only among developing teams, but also for next subjects, which are involved in validation and verification process. Advantages of the use of UML for functional requirements specification in the railway signalling and interlocking domain and benefits of such an approach were discussed e.g. in [3] [4] [5]. 2. THE USE OF UML FOR DEVELOPMENT OF A MODEL OF THE SYSTEM OF A LEVEL - CROSSING INSTALLATION For developing of a model of the system of level crossing installation the UML, version 1.4, which enables specification, visualisation, construction and documentation of software system artefacts, was used. The UML is compatible with many software tools. Specification expresses a principle of designing precise, clear and complete requirements. Visualisation means a graphical language. Construction responds to a requirement of direct connecting of language with variety of programming languages. To create each model of system, the UML offers diagrams, which enable catching of various aspects of the system. There were three basic views and connected diagrams used in the paper. Use Case diagram enables functional view. Class/object diagram enables logical view. And Sequential diagrams and Statechart diagram enable dynamic view. An important aspect of the UML using is no restrictions on the model [1]. Although the UML contains the set of rules, main aim is to create a comprehensible model. After considering of all aspects, the software tool Rhapsody, version 4.0, was chosen and used for creating a model and its animation. 3. MODEL OF THE SYSTEM OF A LEVEL CROSSING INSTALLATION The main attention was paid to analysis and design phases. The former phase results in use of case diagrams and sequential diagrams, the latter in use of class/object diagrams and statechart diagrams. 4. USE CASE DIAGRAM Use Case diagram shows a system from external user’s point of view. In this phase of analysis only terminology of natural language as well as terminology of problem domain are used to describe functional skeleton of the system most precisely and clearly. Each of the scenery describes sequence of events. On the left side of Use Case Diagrams participants are visualised, which initialise sequences or accept their outputs. On the right side a participant is, which only accepts outputs of sequences. The participants, which initialise sequences are Service Employee (ObslZam), Railway vehicle (ZKV) and Maintenance Employee (UdrzZam). The only acceptor of outputs of sequences is Road User (UzivSilKom). Mutual relations between these elements result from Use Case Diagram.
Advances in Electrical and Electronic Engineering 152 5. CLASS DIAGRAM Class Diagram consists of classes, it means by groups of things with similar character and the same object of this class communicates only with the objects of cLog class and cDop class. U drzZam Pejezdov é zabezpeovací zaízení O dstraneniP or B ezporS tav V ys trS ig P ozitivniS i g P oruchS tav NouzovyS tav V arov S ig V yhodnoc P oruc hy O bslZam U z ivS il K om ZK V Pejezdov é zabezpeovací zaízení Fig. 1. Use Case Diagram of Model of a level-crossing installation or similar behaviour, which are mutually linked by static (not changing in time) relations. An intention is to catch static aspect of a modelled domain of solution. In a model of the level-crossing installation the following classes were created. The most important class depicted in diagram is cLog class, which represents the core of the system. Installed object of the class, except of providing its own operations also communicates with all the objects from next classes. Class cKolej1 defines track line on which operating elements for level-crossing installation operated by railway vehicle driving are set down. Installed objects of this class communicate only with the objects of cLog class. cSMO class defines the set of operating elements physically situated in the domain of levelcrossing installation, so-called local control box. The way of operating and setting of priority operating criteria is given [2]. Installed objects of this class communicate only with the objects of cLog class. cVys class defines an alarm block, in which all types of alarms are implemented - light, sound and mechanical alarms provided by system. Installed cDop class defines the set of operating and contol elements, which are physically situated in the station. Installed object of this class communicates with the objects of cLog class and cVys class. 6. SEQUENCE DIAGRAM Sequence Diagram consists of the drawn objects, messages drawn as full arrows and time, which is depicted by vertical sequence of the diagram. Sequence Diagram describes the way, how the objects communicate in time [1]. Sequence Diagram can be obtained by animation of the model of the level-crossing installation. 7. STATE DIAGRAM One of the possibilities how to describe changes of the system is to declare the changes of the each element state with respect to time. This change of state is a reaction on an event or time. All these changes can be described by the State Diagram [1]. Function of the system results from informal specification of functional requirements mentioned in the introduction. In the model of a level-crossing installation each class has its own state diagram. Objects of classes: cKolej1, cLog, cSmo, cDop and cVys have their own state diagrams. Level crossing system Emergency State Failure-free State Failure State Removing of Failure Evaluation of Failure CautionarySig WarningSig PositiveSig
Modelling of signal – level crossing system 153 SMO Neaktivni> MistniOtevreni> MistniUzavreni> evNeakt evMU/Log->GEN(evLogMOoff()); evNeakt evMO evMU Fig. 2. State Diagram of the class cSmo 8. CONCLUSIONS European Safety Standards for railway applications come out of safety system life cycle. The life cycle is divided into phases, which involve a complex of activities: from designing of safety system conception, a definition of safety system and conditions of using to exemption of the safety system from operation and its disposal. The part of safety system life cycle is also a specification of functional and safety requirements. It is necessary to design a model during the process of specifying requirements, which enables testing of complexity and soundness of specification. A design of such a model is time-consuming, and so such methods and processes are necessary to choose, that the model can be used also in following phases of safety system life cycle. For this purpose object-oriented modelling connected with object-oriented programming is suitable to successfully use. An example of the object design application – a model of the system of a level-crossing installation, created based on definition of informal specification of functional requirements, is presented in the paper. REFERENCES [1] SCHMULLER, J. Myslíme v jazyku UML,Grada Publishing, 2001. [2] SN 34 2650 Železniní zabezpeovací zaízení – Pejezdová zabezpeovací zaízení, eský normalizaní institut, Prague, 1998. [3] RÁSTONÝ K ., JANOTA, A., ZAHRADNÍK J.: The Use of UML for Development of a Railway Interlocking System,: “Lecture Notes in Computer science”, Springer -Vertag Heidelberg, ISSN 0302-9743, 2004 [4] JANOTA, A. - RÁSTONÝ, K. - ZAHRADNÍK, J.: The Use of UML in Design of Railway Interlocking Systems. In: international scientific conference Transport in the 21 st Century, Warszawa, 19 – 21 September 2001, s. 93 – 100 [5] JANOTA, A. - ZAHRADNÍK, J.: UML – An Object Oriented Approach to Formal Specification of Safety Relevant Systems. In: 4 th international scientific conference ELEKTRO 2001, Section 2 & 3:Telecommunication systems and services & Control of Information and Safety Systems, 22 - 23 May 2001, EDIS Žilina, Slovak Republic, 2001, s. 37 – 42, ISBN 80-7100-837-0 NonActive> LocalOpened> LocalClosed>