Commit 04c68e2d authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

New version.

parent 7a20869d
<p xmlns:dct="http://purl.org/dc/terms/" xmlns:cc="http://creativecommons.org/ns#" class="license-text"><a rel="cc:attributionURL" property="dct:title" href="https://transfer.hft-stuttgart.de/gitlab/coors/neqmodplus-steinbeis/-/blob/master/ParameterCatalogsDocumentation">How to Implement Parameter Catalogs with Eclipse</a> by <span property="cc:attributionName">Kai-Holger Brassel</span>, Hamburg, is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0">CC BY-NC-ND 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nd.svg?ref=chooser-v1" /></a></p>
\ No newline at end of file
= Data Catalogs for Simulation = Parameter Catalogs for Simulation
Kai-Holger Brassel, Hamburg <mail@khbrassel.de> Kai-Holger Brassel, Hamburg, <mail@khbrassel.de>
:toc: :toc:
:toclevels: 2 :toclevels: 2
:compat-mode!: :compat-mode!:
include::DataCatalogs1Overview.adoc[] This work by Kai-Holger Brassel, Hamburg, is licensed under https://creativecommons.org/licenses/by-nc-nd/4.0[CC BY-NC-ND 4.0]
image:https://mirrors.creativecommons.org/presskit/icons/cc.svg[cc,20]
image:https://mirrors.creativecommons.org/presskit/icons/by.svg[by,20]
image:https://mirrors.creativecommons.org/presskit/icons/nc.svg[nc,20]
image:https://mirrors.creativecommons.org/presskit/icons/nd.svg[nd,20]
Version: October 19^th^, 2020.
include::ParameterCatalogs1Overview.adoc[]
<<< <<<
include::DataCatalogs2Creation.adoc[] include::ParameterCatalogs2Creation.adoc[]
<<< <<<
include::DataCatalogs3Usage.adoc[] include::ParameterCatalogs3Usage.adoc[]
<<<
include::ParameterCatalogs4TychoBuild.adoc[]
This diff is collapsed.
...@@ -6,7 +6,7 @@ This introduction talks about the work of the author and others, but without bib ...@@ -6,7 +6,7 @@ This introduction talks about the work of the author and others, but without bib
Maybe it could be developed into a more serious paper later. Maybe it could be developed into a more serious paper later.
==== ====
The overall motivation for the work on data catalogs for simulation is to make easier to develop and perform computer simulations in quite complex and _data rich_ domains like building physics, transportation, and all kinds of urban infrastructure. The overall motivation for the work on parameter catalogs for simulation is to make easier to develop and perform computer simulations in complex and _data rich_ domains like building physics, transportation, and all kinds of urban infrastructure.
=== The Bigger Picture === The Bigger Picture
...@@ -21,7 +21,7 @@ These languages were tailored to specific tasks like statistics ("S" 1976, "R" b ...@@ -21,7 +21,7 @@ These languages were tailored to specific tasks like statistics ("S" 1976, "R" b
By sacrificing generality, these special languages become more accessible to domain experts, not just trained software developers. By sacrificing generality, these special languages become more accessible to domain experts, not just trained software developers.
To flatten the learning curve even more, formal _graphical_ languages for special purposes were invented, e.g. Simulink for block diagram simulation models in 1984, Entity-Relationship-Diagrams for data modeling in 1976, UML for object-oriented systems design in the 1990s, or graphical languages to specify business and also scientific workflows around 2000. To flatten the learning curve even more, formal _graphical_ languages for special purposes were invented, e.g. Simulink for block diagram simulation models in 1984, Entity-Relationship-Diagrams for data modeling in 1976, UML for object-oriented systems design in the 1990s, or graphical languages to specify business and also scientific workflows around 2000.
This very short history on technologies for development of software in general, and simulations in particular, shall illuminate the tools at our disposal: This very short history of technologies for development of software in general, and simulations in particular, shall illuminate the tools at our disposal:
* general purpose programming languages that combine structured, functional and object-oriented approaches to enable the creation of big, modular software systems, often called "programming in the large" * general purpose programming languages that combine structured, functional and object-oriented approaches to enable the creation of big, modular software systems, often called "programming in the large"
* formal textual domain specific languages (DSLs) dedicated to solve specific tasks with ease * formal textual domain specific languages (DSLs) dedicated to solve specific tasks with ease
...@@ -42,12 +42,15 @@ More complex domains like (regenerative) energy systems or building physics deal ...@@ -42,12 +42,15 @@ More complex domains like (regenerative) energy systems or building physics deal
=== Lessons Learned === Lessons Learned
The above problem of navigating huge parameter spaces and assembling complex simulation models popped up as the author worked on the diagram editor for *INSEL*, a simulation language and runtime environment developed for renewable energy systems simulation. First a note on terminology: Instead of _parameter catalogs_ in SimStadt we used term _library_ like in _building physics library_. Obviously this was not a good choice, since _library_ is used a lot in IT and programming with all sorts of meaning. Instead we started to talk about _data catalogs_, but in data science this term has specific meaning, namely: catalogs of data and data sources.
Since our catalogs, first of all, shall grant structured access to parameters for simulated entities _parameter catalog_ sounds more appropriate to me.
The problem of navigating huge parameter spaces and assembling complex simulation models popped up as the author worked on a diagram editor for *INSEL*, a simulation language and runtime environment developed for renewable energy systems simulation.
To make existing catalogs on weather data, solar panels and inverter modules accessible to the modeler, special dialogs were added to the INSEL user interface that allowed browsing through the catalogs. To make existing catalogs on weather data, solar panels and inverter modules accessible to the modeler, special dialogs were added to the INSEL user interface that allowed browsing through the catalogs.
Using this browsers, the modeler would choose a weather station, panel or inverter to parameterize a corresponding INSEL block. Using this browsers, the modeler would choose a weather station, panel or inverter to parameterize a corresponding INSEL function-block.
However, there are some severe disadvantages with this approach: However, there are some severe disadvantages with this approach:
. Data catalogs were stored in a proprietary data format on disk within the INSEL application distribution, meaning they could not used independently from INSEL by other interested parties (systems or users). . Parameter catalogs were stored in a proprietary data format on disk within the INSEL application distribution, meaning they could not used independently from INSEL by other interested parties (systems or users).
. The catalogs have to be maintained by editing text files manually. . The catalogs have to be maintained by editing text files manually.
. While INSEL modeler could browse the catalogs, searching and sorting were not supported. . While INSEL modeler could browse the catalogs, searching and sorting were not supported.
. Development of Java Swing UIs for the different kind of catalogs is time consuming as is their maintenance, e.g. if a catalog data format were to change. . Development of Java Swing UIs for the different kind of catalogs is time consuming as is their maintenance, e.g. if a catalog data format were to change.
...@@ -58,37 +61,37 @@ Using INSEL and other simulators under the hood, the usage of 3D city data, prov ...@@ -58,37 +61,37 @@ Using INSEL and other simulators under the hood, the usage of 3D city data, prov
To enable simulation of, say, the heating demand of a district, geometric building data had to be enriched with data on building physics and usage. To enable simulation of, say, the heating demand of a district, geometric building data had to be enriched with data on building physics and usage.
To do so, existing informations about building physics and usage -- often only available as informal typologies or tables -- had to be provided to the SimStadt user on an abstract level, e.g. to choose between refurbishment scenarios. To do so, existing informations about building physics and usage -- often only available as informal typologies or tables -- had to be provided to the SimStadt user on an abstract level, e.g. to choose between refurbishment scenarios.
At the same time, concrete building configurations and parameter sets had to be injected into the simulation models to obtain the desired results. At the same time, specific building configurations and parameter sets had to be injected into the simulation models to obtain the desired results.
Again, we implemented data catalogs to fulfill these requirements, but compared to the quite simple catalogs used in INSEL, the data models for building materials, window, wall and roof types as well as the typologies of buildings, households, usage patterns, and so on were more intricate. Again, we implemented parameter catalogs to fulfill these requirements, but compared to the quite simple catalogs used in INSEL, the data for building materials, window, wall and roof types as well as the typologies of buildings, households, usage patterns, and so on were more intricate.
They had to be created iteratively in collaboration with domain experts. They had to be created iteratively in collaboration with domain experts.
In this situation, manual coding data formats and access with a general programming language would have led to relatively long iteration cycles and high communication effort between programmer and domain expert. In this situation, manual coding data formats and access with a general programming language would have led to relatively long iteration cycles and high communication effort between programmer and domain expert.
Instead, we decided to use a DSL for data modeling and use code generation whenever possible. Instead, we decided to use a DSL for data modeling and use code generation whenever possible.
Since SimStadt was developed within the Java eco-system we followed this standard approach:footnote:[A similar approach is in use to standardize extensions to CityGML via so called application domain extensions (ADE) like the energy ADE for exchanging energy related data.] Since SimStadt was developed within the Java eco-system we followed this standard approach:footnote:[A similar approach is in use to standardize extensions to CityGML via so called application domain extensions (ADE) like the energy ADE for exchanging energy related data.]
. Developer and domain expert create a first version of the data model as XML Schema Definition (our DSL). . Developer and domain expert create a first version of the data model as XML Schema Definition (our DSL).
. For plausibility checks use any standard XML editor to create example data conforming to the XSD. . For plausibility checks one would use any standard XML editor to create example data conforming to the XSD.
. With JAXB, the Java Architecture for XML Binding, Java code is generated to read our XML catalogs into Java objects that, in turn, can be accessed by SimStadt workflows to generate and parameterize simulations. . With JAXB (Java Architecture for XML Binding) Java code is generated to read our XML catalogs into Java objects that, in turn, can be accessed by SimStadt workflows to generate and parameterize simulations.
. If required, developer and domain expert go back to step one to refine data model and catalog data. . If required, developer and domain expert go back to step one to refine data model and catalog data.
After the data model for building physics catalogs had matured, we developed an extra application for convenient creation and maintenance of building physics data catalogs separate from SimStadt. After the data model for building physics catalogs had matured, we developed a desktop application for convenient creation and maintenance of building physics data catalogs separate from SimStadt.
It was developed in Java with a user interface written in JavaFX and was well received by domain expert users. It was developed in Java with a user interface written in JavaFX and was well received by domain experts.
However, as a different catalog -- this time for building usages -- had to be created, it was quite difficult to reuse the XML schema and application code from the building physics catalog: The usage catalog data model was "pressed" into a form similar to the building physics catalog data model, and the UI code was "over-engineered" to accommodate both catalog's requirements. However, as a different catalog -- this time for building usages -- had to be created, it was quite difficult to reuse the XML schema and application code from the building physics catalog: The usage catalog data model was "pressed" into a form similar to the building physics catalog data model, and the UI code was "over-engineered" to accommodate both catalog's requirements.
=== Low-Code-Development of Data Catalogs === Low-Code-Development of Parameter Catalogs
From INSEL and SimStadt we learned, that manual and automatic construction and parameterization of complex simulation models with many types of interrelated objects should be supported be the means of domain specific data catalogs. From INSEL and SimStadt we learned, that manual and automatic construction and parameterization of complex simulation models with many types of interrelated objects should be supported be the means of domain specific parameter catalogs.
Close collaboration with domain experts in designing and implementing these catalogs in short development cycles is desirable. Close collaboration with domain experts in designing and implementing these catalogs in short development cycles is desirable.
Data catalogs and the software for their creation, maintenance and deployment should be independent of any specific simulation software, (a) to be reusable and (b) not to overload simulation applications. Parameter catalogs and the software for their creation, maintenance and deployment should be independent of any specific simulation software, (a) to be reusable and (b) not to overload simulation applications.
In SimStadt, catalog development was partly facilitated by a textual DSL for data modeling (XML schema language) and automatic generation of Java code from it. In SimStadt, catalog development was partly facilitated by a textual DSL for data modeling (XML schema language) and automatic generation of Java code from it.
On the other hand, user interfaces and generation and parameterization of simulations from templates within SimStadt workflows had still to be coded manually hindering the routinely creation of new catalogs. On the other hand, user interfaces and generation and parameterization of simulations from templates within SimStadt workflows had still to be coded manually hindering the routinely creation of new catalogs.
Now, in 2020, several developments in different projects provide an opportunity to re-think the topic of data catalogs for simulations, namely: Now, in 2020, several developments in different projects provide an opportunity to re-think the topic of parameter catalogs for simulations, namely:
. Plans for a new Urban Simulation Platform at Concordia University, Montreal. . Plans for a new Urban Simulation Platform at Concordia University, Montreal.
. New implementation of INSEL user interface based on the Eclipse application framework and Eclipse-Sirius diagram editors. . New implementation of INSEL user interface based on the Eclipse application framework and Eclipse-Sirius diagram editors.
...@@ -105,11 +108,11 @@ It uses four technologies to replace manual coding by code generation from model ...@@ -105,11 +108,11 @@ It uses four technologies to replace manual coding by code generation from model
* A template engine called _Handlebars_ to generate fully parameterized simulation models from textual templates without programming. * A template engine called _Handlebars_ to generate fully parameterized simulation models from textual templates without programming.
The new technology stack is rooted in the Eclipse application framework and eco-system.footnote:[A comparable, but completely different approach would be to combine several web applications and services via portal software in web browsers.] The new technology stack is rooted in the Eclipse application framework and eco-system.footnote:[A comparable, but completely different approach would be to combine several web applications and services via portal software in web browsers.]
Its main advantage is the possibility to implement CRUD applications like data catalogs and their underlying data models with no or very view lines of handwritten code (_low-code-development_). Its main advantage is the possibility to implement CRUD applications like parameter catalogs and their underlying data models with no or very view lines of handwritten code (_low-code-development_).
==== ====
Plans are to use the same approach also for implementation of (3). Plans are to use the same approach also for implementation of (3).
Since task (2) and maybe (1) will use Eclipse, too, close integration of data catalogs and simulation environments seems feasible. Since task (2) and maybe (1) will use Eclipse, too, close integration of parameter catalogs and simulation environments seems feasible.
E.g., a user could drag an electric system component from a catalog onto an INSEL block for parametrization. E.g., a user could drag an electric system component from a catalog onto an INSEL block for parametrization.
The Eclipse application framework offers: The Eclipse application framework offers:
...@@ -123,7 +126,7 @@ The Eclipse application framework offers: ...@@ -123,7 +126,7 @@ The Eclipse application framework offers:
* Industry proven DSLs and code generators for data models and form based UIs via the https://www.eclipse.org/modeling/emf[_Eclipse Modeling Framework_] (EMF) providing: * Industry proven DSLs and code generators for data models and form based UIs via the https://www.eclipse.org/modeling/emf[_Eclipse Modeling Framework_] (EMF) providing:
** https://www.eclipse.org/ecoretools[_Ecore_] for model driven generation of Java classes and persistence layers for XML or data bases ** https://www.eclipse.org/ecoretools[_Ecore_] for model driven generation of Java classes and persistence layers for XML or data bases
** https://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements[_EMF Forms_] for describing and generating form based UIs ** https://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements[_EMF Forms_] for describing and generating form based UIs
** Mechanisms to adapt or extend data models and forms to special needs (e.g., we added quantities -- that is numbers _with_ units -- to Ecore and EMF Forms, a feature very important for data catalogs) ** Mechanisms to adapt or extend data models and forms to special needs (e.g., we added quantities -- that is numbers _with units_ -- to Ecore and EMF Forms, a feature very important for parameter catalogs)
* Rich open source eco-system with lots of plugins and projects important for an urban simulation platform: * Rich open source eco-system with lots of plugins and projects important for an urban simulation platform:
** model server for distributed access and work on Ecore models, including model comparison and migration (https://projects.eclipse.org/projects/modeling.emf.cdo[CDO], https://www.eclipse.org/emf/compare[EMFCompare]) ** model server for distributed access and work on Ecore models, including model comparison and migration (https://projects.eclipse.org/projects/modeling.emf.cdo[CDO], https://www.eclipse.org/emf/compare[EMFCompare])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment