SlideShare une entreprise Scribd logo
1  sur  50
Leveraging Alf for SysML
Part 2: More Effective Trade Study Modeling
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Ed Seidewitz
Model Driven Solutions, Inc. ● http://www.modeldriven.com
ed-s@modeldriven.com ● @Seidewitz
http://slideshare.net/seidewitz
Page 2
Goals
Part 1 –Simulation Modeling (Sunday)
• Learn the basics of the Alf action language for executable modeling.
• Learn how to use Alf as an action language in SysML models.
• Practice executing simulations of models that use Alf.
Part 2 – Trade Study Modeling (Today)
• Learn how to use the Trade Study Pattern.
• Use Alf together with parametric constraints in SysML models.
• Use simulation models in trade studies.
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 3
Prerequisites
• Participant
– Knowledge of SysML modeling using MagicDraw or Cameo System Modeler
– Some experience with model execution using Cameo Simulation Toolkit
– Introductory understanding of using Alf with SysML (e.g., from Part 1 of this tutorial)
• System (for hands-on exercises)
– Cameo System Modeler 19.0 SP2 (or MagicDraw and SysML)
– Cameo Simulation Toolkit 19.0 SP2 (included in CSM Enterprise Edition)
– Alf Plugin 19.0 SP2
• Slides: Available at https://www.slideshare.net/seidewitz
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 4
4
Installing the Alf Plugin
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Plugin documentation is available at:
https://docs.nomagic.com/display/ALFP190SP2/Alf+plugin
Under Plugins
(commercial),
download / install the
Alf plugin v19.0 SP2.
Select Help ► Resource/Plugin
Manager to open the Resource/
Plugin Manager window.
Page 5
Parametrics
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 6
Parametric Constraints
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
A constraint block is a generic
form of parametrized
constraint that can be used in
multiple contexts.
A constraint property is
a property whose type
is a constraint block.
Constraints are defined
using mathematical
equations.
Constraints are defined in terms of
parameters that can be bound to the
physical properties modeled for systems.
⚠️ Do not specify constraints
using Alf expressions.
Page 7
Parametric Diagrams
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
A constraint property is a
usage of a constraint block.
A binding connector asserts
that the values of the connected
properties must be equal.
Page 8
Airplane Mass Roll Up: Definition
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The top-level assembly and each
part are all kinds of components.
The specific compositions
subset the general composition.
Page 9
Airplane Mass Rollup: Execution
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Executing this instance with
the given composition.
By default, solving is
done on initialization.
As a result, the total
mass is computed.
Page 10
Hands On
Airplane Mass Roll Up
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 11
Create a Mass Roll Up project
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 12
Load the Alf Library and open the Alf Editor window
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 13
Create a Component block and totalMass operation
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The total mass is computed
using an operation
This is a conditional expression, which
choses one of two operand expressions
to evaluate based on a condition.
This is equivalent to
this.sub->collect s (s.totalMass())
that is, it collects all the total masses of all
the subcomponents.
This reduces a sequence using the
given function (in this case, it sums).
Right click on the operation and
select Create Method ►
Behavior to open the Behavior
selection window.
Page 14
Create the Airplane mass roll up definition
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Drag the subsetted property onto
the subsetting property in order to
create a subsets relationship.
Page 15
Create a Simulation driver block
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Create an activity under
the Simulation block.
Enter Alf code to test the
roll up operation.
Page 16
Create an Simulation instance model
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Create composition links
between the instances.
Select the specific association,
not the general one.
Set all the component
masses.
Execute the Simulation
instance
Page 17
Trade Studies
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 18
Trade study pattern
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The trade study pattern
is a modelling pattern for
choosing the best of a
set of alternatives.
A parametric constraint
is used to test the “value”
of each alternative and
select the best one.
Page 19
Trade study driver activity
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The current alternative is responsible for
setting the current value, which triggers
the compare constraint.
 To be safe, there should be
