This page (revision-39) was last changed on 01-Apr-2020 01:46 by albrecht.striffler

This page was created on 31-Oct-2012 12:40 by Joachim Baumeister

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
39 01-Apr-2020 01:46 4 KB albrecht.striffler to previous
38 22-Feb-2017 17:52 4 KB Albrecht Striffler to previous | to last
37 29-Apr-2016 15:52 4 KB Albrecht Striffler to previous | to last
36 29-Apr-2016 15:52 4 KB Albrecht Striffler to previous | to last
35 29-Apr-2016 15:51 4 KB Albrecht Striffler to previous | to last
34 29-Apr-2016 15:47 4 KB Albrecht Striffler to previous | to last
33 29-Apr-2016 15:44 4 KB Albrecht Striffler to previous | to last
32 29-Apr-2016 15:42 4 KB Albrecht Striffler to previous | to last
31 29-Apr-2016 15:40 4 KB Albrecht Striffler to previous | to last
30 29-Apr-2016 15:30 3 KB Volker Belli to previous | to last
29 17-Sep-2015 15:50 3 KB Albrecht Striffler to previous | to last
28 17-Sep-2015 15:50 3 KB Albrecht Striffler to previous | to last
27 17-Sep-2015 15:50 3 KB Albrecht Striffler to previous | to last
26 17-Sep-2015 15:49 3 KB Albrecht Striffler to previous | to last
25 17-Sep-2015 15:49 3 KB Albrecht Striffler to previous | to last
24 17-Sep-2015 15:47 3 KB Albrecht Striffler to previous | to last
23 17-Sep-2015 15:47 3 KB Albrecht Striffler to previous | to last
22 17-Sep-2015 15:46 3 KB Albrecht Striffler to previous | to last
21 19-Jun-2015 13:31 3 KB Albrecht Striffler to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 5 lines
%%KnowledgeBase
BMI Demo
@uses: BMI Demo
%
At line 3 removed 2 lines
\\
To test it, add some values in the interview questionnaire below.
At line 9 added 3 lines
The BMI is calculated using DiaFlux models, where first the "Height" and "Weight" is asked to the user.
Then, the value of the abstraction "bmi" is derived, when values for the aforementioned questions are known.
Final solutions are derived depending on the result of the calculated value of "bmi".
At line 7 changed one line
!! Interview
!!! Interview and Solutions
At line 9 removed 6 lines
%%QuickInterview
%
!! Solutions
At line 16 changed one line
@show_abstractions: true
@master: Body-Mass-Index
@show_abstractions: true
@show_digits: 2
At line 21 added one line
[{KnowWEPlugin quickInterview}]
At line 20 removed one line
!! The Knowledge Base
At line 22 changed one line
In this part of the article, the knowledge base for this demo is defined.
!!! The Knowledge Base
At line 24 removed 46 lines
!Terminology
We first define __what__ questions can be asked and solutions can be derived in this demo.
%%Question
Start questionaire #1
- Height [num] (0.1 3) {m}
- Weight [num] (1 300) {kg}
- bmi [num] <abstract>
%
%%Solution
Weight Assessment
- Underweight
- Normal weight
- Overweight
- Severe overweight
%
We also define german question and solution texts. This is optional. If no texts are given for a certain language, the original name is shown.
%%Property
Height.prompt.de = Wie groß sind Sie?
Weight.prompt.de = Wie schwer sind Sie?
bmi.prompt.de = Ihr Body Mass Index
Underweight.prompt.de = Untergewicht
Normal weight.prompt.de = Normalgewicht
Overweight.prompt.de = Übergewicht
Severe overweight.prompt.de = Starkes Übergewicht
Severe overweight.description.de = Ihr BMI ist größer 35. Sie sollten dringend abnehmen.
%
!Knowledge
Here we define __how__ the BMI is calculated and the solutions are derived.\\
\\
The BMI is calculated using DiaFlux models, where first the "Height" and "Weight" is asked to the user.
Then, the value of the abstraction "bmi" is derived, when values for the aforementioned questions are known.
Final solutions are derived depending on the result of the calculated value of "bmi".
At line 71 changed one line
<flowchart fcid="flow_26ef012e" name="Main" icon="sanduhr.gif" width="789" height="262" autostart="true" idCounter="21">
<flowchart fcid="flow_26ef012e" name="Main" icon="sanduhr.gif" width="623" height="397" autostart="true" idCounter="19">
At line 75 changed 2 lines
<position left="20" top="89"></position>
<action markup="KnOffice"><![CDATA[Height]]></action>
<position left="35" top="150"></position>
<action markup="KnOffice">Height</action>
At line 80 changed 2 lines
<position left="175" top="89"></position>
<action markup="KnOffice"><![CDATA[Weight]]></action>
<position left="190" top="150"></position>
<action markup="KnOffice">Weight</action>
At line 85 changed one line
<position left="32" top="20"></position>
<position left="47" top="81"></position>
At line 90 changed 2 lines
<position left="327" top="89"></position>
<action markup="KnOffice"><![CDATA["bmi" = ((Weight / (Height*Height)))]]></action>
<position left="322" top="150"></position>
<action markup="KnOffice">"bmi" = ((Weight / (Height*Height)))</action>
At line 95 changed 2 lines
<position left="173" top="211"></position>
<action markup="KnOffice"><![CDATA["Underweight" = P7]]></action>
<position left="168" top="272"></position>
<action markup="KnOffice">"Underweight" = P7</action>
At line 100 changed 2 lines
<position left="331" top="211"></position>
<action markup="KnOffice"><![CDATA["Normal weight" = P7]]></action>
<position left="326" top="272"></position>
<action markup="KnOffice">"Normal weight" = P7</action>
At line 105 changed 2 lines
<position left="480" top="211"></position>
<action markup="KnOffice"><![CDATA["Overweight" = P7]]></action>
<position left="475" top="272"></position>
<action markup="KnOffice">"Overweight" = P7</action>
At line 109 removed 4 lines
<node fcid="#node_20">
<position left="635" top="211"></position>
<action markup="KnOffice"><![CDATA["Severe overweight" = P7]]></action>
</node>
At line 114 removed one line
At line 119 changed one line
<guard markup="KnOffice"><![CDATA["Height" > 0]]></guard>
<guard markup="KnOffice">"Height" > 0</guard>
At line 130 changed one line
<guard markup="KnOffice"><![CDATA[KNOWN["Weight"]]]></guard>
<guard markup="KnOffice">KNOWN["Weight"]</guard>
At line 136 changed one line
<guard markup="KnOffice"><![CDATA["bmi" < 18.5]]></guard>
<guard markup="KnOffice">"bmi" < 18.5</guard>
At line 142 changed one line
<guard markup="KnOffice"><![CDATA["bmi" >= 18.5 AND "bmi" <= 25]]></guard>
<guard markup="KnOffice">"bmi" >= 18.5 AND "bmi" <= 25</guard>
At line 148 changed one line
<guard markup="KnOffice"><![CDATA["bmi" > 25 AND "bmi" <= 35]]></guard>
<guard markup="KnOffice">"bmi" > 25</guard>
At line 151 changed 6 lines
<edge fcid="#rule_21">
<origin>#node_7</origin>
<target>#node_20</target>
<guard markup="KnOffice"><![CDATA["bmi" > 35]]></guard>
</edge>
<preview mimetype="text/html">
<![CDATA[
<DIV class="Flowchart" style=" width: 633px; height: 403px;"><DIV class="Node" id="#node_2" style="left: 35px;top: 150px; width: 95px; height: 42px;"><DIV class="question" style=" width: 82px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 80px; height: 38px;"><DIV class="object" style=" width: 80px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/num.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Height</DIV><DIV class="value" style=" width: 80px; height: 19px;">ask</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_3" style="left: 190px;top: 150px; width: 95px; height: 42px;"><DIV class="question" style=" width: 82px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 80px; height: 38px;"><DIV class="object" style=" width: 80px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/num.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Weight</DIV><DIV class="value" style=" width: 80px; height: 19px;">ask</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_5" style="left: 47px;top: 81px; width: 75px; height: 20px;"><DIV class="start" style=" width: 62px; height: 20px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="title" style=" width: 60px; height: 15px;">Start</DIV></DIV></DIV><DIV class="Node" id="#node_7" style="left: 322px;top: 150px; width: 174px; height: 42px;"><DIV class="action" style=" width: 161px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 159px; height: 38px;"><DIV class="object" style=" width: 159px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/num-abstract.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>bmi</DIV><DIV class="value" style=" width: 159px; height: 19px;">= (Weight / (Height*Height))</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_9" style="left: 168px;top: 272px; width: 109px; height: 42px;"><DIV class="action" style=" width: 96px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 94px; height: 38px;"><DIV class="object" style=" width: 94px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/diagnosis.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Underweight</DIV><DIV class="value" style=" width: 94px; height: 19px;">established</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_11" style="left: 326px;top: 272px; width: 121px; height: 42px;"><DIV class="action" style=" width: 108px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 106px; height: 38px;"><DIV class="object" style=" width: 106px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/diagnosis.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Normal weight</DIV><DIV class="value" style=" width: 106px; height: 19px;">established</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_13" style="left: 475px;top: 272px; width: 101px; height: 42px;"><DIV class="action" style=" width: 88px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 86px; height: 38px;"><DIV class="object" style=" width: 86px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/diagnosis.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Overweight</DIV><DIV class="value" style=" width: 86px; height: 19px;">established</DIV></DIV></DIV></DIV><DIV class="Rule" id="#rule_4" style=" width: 0px; height: 0px;"><DIV class="h_line" style="left: 130px;top: 171px; width: 60px; height: 1px;"><DIV class="arrow_right" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 130px;top: 171px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 7px; width: 27px; height: 12px;"><DIV class="GuardPane" style=" width: 27px; height: 12px;"><DIV style=" width: 27px; height: 12px;">> 0 m</DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="h_line_highlight" style="left: 129px;top: 170px; width: 62px; height: 3px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 127px;top: 168px;overflow: hidden; width: 66px; height: 7px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_6" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 84px;top: 101px; width: 1px; height: 49px;"><DIV class="arrow_down" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 84px;top: 101px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px;top: 2px; width: 0px; height: 0px;"><DIV class="GuardPane" style=" width: 0px; height: 0px;"><DIV style=" width: 0px; height: 0px;"> </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 83px;top: 100px; width: 3px; height: 51px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 81px;top: 98px;overflow: hidden; width: 7px; height: 55px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_8" style=" width: 0px; height: 0px;"><DIV class="h_line" style="left: 285px;top: 171px; width: 37px; height: 1px;"><DIV class="arrow_right" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 285px;top: 171px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 7px; width: 32px; height: 12px;"><DIV class="GuardPane" style=" width: 32px; height: 12px;"><DIV style=" width: 32px; height: 12px;">known </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="h_line_highlight" style="left: 284px;top: 170px; width: 39px; height: 3px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 282px;top: 168px;overflow: hidden; width: 43px; height: 7px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_12" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 409px;top: 192px; width: 1px; height: 80px;"><DIV class="arrow_down" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 409px;top: 192px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px;top: 2px; width: 50px; height: 12px;"><DIV class="GuardPane" style=" width: 50px; height: 12px;"><DIV style=" width: 50px; height: 12px;">[ 18.5 .. 25 ] </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 408px;top: 191px; width: 3px; height: 82px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 406px;top: 189px;overflow: hidden; width: 7px; height: 86px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_10" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 351px;top: 192px; width: 1px; height: 40px;"><DIV class="no_arrow" style=" width: 0px; height: 0px;"></DIV></DIV><DIV class="h_line" style="left: 215px;top: 231.5px; width: 137px; height: 1px;"><DIV class="no_arrow" style=" width: 0px; height: 0px;"></DIV></DIV><DIV class="v_line" style="left: 215px;top: 231.5px; width: 1px; height: 40px;"><DIV class="arrow_down" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 351px;top: 192px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px;top: 2px; width: 30px; height: 12px;"><DIV class="GuardPane" style=" width: 30px; height: 12px;"><DIV style=" width: 30px; height: 12px;">< 18.5 </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 350px;top: 191px; width: 3px; height: 42px;"></DIV><DIV class="h_line_highlight" style="left: 214px;top: 230.5px; width: 139px; height: 3px;"></DIV><DIV class="v_line_highlight" style="left: 214px;top: 230.5px; width: 3px; height: 42px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 348px;top: 189px;overflow: hidden; width: 7px; height: 46px;"></DIV><DIV class="rule_selector" style="position: absolute;left: 212px;top: 228.5px;overflow: hidden; width: 143px; height: 7px;"></DIV><DIV class="rule_selector" style="position: absolute;left: 212px;top: 228.5px;overflow: hidden; width: 7px; height: 46px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_14" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 485px;top: 192px; width: 1px; height: 80px;"><DIV class="arrow_down" style=" width: 9px; height: 9px;"></DIV></DIV><DIV style="position: absolute;left: 485px;top: 192px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px;top: 2px; width: 21px; height: 12px;"><DIV class="GuardPane" style=" width: 21px; height: 12px;"><DIV style=" width: 21px; height: 12px;">> 25 </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 484px;top: 191px; width: 3px; height: 82px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 482px;top: 189px;overflow: hidden; width: 7px; height: 86px;"></DIV></DIV></DIV></DIV>
]]>
</preview>
At line 159 changed one line
@package: BMI Demo
At line 112 added one line
__Terminology Definitions:__
At line 163 changed one line
!Definition of Knowledge Base
%%Question
Startquestionaire #1
- Height [num] (0.1 3) {m}
- Weight [num] (1 300) {kg}
- bmi [num] <abstract>
@package: BMI Demo
%
At line 165 changed 4 lines
Here we follow with some basic stuff that is needed to tell the system, that we have a knowledge base here. Using the menu that expands when hovering over the small book icon on the right, you can also export the knowledge base as a .d3web-file to load and run it in your own application (click ''Download''), or start a one-choice-dialog for this demo (click ''Run Interview'').
%%KnowledgeBase
BMI Demo
%%Solution
Weight Assessment
- Underweight
- Normal weight
- Overweight
- Heavy overweight
@package: BMI Demo
At line 172 removed one line
!Package
At line 174 removed 2 lines
%%Package BMIDemo