Adding Properties and Operations to Blocks

Overview

After outlining a system by creating a BDD, you need to fill in the details of the blocks so that they accurately model your system. Properties, operations, and relationships all help describe blocks and their interactions. In this section, you will add properties and operations to your blocks and create composite and associative relationships between them.

This section covers the following concepts:

  • Value properties
  • Part properties and Composition
  • Reference properties, Aggregation, and Association
  • Operations

Figure A1: Block properties and operations

Prerequisites

Prerequisite Description
Moxie Installation You must have installed Moxie.
Tutorial Project You must start this section with the Moxie simulation project from the previous section. If you did not complete the previous section, you can use the following project from the Moxie installation: \documentation\tutorialFiles\01\BlockDefinitionDiagrams.mdzip

Instructions

Add a value property

A value property is simply specified as a SysML value type and a quantity.

  1. Open the project from the previous section.
  2. In the System Definition (the BDD), double-click the PowerSystem block to open its specification window and select Properties from the left pane of the window.
  3. Click Create > Value Property and enter isPoweredOn as the property's Name.
  4. Click the cell to the right of Type, and search for and select Boolean.
  5. You should now see the Type as Boolean [SysML::Libraries::PrimitiveValueTypes].
  6. Select and then clear the checkbox to the right of Default Value to set it to false.
  7. Click the cell to the right of Visibility, and select public. If you do not see the Visibility property, set the Properties filter in the upper-right of the window to Expert.
  8. Click Close to exit the window.

Add part properties

A part property represents a composite relationship to another block. A composite relationship can be read as "Block A owns Block B", implying that Block B does not exist independently of Block A. Composite relationships are depicted with a black diamond.

In this tutorial, the power system and onboard computer do not exist independently of the UAV, so you should model them as parts of the UAV using composite relationships.

  1. Select the UAV block, click the Directed Composition button () on the context toolbar next to the block, then click the PowerSystem block.
  2. Select the UAV block again, click the Directed Composition button () on the context toolbar next to the block, then click the Computer block.

Add a reference property

A reference property represents either an aggregate or an associative relationship to another block. An aggregate relationship can be read as "Block A owns a Block B", while an associative relationship can be read as "Block A uses Block B". Either way, in a reference property, Block B can exist independently of Block A. Aggregate relationships are depicted with a white diamond, and associative relationships are depicted without any symbol.

In this tutorial, the onboard computer exists independently of the power system, and while it does not own the power system, it does use it, so you should model the computer with a reference to the power system using a associative relationship.

  1. In the toolbar to the left of the BDD canvas, select Directed Association, click the Computer block, and then click the PowerSystem block.

Add operations

These operations represent actions that the power system can perform, and will be used in the Call Events section of the next tutorial.

  1. Double-click the PowerSystem block to open its specification window and select Operations from the left pane of the window.
  2. Click Create, enter powerOn as the operation's Name, and click Back.
  3. Click Create again, enter powerOff as the operation's Name, and click Close.
  4. (Optional) If you do not see the operations in the PowerSystem block and would like to, select the block, click the Compartments button (...) on the upper-left corner of the block, and select Operations.

    Figure B1: The system properties and operations

  5. Save your work before continuing.

Next Section >