Model-Driven Development of Simulation-Based ...

3 downloads 0 Views 1MB Size Report
Jun 9, 2016 - Modell. Issue 1. X. MySimulationBasedApp. Ok. Cancel. Results. •Lorem ipsum. • dolor sit amet ... State of the Art. 6/9/2016. Model-Driven ...
Model-Driven Development of Simulation-Based System Design Tools Sven Jäger, Ralph Maschotta, Tino Jungebloud, Alexander Wichmann, and Armin Zimmermann Systems and Software Engineering Group Faculty of Computer Science and Automation Ilmenau University of Technology Ilmenau, Germany http://www.tu-ilmenau.de/sse/

supported by the Federal Ministry of Economic Affairs and Energy of Germany (FKZ:20K1306D)

6/9/2016

Page 1

Model-Driven Development of Simulation-Based System Design Tools

Outline • Motivation

−Simulation-Based System Design Tools

• Methodology • Example • Conclusion

6/9/2016

Page 2

Model-Driven Development of Simulation-Based System Design Tools

Motivation Simulation-Based System Design Tools

Development of complex systems • Many parameters, dependencies between components • Use of simulation models − For requirement engineering / during design process of systems − Can predict behavior / reveal design flaws in early stages

Reuse models in later stages • Check customer configurations • Is used by system experts / no modeling experts

− Different system aspects described using diverse models − Parameters spread over simulation models / hierarchies − Will lead to configuration errors, wrong result interpretation

6/9/2016

Page 3

Model-Driven Development of Simulation-Based System Design Tools

Motivation Simulation-Based System Design Tools

Simulation-Based System Design Tools • Hides the complexity • Main Functionality

MySimulationBasedApp

Issue 1

− Configure parameters − Control simulations − Analyze results

• Components

X

Results

•Lorem ipsum • dolor sit amet • consetetur • sadipscing elitr • sed diam nonumy • eirmod tempor



Ok

Cancel

Config

•Lorem ipsum • dolor sit amet • consetetur • sadipscing elitr • sed diam nonumy • eirmod tempor

− Simulation kernel / model − Database for exchange configuration and result data − Possible Interfaces for hardware connection / validation

• Kind of product line development − Use of plugin framework − Gnu C++ applications

6/9/2016

Page 4

Model-Driven Development of Simulation-Based System Design Tools

Simulation kernel Executable Modell

Motivation Simulation-Based System Design Tools

Remaining work: • System modeling task (simulation model) • Software development tasks

− Define structure of configuration and result database − Define conditions / dependencies between elements − Design of the GUI  standard tools − Behavior of simulation result analysis − Behavior of parameter optimization

Repetitive software development tasks • Raise to a "higher level of abstraction" • Using model based approach

6/9/2016

Page 5

Model-Driven Development of Simulation-Based System Design Tools

Motivation State of the Art

OMG‘s Model Driven Architecture approach • Generative Software Development − PIM  PSM  Code 

Using PDM

Eclipse Modeling Project • Set of modeling frameworks, tooling, standard implement. − Ecore − EMF, GMF

• Eclipse Sirius Project

− Easily create graphical modeling workbenches

6/9/2016

Page 6

Model-Driven Development of Simulation-Based System Design Tools

Motivation State of the Art

Existing MDA tools • Generate classes for:

− Models − Utilities to create and edit models

• Well integrated for Java programming language • Weakly supported for other programming languages such as C++

Missing EMF-like UML Generator for C++ • To provide UML metamodel – during runtime • Useful for tools like: − OCL Validation − Execution engines, …

6/9/2016

Page 7

Model-Driven Development of Simulation-Based System Design Tools

Outline • Motivation

−Simulation-Based System Design Tools

• Methodology • Example • Conclusion

6/9/2016

Page 8

Model-Driven Development of Simulation-Based System Design Tools

Methodology General Workflow

MDA-Approach to develop Simulation-Based SDT MySimulationBasedApp

Application modelling environment

X

create

Applica tionmodel

use

Model Based Application Generator

use

Ok

Overall Meta Model include

Framework Components

Page 9

Cancel

