Model Transformations in Model-Based Systems Engineering

55
1 MBSE Copyright © Chris Paredis. All Rights Reserved. Model Transformations in Model-Based Systems Engineering Chris Paredis Associate Director Model-Based Systems Engineering Center Georgia Tech [email protected] M B SE Model-Based Systems Engineering Center

description

Model-Based Systems Engineering Center. Model Transformations in Model-Based Systems Engineering. Chris Paredis Associate Director Model-Based Systems Engineering Center Georgia Tech c [email protected]. Objective. - PowerPoint PPT Presentation

Transcript of Model Transformations in Model-Based Systems Engineering

Page 1: Model Transformations in Model-Based Systems Engineering

1MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Model Transformationsin Model-Based Systems Engineering

Chris ParedisAssociate DirectorModel-Based Systems Engineering CenterGeorgia [email protected]

M BS E Model-BasedSystems EngineeringCenter

Page 2: Model Transformations in Model-Based Systems Engineering

2MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Objective

Provide enough information about model transformations so that you can envision where in your organization the use of model transformations can add value

Examples are not meant to be an exhaustive review of the state of the art but only illustrations

Page 3: Model Transformations in Model-Based Systems Engineering

3MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Overview of Presentation

Background — Model Transformations– What is a model transformation? — some simple examples– Meta-modeling and Model transformations languages

Model Transformations in MBSE?– A taxonomy of usage scenarios– Examples and illustrations

How to get started? Summary

Page 4: Model Transformations in Model-Based Systems Engineering

4MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

What is a Model Transformation?

Model Transformation:Any operation on a model

that produces another model

Very general: Almost anything you “do” with a model

Our primary interest: Automated model transformations

Page 5: Model Transformations in Model-Based Systems Engineering

5MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Example: Models Evolve Over Time

(from: A Practical Guide to SysML — Friedenthal, Moore, Steiner)

Page 6: Model Transformations in Model-Based Systems Engineering

6MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Example: Models Evolve Over Time

(from: A Practical Guide to SysML — Friedenthal, Moore, Steiner)

We forgotto drain theresidue…

Page 7: Model Transformations in Model-Based Systems Engineering

7MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Example: Models Evolve Over Time

(from: A Practical Guide to SysML — Friedenthal, Moore, Steiner)

Hmm… we could make this a continuous process

Page 8: Model Transformations in Model-Based Systems Engineering

8MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Model Transformations

A SysML model is a snapshot… How are the snapshots connected to each other?

Model Transformations

A model transformation represents knowledge… The more sophisticated the knowledge, the more

difficult the transformation is to automate

Page 9: Model Transformations in Model-Based Systems Engineering

9MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Examples of Model TransformationsTransformation

Source Model

Stage-Gate DocumentsTransformation

.pdf.html.pptx

Endogenous Transformation Exogenous Transformation

Page 10: Model Transformations in Model-Based Systems Engineering

10MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Examples of Model Transformations

Project Management Metrics

Transformation

Simulation &Optimization

Transformation

Transformation

Source Model

Stage-Gate DocumentsTransformation

.pdf.html.pptx

Page 11: Model Transformations in Model-Based Systems Engineering

11MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Some History: Model-Driven Architecture

Platform-Independent

Model

CORBA Model

MDA Tool generates all or most of the implementation code for deployment technology selected by the developer.

Java/EJBModel

CORBA

XML/SOAPModel

Java/EJB XML/SOAP Other

OtherModel

Map Platform Specific Model to application interfaces,

code, GUI descriptors, SQL queries, etc.

(from: MDA, by R. Soley: www.omg.org/mda/mda_files/MDA-Seminar-Soley6.ppt)

PIM

PSM

Code

Page 12: Model Transformations in Model-Based Systems Engineering

12MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Automated Transformations: A Closer Look…

Transformation .pdf.html.pptx

Source Model Target Model

SourceModeling Language

TargetModeling Language

modeled in modeled inModels must

be Formal

Page 13: Model Transformations in Model-Based Systems Engineering

13MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Automated Transformations: A Closer Look…

Transformation .pdf.html.pptx

Source Model Target Model

SourceModeling Language

TargetModeling Language

modeled in modeled in

