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.
- Open the project from the previous section.
-
In the System Definition (the BDD),
double-click the
PowerSystemblock to open its specification window and select Properties from the left pane of the window. -
Click > Value Property
and enter
isPoweredOnas the property's Name. -
Click the cell to the right of Type,
and search for and select
Boolean. -
You should now see the Type as
Boolean [SysML::Libraries::PrimitiveValueTypes]. -
Select and then clear the checkbox to the right of Default Value to set it to
false. -
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. - Click 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.
-
Select the
UAVblock, click the Directed Composition button (
) on the context toolbar next to the block,
then click the PowerSystemblock. -
Select the
UAVblock again, click the Directed Composition button (
) on the context toolbar next to the block,
then click the Computerblock.
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.
-
In the toolbar to the left of the BDD canvas,
select Directed Association,
click the
Computerblock, and then click thePowerSystemblock.
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.
-
Double-click the
PowerSystemblock to open its specification window and select Operations from the left pane of the window. -
Click ,
enter
powerOnas the operation's Name, and click . -
Click again,
enter
powerOffas the operation's Name, and click . -
(Optional)
If you do not see the operations in the
PowerSystemblock 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
- Save your work before continuing.
Next Section >