<?xml version="1.0" encoding="UTF-8"?>
<program xmlns="http://www.nomoseed.org/program" name="tutorial_2_as">
  <header xmlns="http://www.nomoseed.org/project">
    <author>Cédric Coussinet (cedric.coussinet@nomoseed.net)</author>
    <copyright>
      <mention xml:lang="en">
        Copyright (2013) Cédric Coussinet
      </mention>
    </copyright>
    <license name="GPLv3">
      <mention xml:lang="en">
        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published
        by the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program. If not, see http://www.gnu.org/licenses
      </mention>
    </license>
    <datetime>2014-07-07T16:10:46Z</datetime>
    <version>0.0</version>
    <annotation>
      <documentation xml:lang="fr">Quel est le contexte ?</documentation>
    </annotation>
  </header>
  <body>
    <models xmlns:xi="http://www.w3.org/2001/XInclude">
      <new instance="tutorial_2">
        <xi:include href="tutorial_2_as.mod" parse="xml"/>
      </new>
    </models>
    
    <scheme xmlns="http://www.nomoseed.org/program">
<scheme name="labels">
<scheme name="label_setosa">
<rule name="label_setosa_in">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="input" type="label">
<information value="1" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="label">
<information value="setosa"/>
</conclusion>
</rule>
<rule name="label_setosa_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="setosa" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="label">
<information value="setosa"/>
<output value="1"/>
</conclusion>
</rule>
</scheme>
<scheme name="label_versicolor">
<rule name="label_versicolor_in">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="input" type="label">
<information value="2" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="label">
<information value="versicolor"/>
</conclusion>
</rule>
<rule name="label_versicolor_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="versicolor" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="label">
<information value="versicolor"/>
<output value="2"/>
</conclusion>
</rule>
</scheme>
<scheme name="label_virginica">
<rule name="label_virginica_in">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="input" type="label">
<information value="3" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="label">
<information value="virginica"/>
</conclusion>
</rule>
<rule name="label_virginica_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="virginica" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="label">
<information value="virginica"/>
<output value="3"/>
</conclusion>
</rule>
</scheme>
</scheme>
<scheme name="points">
<scheme name="point_setosa">
<rule name="point_setosa_in" fitting_nbr="0">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="initialization" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="setosa" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="versicolor" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="input" type="point">
<information value="0.2859208" tolerance="2.339816"/>
<information value="0.05409695" tolerance="0.8800454"/>
<information value="0.0330093" tolerance="0.4817708"/>
<information value="6.47225e-05" tolerance="0.3369132"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="point">
<information value="setosa"/>
</conclusion>
</rule>
<rule name="point_setosa_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="setosa" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="point">
<information value="setosa"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
</conclusion>
</rule>
</scheme>
<scheme name="point_virginica">
<rule name="point_virginica_in" fitting_nbr="0">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="initialization" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="virginica" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="setosa" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="input" type="point">
<information value="0.2859208" tolerance="2.339816"/>
<information value="0.05409695" tolerance="0.8800454"/>
<information value="0.0330093" tolerance="0.4817708"/>
<information value="6.47225e-05" tolerance="0.3369132"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="point">
<information value="virginica"/>
</conclusion>
</rule>
<rule name="point_virginica_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="virginica" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="point">
<information value="virginica"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
</conclusion>
</rule>
</scheme>
<scheme name="point_versicolor">
<rule name="point_versicolor_in" fitting_nbr="0">
<premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
<information value="initialization" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="versicolor" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="perception" type="label" inhibitor="true">
<information value="virginica" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="1000 ms" tolerance="0"/>
</premise>
<premise model="tutorial_2" category="input" type="point">
<information value="0.2859208" tolerance="2.339816"/>
<information value="0.05409695" tolerance="0.8800454"/>
<information value="0.0330093" tolerance="0.4817708"/>
<information value="6.47225e-05" tolerance="0.3369132"/>
</premise>
<conclusion model="tutorial_2" category="perception" type="point">
<information value="versicolor"/>
</conclusion>
</rule>
<rule name="point_versicolor_out">
<premise model="tutorial_2" category="conception" type="phase">
<information value="exploitation" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="-1" tolerance="INF"/>
</premise>
<premise model="tutorial_2" category="perception" type="point">
<information value="versicolor" tolerance="0"/>
<credibility value="1" tolerance="INF"/>
<timespan value="0" tolerance="0"/>
</premise>
<conclusion model="tutorial_2" category="command" type="point">
<information value="versicolor"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
<output value="0.0"/>
</conclusion>
</rule>
</scheme>
</scheme>
<scheme name="phases_management">
<rule name="initialization_phase">
          <premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
            <information value="learning" tolerance="INF"/>
            <credibility value="1" tolerance="INF"/>
            <timespan value="-1" tolerance="INF"/>
          </premise>
          <premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
            <information value="learning" tolerance="INF"/>
            <credibility value="1" tolerance="INF"/>
            <timespan value="0" tolerance="INF"/>
          </premise>
          <conclusion model="tutorial_2" category="conception" type="phase">
            <information value="initialization" delay="1500 ms"/>
          </conclusion>
        </rule>