SourceMeta-Model

TargetMeta-Model

defined by defined by

conforms to

Formal Syntax and Semantics

Page 14: Model Transformations in Model-Based Systems Engineering

14MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Modeling Languages are also Modeled Formally

UML is defined by a meta-model

This meta-model is defined in a meta-modeling language:The MOF language(Meta-Object Facility)

How is a meta-modeling language defined?

Part of the meta-model for UML

(from: A Practical Guide to SysML — Friedenthal, Moore, Steiner)

Page 15: Model Transformations in Model-Based Systems Engineering

15MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

The OMG Meta-Model Infrastructure

System

conforms to

conforms to

represented by

M0 Reality

ModelM1 User Model

Meta-modelM2 UML

Meta-meta-modelM3 MOF

conforms to

Page 16: Model Transformations in Model-Based Systems Engineering

16MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Model Transformation Specification

conforms to conforms to

reads writes

refers to refers to

executes

(Czarnecki, K., & Hellen, S., 2006)

SourceMeta-model

TransformationSpecification

TargetMeta-model

SourceModel

TransformationEngine

TargetModel

Page 17: Model Transformations in Model-Based Systems Engineering

17MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Implementations of Model Transformation

Imperative – Conventional programming tools– Access models through API of modeling tools– Java, Python, Ruby

Declarative– Consist of multiple declarative model transformation rules

» Left-hand side = applicability pattern» Right-hand side = model modification to apply

– Transformation engine automatically determines which rules to apply

– ATL, QVT, Moflon, GReAT, VIATRA2,…

Page 18: Model Transformations in Model-Based Systems Engineering

18MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Generative Model

Transformation for Hydraulic

System Model Transformation

rules to generate systems

Generate random system alternatives by applying rules in randomized order

(Example in MOFLON)

Page 19: Model Transformations in Model-Based Systems Engineering

19MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Generative Model

Transformation for Hydraulic

System Model Transformation

rules to generate systems

Generate random system alternatives by applying rules in randomized order

(Example in MOFLON)

Page 20: Model Transformations in Model-Based Systems Engineering

20MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Decision Tree of Generation ProcessDecision Tree Decision Tree[Activity] act [ ]

Add Cylinder

Add Pump

Add Tank

Add Directional Valve

[success]

[failure]

{probability = ".3" } [success]

{probability = ".7" } [success]

[failure]

{probability = ".7" } [success]

{probability = ".3" } [success]

[failure]

Decision Tree Decision Tree[Activity] act [ ]

Add Cylinder

Add Pump

Add Tank

Add Directional Valve

[success]

[failure]

{probability = ".3" } [success]

{probability = ".7" } [success]

[failure]

{probability = ".7" } [success]

{probability = ".3" } [success]

[failure]

Decision Tree Decision Tree[Activity] act [ ]

Add Cylinder

Add Pump

Add Tank

Add Directional Valve

[success]

[failure]

{probability = ".3" } [success]

{probability = ".7" } [success]

[failure]

{probability = ".7" } [success]

{probability = ".3" } [success]

[failure]

Decision Tree Decision Tree[Activity] act [ ]

Add Cylinder

Add Pump

Add Tank

Add Directional Valve

[success]

[failure]

{probability = ".3" } [success]

{probability = ".7" } [success]

[failure]

{probability = ".7" } [success]

{probability = ".3" } [success]

[failure]

Page 21: Model Transformations in Model-Based Systems Engineering

21MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Overview of Presentation

Context — Model Transformations– What is a model transformation? — some simple examples– Meta-modeling and Model transformations languages

How can model transformations be useful in MBSE?– A taxonomy of usage scenarios– Examples and illustrations

How to get started? Summary

Page 22: Model Transformations in Model-Based Systems Engineering

22MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Taxonomy for Model Transformations in MBSE

Organized by the nature of the knowledge encoded in the transformation1. Knowledge about Views

» Take information from a model and represent it in a different (graphical) syntax

2. Knowledge about Analysis» Take a structural description of a system and generate

a corresponding analysis model3. Knowledge about Synthesis

» Generate a (more detailed) structural description From simple to sophisticated

From specific to general

Page 23: Model Transformations in Model-Based Systems Engineering

23MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Why are Model Transformations Important?Collaboratively Developing Complex Systems

Software

Manufacturing

ProjectManagement

Testing

Analysis

CAD

• Fuselage• Landing Gear• Engines• …

Page 24: Model Transformations in Model-Based Systems Engineering

24MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Why are Model Transformations Important?Highly Interrelated Information & Knowledge

Software

Manufacturing

ProjectManagement

Testing

Analysis

CAD

• Fuselage• Landing Gear• Engines• …

Relations / Dependencies

Page 25: Model Transformations in Model-Based Systems Engineering

25MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Why are Model Transformations Important?MBSE Allows for More Formal Communication

Software

Manufacturing

ProjectManagement

Testing

Analysis

CAD

• Fuselage• Landing Gear• Engines• …

Page 26: Model Transformations in Model-Based Systems Engineering

26MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Why are Model Transformations Important?MBSE Allows for More Formal Communication

Software

Manufacturing

ProjectManagement

Testing

Analysis

CAD

• Fuselage• Landing Gear• Engines• …

Page 27: Model Transformations in Model-Based Systems Engineering

27MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Example: Representing CAD parts in Creo as SysML Blocks in MagicDraw

Step 2: A surrogate SysML block element is generated with the Creo

parameters. This block represents the Creo model for the system engineer.

Step 3: The surrogate SysML block element (and corresponding instance)

is connected to the Creo model. System engineer can sync parameter values.

Values read from Creo

(from: Manas Bajaj, InterCAX)

Page 28: Model Transformations in Model-Based Systems Engineering

28MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Example: Representing Assembly Structures in Windchill as SysML part properties in MagicDraw

(from: Manas Bajaj, InterCAX)

SysML model block structure

Part structure (BOM) in PLM systems (e.g. Windchill)

Auto-generation and sync

Page 29: Model Transformations in Model-Based Systems Engineering

29MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Document Generator by INCOSE SE2 team(mbse.gfse.de)

Page 30: Model Transformations in Model-Based Systems Engineering

30MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Document Generator by INCOSE SE2 team(mbse.gfse.de)

Page 31: Model Transformations in Model-Based Systems Engineering

31MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Document Generator by INCOSE SE2 team(mbse.gfse.de)

SysML +Profile

Transformation

DocBook XML file

XSLTTransformation

.html .pdf .docx

Page 32: Model Transformations in Model-Based Systems Engineering

32MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Using DocGen at JPL

(Source: “Model Based Document and Report Generation for Systems Engineering,” Delp, Lam, Fosse, Lee)

Page 33: Model Transformations in Model-Based Systems Engineering

33MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Taxonomy for Model Transformations in MBSE

Organized by the nature of the knowledge encoded in the transformation1. Knowledge about Views

» Take information from a model and represent it in a different (graphical) syntax

2. Knowledge about Analysis» Take a structural description of a system and generate

a corresponding analysis model3. Knowledge about Synthesis

» Generate a (more detailed) structural description From simple to sophisticated

From specific to general

Page 34: Model Transformations in Model-Based Systems Engineering

34MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

System Model

Why are Model Transformations Important?MBSE Allows for More Formal Communication

Software

Manufacturing

ProjectManagement

Testing

Analysis

CAD

• Fuselage• Landing Gear• Engines• …

Page 35: Model Transformations in Model-Based Systems Engineering

35MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Execute Parametric Models in ModelCenter

Syntactic transformation from parametrics to ModelCenter

Transformation

System Properties

Analysis Model

Page 36: Model Transformations in Model-Based Systems Engineering

36MBSE2012 Copyright © Chris Paredis. All Rights Reserved.36

SysML-Modelica Transformation Specification

SysML-Modelica

Transformation follows the principlesof Model-

Driven Architecture

(MDA)

Page 37: Model Transformations in Model-Based Systems Engineering

37MBSE2012 Copyright © Chris Paredis. All Rights Reserved.37

ModelOverviewComponents[Package] bdd [ ]

<<ModelicaModel>>ModelicaStandardLibrary::Mechanics::Translational::Components::

Mass{v = der(s);a = der(v);

m*a = flange_a.f + flange_b.f;}

