SysMLSystems Modeling Language A graphical modeling language for systems engineering, based on UML, with block, activity, state machine and parametric diagrams. v2 Projects
Requirement, Use Case, Parametric, Package and Geometry Views
SysML v2 has fewer diagram kinds than SysML 1.x. A requirement, use case, parametric or package diagram is a General View with a filter, and Holarch draws it like the matching LMLLifecycle Modeling Language An open modeling language with a small set of classes and relationships that covers a system's whole lifecycle. Holarch models are LML models. diagram, with the same Add panel and connect handles.
Which SysML v1 diagram is which v2 view
| SysML v1 diagram (LML projects) | SysML v2 view | In the text |
|---|---|---|
| Requirement Diagram | Requirement View | view v : GeneralView { filter @SysML::RequirementDefinition or @SysML::RequirementUsage or @SysML::SatisfyRequirementUsage; expose … } |
| Use Case Diagram | Use Case View | filter @SysML::UseCaseDefinition or @SysML::UseCaseUsage; |
| Parametric Diagram | Parametric View | filter @SysML::ConstraintDefinition or @SysML::ConstraintUsage; |
| Package Diagram | Package View | filter @SysML::Package; |
| Block Definition Diagram | General View | view v : GeneralView { expose … } |
| Internal Block Diagram | Interconnection View | : InterconnectionView |
| Activity Diagram | Action Flow View | : ActionFlowView |
| State Machine Diagram | State Transition View | : StateTransitionView |
| Sequence Diagram | Sequence View | : SequenceView |
| Tables and matrices | Grid (table view) | : GridView |
| (none) | Geometry View (2D) | : GeometryView |
The filter names the view kind, so other SysML v2 tools read these views as standard General Views. Create one with + New Diagram: choose the view, then the package it shows. Editing the filter in the text changes the kind.
Views open as tabs under the top bar, as LML diagrams do. ▲ Parent opens the view of the same kind that shows the owner of what this view shows: in the demo, carSpecTree (the requirement carSpec) opens requirementTree (its package). Arrange ▾ → Tidy Layout lays the view out again: requirement trees with each satisfying, verifying or derived element under its requirement, use cases in two staggered columns in their subject, and each constraint's bound values below it.
Requirement View
- Requirements show their id (short name), text (doc) and subject; Attributes ▾ chooses what each block shows. Nested requirements hang under their owner.
- Lines: «satisfy» (
satisfy R by part;), «verify» (a verification case's objectiveverify R;), «deriveReqt» (connection : Derivation connect original to derived;, from RequirementDerivation, also written#derivation connection) and «refine» (#refinement dependency x to R;). - Add panel: Requirement (onto a requirement: nested, numbered after it), Requirement Definition, Part (onto a requirement: the part satisfies it) and Verification Case (onto a requirement: the case verifies it). Drag a handle from one shape to another to choose containment, derive, refine, satisfy or verify.
- Select a «satisfy», «verify», «deriveReqt» or «refine» line and choose Relationship ▾ to make it another of these kinds between the same elements, as one undo step. A kind that is not valid between them is refused with the reason.
Use Case View
- Use cases are ellipses inside the boundary of their subject (
subject car : Car;; a use case usage takes its definition's subject). Each actor definition is one stick figure, joined to the use cases it takes part in (actor driver : Driver;). - Lines: «include» (
include use case s : StartCar;) and generalization (a use case definition that specializes another). SysML v2 has no extend relationship; a use case that specializes another plays that part. - Add panel: Use Case (into a subject: it gets that subject), Actor (onto a use case: it takes part), Subject (onto a use case). Drag from an actor to a use case to add the actor, or between use cases for «include» or generalization.
- Select an «include» or generalization line and choose Relationship ▾ to change it to the other kind. An «include» needs a use case definition as its target; a generalization relates two use case definitions.
Parametric View
- Each constraint shows its expression (its own, or its definition's) and its parameters as ports. A parameter whose value names a feature,
in mass = fleet.sedan.curbMass;, is bound to it: the value appears in its part, or on its own for a package-level value such asmaxCurbMass. - Values and Pass / Fail come from the model's evaluation with units; Needs input means a parameter has no value yet. Parameters are pins on the constraint's bottom edge, labelled with their values.
- Solve All checks every constraint with units, computes a value an equation defines (
q == s * s) and solves a single unknown, then previews the values to write; Apply writes them as one undo step. Solve does the same for the selected constraint. Only values that are numbers (or empty) are written; a value that is an expression stays. - Add panel: Constraint, Parameter (onto a constraint), Part and Value. Drag from a parameter to a value to bind it: the parameter's value becomes the value's name. Delete on a binding line removes the value from the parameter.
Package View
- Packages nest by ownership and show their members (turn off Members in the toolbar to hide them). «import» lines show what each package imports.
- Drag a package or member into another package to move it. Drag a handle from one package to another for «import» (
private import Other::*;) or containment.
Geometry View (2D)
- The view shows a part:
view layout : GeometryView { expose sedanLayout; }. Its parts are drawn as rectangles when they have the attributesx,y,widthandheight, as lengths in m, cm or mm (a plain number is metres):part redefines engine { attribute x = 0.15 [m]; attribute y = 0.5 [m]; attribute width = 0.6 [m]; attribute height = 0.8 [m]; }. Redefining inherited ones works too:attribute :>> x = 1 [m];. - x and y are measured from the top left corner of the nearest placed part that owns the part (else the view's origin), with y downward. 1 m is 200 px at 100 % zoom; the bar under the drawing shows 1 m.
- Drag a part to change x and y; drag a corner to resize it; the arrow keys move the selected part by 1 cm (Shift: 10 cm). The values are written in the units they already use, as one undo step.
- Parts without the four values are listed under the drawing; Place adds them. 3D geometry is not drawn.
- Add panel: drag Part onto the drawing for a new part with x, y, width and height where it is dropped (inside the part it is dropped onto), or press Enter to add it to the selected part. Type a name in Add or find to create a part with that name, to add a part typed by an existing part definition, or to place a part that has no values yet. Each one is one undo step.
The Hybrid Car demo has one of each: requirementTree, driverUseCases, sedanParametrics, packageStructure and componentLayout, and carSpecTree for ▲ Parent. See also Views in SysML v2 Projects.
Full documentation: SysML v2 Views › Requirement, Use Case, Parametric and Package Views