mosaic - a modelling and code generation toolmosaic - a modeling and code generation tool | g....
TRANSCRIPT
![Page 1: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/1.jpg)
MOSAIC – A modeling and code generation tool
Gregor Tolksdorf, M.Sc. | Faculty of Process Sciences | CAPE-OPEN 2013 Annual Meeting
![Page 2: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/2.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
2
Modular MOdel SpecificAtIon on DoCumentation Level - Application in a Web Based Modeling Environment.
www.mosaic-modeling.de
![Page 3: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/3.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
3
MOSAIC-Team
Scientific supervisor:
Prof. Dr.-Ing. G. Wozny ,
Head of Chair of Process Dynamics and Operation, TU Berlin
Current Developer:
Dipl.-Ing. S. Fillinger
Dipl.-Ing. R. Kraus
Dipl.-Ing. V.A. Merchan-Restrepo
M.Sc. G. Tolksdorf
d|b|t|a
![Page 4: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/4.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
4
Outline
MOSAIC-Modeling
Modular Concept
Symbolic Notation
Code Generation
External Ports
CAPE-OPEN and MOSAIC
Physical Properties
Unit Operations
![Page 5: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/5.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
5
Modeling with MOSAIC
Documentation
File of Model
LaTeX, Word,
…
Programm Code
of Model Executable
Automatic
Implementation Compile
Update
Conceptual
Changes
e.g.
C++, gPROMS, Matlab,
ACM, GAMS, AMPL,…
Execution
Results
Run
![Page 6: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/6.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
6
Goals and Resulting Characteristics
Main goals:
– Less errors
– Less effort
– More cooperative work
• Improved reuse
• Improved portability
Resulting characteristics:
– Highly modular modeling concept
– Define Platform Independent Models (PIM) in the documentation level using an
enhanced symbolic notation
– Use of PIM and code generation to Platform Specific Models (PSM)
– Support web-cooperation
• Store and share all model elements in a web database
![Page 7: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/7.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
7
Modular Modeling Concept – The Editors
Notation – What symbols/variables are allowed?
Equation – What equations will be used?
EquationSystem – How will the equations be combined? What functions will be used?
Evaluation – What are the design, state, and iteration values? How does the problem solving
code look like?
MOSAIC editors and model elements:
![Page 8: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/8.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
8
Enhanced Symbolic Notation I - Variables
Notation editor:
Example:
![Page 9: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/9.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
9
Enhanced Symbolic Notation II - Equations
Equation editor:
![Page 10: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/10.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
10
Enhanced Symbolic Notation III – Equation Systems
Equation system editor:
![Page 11: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/11.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
11
Enhanced Symbolic Notation IV – Instantiated Equations
Evaluation editor:
![Page 12: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/12.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
12
Code Generation I – What language do you prefer?
Choose of a list of supported target platforms:
![Page 13: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/13.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
13
Code Generation II – Show me what you got!
Take a look at the generated code:
![Page 14: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/14.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
14
MOSAIC Ports – let‘s get connected
MOSAIC external Ports:
Y – internal variable
A – variable connected to input T
B – variable connected to output P
![Page 15: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/15.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
15
MOSAIC Ports – let‘s get connected
MOSAIC external Ports:
• Direction:
In or Out
• Interface:
Which variables will be presented?
-> naming, dimension, engineering unit, direction
e.g. p, scalar, bar, out
• Connector:
How are internal variables and external interface variables connected?
-> e.g. A <-> T , B <-> P
![Page 16: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/16.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
16
CAPE-OPEN and MOSAIC I – Physical Properties
Supported target platforms for „CO physical properties“ code generation:
• Matlab
Physical properties in MOSAIC:
Variables to be calculated by external functions, e.g.
• gPROMS
![Page 17: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/17.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
17
CAPE-OPEN and MOSAIC I – Physical Properties
MOSAIC Example – CO function:
![Page 18: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/18.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
18
CAPE-OPEN and MOSAIC I – Physical Properties
MOSAIC Example – Matlab code:
![Page 19: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/19.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
19
Summary
– A modular equation based modeling tool
– Implemented in Java, using XML/MathML
– Provides automatic code generation for specific platforms (e.g. Matlab, C++)
– Can use the concept of ports
– Supports CO physical properties in code generation (Matlab, gPROMS)
MOSAIC is not
– Designed to be a full solver / process simulator
– A programming language
– A computer algebra system (CAS)
![Page 20: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/20.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
20
CAPE-OPEN and MOSAIC II – Next Steps:
• What has to be done to create CAPE-OPEN compliant Unit Operations with
MOSAIC?
• What about CO Unit Operation Import and Export in MOSAIC?
• How can the MOSAIC xml models be converted into COM/CORBA objects?
• …
![Page 21: MOSAIC - A modelling and code generation toolMOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting 5 Modeling with MOSAIC Documentation File of](https://reader035.vdocuments.us/reader035/viewer/2022070700/5e5165c218bcd2154e6b9297/html5/thumbnails/21.jpg)
d|b|t|a www.dbta.tu-berlin.de
MOSAIC - A modeling and code generation tool | G. Tolksdorf | CAPE-OPEN 2013 Annual Meeting
21
Thank you very much for your kind attention.
Acknowledgement:
This project is
• supported by the Cluster of Excellence 'Unifying Concepts in Catalysis'
• coordinated by the Technical University of Berlin and
• funded by the German Research Foundation.
www.mosaic-modeling.de