From f4208244a8bb92b9ff892e8de3ede40fbb2901e1 Mon Sep 17 00:00:00 2001 From: "Prof. Dr. Volker Coors" <volker.coors@hft-stuttgart.de> Date: Sun, 19 Jul 2020 11:57:01 +0000 Subject: [PATCH] Update 02 Concept.adoc --- .../02 Concept.adoc | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/D01 Integration of INSEL Models and SimStadt/02 Concept.adoc b/D01 Integration of INSEL Models and SimStadt/02 Concept.adoc index 7aa997c..c16a539 100644 --- a/D01 Integration of INSEL Models and SimStadt/02 Concept.adoc +++ b/D01 Integration of INSEL Models and SimStadt/02 Concept.adoc @@ -1,9 +1,39 @@ -Concept of the Integration of INSEL models into SimStadt +# Concept of the Integration of INSEL models into SimStadt -- Develop an INSEL model or a template of an INSEL model -- Develop the functional part of the WFS that will be used to generate the INSEL model +The main concept to integrate INSEL models into SimStadt is to introduce a SimStadt Workflow step *INSEL templater* that is able to +1. read an INSEL template +2. writes an INSEL model per feature of interest based on the INSEL template +3. executes the INSEL model +4. reads the results written by the INSEL process and maps the resulting values to the SimStadt data model + +In a first prototype, the INSEL template is restricted to variables only. The feature of interest are buildings. For the implementation, the Java-Library handlebars (https://github.com/jknack/handlebars.java) has been choosen. That iomplies that a variable in the INSEL template has been encapsulated by two brackets: {{name of variable}}. To avoid an additional mapping between variables in teh INSEL template and attributes in the SimStadt data model, the names of the variables in the INSEL template have to be the same as in the SimStadt data model. + +Example: + +This statement in an INSEL template + +[source,java] +---- +{{electricalEfficiency}} % Electrical efficiency [-] +---- + +will be replaced by the value of the attribute _electricalEfficiency_ in the INSEL model by the INSEL templater Workflow step per building. + +If an attribute is not set in an instance of an object in SimStadt, a default value can be defined in the template: + +[source,java] +---- +{{getOrDefault electricalEfficiency 0.20}} % Electrical efficiency [-] +---- + +An example of an INSEL template for a heat pump that is applied to the simulation of every building in SimStadt can be found here: + +[source,java] +---- +include::https://gitlab.com/volkercoors/neqmodplus-steinbeis/uploads/c977bb7ac8882d1b2105813d35ea0b63/2020-04-17_HP_central_simple_constants_incl_defaults.txt +---- + +The example is provided by Verena Weiler. -INSEL template implementieren -XML writer in -- GitLab