SysML How to Use Activity Diagrams to Model System Behavior

Categories:

Recommended

SysML: How to Use Activity Diagrams to Model System Behavior?

5-7 minutes

An activity diagram is a kind of behavior diagram; it’s a dynamic view of the system that expresses sequences of behaviors and event occurrences over time. In SysML, an activity diagram is inherited from UML with some minor modifications.

Activity diagrams, sequence diagrams, and state machine diagrams are the three options that SysML offers you to specify system behavior. All three can express sequential and concurrent behaviors and event occurrences over time. However, each one has strengths and weaknesses that make it more or less appropriate based on the needs of your target audience.

Why Activity Diagram?

Activity diagrams can express complex control logic better than sequence diagrams and state machine diagrams. An activity diagram is particularly good at expressing the flow of objects—matter, energy, or data—through a behavior, with a focus on how the objects can be accessed and modified in the execution of that behavior during system operation. Thus, it is typically used to specify behavior, with a focus on the flow of control and the transformation of inputs into outputs through a sequence of actions. Common usages of an activity diagram in SysML includes:

Activity diagrams are commonly used as an analysis tool to understand and express the desired behavior of a system.

Activity diagrams are often used to create graphical use case specifications which tend to be more concise and less ambiguous than the traditional text form of a use case specification.

In addition, an activity diagram is also a common technique is to dissect a single-use case specification either a text specification or an activity diagram, and subsequently for creating a set of sequence diagrams, one per path (scenario).

Describe High-Level Interactions between a System and External Systems

The figure below specifies how the Air Compressor interacts with the external systems, including the Air Tool, the Atmosphere, and indirectly with the Operator.

(*Source – Example extracted from – The Practical Guide to SysML 3 rd ed by Morgan Kaufmann 2014)

The Block Definition Diagram includes a block called the Air Compressor Context that is composed of the Air Compressor and the entities that are external to the Air Compressor representing the user (Operator), external system (Air Tool), and the physical environment (Atmosphere).

The Air Compressor and the external systems are shown as activity partitions. (*Source – Example extracted from – The Practical Guide to SysML 3 rd ed by MorganKaufmann 2014)

  1. The activity begins at the initial node (i.e., dark-filled circle), and then the Operator executes the Control Tool action.
  2. The activity completes its execution at the activity final node (i.e., bulls-eye symbol)after the Operator completes the Control Tool action.
  3. The Air Compressor performs the function (i.e., action) called Compress Air, which has a low-pressure air input and a high-pressure air output.

Model the Interaction within a Sub-System

The Compress Air action is further decomposed. Now, let’s continue the Air Compressor example, we can use an internal block diagram below to show how the components of the Air Compressor are interconnected.

(*Source – Example extracted from – The Practical Guide to SysML 3 rd ed by Morgan Kaufmann 2014)

We can use the activity diagram to shows how the components interact within the Air Compressor when performing a compress Air action. The activity partitions in this activity diagram correspond to the four components of the air compressor as shown in the Swimlane Activity Diagram below:

  • The Motor Controller performs actions to Sense Pressure and Control Motor
  • The Motor performs the action to Generate Torque
  • The Pump performs the action to Pump Air
  • The Tank performs the action to Store Air.
Category:

VP Flipbook Maker

Created a flipbook like this. This flipbook is made with Visual Paradigm Online. Try this free flipbook maker and create you own flipbook now!