a control flow to make sure
the expansion region does
not execute prematurely.
Page 20
Area trade study
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The alternatives for this trade study
are Rectangles of different areas.
The Area trade study specializes
the general Trade Study Pattern
and redefines the current
alternative to be a Rectangle.
A parametric constraint is
used to compute the
currentValue as the area
of the current alternative.
Page 21
Area trade study configuration
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The alternatives to be
configured are configured
using instance specifications.
Page 22
Area trade study results
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
The “winner” is alternative
r3 with the highest area.
Page 23
Hands On
Trade Study Pattern
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 24
Open the sample TradeStudyPattern project
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
…
Click on the Samples
button.
Select TradeStudyPattern
under Simulation.
 Be sure to save the project locally
before modifying it!
 After saving a local copy, load the
Alf Library and open the Alf Editor
window.
Page 25
Set the animation speed
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Open the Specification for each
SimulationConfig and set the
Animation Speed to 100.
Page 26
Delete the old method bodies
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Delete the old methods
for computeWithBest and
evaluateAlternative.
Page 27
Create the evaluateAlternative method
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Add an alternative parameter
to the evaluateAlternative
operation.
Right click on the operation and
select Create Method ►
Behavior to open the Behavior
selection window.
Choose either
Activity or
Opaque Behavior.
Enter the Alf code in
the Alf Editor window.
Page 28
Create the evaluateAlternative method
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Also create a method for the
compareWithBest operation,
and add Alf code.
Page 29
Replace the doTradeStudy activity
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Delete the content of the
doTradeStudy activity…
…and replace it with Alf code.
Page 30
Run the simulations
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Run the simulations, to
see if they still work.
Page 31
Revise the compareWithBest operation
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Add a value operation to
the Alternative block.
Delete the compare
constraint property. Update the Alf code for the
compareWithBest operation.
 Be sure to delete using ctrl-D,
not the delete key.
Page 32
Add area operation to Rectangle block
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Add an area operation,
and open its specification.
Choose Properties: All.
Search for the “redefined
operation” property.
Click here to select a
redefined operation.
Select value as the
redefined operation.
Search for the “value”
operation.
Page 33
Create the area method
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Correct the spelling
of “hight” to “height”.
Delete the rArea constraint
property.
Create a method for the
area operation.
ⓘ To show the “redefines”
annotation, open the Rectangle
Symbol Properties and set Show
Operation Properties to true.
Page 34
Add hp operation to Engine block
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Delete this connector.
Add an hp operation, redefining
the value operation.
Create a method for the hp
operation
Page 35
Redefine hp operation for HybridEngine block
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Add an hp operation,
redefining the Engine::hp
operation.
Delete the Sum constraint
property.
 The component hp properties
need to be made public!
Create a method for the hp
operation.
A super invocation calls the
original operation method from
the ”superclass” block.
Page 36
Run the simulations
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Run the simulations, to
see if they still work.
Page 37
Hands On
Heating Simulation
Trade Study
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 38
Share packages from the Trade Study Pattern project
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Share the three packages
from the (modified)
TradeStudyPattern project.
Page 39
Use the TradeStudyPattern project in Heating Simulation
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Open the Heating Simulation project and
select File ▶︎ Use Project ▶︎ Local Project to
attach the TradeStudyPattern..
Create a Trade Study package.
Page 40
Add a block definition diagram for Trade Study
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Create a Heating Simulation Trade
Study block as a specialization of
the Trade Study Pattern.
Redefine the alternatives
reference property.
Add a generalization from
Heating Simulation to Alternative.
Redefine the value
operation from Alternative.
Page 41
Add signals to provide an asynchronous protocol
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 42
Create the Heating Simulation Trade Study state machine
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 43
Create Start and Stop signals and receptions
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Make this association
end navigable.
Make this association
end navigable.
Page 44
Update the Environment state machine
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 45
Update the heat operation on the Climate block
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 46
Update the Climate state machine
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 47
Update the Heater state machine
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Page 48
Create a Heating Simulation state machine
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Also add a referential
attribute to Heating
Simulation Trade Study.
Page 49
Create a simulation configuration
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
Note different values for
temperature attributes.
Set the animation
speed to 100.
Set the evaluation
target to the study.
 The SimulationConfig needs
to be created on a Simulation
Configuration Diagram.
Page 50
Run the simulation
Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.

Contenu connexe

Tendances

Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models
Obeo
 
