complex system modeling by compositionms4systems.com/pages/doc/devscosimphd.pdfcomplex system...
TRANSCRIPT
Complex System Modeling by Composition
SpringSim’20, TMS, May 18-21
DEVS PhD dissertation award
A hierarchical approach for heterogeneous
component co-simulation
Thomas PARIS
Advisor: Vincent CHEVRIER
Co-advisor: Laurent CIARLETTA
1
Context of this presentation
Modeling & Simulation, Multi-domain, Software reuse, Co-simulation
Within the MECSYCO project
Siebert 2011, Camus 2015, Vaubourg 2017
http://mecsyco.com/
Define a hierarchical process for heterogeneous component co-simulation.
Develop DSL-based environment to use it.
2
Outline
− Model and Simulate
Iterative process, Cyber-Physical System and co-simulation, PhD purpose
− Related works
Different focuses, Mixed approach: MECSYCO
− Co-simulation process
Example, Identification of three steps: Integration, Multi-modeling, Experiment
− Domain-Specific Languages
Example, Insights on Domain-Specific Languages
− Conclusion
3
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateIterative process
4
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateIterative process
5
Software with
M&S features
Modularity
Iterative design
…
Time consuming
Error-prone
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateCyber-Physical System and co-simulation
6
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateCPS and co-simulation
7
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateCPS and co-simulation
8
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Inspired by: Galán, José Manuel, et al. « Errors and artefacts in agent-based modelling ». Journal of Artificial Societies and Social Simulation 12, no 1 (2009): 1.
Model and simulateCPS and co-simulation
9
Deal with
heterogeneities
Representation
Formal
Software
Co-simulation
Interaction
between simulators
M&S features
Reuse
existing software
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
Model and simulateThesis purpose
10
A co-simulation approach
Handling of heterogeneities
A modeling processModularity/Composition
A development environmentUsability
− Model and Simulate− Related works− Co-simulation process− DSL− Conclusion
11
Related worksDifferent focuses
Software
integration
(HLAc, FMId…)
a: De Lara, Juan, et Hans Vangheluwe. « AToM3: A Tool for Multi-formalism and Meta-modelling ». 2002. b: Zeigler, Bernard P., and al. “Theory of modeling and simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems”. 2nd éd. 2000.c: Dahmann, Judith S. and al. « The department of defense high level architecture ». 1997.d: Blochwitz, Torsten, et al. « The Functional Mockup Interface for tool independent exchange of simulation models ». 2011
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
12
Related worksDifferent focuses
Software
integration
(HLAc, FMId…)
Multi-formalism
(AToM3a, DEVSb…)
a: De Lara, Juan, et Hans Vangheluwe. « AToM3: A Tool for Multi-formalism and Meta-modelling ». 2002. b: Zeigler, Bernard P., and al. “Theory of modeling and simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems”. 2nd éd. 2000.c: Dahmann, Judith S. and al. « The department of defense high level architecture ». 1997.d: Blochwitz, Torsten, et al. « The Functional Mockup Interface for tool independent exchange of simulation models ». 2011
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
13
Related worksDifferent focuses
Software
integration
(HLAc, FMId…)
Multi-formalism
(AToM3a, DEVSb…)
a: De Lara, Juan, et Hans Vangheluwe. « AToM3: A Tool for Multi-formalism and Meta-modelling ». 2002. b: Zeigler, Bernard P., and al. “Theory of modeling and simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems”. 2nd éd. 2000.c: Dahmann, Judith S. and al. « The department of defense high level architecture ». 1997.d: Blochwitz, Torsten, et al. « The Functional Mockup Interface for tool independent exchange of simulation models ». 2011
Mixed
(MECSYCO…)
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
Related worksMixed approach
MECSYCO1 (Multi-agent Environment for Complex SYstem CO-simulation)
Deal with software heterogeneities
Middleware strategy
Deal with formal heterogeneities
Rely on DEVS wrapping
Deal with representation heterogeneities
Agent & Artifact for Multi-Modeling
141: Camus, Benjamin and all. « Co-Simulation of Cyber-Physical Systems Using a DEVS Wrapping Strategy in the MECSYCO Middleware ». SIMULATION, 2018. https://doi.org/10.1177/0037549717749014..
Co-simulation as a society
of interacting agents
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
Related worksMixed approach
MECSYCO1 (Multi-agent Environment for Complex SYstem CO-simulation)
Deal with software heterogeneities
Middleware strategy
Deal with formal heterogeneities
Rely on DEVS wrapping
Deal with representation heterogeneities
Agent & Artifact for Multi-Modeling
But:
No composition
151: Camus, Benjamin and all. « Co-Simulation of Cyber-Physical Systems Using a DEVS Wrapping Strategy in the MECSYCO Middleware ». SIMULATION, 2018. https://doi.org/10.1177/0037549717749014..
Co-simulation as a society
of interacting agents
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
Related worksMixed approach
MECSYCO1 (Multi-agent Environment for Complex SYstem CO-simulation)
Deal with software heterogeneities
Middleware strategy
Deal with formal heterogeneities
Rely on DEVS wrapping
Deal with representation heterogeneities
Agent & Artifact for Multi-Modeling
But:
No composition
161: Camus, Benjamin and all. « Co-Simulation of Cyber-Physical Systems Using a DEVS Wrapping Strategy in the MECSYCO Middleware ». SIMULATION, 2018. https://doi.org/10.1177/0037549717749014..
Co-simulation as a society
of interacting agents
Enhance MECSYCO co-simulation process to enable composition
− Model and Simulate
− Related works− Co-simulation process− DSL− Conclusion
Description-based co-simulation processAn example, summer 2018
17
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Models provided
Model same house with and without air conditioner Study temperatures
1: Data obtained from APHEEN (student housing association in Nancy, FRANCE).
Two experts, one data provider Three kinds of models
WeatherSQL1
HouseModelica
(FMU)
ControllerMatlab/Simulink
(or Java)
Description-based co-simulation processAn example, summer 2018
18
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
WeatherSQL1
HouseModelica
(FMU)
ControllerMatlab/Simulink
(or Java)
Models provided
Model same house with and without air conditioner Study temperatures
1: Data obtained from APHEEN (student housing association in Nancy, FRANCE).
Two experts, one data provider Three kinds of models
What to do to co-simulate them?
Description-based co-simulation processAn example, summer 2018
19
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
WeatherSQL1
HouseModelica
(FMU)
ControllerMatlab/Simulink
(or Java)
1: Data obtained from APHEEN (student housing association in Nancy, FRANCE).
To have an homogeneous way to manipulate models
Wrap
(software, formal)
Description-based co-simulation processAn example, summer 2018
20
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
1: Data obtained from APHEEN (student housing association in Nancy, FRANCE).
Wrap
(software, formal)
Define model interface
(inputs, outputs)
To know how to connect them
WeatherSQL1
HouseModelica
(FMU)
ControllerMatlab/Simulink
(or Java)
Description-based co-simulation processAn example, summer 2018
21
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
To set how data will be exchanged
Wrap
(software, formal)
Define model interface
(inputs, outputs)
Couple
(compose hierarchically) Conditioned house(FMU + MatLab)
Description-based co-simulation processAn example, summer 2018
22
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
To set how data will be exchanged and enable reuse
Wrap
(software, formal)
Define model interface
(inputs, outputs)
Couple
(compose hierarchically) Conditioned house(FMU + MatLab)
Description-based co-simulation processAn example, summer 2018
23
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Wrap
(software, formal)
Define model interface
(inputs, outputs)
Couple
(compose hierarchically)
To set how data will be exchanged and enable reuse
Multi-model of use case(SQL + FMU + MatLab)
Description-based co-simulation processAn example, summer 2018
24
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Wrap
(software, formal)
Define model interface
(inputs, outputs)
To get results
Couple
(compose hierarchically)
Experiment
(co-simulate)
Multi-model of use case(SQL + FMU + MatLab)
Description-based co-simulation processIdentification of three steps
25
Necessity to describe what we want to reuse Description-based process
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Integration
26
Wrapping strategy
unchanged
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Integration
27
Wrapping strategy
unchanged
Atomic model description (wrapped model)
o 𝑀 = (𝑋, 𝑌, 𝑆, δ𝑖𝑛𝑡, δ𝑒𝑥𝑡, λ, 𝑡𝑎)
DEVS-inspired
structure
Black-box Dealt with in wrapper
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Integration
28
Wrapping strategy
unchanged
Atomic model description (wrapped model)
o 𝑀 = (𝑋, 𝑌, 𝑃, 𝑃𝑆, 𝑆, δ𝑖𝑛𝑡, δ𝑒𝑥𝑡, λ, 𝑡𝑎)
DEVS-inspired
structure
Black-box Dealt with in wrapper
Model
+
Simulator
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Integration
29
Wrapping strategy
unchanged
Atomic model description (wrapped model)
o 𝑀 = (𝑋, 𝑌, 𝑃, 𝑃𝑆, 𝑆, δ𝑖𝑛𝑡, δ𝑒𝑥𝑡, λ, 𝑡𝑎)
DEVS-inspired
structure
Black-box Dealt with in wrapper
Model
+
Simulator
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processMulti-modeling
30
Coupled model description (multi-model)
o 𝑀𝑀= (𝑋, 𝑌, 𝐷, 𝑀𝑑 𝑑∈𝐷 , 𝐸𝐼𝐶, 𝐸𝑂𝐶, 𝐼𝐶)
DEVS-inspired
structure
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processMulti-modeling
31
Coupled model description (multi-model)
o 𝑀𝑀= (𝑋, 𝑌, 𝑃, 𝑆𝑃, 𝐷, 𝑀𝑑 𝑑∈𝐷 , 𝐸𝐼𝐶, 𝐸𝑂𝐶, 𝐸𝑃𝐶, 𝐸𝑆𝑃𝐶, 𝐼𝐶)
DEVS-inspired
structure
MECSYCO
additions
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processExperiment
32
Choice of model
Choice of parameters
Choice of what to observe
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Summary
Starting point
33
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processSummary
Integration: Software/Formal wrapping
34
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processSummary
Integration: Software/Formal wrapping + Model descriptions
35
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processSummary
Multi-modeling: Description of the multi-model
36
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation processSummary
Experiment: Description of the experiment
37
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Description-based co-simulation process Summary
Experiment: Description of the experiment + Run with MECSYCO
38
− Model and Simulate− Related works
− Co-simulation process− DSL− Conclusion
Insights on Domain-Specific LanguagesExample, summer 2018
Description files XML Tedious Domain-Specific Languages
Feedbacks of students1 usability
WeatherSQL
HouseModelica (FMU)
ControllerMatlab/Simulink (or Java)
391: Thomas Paris, and all. « Teaching Co-Simulation through Practice ». In Proceedings of the 51th Computer Simulation Conference. Berlin, Germany: Society for Computer Simulation International, 2019.
− Model and Simulate− Related works− Co-simulation process
− DSL− Conclusion
Insights on Domain-Specific LanguagesExample, summer 2018
Integration of the controller (MatLab): m2xml language
40
DSL XML
− Model and Simulate− Related works− Co-simulation process
− DSL− Conclusion
Insights on Domain-Specific LanguagesExample, summer 2018
Integration of the controller (MatLab): m2xml language
41
Autocompletion
Errors
Warnings
…
(Eclipse XText)
− Model and Simulate− Related works− Co-simulation process
− DSL− Conclusion
Insights on Domain-Specific LanguagesExample, summer 2018
Multi-model of a conditioned house (MatLab): mm2xml language
42
− Model and Simulate− Related works− Co-simulation process
− DSL− Conclusion
Composition
Insights on DSLExample, summer 2018
Experiment: cs2xml language
43
− Model and Simulate− Related works− Co-simulation process
− DSL− Conclusion
Conclusion
Issues
o Handling heterogeneities
o M&S features
o Modularity
o Composition
o Usability
Approach
MECSYCO middleware
Description-based co-simulation
process
DSL-based environment
44
− Model and Simulate− Related works− Co-simulation process− DSL
− Conclusion
Multi-domain modeling Reuse M&S software Co-simulation
1: Thomas Paris, and all. “Designing co-simulation with multi-agent tools: a case study with NetLogo”. EUMAS. 2017.
2: Thomas Paris, and all. “Study about decomposition and integration of continuous systems in discrete environment”. SpringSim, ANSS, 2016.
3: Thomas Paris, and all. “A component approach for DEVS”. SCSC, 2018
Conclusion
Issues
o Handling heterogeneities
o M&S features
o Modularity
o Composition
o Usability
Approach
MECSYCO middleware
Description-based co-simulation
process
DSL-based environment
45
− Model and Simulate− Related works− Co-simulation process− DSL
− Conclusion
Multi-domain modeling Reuse M&S software Co-simulation
What next? Library of reusable models,…
1: Thomas Paris, and all. “Designing co-simulation with multi-agent tools: a case study with NetLogo”. EUMAS. 2017.
2: Thomas Paris, and all. “Study about decomposition and integration of continuous systems in discrete environment”. SpringSim, ANSS, 2016.
3: Thomas Paris, and all. “A component approach for DEVS”. SCSC, 2018
Other works: NetLogo wrapper1, Performance measurement2, DEVS-based component3,…
Conclusion
46
− Model and Simulate− Related works− Co-simulation process− DSL
− Conclusion
Questions?