<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href='http://gres.uninova.pt/iopt-flow/show-pf.xsl' type='text/xsl' ?>
<net name="sample" type="iopt-flow">
  <signal id="ON" x="190" y="215" mode="input" type="boolean" min="0" max="1"/>
  <signal id="SensorMax" x="480" y="200" mode="input" type="boolean" min="0" max="1"/>
  <signal id="SensorMin" x="325" y="220" mode="input" type="boolean" min="0" max="1"/>
  <signal id="Temperatura" x="610" y="260" mode="input" type="range" min="0" max="100" frac="0" value="0" dynamic="none"/>
  <place id="p005" x="250" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="A Encher"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p006" x="725" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="A Aquecer"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p007" x="870" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="A Lavar"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p008" x="1090" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="Centrifugar"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p009" x="1305" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="A Vazar"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t011" x="325" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Nivel Minimo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <place id="p012" x="400" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="NivelMinimo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a013" type="normal" source="p005" target="t011"/>
  <arc id="a014" type="normal" source="t011" target="p012"/>
  <arc id="a015" type="read" source="SensorMin" target="t011"/>
  <transition id="t016" x="190" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="ON"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a017" type="read" source="ON" target="t016"/>
  <arc id="a018" type="normal" source="t016" target="p005"/>
  <transition id="t020" x="480" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Nivel Maximo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a021" type="read" source="SensorMax" target="t020"/>
  <arc id="a022" type="normal" source="p012" target="t020"/>
  <place id="p023" x="560" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="Nivel Maximo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a024" type="normal" source="t020" target="p023"/>
  <place id="p025" x="120" y="150" init_marking="1">
    <name off_x="-10" off_y="-10" text="Maq OFF"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a026" type="normal" source="p025" target="t016"/>
  <event id="Ligou" x="190" y="90" mode="output"/>
  <arc id="a028" type="read" source="t016" target="Ligou"/>
  <operation id="o030" x="285" y="240" constant="3" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="3"/>
    <output off_x="20" off_y="0" name="K" id="o030.K" type="range" min="3" max="3" dynamic="none">
      <expression>
        <text>3</text>
        <operand type="literal" value="3"/>
      </expression>
    </output>
  </operation>
  <component id="cp1" class="timers/tOFF" x="430" y="250" width="60" height="80" shape="rect">
    <name text="tOFF" off_x="-30" off_y="-42"/>
    <input id="cp1.in" name="in" type="boolean" off_x="-30" off_y="-30"/>
    <input id="cp1.delay" name="delay" type="range" min="0" max="16384" off_x="-30" off_y="-10"/>
    <output id="cp1.out" name="out" type="boolean" off_x="30" off_y="-30"/>
  </component>
  <arc id="a033" type="read" source="o030.K" target="cp1.delay"/>
  <operation id="op1" x="595" y="210" rot="0" shape="arrow" size="25" locked="true">
    <name text="AND" off_x="-12" off_y="-5"/>
    <input id="op1.SensorMax" name="SensorMax" type="boolean" dynamic="name" off_x="-25" off_y="-10"/>
    <input id="op1.out_B" name="out_B" type="boolean" dynamic="name" off_x="-25" off_y="10"/>
    <output id="op1.out" name="out" type="boolean" off_x="25" off_y="0">
      <expression>
        <text>SensorMax AND out_B</text>
        <operand type="signal" idRef="SensorMax"/>
        <operator type="and"/>
        <operand type="signal" idRef="out_B"/>
      </expression>
    </output>
  </operation>
  <transition id="t034" x="655" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Aquecer"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a035" type="normal" source="p023" target="t034"/>
  <arc id="a037" type="read" source="cp1.out" target="op1.out_B"/>
  <arc id="a038" type="read" source="op1.out" target="t034" c1_x="25" c1_y="5" c2_x="0" c2_y="20"/>
  <arc id="a039" type="read" source="SensorMin" target="cp1.in"/>
  <arc id="a040" type="read" source="SensorMax" target="op1.SensorMax"/>
  <event id="Encheu" x="655" y="95" mode="output"/>
  <arc id="a042" type="read" source="t034" target="Encheu"/>
  <arc id="a043" type="normal" source="t034" target="p006"/>
  <transition id="t044" x="795" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Aqueceu"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <event id="Aqueceu" x="795" y="95" mode="output"/>
  <arc id="a046" type="normal" source="p006" target="t044"/>
  <arc id="a048" type="read" source="t044" target="Aqueceu"/>
  <arc id="a049" type="normal" source="t044" target="p007"/>
  <transition id="t050" x="1015" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Lavou"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a051" type="normal" source="p007" target="t050"/>
  <component id="c052" class="timers/tON" x="955" y="245" width="60" height="80" shape="rect">
    <name text="tON" off_x="-30" off_y="-42"/>
    <input id="c052.in" name="in" type="boolean" off_x="-30" off_y="-30"/>
    <input id="c052.delay" name="delay" type="range" min="0" max="16384" off_x="-30" off_y="-10"/>
    <output id="c052.out" name="out" type="boolean" off_x="30" off_y="-30"/>
  </component>
  <arc id="a054" type="read" source="p007" target="c052.in" c1_x="0" c1_y="35" c2_x="-25" c2_y="0"/>
  <operation id="o055" x="860" y="235" constant="20" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="20"/>
    <output off_x="20" off_y="0" name="K" id="o055.K" type="range" min="20" max="20" dynamic="none">
      <expression>
        <text>20</text>
        <operand type="literal" value="20"/>
      </expression>
    </output>
  </operation>
  <arc id="a056" type="read" source="o055.K" target="c052.delay"/>
  <arc id="a057" type="read" source="c052.out" target="t050" c2_x="0" c2_y="35" c1_x="20" c1_y="0"/>
  <event id="Lavou" x="1015" y="95" mode="output"/>
  <arc id="a059" type="read" source="t050" target="Lavou"/>
  <arc id="a060" type="normal" source="t050" target="p008"/>
  <operation id="o062" x="1065" y="235" constant="10" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="10"/>
    <output off_x="20" off_y="0" name="K" id="o062.K" type="range" min="10" max="10" dynamic="none">
      <expression>
        <text>10</text>
        <operand type="literal" value="10"/>
      </expression>
    </output>
  </operation>
  <transition id="t065" x="1230" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Centrifugou"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a066" type="normal" source="p008" target="t065"/>
  <event id="Centrifugou" x="1230" y="95" mode="output"/>
  <arc id="a069" type="read" source="t065" target="Centrifugou"/>
  <arc id="a070" type="normal" source="t065" target="p009"/>
  <operation id="o071" x="1310" y="330" rot="0" shape="arrow" size="25" locked="true">
    <name text="NOT" off_x="-15" off_y="-6"/>
    <input id="o071.SensorMax" name="SensorMax" type="boolean" dynamic="name" off_x="-25" off_y="0"/>
    <output id="o071.out" name="out" type="boolean" off_x="25" off_y="0">
      <expression>
        <text>NOT(SensorMax)</text>
        <operand type="signal" idRef="SensorMax" neg="true"/>
      </expression>
    </output>
  </operation>
  <arc id="a072" type="read" source="SensorMax" target="o071.SensorMax" c1_x="5" c1_y="85" c2_x="-460" c2_y="-5"/>
  <transition id="t073" x="1400" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Baixou Maximo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a074" type="normal" source="p009" target="t073"/>
  <arc id="a075" type="read" source="o071.out" target="t073" c1_x="40" c1_y="0" c2_x="0" c2_y="105"/>
  <place id="p076" x="1495" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="Abaixo do Maximo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a077" type="normal" source="t073" target="p076"/>
  <component id="c078" class="timers/tOFF" x="1490" y="360" width="60" height="80" shape="rect">
    <name text="tOFF" off_x="-30" off_y="-42"/>
    <input id="c078.in" name="in" type="boolean" off_x="-30" off_y="-30"/>
    <input id="c078.delay" name="delay" type="range" min="0" max="16384" off_x="-30" off_y="-10"/>
    <output id="c078.out" name="out" type="boolean" off_x="30" off_y="-30"/>
  </component>
  <arc id="a079" type="read" source="o071.out" target="c078.in"/>
  <operation id="o080" x="1385" y="350" constant="1" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="1"/>
    <output off_x="20" off_y="0" name="K" id="o080.K" type="range" min="1" max="1" dynamic="none">
      <expression>
        <text>1</text>
        <operand type="literal" value="1"/>
      </expression>
    </output>
  </operation>
  <arc id="a081" type="read" source="o080.K" target="c078.delay"/>
  <operation id="o082" x="1615" y="410" rot="0" shape="arrow" size="25" locked="true">
    <name text="AND" off_x="-12" off_y="-5"/>
    <input id="o082.out_B_B" name="out_B_B" type="boolean" dynamic="name" off_x="-25" off_y="-10"/>
    <input id="o082.NOT" name="NOT" type="boolean" dynamic="name" off_x="-25" off_y="10"/>
    <output id="o082.out" name="out" type="boolean" off_x="25" off_y="0">
      <expression>
        <text>out_B_B AND NOT</text>
        <operand type="signal" idRef="out_B_B"/>
        <operator type="and"/>
        <operand type="signal" idRef="NOT"/>
      </expression>
    </output>
  </operation>
  <arc id="a084" type="read" source="c078.out" target="o082.out_B_B" c1_x="25" c1_y="0" c2_x="-40" c2_y="-5"/>
  <transition id="t086" x="1665" y="150" priority="0">
    <name off_x="-10" off_y="-10" text="Baixou Minimo"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a087" type="normal" source="p076" target="t086"/>
  <place id="p088" x="1770" y="150" init_marking="0">
    <name off_x="-10" off_y="-10" text="Desligar"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <event id="Vazou" x="1665" y="85" mode="output"/>
  <arc id="a090" type="read" source="t086" target="Vazou"/>
  <arc id="a091" type="normal" source="t086" target="p088"/>
  <arc id="a092" type="read" source="o082.out" target="t086" c1_x="20" c1_y="0" c2_x="0" c2_y="135"/>
  <operation id="o093" x="755" y="270" rot="0" shape="arrow" size="25" locked="true">
    <name text="=" off_x="-10" off_y="3"/>
    <input id="o093.Temperatura" name="Temperatura" type="range" dynamic="all" min="0" max="100" off_x="-25" off_y="-10" frac="0"/>
    <input id="o093.o094_K" name="o094_K" type="range" dynamic="all" min="90" max="90" off_x="-25" off_y="10"/>
    <output id="o093.out" name="out" type="boolean" off_x="25" off_y="0">
      <expression>
        <text>Temperatura = o094_K</text>
        <operand type="signal" idRef="Temperatura"/>
        <operator type="equal"/>
        <operand type="signal" idRef="o094_K"/>
      </expression>
    </output>
  </operation>
  <operation id="o094" x="675" y="280" constant="90" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="90"/>
    <output off_x="20" off_y="0" name="K" id="o094.K" type="range" min="90" max="90" dynamic="none">
      <expression>
        <text>90</text>
        <operand type="literal" value="90"/>
      </expression>
    </output>
  </operation>
  <arc id="a095" type="read" source="Temperatura" target="o093.Temperatura"/>
  <arc id="a096" type="read" source="o094.K" target="o093.o094_K"/>
  <arc id="a097" type="read" source="o093.out" target="t044" c1_x="15" c1_y="5" c2_x="0" c2_y="50"/>
  <operation id="o001" x="1310" y="420" rot="0" shape="arrow" size="25" locked="true">
    <name text="NOT" off_x="-15" off_y="-6"/>
    <input id="o001.SensorMin" name="SensorMin" type="boolean" dynamic="name" off_x="-25" off_y="0"/>
    <output id="o001.out" name="out" type="boolean" off_x="25" off_y="0">
      <expression>
        <text>NOT(SensorMin)</text>
        <operand type="signal" idRef="SensorMin" neg="true"/>
      </expression>
    </output>
  </operation>
  <arc id="a002" type="read" source="o001.out" target="o082.NOT"/>
  <arc id="a003" type="read" source="SensorMin" target="o001.SensorMin" c1_x="10" c1_y="145" c2_x="-565" c2_y="-10"/>
  <component id="c004" class="timers/tON" x="1165" y="245" width="60" height="80" shape="rect">
    <name text="tON" off_x="-30" off_y="-42"/>
    <input id="c004.in" name="in" type="boolean" off_x="-30" off_y="-30"/>
    <input id="c004.delay" name="delay" type="range" min="0" max="16384" off_x="-30" off_y="-10"/>
    <output id="c004.out" name="out" type="boolean" off_x="30" off_y="-30"/>
  </component>
  <arc id="a005" type="read" source="p008" target="c004.in" c1_x="-5" c1_y="35" c2_x="-25" c2_y="0"/>
  <arc id="a006" type="read" source="o062.K" target="c004.delay"/>
  <arc id="a007" type="read" source="c004.out" target="t065" c2_x="0" c2_y="40" c1_x="15" c1_y="0"/>
</net>
