Scenarios » History » Version 2

« Previous - Version 2/11 (diff) - Next » - Current version
Janez Barbic, 13.01.2011 15:39


Scenarios

Scenarios are defined in xml format in scenarios.xml file.

Example for one device:

<scenariotree>
    <scenario id="ac_01">
        <name nam="Air Conditioner"/>
        <minvalue minval="18"/>
        <maxvalue maxval="27"/>
    <optimal_value optVal="23"/>
        <tolerance_value tolVal="0.5"/>
    <idle_check_interval ici="600"/>
    <active_check_interval aci="600"/>
    <checked_devices chk_dev1="thermometer_01" chk_dev2="thermometer_01"/>
    ...additional options, waiting for your input :)
    <reaction_function fr="linear"/>
        <action act="testAction_1"/>
        <param par="testParam_1"/>
    </scenario>
</scenariotree>

Controlled device unique id:

<name nam="Air Conditioner"/>

Device name, for logging purposes only:


<name nam="Air Conditioner"/>

Boundaries which define interval which is used by logics.

<minvalue minval="18"/>
<maxvalue maxval="27"/>

Optimal value of our interval:

<optimal_value optVal="23"/>

Tolerance of optimal value, on both sides (+-). No action should be taken within these boundaries. Tolerance value should not exceed min or max value of interval.

<tolerance_value tolVal="0.5"/>

Frequency of checks preformed by logics if the controlled device is idle (in seconds):

<idle_check_interval ici="600"/>

Frequency of checks preformed by logics if the controlled device is active (in seconds):

<active_check_interval aci="600"/>

Note that some devices have the same value on idle and active status. Typically these are devices, which aren't expected to be active all the time, for example an office computer. It gets turned off or turned only a few times per day.
On the other hand there are some devices which should be checked more frequently if logic took action. For example, window blinds should get more attention during sunrise/sunset or weather changes.

Devices (meters) whose readings influence current controlled device:
Caution, these devices (meters) should always be defined in devices.xml!

<checked_devices chk_dev1="thermometer_01" chk_dev2="thermometer_01"/>

Function type used by logic to calculate parameter to send to controlled device.
Options are static (ON/OFF), linear, logarithmic ... TBD

<reaction_function fr="linear"/>

Location of action program with additional parameters:

<action act="testAction_1"/>
<param par="testParam_1"/>

-Ignore for now:
ok tole bom na hitro po slovensko napisal, prevod kasneje

Air Conditioner

vzdrzujemo temperaturo 23+-0.5 C

klimo prizigamo na +-3 C, se pravi klima max greje pri 20 C in max hladi pri 26 C. Moc povecujemo/znizujemo linearno.

primer: temperatura 21 C
23-20 = 3 C
21-20 = 1 C
1/3 = 0.33
1-0.33 = 0.66 => 100*zaokrozi navzgor(0.66) = 70
klima greje na 70%-