<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE nta PUBLIC 'nta' 'http://www.brics.dk/~omoeller/hta/xml/uppaal-1.5.dtd'>

<nta>
  <declaration>// Clocks
clock  VVI_TIME;
clock  VVT_TIME;
clock  AVI_A_TIME;
clock  AVI_V_TIME;

clock  HEART_TIME;
clock  PROGRAMMER_TIME;


// Channels encoding Events
chan commandedOn; 
chan commandedOff; 
chan toIdle; 
chan toInhibited;
chan toTriggered;
chan toAVI;

chan APace;
chan VPace;

chan AVI_Refractory_Done;
chan AVI_APace;
chan AVI_APace_Done;
chan AVI_Sense_from_V;

urgent chan VentricularChamberSense;
//urgent chan AtrialChamberSense; // nobody is listening
urgent chan EnablePaceElectronics;
urgent chan DisablePaceElectronics;


// user interactions: Heart

urgent chan stopHeartBeat;
urgent chan startHeartBeat;

// diagnostic

int[0,1] wasSwitchedOff;

// ------------------------------ Auxiallry:

// anybody listening to VentricularChamberSense?
int[0,1] V_listening;
int[0,1] A_LISTENING_TO_V;

// -- Constant Parameters ------------------------------

const REFRACTORY_TIME 50;
const SENSE_TIMEOUT   15;

const HEART_DELAY_AFTER_V_CONTRACTION 50;
const HEART_DELAY_AFTER_A_CONTRACTION  5;

const HEART_ALLOWED_STOP_TIME 135;

const MODE_SWITCH_DELAY 66;

// ----------------------------------------------------------------------

const ALLOW_SWITCH_OFF 1;

