MECH 567 – Systems Architecture “Modeling Systems Architecture Structures in SysML” Stephen Milton and Sandra Biedron Stephen.Milton@colostate.edu , Sandra.Biedron@colostate.edu (970) 491-8742 Introduction Modeling is defined as a simplification of reality that has utility. Models can come in a variety of forms of simplification including mathematical models (Equations), physical models (mockups), visual models (design drawings/plans), and text models (specifications, descriptions). Models can also have a variety of utilities including organization, visualization, documentation, hypothesis testing, etc. For all of these reasons, we want to be able to model systems architectures. The most common modeling language used in software systems engineering has been UML (unified modeling language). SysML (system modeling language) provides a set of extensions to UML that augments the capabilities of UML in dealing with larger-scale and more generic systems. For the purposes of this course, SysML will serve as an exemplar of a systems architecture modeling language. It will be the primary way that we document and communicate systems architectures in the course. Semester-long Laboratory Learning Objectives 1. Exemplify SysML modeling concepts 2. Gain experience with all of the diagrams required to interpret and design systems architectures using SysML 3. Model physical systems in SysML 4. Model processes/enterprises in SysML 5. Model requirements in SysML The authoritative reference for using SysML is entitled, “OMG Systems Modeling Language (OMG SysML™).” It is available for no cost at http://www.omg.org/spec/SysML/1.3/. You are encouraged to use the language definition document as the ultimate authority on SysML for this course, although these laboratories, and the reference text should provide you some value in distilling and exemplifying the use of SysML. In the laboratory section, we will try to learn how to use SysML by meeting the semester-long, learning objectives above. SysML has three kinds of modeling abstractions: structural modeling, requirements modeling and behavioral modeling. These are show diagrammatically as a SysML Block Definition Diagram in Figure 1. 1 Figure 1. SysML v1.3 Diagram Taxonomy SysML has 4 types of structural models. Each will be useful for different parts of the architecture definition process. 1. 2. 3. 4. Block Definition Diagram Package Diagram Internal Block Definition Diagram Parametric Diagram Task 1 – Structural Modeling (in General) Structural modeling of complex systems is perhaps the most fundamental of all organizational systems. It is found in many aspect of human thought from biological classification, to philosophy, to (of course) descriptions of complex technical systems. Structural modeling attempts to represent a system through its entities and relationships. There are various means that people have devised to document structural models, but the essence of each one is this concept of entities and relationships. A rudimentary example of this form of modeling is a structure chart. Figure 2. IEEE Structure Chart In general, the weaknesses of these types of structure charts are that they can only express a single type of relationship: a hierarchical relationship. Hierarchies are a classical means to express the relationship among physical entities. Linnaean taxonomy, “modern” corporate structure, and feudalism are all derived from (and describable by) hierarchies. 2 For more complex systems, we will require a more complex model of the structure of a system. Task 2 – Structural Modeling in SysML We will learn to perform SysML structural modeling by starting out today with the Block Definition Diagram (BDD). There are two key elements in the BDD: Blocks (which represent things) and Associations (which relate blocks). In general SysML blocks should represent nouns, whereas the associations between them can be verbs. First, we can seek to understand SysML blocks by modeling a system component using a SysML block. Let us start this project the same way that you should start any of your systems architecting projects: with “pencil and paper.” Let’s think about modeling the structure of the system that allows us to drive to work in a car. To restrict ourselves to thinking at an architectural level, please aim for 5-7 blocks. Now of course, we need to connect these blocks to define the relationships between them. There are a few key relationships that have symbols allocated to them in SysML. Association is the simplest relationship and is represented by a simple line. Associations are usually described using verbs and the relationship then has a natural sentence like syntax. 3 If a system is made up of an aggregation of subsystems, then they are connected using the symbol “◊“ and can be though of “is made up of”. For instance, the traffic signal is part of the traffic management system, then we can connect these two blocks with this aggregation relationship. If a system is composed of subsystems such that deleting the part deletes the whole, then they are connected using the symbol “ “. For instance, the pole of the traffic signal is part of the traffic signal, and the traffic signal is without value once the pole is deleted, it “is composed of”. So in this case, we can connect these two blocks with this composition relationship. If we would like to express a specialization/generalization relationship, then the blocks are connected using the symbol “∆ “, “is a type of” in one direction and “has types” in the other direction. For instance, traveler-controlled systems might include the car, the garage door, the parking meter. We could also generalize some of our other blocks into operator-controlled, and uncontrolled systems. 4 A wide variety of other relationships are available in SysML. You can define any relevant relationship between blocks by labeling the connector. For instance, describe the relationship between the car and the road. Task 3 – Starting up UML and SysML Modeling Programs To add a bit more formality to our models of systems, we are going to use some software that will allow us to “draw” more accurate and clear representations of our model. Althouhg there are a number of choices to use out there for such modeling, here we will provide two choices, Visio and LucidGraph. In the past we were able to use Visio 2007 on the ENS VirtualLab server. Unfortunately, Visio 2007 is out-of-date and not supported. To compound matters Visio 2013, the most recent version, is not supported on the Virtual Lab server. As a CSU student you can get a free copy of Visio 2013 from MicroSoft DreamSpark https://www.engr.colostate.edu/ens/info/software/dreamspark.html. You will need to request from ENS a username and password and then you will be able to download the programs. Also needed are SysML Visio stencils. Copy this set of files1 to a directory. These files are SysML stencils for Visio, but we will use both SysML and UML to perform systems architecture modeling. Install and start Visio 2013, and begin a new file by clicking on File>New>Personal>SysML 1.0, as shown in Figure 2. If you would like to work using the UML stencils, then you need just double click on the stencil that you would like to use (“Class” for today’s exercises). 1 http://www.omgsysml.org/ 5 Figure 3. Starting the SysML template in Visio As an alternative to Visio, we have obtained 40 licenses to use LucidChart www.lucidchart.com. This is a web-based tool that similar capabilities to Visio. To use it you will need to be added to the “team”. I can add you, but first you will need to send me an email from your preferred email account. I will add you to the team and send you back information on how to access the software. LucidChart is new to us, but it might offer us as a class some interesting additional possibilities as it allows easy exchange of generated charts. This might be very useful for the distance people in the class as they might be able to work together in groups. It supports UML and I have imported into it the same Visio stencils as used in Visio above. As a class we will give it a “test drive” and see how well it works for us. In the end it will really boil down to a matter of preference. Task 4 – Structural Modeling in SysML and Visio or LucidGraph Now that we have a software to develop SysML and UML models, we can start to add more complexity to our systems models. For example, let’s add more information to the model of a cat. In this case, the cat has some behavior that is represented by the function Bite(). We can link the SysML block definition diagram to a behavioral diagram with the objective of describing the behavior of the block in more detail. Cat Block Attributes and data types Block Title Awake : bool Bite(you) : bool 6 Operations (operands) : data type of result This syntax provides us with the ability to associate behavior with our structural entities. This will be useful when we start to perform behavioral system modeling. Task 4 – Simple Structural Modeling in SysML and Visio or LucidGraph For an example of a simple structural model in SysML, let us interpret the diagram below together. Task 5 – Homework Construct (by hand) 2 block definition diagrams using the SysML BDD components that we have discussed today for any engineering systems of your choice. One diagram must represent a simple system and one must represent a complicated system as measured by the sum of the number of blocks and relationships. Simple systems have 7±2 blocks and relationships, medium systems have (7±2 )2 blocks and relationships. I will evaluate your diagrams on their correct usage of all of the aspects of the BDD that we defined today. Please feel free to include some narrative description, especially since I may not be an expert on your system. You may type directly into this document, please replace my name with yours in the header. Due Jan 27th, 2014, 11:59pm, MST. Turn in by email to milton@engr.colostate.edu using the subject line “567 HW1 – YourLastName” in pdf format. 7