Simulation kernel Results •Lorem ips um • dolor s it amet • cons etetur • s adips cing elitr • s ed diam nonumy • eirmod tempor

Config •Lorem ips um • dolor s it amet • cons etetur • s adips cing elitr • s ed diam nonumy • eirmod tempor

ConstraintERDMetaMetamodell ADmodell ClassD Metamodel Metamodel

6/9/2016

Issue 1

create

Model-Driven Development of Simulation-Based System Design Tools

Executable Modell

X

Methodology Models

• Comprehensive meta-model − Define structure and behavior − Use of UML   

Class Diagram Package Diagram Activity Diagram …

− Using profiles for enhancements − Define semantic between models

6/9/2016

Page 10

Model-Driven Development of Simulation-Based System Design Tools

X

cr eate

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

Cancel

Overall M eta

Model includ e

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

Platform independent model (PIM)



MySim ulationBasedApp

Application modelling environment

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

Methodology Models

MySim ulationBasedApp

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

Cancel

Overall M eta

Model includ e

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

Transformation PIM  PSM • M2M-Transformation using OMG-QVT

Platform specific models (PSM) • DSL for Simulation-Based System Design Tools (DSDT) • Persistence Models • Simulation-Tool-Models

Using Platform Description Model (PDM) • Additional Profiles, Apply stereotypes to PSM elements 6/9/2016

Page 11

Model-Driven Development of Simulation-Based System Design Tools

Execut able M odell

X

MySim ulationBasedApp

Methodology

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

Ok

all M eta

Model includ e

Views

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Structural views • Data view

6/9/2016

Page 12

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

− Structure and relation of data − Class Diagram using qualified Associations

Is s ue 1

cr eate

D a ta V ie w

M odel

Model-Driven Development of Simulation-Based System Design Tools

Execut able M odell

X

MySim ulationBasedApp

Methodology

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

Ok

all M eta

Model includ e

Views

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Structural views • Data view • Constraints view  

D a ta V ie w

M odel

System parameters Simulation parameters

− Using OMG OCL − Validation during Runtime: 

6/9/2016

Using an C++ OCL Interpreter

Page 13

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

− Defines conditions and dependencies between:

Is s ue 1

cr eate

Model-Driven Development of Simulation-Based System Design Tools

C o n s tra in t V ie w

Execut able M odell

X

MySim ulationBasedApp

Methodology

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

Ok

all M eta

Model includ e

Views

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Structural views

− Standard dialog editors − Combination of data and constraint view 

D ia lo g V ie w

D a ta V ie w

M odel

Maps data model, constraints, to dialog elements

− Properties for GUI representation 

6/9/2016

Added using profiles and stereotypes

Page 14

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Data view • Constraints view • Dialog view

Is s ue 1

cr eate

Model-Driven Development of Simulation-Based System Design Tools

C o n s tra in t V ie w

Execut able M odell

X

MySim ulationBasedApp

Methodology

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

Ok

all M eta

Model includ e

Views

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Structural views D ia lo g V ie w

• Data view • Constraints view • Dialog view

D a ta V ie w

M odel

Behavioral views − Using UML activities 

A n a ly s is V ie w

to analyze simulation results

− Describe signal-processing pipelines

6/9/2016

Page 15

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Analysis view

Is s ue 1

cr eate

Model-Driven Development of Simulation-Based System Design Tools

C o n s tra in t V ie w

Execut able M odell

X

MySim ulationBasedApp

Methodology

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

Ok

all M eta

Model includ e

Views

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Structural views D ia lo g V ie w

S im u la tio n

D a ta V ie w

c o n tro l V ie w

M odel

Behavioral views • Analysis view • Simulation control view

A n a ly s is V ie w

− UML Activities for controlling simulations  

6/9/2016

Definition of optimization loops Simulation deployment (fork node)

Page 16

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Data view • Constraints view • Dialog view

Is s ue 1

cr eate

Model-Driven Development of Simulation-Based System Design Tools

C o n s tra in t V ie w

Execut able M odell

X

Methodology View Specification

MySim ulationBasedApp

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

Cancel