Delta v advanced control overview_en
Delta v advanced control overview_enDelta v advanced control overview_en
Delta v advanced control overview_en
Luis Atencio
 
DeltaV Safety Instrumented System Overview
DeltaV Safety Instrumented System OverviewDeltaV Safety Instrumented System Overview
DeltaV Safety Instrumented System Overview
Sumeet Goel
 

Tendances (20)

Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models
 
Executable UML and SysML Workshop
Executable UML and SysML WorkshopExecutable UML and SysML Workshop
Executable UML and SysML Workshop
 
Handbook on Functional Testing; HIL | MIL | SIL Testing
Handbook on Functional Testing; HIL | MIL | SIL TestingHandbook on Functional Testing; HIL | MIL | SIL Testing
Handbook on Functional Testing; HIL | MIL | SIL Testing
 
Fieldbus Tutorial - Part 11 HSE Fieldbus
Fieldbus Tutorial - Part 11   HSE FieldbusFieldbus Tutorial - Part 11   HSE Fieldbus
Fieldbus Tutorial - Part 11 HSE Fieldbus
 
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
 
Introduction to SysML af Finn Overgaard Hansen, AU
Introduction to SysML af Finn Overgaard Hansen, AUIntroduction to SysML af Finn Overgaard Hansen, AU
Introduction to SysML af Finn Overgaard Hansen, AU
 
Fieldbus Tutorial Part 4 - Installation of Fieldbus
Fieldbus Tutorial Part 4 - Installation of FieldbusFieldbus Tutorial Part 4 - Installation of Fieldbus
Fieldbus Tutorial Part 4 - Installation of Fieldbus
 
The 10 most common fmea mistakes
The 10 most common fmea mistakes The 10 most common fmea mistakes
The 10 most common fmea mistakes
 
InTouch HMI SCADA
InTouch HMI SCADA InTouch HMI SCADA
InTouch HMI SCADA
 
SysML v2 - What's the big deal, anyway?
SysML v2 - What's the big deal, anyway?SysML v2 - What's the big deal, anyway?
SysML v2 - What's the big deal, anyway?
 
Delta v advanced control overview_en
Delta v advanced control overview_enDelta v advanced control overview_en
Delta v advanced control overview_en
 
Multi domain product architecture: start integrated, stay integrated
Multi domain product architecture: start integrated, stay integratedMulti domain product architecture: start integrated, stay integrated
Multi domain product architecture: start integrated, stay integrated
 
G120 cu250 s2_kba1_0414_eng_en-us
G120 cu250 s2_kba1_0414_eng_en-usG120 cu250 s2_kba1_0414_eng_en-us
G120 cu250 s2_kba1_0414_eng_en-us
 
DeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized EnvironmentDeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized Environment
 
Tesla UBQ01B0 FSD Chip
Tesla UBQ01B0 FSD ChipTesla UBQ01B0 FSD Chip
Tesla UBQ01B0 FSD Chip
 
DeltaV Safety Instrumented System Overview
DeltaV Safety Instrumented System OverviewDeltaV Safety Instrumented System Overview
DeltaV Safety Instrumented System Overview
 
RPA with UIPath and Flaui
RPA with UIPath and FlauiRPA with UIPath and Flaui
RPA with UIPath and Flaui
 
Using Syncade Workflow and AMS Device Manager for SIF Proof Testing on a Delt...
Using Syncade Workflow and AMS Device Manager for SIF Proof Testing on a Delt...Using Syncade Workflow and AMS Device Manager for SIF Proof Testing on a Delt...
Using Syncade Workflow and AMS Device Manager for SIF Proof Testing on a Delt...
 
MBSE with Arcadia method step-by-step Physical Architecture.pdf
MBSE with Arcadia method step-by-step Physical Architecture.pdfMBSE with Arcadia method step-by-step Physical Architecture.pdf
MBSE with Arcadia method step-by-step Physical Architecture.pdf
 
표준기반 스마트공장 공정모델 및 시사점 차석근
표준기반 스마트공장 공정모델 및 시사점 차석근표준기반 스마트공장 공정모델 및 시사점 차석근
표준기반 스마트공장 공정모델 및 시사점 차석근
 