<<ModelicaValueProperty>>+m : Mass{variability = parameter}<<ModelicaValueProperty>>+a : Acceleration<<ModelicaValueProperty>>+v : Velocity<<ModelicaValueProperty>>+stateSelect : ModelicaStateSelect{variability = parameter}

<<ModelicaPort>>flange_a : Flange

<<ModelicaPort>>flange_b : Flange

<<ModelicaModel>>ModelicaStandardLibrary::Mechanics::Translational::Components::

Spring{f = c*(s_rel - s_rel0);}

<<ModelicaValueProperty>>+c : TranslationalSpringConstant{variability = parameter}<<ModelicaValueProperty>>+s_rel0 : Distance{variability = parameter}

<<ModelicaPort>>flange_a : Flange

<<ModelicaPort>>flange_b : Flange

<<ModelicaModel>>ModelicaStandardLibrary::Mechanics::Translational::Interfaces::

PartialCompliant{s_rel = flange_b.s - flange_a.s;

flange_b.f = f;flange_a.f = -f;}

<<ModelicaValueProperty>>+s_rel : Distance<<ModelicaValueProperty>>+f : Force

<<ModelicaPort>>flange_a : Flange

<<ModelicaPort>>flange_b : Flange

<<ModelicaModel>>ModelicaStandardLibrary::Mechanics::Translational::Interfaces::

PartialRigid{flange_a.s = s - L/2;flange_b.s = s + L/2;}

<<ModelicaValueProperty>>+s : Position<<ModelicaValueProperty>>+L : Length{variability = parameter}

<<ModelicaPort>>flange_a : Flange

<<ModelicaPort>>flange_b : Flange

<<ModelicaExtendsRelation>>{ModelicaModification = "L=0" , "s(start=0, stateSelect=stateSelect)"}

<<ModelicaExtendsRelation>>

Modelica

SysML4Modelica

Bi-d

irect

iona

l Tr

ansf

orm

atio

n

Page 38: Model Transformations in Model-Based Systems Engineering

38MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

SysML4Modelica to Modelica Syntactical Mapping

38

Page 39: Model Transformations in Model-Based Systems Engineering

39MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Transform Structure into Analysis Model

Page 40: Model Transformations in Model-Based Systems Engineering

40MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Transform Structure into Analysis Model

Transformation requires deep analysis knowledge…

Page 41: Model Transformations in Model-Based Systems Engineering

41MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Model Transformations for Fluid Power

Transformation Rules:– If Cylinder in descriptive, then ModelicaCylinder in analytical– If Pump in descriptive, then ModelicaPump and

ModelicaFilter in analytical– …– If connection between Pump and Valve, then

ModelicaConnection between ModelicaPump and ModelicaValve

– …

Not a good idea!Too many rules…Too specific, brittle

Page 42: Model Transformations in Model-Based Systems Engineering

42MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Define Model Correspondences

CorrespondenceModels

Page 43: Model Transformations in Model-Based Systems Engineering

43MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Structure to Analysis Mapping

SysML4Modelica Analysis ModelSysML Descriptive Model

Transformation

Transformation

Modelica Model

Only 2 rulesOne for componentsOne for connections

Page 44: Model Transformations in Model-Based Systems Engineering

44MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Generation of Vehicle Analyses(Work with students B. Bailey, J. Branscomb & Ford Motor Company)

Reference model of logical vehicle architecture in SysML Specialize the reference model into a variant for a specific vehicle

program Specify the types of analyses needed

Page 45: Model Transformations in Model-Based Systems Engineering

45MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Generation of Vehicle Analyses(Work with students B. Bailey, J. Branscomb & Ford Motor Company)

Automatically generate templates for:– Modelica (for physics-based modeling)– Simulink (for controls)

Subsystem modeling– SME fill in model details– Validate subsystem models

System-level model integration– Guaranteed compatibility– Modelica model integrated into Simulink

Architecture in SysMLLogical Vehicle

AutomatedTransformation

Integrated Simulink-Modelica Model

Page 46: Model Transformations in Model-Based Systems Engineering

46MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Taxonomy for Model Transformations in MBSE

Organized by the nature of the knowledge encoded in the transformation1. Knowledge about Views

» Take information from a model and represent it in a different (graphical) syntax