<rule name="learning_phase">
          <premise model="tutorial_2" category="conception" type="phase">
            <information value="initialization" tolerance="0"/>
            <credibility value="1" tolerance="INF"/>
            <timespan value="0" tolerance="0"/>
          </premise>
          <conclusion model="tutorial_2" category="conception" type="phase">
            <information value="learning" delay="45000 ms"/>
          </conclusion>
        </rule>
<rule name="exploitation_phase">
          <premise model="tutorial_2" category="conception" type="phase">
            <information value="learning" tolerance="0"/>
            <credibility value="1" tolerance="INF"/>
            <timespan value="0" tolerance="0"/>
          </premise>
          <conclusion model="tutorial_2" category="conception" type="phase">
            <information value="exploitation" delay="MAX"/>
          </conclusion>
        </rule>
</scheme>
</scheme>
  </body>
  <sdk>
    <macro xmlns="http://www.nomoseed.org/sdk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" active="true" name="labels" xsi:type="template">
      <csv xsi:type="embedded"> 
        label, data, scheme, rule_in, rule_out
        setosa, 1, label_setosa, label_setosa_in, label_setosa_out
        versicolor, 2, label_versicolor, label_versicolor_in, label_versicolor_out
        virginica, 3, label_virginica, label_virginica_in, label_virginica_out
      </csv>
      <template xmlns="http://www.nomoseed.org/template">
        <scheme name="#scheme">
          <rule name="#rule_in">
            <premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
              <information value="exploitation" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="-1" tolerance="INF"/>
            </premise>
            <premise model="tutorial_2" category="input" type="label">
              <information value="#data" tolerance="0"/>
            </premise>
            <conclusion model="tutorial_2" category="perception" type="label">
              <information value="#label"/>
            </conclusion>
          </rule>
          <rule name="#rule_out">
            <premise model="tutorial_2" category="conception" type="phase">
              <information value="exploitation" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="-1" tolerance="INF"/>
            </premise>
            <premise model="tutorial_2" category="perception" type="point">
              <information value="#label" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="0" tolerance="0"/>
            </premise>
            <conclusion model="tutorial_2" category="command" type="label">
              <information value="#label"/>
              <output value="#data"/>
            </conclusion>
          </rule>
        </scheme>
      </template>
    </macro>
    <macro xmlns="http://www.nomoseed.org/sdk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" active="true" name="points" xsi:type="template">
      <csv xsi:type="embedded"> 
        percept, label_inhibitor_1, label_inhibitor_2, scheme, rule_in, rule_iris, rule_out
        setosa, setosa, versicolor, point_setosa, point_setosa_in, point_setosa, point_setosa_out
        virginica, virginica, setosa, point_virginica, point_virginica_in, point_virginica, point_virginica_out
        versicolor, versicolor, virginica, point_versicolor, point_versicolor_in, point_versicolor, point_versicolor_out
      </csv>
      <template xmlns="http://www.nomoseed.org/template">
        <scheme name="#scheme">
          <rule name="#rule_in" fitting_nbr="0">
            <premise model="tutorial_2" category="conception" type="phase" inhibitor="true">
              <information value="initialization" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="-1" tolerance="INF"/>
            </premise>
            <premise model="tutorial_2" category="perception" type="label" inhibitor="true">
              <information value="#label_inhibitor_1" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="1000 ms" tolerance="0"/>
            </premise>
            <premise model="tutorial_2" category="perception" type="label" inhibitor="true">
              <information value="#label_inhibitor_2" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="1000 ms" tolerance="0"/>
            </premise>
            <premise model="tutorial_2" category="input" type="point">
              <information value="0.2859208" tolerance="2.339816"/>
              <information value="0.05409695" tolerance="0.8800454"/>
              <information value="0.0330093" tolerance="0.4817708"/>
              <information value="6.47225e-05" tolerance="0.3369132"/>
            </premise>
            <conclusion model="tutorial_2" category="perception" type="point">
              <information value="#percept"/>
            </conclusion>
          </rule>
          <rule name="#rule_out">
            <premise model="tutorial_2" category="conception" type="phase">
              <information value="exploitation" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="-1" tolerance="INF"/>
            </premise>
            <premise model="tutorial_2" category="perception" type="point">
              <information value="#percept" tolerance="0"/>
              <credibility value="1" tolerance="INF"/>
              <timespan value="0" tolerance="0"/>
            </premise>
            <conclusion model="tutorial_2" category="command" type="point">
              <information value="#percept"/>
              <output value="0.0"/>
              <output value="0.0"/>
              <output value="0.0"/>
              <output value="0.0"/>
            </conclusion>
          </rule>
        </scheme>
      </template>
    </macro>
  </sdk>
</program>