// ----- Translation Slack ----- 
chan  xtSglNR4;
chan  HrtVCtrctENTRYtrhrtsm4;
chan  HrtACtrctENTRYtrhrtsm4;
chan  xtSglNR5;
chan  HrtDtlVCtrctENTRYtrhrtsm4Dtl5;
chan  HrtDtlACtrctENTRYtrhrtsm4Dtl5;
chan  xtSglNR3;
chan  PrgrmmrIdlENTRYtrprgrmmrsm3;
chan  PrgrmmrRdmENTRYtrprgrmmrsm3;
chan  PrgrmmrMdswtchENTRYtrprgrmmrsm3;
chan  xtSglNR2;
chan  PcAVIENTRYtrpcmkr2;
chan  PcVVIENTRYtrpcmkr2;
chan  PcVVTENTRYtrpcmkr2;
chan  PcIdlENTRYtrpcmkr2;
chan  PcOffENTRYtrpcmkr2;
chan  xtSglNR6;
chan  PcOdfltENTRYtrpcmkr2sbCmpt6;
chan  PcOIdlENTRYtrpcmkr2sbCmpt6;
chan  PcOVVIENTRYtrpcmkr2sbCmpt6;
chan  PcOVVTENTRYtrpcmkr2sbCmpt6;
chan  PcOAVIENTRYtrpcmkr2sbCmpt6;
chan  xtSglNR9;
chan  PcOAVIdfltENTRYtrpcmkr2sbCmpt6AVIMd9;
chan  PcOAVIdfltEITlvpcmkr2sbCmpt6AVIMd9;
chan  xtSglNR11;
chan  PcOAVIVPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9VPrt11;
chan  xtSglNR10;
chan  PcOAVIAPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9APrt10;
chan  xtSglNR8;
chan  PcOVVTdfltENTRYtrpcmkr2sbCmpt6VVTMd8;
chan  xtSglNR7;
chan  PcOVVIdfltENTRYtrpcmkr2sbCmpt6VVIMd7;
int  triggerVar1;
int  triggerVar2;
int  triggerVar3;
int  triggerVar4;
int  triggerVar5;
int  triggerVar7;
</declaration>
  <template>
    <name x="8" y="-24">globalKickoff12</name>
    <parameter x="296" y="-24" />
    <declaration />
    <location x="40" y="40" id="X_ID_57">
      <name x="60" y="20">start</name>
      <committed />
    </location>
    <location x="40" y="160" id="X_ID_58">
      <name x="64" y="136">L11</name>
      <committed />
    </location>
    <location x="352" y="160" id="X_ID_59">
      <name x="376" y="152">L12</name>
      <committed />
    </location>
    <location x="352" y="40" id="X_ID_60">
      <name x="336" y="0">L13</name>
    </location>
    <location x="696" y="40" id="X_ID_61">
      <name x="716" y="20">L14</name>
      <committed />
    </location>
    <init ref="X_ID_57" />
    <transition x="190" y="30">
      <source ref="X_ID_57" />
      <target ref="X_ID_58" />
      <label kind="synchronisation" x="56" y="88">PcAVIENTRYtrpcmkr2!</label>
    </transition>
    <transition x="180" y="180">
      <source ref="X_ID_58" />
      <target ref="X_ID_59" />
      <label kind="synchronisation" x="56" y="184">PrgrmmrMdswtchENTRYtrprgrmmrsm3!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_59" />
      <target ref="X_ID_60" />
      <label kind="synchronisation" x="360" y="112">HrtACtrctENTRYtrhrtsm4!</label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_60" />
      <target ref="X_ID_61" />
      <label kind="guard" x="472" y="56">triggerVar1 == 1</label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_61" />
      <target ref="X_ID_60" />
      <label kind="synchronisation" x="416" y="-32">xtSglNR3!</label>
      <nail x="536" y="-16" />
    </transition>
  </template>
  <template>
    <name x="-288" y="400">pacemaker2subComponent6AVIMode9VPart11</name>
    <parameter x="312" y="400" />
    <declaration />
    <location x="0" y="192" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION">
      <name x="-128" y="208">Refractory</name>
      <label kind="invariant" x="20" y="212" />
    </location>
    <location x="448" y="192" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION">
      <name x="464" y="160">Waiting</name>
      <label kind="invariant" x="468" y="212" />
    </location>
    <location x="448" y="320" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION">
      <name x="328" y="344">WaitingAU</name>
      <label kind="invariant" x="328" y="376">AVI_V_TIME &lt;= 0</label>
    </location>
    <location x="232" y="-8" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION">
      <name x="264" y="-24">APacing</name>
      <label kind="invariant" x="252" y="12" />
    </location>
    <location x="0" y="64" id="X_ID_41">
      <name x="20" y="44">IDLE</name>
    </location>
    <init ref="X_ID_41" />
    <transition x="180" y="180">
      <source ref="X_ID_41" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION" />
      <label kind="synchronisation" x="-568" y="8">PcOAVIVPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9VPrt11?</label>
      <label kind="assignment" x="-568" y="40">triggerVar7 := triggerVar7 + 1 </label>
      <nail x="-72" y="40" />
      <nail x="-144" y="40" />
    </transition>
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <label kind="synchronisation" x="120" y="160">AVI_Refractory_Done?</label>
      <label kind="assignment" x="120" y="200">V_listening := 1</label>
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION" />
      <label kind="synchronisation" x="184" y="240">VentricularChamberSense?</label>
      <label kind="assignment" x="192" y="272">AVI_V_TIME := 0, V_listening := 0</label>
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <label kind="guard" x="528" y="248">A_LISTENING_TO_V == 0</label>
      <label kind="assignment" x="528" y="216">V_listening := 1</label>
      <nail x="520" y="272" />
      <nail x="520" y="224" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <label kind="synchronisation" x="608" y="320">AVI_Sense_from_V!</label>
      <label kind="assignment" x="608" y="352">V_listening := 1</label>
      <nail x="848" y="304" />
      <nail x="912" y="240" />
      <nail x="848" y="192" />
    </transition>
    <transition x="490" y="70">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION" />
      <label kind="synchronisation" x="312" y="88">AVI_APace?</label>
      <label kind="assignment" x="312" y="56">V_listening := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION" />
      <label kind="synchronisation" x="88" y="120">AVI_APace_Done?</label>
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="-128" y="136">xtSglNR11?</label>
      <label kind="assignment" x="-280" y="104">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="0" y="120" />
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="576" y="80">xtSglNR11?</label>
      <label kind="assignment" x="576" y="48">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="560" y="112" />
      <nail x="560" y="0" />
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="-64" y="296">xtSglNR11?</label>
      <label kind="assignment" x="-64" y="328">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="64" y="320" />
      <nail x="32" y="232" />
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="-24" y="-48">xtSglNR11?</label>
      <label kind="assignment" x="-24" y="-80">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="120" y="-40" />
    </transition>
  </template>
  <template>
    <name x="-128" y="-96">pacemaker2subComponent6AVIMode9APart10</name>
    <parameter x="512" y="-96" />
    <declaration />
    <location x="8" y="256" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION">
      <name x="-168" y="240">Refractory</name>
      <label kind="invariant" x="-464" y="288">AVI_A_TIME &lt;= REFRACTORY_TIME</label>
    </location>
    <location x="576" y="256" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION">
      <name x="600" y="272">Waiting</name>
      <label kind="invariant" x="600" y="304">AVI_A_TIME &lt;= SENSE_TIMEOUT</label>
    </location>
    <location x="480" y="80" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION">
      <name x="512" y="72">APacing</name>
      <label kind="invariant" x="512" y="40">AVI_A_TIME &lt;= 0</label>
    </location>
    <location x="424" y="-32" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing_AUX.LOCATION">
      <name x="448" y="-64">APacingAU</name>
      <label kind="invariant" x="448" y="-96">AVI_A_TIME &lt;= 0</label>
    </location>
    <location x="8" y="32" id="X_ID_46">
      <name x="-16" y="-8">IDLE</name>
    </location>
    <init ref="X_ID_46" />
    <transition x="180" y="180">
      <source ref="X_ID_46" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION" />
      <label kind="synchronisation" x="-424" y="-64">PcOAVIAPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9APrt10?</label>
      <label kind="assignment" x="-424" y="-32">triggerVar7 := triggerVar7 + 1 </label>
      <nail x="-80" y="-8" />
      <nail x="-136" y="-8" />
    </transition>
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <label kind="guard" x="80" y="272">AVI_A_TIME == REFRACTORY_TIME</label>
      <label kind="synchronisation" x="80" y="304">AVI_Refractory_Done!</label>
      <label kind="assignment" x="80" y="336">A_LISTENING_TO_V := 1, AVI_A_TIME := 0</label>
    </transition>
    <transition x="340" y="20">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <label kind="synchronisation" x="704" y="216">AVI_Sense_from_V?</label>
      <label kind="assignment" x="704" y="248">AVI_A_TIME := 0</label>
      <nail x="672" y="216" />
      <nail x="680" y="256" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION" />
      <label kind="guard" x="568" y="152">AVI_A_TIME == SENSE_TIMEOUT</label>
      <label kind="synchronisation" x="568" y="184">APace!</label>
      <label kind="assignment" x="568" y="120">A_LISTENING_TO_V := 0, AVI_A_TIME := 0</label>
    </transition>
    <transition x="330" y="230">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing_AUX.LOCATION" />
      <label kind="synchronisation" x="464" y="8">AVI_APace!</label>
      <label kind="assignment" x="464" y="-24">AVI_A_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing_AUX.LOCATION" />
      <target ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION" />
      <label kind="synchronisation" x="72" y="144">AVI_APace_Done!</label>
      <label kind="assignment" x="-132" y="64">AVI_A_TIME := 0</label>
      <nail x="64" y="128" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="-272" y="144">xtSglNR10?</label>
      <label kind="assignment" x="-272" y="112">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="8" y="168" />
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="168" y="200">xtSglNR10?</label>
      <label kind="assignment" x="168" y="176">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="424" y="160" />
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="152" y="112">xtSglNR10?</label>
      <label kind="assignment" x="152" y="80">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="264" y="80" />
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing_AUX.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="112" y="24">xtSglNR10?</label>
      <label kind="assignment" x="112" y="-8">triggerVar7 := triggerVar7 - 1 </label>
      <nail x="256" y="8" />
    </transition>
  </template>
  <template>
    <name x="0" y="0">pacemaker2subComponent6AVIMode9</name>
    <parameter x="600" y="0" />
    <declaration />
    <location x="128" y="128" id="X_ID_33">
      <name x="144" y="96">IDLE</name>
    </location>
    <location x="440" y="128" id="X_ID_34">
      <name x="460" y="108">ACTIVE</name>
    </location>
    <location x="128" y="288" id="X_ID_35">
      <name x="136" y="240">pacemaker2subComponent6AVIMode9PaceOnAVIdefaultENTRYfork1</name>
      <committed />
    </location>
    <location x="440" y="288" id="X_ID_36">
      <name x="464" y="272">pacemaker2subComponent6AVIMode9PaceOnAVIdefaultENTRYfork2</name>
      <committed />
    </location>
    <init ref="X_ID_33" />
    <transition x="490" y="70">
      <source ref="X_ID_36" />
      <target ref="X_ID_34" />
      <label kind="synchronisation" x="456" y="192">PcOAVIVPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9VPrt11!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_35" />
      <target ref="X_ID_36" />
      <label kind="synchronisation" x="16" y="328">PcOAVIAPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9APrt10!</label>
    </transition>
    <transition x="30" y="190">
      <source ref="X_ID_33" />
      <target ref="X_ID_35" />
      <label kind="synchronisation" x="-8" y="40">PcOAVIdfltENTRYtrpcmkr2sbCmpt6AVIMd9?</label>
      <nail x="96" y="80" />
      <nail x="56" y="80" />
    </transition>
    <transition x="190" y="30">
      <source ref="X_ID_34" />
      <target ref="X_ID_33" />
      <label kind="synchronisation" x="240" y="96">xtSglNR9?</label>
    </transition>
  </template>
  <template>
    <name x="0" y="0">pacemaker2subComponent6VVTMode8</name>
    <parameter x="600" y="0" />
    <declaration />
    <location x="320" y="512" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory">
      <name x="344" y="480">Refractory</name>
      <label kind="invariant" x="-128" y="536">VVT_TIME &lt;= REFRACTORY_TIME</label>
    </location>
    <location x="840" y="512" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense">
      <name x="840" y="536">WaitingforSense</name>
      <label kind="invariant" x="840" y="568">VVT_TIME &lt;= SENSE_TIMEOUT</label>
    </location>
    <location x="840" y="384" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX">
      <name x="860" y="364">WaitingforSenseAU</name>
      <label kind="invariant" x="856" y="328">VVT_TIME &lt;= 0</label>
    </location>
    <location x="608" y="200" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing">
      <name x="628" y="180">Pacing</name>
      <label kind="invariant" x="624" y="152">VVT_TIME &lt;= 0</label>
    </location>
    <location x="320" y="320" id="X_ID_51">
      <name x="340" y="300">IDLE</name>
    </location>
    <init ref="X_ID_51" />
    <transition x="180" y="180">
      <source ref="X_ID_51" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <label kind="synchronisation" x="-128" y="240">PcOVVTdfltENTRYtrpcmkr2sbCmpt6VVTMd8?</label>
      <label kind="assignment" x="-128" y="272">triggerVar5 := triggerVar5 + 1 </label>
      <nail x="255" y="294" />
      <nail x="208" y="280" />
    </transition>
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <label kind="guard" x="368" y="528">VVT_TIME == REFRACTORY_TIME</label>
      <label kind="assignment" x="368" y="560">VVT_TIME := 0, V_listening := 1</label>
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX" />
      <label kind="synchronisation" x="848" y="456">VentricularChamberSense?</label>
      <label kind="assignment" x="1048" y="496">VVT_TIME := 0,V_listening := 0</label>
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX" />
      <label kind="guard" x="1048" y="528">VVT_TIME == SENSE_TIMEOUT</label>
      <label kind="assignment" x="848" y="424">VVT_TIME := 0, V_listening := 0</label>
      <nail x="1032" y="512" />
      <nail x="1032" y="464" />
    </transition>
    <transition x="330" y="230">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing" />
      <label kind="synchronisation" x="752" y="280">VPace!</label>
      <label kind="assignment" x="752" y="248">VVT_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <nail x="352" y="384" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="224" y="384">xtSglNR8?</label>
      <label kind="assignment" x="40" y="408">triggerVar5 := triggerVar5 - 1 </label>
      <nail x="320" y="400" />
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="608" y="408">xtSglNR8?</label>
      <label kind="assignment" x="440" y="440">triggerVar5 := triggerVar5 - 1 </label>
      <nail x="720" y="416" />
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="664" y="352">xtSglNR8?</label>
      <label kind="assignment" x="472" y="320">triggerVar5 := triggerVar5 - 1 </label>
      <nail x="736" y="384" />
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="400" y="184">xtSglNR8?</label>
      <label kind="assignment" x="280" y="152">triggerVar5 := triggerVar5 - 1 </label>
    </transition>
  </template>
  <template>
    <name x="0" y="0">pacemaker2subComponent6VVIMode7</name>
    <parameter x="600" y="0" />
    <declaration />
    <location x="320" y="512" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory">
      <name x="168" y="496">Refractory</name>
      <label kind="invariant" x="-64" y="544">VVI_TIME &lt;= REFRACTORY_TIME</label>
    </location>
    <location x="864" y="512" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense">
      <name x="896" y="544">WaitingforSense</name>
      <label kind="invariant" x="896" y="576">VVI_TIME &lt;= SENSE_TIMEOUT</label>
    </location>
    <location x="864" y="320" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX">
      <name x="888" y="312">WaitingforSenseAU</name>
      <label kind="invariant" x="888" y="280">VVI_TIME &lt;= 0</label>
    </location>
    <location x="616" y="192" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing">
      <name x="648" y="176">Pacing</name>
      <label kind="invariant" x="648" y="144">VVI_TIME &lt;= 0</label>
    </location>
    <location x="320" y="320" id="X_ID_56">
      <name x="304" y="272">IDLE</name>
    </location>
    <init ref="X_ID_56" />
    <transition x="180" y="180">
      <source ref="X_ID_56" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
      <label kind="synchronisation" x="-56" y="216">PcOVVIdfltENTRYtrpcmkr2sbCmpt6VVIMd7?</label>
      <label kind="assignment" x="-56" y="248">triggerVar4 := triggerVar4 + 1 </label>
      <nail x="248" y="272" />
      <nail x="216" y="280" />
    </transition>
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <label kind="guard" x="424" y="536">VVI_TIME == REFRACTORY_TIME</label>
      <label kind="assignment" x="424" y="568">VVI_TIME := 0, V_listening := 1</label>
    </transition>
    <transition x="340" y="20">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <label kind="synchronisation" x="976" y="512">VentricularChamberSense?</label>
      <label kind="assignment" x="1064" y="480">VVI_TIME := 0</label>
      <nail x="960" y="448" />
      <nail x="1048" y="496" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX" />
      <label kind="guard" x="872" y="392">VVI_TIME == SENSE_TIMEOUT</label>
      <label kind="assignment" x="872" y="368">VVI_TIME := 0, V_listening := 0</label>
    </transition>
    <transition x="330" y="230">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing" />
      <label kind="synchronisation" x="760" y="240">VPace!</label>
      <label kind="assignment" x="704" y="216">VVI_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
    </transition>
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="224" y="392">xtSglNR7?</label>
      <label kind="assignment" x="40" y="424">triggerVar4 := triggerVar4 - 1 </label>
      <nail x="320" y="416" />
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="504" y="432">xtSglNR7?</label>
      <label kind="assignment" x="504" y="400">triggerVar4 := triggerVar4 - 1 </label>
      <nail x="456" y="448" />
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="512" y="360">xtSglNR7?</label>
      <label kind="assignment" x="512" y="328">triggerVar4 := triggerVar4 - 1 </label>
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="472" y="176">xtSglNR7?</label>
      <label kind="assignment" x="296" y="144">triggerVar4 := triggerVar4 - 1 </label>
    </transition>
  </template>
  <template>
    <name x="-152" y="-72">pacemaker2subComponent6</name>
    <parameter x="288" y="-80" />
    <declaration />
    <location x="224" y="-24" id="pacemaker2subComponent6Pace.On.Idle">
      <name x="244" y="-44">Idle</name>
      <label kind="invariant" x="244" y="-4" />
    </location>
    <location x="224" y="512" id="X_ID_26">
      <name x="248" y="504">VVIMode</name>
    </location>
    <location x="64" y="512" id="X_ID_27">
      <name x="84" y="492">L8</name>
      <committed />
    </location>
    <location x="672" y="416" id="X_ID_28">
      <name x="712" y="408">VVTMode</name>
    </location>
    <location x="456" y="416" id="X_ID_29">
      <name x="476" y="396">L9</name>
      <committed />
    </location>
    <location x="808" y="0" id="X_ID_30">
      <name x="828" y="-20">AVIMode</name>
    </location>
    <location x="576" y="0" id="X_ID_31">
      <name x="596" y="-20">L10</name>
      <committed />
    </location>
    <location x="224" y="224" id="X_ID_32">
      <name x="244" y="204">IDLE</name>
    </location>
    <init ref="X_ID_32" />
    <transition x="180" y="180">
      <source ref="X_ID_27" />
      <target ref="X_ID_26" />
      <label kind="synchronisation" x="-72" y="544">PcOVVIdfltENTRYtrpcmkr2sbCmpt6VVIMd7!</label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_29" />
      <target ref="X_ID_28" />
      <label kind="synchronisation" x="376" y="440">PcOVVTdfltENTRYtrpcmkr2sbCmpt6VVTMd8!</label>
    </transition>
    <transition x="530" y="250">
      <source ref="X_ID_31" />
      <target ref="X_ID_30" />
      <label kind="synchronisation" x="520" y="-56">PcOAVIdfltENTRYtrpcmkr2sbCmpt6AVIMd9!</label>
    </transition>
    <transition x="780" y="140">
      <source ref="X_ID_32" />
      <target ref="X_ID_31" />
      <label kind="synchronisation" x="432" y="128">PcOAVIENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="432" y="96">AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="470" y="370">
      <source ref="X_ID_32" />
      <target ref="X_ID_29" />
      <label kind="synchronisation" x="376" y="296">PcOVVTENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="376" y="328">VVT_TIME := 0</label>
    </transition>
    <transition x="320" y="380">
      <source ref="X_ID_32" />
      <target ref="X_ID_27" />
      <label kind="synchronisation" x="-232" y="88">PcOVVIENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="-232" y="120">VVI_TIME := 0</label>
      <nail x="64" y="112" />
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_32" />
      <target ref="pacemaker2subComponent6Pace.On.Idle" />
      <label kind="synchronisation" x="-232" y="0">PcOIdlENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="-232" y="-32">triggerVar3 := triggerVar3 + 1 </label>
      <nail x="136" y="-24" />
    </transition>
    <transition x="320" y="380">
      <source ref="X_ID_32" />
      <target ref="X_ID_27" />
      <label kind="synchronisation" x="-160" y="304">PcOdfltENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="-160" y="336">VVI_TIME := 0</label>
      <nail x="152" y="344" />
    </transition>
    <transition x="330" y="230">
      <source ref="pacemaker2subComponent6Pace.On.Idle" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="232" y="8">xtSglNR6?</label>
      <label kind="assignment" x="232" y="40">triggerVar3 := triggerVar3 - 1 </label>
      <nail x="224" y="48" />
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_26" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="240" y="400">xtSglNR6?</label>
    </transition>
    <transition x="630" y="270">
      <source ref="X_ID_28" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="536" y="240">xtSglNR6?</label>
      <nail x="672" y="224" />
    </transition>
    <transition x="370" y="530">
      <source ref="X_ID_30" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="536" y="192">xtSglNR6?</label>
      <nail x="808" y="192" />
    </transition>
  </template>
  <template>
    <name x="-160" y="-256">heartsim4Detail5</name>
    <parameter x="144" y="-256" />
    <declaration />
    <location x="320" y="-72" id="heartsim4Detail5Heart.Detail.VContraction">
      <name x="336" y="-64">VContraction</name>
      <label kind="invariant" x="336" y="-32">HEART_TIME &lt;= 0</label>
    </location>
    <location x="320" y="424" id="heartsim4Detail5Heart.Detail.AContraction">
      <name x="336" y="432">AContraction</name>
      <label kind="invariant" x="336" y="464">HEART_TIME &lt;= 0</label>
    </location>
    <location x="736" y="-72" id="heartsim4Detail5Heart.Detail.VContracted">
      <name x="712" y="-120">AfterVContraction</name>
      <label kind="invariant" x="712" y="-152">HEART_TIME &lt;= HEART_DELAY_AFTER_V_CONTRACTION</label>
    </location>
    <location x="736" y="424" id="heartsim4Detail5Heart.Detail.AContracted">
      <name x="736" y="384">AfterAContraction</name>
      <label kind="invariant" x="608" y="440">HEART_TIME &lt;= HEART_DELAY_AFTER_A_CONTRACTION</label>
    </location>
    <location x="896" y="128" id="heartsim4Detail5Heart.Detail.Stopped">
      <name x="904" y="80">Stopped</name>
      <label kind="invariant" x="928" y="112">HEART_TIME &lt;= HEART_ALLOWED_STOP_TIME</label>
    </location>
    <location x="984" y="248" id="heartsim4Detail5Heart.Detail.Flatline">
      <name x="1008" y="256">Flatline</name>
      <label kind="invariant" x="1004" y="268" />
    </location>
    <location x="320" y="128" id="X_ID_11">
      <name x="336" y="88">IDLE</name>
    </location>
    <init ref="X_ID_11" />
    <transition x="640" y="-60">
      <source ref="X_ID_11" />
      <target ref="heartsim4Detail5Heart.Detail.AContraction" />
      <label kind="synchronisation" x="-48" y="176">HrtDtlACtrctENTRYtrhrtsm4Dtl5?</label>
      <label kind="assignment" x="-48" y="216">triggerVar2 := triggerVar2 + 1 </label>
      <nail x="248" y="128" />
    </transition>
    <transition x="490" y="-50">
      <source ref="X_ID_11" />
      <target ref="heartsim4Detail5Heart.Detail.VContraction" />
      <label kind="synchronisation" x="-96" y="-136">HrtDtlVCtrctENTRYtrhrtsm4Dtl5?</label>
      <label kind="assignment" x="-96" y="-96">triggerVar2 := triggerVar2 + 1 </label>
      <nail x="232" y="-128" />
    </transition>
    <transition x="490" y="70">
      <source ref="heartsim4Detail5Heart.Detail.AContraction" />
      <target ref="heartsim4Detail5Heart.Detail.AContracted" />
    </transition>
    <transition x="340" y="80">
      <source ref="heartsim4Detail5Heart.Detail.AContracted" />
      <target ref="heartsim4Detail5Heart.Detail.VContraction" />
      <label kind="guard" x="848" y="360">HEART_TIME == HEART_DELAY_AFTER_A_CONTRACTION</label>
      <label kind="assignment" x="848" y="-248">HEART_TIME := 0</label>
      <nail x="1480" y="424" />
      <nail x="1480" y="-224" />
      <nail x="320" y="-224" />
    </transition>
    <transition x="30" y="190">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="heartsim4Detail5Heart.Detail.VContracted" />
      <label kind="guard" x="456" y="-96">V_listening == 0</label>
    </transition>
    <transition x="30" y="190">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="heartsim4Detail5Heart.Detail.VContracted" />
      <label kind="guard" x="456" y="-160">V_listening == 1</label>
      <label kind="synchronisation" x="456" y="-192">VentricularChamberSense!</label>
      <nail x="448" y="-136" />
      <nail x="608" y="-136" />
    </transition>
    <transition x="180" y="180">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="heartsim4Detail5Heart.Detail.AContraction" />
      <label kind="guard" x="880" y="-96">HEART_TIME == HEART_DELAY_AFTER_V_CONTRACTION</label>
      <label kind="assignment" x="784" y="512">HEART_TIME := 0</label>
      <nail x="1448" y="-72" />
      <nail x="1448" y="544" />
      <nail x="320" y="544" />
    </transition>
    <transition x="170" y="330">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="heartsim4Detail5Heart.Detail.Stopped" />
      <label kind="assignment" x="816" y="0">HEART_TIME := 0</label>
    </transition>
    <transition x="220" y="480">
      <source ref="heartsim4Detail5Heart.Detail.Stopped" />
      <target ref="heartsim4Detail5Heart.Detail.Flatline" />
      <label kind="guard" x="928" y="152">HEART_TIME == HEART_ALLOWED_STOP_TIME</label>
      <label kind="assignment" x="960" y="184">HEART_TIME := 0</label>
    </transition>
    <transition x="490" y="-50">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="328" y="0">xtSglNR5?</label>
      <label kind="assignment" x="328" y="32">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="320" y="16" />
    </transition>
    <transition x="640" y="-60">
      <source ref="heartsim4Detail5Heart.Detail.AContraction" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="40" y="360">xtSglNR5?</label>
      <label kind="assignment" x="40" y="328">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="320" y="268" />
    </transition>
    <transition x="480" y="100">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="416" y="72">xtSglNR5?</label>
      <label kind="assignment" x="416" y="96">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="704" y="128" />
    </transition>
    <transition x="790" y="-10">
      <source ref="heartsim4Detail5Heart.Detail.AContracted" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="384" y="344">xtSglNR5?</label>
      <label kind="assignment" x="384" y="376">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="400" y="392" />
    </transition>
    <transition x="630" y="90">
      <source ref="heartsim4Detail5Heart.Detail.Stopped" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="448" y="168">xtSglNR5?</label>
      <label kind="assignment" x="448" y="192">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="704" y="224" />
      <nail x="432" y="224" />
    </transition>
    <transition x="530" y="250">
      <source ref="heartsim4Detail5Heart.Detail.Flatline" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="360" y="272">xtSglNR5?</label>
      <label kind="assignment" x="360" y="300">triggerVar2 := triggerVar2 - 1 </label>
      <nail x="624" y="332" />
      <nail x="352" y="332" />
    </transition>
  </template>
  <template>
    <name x="0" y="0">heartsim4</name>
    <parameter x="224" y="0" />
    <declaration />
    <location x="672" y="424" id="X_ID_1">
      <name x="688" y="392">Detail</name>
    </location>
    <location x="192" y="352" id="X_ID_2">
      <name x="200" y="312">L1</name>
      <committed />
    </location>
    <location x="192" y="480" id="X_ID_3">
      <name x="192" y="504">L2</name>
      <committed />
    </location>
    <location x="192" y="160" id="X_ID_4">
      <name x="208" y="120">IDLE</name>
    </location>
    <location x="672" y="624" id="X_ID_62">
      <name x="692" y="604">L15</name>
      <committed />
    </location>
    <location x="672" y="224" id="X_ID_63">
      <name x="692" y="204">L16</name>
      <committed />
    </location>
    <init ref="X_ID_4" />
    <transition x="190" y="30">
      <source ref="X_ID_2" />
      <target ref="X_ID_1" />
      <label kind="synchronisation" x="216" y="368">HrtDtlVCtrctENTRYtrhrtsm4Dtl5!</label>
    </transition>
    <transition x="30" y="190">
      <source ref="X_ID_3" />
      <target ref="X_ID_1" />
      <label kind="synchronisation" x="216" y="448">HrtDtlACtrctENTRYtrhrtsm4Dtl5!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_4" />
      <target ref="X_ID_3" />
      <label kind="synchronisation" x="-64" y="64">HrtACtrctENTRYtrhrtsm4?</label>
      <label kind="assignment" x="-96" y="104">HEART_TIME := 0</label>
      <nail x="136" y="120" />
      <nail x="88" y="128" />
    </transition>
    <transition x="490" y="70">
      <source ref="X_ID_4" />
      <target ref="X_ID_2" />
      <label kind="synchronisation" x="200" y="184">HrtVCtrctENTRYtrhrtsm4?</label>
      <label kind="assignment" x="200" y="216">HEART_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="X_ID_1" />
      <target ref="X_ID_4" />
      <label kind="synchronisation" x="520" y="104">xtSglNR4?</label>
      <nail x="864" y="424" />
      <nail x="864" y="160" />
      <nail x="384" y="128" />
    </transition>
    <transition x="180" y="180">
      <source ref="X_ID_1" />
      <target ref="X_ID_62" />
      <label kind="guard" x="680" y="480">triggerVar2 == 1</label>
      <label kind="synchronisation" x="680" y="448">APace?</label>
      <label kind="assignment" x="680" y="512">HEART_TIME := 0, HEART_TIME := 0</label>
    </transition>
    <transition x="170" y="330">
      <source ref="X_ID_62" />
      <target ref="X_ID_3" />
      <label kind="synchronisation" x="448" y="520">xtSglNR5!</label>
    </transition>
    <transition x="80" y="340">
      <source ref="X_ID_1" />
      <target ref="X_ID_63" />
      <label kind="guard" x="680" y="320">triggerVar2 == 1</label>
      <label kind="synchronisation" x="680" y="352">VPace?</label>
      <label kind="assignment" x="680" y="288">HEART_TIME := 0, HEART_TIME := 0</label>
    </transition>
    <transition x="230" y="330">
      <source ref="X_ID_63" />
      <target ref="X_ID_2" />
      <label kind="synchronisation" x="456" y="288">xtSglNR5!</label>
    </transition>
  </template>
  <template>
    <name x="0" y="0">programmersim3</name>
    <parameter x="600" y="0" />
    <declaration />
    <location x="664" y="304" id="programmersim3Programmer.Idle">
      <name x="684" y="284">Idle</name>
      <label kind="invariant" x="684" y="324" />
    </location>
    <location x="664" y="192" id="programmersim3Programmer.Random">
      <name x="624" y="216">Random</name>
      <label kind="invariant" x="684" y="212" />
    </location>
    <location x="320" y="480" id="programmersim3Programmer.Modeswitch">
      <name x="152" y="472">Modeswitch</name>
      <label kind="invariant" x="340" y="500" />
    </location>
    <location x="1048" y="480" id="programmersim3Programmer.Modeswitch.Delay">
      <name x="1072" y="472">ModeswitchDelay</name>
      <label kind="invariant" x="888" y="424">PROGRAMMER_TIME &lt;= MODE_SWITCH_DELAY</label>
    </location>
    <location x="320" y="280" id="X_ID_16">
      <name x="224" y="296">IDLE</name>
    </location>
    <init ref="X_ID_16" />
    <transition x="170" y="330">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Modeswitch" />
      <label kind="synchronisation" x="-200" y="240">PrgrmmrMdswtchENTRYtrprgrmmrsm3?</label>
      <label kind="assignment" x="-200" y="272">triggerVar1 := triggerVar1 + 1 </label>
      <nail x="216" y="244" />
    </transition>
    <transition x="330" y="170">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="160" y="136">PrgrmmrRdmENTRYtrprgrmmrsm3?</label>
      <nail x="352" y="172" />
    </transition>
    <transition x="180" y="180">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Idle" />
      <label kind="synchronisation" x="380" y="248">PrgrmmrIdlENTRYtrprgrmmrsm3?</label>
      <nail x="524" y="268" />
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="712" y="48">commandedOn!</label>
      <nail x="784" y="80" />
      <nail x="784" y="160" />
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="guard" x="216" y="96">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="480" y="48">commandedOff!</label>
      <nail x="672" y="80" />
      <nail x="752" y="80" />
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="800" y="192">toInhibited!</label>
      <nail x="560" y="80" />
      <nail x="640" y="80" />
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="800" y="120">toTriggered!</label>
      <nail x="784" y="240" />
      <nail x="784" y="176" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="352" y="592">toInhibited!</label>
      <label kind="assignment" x="544" y="640">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="668" y="480" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="352" y="632">toTriggered!</label>
      <label kind="assignment" x="544" y="688">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="384" y="528" />
      <nail x="1024" y="528" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="guard" x="432" y="520">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="352" y="448">commandedOff!</label>
      <label kind="assignment" x="544" y="448">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="384" y="576" />
      <nail x="1024" y="576" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="352" y="544">commandedOn!</label>
      <label kind="assignment" x="544" y="496">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="384" y="624" />
      <nail x="1024" y="624" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="352" y="688">toAVI!</label>
      <label kind="assignment" x="544" y="544">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="384" y="672" />
      <nail x="1024" y="672" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="guard" x="432" y="472">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="352" y="488">toIdle!</label>
      <label kind="assignment" x="544" y="592">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
      <nail x="384" y="720" />
      <nail x="1024" y="720" />
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch.Delay" />
      <target ref="programmersim3Programmer.Modeswitch" />
      <label kind="guard" x="632" y="392">PROGRAMMER_TIME == MODE_SWITCH_DELAY</label>
      <label kind="assignment" x="632" y="360">triggerVar1 := triggerVar1 + 1 </label>
      <nail x="1048" y="416" />
      <nail x="416" y="416" />
    </transition>
    <transition x="170" y="330">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="X_ID_16" />
      <label kind="synchronisation" x="328" y="352">xtSglNR3?</label>
      <label kind="assignment" x="328" y="320">triggerVar1 := triggerVar1 - 1 </label>
      <nail x="320" y="364" />
    </transition>
  </template>
  <template>
    <name x="-216" y="-104">pacemaker2</name>
    <parameter x="16" y="-104" />
    <declaration />
    <location x="1544" y="96" id="pacemaker2Pace.Off">
      <name x="1568" y="112">Off</name>
      <label kind="invariant" x="1564" y="116" />
    </location>
    <location x="768" y="80" id="X_ID_18">
      <name x="552" y="64">subComponent</name>
    </location>
    <location x="1360" y="-192" id="X_ID_19">
      <name x="1380" y="-212">L3</name>
      <committed />
    </location>
    <location x="248" y="-104" id="X_ID_20">
      <name x="184" y="-128">L4</name>
      <committed />
    </location>
    <location x="232" y="224" id="X_ID_21">
      <name x="176" y="224">L5</name>
      <committed />
    </location>
    <location x="240" y="528" id="X_ID_22">
      <name x="176" y="528">L6</name>
      <committed />
    </location>
    <location x="248" y="-448" id="X_ID_23">
      <name x="176" y="-456">L7</name>
      <committed />
    </location>
    <location x="-56" y="8" id="X_ID_24">
      <name x="-16" y="8">IDLE</name>
    </location>
    <location x="1200" y="-40" id="X_ID_64">
      <name x="1220" y="-60">L17</name>
      <committed />
    </location>
    <location x="400" y="-136" id="X_ID_65">
      <name x="420" y="-156">L18</name>
      <committed />
    </location>
    <location x="376" y="224" id="X_ID_66">
      <name x="396" y="204">L19</name>
      <committed />
    </location>
    <location x="552" y="528" id="X_ID_67">
      <name x="572" y="508">L20</name>
      <committed />
    </location>
    <location x="520" y="-448" id="X_ID_68">
      <name x="540" y="-468">L21</name>
      <committed />
    </location>
    <location x="1104" y="56" id="X_ID_69">
      <name x="1096" y="24">L22</name>
      <committed />
    </location>
    <location x="1264" y="56" id="X_ID_70">
      <name x="1284" y="36">L23</name>
      <committed />
    </location>
    <location x="520" y="-312" id="X_ID_71">
      <name x="540" y="-332">L24</name>
      <committed />
    </location>
    <location x="408" y="-312" id="X_ID_72">
      <name x="428" y="-332">L25</name>
      <committed />
    </location>
    <location x="408" y="320" id="X_ID_73">
      <name x="428" y="300">L26</name>
      <committed />
    </location>
    <location x="320" y="320" id="X_ID_74">
      <name x="340" y="300">L27</name>
      <committed />
    </location>
    <location x="616" y="616" id="X_ID_75">
      <name x="584" y="584">L28</name>
      <committed />
    </location>
    <location x="448" y="616" id="X_ID_76">
      <name x="468" y="596">L29</name>
      <committed />
    </location>
    <location x="536" y="-608" id="X_ID_77">
      <name x="556" y="-628">L30</name>
      <committed />
    </location>
    <location x="408" y="-608" id="X_ID_78">
      <name x="428" y="-628">L31</name>
      <committed />
    </location>
    <location x="1112" y="136" id="X_ID_79">
      <name x="1096" y="104">L32</name>
      <committed />
    </location>
    <location x="1264" y="136" id="X_ID_80">
      <name x="1284" y="116">L33</name>
      <committed />
    </location>
    <location x="504" y="-216" id="X_ID_81">
      <name x="524" y="-236">L34</name>
      <committed />
    </location>
    <location x="408" y="-216" id="X_ID_82">
      <name x="428" y="-236">L35</name>
      <committed />
    </location>
    <location x="440" y="400" id="X_ID_83">
      <name x="460" y="380">L36</name>
      <committed />
    </location>
    <location x="312" y="400" id="X_ID_84">
      <name x="332" y="380">L37</name>
      <committed />
    </location>
    <location x="648" y="680" id="X_ID_85">
      <name x="668" y="660">L38</name>
      <committed />
    </location>
    <location x="448" y="680" id="X_ID_86">
      <name x="468" y="660">L39</name>
      <committed />
    </location>
    <location x="576" y="-680" id="X_ID_87">
      <name x="596" y="-700">L40</name>
      <committed />
    </location>
    <location x="408" y="-680" id="X_ID_88">
      <name x="428" y="-700">L41</name>
      <committed />
    </location>
    <location x="1040" y="216" id="X_ID_89">
      <name x="1060" y="196">L42</name>
      <committed />
    </location>
    <location x="1168" y="216" id="X_ID_90">
      <name x="1188" y="196">L43</name>
      <committed />
    </location>
    <location x="1280" y="216" id="X_ID_91">
      <name x="1300" y="196">L44</name>
      <committed />
    </location>
    <location x="1392" y="216" id="X_ID_92">
      <name x="1412" y="196">L45</name>
      <committed />
    </location>
    <location x="1232" y="-368" id="X_ID_93">
      <name x="1252" y="-388">L46</name>
      <committed />
    </location>
    <location x="1064" y="-368" id="X_ID_94">
      <name x="1088" y="-360">L47</name>
      <committed />
    </location>
    <location x="920" y="-368" id="X_ID_95">
      <name x="928" y="-360">L48</name>
      <committed />
    </location>
    <location x="416" y="-368" id="X_ID_96">
      <name x="436" y="-388">L49</name>
      <committed />
    </location>
    <location x="1080" y="472" id="X_ID_97">
      <name x="1100" y="452">L50</name>
      <committed />
    </location>
    <location x="984" y="472" id="X_ID_98">
      <name x="1000" y="440">L51</name>
      <committed />
    </location>
    <location x="872" y="472" id="X_ID_99">
      <name x="888" y="440">L52</name>
      <committed />
    </location>
    <location x="272" y="472" id="X_ID_100">
      <name x="292" y="452">L53</name>
      <committed />
    </location>
    <location x="832" y="744" id="X_ID_101">
      <name x="852" y="724">L54</name>
      <committed />
    </location>
    <location x="720" y="744" id="X_ID_102">
      <name x="740" y="724">L55</name>
      <committed />
    </location>
    <location x="568" y="744" id="X_ID_103">
      <name x="588" y="724">L56</name>
      <committed />
    </location>
    <location x="440" y="744" id="X_ID_104">
      <name x="460" y="724">L57</name>
      <committed />
    </location>
    <location x="920" y="-784" id="X_ID_105">
      <name x="944" y="-776">L58</name>
      <committed />
    </location>
    <location x="792" y="-784" id="X_ID_106">
      <name x="792" y="-768">L59</name>
      <committed />
    </location>
    <location x="616" y="-784" id="X_ID_107">
      <name x="624" y="-768">L60</name>
      <committed />
    </location>
    <location x="416" y="-784" id="X_ID_108">
      <name x="424" y="-768">L61</name>
      <committed />
    </location>
    <init ref="X_ID_24" />
    <transition x="180" y="180">
      <source ref="X_ID_19" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="1264" y="-160">PcOdfltENTRYtrpcmkr2sbCmpt6!</label>
      <nail x="1064" y="-88" />
    </transition>
    <transition x="490" y="70">
      <source ref="X_ID_20" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="216" y="8">PcOIdlENTRYtrpcmkr2sbCmpt6!</label>
      <nail x="432" y="-8" />
    </transition>
    <transition x="330" y="170">
      <source ref="X_ID_21" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="208" y="88">PcOVVIENTRYtrpcmkr2sbCmpt6!</label>
      <nail x="416" y="144" />
    </transition>
    <transition x="230" y="330">
      <source ref="X_ID_22" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="160" y="112">PcOVVTENTRYtrpcmkr2sbCmpt6!</label>
      <nail x="96" y="144" />
      <nail x="208" y="80" />
    </transition>
    <transition x="640" y="-60">
      <source ref="X_ID_23" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="96" y="-16">PcOAVIENTRYtrpcmkr2sbCmpt6!</label>
      <nail x="88" y="0" />
      <nail x="200" y="40" />
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_24" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="-152" y="352">PcOffENTRYtrpcmkr2?</label>
      <nail x="32" y="864" />
      <nail x="1488" y="856" />
    </transition>
    <transition x="630" y="270">
      <source ref="X_ID_24" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="16" y="-48">PcIdlENTRYtrpcmkr2?</label>
    </transition>
    <transition x="370" y="530">
      <source ref="X_ID_24" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="-80" y="256">PcVVTENTRYtrpcmkr2?</label>
      <label kind="assignment" x="16" y="440">VVT_TIME := 0</label>
    </transition>
    <transition x="470" y="370">
      <source ref="X_ID_24" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="40" y="48">PcVVIENTRYtrpcmkr2?</label>
      <label kind="assignment" x="160" y="152">VVI_TIME := 0</label>
    </transition>
    <transition x="780" y="140">
      <source ref="X_ID_24" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="16" y="-200">PcAVIENTRYtrpcmkr2?</label>
      <label kind="assignment" x="181" y="-355">AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="30" y="190">
      <source ref="pacemaker2Pace.Off" />
      <target ref="X_ID_19" />
      <label kind="synchronisation" x="1463" y="-53">commandedOn?</label>
      <label kind="assignment" x="1440" y="-96">VVI_TIME := 0</label>
    </transition>
    <transition x="380" y="320">
      <source ref="X_ID_18" />
      <target ref="X_ID_64" />
      <label kind="guard" x="1000" y="-32">triggerVar3 == 1</label>
      <label kind="synchronisation" x="920" y="16">commandedOff?</label>
      <label kind="assignment" x="1008" y="-8">V_listening := 0, wasSwitchedOff := 1</label>
    </transition>
    <transition x="230" y="330">
      <source ref="X_ID_64" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="1360" y="0">xtSglNR6!</label>
    </transition>
    <transition x="100" y="480">
      <source ref="X_ID_18" />
      <target ref="X_ID_65" />
      <label kind="guard" x="747" y="-355">triggerVar3 == 1</label>
      <label kind="synchronisation" x="608" y="-16">toIdle?</label>
      <label kind="assignment" x="424" y="-88">V_listening := 0, wasSwitchedOff := 1</label>
    </transition>
    <transition x="250" y="530">
      <source ref="X_ID_65" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="296" y="-152">xtSglNR6!</label>
    </transition>
    <transition x="790" y="190">
      <source ref="X_ID_18" />
      <target ref="X_ID_66" />
      <label kind="guard" x="400" y="176">triggerVar3 == 1</label>
      <label kind="synchronisation" x="528" y="136">toInhibited?</label>
      <label kind="assignment" x="802" y="242">V_listening := 0, VVI_TIME := 0</label>
    </transition>
    <transition x="780" y="340">
      <source ref="X_ID_66" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="272" y="232">xtSglNR6!</label>
    </transition>
    <transition x="630" y="90">
      <source ref="X_ID_18" />
      <target ref="X_ID_67" />
      <label kind="guard" x="452" y="250">triggerVar3 == 1</label>
      <label kind="synchronisation" x="688" y="248">toTriggered?</label>
      <label kind="assignment" x="832" y="376">V_listening := 0, VVT_TIME := 0</label>
    </transition>
    <transition x="520" y="400">
      <source ref="X_ID_67" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="448" y="532">xtSglNR6!</label>
    </transition>
    <transition x="530" y="370">
      <source ref="X_ID_18" />
      <target ref="X_ID_68" />
      <label kind="guard" x="506" y="-433">triggerVar3 == 1</label>
      <label kind="synchronisation" x="635" y="-209">toAVI?</label>
      <label kind="assignment" x="744" y="-88">V_listening := 0, AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="830" y="290">
      <source ref="X_ID_68" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="328" y="-480">xtSglNR6!</label>
    </transition>
    <transition x="250" y="470">
      <source ref="X_ID_18" />
      <target ref="X_ID_69" />
      <label kind="guard" x="1008" y="64">triggerVar4 == 1</label>
      <label kind="synchronisation" x="920" y="40">commandedOff?</label>
      <label kind="assignment" x="1000" y="288">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="260" y="1080">
      <source ref="X_ID_69" />
      <target ref="X_ID_70" />
      <label kind="synchronisation" x="1160" y="24">xtSglNR7!</label>
    </transition>
    <transition x="200" y="640">
      <source ref="X_ID_70" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="1376" y="40">xtSglNR6!</label>
    </transition>
    <transition x="940" y="-220">
      <source ref="X_ID_18" />
      <target ref="X_ID_71" />
      <label kind="guard" x="488" y="-136">triggerVar4 == 1</label>
      <label kind="synchronisation" x="624" y="-32">toIdle?</label>
      <label kind="assignment" x="552" y="-272">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="1380" y="100">
      <source ref="X_ID_71" />
      <target ref="X_ID_72" />
      <label kind="synchronisation" x="490" y="-358">xtSglNR7!</label>
    </transition>
    <transition x="930" y="390">
      <source ref="X_ID_72" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="288" y="-208">xtSglNR6!</label>
    </transition>
    <transition x="680" y="240">
      <source ref="X_ID_18" />
      <target ref="X_ID_73" />
      <label kind="guard" x="456" y="232">triggerVar4 == 1</label>
      <label kind="synchronisation" x="584" y="184">toInhibited?</label>
      <label kind="assignment" x="760" y="328">V_listening := 0, V_listening := 0, VVI_TIME := 0</label>
    </transition>
    <transition x="740" y="740">
      <source ref="X_ID_73" />
      <target ref="X_ID_74" />
      <label kind="synchronisation" x="328" y="328">xtSglNR7!</label>
    </transition>
    <transition x="390" y="670">
      <source ref="X_ID_74" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="256" y="272">xtSglNR6!</label>
    </transition>
    <transition x="500" y="620">
      <source ref="X_ID_18" />
      <target ref="X_ID_75" />
      <label kind="guard" x="648" y="424">triggerVar4 == 1</label>
      <label kind="synchronisation" x="704" y="224">toTriggered?</label>
      <label kind="assignment" x="648" y="544">V_listening := 0, V_listening := 0, VVT_TIME := 0</label>
    </transition>
    <transition x="100" y="1380">
      <source ref="X_ID_75" />
      <target ref="X_ID_76" />
      <label kind="synchronisation" x="480" y="624">xtSglNR7!</label>
    </transition>
    <transition x="-170" y="1090">
      <source ref="X_ID_76" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="384" y="568">xtSglNR6!</label>
    </transition>
    <transition x="1090" y="390">
      <source ref="X_ID_18" />
      <target ref="X_ID_77" />
      <label kind="guard" x="592" y="-504">triggerVar4 == 1</label>
      <label kind="synchronisation" x="587" y="-291">toAVI?</label>
      <label kind="assignment" x="640" y="-328">V_listening := 0, V_listening := 0, AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="1680" y="300">
      <source ref="X_ID_77" />
      <target ref="X_ID_78" />
      <label kind="synchronisation" x="498" y="-552">xtSglNR7!</label>
    </transition>
    <transition x="1230" y="-150">
      <source ref="X_ID_78" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="272" y="-576">xtSglNR6!</label>
    </transition>
    <transition x="830" y="490">
      <source ref="X_ID_18" />
      <target ref="X_ID_79" />
      <label kind="guard" x="944" y="120">triggerVar5 == 1</label>
      <label kind="synchronisation" x="872" y="96">commandedOff?</label>
      <label kind="assignment" x="984" y="80">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="1040" y="860">
      <source ref="X_ID_79" />
      <target ref="X_ID_80" />
      <label kind="synchronisation" x="1160" y="112">xtSglNR8!</label>
    </transition>
    <transition x="400" y="400">
      <source ref="X_ID_80" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="1400" y="96">xtSglNR6!</label>
    </transition>
    <transition x="650" y="670">
      <source ref="X_ID_18" />
      <target ref="X_ID_81" />
      <label kind="guard" x="456" y="-176">triggerVar5 == 1</label>
      <label kind="synchronisation" x="640" y="-56">toIdle?</label>
      <label kind="assignment" x="796" y="262">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="400" y="1420">
      <source ref="X_ID_81" />
      <target ref="X_ID_82" />
      <label kind="synchronisation" x="522" y="-216">xtSglNR8!</label>
    </transition>
    <transition x="240" y="820">
      <source ref="X_ID_82" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="288" y="-176">xtSglNR6!</label>
    </transition>
    <transition x="550" y="930">
      <source ref="X_ID_18" />
      <target ref="X_ID_83" />
      <label kind="guard" x="464" y="-408">triggerVar5 == 1</label>
      <label kind="synchronisation" x="560" y="160">toInhibited?</label>
      <label kind="assignment" x="520" y="304">V_listening := 0, V_listening := 0, VVI_TIME := 0</label>
    </transition>
    <transition x="1450" y="450">
      <source ref="X_ID_83" />
      <target ref="X_ID_84" />
      <label kind="synchronisation" x="317" y="549">xtSglNR8!</label>
    </transition>
    <transition x="1230" y="-310">
      <source ref="X_ID_84" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="208" y="304">xtSglNR6!</label>
    </transition>
    <transition x="1080" y="540">
      <source ref="X_ID_18" />
      <target ref="X_ID_85" />
      <label kind="guard" x="640" y="392">triggerVar5 == 1</label>
      <label kind="synchronisation" x="672" y="280">toTriggered?</label>
      <label kind="assignment" x="688" y="584">V_listening := 0, V_listening := 0, VVT_TIME := 0</label>
    </transition>
    <transition x="1720" y="600">
      <source ref="X_ID_85" />
      <target ref="X_ID_86" />
      <label kind="synchronisation" x="488" y="688">xtSglNR8!</label>
    </transition>
    <transition x="870" y="390">
      <source ref="X_ID_86" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="352" y="632">xtSglNR6!</label>
    </transition>
    <transition x="700" y="640">
      <source ref="X_ID_18" />
      <target ref="X_ID_87" />
      <label kind="guard" x="416" y="-739">triggerVar5 == 1</label>
      <label kind="synchronisation" x="646" y="-352">toAVI?</label>
      <label kind="assignment" x="720" y="-128">V_listening := 0, V_listening := 0, AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="1160" y="1160">
      <source ref="X_ID_87" />
      <target ref="X_ID_88" />
      <label kind="synchronisation" x="492" y="-660">xtSglNR8!</label>
    </transition>
    <transition x="1100" y="460">
      <source ref="X_ID_88" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="248" y="-608">xtSglNR6!</label>
    </transition>
    <transition x="240" y="820">
      <source ref="X_ID_18" />
      <target ref="X_ID_89" />
      <label kind="guard" x="896" y="192">triggerVar7 == 2</label>
      <label kind="synchronisation" x="848" y="176">commandedOff?</label>
      <label kind="assignment" x="936" y="144">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="600" y="1720">
      <source ref="X_ID_89" />
      <target ref="X_ID_90" />
      <label kind="synchronisation" x="1048" y="224">xtSglNR11!</label>
    </transition>
    <transition x="60" y="1980">
      <source ref="X_ID_90" />
      <target ref="X_ID_91" />
      <label kind="synchronisation" x="1176" y="224">xtSglNR10!</label>
    </transition>
    <transition x="750" y="1730">
      <source ref="X_ID_91" />
      <target ref="X_ID_92" />
      <label kind="synchronisation" x="1296" y="224">xtSglNR9!</label>
    </transition>
    <transition x="1240" y="680">
      <source ref="X_ID_92" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="1416" y="144">xtSglNR6!</label>
    </transition>
    <transition x="1230" y="-310">
      <source ref="X_ID_18" />
      <target ref="X_ID_93" />
      <label kind="guard" x="832" y="-64">triggerVar7 == 2</label>
      <label kind="synchronisation" x="824" y="-24">toIdle?</label>
      <label kind="assignment" x="1176" y="-296">V_listening := 0, wasSwitchedOff := 1, V_listening := 0</label>
    </transition>
    <transition x="2020" y="360">
      <source ref="X_ID_93" />
      <target ref="X_ID_94" />
      <label kind="synchronisation" x="1112" y="-408">xtSglNR11!</label>
    </transition>
    <transition x="1640" y="900">
      <source ref="X_ID_94" />
      <target ref="X_ID_95" />
      <label kind="synchronisation" x="952" y="-400">xtSglNR10!</label>
    </transition>
    <transition x="1460" y="1000">
      <source ref="X_ID_95" />
      <target ref="X_ID_96" />
      <label kind="synchronisation" x="728" y="-400">xtSglNR9!</label>
    </transition>
    <transition x="1100" y="840">
      <source ref="X_ID_96" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="288" y="-240">xtSglNR6!</label>
    </transition>
    <transition x="390" y="690">
      <source ref="X_ID_18" />
      <target ref="X_ID_97" />
      <label kind="guard" x="884" y="-197">triggerVar7 == 2</label>
      <label kind="synchronisation" x="784" y="160">toInhibited?</label>
      <label kind="assignment" x="1048" y="400">V_listening := 0, V_listening := 0, VVI_TIME := 0</label>
    </transition>
    <transition x="900" y="1640">
      <source ref="X_ID_97" />
      <target ref="X_ID_98" />
      <label kind="synchronisation" x="1000" y="488">xtSglNR11!</label>
    </transition>
    <transition x="360" y="2020">
      <source ref="X_ID_98" />
      <target ref="X_ID_99" />
      <label kind="synchronisation" x="868" y="488">xtSglNR10!</label>
    </transition>
    <transition x="340" y="2280">
      <source ref="X_ID_99" />
      <target ref="X_ID_100" />
      <label kind="synchronisation" x="372" y="480">xtSglNR9!</label>
    </transition>
    <transition x="820" y="1380">
      <source ref="X_ID_100" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="192" y="336">xtSglNR6!</label>
    </transition>
    <transition x="1540" y="-780">
      <source ref="X_ID_18" />
      <target ref="X_ID_101" />
      <label kind="guard" x="832" y="520">triggerVar7 == 2</label>
      <label kind="synchronisation" x="720" y="192">toTriggered?</label>
      <label kind="assignment" x="840" y="648">V_listening := 0, V_listening := 0, VVT_TIME := 0</label>
    </transition>
    <transition x="2580" y="20">
      <source ref="X_ID_101" />
      <target ref="X_ID_102" />
      <label kind="synchronisation" x="768" y="760">xtSglNR11!</label>
    </transition>
    <transition x="2320" y="640">
      <source ref="X_ID_102" />
      <target ref="X_ID_103" />
      <label kind="synchronisation" x="608" y="760">xtSglNR10!</label>
    </transition>
    <transition x="1940" y="660">
      <source ref="X_ID_103" />
      <target ref="X_ID_104" />
      <label kind="synchronisation" x="448" y="760">xtSglNR9!</label>
    </transition>
    <transition x="890" y="1150">
      <source ref="X_ID_104" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="304" y="696">xtSglNR6!</label>
    </transition>
    <transition x="1100" y="380">
      <source ref="X_ID_18" />
      <target ref="X_ID_105" />
      <label kind="guard" x="912" y="-568">triggerVar7 == 2</label>
      <label kind="synchronisation" x="912" y="-544">toAVI?</label>
      <label kind="assignment" x="832" y="-232">V_listening := 0, V_listening := 0, AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <transition x="1300" y="1300">
      <source ref="X_ID_105" />
      <target ref="X_ID_106" />
      <label kind="synchronisation" x="808" y="-816">xtSglNR11!</label>
    </transition>
    <transition x="1200" y="1760">
      <source ref="X_ID_106" />
      <target ref="X_ID_107" />
      <label kind="synchronisation" x="648" y="-816">xtSglNR10!</label>
    </transition>
    <transition x="660" y="1940">
      <source ref="X_ID_107" />
      <target ref="X_ID_108" />
      <label kind="synchronisation" x="440" y="-816">xtSglNR9!</label>
    </transition>
    <transition x="300" y="1040">
      <source ref="X_ID_108" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="296" y="-536">xtSglNR6!</label>
    </transition>
  </template>
  <instantiation />
  <system>system heartsim4, heartsim4Detail5, programmersim3, pacemaker2, pacemaker2subComponent6, pacemaker2subComponent6AVIMode9, pacemaker2subComponent6AVIMode9VPart11, pacemaker2subComponent6AVIMode9APart10, pacemaker2subComponent6VVTMode8, pacemaker2subComponent6VVIMode7, globalKickoff12;
</system>
</nta>