Overall M eta

Model includ e

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

View Specification: • Eclipse Sirius Project to generate model-based editor

Structural diagrams: • • • •

Top view model: package diagram Data view: class diagram / mapping diagram Constraints view: class diagram / parametric diagrams Dialog model: class diagrams / common editor for GUI

Behavior diagrams: • Simulation control view and result analysis pipelines: Activity diagrams [2,3]

6/9/2016

Page 17

Model-Driven Development of Simulation-Based System Design Tools

X

Methodology Generator

MySim ulationBasedApp

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

X

Is s ue 1

cr eate

Ok

Cancel

Overall M eta

Model includ e

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

Transformation PSM  Code • MOF Model To Text Transformation • Acceleo

Source code • C++ for DSDT • Database schema − Database Queries

• Elements for simulation model [1]

6/9/2016

Page 18

Model-Driven Development of Simulation-Based System Design Tools

Outline • Motivation

−Simulation-Based System Design Tools

• Methodology • Example • Conclusion

6/9/2016

Page 19

Model-Driven Development of Simulation-Based System Design Tools

Example

MySim ulationBasedApp

Application modelling environment

• Derived sub-models:

− C++ SBA (Framework) − SQLite − MLDesigner as simulation tool

• Subordinated aspect: − Representation of data elements in GUI

6/9/2016

Page 20

Model-Driven Development of Simulation-Based System Design Tools

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

all M eta

Model includ e

Configuration of Wireless Sensor Network Simulations − abstract description of data in model package

cr eate

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Basis:

X

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

Example Define Model

MySim ulationBasedApp

Application modelling environment

X

cr eate

21

Model-Driven Development of Simulation-Based System Design Tools

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

all M eta

Model includ e

Describe structure using UML class diagram

6/9/2016

use

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Model based specification GUI properties

Applica tion model

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

MySim ulationBasedApp

Example

Application modelling environment

X

cr eate

Applica tion model

use

use

Ok

all M eta

Model includ e

Framework Components

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

Define Stereotypes in Profile Diagram • Stereotype DialogElement (Extends UML::Property) • Define Additional Values for DialogElement Visualisation kind

GUI description

Range of spinbox

22

Is s ue 1

cr eate

Cancel

Over-

Define Model

6/9/2016

Model Based Application Generator

Model-Driven Development of Simulation-Based System Design Tools

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

Example Define Model

6/9/2016

23

MySim ulationBasedApp

Application modelling environment

cr eate

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

Cancel

Overall M eta

Model includ e

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

Model-Driven Development of Simulation-Based System Design Tools

X

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

MySim ulationBasedApp

Example

Application modelling environment

Applica tion model

use

Model Based Application Generator

use

X

Is s ue 1

cr eate

Ok

all M eta

Model includ e

Cancel

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

UML2cpp

UML2cpp

24

cr eate

Over-

Code Generation

6/9/2016

X