Similaire à Leveraging Alf for SysML, Part 2: More Effective Trade Study Modeling

Webinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided AnalyticsWebinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided Analytics
KNIMESlides
 
Adamstutorial
AdamstutorialAdamstutorial
Adamstutorial
gajani121
 
Deploying Solution Enhancements to Production
Deploying Solution Enhancements to ProductionDeploying Solution Enhancements to Production
Deploying Solution Enhancements to Production
Aras
 

Similaire à Leveraging Alf for SysML, Part 2: More Effective Trade Study Modeling (20)

Using Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: ModelingUsing Alf with Cameo Simulation Toolkit - Part 2: Modeling
Using Alf with Cameo Simulation Toolkit - Part 2: Modeling
 
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platformGrokking Techtalk #40: AWS’s philosophy on designing MLOps platform
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
 
Webinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided AnalyticsWebinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided Analytics
 
Computer-Aided Assembly Planning
Computer-Aided Assembly PlanningComputer-Aided Assembly Planning
Computer-Aided Assembly Planning
 
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
Building Serverless Applications That Align with Twelve-Factor Methods - AWS ...
 
Modular Trade Studies with SysML Simulation.pptx
Modular Trade Studies with SysML Simulation.pptxModular Trade Studies with SysML Simulation.pptx
Modular Trade Studies with SysML Simulation.pptx
 
Adamstutorial
AdamstutorialAdamstutorial
Adamstutorial
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
 
AWS DeepLens Workshop: Building Computer Vision Applications
AWS DeepLens Workshop: Building Computer Vision ApplicationsAWS DeepLens Workshop: Building Computer Vision Applications
AWS DeepLens Workshop: Building Computer Vision Applications
 
Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimization
 
Supercharge Your Machine Learning Model with Amazon SageMaker
Supercharge Your Machine Learning Model with Amazon SageMakerSupercharge Your Machine Learning Model with Amazon SageMaker
Supercharge Your Machine Learning Model with Amazon SageMaker
 
Deploying Solution Enhancements to Production
Deploying Solution Enhancements to ProductionDeploying Solution Enhancements to Production
Deploying Solution Enhancements to Production
 
Homestead demo
Homestead demoHomestead demo
Homestead demo
 
Product Development in the Cloud - ENT206 - Chicago AWS Summit
Product Development in the Cloud - ENT206 - Chicago AWS SummitProduct Development in the Cloud - ENT206 - Chicago AWS Summit
Product Development in the Cloud - ENT206 - Chicago AWS Summit
 
UCD components
UCD components UCD components
UCD components
 
IBM Cloud Private and IBM Power Systems: Overview and Real-World Scenarios
IBM Cloud Private and IBM Power Systems: Overview and Real-World ScenariosIBM Cloud Private and IBM Power Systems: Overview and Real-World Scenarios
IBM Cloud Private and IBM Power Systems: Overview and Real-World Scenarios
 
Debugging Gluon and Apache MXNet (AIM423) - AWS re:Invent 2018
Debugging Gluon and Apache MXNet (AIM423) - AWS re:Invent 2018Debugging Gluon and Apache MXNet (AIM423) - AWS re:Invent 2018
Debugging Gluon and Apache MXNet (AIM423) - AWS re:Invent 2018
 
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker - AWS Summit S...
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker - AWS Summit S...Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker - AWS Summit S...
Intelligence of Things: IoT, AWS DeepLens and Amazon SageMaker - AWS Summit S...
 
Guidelines and Best Practices for Sencha Projects
Guidelines and Best Practices for Sencha ProjectsGuidelines and Best Practices for Sencha Projects
Guidelines and Best Practices for Sencha Projects
 
Optimise Energy Usage Using Amazon SageMaker Reinforcement Learning and Publi...
Optimise Energy Usage Using Amazon SageMaker Reinforcement Learning and Publi...Optimise Energy Usage Using Amazon SageMaker Reinforcement Learning and Publi...
Optimise Energy Usage Using Amazon SageMaker Reinforcement Learning and Publi...
 

Plus de Ed Seidewitz

Executable UML Roadmap (as of September 2014)
Executable UML Roadmap (as of September 2014)Executable UML Roadmap (as of September 2014)
Executable UML Roadmap (as of September 2014)
Ed Seidewitz
 
