<?xml version="1.0" encoding="ISO-8859-1"?>

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

<nta>
  <!-- TRANSLATED by   Flatten   Vanilla-1 Tue Apr  3 15:46:36 2001
	          on   Apr 4, 2001 12:58:51 PM
	          from a huppaal-0.6.dtd document -->
  <!--
        Tree of Instantiations:
        ROOT1 [AND]
            pacemaker2 [XOR]
                pacemaker2subComponent6 [XOR]
                    pacemaker2subComponent6VVIMode7 [XOR]
                    pacemaker2subComponent6VVTMode8 [XOR]
                    pacemaker2subComponent6AVIMode9 [AND]
                        pacemaker2subComponent6AVIMode9APart10 [XOR]
                        pacemaker2subComponent6AVIMode9VPart11 [XOR]
            programmersim3 [XOR]
            heartsim4 [XOR]
                heartsim4Detail5 [XOR]
-->
  <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="0" y="0">globalKickoff12</name>
    <parameter x="600" y="0" />
    <location x="40" y="40" id="X_ID_57">
      <name x="60" y="20">start</name>
      <committed />
    </location>
    <location x="340" y="20" id="X_ID_58">
      <name x="360" y="0">L11</name>
      <committed />
    </location>
    <location x="20" y="340" id="X_ID_59">
      <name x="40" y="320">L12</name>
      <committed />
    </location>
    <location x="640" y="120" id="X_ID_60">
      <name x="660" y="100">L13</name>
    </location>
    <location x="320" y="320" id="X_ID_61">
      <name x="340" y="300">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="185" y="41">PcAVIENTRYtrpcmkr2!</label>
    </transition>
    <transition x="180" y="180">
      <source ref="X_ID_58" />
      <target ref="X_ID_59" />
      <label kind="synchronisation" x="206" y="174">PrgrmmrMdswtchENTRYtrprgrmmrsm3!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_59" />
      <target ref="X_ID_60" />
      <label kind="synchronisation" x="309" y="251">HrtACtrctENTRYtrhrtsm4!</label>
    </transition>
    <!--inserting next global join [1 root transitions]-->
    <transition x="480" y="220">
      <source ref="X_ID_60" />
      <target ref="X_ID_61" />
      <!--STRANGE: no sync found in root transition of global join-->
      <label kind="guard" x="587" y="145">triggerVar1 == 1</label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_61" />
      <target ref="X_ID_60" />
      <label kind="synchronisation" x="474" y="240">xtSglNR3!</label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "globalKickoff12"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6AVIMode9VPart11</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION">
      <name x="60" y="20">Refractory</name>
      <invariant x="60" y="60"></invariant>
    </location>
    <location x="340" y="20" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION">
      <name x="360" y="0">Waiting</name>
      <invariant x="360" y="40"></invariant>
    </location>
    <location x="20" y="340" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting_AUX.LOCATION">
      <name x="40" y="320">WaitingAU</name>
      <invariant x="40" y="360">AVI_V_TIME &lt;= 0</invariant>
    </location>
    <location x="640" y="120" id="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION">
      <name x="660" y="100">APacing</name>
      <invariant x="660" y="140"></invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="320" y="320" id="X_ID_41">
      <name x="340" y="300">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <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="204" y="204">PcOAVIVPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9VPrt11?</label>
      <label kind="assignment" x="115" y="115">triggerVar7 := triggerVar7 + 1 </label>
    </transition>
    <!--ordinary transitions-->
    <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="185" y="41">AVI_Refractory_Done?</label>
      <label kind="assignment" x="270" y="30">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="206" y="174">VentricularChamberSense?</label>
      <label kind="assignment" x="105" y="265">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="63" y="287">A_LISTENING_TO_V == 0</label>
      <label kind="assignment" x="265" y="105">V_listening := 1</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="synchronisation" x="174" y="206">AVI_Sense_from_V!</label>
      <label kind="assignment" x="265" y="105">V_listening := 1</label>
    </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="485" y="75">AVI_APace?</label>
      <label kind="assignment" x="570" y="100">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="380" y="94">AVI_APace_Done?</label>
    </transition>
    <!--exit transitions-->
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.refractory.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="176" y="176">xtSglNR11?</label>
      <label kind="assignment" x="255" y="255">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.waiting.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="341" y="165">xtSglNR11?</label>
      <label kind="assignment" x="330" y="250">triggerVar7 := triggerVar7 - 1 </label>
    </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="165" y="341">xtSglNR11?</label>
      <label kind="assignment" x="250" y="330">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6AVIMode9VPart11Pace.On.AVI.V-Part.apacing.LOCATION" />
      <target ref="X_ID_41" />
      <label kind="synchronisation" x="506" y="220">xtSglNR11?</label>
      <label kind="assignment" x="405" y="275">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6AVIMode9VPart11"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6AVIMode9APart10</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION">
      <name x="60" y="20">Refractory</name>
      <invariant x="60" y="60">AVI_A_TIME &lt;= REFRACTORY_TIME</invariant>
    </location>
    <location x="340" y="20" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION">
      <name x="360" y="0">Waiting</name>
      <invariant x="360" y="40">AVI_A_TIME &lt;= SENSE_TIMEOUT</invariant>
    </location>
    <location x="20" y="340" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION">
      <name x="40" y="320">APacing</name>
      <invariant x="40" y="360">AVI_A_TIME &lt;= 0</invariant>
    </location>
    <location x="640" y="120" id="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing_AUX.LOCATION">
      <name x="660" y="100">APacingAU</name>
      <invariant x="660" y="140">AVI_A_TIME &lt;= 0</invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="320" y="320" id="X_ID_46">
      <name x="340" y="300">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <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="204" y="204">PcOAVIAPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9APrt10?</label>
      <label kind="assignment" x="115" y="115">triggerVar7 := triggerVar7 + 1 </label>
    </transition>
    <!--ordinary transitions-->
    <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="32">AVI_A_TIME == REFRACTORY_TIME</label>
      <label kind="synchronisation" x="185" y="41">AVI_Refractory_Done!</label>
      <label kind="assignment" x="270" y="30">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="350" y="30">AVI_Sense_from_V?</label>
      <label kind="assignment" x="345" y="25">AVI_A_TIME := 0</label>
    </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="287" y="63">AVI_A_TIME == SENSE_TIMEOUT</label>
      <label kind="synchronisation" x="206" y="174">APace!</label>
      <label kind="assignment" x="105" y="265">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="309" y="251">AVI_APace!</label>
      <label kind="assignment" x="490" y="180">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="380" y="94">AVI_APace_Done!</label>
      <label kind="assignment" x="195" y="65">AVI_A_TIME := 0</label>
    </transition>
    <!--exit transitions-->
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.refractory.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="176" y="176">xtSglNR10?</label>
      <label kind="assignment" x="255" y="255">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.waiting.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="341" y="165">xtSglNR10?</label>
      <label kind="assignment" x="330" y="250">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6AVIMode9APart10Pace.On.AVI.A-Part.apacing.LOCATION" />
      <target ref="X_ID_46" />
      <label kind="synchronisation" x="165" y="341">xtSglNR10?</label>
      <label kind="assignment" x="250" y="330">triggerVar7 := triggerVar7 - 1 </label>
    </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="506" y="220">xtSglNR10?</label>
      <label kind="assignment" x="405" y="275">triggerVar7 := triggerVar7 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6AVIMode9APart10"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6AVIMode9</name>
    <parameter x="600" y="0" />
    <declaration />
    <location x="40" y="40" id="X_ID_33">
      <name x="60" y="20">IDLE</name>
    </location>
    <location x="340" y="20" id="X_ID_34">
      <name x="360" y="0">ACTIVE</name>
    </location>
    <!--parallel components-->
    <!--translation of entries + forks-->
    <!--entry 1 : default entry-->
    <location x="20" y="340" id="X_ID_35">
      <name x="40" y="320">pacemaker2subComponent6AVIMode9PaceOnAVIdefaultENTRYfork1</name>
      <committed />
    </location>
    <location x="640" y="120" id="X_ID_36">
      <name x="660" y="100">pacemaker2subComponent6AVIMode9PaceOnAVIdefaultENTRYfork2</name>
      <committed />
    </location>
    <!--entry pseudo-transitions (AND component -> forks)-->
    <init ref="X_ID_33" />
    <transition x="490" y="70">
      <source ref="X_ID_36" />
      <target ref="X_ID_34" />
      <label kind="synchronisation" x="515" y="85">PcOAVIVPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9VPrt11!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_35" />
      <target ref="X_ID_36" />
      <label kind="synchronisation" x="309" y="251">PcOAVIAPrtdfltENTRYtrpcmkr2sbCmpt6AVIMd9APrt10!</label>
    </transition>
    <transition x="30" y="190">
      <source ref="X_ID_33" />
      <target ref="X_ID_35" />
      <label kind="synchronisation" x="41" y="185">PcOAVIdfltENTRYtrpcmkr2sbCmpt6AVIMd9?</label>
    </transition>
    <!--the exit transitions-->
    <transition x="190" y="30">
      <source ref="X_ID_34" />
      <target ref="X_ID_33" />
      <label kind="synchronisation" x="215" y="39">xtSglNR9?</label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6AVIMode9"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6VVTMode8</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory">
      <name x="60" y="20">Refractory</name>
      <invariant x="60" y="60">VVT_TIME &lt;= REFRACTORY_TIME</invariant>
    </location>
    <location x="340" y="20" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense">
      <name x="360" y="0">WaitingforSense</name>
      <invariant x="360" y="40">VVT_TIME &lt;= SENSE_TIMEOUT</invariant>
    </location>
    <location x="20" y="340" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX">
      <name x="40" y="320">WaitingforSenseAU</name>
      <invariant x="40" y="360">VVT_TIME &lt;= 0</invariant>
    </location>
    <location x="640" y="120" id="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing">
      <name x="660" y="100">Pacing</name>
      <invariant x="660" y="140">VVT_TIME &lt;= 0</invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="320" y="320" id="X_ID_51">
      <name x="340" y="300">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <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="204" y="204">PcOVVTdfltENTRYtrpcmkr2sbCmpt6VVTMd8?</label>
      <label kind="assignment" x="115" y="115">triggerVar5 := triggerVar5 + 1 </label>
    </transition>
    <!--ordinary transitions-->
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <label kind="guard" x="80" y="32">VVT_TIME == REFRACTORY_TIME</label>
      <label kind="assignment" x="270" y="30">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="206" y="174">VentricularChamberSense?</label>
      <label kind="assignment" x="105" y="265">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="287" y="63">VVT_TIME == SENSE_TIMEOUT</label>
      <label kind="assignment" x="105" y="265">VVT_TIME := 0, V_listening := 0</label>
    </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="309" y="251">VPace!</label>
      <label kind="assignment" x="490" y="180">VVT_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing" />
      <target ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
    </transition>
    <!--exit transitions-->
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Refractory" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="176" y="176">xtSglNR8?</label>
      <label kind="assignment" x="255" y="255">triggerVar5 := triggerVar5 - 1 </label>
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="341" y="165">xtSglNR8?</label>
      <label kind="assignment" x="330" y="250">triggerVar5 := triggerVar5 - 1 </label>
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Waiting_for_Sense_AUX" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="165" y="341">xtSglNR8?</label>
      <label kind="assignment" x="250" y="330">triggerVar5 := triggerVar5 - 1 </label>
    </transition>
    <transition x="480" y="220">
      <source ref="pacemaker2subComponent6VVTMode8Pace.On.VVT.Pacing" />
      <target ref="X_ID_51" />
      <label kind="synchronisation" x="506" y="220">xtSglNR8?</label>
      <label kind="assignment" x="405" y="275">triggerVar5 := triggerVar5 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6VVTMode8"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6VVIMode7</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory">
      <name x="60" y="20">Refractory</name>
      <invariant x="60" y="60">VVI_TIME &lt;= REFRACTORY_TIME</invariant>
    </location>
    <location x="340" y="20" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense">
      <name x="360" y="0">WaitingforSense</name>
      <invariant x="360" y="40">VVI_TIME &lt;= SENSE_TIMEOUT</invariant>
    </location>
    <location x="20" y="340" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX">
      <name x="40" y="320">WaitingforSenseAU</name>
      <invariant x="40" y="360">VVI_TIME &lt;= 0</invariant>
    </location>
    <location x="640" y="120" id="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing">
      <name x="660" y="100">Pacing</name>
      <invariant x="660" y="140">VVI_TIME &lt;= 0</invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="320" y="320" id="X_ID_56">
      <name x="340" y="300">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <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="204" y="204">PcOVVIdfltENTRYtrpcmkr2sbCmpt6VVIMd7?</label>
      <label kind="assignment" x="115" y="115">triggerVar4 := triggerVar4 + 1 </label>
    </transition>
    <!--ordinary transitions-->
    <transition x="190" y="30">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <label kind="guard" x="80" y="32">VVI_TIME == REFRACTORY_TIME</label>
      <label kind="assignment" x="270" y="30">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="350" y="30">VentricularChamberSense?</label>
      <label kind="assignment" x="345" y="25">VVI_TIME := 0</label>
    </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="287" y="63">VVI_TIME == SENSE_TIMEOUT</label>
      <label kind="assignment" x="105" y="265">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="309" y="251">VPace!</label>
      <label kind="assignment" x="490" y="180">VVI_TIME := 0</label>
    </transition>
    <transition x="340" y="80">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Pacing" />
      <target ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
    </transition>
    <!--exit transitions-->
    <transition x="180" y="180">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Refractory" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="176" y="176">xtSglNR7?</label>
      <label kind="assignment" x="255" y="255">triggerVar4 := triggerVar4 - 1 </label>
    </transition>
    <transition x="330" y="170">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="341" y="165">xtSglNR7?</label>
      <label kind="assignment" x="330" y="250">triggerVar4 := triggerVar4 - 1 </label>
    </transition>
    <transition x="170" y="330">
      <source ref="pacemaker2subComponent6VVIMode7Pace.On.VVI.Waiting_for_Sense_AUX" />
      <target ref="X_ID_56" />
      <label kind="synchronisation" x="165" y="341">xtSglNR7?</label>
      <label kind="assignment" x="250" y="330">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="506" y="220">xtSglNR7?</label>
      <label kind="assignment" x="405" y="275">triggerVar4 := triggerVar4 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6VVIMode7"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2subComponent6</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2subComponent6Pace.On.Idle">
      <name x="60" y="20">Idle</name>
      <invariant x="60" y="60"></invariant>
    </location>
    <!--now the (former) components-->
    <location x="340" y="20" id="X_ID_26">
      <name x="360" y="0">VVIMode</name>
    </location>
    <location x="20" y="340" id="X_ID_27">
      <name x="40" y="320">L8</name>
      <committed />
    </location>
    <location x="640" y="120" id="X_ID_28">
      <name x="660" y="100">VVTMode</name>
    </location>
    <location x="320" y="320" id="X_ID_29">
      <name x="340" y="300">L9</name>
      <committed />
    </location>
    <location x="120" y="640" id="X_ID_30">
      <name x="140" y="620">AVIMode</name>
    </location>
    <location x="940" y="-140" id="X_ID_31">
      <name x="960" y="-160">L10</name>
      <committed />
    </location>
    <location x="620" y="420" id="X_ID_32">
      <name x="640" y="400">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="174" y="206">PcOVVIdfltENTRYtrpcmkr2sbCmpt6VVIMd7!</label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_29" />
      <target ref="X_ID_28" />
      <label kind="synchronisation" x="474" y="240">PcOVVTdfltENTRYtrpcmkr2sbCmpt6VVTMd8!</label>
    </transition>
    <transition x="530" y="250">
      <source ref="X_ID_31" />
      <target ref="X_ID_30" />
      <label kind="synchronisation" x="581" y="221">PcOAVIdfltENTRYtrpcmkr2sbCmpt6AVIMd9!</label>
    </transition>
    <!--special location: idle-->
    <!--entry of sub-component [VVI Mode]-->
    <!--entry of sub-component [VVI Mode]-->
    <!--entry of sub-component [VVT Mode]-->
    <!--entry of sub-component [AVI Mode]-->
    <!--entry pseudo-transitions (OR component)-->
    <transition x="780" y="140">
      <source ref="X_ID_32" />
      <target ref="X_ID_31" />
      <label kind="synchronisation" x="774" y="178">PcOAVIENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="865" y="5">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="495" y="385">PcOVVTENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="400" y="350">VVT_TIME := 0</label>
    </transition>
    <transition x="320" y="380">
      <source ref="X_ID_32" />
      <target ref="X_ID_27" />
      <label kind="synchronisation" x="360" y="394">PcOVVIENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="175" y="365">VVI_TIME := 0</label>
    </transition>
    <transition x="330" y="230">
      <source ref="X_ID_32" />
      <target ref="pacemaker2subComponent6Pace.On.Idle" />
      <label kind="synchronisation" x="369" y="259">PcOIdlENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="190" y="140">triggerVar3 := triggerVar3 + 1 </label>
    </transition>
    <transition x="320" y="380">
      <source ref="X_ID_32" />
      <target ref="X_ID_27" />
      <label kind="synchronisation" x="360" y="394">PcOdfltENTRYtrpcmkr2sbCmpt6?</label>
      <label kind="assignment" x="175" y="365">VVI_TIME := 0</label>
    </transition>
    <!--ordinary transitions-->
    <!--exit transitions-->
    <transition x="330" y="230">
      <source ref="pacemaker2subComponent6Pace.On.Idle" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="311" y="221">xtSglNR6?</label>
      <label kind="assignment" x="480" y="330">triggerVar3 := triggerVar3 - 1 </label>
    </transition>
    <transition x="480" y="220">
      <source ref="X_ID_26" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="476" y="210">xtSglNR6?</label>
    </transition>
    <transition x="630" y="270">
      <source ref="X_ID_28" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="641" y="265">xtSglNR6?</label>
    </transition>
    <transition x="370" y="530">
      <source ref="X_ID_30" />
      <target ref="X_ID_32" />
      <label kind="synchronisation" x="355" y="551">xtSglNR6?</label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2subComponent6"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">heartsim4Detail5</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="heartsim4Detail5Heart.Detail.VContraction">
      <name x="60" y="20">VContraction</name>
      <invariant x="60" y="60">HEART_TIME &lt;= 0</invariant>
    </location>
    <location x="340" y="20" id="heartsim4Detail5Heart.Detail.AContraction">
      <name x="360" y="0">AContraction</name>
      <invariant x="360" y="40">HEART_TIME &lt;= 0</invariant>
    </location>
    <location x="20" y="340" id="heartsim4Detail5Heart.Detail.VContracted">
      <name x="40" y="320">AfterVContraction</name>
      <invariant x="40" y="360">HEART_TIME &lt;= HEART_DELAY_AFTER_V_CONTRACTION</invariant>
    </location>
    <location x="640" y="120" id="heartsim4Detail5Heart.Detail.AContracted">
      <name x="660" y="100">AfterAContraction</name>
      <invariant x="660" y="140">HEART_TIME &lt;= HEART_DELAY_AFTER_A_CONTRACTION</invariant>
    </location>
    <location x="320" y="320" id="heartsim4Detail5Heart.Detail.Stopped">
      <name x="340" y="300">Stopped</name>
      <invariant x="340" y="340">HEART_TIME &lt;= HEART_ALLOWED_STOP_TIME</invariant>
    </location>
    <location x="120" y="640" id="heartsim4Detail5Heart.Detail.Flatline">
      <name x="140" y="620">Flatline</name>
      <invariant x="140" y="660"></invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="940" y="-140" id="X_ID_11">
      <name x="960" y="-160">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <init ref="X_ID_11" />
    <transition x="640" y="-60">
      <source ref="X_ID_11" />
      <target ref="heartsim4Detail5Heart.Detail.AContraction" />
      <label kind="synchronisation" x="680" y="-58">HrtDtlACtrctENTRYtrhrtsm4Dtl5?</label>
      <label kind="assignment" x="495" y="-15">triggerVar2 := triggerVar2 + 1 </label>
    </transition>
    <transition x="490" y="-50">
      <source ref="X_ID_11" />
      <target ref="heartsim4Detail5Heart.Detail.VContraction" />
      <label kind="synchronisation" x="545" y="-49">HrtDtlVCtrctENTRYtrhrtsm4Dtl5?</label>
      <label kind="assignment" x="270" y="0">triggerVar2 := triggerVar2 + 1 </label>
    </transition>
    <!--ordinary transitions-->
    <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="545" y="103">HEART_TIME == HEART_DELAY_AFTER_A_CONTRACTION</label>
      <label kind="assignment" x="195" y="65">HEART_TIME := 0</label>
    </transition>
    <transition x="30" y="190">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="heartsim4Detail5Heart.Detail.VContracted" />
      <label kind="guard" x="32" y="80">V_listening == 0</label>
    </transition>
    <transition x="30" y="190">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="heartsim4Detail5Heart.Detail.VContracted" />
      <label kind="guard" x="32" y="80">V_listening == 1</label>
      <label kind="synchronisation" x="41" y="185">VentricularChamberSense!</label>
    </transition>
    <transition x="180" y="180">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="heartsim4Detail5Heart.Detail.AContraction" />
      <label kind="guard" x="63" y="287">HEART_TIME == HEART_DELAY_AFTER_V_CONTRACTION</label>
      <label kind="assignment" x="265" y="105">HEART_TIME := 0</label>
    </transition>
    <transition x="170" y="330">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="heartsim4Detail5Heart.Detail.Stopped" />
      <label kind="assignment" x="250" y="330">HEART_TIME := 0</label>
    </transition>
    <transition x="220" y="480">
      <source ref="heartsim4Detail5Heart.Detail.Stopped" />
      <target ref="heartsim4Detail5Heart.Detail.Flatline" />
      <label kind="guard" x="285" y="363">HEART_TIME == HEART_ALLOWED_STOP_TIME</label>
      <label kind="assignment" x="175" y="565">HEART_TIME := 0</label>
    </transition>
    <!--exit transitions-->
    <transition x="490" y="-50">
      <source ref="heartsim4Detail5Heart.Detail.VContraction" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="455" y="-31">xtSglNR5?</label>
      <label kind="assignment" x="720" y="-90">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
    <transition x="640" y="-60">
      <source ref="heartsim4Detail5Heart.Detail.AContraction" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="620" y="-42">xtSglNR5?</label>
      <label kind="assignment" x="795" y="-95">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
    <transition x="480" y="100">
      <source ref="heartsim4Detail5Heart.Detail.VContracted" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="444" y="134">xtSglNR5?</label>
      <label kind="assignment" x="715" y="-15">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
    <transition x="790" y="-10">
      <source ref="heartsim4Detail5Heart.Detail.AContracted" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="785" y="13">xtSglNR5?</label>
      <label kind="assignment" x="870" y="-70">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
    <transition x="630" y="90">
      <source ref="heartsim4Detail5Heart.Detail.Stopped" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="609" y="123">xtSglNR5?</label>
      <label kind="assignment" x="790" y="-20">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
    <transition x="530" y="250">
      <source ref="heartsim4Detail5Heart.Detail.Flatline" />
      <target ref="X_ID_11" />
      <label kind="synchronisation" x="499" y="299">xtSglNR5?</label>
      <label kind="assignment" x="740" y="60">triggerVar2 := triggerVar2 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "heartsim4Detail5"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">heartsim4</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <!--now the (former) components-->
    <location x="40" y="40" id="X_ID_1">
      <name x="60" y="20">Detail</name>
    </location>
    <location x="340" y="20" id="X_ID_2">
      <name x="360" y="0">L1</name>
      <committed />
    </location>
    <location x="20" y="340" id="X_ID_3">
      <name x="40" y="320">L2</name>
      <committed />
    </location>
    <location x="640" y="120" id="X_ID_4">
      <name x="660" y="100">IDLE</name>
    </location>
    <location x="320" y="320" id="X_ID_62">
      <name x="340" y="300">L15</name>
      <committed />
    </location>
    <location x="120" y="640" id="X_ID_63">
      <name x="140" y="620">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="215" y="39">HrtDtlVCtrctENTRYtrhrtsm4Dtl5!</label>
    </transition>
    <transition x="30" y="190">
      <source ref="X_ID_3" />
      <target ref="X_ID_1" />
      <label kind="synchronisation" x="39" y="215">HrtDtlACtrctENTRYtrhrtsm4Dtl5!</label>
    </transition>
    <!--special location: idle-->
    <!--entry of sub-component [Detail]-->
    <!--entry of sub-component [Detail]-->
    <!--entry pseudo-transitions (OR component)-->
    <transition x="330" y="230">
      <source ref="X_ID_4" />
      <target ref="X_ID_3" />
      <label kind="synchronisation" x="371" y="229">HrtACtrctENTRYtrhrtsm4?</label>
      <label kind="assignment" x="180" y="290">HEART_TIME := 0</label>
    </transition>
    <transition x="490" y="70">
      <source ref="X_ID_4" />
      <target ref="X_ID_2" />
      <label kind="synchronisation" x="515" y="85">HrtVCtrctENTRYtrhrtsm4?</label>
      <label kind="assignment" x="420" y="50">HEART_TIME := 0</label>
    </transition>
    <!--ordinary transitions-->
    <!--exit transitions-->
    <transition x="340" y="80">
      <source ref="X_ID_1" />
      <target ref="X_ID_4" />
      <label kind="synchronisation" x="320" y="86">xtSglNR4?</label>
    </transition>
    <!--inserting next global join [2 root transitions]-->
    <transition x="180" y="180">
      <source ref="X_ID_1" />
      <target ref="X_ID_62" />
      <label kind="guard" x="77" y="77">triggerVar2 == 1</label>
      <label kind="synchronisation" x="176" y="176">APace?</label>
      <label kind="assignment" x="255" y="255">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="195" y="339">xtSglNR5!</label>
    </transition>
    <transition x="80" y="340">
      <source ref="X_ID_1" />
      <target ref="X_ID_63" />
      <label kind="guard" x="47" y="125">triggerVar2 == 1</label>
      <label kind="synchronisation" x="86" y="320">VPace?</label>
      <label kind="assignment" x="105" y="495">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="229" y="371">xtSglNR5!</label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "heartsim4"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">programmersim3</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="programmersim3Programmer.Idle">
      <name x="60" y="20">Idle</name>
      <invariant x="60" y="60"></invariant>
    </location>
    <location x="340" y="20" id="programmersim3Programmer.Random">
      <name x="360" y="0">Random</name>
      <invariant x="360" y="40"></invariant>
    </location>
    <location x="20" y="340" id="programmersim3Programmer.Modeswitch">
      <name x="40" y="320">Modeswitch</name>
      <invariant x="40" y="360"></invariant>
    </location>
    <location x="640" y="120" id="programmersim3Programmer.Modeswitch.Delay">
      <name x="660" y="100">ModeswitchDelay</name>
      <invariant x="660" y="140">PROGRAMMER_TIME &lt;= MODE_SWITCH_DELAY</invariant>
    </location>
    <!--now the (former) components-->
    <!--special location: idle-->
    <location x="320" y="320" id="X_ID_16">
      <name x="340" y="300">IDLE</name>
    </location>
    <!--entry pseudo-transitions (OR component)-->
    <init ref="X_ID_16" />
    <transition x="170" y="330">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Modeswitch" />
      <label kind="synchronisation" x="195" y="339">PrgrmmrMdswtchENTRYtrprgrmmrsm3?</label>
      <label kind="assignment" x="100" y="340">triggerVar1 := triggerVar1 + 1 </label>
    </transition>
    <transition x="330" y="170">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="339" y="195">PrgrmmrRdmENTRYtrprgrmmrsm3?</label>
    </transition>
    <transition x="180" y="180">
      <source ref="X_ID_16" />
      <target ref="programmersim3Programmer.Idle" />
      <label kind="synchronisation" x="204" y="204">PrgrmmrIdlENTRYtrprgrmmrsm3?</label>
    </transition>
    <!--ordinary transitions-->
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="350" y="30">commandedOn!</label>
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="guard" x="335" y="15">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="350" y="30">commandedOff!</label>
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="350" y="30">toInhibited!</label>
    </transition>
    <transition x="340" y="20">
      <source ref="programmersim3Programmer.Random" />
      <target ref="programmersim3Programmer.Random" />
      <label kind="synchronisation" x="350" y="30">toTriggered!</label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="309" y="251">toInhibited!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="309" y="251">toTriggered!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="guard" x="108" y="302">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="309" y="251">commandedOff!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="309" y="251">commandedOn!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="synchronisation" x="309" y="251">toAVI!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="programmersim3Programmer.Modeswitch.Delay" />
      <label kind="guard" x="108" y="302">ALLOW_SWITCH_OFF == 1</label>
      <label kind="synchronisation" x="309" y="251">toIdle!</label>
      <label kind="assignment" x="490" y="180">PROGRAMMER_TIME :=0, triggerVar1 := triggerVar1 - 1 </label>
    </transition>
    <transition x="330" y="230">
      <source ref="programmersim3Programmer.Modeswitch.Delay" />
      <target ref="programmersim3Programmer.Modeswitch" />
      <label kind="guard" x="542" y="148">PROGRAMMER_TIME == MODE_SWITCH_DELAY</label>
      <label kind="assignment" x="180" y="290">triggerVar1 := triggerVar1 + 1 </label>
    </transition>
    <!--exit transitions-->
    <transition x="170" y="330">
      <source ref="programmersim3Programmer.Modeswitch" />
      <target ref="X_ID_16" />
      <label kind="synchronisation" x="165" y="341">xtSglNR3?</label>
      <label kind="assignment" x="250" y="330">triggerVar1 := triggerVar1 - 1 </label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "programmersim3"  -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <template>
    <name x="0" y="0">pacemaker2</name>
    <parameter x="600" y="0" />
    <declaration />
    <!--ordinary locations-->
    <location x="40" y="40" id="pacemaker2Pace.Off">
      <name x="60" y="20">Off</name>
      <invariant x="60" y="60"></invariant>
    </location>
    <!--now the (former) components-->
    <location x="340" y="20" id="X_ID_18">
      <name x="360" y="0">subComponent</name>
    </location>
    <location x="20" y="340" id="X_ID_19">
      <name x="40" y="320">L3</name>
      <committed />
    </location>
    <location x="640" y="120" id="X_ID_20">
      <name x="660" y="100">L4</name>
      <committed />
    </location>
    <location x="320" y="320" id="X_ID_21">
      <name x="340" y="300">L5</name>
      <committed />
    </location>
    <location x="120" y="640" id="X_ID_22">
      <name x="140" y="620">L6</name>
      <committed />
    </location>
    <location x="940" y="-140" id="X_ID_23">
      <name x="960" y="-160">L7</name>
      <committed />
    </location>
    <location x="620" y="420" id="X_ID_24">
      <name x="640" y="400">IDLE</name>
    </location>
    <location x="420" y="620" id="X_ID_64">
      <name x="440" y="600">L17</name>
      <committed />
    </location>
    <location x="-140" y="940" id="X_ID_65">
      <name x="-120" y="920">L18</name>
      <committed />
    </location>
    <location x="1240" y="360" id="X_ID_66">
      <name x="1260" y="340">L19</name>
      <committed />
    </location>
    <location x="920" y="160" id="X_ID_67">
      <name x="940" y="140">L20</name>
      <committed />
    </location>
    <location x="720" y="720" id="X_ID_68">
      <name x="740" y="700">L21</name>
      <committed />
    </location>
    <location x="160" y="920" id="X_ID_69">
      <name x="180" y="900">L22</name>
      <committed />
    </location>
    <location x="360" y="1240" id="X_ID_70">
      <name x="380" y="1220">L23</name>
      <committed />
    </location>
    <location x="1540" y="-460" id="X_ID_71">
      <name x="1560" y="-480">L24</name>
      <committed />
    </location>
    <location x="1220" y="660" id="X_ID_72">
      <name x="1240" y="640">L25</name>
      <committed />
    </location>
    <location x="1020" y="460" id="X_ID_73">
      <name x="1040" y="440">L26</name>
      <committed />
    </location>
    <location x="460" y="1020" id="X_ID_74">
      <name x="480" y="1000">L27</name>
      <committed />
    </location>
    <location x="660" y="1220" id="X_ID_75">
      <name x="680" y="1200">L28</name>
      <committed />
    </location>
    <location x="-460" y="1540" id="X_ID_76">
      <name x="-440" y="1520">L29</name>
      <committed />
    </location>
    <location x="1840" y="760" id="X_ID_77">
      <name x="1860" y="740">L30</name>
      <committed />
    </location>
    <location x="1520" y="-160" id="X_ID_78">
      <name x="1540" y="-180">L31</name>
      <committed />
    </location>
    <location x="1320" y="960" id="X_ID_79">
      <name x="1340" y="940">L32</name>
      <committed />
    </location>
    <location x="760" y="760" id="X_ID_80">
      <name x="780" y="740">L33</name>
      <committed />
    </location>
    <location x="960" y="1320" id="X_ID_81">
      <name x="980" y="1300">L34</name>
      <committed />
    </location>
    <location x="-160" y="1520" id="X_ID_82">
      <name x="-140" y="1500">L35</name>
      <committed />
    </location>
    <location x="760" y="1840" id="X_ID_83">
      <name x="780" y="1820">L36</name>
      <committed />
    </location>
    <location x="2140" y="-940" id="X_ID_84">
      <name x="2160" y="-960">L37</name>
      <committed />
    </location>
    <location x="1820" y="1060" id="X_ID_85">
      <name x="1840" y="1040">L38</name>
      <committed />
    </location>
    <location x="1620" y="140" id="X_ID_86">
      <name x="1640" y="120">L39</name>
      <committed />
    </location>
    <location x="1060" y="1260" id="X_ID_87">
      <name x="1080" y="1240">L40</name>
      <committed />
    </location>
    <location x="1260" y="1060" id="X_ID_88">
      <name x="1280" y="1040">L41</name>
      <committed />
    </location>
    <location x="140" y="1620" id="X_ID_89">
      <name x="160" y="1600">L42</name>
      <committed />
    </location>
    <location x="1060" y="1820" id="X_ID_90">
      <name x="1080" y="1800">L43</name>
      <committed />
    </location>
    <location x="-940" y="2140" id="X_ID_91">
      <name x="-920" y="2120">L44</name>
      <committed />
    </location>
    <location x="2440" y="1320" id="X_ID_92">
      <name x="2460" y="1300">L45</name>
      <committed />
    </location>
    <location x="2120" y="-640" id="X_ID_93">
      <name x="2140" y="-660">L46</name>
      <committed />
    </location>
    <location x="1920" y="1360" id="X_ID_94">
      <name x="1940" y="1340">L47</name>
      <committed />
    </location>
    <location x="1360" y="440" id="X_ID_95">
      <name x="1380" y="420">L48</name>
      <committed />
    </location>
    <location x="1560" y="1560" id="X_ID_96">
      <name x="1580" y="1540">L49</name>
      <committed />
    </location>
    <location x="440" y="1360" id="X_ID_97">
      <name x="460" y="1340">L50</name>
      <committed />
    </location>
    <location x="1360" y="1920" id="X_ID_98">
      <name x="1380" y="1900">L51</name>
      <committed />
    </location>
    <location x="-640" y="2120" id="X_ID_99">
      <name x="-620" y="2100">L52</name>
      <committed />
    </location>
    <location x="1320" y="2440" id="X_ID_100">
      <name x="1340" y="2420">L53</name>
      <committed />
    </location>
    <location x="2740" y="-1580" id="X_ID_101">
      <name x="2760" y="-1600">L54</name>
      <committed />
    </location>
    <location x="2420" y="1620" id="X_ID_102">
      <name x="2440" y="1600">L55</name>
      <committed />
    </location>
    <location x="2220" y="-340" id="X_ID_103">
      <name x="2240" y="-360">L56</name>
      <committed />
    </location>
    <location x="1660" y="1660" id="X_ID_104">
      <name x="1680" y="1640">L57</name>
      <committed />
    </location>
    <location x="1860" y="740" id="X_ID_105">
      <name x="1880" y="720">L58</name>
      <committed />
    </location>
    <location x="740" y="1860" id="X_ID_106">
      <name x="760" y="1840">L59</name>
      <committed />
    </location>
    <location x="1660" y="1660" id="X_ID_107">
      <name x="1680" y="1640">L60</name>
      <committed />
    </location>
    <location x="-340" y="2220" id="X_ID_108">
      <name x="-320" y="2200">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="174" y="206">PcOdfltENTRYtrpcmkr2sbCmpt6!</label>
    </transition>
    <transition x="490" y="70">
      <source ref="X_ID_20" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="515" y="85">PcOIdlENTRYtrpcmkr2sbCmpt6!</label>
    </transition>
    <transition x="330" y="170">
      <source ref="X_ID_21" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="339" y="195">PcOVVIENTRYtrpcmkr2sbCmpt6!</label>
    </transition>
    <transition x="230" y="330">
      <source ref="X_ID_22" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="229" y="371">PcOVVTENTRYtrpcmkr2sbCmpt6!</label>
    </transition>
    <transition x="640" y="-60">
      <source ref="X_ID_23" />
      <target ref="X_ID_18" />
      <label kind="synchronisation" x="680" y="-58">PcOAVIENTRYtrpcmkr2sbCmpt6!</label>
    </transition>
    <!--special location: idle-->
    <!--entry of sub-component [subComponent]-->
    <!--entry of sub-component [subComponent]-->
    <!--entry of sub-component [subComponent]-->
    <!--entry of sub-component [subComponent]-->
    <!--entry pseudo-transitions (OR component)-->
    <transition x="330" y="230">
      <source ref="X_ID_24" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="369" y="259">PcOffENTRYtrpcmkr2?</label>
    </transition>
    <transition x="630" y="270">
      <source ref="X_ID_24" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="639" y="295">PcIdlENTRYtrpcmkr2?</label>
    </transition>
    <transition x="370" y="530">
      <source ref="X_ID_24" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="405" y="529">PcVVTENTRYtrpcmkr2?</label>
      <label kind="assignment" x="250" y="590">VVT_TIME := 0</label>
    </transition>
    <transition x="470" y="370">
      <source ref="X_ID_24" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="495" y="385">PcVVIENTRYtrpcmkr2?</label>
      <label kind="assignment" x="400" y="350">VVI_TIME := 0</label>
    </transition>
    <transition x="780" y="140">
      <source ref="X_ID_24" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="774" y="178">PcAVIENTRYtrpcmkr2?</label>
      <label kind="assignment" x="865" y="5">AVI_A_TIME := 0, AVI_V_TIME := 0</label>
    </transition>
    <!--ordinary transitions-->
    <!--entry of sub-component [subComponent]-->
    <transition x="30" y="190">
      <source ref="pacemaker2Pace.Off" />
      <target ref="X_ID_19" />
      <label kind="synchronisation" x="41" y="185">commandedOn?</label>
      <label kind="assignment" x="30" y="270">VVI_TIME := 0</label>
    </transition>
    <!--exit transitions-->
    <!--inserting next global join [5 root transitions]-->
    <transition x="380" y="320">
      <source ref="X_ID_18" />
      <target ref="X_ID_64" />
      <label kind="guard" x="347" y="105">triggerVar3 == 1</label>
      <label kind="synchronisation" x="386" y="300">commandedOff?</label>
      <label kind="assignment" x="405" y="475">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="259" y="369">xtSglNR6!</label>
    </transition>
    <transition x="100" y="480">
      <source ref="X_ID_18" />
      <target ref="X_ID_65" />
      <label kind="guard" x="263" y="153">triggerVar3 == 1</label>
      <label kind="synchronisation" x="134" y="444">toIdle?</label>
      <label kind="assignment" x="-15" y="715">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="221" y="581">xtSglNR6!</label>
    </transition>
    <transition x="790" y="190">
      <source ref="X_ID_18" />
      <target ref="X_ID_66" />
      <label kind="guard" x="470" y="67">triggerVar3 == 1</label>
      <label kind="synchronisation" x="755" y="183">toInhibited?</label>
      <label kind="assignment" x="1020" y="280">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="836" y="352">xtSglNR6!</label>
    </transition>
    <transition x="630" y="90">
      <source ref="X_ID_18" />
      <target ref="X_ID_67" />
      <label kind="guard" x="422" y="36">triggerVar3 == 1</label>
      <label kind="synchronisation" x="611" y="93">toTriggered?</label>
      <label kind="assignment" x="780" y="130">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="570" y="386">xtSglNR6!</label>
    </transition>
    <transition x="530" y="370">
      <source ref="X_ID_18" />
      <target ref="X_ID_68" />
      <label kind="guard" x="392" y="121">triggerVar3 == 1</label>
      <label kind="synchronisation" x="521" y="345">toAVI?</label>
      <label kind="assignment" x="630" y="550">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="829" y="343">xtSglNR6!</label>
    </transition>
    <!--inserting next global join [5 root transitions]-->
    <transition x="250" y="470">
      <source ref="X_ID_18" />
      <target ref="X_ID_69" />
      <label kind="guard" x="307" y="150">triggerVar4 == 1</label>
      <label kind="synchronisation" x="269" y="435">commandedOff?</label>
      <label kind="assignment" x="210" y="700">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="260" y="1074">xtSglNR7!</label>
    </transition>
    <transition x="200" y="640">
      <source ref="X_ID_70" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="226" y="710">xtSglNR6!</label>
    </transition>
    <transition x="940" y="-220">
      <source ref="X_ID_18" />
      <target ref="X_ID_71" />
      <label kind="guard" x="515" y="-57">triggerVar4 == 1</label>
      <label kind="synchronisation" x="890" y="-186">toIdle?</label>
      <label kind="assignment" x="1245" y="-335">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="1406" y="54">xtSglNR7!</label>
    </transition>
    <transition x="930" y="390">
      <source ref="X_ID_72" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="969" y="427">xtSglNR6!</label>
    </transition>
    <transition x="680" y="240">
      <source ref="X_ID_18" />
      <target ref="X_ID_73" />
      <label kind="guard" x="438" y="81">triggerVar4 == 1</label>
      <label kind="synchronisation" x="656" y="228">toInhibited?</label>
      <label kind="assignment" x="855" y="355">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="778" y="722">xtSglNR7!</label>
    </transition>
    <transition x="390" y="670">
      <source ref="X_ID_74" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="407" y="715">xtSglNR6!</label>
    </transition>
    <transition x="500" y="620">
      <source ref="X_ID_18" />
      <target ref="X_ID_75" />
      <label kind="guard" x="383" y="195">triggerVar4 == 1</label>
      <label kind="synchronisation" x="494" y="570">toTriggered?</label>
      <label kind="assignment" x="585" y="925">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="166" y="1374">xtSglNR7!</label>
    </transition>
    <transition x="-170" y="1090">
      <source ref="X_ID_76" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="-189" y="1145">xtSglNR6!</label>
    </transition>
    <transition x="1090" y="390">
      <source ref="X_ID_18" />
      <target ref="X_ID_77" />
      <label kind="guard" x="560" y="126">triggerVar4 == 1</label>
      <label kind="synchronisation" x="1025" y="363">toAVI?</label>
      <label kind="assignment" x="1470" y="580">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="1706" y="356">xtSglNR7!</label>
    </transition>
    <transition x="1230" y="-150">
      <source ref="X_ID_78" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="1269" y="-141">xtSglNR6!</label>
    </transition>
    <!--inserting next global join [5 root transitions]-->
    <transition x="830" y="490">
      <source ref="X_ID_18" />
      <target ref="X_ID_79" />
      <label kind="guard" x="482" y="156">triggerVar5 == 1</label>
      <label kind="synchronisation" x="791" y="453">commandedOff?</label>
      <label kind="assignment" x="1080" y="730">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="1078" y="880">xtSglNR8!</label>
    </transition>
    <transition x="400" y="400">
      <source ref="X_ID_80" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="446" y="446">xtSglNR6!</label>
    </transition>
    <transition x="650" y="670">
      <source ref="X_ID_18" />
      <target ref="X_ID_81" />
      <label kind="guard" x="428" y="211">triggerVar5 == 1</label>
      <label kind="synchronisation" x="629" y="615">toIdle?</label>
      <label kind="assignment" x="810" y="1000">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="466" y="1420">xtSglNR8!</label>
    </transition>
    <transition x="240" y="820">
      <source ref="X_ID_82" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="210" y="900">xtSglNR6!</label>
    </transition>
    <transition x="550" y="930">
      <source ref="X_ID_18" />
      <target ref="X_ID_83" />
      <label kind="guard" x="398" y="288">triggerVar5 == 1</label>
      <label kind="synchronisation" x="539" y="849">toInhibited?</label>
      <label kind="assignment" x="660" y="1390">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="1391" y="599">xtSglNR8!</label>
    </transition>
    <transition x="1230" y="-310">
      <source ref="X_ID_84" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="1331" y="-363">xtSglNR6!</label>
    </transition>
    <transition x="1080" y="540">
      <source ref="X_ID_18" />
      <target ref="X_ID_85" />
      <label kind="guard" x="557" y="171">triggerVar5 == 1</label>
      <label kind="synchronisation" x="1016" y="498">toTriggered?</label>
      <label kind="assignment" x="1455" y="805">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="1740" y="656">xtSglNR8!</label>
    </transition>
    <transition x="870" y="390">
      <source ref="X_ID_86" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="955" y="375">xtSglNR6!</label>
    </transition>
    <transition x="700" y="640">
      <source ref="X_ID_18" />
      <target ref="X_ID_87" />
      <label kind="guard" x="444" y="201">triggerVar5 == 1</label>
      <label kind="synchronisation" x="674" y="588">toAVI?</label>
      <label kind="assignment" x="885" y="955">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="1160" y="1180">xtSglNR8!</label>
    </transition>
    <transition x="1100" y="460">
      <source ref="X_ID_88" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="1126" y="530">xtSglNR6!</label>
    </transition>
    <!--inserting next global join [5 root transitions]-->
    <transition x="240" y="820">
      <source ref="X_ID_18" />
      <target ref="X_ID_89" />
      <label kind="guard" x="305" y="255">triggerVar7 == 2</label>
      <label kind="synchronisation" x="260" y="750">commandedOff?</label>
      <label kind="assignment" x="195" y="1225">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="564" y="1720">xtSglNR11!</label>
    </transition>
    <transition x="60" y="1980">
      <source ref="X_ID_90" />
      <target ref="X_ID_91" />
      <label kind="synchronisation" x="170" y="1974">xtSglNR10!</label>
    </transition>
    <transition x="750" y="1730">
      <source ref="X_ID_91" />
      <target ref="X_ID_92" />
      <label kind="synchronisation" x="591" y="1781">xtSglNR9!</label>
    </transition>
    <transition x="1240" y="680">
      <source ref="X_ID_92" />
      <target ref="pacemaker2Pace.Off" />
      <label kind="synchronisation" x="1370" y="754">xtSglNR6!</label>
    </transition>
    <transition x="1230" y="-310">
      <source ref="X_ID_18" />
      <target ref="X_ID_93" />
      <label kind="guard" x="602" y="-85">triggerVar7 == 2</label>
      <label kind="synchronisation" x="1151" y="-267">toIdle?</label>
      <label kind="assignment" x="1680" y="-470">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="2040" y="270">xtSglNR11!</label>
    </transition>
    <transition x="1640" y="900">
      <source ref="X_ID_94" />
      <target ref="X_ID_95" />
      <label kind="synchronisation" x="1678" y="956">xtSglNR10!</label>
    </transition>
    <transition x="1460" y="1000">
      <source ref="X_ID_95" />
      <target ref="X_ID_96" />
      <label kind="synchronisation" x="1460" y="954">xtSglNR9!</label>
    </transition>
    <transition x="1100" y="840">
      <source ref="X_ID_96" />
      <target ref="X_ID_20" />
      <label kind="synchronisation" x="1156" y="922">xtSglNR6!</label>
    </transition>
    <transition x="390" y="690">
      <source ref="X_ID_18" />
      <target ref="X_ID_97" />
      <label kind="guard" x="350" y="217">triggerVar7 == 2</label>
      <label kind="synchronisation" x="395" y="633">toInhibited?</label>
      <label kind="assignment" x="420" y="1030">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="864" y="1622">xtSglNR11!</label>
    </transition>
    <transition x="360" y="2020">
      <source ref="X_ID_98" />
      <target ref="X_ID_99" />
      <label kind="synchronisation" x="470" y="2020">xtSglNR10!</label>
    </transition>
    <transition x="340" y="2280">
      <source ref="X_ID_99" />
      <target ref="X_ID_100" />
      <label kind="synchronisation" x="252" y="2274">xtSglNR9!</label>
    </transition>
    <transition x="820" y="1380">
      <source ref="X_ID_100" />
      <target ref="X_ID_21" />
      <label kind="synchronisation" x="880" y="1496">xtSglNR6!</label>
    </transition>
    <transition x="1540" y="-780">
      <source ref="X_ID_18" />
      <target ref="X_ID_101" />
      <label kind="guard" x="695" y="-225">triggerVar7 == 2</label>
      <label kind="synchronisation" x="1430" y="-690">toTriggered?</label>
      <label kind="assignment" x="2145" y="-1175">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="2606" y="-130">xtSglNR11!</label>
    </transition>
    <transition x="2320" y="640">
      <source ref="X_ID_102" />
      <target ref="X_ID_103" />
      <label kind="synchronisation" x="2340" y="748">xtSglNR10!</label>
    </transition>
    <transition x="1940" y="660">
      <source ref="X_ID_103" />
      <target ref="X_ID_104" />
      <label kind="synchronisation" x="1978" y="570">xtSglNR9!</label>
    </transition>
    <transition x="890" y="1150">
      <source ref="X_ID_104" />
      <target ref="X_ID_22" />
      <label kind="synchronisation" x="977" y="1211">xtSglNR6!</label>
    </transition>
    <transition x="1100" y="380">
      <source ref="X_ID_18" />
      <target ref="X_ID_105" />
      <label kind="guard" x="563" y="124">triggerVar7 == 2</label>
      <label kind="synchronisation" x="1034" y="354">toAVI?</label>
      <label kind="assignment" x="1485" y="565">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="1366" y="1254">xtSglNR11!</label>
    </transition>
    <transition x="1200" y="1760">
      <source ref="X_ID_106" />
      <target ref="X_ID_107" />
      <label kind="synchronisation" x="1164" y="1780">xtSglNR10!</label>
    </transition>
    <transition x="660" y="1940">
      <source ref="X_ID_107" />
      <target ref="X_ID_108" />
      <label kind="synchronisation" x="770" y="1922">xtSglNR9!</label>
    </transition>
    <transition x="300" y="1040">
      <source ref="X_ID_108" />
      <target ref="X_ID_23" />
      <label kind="synchronisation" x="246" y="1168">xtSglNR6!</label>
    </transition>
  </template>
  <!-- ****** END OF TEMPLATE "pacemaker2"  -->
  <instantiation>heartsim4 := heartsim4();
heartsim4Detail5 := heartsim4Detail5();
programmersim3 := programmersim3();
pacemaker2 := pacemaker2();
pacemaker2subComponent6 := pacemaker2subComponent6();
pacemaker2subComponent6AVIMode9 := pacemaker2subComponent6AVIMode9();
pacemaker2subComponent6AVIMode9VPart11 := pacemaker2subComponent6AVIMode9VPart11();
pacemaker2subComponent6AVIMode9APart10 := pacemaker2subComponent6AVIMode9APart10();
pacemaker2subComponent6VVTMode8 := pacemaker2subComponent6VVTMode8();
pacemaker2subComponent6VVIMode7 := pacemaker2subComponent6VVIMode7();
globalKickoff12 := globalKickoff12();</instantiation>
  <system>system heartsim4, heartsim4Detail5, programmersim3, pacemaker2, pacemaker2subComponent6, pacemaker2subComponent6AVIMode9, pacemaker2subComponent6AVIMode9VPart11, pacemaker2subComponent6AVIMode9APart10, pacemaker2subComponent6VVTMode8, pacemaker2subComponent6VVIMode7, globalKickoff12;
</system>
</nta>

