activity diagrams between devs-based modeling and

16
Activity Diagrams Between DEVS- based Modeling and Simulation and fUML-based Model Execution Abdurrahman Alshareef (1) , Doohwan Kim (2) , Chungman Seo (2) , Bernard Zeigler (2) (1) King Saud University (2) RTSync Presented in 2020 Summer Simulation Conference, July 20 - 22, 2020

Upload: others

Post on 23-Apr-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Activity Diagrams Between DEVS-based Modeling and

Activity Diagrams Between DEVS-based Modeling and Simulation and

fUML-based Model Execution

Abdurrahman Alshareef (1), Doohwan Kim (2), Chungman Seo (2), Bernard Zeigler (2)

(1) King Saud University

(2) RTSync

Presented in 2020 Summer Simulation Conference, July 20 - 22, 2020

Page 2: Activity Diagrams Between DEVS-based Modeling and

Motivation

• The Unified Modeling Language (UML) and System Modeling Language (SysML) are both too abstract when it comes to simulation and execution.

• There is a growing need and perhaps necessity to simulate such models in order to obtain certain benefits.

• Some existing works provides transformations but they often have shortcomings with respect to scale and complexity creating some obstacles for the modeling activity at hand, some require substantial learning with many possible scenarios due to ambiguity.

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

2

Page 3: Activity Diagrams Between DEVS-based Modeling and

Related Work and Background

• UML and SysML are both widely known languages for modeling software as well as system engineering problems.

• More recently, execution models have been proposed to execute and debug specific scenarios of the diagrams.

• The foundational semantics of the executable UML subset (fUML) has been proposed and adopted by the OMG as a standard for executing some diagrams of UML.

• The specification is proposed for UML. It does not directly account for the SysML. Analogously, that led to the issue of not having stronger accounts to system notions and dynamics (UML vs. SysML). For example, the execution model has been considered “time agnostic”.

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

3

Page 4: Activity Diagrams Between DEVS-based Modeling and

Executing and Simulating UML and SysML

Software Engineering

System Engineering, Model-Based System Engineering (MBSE)

MBSE/M&S in the sequel

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

4

Page 5: Activity Diagrams Between DEVS-based Modeling and

Model Execution and Simulation – Examples of Tools Support

IBM Rational Rose

Rational Software Architect

Eclipse Papyrus

Moka

Magic Draw

CameoMS4 Me

DEVS-Suite

So far, Activity, Sequence, and Statecharts Diagrams Editors have

been developed

Modeling

Execution or/and Simulation

MBSE/M&S in the sequel, with DEVS-based simulation

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

5

Page 6: Activity Diagrams Between DEVS-based Modeling and

Increment Example using fUML

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

6

https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution

Page 7: Activity Diagrams Between DEVS-based Modeling and

Increment Example based on DEVS approach

• As the activities suggest, different incrementing scenarios with different control are possible to model (similar to the counter model).

• The first scenario can be used to increment at the arrival of each input (counting inputs).

• The second scenario can be used with two different accounts for two different inputs, zeros and ones.

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

7

Page 8: Activity Diagrams Between DEVS-based Modeling and

Increment Example based on DEVS approach - DEMO

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

8

int counter = 0;In δext: counter ← counter + 1

- The codes snippets corresponding to the activity are automatically generated

- then the counter variable is defined with the desired operation and added to the class corresponding to the increment action

Page 9: Activity Diagrams Between DEVS-based Modeling and

Increment Example based on DEVS approach - DEMO

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

9

Page 10: Activity Diagrams Between DEVS-based Modeling and

Increment Example based on DEVS approach - DEMO

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

10

Page 11: Activity Diagrams Between DEVS-based Modeling and

Increment Example based on DEVS approach – Code snippet for an external transition function for MS4 Me

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

11

@Override

public void externalTransition(double e, MessageBag x) {

currentTime += e;

sigma -= e;

if (phaseIs("passive")) {

for (Port in_port : this.getInputPorts())

if (x.hasMessages(in_port)) {

ArrayList<Message<Serializable>> messageList = in_port.getMessages(x);

for (int i = 0; i < messageList.size(); i++) {

job = counter+++"";

holdIn("active", processing_time);

}

}

}

}

For the action increment

Manually modified after the code generation step

Page 12: Activity Diagrams Between DEVS-based Modeling and

Markov-DEVS Simulation of Multi-Processing Architectures

• Modeling fork-join multi-processing scheme with an activity

• Two actions can be in an active state simultaneously conforming to the activities semantics

• One benefit of having DEVS as an underlying formalism is the accessibility to many DEVS variants that are useful for particular domains and interests

• In Markov-DEVS, for example, the transition probability time advance function for each action is determined based on Markov property

• Modeling simple pipeline:

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

12

Page 13: Activity Diagrams Between DEVS-based Modeling and

Markov-DEVS Simulation of Multi-Processing Architectures - DEMO

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

13

Pipeline

Fork-join

Page 14: Activity Diagrams Between DEVS-based Modeling and

Markov-DEVS Simulation of Multi-Processing Architectures - DEMO

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

14

The join node is in waiting phase due to some job loss

Page 15: Activity Diagrams Between DEVS-based Modeling and

Missile Firing Activity Modeling

The integration step can take place with hybrid DEVS modeling support using tools such as PowerDEVSActivity Diagrams Between DEVS-based Modeling and

Simulation and fUML-based Model Execution15

Further examination to synchronization with precise

timing can take place

Page 16: Activity Diagrams Between DEVS-based Modeling and

From Execution to Simulation, Comparison and Evaluation - SummaryfUML-based Execution DEVS-based Simulation

Discrete Time model with step-wise execution The DEVS formalism

Implicit timing isomorphic to integers Real time base

There may not be necessarily time progression Legitimacy property

Parameters and Pins Ports

Some actions can be used to call other behavior The resulting simulation models are modular

Finite Deterministic State Space Deterministic/Stochastic State Space

Execution Model Simulation Protocol

Sequential Execution Parallel Simulation

Suitable for software development and interfaces Simulation modeling/ System of Systems

Replacement to code Complementary to code

Activity Diagrams Between DEVS-based Modeling and Simulation and fUML-based Model Execution

16