thinks y sml tutorials

Upload: nyquisttt

Post on 02-Jun-2018

233 views

Category:

Documents


3 download

TRANSCRIPT

  • 8/10/2019 Thinks y Sml Tutorials

    1/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 1

    Think SysM Tutorials

    Think SysML

    TutorialsPeter L. Jackson

    Professor

    Systems Engineering Program

    School of Operations Research and Information Engineering

    Version 2 August, 2012

  • 8/10/2019 Thinks y Sml Tutorials

    2/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 2

    Think SysM Tutorials

    1 Executive SummaryThis document is a collection of tutorials for using SysML, the Systems Modeling Language,

    with Topcased, a free, open source SysML editor. These tutorials are intended for use in a graduate coursein Model-Based Systems Engineering at Cornell University but they are made publicly available on the

    Think SysML website (www.thinksysml.org) which is hosted by the Cornell Systems Engineering

    Program. The purpose is to promote the widespread use of SysML.

    The theme of the website is Think SysML, that is, use SysML for as many applications as you

    can think of. Only by frequent use will you become comfortable with its constructs and only by many

    people using it will the language grow and develop. In the spirit of Think SysML, we have chosen to

    write these tutorials using SysML. Each tutorial is expressed as an activity diagram: a sequence of steps to

    follow, with documentation attached to each step. The activity diagrams are stored in a single SysML

    model, called Tutorial. You can view the structure of the model by visiting the Tutorial page of the

    Think SysML website and clicking on TutorialTree.

    This document was generated automatically from the SysML model, Tutorial, using a custom

    script and Microsoft Word template. One of the tutorials will introduce you to this feature.

  • 8/10/2019 Thinks y Sml Tutorials

    3/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 3

    Think SysM Tutorials

    2 Contents1 Executive Summary .............................................................................................................................. 2

    2 Contents ................................................................................................................................................ 3

    3 Tutorial Group: Installation And Setup ................................................................................................ 5

    3.1 Tutorial:Install SysML Editor ....................................................................................................... 6

    3.2 Tutorial:Install Eclipse Plugins ................................................................................................... 16

    3.3 Tutorial:Install OpenModelica .................................................................................................... 19

    3.4 Tutorial:Install Think SysML Scripts ......................................................................................... 25

    3.5 Tutorial:Import Watch Project .................................................................................................... 27

    3.6 Tutorial:Import Simple Parametric ............................................................................................. 32

    4 Tutorial Group: Explore Parametric Model ........................................................................................ 41

    4.1 Tutorial:Explore and Configure Workspace ............................................................................... 42

    4.2 Tutorial:Solve Parametric Model ................................................................................................ 56

    5 Tutorial Group: Explore FSAE Racecar Model .................................................................................. 70

    5.1 Tutorial:Install FSAE Racecar Project ........................................................................................ 71

    5.2 Tutorial:Take Tour of FSAE Racecar ......................................................................................... 78

    6 Tutorial Group: Generate FSAE Racecar Report.............................................................................. 111

    6.1 Tutorial:Prepare for Document Generation .............................................................................. 112

    6.2 Tutorial:Generate, Explore, Modify and Update Report .......................................................... 117

    7 Tutorial Group: Create SysML Models ............................................................................................ 135

    7.1 Tutorial:Create a Mission Statement ......................................................................................... 136

    7.2 Tutorial:Create and Apply a Stereotype .................................................................................... 154

    7.3 Tutorial:Create a Context Diagram ........................................................................................... 173

    7.4 Tutorial:Create a Use Case Diagram ........................................................................................ 183

    7.5 Tutorial:Create an Activity Diagram ........................................................................................ 188

    7.6 Tutorial:Create a Requirements Diagram ................................................................................. 198

    7.7 Tutorial:Repeat for Another Use Case ...................................................................................... 202

    7.8 Tutorial:Create a State Machine Diagram................................................................................. 207

    8 Tutorial Group: Conduct Performance Analysis ............................................................................... 212

    8.1 Tutorial:Add MOE to Profile .................................................................................................... 213

    8.2 Tutorial:Add MOEs to Model ................................................................................................... 222

  • 8/10/2019 Thinks y Sml Tutorials

    4/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 4

    Think SysM Tutorials

    8.3 Tutorial:Add Technical Performance Measures ....................................................................... 234

    8.4 Tutorial:Add Constraint Block for Pendulum Relations ........................................................... 242

    8.5 Tutorial:Add Generic Constraint to Library ............................................................................. 252

    8.6 Tutorial:Build Parametric Model of Height Calculations ......................................................... 259

    8.7 Tutorial:Test Model with OpenModelica.................................................................................. 271

    8.8 Tutorial:Add Remaining Constraints to Library ....................................................................... 276

    8.9 Tutorial:Complete Parametric Model of Catapult ..................................................................... 282

    8.10 Tutorial:Debug Model with OpenModelica .............................................................................. 303

    8.11 Tutorial:Conduct Performance Optimization ............................................................................ 309

    9 Tutorial Group: Develop an Architecture ......................................................................................... 316

    9.1 Tutorial:Import Pre-Constructed Model ................................................................................... 317

    9.2 Tutorial:Explore Pre-Constructed Model .................................................................................. 320

    9.3 Tutorial:Create Integrated Behavior Model .............................................................................. 329

    9.4 Tutorial:Create Integrated Structure Model .............................................................................. 347

  • 8/10/2019 Thinks y Sml Tutorials

    5/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 5

    Think SysM Tutorials

    3 Tutorial Group: Installation And Setup

    Figure 1 Overview of "Installation And Setup"

    This collection of tutorials guides you through the process of setting up your computer to use the

    Topcased editor for SysML and to import some pre-built models to get you started.

  • 8/10/2019 Thinks y Sml Tutorials

    6/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 6

    Think SysM Tutorials

    3.1 Tutorial:Install SysML Editor

    Figure 2 Overview of "Install SysML Editor"

    This tutorial explains how to download and install the Eclipse development environment and theTopcased editor.

    3.1.1 Is JRE Installed?

    JRE stands for the Java Runtime Environment. To discover if JRE is installed on your system, goto the Java website and click on the test link: http://www.java.com/en/download/testjava.jsp.

    The link is labelled "test the currently installed version of Java." If {true} then go to the step called "Navigate your browser to ThinkSysML-3rd Party."

    If {false} then go to the step called "Install Java Runtime Environment."

  • 8/10/2019 Thinks y Sml Tutorials

    7/351

  • 8/10/2019 Thinks y Sml Tutorials

    8/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 8

    Think SysM Tutorials

    3.1.6 Unzip the file into a location of your choice.

    We suggest unzipping the file into the Program Files (x86) directory. The detailed steps are:

    1. Locate the downloaded file in the Downloads directory.

    2. Right-click the file and select "Extract all".

    3. In the "Select Destination" dialog, navigate to c:\Program Files (x86) and click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    9/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 9

    Think SysM Tutorials

    4. Wait for the unzipping process to complete.

    3.1.7 Launch eclipse

    Find the executable program called "eclipse" in the Topcased-4.3.0 directory and double-click it.

  • 8/10/2019 Thinks y Sml Tutorials

    10/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 10

    Think SysM Tutorials

    3.1.8 Was Launch Successful?

    Eclipse may fail to launch if the Java Runtime Environment is not installed. For other trouble-shooting ideas, consult the Topcased installation guide.

    If {Successful} then go to the step called "Create a workspace."

    If {Unsuccessful} then go to the step called "Consult Topcased Installation Guide."

    3.1.9 Consul t Topcased Installation Guide

    Go to the Topcased/Downloads site(http://www.topcased.org/index.php?idd_projet_pere=52&Itemid=60) and download theInstallation Guide.

  • 8/10/2019 Thinks y Sml Tutorials

    11/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 11

    Think SysM Tutorials

    3.1.10 Create a workspace

    When Eclipse first launches it asks to create a workspace. We recommend creating a workspacein a location of your choice. In the images below, we show the creation of a workspace as a newfolder: "c:\ThinkSysML".

    3.1.11 Select a workspace

    From now on, whenever Eclipse launches it will prompt you to choose a workspace. Use the"Browse" button to select the one you created in the previous step.

  • 8/10/2019 Thinks y Sml Tutorials

    12/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 12

    Think SysM Tutorials

    3.1.12 Check for success

    If you have been successful to this point, your screen should look something like this:

    If it does, then you have the correct perspective open. If eclipse opens with a differentperspective, it might look like this:

  • 8/10/2019 Thinks y Sml Tutorials

    13/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 13

    Think SysM Tutorials

    In that case, you need to open the Topcased Modeling Perspective (next step).

    3.1.13 Is Topcased Modeling Perspective Open?

    3.1.14 Open Topcased Modeling Perspect ive

    1. From the Window menu of Eclipse select Window->Open Perspective->Other as shown:

    2. Select "Topcased Modeling" in the resulting dialog and click "OK":

  • 8/10/2019 Thinks y Sml Tutorials

    14/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 14

    Think SysM Tutorials

    3. The resulting perspective should show a "Navigator" tab in the upper left corner of the Eclipse

    workbench. That tab will be the starting point in subsequent tutorials.

  • 8/10/2019 Thinks y Sml Tutorials

    15/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 15

    Think SysM Tutorials

    3.1.15 Advance to the next tutorial

    If you are viewing this documentation in a browser from the link "Tutorial Tree", return to thenext higher level diagram for a suggestion as to what tutorial to visit next. There are navigationbuttons at the top of the diagram window:

  • 8/10/2019 Thinks y Sml Tutorials

    16/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 16

    Think SysM Tutorials

    3.2 Tutorial:Install Eclipse Plugins

    Figure 3 Overview of "Install Eclipse Plugins"

    The custom ThinkSysML scripts use open source plugins to the Eclipse framework that are notpart of the Topcased download. This tutorial shows how to download and install these plugins.This tutorial assumes that you have installed Topcased.

    3.2.1 Navigate your browser to the SWTChart download site

    These tutorials were developed for a particular version of SWTChart (an eclipse plugin). Toensure that you download the correct version, a copy has been placed on the Think SysMLwebsite.

    Go to the Think Sysml Third Party page (http://thinksysml.org/ThirdParty.html)

  • 8/10/2019 Thinks y Sml Tutorials

    17/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 17

    Think SysM Tutorials

    3.2.2 Download the SWTChart jar file

    Click the "SWTChart 7.0 Download" link ( org.swtchart_0.7.0.v20110128.jar).

    3.2.3 Locate and copy the SWTChart jar file

    Locate the SWTChart jar file in the plugins folder of the downloaded SWTChart zip file. Copythis file to the clipboard (C).

    3.2.4 Paste the SWTChart jar file into Topcased-Plugins

    Navigate your file explorer to the Topcased/plugins folder and paste the SWTChart.jar into thisfolder.

  • 8/10/2019 Thinks y Sml Tutorials

    18/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 18

    Think SysM Tutorials

  • 8/10/2019 Thinks y Sml Tutorials

    19/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 19

    Think SysM Tutorials

    3.3 Tutorial:Install OpenModelica

    Figure 4 Overview of "Install OpenModelica"

    3.3.1 Navigate your browser to ThinkSysML-3rd Party

    These tutorials were developed using OpenModelica 1.6. To ensure that you download thecorrect version, a copy has been placed on the Think SysML website.

    Go to the Think Sysml Third Party page (http://thinksysml.org/ThirdParty.html)

  • 8/10/2019 Thinks y Sml Tutorials

    20/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 20

    Think SysM Tutorials

    3.3.2 Download OpenModelica

    Click the "OpenModelica 1.6 Download" link (OpenModelica-1.6.0-revision-7524.msi).

    3.3.3 Run Installation Program

    Navigate to the Downloads folder and double-click on the installation program ("OpenModelica-

    1.6.0-revision-7524.msi").

    After you have launched the installation program and given Windows permission to proceed, youwill see a welcome screen like this:

  • 8/10/2019 Thinks y Sml Tutorials

    21/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 21

    Think SysM Tutorials

    Click 'Next'. On the next screen, check to be sure that the default directory is"C:\OpenModelical1.6.0\".

  • 8/10/2019 Thinks y Sml Tutorials

    22/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 22

    Think SysM Tutorials

    Click "Next".

  • 8/10/2019 Thinks y Sml Tutorials

    23/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 23

    Think SysM Tutorials

    Click "Next".

  • 8/10/2019 Thinks y Sml Tutorials

    24/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 24

    Think SysM Tutorials

    Click "Close". OpenModelica is now installed.

  • 8/10/2019 Thinks y Sml Tutorials

    25/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 25

    Think SysM Tutorials

    3.4 Tutorial:Install Think SysML Scripts

    Figure 5 Overview of "Install Think SysML Scripts"

    This tutorial explains how to download and install custom ThinkSysML scripts and plugins.

    3.4.1 Navigate to ThinkSysML Script Site

    Navigate your browser to the ThinkSysML page for scripts: http://thinksysml.org/Scripts.html

  • 8/10/2019 Thinks y Sml Tutorials

    26/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 26

    Think SysM Tutorials

    3.4.2 Download ThinkSysMLScripts zip file

    Download the file "SysML2ModelicaPlugIn.zip" by clicking on the link.

    3.4.3 Locate the SysML2Modelica jar file

    Locate the SysML2Modelica jar file in the plugins folder of the downloaded zip file. Copy thisfile to the clipboard (C).

    3.4.4 Paste the SysML2Modelica jar file into Topcased-Plugins

    Navigate your file explorer to the Topcased/plugins folder and paste the SysML2Modelica jarfile into this folder.

  • 8/10/2019 Thinks y Sml Tutorials

    27/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 27

    Think SysM Tutorials

    3.5 Tutorial:Import Watch Project

    Figure 6 Overview of "Import Watch Project"

    The Topcased website includes a SysML model describing a digital watch. This tutorialdescribes how to download the project and import it directly into your Topcased workspace. Itillustrates how you can import existing projects into your workspace.This tutorial assumes you have installed the Topcased software and created a workspace called

    'ThinkSysML.'

    3.5.1 Navigate to the Think SysML Third Party Webpage

    These tutorials were developed for a particular version of the Watch Project(a SysML model).To ensure that you download the correct version, a copy has been placed on the Think SysMLwebsite.

    Go to the Think Sysml Third Party page (http://thinksysml.org/ThirdParty.html)

  • 8/10/2019 Thinks y Sml Tutorials

    28/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 28

    Think SysM Tutorials

    3.5.2 Download the SysML Model Example

    Click on the link to the SysML model example to download the project zip file.

    3.5.3 Extract all files to your workspace folder

    Using your file explorer, locate the downloaded file in your Downloads folder. Right-click thefile and select "Extract all." Use the browse button to locate your Topcased workspace directory.Click "OK."

    3.5.4 Observe that the example is a complete project

    Using your file explorer, open the Watch (SysML) folder and observe that it contains a projectfile. That is a good indicator that the whole Watch (SysML) folder can be imported into yourTopcased workspace as an existing project.

  • 8/10/2019 Thinks y Sml Tutorials

    29/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 29

    Think SysM Tutorials

    3.5.5 From Topcased, select Import -General-Existing Project

    From the File menu, select Import. A wizard dialog appears. From the first screen, select"General->Existing Projects into Workspace."

  • 8/10/2019 Thinks y Sml Tutorials

    30/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 30

    Think SysM Tutorials

    3.5.6 Locate the Watch(SysML) folder

    Use the browse button to locate the Watch (SysML) folder within your workspace folder. Onceyou have selected this root directory, the wizard should display the Watch (SysML) project asavailable for import.

    3.5.7 Accept the import action

    Click the Finish button. (Do notselect the "Copy files" feature because you have already copiedthe files into the ThinkSysML workspace folder.) A folder for the Watch (SysML) project shouldnow appear in the Topcased Navigator Window.

  • 8/10/2019 Thinks y Sml Tutorials

    31/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 31

    Think SysM Tutorials

    3.5.8 View Digital Watch model

    In the navigator component, double-click on the file "Digital watch.sysmldi". This is the diagramfile for one of the models in this project. Double-clicking should open a graphical editor todisplay this model. Other tutorials may exploit this model.

  • 8/10/2019 Thinks y Sml Tutorials

    32/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 32

    Think SysM Tutorials

    3.6 Tutorial:Import Simple Parametric

    Figure 7 Overview of "Import Simple Parametric"

    The Think SysML website offers several downloadable SysML models. Only the model files aredownloaded, not the full project structure. This tutorial describes how to download one suchmodel (SimpleParametric) and import the model into your Topcased workspace. As part of thistutorial, you will create a temporary folder to hold the downloaded model files. You will alsocreate a SysML project within your workspace to receive such imported models. The tutorialdescribes two ways to import a model from a file folder into a project folder: a menu-basedapproach and a drag-and-drop approach.

    3.6.1 Create a file folder to store down loaded model files

    Use your file explorer to navigate to your workspace folder. We created the workspace folder"ThinkSysML" in an earlier tutorial. Create a new folder called, say, "DownloadedModels" totemporarily hold models you want to import.

  • 8/10/2019 Thinks y Sml Tutorials

    33/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 33

    Think SysM Tutorials

    3.6.2 Navigate your browser to the Think SysML gallery page

    Navigate your browser to the Gallery page of the Think SysML website:http://thinksysml.org/Gallery.html.

    3.6.3 Download the SimpleParametric zip file

    Locate the hyperlink "SimpleParametric.zip" and click on it to download the zip file.

    3.6.4 Uncompress the SimpleParametric model files into the download folder

    Use your file explorer to locate the SimpleParametric.zip file in your downloads folder. Right-click the file and select "Extract all...". Use the browse button to locate the DownloadedModelsfolder you created in the workspace folder earlier in this tutorial. Click OK to uncompress themodel files from the zip file into this DownloadedModels folder. This folder is only for

    temporary use. You may delete it and its contents at the end of the tutorial.

  • 8/10/2019 Thinks y Sml Tutorials

    34/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 34

    Think SysM Tutorials

    3.6.5 Create a new SysML project within your Topcased workspace

    From Topcased select menu item File->New->Project and choose a "Topcased Project" from thefirst wizard page.

    3.6.6 Name the pro ject

    Give the project a name such as "Assorted" to suggest that it will contain diverse models.

  • 8/10/2019 Thinks y Sml Tutorials

    35/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 35

    Think SysM Tutorials

    3.6.7 Open the Models folder of the project

    From the Topcased Navigator, open the Models folder within the "Assorted" project.

    3.6.8 Choose file import method

    The model files must be "imported" into the Topcased project. There are at least two equivalent ways of

    performing the import action: a menu-based approach and a drag and drop approach. Use whichever

    approach you like.

    If {Use drag and drop approach} then go to the step called "Select model files to import."

    If {Use menu-based approach} then go to the step called "From Topcased, select Import-General-

    File System."

    3.6.9 From Topcased, select Import -General-File System

    With the Assorted-Models folder open in the Topcased Navigator, select menu item File->Import->General->File System. Click "Next."

  • 8/10/2019 Thinks y Sml Tutorials

    36/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 36

    Think SysM Tutorials

    3.6.10 Locate downloaded model files folder

    Click the Browse button and select the directory "DownloadedModels" that contains the modelfiles. This is the temporary directory you created in an earlier step.

  • 8/10/2019 Thinks y Sml Tutorials

    37/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 37

    Think SysM Tutorials

    3.6.11 Select model files to import and confirm the import action

    Click "Select All" to import both model files for the SimpleParametric model(SimpleParametric.sysml and SimpleParametric.sysmldi). Click the "Finish" button to confirmthe import action.

  • 8/10/2019 Thinks y Sml Tutorials

    38/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 38

    Think SysM Tutorials

    Now, go to the step named "Import completed."

    3.6.12 Select model files to import

    Use your file explorer to open the DownloadedModels folder within the ThinkSysML folder.Select the two model files for the SimpleParametric model (SimpleParametric.sysml andSimpleParametric.sysmldi).

  • 8/10/2019 Thinks y Sml Tutorials

    39/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 39

    Think SysM Tutorials

    3.6.13 Drag and drop files from file explorer to Topcased project Models folder

    Drag the selected model files from the file explorer window to the Topcased window and dropthem in the Models folder of the Assorted project within the Topcased Navigator.

    3.6.14 Confirm copy action

    Click "OK" to confirm that the model files should be copied into the project. This will completethe import action.

    Now, go to the step named "Import completed."

    3.6.15 Import completed

    3.6.16 Check success of import action

    Using the Topcased Navigator, double-click on the model file "SimpleParametric.sysmldi"within the Models folder of the Assorted project.

  • 8/10/2019 Thinks y Sml Tutorials

    40/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 40

    Think SysM Tutorials

    A graph-based editor displaying the SimpleParametric model should appear within the Topcasedenvironment. This will be the starting point for a later tutorial on parametric diagrams in SysML.

    If this is not the diagram that displays when the model is first opened, try clicking the "Go to theRoot Diagram" button on the menu bar.

  • 8/10/2019 Thinks y Sml Tutorials

    41/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 41

    Think SysM Tutorials

    4 Tutorial Group: Explore Parametric Model

    Figure 8 Overview of "Explore Parametric Model"

  • 8/10/2019 Thinks y Sml Tutorials

    42/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 42

    Think SysM Tutorials

    4.1 Tutorial:Explore and Configure Workspace

    Figure 9 Overview of "Explore and Configure Workspace"

    This tutorial picks up from where the Installation and Setup group of tutorials left off.

    4.1.1 Open SimpleParametric Model

    Locate the file SimpleParametric.sysmldi in the Navigator and double-click it.

  • 8/10/2019 Thinks y Sml Tutorials

    43/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 43

    Think SysM Tutorials

    Click on "Go to the Root Diagram" to navigate to the top level diagram.

    The root diagram simply shows a collection of three packages: "Basic Definitions," "Equations,"and "Structure."

    4.1.2 Configure Outline View

    In the Outline panel, click on the "Show Both" mode to view both the model navigator and theoutline overview.

  • 8/10/2019 Thinks y Sml Tutorials

    44/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 44

    Think SysM Tutorials

    Drag the viewport rectangle and observe how it changes the view of the diagram editor.

    Click on "Show Navigator" mode to hide the outline overview.

  • 8/10/2019 Thinks y Sml Tutorials

    45/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 45

    Think SysM Tutorials

    To see a simple example of filtering model elements, click on "Filters On" mode.

    Select "Hide Edges" from the resulting dialog and click "OK".

  • 8/10/2019 Thinks y Sml Tutorials

    46/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 46

    Think SysM Tutorials

    Can you see what has changed? (Hint: where have all the associations gone?) Now, beforemoving on, be sure to reset the filter so "Hide Edge" is unchecked.

    Another filter that is interesting is the "Show Only" Diagrams Filter. Try it but make sure changeit back to "Show" Diagrams Filter when you are finished.

  • 8/10/2019 Thinks y Sml Tutorials

    47/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 47

    Think SysM Tutorials

    Expand the packages "Basic Definitions" and "Equations" so that you are comfortable exploringthe model elements in outline view. For example, can you find a block named "Test1"?

    As you might expect, if you double-click on a diagram title in outline view, the associateddiagram will appear in the editor window.

    4.1.3 Turn Off Filter

    Before moving on, double-check to make sure that the "Hide Edge" filter is unchecked in the

    "Filters On" dialog and click "OK". (Hidden edges would cause problems in later tutorials.)

    4.1.4 Configure Supplementary Editors

    Observe the panels containing tabs for supplementary editors. These should be at the bottomcenter of your window.

  • 8/10/2019 Thinks y Sml Tutorials

    48/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 48

    Think SysM Tutorials

    Close the view of the SME Scenario editor by clicking on the "X" in its tab. We will not be usingthis editor.

    Drag the Documentation tab and drop it into the panel that contains the Properties tab.

    Check the box labelled "Use HTML Editor" to get a nicer view of the documentation text.

  • 8/10/2019 Thinks y Sml Tutorials

    49/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 49

    Think SysM Tutorials

    4.1.5 Locate Parametric Diagram

    Return to the top level of the SimpleParametric model.

    In the diagram editor window, note the turned arrow in the upper right corner of each package.This indicates that the model element has a diagram attached to it. Double-click the package"Structure" to navigate to its diagram.

    From the Structure diagram, double-click on the TestResults block to navigate to its diagram.

    The parametric diagram associated with TestResults is the diagram we want to "solve" in a

    subsequent tutorial.

  • 8/10/2019 Thinks y Sml Tutorials

    50/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 50

    Think SysM Tutorials

    Click on the diagram to view its documentation.

    Using these techniques, you can explore the rest of the model and its documentation.

    4.1.6 Export to HTML

    From the Navigator window, right-click "SimpleParametric.sysmldi" and select "Export toHTML...".

  • 8/10/2019 Thinks y Sml Tutorials

    51/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 51

    Think SysM Tutorials

    In the folder selection dialog, select the parent folder "Assorted" and click "Create New Folder."

    In the New Folder dialog, enter the name "HTML" and click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    52/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 52

    Think SysM Tutorials

    Eventually, we will have more than one model in the Assorted folder, so let's create a sub-folderto hold the HTML for the SimpleParametric model. Select the "HTML" folder and click "CreateNew Folder."

    Enter the name "SimpleParametric" and click OK.

    Click OK again to launch the export process.

  • 8/10/2019 Thinks y Sml Tutorials

    53/351

  • 8/10/2019 Thinks y Sml Tutorials

    54/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 54

    Think SysM Tutorials

    Double-click on the file "index.html" to launch a browser.

    The diagrams and supporting documentation can now be explored using a browser.

    4.1.7 Compress and Share the HTML

    Using the Windows Explorer, navigate to the folder containing the HTML content for theSimpleParametric model. Right click on the folder and select "Send to ... Compressed Folder".

  • 8/10/2019 Thinks y Sml Tutorials

    55/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 55

    Think SysM Tutorials

    If this were your model, you could e-mail the resulting compressed file to other members of yourteam who could then view your model using a browser. Your instructor in this course may askfor a copy of the file as evidence that you have completed this tutorial.

  • 8/10/2019 Thinks y Sml Tutorials

    56/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 56

    Think SysM Tutorials

    4.2 Tutorial:Solve Parametric Model

    Figure 10 Overview of "Solve Parametric Model"

    The SimpleParametric model contains parametric diagrams that describe equations which must be

    satisfied by certain value properties. OpenModelica can be used to solve the equation for unknown

    variables. A special script, called SysML2Modelica, can be used to convert the parametric diagrams into a

    model that OpenModelica can solve. This tutorial demonstrates the use of this script. It assumes that all of

    the required software (OpenModelica, SWTChart, and SysML2Modelica) have been installed.

    4.2.1 Select Block Containing Parametric Diagram

    Open the SimpleParametric model and navigate to the Structure diagram. Select the block"TestResults" by clicking on it.

  • 8/10/2019 Thinks y Sml Tutorials

    57/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 57

    Think SysM Tutorials

    4.2.2 Launch SysML2Modelica Wizard

    From the menu bar, select SysMLTo->Modelica.

    This will launch a wizard for solving parametric diagrams using OpenModelica. The wizard iscustom, non-proprietary code from ThinkSysML. Source code for the wizard is available uponrequest.

  • 8/10/2019 Thinks y Sml Tutorials

    58/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 58

    Think SysM Tutorials

    Click Next. (The Finish button is the same as Cancel, in this implementation.)

    4.2.3 Confirm OpenModelica Directories

    Prior to running this script, you need to have installed OpenModelica. On this screen, use thebrowse buttons to locate the directory where the program OMShell.exe is stored and to locate adirectory that may be used for temporary storage.

  • 8/10/2019 Thinks y Sml Tutorials

    59/351

  • 8/10/2019 Thinks y Sml Tutorials

    60/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 60

    Think SysM Tutorials

    4.2.5 View Graph and Init ial Values

    On the Graph View page of the wizard, you may view a graph representing the parametricdiagram. The nodes of the graph represent variables and the arcs represent equations. The nodeswith red squares represent constraint properties. These constraint properties likely containModelica code in text format. The arcs connecting variables to red squares indicate whichvariables participate in the Modelica code. The graph is very useful when debugging a model: itis easy to spot missing connections. Click "Create and Show Graph" to view the graph.

  • 8/10/2019 Thinks y Sml Tutorials

    61/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 61

    Think SysM Tutorials

    Note that the graph is more complicated than the parametric diagram associated with the

    TestResults block. That is because it merges all of the nested parametric diagrams into what iscalled a "flattened" graph.

    You may click the "Create and Show Graph" button several times: Each time will result in a newrandomized layout of the graph.

    Click Next to proceed. This will take you to the Parameter and Variable Values page.

    Click Refresh Values to see the initial values of the variables and parameters for the parametricdiagram.

  • 8/10/2019 Thinks y Sml Tutorials

    62/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 62

    Think SysM Tutorials

    In this example, we see that Test1_Score and Test2_Score are parameters with values 80 and 90,

    respectively. TotalScore is a target variable (indicated by the TBD value: "To Be Determined").

    Click Next.

    4.2.6 Execute Script

    From the information provided, the wizard will generate a Modelica model and anOpenModelica script to solve the model. In future tutorials we will explain Modelica more fully.For this tutorial, we will simply execute the script. Click the button Execute Script. After a delay(in which the OpenModelica shell program is launched and the model solved) a listing of thesolution results is displayed in the text box below the buttons.

  • 8/10/2019 Thinks y Sml Tutorials

    63/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 63

    Think SysM Tutorials

    If the model execution was successful, you should see the result 85.0 displayed for theTotalScore variable. Recall this was the variable whose value was To Be Determined. ClickNext.

    If this is not the result you get, then perhaps there was a problem with the OpenModelicainstallation. Try executing the script again, but this time with "Verbose" Output Detail checked.

  • 8/10/2019 Thinks y Sml Tutorials

    64/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 64

    Think SysM Tutorials

    If there was a problem, there may be useful error messages in the verbose output.

    4.2.7 View Results

    On the Simulation Plot Results page, you can plot the results for different target variables. In thisexample, there is only one target variable, TotalScore, and there is no time dimension to themodel so the plot is not very interesing. Nevertheless you can see the plot by clicking "PlotValues" and then checking the box "TotalScore".

  • 8/10/2019 Thinks y Sml Tutorials

    65/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 65

    Think SysM Tutorials

    The plot shows the value 85, which is the value of TotalScore.

    Click Next to proceed.

    4.2.8 Update SysML Model With Results

    The Update SysML Model page is the last page of the wizard. Click Refresh Values to see theending values of the target variables from the Modelica simulation. In this case, the TotalScore

  • 8/10/2019 Thinks y Sml Tutorials

    66/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 66

    Think SysM Tutorials

    variable ends with the value 85. Note that we retain the phrase "TBD" in the value as a reminderthat this was a target variable.

    The last step of the wizard is to copy these ending values back into the SysML model. This stepis optional. Click the button Update SysML to perform the copy. Then click Finish to exit thewizard.

    In the TestResults block of the SysML model, the value "TotalScore" should now read "TBD(end=85.0)", reflecting the results of the model solution. To see where this value is stored, clickthe properties tab and the Specification property. This is where default values are stored.

  • 8/10/2019 Thinks y Sml Tutorials

    67/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 67

    Think SysM Tutorials

    4.2.9 Solve Again With Different Inputs

    Let's solve the model again but with different inputs and a different target variable. Since themodel consists simply of a system of equations we should be able to choose different inputs andoutputs. Initially, Test1_Score and Test2_Score were treated as inputs and the value TotalScorewas treated as an output. Suppose we knew the Test1_Score and knew the TotalScore we wantedto achieve. We would like to compute the Test2_Score required to achieve that TotalScore.

    Locate the default value for TotalScore (select TestResults, click TotalScore valueproperty, click Properties tab, click Specification property) and change its default value to 87.

    Locate the default value for Score2 (select Score2, click Properties, click Specification).

    Currently, its value is 90.

  • 8/10/2019 Thinks y Sml Tutorials

    68/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 68

    Think SysM Tutorials

    Change the default value of Score2 from 90 to "TBD". This signals that Score2 is now a targetvariable.

    Now, repeat all the steps to solving a parametric diagram using the SysML2Modelica wizard.You should end with a value of Score2 = 94. The screenshots below are highlights of the steps.

  • 8/10/2019 Thinks y Sml Tutorials

    69/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 69

    Think SysM Tutorials

    (This image does not show the "Verbose Output" option that has been added to the wizardrecently.)

  • 8/10/2019 Thinks y Sml Tutorials

    70/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 70

    Think SysM Tutorials

    5 Tutorial Group: Explore FSAE Racecar Model

    Figure 11 Overview of "Explore FSAE Racecar Model"

  • 8/10/2019 Thinks y Sml Tutorials

    71/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 71

    Think SysM Tutorials

    5.1 Tutorial:Install FSAE Racecar Project

    Figure 12 Overview of "Install FSAE Racecar Project"

    5.1.1 Navigate to Think SysML Gallery Webpage

    Use your browser to visit the gallery page of the Think SysML website:http://thinksysml.org/Gallery.html

  • 8/10/2019 Thinks y Sml Tutorials

    72/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 72

    Think SysM Tutorials

    5.1.2 Download Compressed File for FSAE Racecar

    Click on the link "FSAERaceCarExport.zip". This will cause the file to be downloaded to your"Downloads" directory.

    5.1.3 Import Project

    From the Topcased menu, select File->Import.

    The import wizard will launch. On the Select screen, choose General->Archive and click "Next".

  • 8/10/2019 Thinks y Sml Tutorials

    73/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 73

    Think SysM Tutorials

    On the Archive file screen, click "Browse".

    In the "Import from Archive file" pop-up, navigate to your Windows downloads folder andselect the compressed file that was just downloaded ("FSAERacecarExport.zip"). Then, click"Open".

  • 8/10/2019 Thinks y Sml Tutorials

    74/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 74

    Think SysM Tutorials

    Back in the Import wizard, de-select the folder with no name and select, instead, the folder

    named "FSAERacecar". Ensure that all its sub-folders are also selected, as shown. Then click"Browse" to select the "Into Folder".

  • 8/10/2019 Thinks y Sml Tutorials

    75/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 75

    Think SysM Tutorials

    Select the "Assorted" folder and click "Ok".

  • 8/10/2019 Thinks y Sml Tutorials

    76/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 76

    Think SysM Tutorials

    Once back in the Import wizard, click "Finish".

  • 8/10/2019 Thinks y Sml Tutorials

    77/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 77

    Think SysM Tutorials

    If this step was successful, you will see the FSAERacecar project in the Assorted folder.

  • 8/10/2019 Thinks y Sml Tutorials

    78/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 78

    Think SysM Tutorials

    5.2 Tutorial:Take Tour of FSAE Racecar

    Figure 13 Overview of "Take Tour of FSAE Racecar"

    5.2.1 Navigate to Root Diagram

    Open the FSAE Racecar model by double-clicking on the file FSAERacecar.sysmldi in theNavigator window.

  • 8/10/2019 Thinks y Sml Tutorials

    79/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 79

    Think SysM Tutorials

    Click the Go to Root Diagram button to navigate to the root diagram.

    The root diagram is a requirements diagram that displays two packages: "Systems EngineeringTeam Lead" and "SysML Student".

  • 8/10/2019 Thinks y Sml Tutorials

    80/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 80

    Think SysM Tutorials

    A viewpoint block in each package explains the purpose of that package. The most naturalviewpoint is the Systems Engineer viewpoint because the motivation for building the SysMLmodel is to orient a new systems engineer to the FSAE Racecar project. The SysMLstudent viewpoint was added to the model after the systems engineer viewpoint was complete.We did this to meet educational needs.

    5.2.2 Explore Systems Engineering Viewpoint

    Double-click on the Systems Engineering Team Lead package.

  • 8/10/2019 Thinks y Sml Tutorials

    81/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 81

    Think SysM Tutorials

    This diagram displays eight packages. Some of these packages, such as the Requirementspackage, contain further packages. These packages were created during concept analysis andthere is a logical sequence in which to view their contents. Rather than specify a rigid sequenceto the reader, we provide information as to which packages are dependent on other packages.This is done with dependencyrelationships.

    For example, we show a dependency relation from the Stakeholders package to the InitialContext package. We read this relation as "The Stakeholders package depends onthe InitialContext package." It makes sense therefore for the reader to start with exploring the InitialContext Package before exploring the Stakeholders package. Similarly, the Organization ChartPackage depends on the Stakeholders package. However, the Requirements package has nodependency relation with the Stakeholders package, in either direction. So the reader can chooseto explore these two packages in any order.

  • 8/10/2019 Thinks y Sml Tutorials

    82/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 82

    Think SysM Tutorials

    5.2.3 Explore SysML Student Viewpoint

    Return to the root diagram and double-click the SysML Student package.

    In this diagram, we display nearly all of the packages from the Systems Engineering Team Leaddiagram. Note that there is only one instance of each of these packages in the model, eventhough we display them on multiple diagrams. So keep in mind the distinction between themodeland the diagram. Double-clicking on any package in this diagram takes you to exactly thesame diagram as double-clicking on it in a different diagram. What is different about thisdiagram is that we have added viewsthat would be interesting to a SysML student. For example,for students who are interested in finding examples of use case or state machine diagrams, wehave created views called Use Case Diagrams and State Machine Diagrams and we include inthose views all packages that contain use case diagrams or state machine diagrams, respectively.The inclusion is through containment and import relations.

  • 8/10/2019 Thinks y Sml Tutorials

    83/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 83

    Think SysM Tutorials

    The Use Case Diagram view containsthe Behavior package, so you would visit the Behaviorpackage if you want to find an example of a use case diagram. Only one view can contain theBehavior package but it is the package you should visit if you want to find an example of a statemachine diagram and an activity diagram. We indicate that with import relations. We say "The

    State Machine Diagram view imports the Behavior package." Similarly, "The Activity Diagramview imports the Behavior package". The purpose of a view can be suggested by connecting theview to a viewpoint.In this diagram, we link all the views to the Language viewpoint usingconformrelations. The viewpoint contains information about the organizing principle ("I want tolearn how to represent systems and processes using SysML."). Hence, we say "the State machinediagram view conforms tothe SysML Student viewpoint."

    In summary, views are collections of contained or imported packages which conform to one ormore viewpoints.

    5.2.4 Explore Initial Context Package

    Navigate to the Initial Context package(Root diagram..Systems Engineering Team Lead..InitialContext). It contains a block definition diagram(bdd).

  • 8/10/2019 Thinks y Sml Tutorials

    84/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 84

    Think SysM Tutorials

    The systems engineer will be concerned not only about the actual vehicle design but also abouthow the design project itself is organized and run. So it is useful to specify an overall context.Composite arcsconnect the FSAE TeamContext block with numerous other entities. The contextof our system is composedof the student team, faculty and staff, the team project, the

    competition, and other related entities. More such entities can be added to the context if wediscover their relevance to the design project.

    The FSAE Team Context block has a diagram associated with it, as indicated by the turnedarrow in the upper right corner.

    Double-click on the FSAE Team Context block to view the associated diagram. It is an internalblock diagram(ibd).

  • 8/10/2019 Thinks y Sml Tutorials

    85/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 85

    Think SysM Tutorials

    Here we are using the internal block diagram to represent a context diagram: a diagram of our

    system (or systems) of focus in relationship to other systems and actors. The arcs representassociations with verb phrases. In a context diagram, we position the verb phrases close to thesubject of the sentence they imply.

  • 8/10/2019 Thinks y Sml Tutorials

    86/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 86

    Think SysM Tutorials

    For example, we read from this diagram that "the FSAE Student Team enrolls for Project Course

    Credits," and "the FSAE Student Team solicits support from Corporate Sponsors."

    This is a simple starting point for modeling. As we proceed with deeper levels of analysis, therewill be more entities discovered and included in the model. As new entities are added to themodel, we should return to the context diagram and describe their relationships to existingentities. The context diagram will grow in size and complexity. To control the complexity, wemay eventually want multiple context diagrams to reveal different levels of relationship. Hereagain, the model is capturing all of the relationships, we are using diagrams to capture and revealthose relationships.

    Navigate to the FSAE Student Team diagram (Top..Systems Engineering Team Lead..Initial

    Context..FSAE Student Team.

  • 8/10/2019 Thinks y Sml Tutorials

    87/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 87

    Think SysM Tutorials

    Here we see detailed the types of roles students play on the project team. Some students work onthe project not for course credit but as volunteers. Their engagement is often short so they are notassigned leadership roles. Note the use of generalization arcsto add specificity to the model. Weread from the generalization arcs that "the Team Leader is a type of Student Team Member andthe Engine Team Leader is a type of Team Leader." Similarly, "the Lubrication Subteam Leaderis a type of Sub-team Leader which is also a type of Student Team Member."

    5.2.5 Explore Mission and Goals

    Navigate to the Mission and Goals package. (Root..Systems Engineering Team Lead..Missionand Goals.)

  • 8/10/2019 Thinks y Sml Tutorials

    88/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 88

    Think SysM Tutorials

    This diagram illustrates a feature of the SysML language called stereotyping. The SysMLlanguage has no model elements for "mission" or for "goals" but we needed such elements toaccurately describe our model. Fortunately, the SysML language is extensible by means ofstereotypes. For our purposes, we have defined two stereotypes (mission and goal) that arederived from the requirement model element. This diagram shows us putting those twostereotypes to use as part of our model.

    The diagram also illustrates that relationships between requirement model elements can becaptured. Here we use the refinerelationship to link each goal with the mission. That is, the goalsrefinethe mission. The mission is primary, the goals are secondary refinements.

    5.2.6 Explore Upstream Requirements

    Navigate to the Official FSAE Rules package. (Root..Systems Engineering TeamLead..Requirements..Official FSAE Rules).

  • 8/10/2019 Thinks y Sml Tutorials

    89/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 89

    Think SysM Tutorials

    The FSAE Competition has published official rules for the racecar competition. These rules areone source of requirements or constraints on the FSAE project team. Another source ofrequirements and constraints might be rules imposed by Cornell University on the conduct ofprojects or the use of facilities. We would like to represent such requirements in our model insome form. One idea is to create an explicit requirement object in the SysML model for each ofthese external or upstreamrequirements. Another idea is to use the Topcased feature ofimporting upstream requirements. This feature is unique to Topcased: It is not part of SysML.You should not expect to find this particular feature in other software packages that supportSysML. Nevertheless, it is reasonable to expect other packages to support some form ofconnection to requirements databases so we have chosen to illustrate the Topcased approach.

    In a separate activity, we downloaded the document describing the official FSAE rules (2012)from the SAE website and (painstakingly) extracted the textual requirements one by one into aMS Excel spreadsheet. This spreadsheet is included as part of the FSAERacecar project in theResources folder.

    If you have MS Excel installed on your computer, you can view the file by double-clicking it.

  • 8/10/2019 Thinks y Sml Tutorials

    90/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 90

    Think SysM Tutorials

    Notice that we created five columns to capture information about the requirements. We labeledthe columns "ID,SECTION, ARTICLE, TOPIC,TEXT", respectively. Topcased required at leasttwo columns, labeled "ID" and "TEXT", respectively. The other columns are useful fororganizing the requirements. We then imported this spreadsheet file as upstream requirements.You can see that a file was created in the Models folder.

    To view these imported requirements within Topcased, we must change the perspective. Clickthe menu Window->Open Perspective->Other

  • 8/10/2019 Thinks y Sml Tutorials

    91/351

  • 8/10/2019 Thinks y Sml Tutorials

    92/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 92

    Think SysM Tutorials

    The text of the requirement is visible in the documentation tab."

    It is likely that your view of the upstream requirements does not display the custom elements"Section, Article, and Abstract" shown here:

    To view these attributes, you must customize the perspective. Go to Window->Preferences->Topcased-Requirement->Upstream Settings and use the panel on the right to add attributes

  • 8/10/2019 Thinks y Sml Tutorials

    93/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 93

    Think SysM Tutorials

    "Section," "Article," and "Abstract." You may need to close the model and re-open it for thiscustomization to take effect. The menu is located here:

    The Upstream Settings panel looks like this:

  • 8/10/2019 Thinks y Sml Tutorials

    94/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 94

    Think SysM Tutorials

    It would be nice to see these requirements in a tabular form. Unfortunately, Topcased 4.3 doesnot provide tabular views even though the SysML specification allows for them. Developing

    tabular views would be a useful open source project idea.

    In the next step, we will show how Topcased allows these upstream requirements to be linked topackages in the model. For this step, we want to stay with Topcased Requirements Perspective.

    5.2.7 Explore a Current Requirement

    It can be useful to map upstream requirements to model elements in the SysML model. Topcasedallows a restricted form of mapping in that an upstream requirement can be mapped to a packagewithin the model. The mapping is not more specific than that. It does this by copying theupstream requirement and associating it with a package. The copied requirement is known as a

    current requirementin Topcased. Keep in mind that these terms are part of the Topcasedspecification, not the SysML specification.

    To illustrate the mapping, we have taken a single upstream requirement, FSAE-A1.2, andmapped it to the Official FSAE Rules package. You can see the mapping in the currentrequirement panel:

  • 8/10/2019 Thinks y Sml Tutorials

    95/351

  • 8/10/2019 Thinks y Sml Tutorials

    96/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 96

    Think SysM Tutorials

    This is only an initial set of requirements and would have to be revised and expanded as part ofthe team project.

    5.2.9 Explore Stakeholders

    Navigate to the Stakeholders folder (Top..Systems Engineering Team Lead..Stakeholders).

  • 8/10/2019 Thinks y Sml Tutorials

    97/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 97

    Think SysM Tutorials

    On this diagram, we have collected several actors whose perspective would be useful to keep inmind. These entities have been defined in other packages using other diagrams. What isinteresting about this diagram is the fact that you can use the same entities on multiple diagrams.When an entity appears on a diagram but is contained in a different package or block, thecontaining object is indicated in parentheses. For example, the University Administrator wasdefined as part of the Faculty and Staff block (in the Initial Context package) and the StudentTeam Member was defined as part of the FSAE Student Team block. This serves to emphasizeagain the distinction between models and diagrams ("the diagram is not the model").

    5.2.10 Explore Organization Chart

    Navigate to the Organization Chart package (Top..Systems Engineering TeamLead..Organization Chart).

  • 8/10/2019 Thinks y Sml Tutorials

    98/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 98

    Think SysM Tutorials

    The organization chart is intended to show how the project team is organized in terms ofreporting requirements. For this purpose, we use a block definition diagram and genericassociation arcsto show the reporting relationships. For example, we read from the diagram that"the Flow Subteam Leader reports to the Engine Team Leader who reports to the ProjectLeader." There is nothing in the model to tell us that we interpret the association arcs as"reporting relationships" on this diagram. However, we could have extended the model to have astereotypefor reporting relationships and then used that stereotype for each of the relationships

    on this diagram.

    5.2.11 Explore SE Roles

    Navigate to the SE Roles package. (Root..Systems Engineering Team Lead..SE Roles.)

  • 8/10/2019 Thinks y Sml Tutorials

    99/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 99

    Think SysM Tutorials

    The purpose of this diagram is to suggest different roles that the systems engineer on the FSAEproject team could play. The technical team leaders often have difficulty imagining what role thesystems engineer can play. The diagram starts by listing the twelve roles of a systems engineer asidentified by Sarah Sheard in her paper:

    Sheard, Sarah, "Twelve Systems Engineering Roles", Proceedings of the INCOSE Sixth AnnualInternational Symposium (Boston, Massachusetts, USA). Copyright 1996 Software ProductivityConsortium, NRP, Inc., http://www.software.org.

    At the bottom of the diagram, a block is created for the Systems Engineering Roles in theContext of the FSAE Team and it is connected to the most suitable of the twelve roles identifiedby Sheard.

  • 8/10/2019 Thinks y Sml Tutorials

    100/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 100

    Think SysM Tutorials

    For example, it is not likely that the systems engineer on the team will be a technical manager or

    a process engineer so no connection is made with those roles. Seven of the other roles might be apossibility. In addition to the roles identified by Sheard, we have listed two other roles, ProjectManager and Project Scheduler, that are potential roles for the systems engineer.

    5.2.12 Explore Behavior

    Navigate to the Behavior package. (Root..Systems Engineering Team Lead..Behavior). This is ause case diagram.

    As the comment on the left explains, the purpose of this package is to propose a part designprocess that is more formal than the ad hocprocesses typically used on student team projects. Sothe focus of the behavior analysis in this model is not on the vehicle being designed and builtbut, rather, the focus is on the project team itself. The use case, Design a Part, is shown as an

  • 8/10/2019 Thinks y Sml Tutorials

    101/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 101

    Think SysM Tutorials

    oval and the users who interact with the use case are the actors arrayed around the use case.Attached to the use case is an activity diagram that describes the activity associated with the usecase in more detail.

    Double-click on the use case, Design a Part, to view the activity diagram.

    The activity diagram displays a pre-condition and a post-condition. This is a useful convention toinclude in your diagrams because it can clarify when the activity is appropriate and what theexpected result is. This activity diagram further uses swimlanes to group the actions and suggestownership. The swimlanes have been named "Designer," "Systems Engineer," "ProjectScheduler," " Sub-team Leader," and "Project Leader" but there is no actual connection in themodel between these swimlanes and the entities they represent (ED. Note: we have not yetfigured out how to make that connection). Start reading the diagram with the action that followsthe initial node ("Authorize part design and assign to designer") and follow the control flow,paying attention to who is expected to perform each action (which swimlane it belongs to). Thediamond-shaped decision nodes indicate a critical juncture in which the process may stop if thecondition being tested in not true. As the comment suggests, only the true control branches aredisplayed because the backtracking inherent in design would be visually confusing to display.

    This style of activity diagram is also useful for suggesting where interface specifications are

    required. Every control flow that crosses a swimlane boundary signals the need for an interfacespecification. For example, what is the designer expected to present to the systems engineer atthe preliminary design review? It is pre-mature to define such interfaces during concept analysisso we have not done so.

    This is an ideal view of a part design process. Student team members are likely to rebel againstsuch a formal process even though it is what will be expected of them in many employment

  • 8/10/2019 Thinks y Sml Tutorials

    102/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 102

    Think SysM Tutorials

    settings. It would be a success if the systems engineer on the FSAE team could persuade theteam leaders to implement even part of this process, such as the preliminary design review.

    The activity diagram with swimlanes is useful for describing test procedures, discovering

    functional requirements, and identifying interfaces with actors and other systems.

    Return to the use case diagram and double click on the use case "Design a Part in Stages" to viewan example of a state machine diagram.

    This is another view of the part design process described by the activity diagram. Typically, youwould not use both an activity diagram and a state machine diagram to describe a process: Youwould use one or the other. We included both representations to provide an example of each. Thenodes of the diagram are states in which the system can be in and the connections denote eventswhich cause the system to transition from one state to another.

    5.2.13 Explore Structure

    Navigate to the Structure package. (Root..Systems Engineering Team Lead..Structure).

  • 8/10/2019 Thinks y Sml Tutorials

    103/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 103

    Think SysM Tutorials

    The intended reader of this model is a student who has been newly assigned to be the systemsengineer on this year's FSAE Team Project. As the comment on the left indicates, the purpose ofthis package is to provide the new systems engineer with a basic model detailing the structure ofa generic racecar. This would be a starting point for customizing the model to represent thisyear's car design. The block ARGXX Car is the high level representation of the generic vehicle.It has three diagrams associated with it, a block definition diagram, an internal block diagram,and a parametric diagram. We will consider the parametric diagram in the next step of thistutorial. For now, we concentrate on the block diagrams.

    Double-click on the ARGXX Car block and, in the pop-up window, select the Block definitiondiagram that is attached to it. Click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    104/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 104

    Think SysM Tutorials

    The block definition diagram that results shows that the vehicle is composed of eleven majorsubsystems.

    Many of these subsystems are further detailed by block definition diagrams to reveal majorcomponents in the subsystems. You can explore these diagrams on your own, after the tutorial iscompleted.

    Note that the block ARGXX Car also appears on this diagram. Double-click on it again andselect the Internal block diagram that is attached to it. Click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    105/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 105

    Think SysM Tutorials

    This calls up an internal block diagram in which the basic relationships between the subsystemsare described.

    Note that we are using the internal block diagram to represent a context diagram in whichrelationships are given by verb phrases on the arcs. We read for example that "the Flow

  • 8/10/2019 Thinks y Sml Tutorials

    106/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 106

    Think SysM Tutorials

    subsystem provides turbocharged air/fuel flow to the Engine." This should help to orient theincoming systems engineer to the roles of the subsystems.

    5.2.14 Explore Parametric Relationships

    Return to the ARGXX Car diagram. (Root..Systems Engineering Team Lead..Structure..ARGXXCar..Block definition diagram..OK.)

    Observe that the ARGXX Car block has a value property called CarWeight with a current valueof "TBD" meaning "To Be Determined." Each of the subsystems also have value properties thatrepresent their respective weights. The weight of the vehicle is simply the sum of the weights ofits subsystems. That is an example of a parametric relationship. That relationship is representedin this SysML model using a parametric diagram. To view the diagram, double-click on theARGXX Car block and, in the resulting pop-up window, select the Parametric diagram choiceand click OK.

    The parametric diagram attached to the ARGXX Car block displays the value property forCarWeight in the top right of the diagram. The value properties for the weights of the subsystemsare listed down the left side of the diagram.

  • 8/10/2019 Thinks y Sml Tutorials

    107/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 107

    Think SysM Tutorials

    The diagram uses the "add" constraint block that is defined in the Modelica Elementary Librarywhich was introduced in the tutorial on "Simple Parametric." That constraint block was definedfor only two summands. It would be nice to have a constraint block for eleven summands, but weare keeping the library simple intentionally. As a result, this diagram is rather complicated as webuild up the sum of eleven summands using pairwise addition. Note that we have introducedvalue properties for the intermediate subtotals of the calculation. We found that if we connectedthe sum port of one constraint block directly to a summand port of the next constraint block, theSysML model was ill-defined. Introducing the subtotal value properties solved this difficulty.

    For many of the subsystems there are parametric diagrams describing how their weights arerelated to the weights of their components. You can explore these additional diagrams on your

    own.5.2.15 Solve Parametric Model

    Return to the ARGXX Car diagram. (Root..Systems Engineering Team Lead..Structure..ARGXXCar..Block definition diagram..OK.)

    We wish to solve for the CarWeight value property based on the weights of the subsystems andthe components. There are quite a few parametric diagrams involved but we have taken care toensure they are all consistent. We will use the SysML2Modelica plug-in and the OpenModelicasolver to solve the problem.

  • 8/10/2019 Thinks y Sml Tutorials

    108/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 108

    Think SysM Tutorials

    Select the ARGXX Car block.

    From the menu, select SysML To->Modelica.

    Click the Next button until you get to the Graph View page. Click the "Create and Show Graph" button.

    Ignore the errors by clicking OK. There are some value properties in the model that are not partof any parametric diagram.

    The flattened graph is displayed. This is the combined set of relationships from all of theparametric diagrams in the model.

  • 8/10/2019 Thinks y Sml Tutorials

    109/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 109

    Think SysM Tutorials

    Click Next until you reach the Modelica Simulation page. Then click the "Execute Script" buttonand wait for the solver to complete its processing. When it is completed, the solution shouldappear in the text box below.

  • 8/10/2019 Thinks y Sml Tutorials

    110/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 110

    Think SysM Tutorials

    Observe that the vehicle weight has been calculated to be 507 pounds.

    Click the "Finish" button to terminate the wizard and this tutorial. In the next tutorial, we willdemonstrate how to generate a report from this model.

  • 8/10/2019 Thinks y Sml Tutorials

    111/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 111

    Think SysM Tutorials

    6 Tutorial Group: Generate FSAE Racecar Report

    Figure 14 Overview of "Generate FSAE Racecar Report"

  • 8/10/2019 Thinks y Sml Tutorials

    112/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 112

    Think SysM Tutorials

    6.1 Tutorial:Prepare for Document Generation

    Figure 15 Overview of "Prepare for Document Generation"

    In order to successfully generate a report for the FSAE Racecar model, you may have to make afew adjustments to the model. This tutorial goes through a step that may be necessary.

    6.1.1 Re-App ly ATMProfile

    In general, document scripts can be run at any time. However, for the FSAERacecar example, wehave discovered a problem in the downloading of this model that may prevent the script fromrunning. Fortunately, it is easily corrected and, once made, this step does not have to beperformed again. [Do not perform this step unless you experience errors in documentgeneration.]

    Using the Navigator, double-click on the file ATMConcept.sysmldi to open it.

  • 8/10/2019 Thinks y Sml Tutorials

    113/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 113

    Think SysM Tutorials

    In the Outline panel, select top line ( FSAERacecar), right-click it, and select "UnapplyProfile."

  • 8/10/2019 Thinks y Sml Tutorials

    114/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 114

    Think SysM Tutorials

    In the Choices panel of the resulting dialog, select "FSAEProfile", click Add, and then click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    115/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 115

    Think SysM Tutorials

    This completes the Unapply step. We now wish to reapply the same profile to the model. Fromthe Outline panel, select the top line ( FSAERacecar), right-click it, and select "ApplyProfile."

    In the Choices panel of the resulting dialog, select "FSAEProfile", click Add and click OK.

  • 8/10/2019 Thinks y Sml Tutorials

    116/351

  • 8/10/2019 Thinks y Sml Tutorials

    117/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 117

    Think SysM Tutorials

    6.2 Tutorial:Generate, Explore, Modify and Update Report

    Figure 16 Overview of "Generate, Explore, Modify and Update Report"

    6.2.1 Generate Document from FSAERacecar Template

    Begin by locating the template file, "FSAERacecarTemplate.docx", in the Navigator panel.

  • 8/10/2019 Thinks y Sml Tutorials

    118/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 118

    Think SysM Tutorials

    This is Microsoft Word 2007 format document that contains both formatted content and scriptsto extract SysML content. We will explore this file as part of the tutorial. First, however, we willsimply use the file to generate a report.

    Right-click the template file and select "Generate Document".

  • 8/10/2019 Thinks y Sml Tutorials

    119/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 119

    Think SysM Tutorials

    A progress bar tracking the document generation process should appear.

    If there are errors from this process, make sure you have downloaded and installed the currentversion of FSAERacecarExport.zip from the website. Otherwise, if the process completedsuccessfully, the following message should appear.

  • 8/10/2019 Thinks y Sml Tutorials

    120/351

  • 8/10/2019 Thinks y Sml Tutorials

    121/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 121

    Think SysM Tutorials

    In general, document generation is a one-step process once you have a valid template file foryour SysML model. Any time your model changes, you can easily re-generate the document toreflect the changes.

    In the tutorial steps to follow, we will explore the generated document and the template file andshow how to make some changes to each.

    6.2.2 Document Was Generated Successfully?

    If {Yes} then go to the step called "Update the Table of Contents."

    If {No} then go to the step called "Check Installation Steps."

    6.2.3 Update the Table of Contents

    Navigate to the generated document, FSAERacecar.docx, and double-click it.

    This should launch a version of Microsoft Word as a tab in the editor window. Scroll down to thetable of contents section.

    The table of contents needs to be updated with the SysML content that the generation process hasincluded. To update the table contents, right-click anywhere in the table and select the "UpdateTable..." option.

  • 8/10/2019 Thinks y Sml Tutorials

    122/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 122

    Think SysM Tutorials

    When presented with the choice of updating page numbers or the whole table, select "Updateentire table" and click OK.

    This should result in a table of contents with no "missing bookmark" errors.

    Save your file so that these changes are made permanent.

    6.2.4 Explore the Generated Document

    From here, you can now scroll through the document. You will recognize the content of thereport as being extracted phrases and diagrams from the SysML model. You will also note thatonly a subset of the diagrams in the model are included in the document. That is because we feltthat some of the diagrams were not relevant or were too detailed for this report. The point is thatwe have control over what appears in a final document. We are free to allow the model itself to

    include more information than would be appropriate in any report.

    Scroll down to approximately page 3, where you will find the section entitled "SystemsEngineering Team Lead."

  • 8/10/2019 Thinks y Sml Tutorials

    123/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 123

    Think SysM Tutorials

    This is a typical page in the report. It contains a header and a footer, a section heading, and adisplayed figure. It is atypical for this report in that it also includes a block of formatted text (richtext). Can you spot which of these items came from the SysML model and which were present inthe original template document? When we explore the template file that was used to generate thisdocument we will see the distinction more clearly.

    6.2.5 Define Tasks for Document Improvement

    Suppose we were unhappy with the way this document appears. We will need to make changesto either the SysML model or the template file in order to improve the document. Suppose wegive ourselves the following tasks:

    1. Change the heading of the current page (currently called "Systems Engineering Team Lead") tosomething more meaningful.

    2. Add an appendix containing the diagram of the SysML Student Viewpoint.

  • 8/10/2019 Thinks y Sml Tutorials

    124/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 124

    Think SysM Tutorials

    These tasks will give focus to our exploration of the template file.

    6.2.6 Explore the Template Document: Configuration

    Navigate to the template document, "FSAERacecarTemplate.docx", and double-click it.

    The template file will be opened using Microsoft Word within the document editor window ofTopcased. (Some students have reported getting a file conversion error message at this pointbased on their version of MS Word. Ignoring the error --clicking OK-- worked for them exceptthat pagination and diagram sizes were different with their version of MS Word than what isdisplayed in this tutorial.) The template file consists of formatted content such as headers,footers, Executive Summary, and table of contents, as well as scripts that describe what contentto extract from the SysML model and how to format it. When the document generation process isapplied (as shown in a previous tutorial step), the scripts are replaced with content from theSysML model and the resulting document is saved as a new file.

    Scroll down to below the table of contents.

  • 8/10/2019 Thinks y Sml Tutorials

    125/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 125

    Think SysM Tutorials

    You may ignore the error messages in the table of contents. A previous tutorial step showed howto update the table of contents in the generated document. The tag marks the beginningof a script element that will be executed during document generation. The tag marksthe end of that script element. Within the and tags there are threeconfiguration elements. The first sets the parameter key "project" equal to the location of theproject FSAERacecar. The second sets the parameter key "model" to the location of the modelfile "FSAERacecar.sysml". Once a parameter key has been set, it can be used in subsequentscripting statements using the notation ${parameter key}. For example, the location of the modelis specified relative to the location of the project: ${project}\Models\FSAERacecar.sysml. Thethird configuration element specifies the output path. It is here that we are telling the documentgenerator to store the output file as "FSAERacecar.docx" in a folder called "Generated" withinthe folder designated by the "project" parameter key. You may notice that a parameter key called"workspace_loc" is used in the first configuration element but it has not been set. That is becauseit is a pre-defined parameter key.

    The configuration element must be located near the beginning of the document, or at least beforeany other script elements are found.

    6.2.7 Explore the Template Document: Context

    After this configuration element, you will find blocks of scripting elements each beginning witha element. In this example, each of these blocks is used to generate a separate sectionin the generated document. We will examine one of these blocks in detail. Scroll or search forthe block that contains the phrase "/Systems Engineering Team Lead'". It should be onthe first page.

    The context element begins with the partial tag "". Thiselement identifies the SysML model element that is the reference point for the script to follow.Each new context element changes the reference point in the model. The script that follows

  • 8/10/2019 Thinks y Sml Tutorials

    126/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 126

    Think SysM Tutorials

    begins with the tag "". On the next page you will find the matching tag indicating where the script ends. That script operates on the reference element identified by thecontext element. The address of the reference element is given as"FSAERaceCar/FSAERaceCar/Systems Engineering Team Lead". To see how this address

    works, go back to the SysML model (click the editor tab for FSAERacecar.sysmldi) and expandthe outline panel to see the following:

    That is, the context element has identified the Systems Engineering Team Lead package in our

    SysML model. That is now the reference point for the following script.6.2.8 Explore the Template Document: Gendoc

    Continuing from the element and the beginning of the element, scroll to thenext page.

    Keep in mind that this content is inside the pair of tags. In this region, anyitems within square bracket pairs ("[" with matching "/]") will be extracted from the SysMLmodel. For example, the heading will be replaced by the content of "self.name" where selfis thereference point specified in the most recent context element. In this case, the most recent contextelement is the Systems Engineering Team Lead package. So, self.namewill be replaced by thename of the package, which is currently "Systems Engineering Team Lead". The text formattingin MS Word is carried over to the new content. Consequently, since "[self.name/]" is in the MSWord Heading 1 style, the generated document will have the phrase "Systems Engineering Team

    Lead" in a heading level 1 style (Bold, blue, left-justified, with a page break). Similarly, in thenext line, the square brackets contain the item self.GetDiagram(). This will be replaced by thestring address of the first diagram attached to the Systems Engineering Team Lead package. Thisaddress is used by the image script element to insert the corresponding model diagram into thegenerated report.

    There is also an 'if' statement that checks to see that a diagram actually exists for this element.

  • 8/10/2019 Thinks y Sml Tutorials

    127/351

    8/22/2012 Creative Commons License: Attribution 3.0 Unported P a g e | 127

    Think SysM Tutorials

    Scroll down further to see the following:

    Here you can see the end of the image element (""). What you cannot see is that theimage element contains a Microsoft Word frame. The document generation program will placethe image identified by the image element into this frame.

    After the image element, the 'if' statement is concluded using an 'else' clause to print an errormessage if the diagram was missing.

    One other script element that is visible here is the reference to self.getDocumentation().This willbe replaced by the documentation attached to the Systems Engineering Team Lead package. Thiscontent is surrounded by the pair of tags indicating that it needs to beconverted from rich text format into MS Word formatted text.

    You can also see the tag which marks the end of this script block.

    6.2.9 Perform First Task: Change Gendoc Script

    Recall the first task we set for ourselves:

    1. Change the heading of the current page (currently called "Systems Engineering Team Lead") tosomething more meaningful.

    The problem is that the script is displaying the name of the Systems Engineering Team Leadpackage when we really want the name of the diagram associated with the package. Instead ofthe model element self.name, therefore, we should be using the elementself.getFirstDiagram().name. We are not going to describe all the possible ways to referencemodel elements in this tutorial (visit the Topcased website for more advanced tutorials on

    Gendoc2). It is enough for now that you see how the scripts operate. Change the heading on thecurrent page to the following:

  • 8/10/2019 Thinks y Sml Tutorials

    128/351

    8/22/2012 Creative Commons License: At