Upload
dangcong
View
219
Download
3
Embed Size (px)
Citation preview
Eclipsecon 2015 Budapest University of Technology and EconomicsDepartment of Measurement and Information Systems
Embraer S.A. IncQuery Labs Ltd.
Massif - the love child of Matlab Simulink and Eclipse
Ákos Horváth, István Ráth and Rodrigo Rizzi Starr
Eclipsecon 2015
Outline of the talk
2
Motivation and background
Integration with Matlab Simulink
Massif
• Overview
• Architecture
Feature set
• Import/export
• OSLC interface
Conclusion
• Current status
• Future work
Main Contributors
o Ábel Hegedüs
o Rodrigo RizziStarr
o Márton Búr
o Lincoln Nascimento
o Róbert Dóczi
o Samoel Mirachi
o István Ráth
o Ákos Horváth
Eclipsecon 2015
Background: Matlab Simulink
Matlab: multi-paradigm numerical computation o matrix operations, algorithm development, data
visualization etc.
Simulink: dataflow modeling environmento Modeling and simulating
dynamic systems
o Block diagram based
Large user base > 1Mo Automotive
o Avionics
o Railway
o Etc.
3
Eclipsecon 2015
Motivation: yet another tool integration
Started in 2011 (as a second iteration)o Provide HW-SW allocation for early simulation of avionics
systems
o Input: Low-level Simulink libraries
o Output: Integrated HW-SW Simulink model
Allocation defined on high abstraction level Eclipseo Hierarchical graph based visualizations yFiles + EMF-IncQuery Viewers
o On-the-fly model validation EMF-IncQuery
o Generic bridge between Matlab Simulink and EclipseMassif
4
Eclipsecon 2015
Massif
Integrating Eclipse and Matlab Simulink
Eclipsecon 2015
Massif – Eclipse-Matlab Simulink bridge Generic Bridge between Matlab Simulink and Eclipse
o Import/Export Matlab Simulink systems and librarieso Traceability for incremental processingo Multiple import options for different usage scenarios
• e.g., analysis or allocation
User-friendly EMF representationo Manipulating systems/libraries directly on EMF levelo Support for easier navigability
Works with Matlab license servero Can connect to a running Matlab instance
Pure Java realization, EPL licenseo Project specific constraint!
6
Eclipsecon 2015
Massif- architecture overview
7
Eclipse
Matlab Simulink
MatlabMetamodel
[Ecore]
MatlabCommand
Evaluator Server
ComandProcessor
MatlabSystem [EMF]
instanceHigh level operations
Commads/results
MatlabSystem
Commads/results
traceability
Communicating with Matlabo Java RMI based
communication
o Server initialized within Matlab• Java Matlab Interface
o Works with license server
Generic EMF metamodelo EMF level operations
translated into Matlab commands
o Same library mechanism as in Matlab Simulink
o FQN based traceability
Eclipsecon 2015
Feature set
What Massif can do
Eclipsecon 2015
DEMO
Tool configuration and initialization
Import and export of Matlab Simulink systems
o Import strategies
Adding/deleting an element to/from the EMF model
o Incremental refreshing
Import/export models
9
Eclipsecon 2015
Matlab Simulink – system
System ABlock
1
Block2
Model Reference
block
Shallow import option
Only blocks within non-referred systems are imported hierarchically
10
Eclipse - EMF
System B
Block 4
Block 3
Library A
BlockLib1
System ABlock
1
Block2
Model Reference
block
Eclipsecon 2015
Matlab Simulink – system
System B
Block 4
Block 3
System ABlock
1
Block2
Model Reference
block
Deep import option
Each block inside each subsystem is imported. Each referenced model is imported as an individual model with direct model referencing in the parent model
12
Eclipse - EMF
Library A
BlockLib1
System ABlock
1
Block2
Model Reference
block
System B
Block 4
Block 3
Eclipsecon 2015
Matlab Simulink – system
Flattening import option
Each model reference block is imported as though it was a subsystem
13
Eclipse - EMF
System ABlock
1
Block2
Model Reference
block
System B
Block 4
Block 3
Library A
BlockLib1
System ABlock
1
Block2
Model Reference
block
System B
Block 4
Block 3
Eclipsecon 2015
Matlab Simulink – system
System A
Flattening import option
Each model reference block is imported as though it was a subsystem
14
Eclipse - EMF
Block1
Block2
Model Reference
block
System B
Block 4
Block 3
Library A
BlockLib1
System ABlock
1
Block2
Block 4
Block 3
Eclipsecon 2015
Matlab Simulink – system
Referencing import option
For blocks with active library links, each source library is imported once as an individual model (but may be referenced multiple times)
15
Eclipse - EMF
System ABlock
1
Block2
Model Reference
block
System B
Block 4
Block 3
Library A
BlockLib1
System ABlock
1
Block2
Model Reference
block
System B
Block 4
Block 3
Library A
BlockLib1
Eclipsecon 2015
Additional Features
Import Filterso For leaving out unwanted elements/details
from imported models
Bus creator and selector configurationo Configured via string (fqn like) in
Matlab Simulink
o Use EMF EReferences to define and Massif automatically calculates configuration
Easier Block-to-Block navigabilityo Derived EReferences defined by EMF-IncQuery
16
Eclipsecon 2015
DEMO
Open Services for Lifecycle Collaboration (OSLC)o API for tool integration
Live OSLC API for MatlabSimulinko Dynamically executes
queries directly on the Matlab side
o Uses the same Command Evaluator Server
o Based on Eclipse Lyo
OSLC API
17
Apache Tomcat
Matlab Simulink
ComandEvaluator
MatlabSystem
resource
Queries/results
MatlabSystem
Queries/results
Queries/results
MatlabCommand
Evaluator Server
Eclipse Lyo
Eclipsecon 2015
Conclusions
What we have done and where to move forward
Eclipsecon 2015
Conclusions
Initial version is outo Basic import/export features supported
o EMF level handling of Simulink models
Experienceo Avionics
• Largest model took ~2 hours
o Automotive• 5k elements within minutes
o Typical application scenarios• Offline processing of EMF representations
• Library import instance model generation on EMF side
19
Eclipsecon 2015
Final points
The examples and more details are available formo https://github.com/FTSRG/massif
Version 0.4 is available o http://incquery.net/update/massif/release/site/
o Contributors: • Main: BME-FTSRG, Embraer S.A.
• Auxilliary: IncQuery Labs Ltd.
• Supporting projects: Trans-IMA, Concerto (EU-Artemis)
Your contributions (feedback, forum posts, ideas, bugzillas, patches) are very welcome!o To what direction should we enhance Massif?
20
Eclipsecon 2015
+1 0 -1
Sign in: www.eclipsecon.org
Evaluate the sessions