2. Knowledge about Analysis» Take a structural description of a system and generate

a corresponding analysis model3. Knowledge about Synthesis

» Generate a (more detailed) structural description From simple to sophisticated

From specific to general

Page 47: Model Transformations in Model-Based Systems Engineering

47MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Synthesis Rules

Capture heuristic synthesis knowledge: What are promising system architectures?

Difficult to create a transparent “grammar” — which architectures are covered by the grammar?

Page 48: Model Transformations in Model-Based Systems Engineering

48MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Additional Example of Synthesis Knowledge

Variant modeling — constraint-based representation of a set of architectures (mbse.gfse.de)

F6 program at JPL: Generation and analysis of fractionated satellite systems

Transformation

Set of variations

One variant

Page 49: Model Transformations in Model-Based Systems Engineering

49MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Architecture Exploration Using SysML & CPLEX(Work with former students Alek Kerzhner)

1.Formulate Problem in SysML2.Transform to Superstructure3.Transform to Introduce Behavior4.Transform to Linearize5.Transform to AIMMS syntax6.Solve using CPLEX7.Transform solutions into SysML

Hydraulic Subsystem Hydraulic Subsystem[Block] ibd [ ]

arm

bucket

boomL

swing

armHousing

bucketHousing

boomLHousing

boomRHousingboom R

fuel

bucketC ylinder : Cylinder

A B

rod housing

boomCylinderRight : Cylinder

A B

rod housing

armCylinder : Cylinder

A B

rod housing

swingMotor : FixedDisplacementMotor

P : Hydraulic

T : Hydraulic

rotational : Rotational

boomC ylinderLeft : Cylinder

A B

rod housing

valveBlock : ValveBlock [0..4]A

B

P1T1

P2T2

powerUnit : PowerUnit [1..4]

P [1] T

rotational : Rotational

mover : PrimeMover [1..4]

out : Rotational

fue lIn : Fuel

SE Problem

AIMMS – CPLEXGeneration of Mixed Integer Programming

model through transformations

Page 50: Model Transformations in Model-Based Systems Engineering

50MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Overview of Presentation

Context — Model Transformations– What is a model transformation? — some simple examples– Meta-modeling and Model transformations languages

How can model transformations be useful in MBSE?– A taxonomy of usage scenarios– Examples and illustrations

How to get started? Summary

Page 51: Model Transformations in Model-Based Systems Engineering

51MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

How to get started..

Imperative modeling– Traditional programming languages: Java, Python,…– Direct use of the APIs of SysML and Analysis tools

Declarative Model Transformation Languages– ATL, QVT, Moflon, VIATRA2,…– All are Eclipse based– Integration of Model Transformation tools into current

SysML tools is not well supported…

Page 52: Model Transformations in Model-Based Systems Engineering

52MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

Model Transformation Tools

conforms to conforms to

reads writes

refers to refers to

executes

(Czarnecki, K., & Hellen, S., 2006)

SourceMeta-model

TransformationSpecification

TargetMeta-model

SourceModel

TransformationEngine

TargetModel

Eclipse MMTSysML Tool Analysis Tool

Page 53: Model Transformations in Model-Based Systems Engineering

53MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

So What? Should I use Model Transformations?

It depends… Costs

– Knowledge capture, management is expensive– Requires “knowledge engineers” who understand how best

to generalize knowledge and encode it in transformations– Infrastructure

Benefits– Improved consistency– Once the knowledge has been captured, the cost of

applying it is very small– Eliminate tedious, non-value-added tasks in MBSE process

Page 54: Model Transformations in Model-Based Systems Engineering

54MBSE2012 Copyright © Chris Paredis. All Rights Reserved.

1. Model Transformations– Any operation on a model that produces another model– Automated model transformations defined at meta-model level– Model transformation tools in Eclipse

2. Model Transformations in MBSE– Views: Synchronize views and maintain consistency– Analysis: Generate analysis models– Synthesis: Generate promising architectures

3. Cost-Benefit– Identify simple MBSE tasks that are tedious and error-prone

M BS E Model-BasedSystems EngineeringCenter

Key Take-Aways

Page 55: Model Transformations in Model-Based Systems Engineering

cser13.gatech.edu