<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://gres.uninova.pt/iopt-flow/show-pf.xsl" type="text/xsl" ?>
<net name="denoise" type="iopt-flow">
  <signal id="InS" mode="input" type="boolean" x="208" y="478" min="0" max="1" microstep="0" nano-step="0"/>
  <signal id="OutS" mode="output" type="boolean" x="295" y="160" min="0" max="1" microstep="0" nano-step="1"/>
  <operation id="calc_OutS" x="300" y="255" size="40">
    <name text="OutS" off_x="-35" off_y="-40"/>
    <input id="calc_OutS.OutS" name="OutS" off_x="-40" off_y="-25" type="range"/>
    <input id="calc_OutS.OS_UP" name="OS_UP" off_x="-40" off_y="0" type="event"/>
    <input id="calc_OutS.OS_DOWN" name="OS_DOWN" off_x="-40" off_y="25" type="event"/>
    <output id="calc_OutS.out" name="out" off_x="40" off_y="0" type="range" microstep="0" nano-step="1">
      <expression>
        <operand type="signal" idRef="OutS" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="signal" idRef="OS_UP"/>
      </expression>
      <expression>
        <operand type="signal" idRef="OutS" delay="1"/>
        <operator type="sub"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="signal" idRef="OS_DOWN"/>
      </expression>
      <expression>
        <operand type="signal" idRef="OutS" delay="1"/>
        <operator type="otherwise"/>
      </expression>
    </output>
  </operation>
  <arc id="OutS_drv" type="read" source="calc_OutS.out" target="OutS"/>
  <arc id="OutS_out" type="read" target="calc_OutS.OutS" source="OutS"/>
  <arc id="calc_OutS_1" type="read" source="OS_UP" target="calc_OutS.OS_UP"/>
  <arc id="calc_OutS_2" type="read" source="OS_DOWN" target="calc_OutS.OS_DOWN"/>
  <event id="OS_UP" mode="internal" x="220" y="255" microstep="0" nano-step="0"/>
  <arc id="OS_UP_in_evt" type="read" source="36" target="OS_UP" view="symbolic"/>
  <event id="OS_DOWN" mode="internal" x="160" y="280" microstep="0" nano-step="0"/>
  <arc id="OS_DOWN_in_evt" type="read" source="35" target="OS_DOWN" view="symbolic"/>
  <place id="2" x="90" y="60" init_marking="1">
    <name text="P0_1" off_x="-8" off_y="-25"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="3" x="280" y="60" init_marking="0">
    <name text="P0_2" off_x="-6" off_y="-28"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="4" x="440" y="60" init_marking="0">
    <name text="P0_3" off_x="-16" off_y="-26"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="5" x="90" y="400" init_marking="0">
    <name text="P1_1" off_x="-2" off_y="23"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="6" x="270" y="400" init_marking="0">
    <name text="P1_2" off_x="-1" off_y="22"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="7" x="440" y="400" init_marking="0">
    <name text="P1_3" off_x="-2" off_y="24"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="44" x="530" y="120" init_marking="0">
    <name text="P0_4" off_x="-23" off_y="23"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <place id="45" x="530" y="330" init_marking="0">
    <name text="P1_4" off_x="-27" off_y="-22"/>
    <comment text="" off_x="-30" off_y="20"/>
  </place>
  <transition id="8" x="210" y="175" priority="1" microstep="0">
    <name text="T0_1" off_x="2" off_y="-19"/>
    <comment text="" off_x="-30" off_y="20"/>
  </transition>
</net>
