Create Your First Model

This tutorial provides a beginner-friendly guide on creating your first SysML v2 model with SysON, adapted from the example in the Don’t Panic - The Absolute Beginner’s Guide to SysML v2 book by Tim Weilkiens and Christian Muggeo. The focus is on representing the Batmobile system, the iconic car of Batman.

1. Step 1: Create a Project

  1. Open the Projects Browser and create a new SysML v2 project by clicking on the SysML v2 card.

  2. The Project Editor automatically opens, creating a new project named SysML v2 with a package Package1. A default General view representation associated with the package is opened in the main editor area.

  3. From the project toolbar, rename the project to Batmobile.

  4. From the Project Explorer, rename the model to Batmobile and the package to User Model.

2. Step 2: Create Elements from a Diagram

2.1. Using the Contextual Toolbar

  1. In the main editor area, click on the diagram background to open the Contextual Toolbar.

  2. Click on the New Part Definition tool to create a new part definition.

    The new elements created from the Contextual Toolbar are visible either from the Project Explorer or the Project Editor main central area.

  3. Rename the part definition to Vehicle using the direct-edit action or the Details view.

  4. Select the Vehicle part definition and click on the New Item tool to create an item usage.

  5. Rename the item usage to driver.

  6. Select the Vehicle part definition and click on the New Part tool to create a new part usage.

  7. Rename the part usage to engine.

2.2. Setting Multiplicity

  1. Select the Vehicle part definition and click on the New Part tool in the Contextual Toolbar to create a new part usage

  2. Rename the part usage to wheels.

2.3. Using Drag and Drop

  1. Select the wheels part usage, type "F2" and rename it wheels[4] : Wheel.

  2. A new Wheel part definition is created in the model.

  3. Drag and drop the Wheel element from the Project Explorer onto the diagram background.

  4. The Wheel part definition appears on the diagram within the Typed By relationship between the Wheel and the wheels part usage.

3. Step 3: Edit the Model Elements

3.1. Adding Attributes

  1. Select the Vehicle part definition and click on the New Attribute tool in the Contextual Toolbar.

  2. A new attribute usage is created.

  3. Select the attribute and use the direct-edit tool to rename it to actualSpeed : SpeedUnit

  4. A new import element appears in model which refers to the library ISQSpaceTime that contains SpeedUnit

  5. The attribute usage actualSpeed is typed with the new attribute definition.

3.2. Creating Specialization

  1. Click on the diagram background and click on the New Part Definition tool.

  2. A new part definition is created.

  3. Rename it Batmobile:> Vehicle.

  4. A new specialization relationship is created between the Batmobile part definition and the Vehicle part definition.

3.3. Creating Subsetting

  1. Click on the diagram background and select the New Part tool.

  2. A new part usage is created.

  3. Rename it to frontRightWheel :> wheels.

  4. A new subsetting relationship appears between the two parts usages frontRightWheel and wheels.

  5. Redo same actions by creating new part frontLeftWheel :> wheels.

3.4. Creating Redefinition

  1. Click on the diagram background and click on the New Part tool.

  2. A new part usage is created.

  3. Rename it to bulletProofWheels[4]:>>wheels.

  4. A new redefines relationship appears between the bulletProofWheels part definition and the`wheels` part usage.

4. Step 4: Create Relationship

4.1. Creating specialization relationship

  1. Click on the diagram background and click on the New Part Definition tool.

  2. A new part definition is created.

  3. Rename it BatmobileNG

  4. Click on node BatmobileNG.

  5. Click on arrow border and hold down until Batmobile:> Vehicle node.

  6. Select the Subclassification tool.

4.2. Creating containment relationships

  1. Click on node frontRightWheel :> wheels.

  2. Click on arrow border and hold down until Batmobile:> Vehicle node.

  3. Select the Become nested part tool.

  4. A new containment edge is created and element frontRightWheel is moved under Batmobile in model

  5. Redo same actions with frontLeftWheel :> wheels.

  6. Click on node bulletProofWheels[4] :>> wheels.

  7. Click on arrow border and hold down until BatmobileNG:> Batmobile node.

  8. Select the Become nested part tool.

  9. A new containment edge is created and element bulletProofWheels is moved under BatmobileNG in model

To explore a larger Batmobile example, use the Batmobile template available on the Projects Browser.

Tutorial result