__''Important: You need the commercial plugin TimeDB to run the temporal extensions of KnowWE and d3web. Please contact info@denkbares.com for more information.''__

This is a simple knowledge base to demonstrate the gradient of a time-valued temperature value. For incoming values of ''Temperature'' (concerning the last 20 seconds) the gradient is calculated by the variable ''Gradient''. Based on its value, the DiaFlux knowledge base derives the value of the abstraction ''Progression''.

!!! Interview (and Derivation)

Try the temporal progression of the value of "Temperature" by iteratively entering values for "Temperature".

[{KnowWEPlugin quickInterview}]

!!! Knowledge Base

%%DiaFlux
<flowchart fcid="flow_e087e5af" name="Main" icon="sanduhr.gif" width="620" height="300" autostart="true" idCounter="21">

	<!-- nodes of the flowchart -->
	<node fcid="#node_2">
		<position left="84" top="59"></position>
		<start>Start</start>
	</node>

	<node fcid="#node_11">
		<position left="64" top="135"></position>
		<action markup="KnOffice">Temperature</action>
	</node>

	<node fcid="#node_14">
		<position left="212" top="135"></position>
		<action markup="timeDB">"Gradient" = eval(gradient(Temperature[0s, -20s]))</action>
	</node>

	<node fcid="#node_15">
		<position left="267" top="48"></position>
		<action markup="KnOffice">"Progression" = "increase"</action>
	</node>

	<node fcid="#node_18">
		<position left="457" top="135"></position>
		<action markup="KnOffice">"Progression" = "constant"</action>
	</node>

	<node fcid="#node_20">
		<position left="267" top="221"></position>
		<action markup="KnOffice">"Progression" = "decrease"</action>
	</node>


	<!-- rules of the flowchart -->
	<edge fcid="#rule_12">
		<origin>#node_2</origin>
		<target>#node_11</target>
	</edge>

	<edge fcid="#rule_16">
		<origin>#node_11</origin>
		<target>#node_14</target>
		<guard markup="KnOffice">KNOWN["Temperature"]</guard>
	</edge>

	<edge fcid="#rule_17">
		<origin>#node_14</origin>
		<target>#node_15</target>
		<guard markup="KnOffice">"Gradient" > 0</guard>
	</edge>

	<edge fcid="#rule_19">
		<origin>#node_14</origin>
		<target>#node_18</target>
		<guard markup="KnOffice">"Gradient" = 0</guard>
	</edge>

	<edge fcid="#rule_21">
		<origin>#node_14</origin>
		<target>#node_20</target>
		<guard markup="KnOffice">"Gradient" < 0</guard>
	</edge>

	<preview mimetype="text/html">
		<![CDATA[
<DIV class="Flowchart" style=" width: 623px; height: 303px;"><DIV class="Node" id="#node_2" style="left: 84px;top: 59px; 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_11" style="left: 64px;top: 135px; width: 109px; height: 42px;"><DIV class="question" 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/num.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Temperature</DIV><DIV class="value" style=" width: 94px; height: 19px;">ask</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_14" style="left: 212px;top: 135px; width: 209px; height: 42px;"><DIV class="action" style=" width: 196px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 194px; height: 38px;"><DIV class="object" style=" width: 194px; 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>Gradient</DIV><DIV class="value" style=" width: 194px; height: 19px;">= gradient(Temperature[0s, -20s])</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_15" style="left: 267px;top: 48px; width: 107px; height: 42px;"><DIV class="action" style=" width: 94px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 92px; height: 38px;"><DIV class="object" style=" width: 92px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/single-abstract.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Progression</DIV><DIV class="value" style=" width: 92px; height: 19px;">increase</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_18" style="left: 457px;top: 135px; width: 107px; height: 42px;"><DIV class="action" style=" width: 94px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 92px; height: 38px;"><DIV class="object" style=" width: 92px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/single-abstract.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Progression</DIV><DIV class="value" style=" width: 92px; height: 19px;">constant</DIV></DIV></DIV></DIV><DIV class="Node" id="#node_20" style="left: 267px;top: 221px; width: 107px; height: 42px;"><DIV class="action" style=" width: 94px; height: 42px;"><DIV class="decorator" style=" width: 20px; height: 20px;"></DIV><DIV class="ActionPane" style=" width: 92px; height: 38px;"><DIV class="object" style=" width: 92px; height: 19px;"><SPAN class="icon" style=" width: 16px; height: 15px;"><IMG src="cc/image/kbinfo/single-abstract.gif" style=" width: 16px; height: 16px;"></IMG></SPAN>Progression</DIV><DIV class="value" style=" width: 92px; height: 19px;">decrease</DIV></DIV></DIV></DIV><DIV class="Rule" id="#rule_12" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 121px;top: 79px; width: 1px; height: 56px;"><DIV class="arrow_down" style=" width: 5px; height: 6px;"></DIV></DIV><DIV style="position: absolute;left: 121px;top: 79px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 2px;top: 3px; 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: 120px;top: 78px; width: 3px; height: 58px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 118px;top: 76px;overflow: hidden; width: 7px; height: 62px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_16" style=" width: 0px; height: 0px;"><DIV class="h_line" style="left: 173px;top: 156px; width: 39px; height: 1px;"><DIV class="arrow_right" style=" width: 6px; height: 5px;"></DIV></DIV><DIV style="position: absolute;left: 173px;top: 156px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px; 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: 172px;top: 155px; width: 41px; height: 3px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 170px;top: 153px;overflow: hidden; width: 45px; height: 7px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_17" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 316px;top: 90px; width: 1px; height: 45px;"><DIV class="arrow_up" style=" width: 5px; height: 6px;"></DIV></DIV><DIV style="position: absolute;left: 316px;top: 134px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 2px;bottom: 3px; width: 15px; height: 12px;"><DIV class="GuardPane" style=" width: 15px; height: 12px;"><DIV style=" width: 15px; height: 12px;">> 0 </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 315px;top: 89px; width: 3px; height: 47px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 313px;top: 87px;overflow: hidden; width: 7px; height: 51px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_19" style=" width: 0px; height: 0px;"><DIV class="h_line" style="left: 421px;top: 156px; width: 36px; height: 1px;"><DIV class="arrow_right" style=" width: 6px; height: 5px;"></DIV></DIV><DIV style="position: absolute;left: 421px;top: 156px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 3px; width: 15px; height: 12px;"><DIV class="GuardPane" style=" width: 15px; height: 12px;"><DIV style=" width: 15px; height: 12px;">= 0 </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="h_line_highlight" style="left: 420px;top: 155px; width: 38px; height: 3px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 418px;top: 153px;overflow: hidden; width: 42px; height: 7px;"></DIV></DIV></DIV><DIV class="Rule" id="#rule_21" style=" width: 0px; height: 0px;"><DIV class="v_line" style="left: 316px;top: 177px; width: 1px; height: 44px;"><DIV class="arrow_down" style=" width: 5px; height: 6px;"></DIV></DIV><DIV style="position: absolute;left: 316px;top: 177px;overflow: visible; width: 0px; height: 0px;"><DIV class="guard" style="position: absolute;left: 2px;top: 3px; width: 15px; height: 12px;"><DIV class="GuardPane" style=" width: 15px; height: 12px;"><DIV style=" width: 15px; height: 12px;">< 0 </DIV></DIV></DIV></DIV><DIV class="rule_highlight" style=" width: 0px; height: 0px;"><DIV class="v_line_highlight" style="left: 315px;top: 176px; width: 3px; height: 46px;"></DIV></DIV><DIV class="rule_selector" style=" width: 0px; height: 0px;"><DIV class="rule_selector" style="position: absolute;left: 313px;top: 174px;overflow: hidden; width: 7px; height: 50px;"></DIV></DIV></DIV></DIV>
		]]>
	</preview>
</flowchart>
@package DemoTemperature
%

__Terminology:__

%%Question
Questions
- Temperature [num]
- Gradient [num] <abstract>
- Progression [oc] <abstract>
-- decrease
-- constant
-- increase
@package DemoTemperature
%

!!! Knowledge Base Administration

%%KnowledgeBase
Temperature example. 
@uses: DemoTemperature
%

%%tags
DemoTemperature
%