Essence: A Common Ground for Flexible Methods
Essence: A Common Ground for Flexible MethodsEssence: A Common Ground for Flexible Methods
Essence: A Common Ground for Flexible Methods
Ed Seidewitz
 
Succeeding with Agile in the Federal Government: A Coach's Perspective
Succeeding with Agile in the Federal Government: A Coach's PerspectiveSucceeding with Agile in the Federal Government: A Coach's Perspective
Succeeding with Agile in the Federal Government: A Coach's Perspective
Ed Seidewitz
 
Models, Programs and Executable UML
Models, Programs and Executable UMLModels, Programs and Executable UML
Models, Programs and Executable UML
Ed Seidewitz
 
Architecting Your Enterprise
Architecting Your EnterpriseArchitecting Your Enterprise
Architecting Your Enterprise
Ed Seidewitz
 

Plus de Ed Seidewitz (19)

Introduction to the OMG Systems Modeling Language (SysML), Version 2
Introduction to the OMG Systems Modeling Language (SysML), Version 2Introduction to the OMG Systems Modeling Language (SysML), Version 2
Introduction to the OMG Systems Modeling Language (SysML), Version 2
 
The Very Model of a Modern Metamodeler
The Very Model of a Modern MetamodelerThe Very Model of a Modern Metamodeler
The Very Model of a Modern Metamodeler
 
SysML v2 and the Next Generation of Modeling Languages
SysML v2 and the Next Generation of Modeling LanguagesSysML v2 and the Next Generation of Modeling Languages
SysML v2 and the Next Generation of Modeling Languages
 
SysML v2 and MBSE: The next ten years
SysML v2 and MBSE: The next ten yearsSysML v2 and MBSE: The next ten years
SysML v2 and MBSE: The next ten years
 
Precise Semantics Standards at OMG: Executing on the Vision
Precise Semantics Standards at OMG: Executing on the VisionPrecise Semantics Standards at OMG: Executing on the Vision
Precise Semantics Standards at OMG: Executing on the Vision
 
Model Driven Architecture without Automation
Model Driven Architecture without AutomationModel Driven Architecture without Automation
Model Driven Architecture without Automation
 
Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's PromiseStandards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
 
UML: This Time We Mean It!
UML: This Time We Mean It!UML: This Time We Mean It!
UML: This Time We Mean It!
 
A Unified View of Modeling and Programming
A Unified View of Modeling and ProgrammingA Unified View of Modeling and Programming
A Unified View of Modeling and Programming
 
UML as a Programming Language
UML as a Programming LanguageUML as a Programming Language
UML as a Programming Language
 
Executable UML Roadmap (as of September 2014)
Executable UML Roadmap (as of September 2014)Executable UML Roadmap (as of September 2014)
Executable UML Roadmap (as of September 2014)
 
Essence: A Common Ground for Flexible Methods
Essence: A Common Ground for Flexible MethodsEssence: A Common Ground for Flexible Methods
Essence: A Common Ground for Flexible Methods
 
UML: Once More with Meaning
UML: Once More with MeaningUML: Once More with Meaning
UML: Once More with Meaning
 
Succeeding with Agile in the Federal Government: A Coach's Perspective
Succeeding with Agile in the Federal Government: A Coach's PerspectiveSucceeding with Agile in the Federal Government: A Coach's Perspective
Succeeding with Agile in the Federal Government: A Coach's Perspective
 
UML 2.5: Specification Simplification
UML 2.5: Specification SimplificationUML 2.5: Specification Simplification
UML 2.5: Specification Simplification
 
Models, Programs and Executable UML
Models, Programs and Executable UMLModels, Programs and Executable UML
Models, Programs and Executable UML
 
Programming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfProgramming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and Alf
 
Architecting Your Enterprise
Architecting Your EnterpriseArchitecting Your Enterprise
Architecting Your Enterprise
 
Programming in UML: Why and How
Programming in UML: Why and HowProgramming in UML: Why and How
Programming in UML: Why and How
 

Dernier

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Dernier (20)

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 