class MAC_Hybrid:virtual public MAC { … protected: MAC_Hybrid(){} public: //destructor virtual ~MAC_Hybrid() {} //********************************* // Getter Setter //********************************* class DialogElement : virtual public uml::Stereotype virtual double getSuperFrameLengh() const = 0; { virtual void setSuperFrameLengh (double _superFrameL … virtual double getBeaconGuardLength() const = 0; protected: virtual void setBeaconGuardLength (double _beaconGua DialogElement(){} virtual double getSlotGuardLength() const = 0; public: virtual void setSlotGuardLength (double _slotGuardLe //destructor virtual double getSlotLength() const = 0; virtual ~DialogElement() {} … //********************************* // Getter Setter //********************************* virtual QString getVisualizationName() const = 0; virtual void setVisualizationName (QString _visualizationN virtual VisualizationSpec::VisualizationKind getVisualizat virtual void setVisualizationKind (VisualizationSpec::Visu virtual QString getUnitName() const = 0;

Model-Driven Development of Simulation-Based System Design Tools

Example Generic Configuration Editor

MySim ulationBasedApp

Application modelling environment

X

cr eate

Applica tion model

use

Model Based Application Generator

use

X

Is s ue 1

cr eate

Ok

Cancel

Overall M eta

Model includ e

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

void ModelBasedEditorView::createEditLine(uml::Element* element, uml::Property* prop, int &row) { … uml::Stereotype* stereoType = prop->getAppliedStereotype(eInstance()->get_VisualizationSpec_DialogElement()->get VisualizationSpec::DialogElement* dialogElement = dynamic_cast(stereoType); … labelWidget->setText(dialogElement->getVisualizationName()); unitLabelWidget->setText(dialogElement->getUnitName()); visualizationKind = dialogElement->getVisualizationKind(); … if (visualizationKind == VisualizationSpec::EDIT) { QLineEdit* lineWidget = new QLineEdit(m_formFrame); …

6/9/2016

25

Model-Driven Development of Simulation-Based System Design Tools

Example Result

MySim ulationBasedApp

Application modelling environment

Page 26

Model-Driven Development of Simulation-Based System Design Tools

Applica tion model

use

Model Based Application Generator

Is s ue 1

cr eate

use

Ok

all M eta

Model includ e

Simulation-Based System Design Tool for Configuration of Wireless Sensor Network Simulations

6/9/2016

cr eate

Cancel

Over-

Cons traint ERD M etaM etamodell AD modell M etaClas s Dmodel M etamodel

• Model Based Configuration Dialog

X

Framework Components

Simulation ker nel Res ults Config

•Lor em ips um •Loripem s um •dolosritam et •dolosritam et •cons et et ur •cons et et ur •s adipselciitnrg •s adipsel ciitnrg •s ed diam nonum y •s ed diam nonum y •eir mt od em por •eir mtod em por

Execut able M odell

X

Outline • Motivation

−Simulation-Based System Design Tools

• Methodology • Example • Conclusion

6/9/2016

Page 27

Model-Driven Development of Simulation-Based System Design Tools

Conclusion Describe Workflow • MDA-Approach to develop Simulation-Based SDT • Eclipse / Sirius Toolchain − Define DSL for Simulation-Based System Design Tools − Define Model Editor for Simulation-Based SDT

• UML to define comprehensive meta-model • Own EMF-like UML Generator for C++ • Existing Framework for Simulation based Application

6/9/2016

Page 28

Model-Driven Development of Simulation-Based System Design Tools

Conclusion Future work • Generation of the components for the data abstraction layer • Dialog View

− Mapping of data model, constraints, to dialog elements

• Connect application to simulation tools • Execution of modeled application behavior using generated C++ fUML implementation

6/9/2016

Page 29

Model-Driven Development of Simulation-Based System Design Tools

Model-Driven Development of Simulation-Based System Design Tools [1] S. Jäger, R. Maschotta, T. Jungebloud, A. Wichmann, and A. Zimmermann, “An EMF-like UML generator for C++”, in 4th Int. Conference on Model-Driven Engineering and Software Development (MODELSWARD), 2016. [2] Alexander Wichmann, Sven Jäger, Tino Jungebloud, Ralph Maschotta, and Armin Zimmermann: "Specification and Execution of System Optimization Processes with UML Activity Diagrams“, 10th IEEE Int. Systems Conference (SysCon), 2016 [3] Sven Jäger, Ralph Maschotta, Tino Jungebloud, Alexander Wichmann, and Armin Zimmermann: "Creation of Domain-Specific Languages for Executable System Models with the Eclipse Modeling Project“, 10th IEEE Int. Systems Conference (SysCon), 2016. [4] S. Jäger, T. Jungebloud, R. Maschotta, and A. Zimmermann, “Model-based QoS evaluation and validation for embedded wireless sensor networks”, Systems Journal, IEEE, 2014 [5] R. Maschotta, S. Jäger, T. Jungebloud, and A. Zimmermann, “A frame-work for agile development of simulation-based system design tools”, in Proc. IEEE International Systems Conference , 2013 supported by the Federal Ministry of Economic Affairs and Energy of Germany (FKZ:20K1306D)

6/9/2016

Page 30

Model-Driven Development of Simulation-Based System Design Tools

Suggest Documents