Leveraging Alf for SysML, Part 2: More Effective Trade Study Modeling

  • 1. Leveraging Alf for SysML Part 2: More Effective Trade Study Modeling Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Ed Seidewitz Model Driven Solutions, Inc. ● http://www.modeldriven.com ed-s@modeldriven.com ● @Seidewitz http://slideshare.net/seidewitz
  • 2. Page 2 Goals Part 1 –Simulation Modeling (Sunday) • Learn the basics of the Alf action language for executable modeling. • Learn how to use Alf as an action language in SysML models. • Practice executing simulations of models that use Alf. Part 2 – Trade Study Modeling (Today) • Learn how to use the Trade Study Pattern. • Use Alf together with parametric constraints in SysML models. • Use simulation models in trade studies. Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 3. Page 3 Prerequisites • Participant – Knowledge of SysML modeling using MagicDraw or Cameo System Modeler – Some experience with model execution using Cameo Simulation Toolkit – Introductory understanding of using Alf with SysML (e.g., from Part 1 of this tutorial) • System (for hands-on exercises) – Cameo System Modeler 19.0 SP2 (or MagicDraw and SysML) – Cameo Simulation Toolkit 19.0 SP2 (included in CSM Enterprise Edition) – Alf Plugin 19.0 SP2 • Slides: Available at https://www.slideshare.net/seidewitz Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 4. Page 4 4 Installing the Alf Plugin Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Plugin documentation is available at: https://docs.nomagic.com/display/ALFP190SP2/Alf+plugin Under Plugins (commercial), download / install the Alf plugin v19.0 SP2. Select Help ► Resource/Plugin Manager to open the Resource/ Plugin Manager window.
  • 5. Page 5 Parametrics Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 6. Page 6 Parametric Constraints Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. A constraint block is a generic form of parametrized constraint that can be used in multiple contexts. A constraint property is a property whose type is a constraint block. Constraints are defined using mathematical equations. Constraints are defined in terms of parameters that can be bound to the physical properties modeled for systems. ⚠️ Do not specify constraints using Alf expressions.
  • 7. Page 7 Parametric Diagrams Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. A constraint property is a usage of a constraint block. A binding connector asserts that the values of the connected properties must be equal.
  • 8. Page 8 Airplane Mass Roll Up: Definition Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The top-level assembly and each part are all kinds of components. The specific compositions subset the general composition.
  • 9. Page 9 Airplane Mass Rollup: Execution Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Executing this instance with the given composition. By default, solving is done on initialization. As a result, the total mass is computed.
  • 10. Page 10 Hands On Airplane Mass Roll Up Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 11. Page 11 Create a Mass Roll Up project Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 12. Page 12 Load the Alf Library and open the Alf Editor window Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 13. Page 13 Create a Component block and totalMass operation Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The total mass is computed using an operation This is a conditional expression, which choses one of two operand expressions to evaluate based on a condition. This is equivalent to this.sub->collect s (s.totalMass()) that is, it collects all the total masses of all the subcomponents. This reduces a sequence using the given function (in this case, it sums). Right click on the operation and select Create Method ► Behavior to open the Behavior selection window.
  • 14. Page 14 Create the Airplane mass roll up definition Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Drag the subsetted property onto the subsetting property in order to create a subsets relationship.
  • 15. Page 15 Create a Simulation driver block Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Create an activity under the Simulation block. Enter Alf code to test the roll up operation.
  • 16. Page 16 Create an Simulation instance model Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Create composition links between the instances. Select the specific association, not the general one. Set all the component masses. Execute the Simulation instance
  • 17. Page 17 Trade Studies Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 18. Page 18 Trade study pattern Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The trade study pattern is a modelling pattern for choosing the best of a set of alternatives. A parametric constraint is used to test the “value” of each alternative and select the best one.
  • 19. Page 19 Trade study driver activity Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The current alternative is responsible for setting the current value, which triggers the compare constraint.  To be safe, there should be a control flow to make sure the expansion region does not execute prematurely.
  • 20. Page 20 Area trade study Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The alternatives for this trade study are Rectangles of different areas. The Area trade study specializes the general Trade Study Pattern and redefines the current alternative to be a Rectangle. A parametric constraint is used to compute the currentValue as the area of the current alternative.
  • 21. Page 21 Area trade study configuration Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The alternatives to be configured are configured using instance specifications.
  • 22. Page 22 Area trade study results Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. The “winner” is alternative r3 with the highest area.
  • 23. Page 23 Hands On Trade Study Pattern Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 24. Page 24 Open the sample TradeStudyPattern project Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. … Click on the Samples button. Select TradeStudyPattern under Simulation.  Be sure to save the project locally before modifying it!  After saving a local copy, load the Alf Library and open the Alf Editor window.
  • 25. Page 25 Set the animation speed Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Open the Specification for each SimulationConfig and set the Animation Speed to 100.
  • 26. Page 26 Delete the old method bodies Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Delete the old methods for computeWithBest and evaluateAlternative.
  • 27. Page 27 Create the evaluateAlternative method Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Add an alternative parameter to the evaluateAlternative operation. Right click on the operation and select Create Method ► Behavior to open the Behavior selection window. Choose either Activity or Opaque Behavior. Enter the Alf code in the Alf Editor window.
  • 28. Page 28 Create the evaluateAlternative method Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Also create a method for the compareWithBest operation, and add Alf code.
  • 29. Page 29 Replace the doTradeStudy activity Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Delete the content of the doTradeStudy activity… …and replace it with Alf code.
  • 30. Page 30 Run the simulations Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Run the simulations, to see if they still work.
  • 31. Page 31 Revise the compareWithBest operation Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Add a value operation to the Alternative block. Delete the compare constraint property. Update the Alf code for the compareWithBest operation.  Be sure to delete using ctrl-D, not the delete key.
  • 32. Page 32 Add area operation to Rectangle block Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Add an area operation, and open its specification. Choose Properties: All. Search for the “redefined operation” property. Click here to select a redefined operation. Select value as the redefined operation. Search for the “value” operation.
  • 33. Page 33 Create the area method Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Correct the spelling of “hight” to “height”. Delete the rArea constraint property. Create a method for the area operation. ⓘ To show the “redefines” annotation, open the Rectangle Symbol Properties and set Show Operation Properties to true.
  • 34. Page 34 Add hp operation to Engine block Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Delete this connector. Add an hp operation, redefining the value operation. Create a method for the hp operation
  • 35. Page 35 Redefine hp operation for HybridEngine block Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Add an hp operation, redefining the Engine::hp operation. Delete the Sum constraint property.  The component hp properties need to be made public! Create a method for the hp operation. A super invocation calls the original operation method from the ”superclass” block.
  • 36. Page 36 Run the simulations Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Run the simulations, to see if they still work.
  • 37. Page 37 Hands On Heating Simulation Trade Study Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 38. Page 38 Share packages from the Trade Study Pattern project Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Share the three packages from the (modified) TradeStudyPattern project.
  • 39. Page 39 Use the TradeStudyPattern project in Heating Simulation Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Open the Heating Simulation project and select File ▶︎ Use Project ▶︎ Local Project to attach the TradeStudyPattern.. Create a Trade Study package.
  • 40. Page 40 Add a block definition diagram for Trade Study Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Create a Heating Simulation Trade Study block as a specialization of the Trade Study Pattern. Redefine the alternatives reference property. Add a generalization from Heating Simulation to Alternative. Redefine the value operation from Alternative.
  • 41. Page 41 Add signals to provide an asynchronous protocol Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 42. Page 42 Create the Heating Simulation Trade Study state machine Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 43. Page 43 Create Start and Stop signals and receptions Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Make this association end navigable. Make this association end navigable.
  • 44. Page 44 Update the Environment state machine Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 45. Page 45 Update the heat operation on the Climate block Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 46. Page 46 Update the Climate state machine Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 47. Page 47 Update the Heater state machine Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.
  • 48. Page 48 Create a Heating Simulation state machine Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Also add a referential attribute to Heating Simulation Trade Study.
  • 49. Page 49 Create a simulation configuration Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc. Note different values for temperature attributes. Set the animation speed to 100. Set the evaluation target to the study.  The SimulationConfig needs to be created on a Simulation Configuration Diagram.
  • 50. Page 50 Run the simulation Copyright © 2019 Ed Seidewitz / Model Driven Solutions, Inc.

Notes de l'éditeur

  1. 4