Location: A review of cardiac cellular electrophysiology models @ bbd06c65e953 / models / 1998_noble / 1998_noble.xml

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2010-07-06 16:53:49+12:00
Desc:
removing duplicated connection picked up while working on tracker item 2521
Permanent Source URI:
https://models.fieldml.org/workspace/a1/rawfile/bbd06c65e953d30d2761a3852de606f2abd45174/models/1998_noble/1998_noble.xml

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


<!--  FILE :  noble_model_1998.xml

CREATED :  18th December 2001

LAST MODIFIED : 22nd July 2002

AUTHOR :  Catherine Lloyd
          Department of Engineering Science
          The University of Auckland
          
MODEL STATUS :  This model conforms to the CellML 1.0 Specification released on
10th August 2001, and the 16/1/02 CellML Metadata 1.0 Specification.

DESCRIPTION :  This file contains a CellML description of Noble's 1998 improved
guinea-pig ventricular cell model.

CHANGES:  
  04/01/2002 - CML - Altered some of the connections.
  21/01/2002 - AAC - Updated metadata to conform to the 16/1/02 CellML Metadata
                     1.0 Specification.
  25/02/2002 - CML - Corrected i_K1 and i_K_ACh calculations.
  26/02/2002 - CML - Corrected several more equations.
  01/03/2002 - CML - Corrected units.
  06/05/2002 - CML - Added some initial values.  Removed the blocked h_gate 
                     component from the fast sodium current as it belongs to a
                     separate model which considers the effect of drugs.
  22/07/2002 - CML - Added more metadata.
  08/02/2003 - DPN - Added encapsulation hierarchy for transient_outward_current.
-->

<!--
  This version of the Noble 1998 model is extensively modified from the
  version available in the CellML model repository on cellml.org. The default
  variable values are all included in this model description, although this
  should change when we go to CellML 1.1.
-->

<model
    name="noble_model_1998"
    cmeta:id="noble_model_1998"
    xmlns="http://www.cellml.org/cellml/1.0#"
    xmlns:cellml="http://www.cellml.org/cellml/1.0#"
    xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
    
  <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#"
      xmlns:bqs="http://www.cellml.org/bqs/1.0#"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:dcterms="http://purl.org/dc/terms/"
      xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"
      xmlns:cs="http://www.cellml.org/metadata/simulation/1.0#">
    <!--
      The following RDF block contains metadata that applies to this document
      as a whole, as indicated by the empty about attribute on the 
      <rdf:Description> element.
    -->
    <rdf:Description rdf:about="">
      <!--
        The Model Builder Metadata.  The Dublin Core "creator" element is used  
        to indicate the person who translated the model into CellML.
      -->
      <dc:creator rdf:parseType="Resource">
        <vCard:N rdf:parseType="Resource">
          <vCard:Family>Lloyd</vCard:Family>
          <vCard:Given>Catherine</vCard:Given>
          <vCard:Other>May</vCard:Other>
        </vCard:N>
        <vCard:EMAIL rdf:parseType="Resource">
          <rdf:value>c.lloyd@auckland.ac.nz</rdf:value>
          <rdf:type rdf:resource="http://imc.org/vCard/3.0#internet" />
        </vCard:EMAIL>
        <vCard:ORG rdf:parseType="Resource">
          <vCard:Orgname>The University of Auckland</vCard:Orgname>
          <vCard:Orgunit>The Bioengineering Research Group</vCard:Orgunit>
        </vCard:ORG>
      </dc:creator>
      
      <!--
        The Creation Date metadata. This is the date on which the model
        was translated into CellML.
      -->
      <dcterms:created rdf:parseType="Resource">
        <dcterms:W3CDTF>2001-12-18</dcterms:W3CDTF>
      </dcterms:created>
      
      <!--
        The Modification History metadata. This lists the changes that have been
        made to the document, who made the changes, and when they were made.
      -->
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Encapsulated the model under an interface component for use when
          importing the model into a specific experiment or simulation.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Nickerson</vCard:Family>
            <vCard:Given>David</vCard:Given>
            <vCard:Other>P</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource"> 
          <dcterms:W3CDTF>2004-12-23</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Added more metadata.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource"> 
          <dcterms:W3CDTF>2002-07-22</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Corrected units.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-03-01</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Corrected several equations.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-02-26</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Corrected the i_K1 and i_K_ACh calculations.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-01-04</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Updated metadata to conform to the 16/1/02 CellML Metadata 1.0 
          Specification.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Cuellar</vCard:Family>
            <vCard:Given>Autumn</vCard:Given>
            <vCard:Other>A.</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-01-21</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Altered some of the connections.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-01-04</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Added some initial values from Penny Noble's documentation.  Removed 
          the blocked h_gate component from the fast sodium current as it 
          belongs to a separate model which considers the effect of drugs.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Lloyd</vCard:Family>
            <vCard:Given>Catherine</vCard:Given>
            <vCard:Other>May</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2002-05-06</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      <cmeta:modification rdf:parseType="Resource">
        <rdf:value>
          Fixed up the CellML/MathML to enable the model to be solved in CMISS. The
          model is no longer a direct translation of the Noble 1998 article, but
          I believe it accurately represents the intent of the model.
        </rdf:value>
        <cmeta:modifier rdf:parseType="Resource">
          <vCard:N rdf:parseType="Resource">
            <vCard:Family>Nickerson</vCard:Family>
            <vCard:Given>David</vCard:Given>
            <vCard:Other>P</vCard:Other>
          </vCard:N>
        </cmeta:modifier>
        <dcterms:modified rdf:parseType="Resource">
          <dcterms:W3CDTF>2003-04-05</dcterms:W3CDTF>
        </dcterms:modified>
      </cmeta:modification>
      
      <!-- The Publisher metadata. -->
      <dc:publisher>
        Bioengineering Institute, The University of Auckland.
      </dc:publisher>
    </rdf:Description>
    
    <!--
      The following metadata refers to the model itself, as indicated by the
      reference to the ID "noble_model_1998", which is declared on the    
      <model> element.
    -->
    <rdf:Description rdf:about="#noble_model_1998">
      <!-- A human readable name for the model. -->
      <dc:title>
        The Noble 1998 Improved Guinea-Pig Ventricular Cell Model
      </dc:title>
      
      <!-- A comment regarding the model. -->
      <cmeta:comment rdf:parseType="Resource">
        <rdf:value>
          This is the CellML description of Noble's 1998 improved guinea-pig 
          ventricular cell model.  It incorporates a diadic space, rapid and 
          slow potassium currents and length- and tension-dependent processes.
        </rdf:value>
        <!-- The creator of the comment. -->
        <dc:creator rdf:parseType="Resource">
          <vCard:FN>Catherine Lloyd</vCard:FN>
        </dc:creator>
      </cmeta:comment>
      
      <cmeta:species>Guinea-Pig</cmeta:species>
      
      <cmeta:bio_entity>Ventricular Myocyte</cmeta:bio_entity>
      
      <!-- 
        The CellML Metadata Specification recommends that bibliographic metadata
        is used to provide information about the original model reference.  The 
        "identifier" attribute on the "BibliographicReference" class provides an
        elegant way to identify a cited reference using a database identifier
        such as Pubmed.  All associated data such as author, journal title,     
        date, etc can be looked up on the database.
      -->      
      <bqs:reference>
        <bqs:Pubmed_id>9487284</bqs:Pubmed_id>
      </bqs:reference>
      <cs:simulation>
        <rdf:Description rdf:ID="simulation">
          <cs:multistepMethod>bdf</cs:multistepMethod>
          <cs:iterationMethod>newton</cs:iterationMethod>
          <cs:linearSolver>dense</cs:linearSolver>
          <cs:boundIntervals rdf:parseType="Collection">
            <rdf:Description>
              <cs:boundVariable>
                <rdf:Description rdf:about="generic.xml#time"/>
              </cs:boundVariable>
              <cs:maximumStepSize rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
                0.01
              </cs:maximumStepSize>
              <cs:tabulationStepSize rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
                1.0
              </cs:tabulationStepSize>
              <cs:startingValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
                0
              </cs:startingValue>
              <cs:endingValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
                700
              </cs:endingValue>
            </rdf:Description>
          </cs:boundIntervals>
        </rdf:Description>
      </cs:simulation>
    </rdf:Description>
  </rdf:RDF>
  
  <!--
    Standard CMISS units
  -->
  <units name="mm">
    <unit units="metre" prefix="milli"/>
  </units>
  <units name="ng">
    <unit units="gram" prefix="nano"/>
  </units>
  <units name="ms">
    <unit units="second" prefix="milli"/>
  </units>
  <units name="uA">
    <unit units="ampere" prefix="micro"/>
  </units>
  <units name="K">
    <unit units="kelvin"/>
  </units>
  <units name="nmol">
    <unit units="mole" prefix="nano"/>
  </units>
  
  <units name="mm2">
    <unit units="mm" exponent="2"/>
  </units>
  <units name="mm3">
    <unit units="mm" exponent="3"/>
  </units>
  <units name="mV">
    <unit units="volt" prefix="milli"/>
  </units>
  <units name="mS">
    <unit units="siemens" prefix="milli"/>
  </units>
  <units name="mS_per_mmsq">
    <unit units="mS"/>
    <unit units="mm" exponent="-2"/>
  </units>
  <units name="mS_per_mm">
    <unit units="mS"/>
    <unit units="mm" exponent="-1"/>
  </units>
  <units name="uA_per_mmsq">
    <unit units="uA"/>
    <unit units="mm" exponent="-2"/>
  </units>
  <units name="uA_per_mmcu">
    <unit units="uA"/>
    <unit units="mm" exponent="-3"/>
  </units>
  <units name="nC">
    <unit units="coulomb" prefix="nano"/>
  </units>
  <units name="uF">
    <unit units="farad" prefix="micro"/>
  </units>
  <units name="uF_per_mmsq">
    <unit units="uF"/>
    <unit units="mm" exponent="-2"/>
  </units>
  <units name="mM">
    <unit units="nmol"/>
    <unit units="mm" exponent="-3"/>
  </units>
  <units name="mM_per_ms">
    <unit units="mM"/>
    <unit units="ms" exponent="-1"/>
  </units>
  <units name="nN">
    <unit units="newton" prefix="nano"/>
  </units>
  <units name="mPa">
    <unit units="pascal" prefix="milli"/>
  </units>
  <units name="pJ">
    <unit units="joule" prefix="pico"/>
  </units>
  <units name="nW">
    <unit units="watt" prefix="nano"/>
  </units>
  
  <units name="per_ms">
    <unit units="ms" exponent="-1"/>
  </units>
  <units name="per_mm">
    <unit units="mm" exponent="-1"/>
  </units>
  <units name="per_mV_per_ms">
    <unit units="mV" exponent="-1"/>
    <unit units="per_ms"/>
  </units>
  <units name="per_mM_per_ms">
    <unit units="mM" exponent="-1"/>
    <unit units="per_ms"/>
  </units>
  <units name="uA_per_mmsq_per_mM">
    <unit units="uA"/>
    <unit units="mm" exponent="-2"/>
    <unit units="mM" exponent="-1"/>
  </units>
  
  <units name="gas_constant">
    <unit units="pJ"/>
    <unit units="nmol" exponent="-1"/>
    <unit units="K" exponent="-1"/>
  </units>
  
  <units name="faradays_constant">
    <unit units="nC"/>
    <unit units="nmol" exponent="-1"/>
  </units>
  
  <component name="environment" cmeta:id="environment">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#environment">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            This component is used to declare variables that are used by
            all or most of the other components, in this case just `time'.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <variable cmeta:id="time" name="time" public_interface="out" units="ms"/>
  </component>

  <component name="membrane" cmeta:id="membrane">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#membrane">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            This component is the `root' node of our model.
            It defines the action potential variable `V'.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        cmeta:id="Vm" name="V" public_interface="out"
        initial_value="-92.499" units="mV" />
    <variable
        name="R" public_interface="out"
        initial_value="8314.472" units="gas_constant" />
    <variable
        name="T" public_interface="out"
        initial_value="310.0" units="K" />
    <variable
        name="F" public_interface="out"
        initial_value="96485.0" units="faradays_constant" />
    <variable name="Am" public_interface="out" 
        initial_value="193.69" units="per_mm"/>
    
    <variable name="Cm" initial_value="0.014651" units="uF_per_mmsq" />
    
    <variable name="time" public_interface="in" units="ms" />
    <variable name="i_K1" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_to" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_ATP" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_NaK" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_p_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_NaCa" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_NaCa_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Ca" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Ca_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_Ca" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Na_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ns_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_An_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_ACh" public_interface="in" units="uA_per_mmsq" />
    
    <variable name="IStim" units="uA_per_mmsq"/>
    <variable name="stimTime" initial_value="100.0" units="ms"/>
    <variable name="stimDuration" initial_value="1.0" units="ms"/>
    <variable name="stimCurrent" initial_value="250" units="uA_per_mmcu"/> 

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#IStim_for_cmiss_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Control the stimulus current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="IStim_for_cmiss_eq">
      <apply id="stimulus_calculation"><eq />
        <ci>IStim</ci>
        <piecewise>
          <piece>
            <apply><divide/>
              <ci>stimCurrent</ci>
              <ci>Am</ci>
            </apply>
            <apply><and/>
              <apply><geq/>
                <ci>time</ci>
                <ci>stimTime</ci>
              </apply>
              <apply><leq/>
                <ci>time</ci>
                <apply><plus/>
                  <ci>stimTime</ci>
                  <ci>stimDuration</ci>
                </apply>
              </apply>
            </apply>
          </piece>
          <otherwise>
            <cn cellml:units="uA_per_mmsq">0.0</cn>
          </otherwise>
        </piecewise>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#membrane_voltage_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The ODE governing the membrane potential -- given by the summation of the
            ionic currents and an applied stimulus.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="membrane_voltage_diff_eq">
      <apply id="membrane_voltage_diff_eq"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> V </ci>
        </apply>
        <apply><divide />
          <apply><minus/>
            <ci>IStim</ci>
            <apply><plus />
              <ci> i_K1 </ci>
              <ci> i_to </ci>
              <ci> i_K </ci>
              <ci> i_K_ATP </ci>
              <ci> i_b_K </ci>
              <ci> i_NaK </ci>
              <ci> i_Na </ci>
              <ci> i_b_Na </ci>
              <ci> i_p_Na </ci>
              <ci> i_NaCa </ci>
              <ci> i_NaCa_ds </ci>
              <ci> i_Ca_L_Ca </ci>
              <ci> i_Ca_L_Ca_ds </ci>
              <ci> i_Ca_L_K </ci>
              <ci> i_Ca_L_K_ds </ci>
              <ci> i_Ca_L_Na </ci>
              <ci> i_Ca_L_Na_ds </ci>
              <ci> i_b_Ca </ci>
              <ci> i_Na_stretch </ci>
              <ci> i_K_stretch </ci>
              <ci> i_Ca_stretch </ci>
              <ci> i_Ns_stretch </ci>
              <ci> i_An_stretch </ci>
              <ci> i_K_ACh </ci>
            </apply><!--plus-->
          </apply><!--minus-->
          <ci>Cm</ci>
        </apply><!--divide-->
      </apply><!--eq-->
    </math>
  </component>
  
  <component name="reversal_potentials" cmeta:id="reversal_potentials">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#reversal_potentials">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A component that conveniently keeps the reversal potential calculations
            together.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="E_Na" public_interface="out" units="mV" />
    <variable name="E_K" public_interface="out" units="mV" />
    <variable name="E_Ks" public_interface="out" units="mV" />
    <variable name="E_Ca" public_interface="out" units="mV" />
    <variable name="E_mh" public_interface="out" units="mV" />
    
    <variable name="P_kna" initial_value="0.03" units="dimensionless" />
    <variable name="P_nak" initial_value="0.12" units="dimensionless" />
    
    <variable name="K_o" public_interface="in" units="mM" />
    <variable name="Na_o" public_interface="in" units="mM" />
    <variable name="K_i" public_interface="in" units="mM" />
    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="Ca_o" public_interface="in" units="mM" />
    <variable name="Ca_i" public_interface="in" units="mM" />
    <variable name="R" public_interface="in" units="gas_constant" />
    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="T" public_interface="in" units="K" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#E_Na_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium reversal potential from the current intra- and
            extracellular concentration of sodium ions.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="E_Na_calculation_eq">
      <apply id="E_Na_calculation"><eq />
        <ci> E_Na </ci>
        <apply><times />
          <apply><divide />
            <apply><times />
              <ci> R </ci>
              <ci> T </ci>
            </apply>
            <ci> F </ci>
          </apply>
          <apply><ln />
            <apply><divide />
              <ci> Na_o </ci>
              <ci> Na_i </ci>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#E_K_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the potassium reversal potential from the current intra- and
            extracellular concentration of potassium ions.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="E_K_calculation_eq">
      <apply id="E_K_calculation"><eq />
        <ci> E_K </ci>
        <apply><times />
          <apply><divide />
            <apply><times />
              <ci> R </ci>
              <ci> T </ci>
            </apply>
            <ci> F </ci>
          </apply>
          <apply><ln />
            <apply><divide />
              <ci> K_o </ci>
              <ci> K_i </ci>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#E_Ks_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the potassium reversal potential for the slow component of
            the delayed rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="E_Ks_calculation_eq">
      <apply id="E_Ks_calculation"><eq />
        <ci> E_Ks </ci>
        <apply><times />
          <apply><divide />
            <apply><times />
              <ci> R </ci>
              <ci> T </ci>
            </apply>
            <ci> F </ci>
          </apply>
          <apply><ln />
            <apply><divide />
              <apply><plus />
                <ci> K_o </ci>
                <apply><times />
                  <ci> P_kna </ci>
                  <ci> Na_o </ci>
                </apply>
              </apply>
              <apply><plus />
                <ci> K_i </ci>
                <apply><times />
                  <ci> P_kna </ci>
                  <ci> Na_i </ci>
                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#E_Ca_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the calcium reversal potential.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="E_Ca_calculation_eq">
      <apply id="E_Ca_calculation"><eq />
        <ci> E_Ca </ci>
        <apply><times />
          <cn cellml:units="dimensionless">0.5</cn>
          <apply><divide />
            <apply><times />
              <ci> R </ci>
              <ci> T </ci>
            </apply>
            <ci> F </ci>
          </apply>
          <apply><ln />
            <apply><divide />
              <ci> Ca_o </ci>
              <ci> Ca_i </ci>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#E_mh_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the reversal potential for the fast sodium channel.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="E_mh_calculation_eq">
      <apply id="E_mh_calculation"><eq />
        <ci> E_mh </ci>
        <apply><times />
          <apply><divide />
            <apply><times />
              <ci> R </ci>
              <ci> T </ci>
            </apply>
            <ci> F </ci>
          </apply>
          <apply><ln />
            <apply><divide />
              <apply><plus />
                <ci> Na_o </ci>
                <apply><times />
                  <ci> P_nak </ci>
                  <ci> K_o </ci>
                </apply>
              </apply>
              <apply><plus />
                <ci> Na_i </ci>
                <apply><times />
                  <ci> P_nak </ci>
                  <ci> K_i </ci>
                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
      
  <component name="time_independent_potassium_current" cmeta:id="time_independent_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#time_independent_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Description of the time independent inward potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    
    <variable name="i_K1" public_interface="out" units="uA_per_mmsq" />
    <variable
        name="K_mk1" public_interface="out"
        initial_value="10.0" units="mM" /> 
    
    <variable name="g_K1" initial_value="77.11e-3" units="mS_per_mmsq" />
    
    <variable name="K_o" public_interface="in" units="mM" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="E_K" public_interface="in" units="mV" />
    <variable name="R" public_interface="in" units="gas_constant" />
    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="T" public_interface="in" units="K" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_K1_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the time independent potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_K1_calculation_eq">
      <apply id="i_K1_calculation"><eq />
        <ci> i_K1 </ci>
        <apply><times />
          <ci> g_K1 </ci>
          <apply><divide />
            <ci> K_o </ci>
            <apply><plus />
              <ci> K_o </ci>
              <ci> K_mk1 </ci>
            </apply>
          </apply>
          <apply><divide />
            <apply><minus />
              <ci> V </ci>
              <ci> E_K </ci>
            </apply>
            <apply><plus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><divide />
                  <apply><times/>
                    <cn cellml:units="dimensionless"> 1.25 </cn>
                    <apply><minus />
                      <ci> V </ci>
                      <apply><plus />
                        <ci> E_K </ci>
                        <cn cellml:units="mV"> 10.0 </cn>
                      </apply>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="total_potassium_current" cmeta:id="total_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#total_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A component to group the potassium currents.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <variable name="i_K" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Kr" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ks" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_KNa" public_interface="in" units="uA_per_mmsq" /> 
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_K_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Simple summation of the individual potassium currents into a 
            single current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_K_calculation_eq">
      <apply id="i_K_calculation"><eq />
        <ci> i_K </ci>
        <apply><plus />
          <ci> i_Kr </ci>
          <ci> i_Ks </ci>
          <ci> i_KNa </ci>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="rapid_time_dependent_potassium_current" cmeta:id="rapid_time_dependent_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#rapid_time_dependent_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rapid component of the delayed rectifier current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Kr" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_Kr1" initial_value="0.32386e-3" units="mS_per_mmsq" />
    <variable name="g_Kr2" initial_value="0.20049e-3" units="mS_per_mmsq" />
    
    <variable name="E_K" public_interface="in" units="mV" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    <variable
        name="V" public_interface="in"
        private_interface="out" units="mV" />
    
    <variable name="Xr1" private_interface="in" units="dimensionless" />
    <variable name="Xr2" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Kr_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the rapid component of the delayed rectifier current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Kr_calculation_eq">
      <apply id="i_Kr_calculation"><eq />
        <ci> i_Kr </ci>
        <apply><times />
          <apply><plus />
            <apply><times />
              <ci> g_Kr1 </ci>
              <ci> Xr1 </ci>
            </apply>
            <apply><times />
              <ci> g_Kr2 </ci>
              <ci> Xr2 </ci>
            </apply>
          </apply>
          <apply><divide />
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><divide />
                  <apply><plus />
                    <ci> V </ci>
                    <cn cellml:units="mV"> 9.0 </cn>
                  </apply>
                  <cn cellml:units="mV"> 22.4 </cn>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus />
            <ci> V </ci>
            <ci> E_K </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="rapid_time_dependent_potassium_current_Xr1_gate" cmeta:id="rapid_time_dependent_potassium_current_Xr1_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#rapid_time_dependent_potassium_current_Xr1_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The fast activation gate for the rapid component of the delayed 
            rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="Xr1" public_interface="out"
        initial_value="0.01428" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Xr1_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the fast gate of the rapid component
            of the delayed rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Xr1_diff_eq">
      <apply id="Xr1_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Xr1 </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <apply><divide />
              <cn cellml:units="per_ms"> 0.05 </cn>
              <apply><plus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><minus />
                      <apply><minus />
                        <ci> V </ci>
                        <cn cellml:units="mV"> 5.0 </cn>
                      </apply>
                    </apply>
                    <cn cellml:units="mV"> 9.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> Xr1 </ci>
            </apply>
          </apply>
          <apply><times />
            <cn cellml:units="per_ms"> 0.00005 </cn>
            <apply><exp />
              <apply><minus />
                <apply><divide />
                  <apply><minus />
                    <ci> V </ci>
                    <cn cellml:units="mV"> 20.0 </cn>
                  </apply>
                  <cn cellml:units="mV"> 15.0 </cn>
                </apply>
              </apply>
            </apply>
            <ci> Xr1 </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="rapid_time_dependent_potassium_current_Xr2_gate" cmeta:id="rapid_time_dependent_potassium_current_Xr2_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#rapid_time_dependent_potassium_current_Xr2_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The slow gate of the rapid component of the delayed rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="Xr2" public_interface="out"
        initial_value="0.5" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Xr2_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Gating kinetics for the slow gate of the rapid component of
            the delayed rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Xr2_diff_eq">
      <apply id="Xr2_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Xr2 </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <apply><divide />
              <cn cellml:units="per_ms"> 0.05 </cn>
              <apply><plus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><minus />
                      <apply><minus />
                        <ci> V </ci>
                        <cn cellml:units="mV"> 5.0 </cn>
                      </apply>
                    </apply>
                    <cn cellml:units="mV"> 9.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> Xr2 </ci>
            </apply>
          </apply>
          <apply><times />
            <cn cellml:units="per_ms"> 0.0004 </cn>
            <apply><exp />
              <apply><minus />
                <apply><power />
                  <apply><divide />
                    <apply><plus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 30.0 </cn>
                    </apply>
                    <cn cellml:units="mV"> 30.0 </cn>
                  </apply>
                  <cn cellml:units="dimensionless"> 3.0 </cn>
                </apply>
              </apply>
            </apply>
            <ci> Xr2 </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="slow_time_dependent_potassium_current" cmeta:id="slow_time_dependent_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#slow_time_dependent_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The slow component of the delayed rectifier current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Ks" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_Ks" initial_value="0.40097e-3" units="mS_per_mmsq" />
    
    <variable name="E_Ks" public_interface="in" units="mV" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    <variable
        name="V" public_interface="in"
        private_interface="out" units="mV" />
    
    <variable name="Xs" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ks_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the slow component current of the delayed rectifier.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ks_calculation_eq">
      <apply id="i_Ks_calculation"><eq />
        <ci> i_Ks </ci>
        <apply><times />
          <apply><times />
            <ci> g_Ks </ci>
            <apply><power />
              <ci> Xs </ci>
              <cn cellml:units="dimensionless"> 2.0 </cn>
            </apply>
          </apply>
          <apply><minus />
            <ci> V </ci>
            <ci> E_Ks </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="slow_time_dependent_potassium_current_Xs_gate" cmeta:id="slow_time_dependent_potassium_current_Xs_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#slow_time_dependent_potassium_current_Xs_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gate for the slow component of the delayed rectifier current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="Xs" public_interface="out"
        initial_value="0.5" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Xs_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the slow component of the delayed 
            rectifier current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Xs_diff_eq">
      <apply id="Xs_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Xs </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <apply><divide />
              <cn cellml:units="per_ms"> 0.014 </cn>
              <apply><plus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><minus />
                      <apply><minus />
                        <ci> V </ci>
                        <cn cellml:units="mV"> 40.0 </cn>
                      </apply>
                    </apply>
                    <cn cellml:units="mV"> 9.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> Xs </ci>
            </apply>
          </apply>
          <apply><times />
            <ci> Xs </ci>
            <cn cellml:units="per_ms"> 0.001 </cn>
            <apply><exp />
              <apply><divide />
                <apply><minus />
                  <ci> V </ci>
                </apply>
                <cn cellml:units="mV"> 45.0 </cn>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="potassium_background_current" cmeta:id="potassium_background_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#potassium_background_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Background potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_b_K" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_bk" initial_value="0.0" units="mS_per_mmsq" />
    
    <variable name="E_K" public_interface="in" units="mV" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_b_K_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the background potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_b_K_calculation_eq">
      <apply id="i_b_K_calculation"><eq />
        <ci> i_b_K </ci>
        <apply><times />
          <ci> g_bk </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_K </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="ATP_dependent_potassium_current" cmeta:id="ATP_dependent_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ATP_dependent_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            An ATP dependent potassium current. Included here for completeness, but 
            this current is only used when modelling ischaemia - and this version
            of the model has not been tested for this.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_K_ATP" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_K_ATP" initial_value="0.0" units="mS_per_mmsq" />
    <variable name="K_ATP" initial_value="0.1" units="mM" />
    <variable name="ATP" initial_value="5.0" units="mM" />
    
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_K_ATP_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the ATP dependent potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_K_ATP_calculation_eq">
      <apply id="i_K_ATP_calculation"><eq />
        <ci> i_K_ATP </ci>
        <apply><divide />
          <apply><times />
            <ci> g_K_ATP </ci>
            <apply><plus />
              <ci> V </ci>
              <cn cellml:units="mV"> 80.0 </cn>
            </apply>
          </apply>
          <apply><plus />
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><power />
              <apply><divide />
                <ci> ATP </ci>
                <ci> K_ATP </ci>
              </apply>
              <cn cellml:units="dimensionless"> 2.0 </cn>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="sodium_activated_potassium_current" cmeta:id="sodium_activated_potassium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#sodium_activated_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A sodium activated potassium current. Again, included for completeness
            but generally not used and untested.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_KNa" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_K_Na" initial_value="0.0" units="mS_per_mmsq" />
    <variable name="K_kna" initial_value="20.0" units="mM" />
    
    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="E_K" public_interface="in" units="mV" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_KNa_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium activated potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_KNa_calculation_eq">
      <apply id="i_KNa_calculation"><eq />
        <ci> i_KNa </ci>
        <apply><times />
          <ci> g_K_Na </ci>
          <apply><divide />
            <ci> Na_i </ci>
            <apply><plus />
              <ci> Na_i </ci>
              <ci> K_kna </ci>
            </apply>
          </apply>
          <apply><minus />
            <ci> V </ci>
            <ci> E_K </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="fast_sodium_current" cmeta:id="fast_sodium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#fast_sodium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The fast sodium current - the driving force of the upstroke of the
            cardiac action potential.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Na" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_Na" initial_value="385.5e-3" units="mS_per_mmsq" />
    
    <variable name="E_mh" public_interface="in" units="mV" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    <variable
        name="V" public_interface="in"
        private_interface="out" units="mV" />
    
    <variable name="m" private_interface="in" units="dimensionless" />
    <variable name="h" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Na_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the fast sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Na_calculation_eq">
      <apply id="i_Na_calculation"><eq />
        <ci> i_Na </ci>
        <apply><times />
          <ci> g_Na </ci>
          <apply><power />
            <ci> m </ci>
            <cn cellml:units="dimensionless"> 3.0 </cn>
          </apply>
          <ci> h </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_mh </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="fast_sodium_current_m_gate" cmeta:id="fast_sodium_current_m_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#fast_sodium_current_m_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The activation gate for the fast sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="m" public_interface="out"
        initial_value="0.0017" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <variable name="alpha" units="per_ms"/>
    <variable name="beta" units="per_ms"/>
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#m_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the activation gate of the fast sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="m_diff_eq">
      <apply id="m_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> m </ci>
        </apply>
        <apply><minus/>
          <apply><times/>
            <ci>alpha</ci>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> m </ci>
            </apply>
          </apply>
          <apply><times/>
            <ci>beta</ci>
            <ci>m</ci>
          </apply>
        </apply>
      </apply><!--m_diff_eq-->
    </math>    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#alpha_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the opening rate of the activation gate for the fast
            sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="alpha_calculation_eq">
      <apply id="alpha_calculation"><eq/>
        <ci>alpha</ci>
        <piecewise>
          <piece>
            <cn cellml:units="per_ms">2.0</cn>
            <apply><lt/>
              <apply><abs/>
                <apply><plus/>
                  <ci>V</ci>
                  <cn cellml:units="mV">41.0</cn>
                </apply>
              </apply>
              <cn cellml:units="mV">0.1e-4</cn>
            </apply><!--lt-->
          </piece>
          <otherwise>
            <apply><divide />
              <apply><times />
                <cn cellml:units="per_mV_per_ms"> 0.2 </cn>
                <apply><plus />
                  <ci> V </ci>
                  <cn cellml:units="mV"> 41.0 </cn>
                </apply>
              </apply>
              <apply><minus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><times />
                    <cn cellml:units="dimensionless"> -0.1 </cn>
                    <apply><plus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 41.0 </cn>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
          </otherwise>
        </piecewise>
      </apply><!--alpha_calculation-->
    </math>    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#beta_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the closing rate of the activation gate for the fast
            sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="beta_calculation_eq">
      <apply id="beta_calculation"><eq/>
        <ci>beta</ci>
        <apply><times/>
          <cn cellml:units="per_ms"> 8.0 </cn>
          <apply><exp />
            <apply><times />
              <cn cellml:units="dimensionless"> -0.055556 </cn>
              <apply><plus />
                <ci> V </ci>
                <cn cellml:units="mV"> 66.0 </cn>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply><!--beta_calculation-->
    </math>
  </component>
  
  <component name="fast_sodium_current_h_gate" cmeta:id="fast_sodium_current_h_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#fast_sodium_current_h_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The inactivation gate for the fast sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="h" public_interface="out"
        initial_value="0.9939474" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#h_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the inactivation gate of the fast sodium 
            current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="h_diff_eq">
      <apply id="h_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> h </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <apply><times />
              <cn cellml:units="per_ms"> 0.02 </cn>
              <apply><exp />
                <apply><times />
                  <cn cellml:units="dimensionless"> -0.125 </cn>
                  <apply><plus />
                    <ci> V </ci>
                    <cn cellml:units="mV"> 75.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> h </ci>
            </apply>
          </apply>
          <apply><times />
            <ci> h </ci>
            <apply><divide />
              <cn cellml:units="per_mV_per_ms"> 2.0 </cn>
              <apply><plus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><times />
                  <cn cellml:units="dimensionless"> 320.0 </cn>
                  <apply><exp />
                    <apply><times />
                      <cn cellml:units="dimensionless"> -0.1 </cn>
                      <apply><plus />
                        <ci> V </ci>
                        <cn cellml:units="mV"> 75.0 </cn>
                      </apply>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="persistent_sodium_current" cmeta:id="persistent_sodium_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#persistent_sodium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The persistent sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_p_Na" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_pna" initial_value="0.61688e-3" units="mS_per_mmsq" />
    
    <variable name="E_Na" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_p_Na_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the persistent sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_p_Na_calculation_eq">
      <apply id="i_p_Na_calculation"><eq />
        <ci> i_p_Na </ci>
        <apply><times />
          <ci> g_pna </ci>
          <apply><divide />
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><minus/>
                  <apply><divide />
                    <apply><plus />
                      <ci> V </ci> 
                      <cn cellml:units="mV"> 52.0 </cn>
                    </apply>
                    <cn cellml:units="mV"> 8.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus />
            <ci> V </ci>
            <ci> E_Na </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="sodium_background_current" cmeta:id="sodium_background_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#sodium_background_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The background sodium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_b_Na" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_bna" initial_value="0.092532e-3" units="mS_per_mmsq" />
    
    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="E_Na" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_b_Na_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium background current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_b_Na_calculation_eq">
      <apply id="i_b_Na_calculation"><eq />
        <ci> i_b_Na </ci>
        <apply><times />
          <ci> g_bna </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_Na </ci> 
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <!--  
    The "L_type_Ca_channel" component describes an inward ionic current which is
    the sum of Ca, Na and K ions through the membrane channel.  The channel has 
    one activation gate (d) and two inactivation gates (f and   
    f2 (or f2ds in the diadic space)).
  -->
  <component name="L_type_Ca_channel" cmeta:id="L_type_Ca_channel">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#L_type_Ca_channel">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            This component describes an inward ionic current which is the sum 
            of calcium, sodium and potassium ions through the membrane channel. 
            The channel has one activation gate (d) and two inactivation gates 
            (f and f2 (or f2ds in the diadic space)). A fraction of these channels
            (ICaLfract) open into the diadic subspace, with the remainder being
            evenly distributed throughout the membrane area.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Ca_L_Ca" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Ca_ds" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K_ds" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na_ds" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="P_ca" initial_value="15.422e-3" units="uA_per_mmsq_per_mM" />
    <variable name="P_caK" initial_value="0.002" units="dimensionless" />
    <variable name="P_caNa" initial_value="0.01" units="dimensionless" />
    <variable name="ICaLfract" initial_value="1.0" units="dimensionless"/>
    
    <variable name="Ca_o" public_interface="in" units="mM" />
    <variable
        name="Ca_i" public_interface="in"
        private_interface="out" units="mM" />
    <variable
        name="Ca_ds" public_interface="in"
        private_interface="out" units="mM" />
    <variable name="K_o" public_interface="in" units="mM" />
    <variable name="K_i" public_interface="in" units="mM" />
    <variable name="Na_o" public_interface="in" units="mM" />
    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="R" public_interface="in" units="gas_constant" />
    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="T" public_interface="in" units="K" />
    <variable name="K_cachoff" private_interface="out" initial_value="0.001" units="mM" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    <variable
        name="V" public_interface="in"
        private_interface="out" units="mV" />
        
    <variable name="ACh" units="mM" public_interface="in"/>
    
    <variable name="K_AChICaL" units="mM" initial_value="0.2e-6"/>
    
    <variable name="d" private_interface="in" units="dimensionless" />
    <variable name="f" private_interface="in" units="dimensionless" />
    <variable name="f2" private_interface="in" units="dimensionless" />
    <variable name="f2ds" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_Ca_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The calcium ion component of the total current through the channel into
            the bulk myoplasm.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_Ca_calculation_eq">
      <apply id="i_Ca_L_Ca_calculation"><eq />
        <ci> i_Ca_L_Ca </ci>
        <apply><times />
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <ci>ICaLfract</ci>
          </apply>
          <cn cellml:units="dimensionless"> 4.0 </cn>
          <ci> P_ca </ci>
          <ci> d </ci>
          <ci> f </ci>
          <ci> f2 </ci>
          <apply><divide />
            <apply><divide />
              <apply><minus />
                <ci> V </ci>
                <cn cellml:units="mV"> 50.0 </cn>
              </apply>
              <apply><divide />
                <apply><times />
                  <ci> R </ci>
                  <ci> T </ci>
                </apply>
                <ci> F </ci>
              </apply>
            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus />
            <apply><times />
              <ci> Ca_i </ci>
              <apply><exp />
                <apply><divide />
                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><times />
              <ci> Ca_o </ci>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>
              <apply><plus/>
                <ci>ACh</ci>
                <ci>K_AChICaL</ci>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_K_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The potassium ion component of the total current through the channel into
            the bulk myoplasm.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_K_calculation_eq">
      <apply id="i_Ca_L_K_calculation"><eq />
        <ci> i_Ca_L_K </ci>
        <apply><times />
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <ci>ICaLfract</ci>
          </apply>
          <ci> P_caK </ci>
          <ci> P_ca </ci>
          <ci> d </ci>
          <ci> f </ci>
          <ci> f2 </ci>
          <apply><minus />
            <apply><times />
              <ci> K_i </ci>
              <apply><exp />
                <apply><divide />
                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><times />
              <ci> K_o </ci>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>
              <apply><plus/>
                <ci>ACh</ci>
                <ci>K_AChICaL</ci>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_Na_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The sodium ion component of the total current through the channel into
            the bulk myoplasm.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_Na_calculation_eq">
      <apply id="i_Ca_L_Na_calculation"><eq />
        <ci> i_Ca_L_Na </ci>
        <apply><times />
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <ci>ICaLfract</ci>
          </apply>
          <ci> P_caNa </ci>
          <ci> P_ca </ci>
          <ci> d </ci>
          <ci> f </ci>
          <ci> f2 </ci>
          <apply><minus />
            <apply><times />
              <ci> Na_i </ci>
              <apply><exp />
                <apply><divide />
                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><times />
              <ci> Na_o </ci>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>
              <apply><plus/>
                <ci>ACh</ci>
                <ci>K_AChICaL</ci>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_Ca_ds_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The calcium ion component of the total current through the channel into
            the diadic subspace.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_Ca_ds_calculation_eq">
      <apply id="i_Ca_L_Ca_ds_calculation"><eq />
        <ci> i_Ca_L_Ca_ds </ci>
        <apply><times />
          <ci>ICaLfract</ci>
          <cn cellml:units="dimensionless"> 4.0 </cn>

          <ci> P_ca </ci>
          <ci> d </ci>
          <ci> f </ci>
          <ci> f2ds </ci>
          <apply><divide />

            <apply><divide />
              <apply><minus />
                <ci> V </ci>
                <cn cellml:units="mV"> 50.0 </cn>
              </apply>
              <apply><divide />
                <apply><times />

                  <ci> R </ci>
                  <ci> T </ci>
                </apply>
                <ci> F </ci>
              </apply>
            </apply>

            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>

                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>

                    </apply>
                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>

              </apply>
            </apply>
          </apply>
          <apply><minus />
            <apply><times />
              <ci> Ca_ds </ci>
              <apply><exp />
                <apply><divide />

                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>

                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>
              </apply>

            </apply>
            <apply><times />
              <ci> Ca_o </ci>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>

                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>

                    </apply>
                    <apply><times />
                      <cn cellml:units="dimensionless"> 2.0 </cn>
                      <ci> F </ci>
                    </apply>
                  </apply>
                </apply>

              </apply>
            </apply>
          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>
              <apply><plus/>

                <ci>ACh</ci>
                <ci>K_AChICaL</ci>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_K_ds_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The potassium ion component of the total current through the channel into
            the diadic subspace.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_K_ds_calculation_eq">
      <apply id="i_Ca_L_K_ds_calculation"><eq />
        <ci> i_Ca_L_K_ds </ci>
        <apply><times />
          <ci>ICaLfract</ci>
          <ci> P_caK </ci>

          <ci> P_ca </ci>
          <ci> d </ci>
          <ci> f </ci>
          <ci> f2ds </ci>
          <apply><minus />

            <apply><times />
              <ci> K_i </ci>
              <apply><exp />
                <apply><divide />
                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />

                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>

              </apply>
            </apply>
            <apply><times />
              <ci> K_o </ci>
              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />

                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>
                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>

                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>

          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>
              <apply><plus/>
                <ci>ACh</ci>
                <ci>K_AChICaL</ci>

              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_L_Na_ds_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            The sodium ion component of the total current through the channel into
            the diadic subspace.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_L_Na_ds_calculation_eq">
      <apply id="i_Ca_L_Na_ds_calculation"><eq />
        <ci> i_Ca_L_Na_ds </ci>

        <apply><times />
          <ci>ICaLfract</ci>
          <ci> P_caNa </ci>
          <ci> P_ca </ci>
          <ci> d </ci>

          <ci> f </ci>
          <ci> f2ds </ci>
          <apply><minus />
            <apply><times />
              <ci> Na_i </ci>
              <apply><exp />

                <apply><divide />
                  <cn cellml:units="dimensionless"> 50.0 </cn>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>

                    </apply>
                    <ci> F </ci>
                  </apply>
                </apply>
              </apply>
            </apply>
            <apply><times />
              <ci> Na_o </ci>

              <apply><exp />
                <apply><divide />
                  <apply><minus />
                    <apply><minus />
                      <ci> V </ci>
                      <cn cellml:units="mV"> 50.0 </cn>
                    </apply>

                  </apply>
                  <apply><divide />
                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>

                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><minus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><divide/>  
              <ci>ACh</ci>

              <apply><plus/>
                <ci>ACh</ci>
                <ci>K_AChICaL</ci>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>

    </math>
  </component>
  
  <component name="L_type_Ca_channel_d_gate" cmeta:id="L_type_Ca_channel_d_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#L_type_Ca_channel_d_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The activation gate of the L-type calcium channel.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="d" public_interface="out"
        initial_value="0.0" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <variable name="alpha" units="per_ms"/>
    <variable name="beta" units="per_ms"/>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#d_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the activation gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="d_diff_eq">
      <apply id="d_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> d </ci>
        </apply>
        <apply><minus />

          <apply><times/>
            <ci>alpha</ci>
            <apply><minus/>
              <cn cellml:units="dimensionless">1.0</cn>
              <ci>d</ci>
            </apply>
          </apply>

          <apply><times/>
            <ci>beta</ci>
            <ci>d</ci>
          </apply>
        </apply>
      </apply><!--d_diff_eq-->
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#alpha_calculation_eq2">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The opening rate for the activation gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="alpha_calculation_eq2">

      <apply id="alpha_calculation"><eq/>
        <ci>alpha</ci>
        <piecewise>
          <piece>
            <cn cellml:units="per_ms">0.36</cn>
            <apply><lt/>
              <apply><abs/>
                <apply><plus/>

                  <ci>V</ci>
                  <cn cellml:units="mV">19.0</cn>
                </apply>
              </apply>
              <cn cellml:units="mV">1.0e-3</cn>
            </apply>
          </piece>

          <otherwise>
            <apply><divide />
              <apply><times />
                <cn cellml:units="per_ms"> 0.09 </cn>
                <apply><plus />
                  <ci> V </ci>
                  <cn cellml:units="mV"> 19.0 </cn>

                </apply>
              </apply>
              <apply><minus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><minus />
                      <apply><plus />

                        <ci> V </ci>
                        <cn cellml:units="mV"> 19.0 </cn>
                      </apply>
                    </apply>
                    <cn cellml:units="mV"> 4.0 </cn>
                  </apply>

                </apply>
              </apply>
            </apply>
          </otherwise>
        </piecewise>
      </apply><!--alpha_calculation-->
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#beta_calculation_eq2">

        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The closing rate for the activation gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="beta_calculation_eq2">
      <apply id="beta_calculation"><eq/>

        <ci>beta</ci>
        <piecewise>
          <piece>
            <cn cellml:units="per_ms">0.36</cn>
            <apply><lt/>
              <apply><abs/>
                <apply><plus/>
                  <ci>V</ci>

                  <cn cellml:units="mV">19.0</cn>
                </apply>
              </apply>
              <cn cellml:units="mV">1.0e-3</cn>
            </apply>
          </piece>
          <otherwise>
            <apply><divide />

              <apply><times />
                <cn cellml:units="per_ms"> -0.036 </cn>
                <apply><plus />
                  <ci> V </ci>
                  <cn cellml:units="mV"> 19.0 </cn>
                </apply>

              </apply>
              <apply><minus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><plus />
                      <ci> V </ci>

                      <cn cellml:units="mV"> 19.0 </cn>
                    </apply>
                    <cn cellml:units="mV"> 10.0 </cn>
                  </apply>
                </apply>
              </apply>
            </apply>

          </otherwise>
        </piecewise>
      </apply><!--beta_calculation-->
    </math>
  </component>
  
  <component name="L_type_Ca_channel_f_gate" cmeta:id="L_type_Ca_channel_f_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#L_type_Ca_channel_f_gate">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            The first inactivation gate for the L-type calcium channel.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="f" public_interface="out"
        initial_value="1.0" units="dimensionless" />
    <variable name="K_cachoff" public_interface="in" units="mM" />
    <variable name="Ca_i" public_interface="in" units="mM" />

    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <variable name="alpha" units="per_ms"/>
    <variable name="beta" units="per_ms"/>
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#f_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the first inactivation gate.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="f_diff_eq">
      <apply id="f_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> f </ci>

        </apply>
        <apply><minus/>
          <apply><times/>
            <ci>alpha</ci>
            <apply><minus/>
              <cn cellml:units="dimensionless">1.0</cn>
              <ci>f</ci>

            </apply>
          </apply>
          <apply><times/>
            <ci>beta</ci>
            <ci>f</ci>
          </apply>
        </apply>
      </apply><!--f_diff_eq-->

    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#alpha_calculation_eq3">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The opening rate for the inactivation gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="alpha_calculation_eq3">
      <apply id="alpha_calculation"><eq/>
        <ci>alpha</ci>
        <piecewise>
          <piece>
            <cn cellml:units="per_ms">0.0075</cn>
            <apply><lt/>

              <apply><abs/>
                <apply><plus/>
                  <ci>V</ci>
                  <cn cellml:units="mV">34.0</cn>
                </apply>
              </apply>
              <cn cellml:units="mV">1.0e-3</cn>

            </apply>
          </piece>
          <otherwise>
            <apply><times/>
              <cn cellml:units="per_ms">-0.001875</cn>
              <apply><divide/>
                <apply><plus/>
                  <ci>V</ci>

                  <cn cellml:units="mV">34.0</cn>
                </apply><!--plus-->
                <apply><minus/>
                  <cn cellml:units="dimensionless">1.0</cn>
                  <apply><exp/>
                    <apply><divide/>
                      <apply><plus/>
                        <ci>V</ci>

                        <cn cellml:units="mV">34.0</cn>
                      </apply><!--plus-->
                      <cn cellml:units="mV">4.0</cn>
                    </apply><!--divide-->
                  </apply><!--exp-->
                </apply><!--minus-->
              </apply><!--divide-->
            </apply><!--times-->

          </otherwise>
        </piecewise>
      </apply><!--alpha_calculation-->
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#beta_calculation_eq3">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The closing rate for the inactivation gate.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="beta_calculation_eq3">
      <apply id="beta_calculation"><eq/>
        <ci>beta</ci>
        <apply><divide/>
          <cn cellml:units="dimensionless">0.0036</cn>

          <apply><plus/>
            <cn cellml:units="dimensionless">1.0</cn>
            <apply><exp/>
              <apply><minus/>
                <apply><divide/>
                  <apply><plus/>
                    <ci>V</ci>
                    <cn cellml:units="mV">34.0</cn>

                  </apply><!--plus-->
                  <cn cellml:units="mV">4.0</cn>
                </apply><!--divide-->
              </apply><!--minus-->
            </apply><!--exp-->
          </apply><!--plus-->
        </apply><!--divide-->
      </apply><!--eq-->

    </math>
  </component>
  
  <component name="L_type_Ca_channel_f2_gate" cmeta:id="L_type_Ca_channel_f2_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#L_type_Ca_channel_f2_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The second inactivation gate for L-type calcium channels in the
            membrane outside the diadic subspace.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="f2" public_interface="out"
        initial_value="1.0" units="dimensionless" />
    
    <variable name="CaInact" units="per_ms" initial_value="0.02"/>
    
    <variable name="K_cachoff" public_interface="in" units="mM" />
    <variable name="Ca_i" public_interface="in" units="mM" />
    <variable name="V" public_interface="in" units="mV" />

    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#f2_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the inactivation gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="f2_diff_eq">
      <apply id="f2_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> f2 </ci>
        </apply>

        <apply><times/>
          <ci>CaInact</ci>
          <apply><minus />
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus /> 
              <apply><divide />
                <ci> Ca_i </ci>

                <apply><plus />
                  <ci> K_cachoff </ci>
                  <ci> Ca_i </ci>
                </apply>
              </apply>
              <ci> f2 </ci>

            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="L_type_Ca_channel_f2ds_gate" cmeta:id="L_type_Ca_channel_f2ds_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#L_type_Ca_channel_f2ds_gate">

        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The second inactivation gate for L-type calcium channels in the
            membrane when open into the diadic subspace.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="f2ds" public_interface="out"
        initial_value="1.0" units="dimensionless" />
    <variable name="K_dsoff" initial_value="0.001" units="mM" />

    <variable name="Ca_ds" public_interface="in" units="mM" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <variable name="CaInactDS" units="per_ms" initial_value="0.02"/>
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#f2ds_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the inactivation gate.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="f2ds_diff_eq">
      <apply id="f2ds_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> f2ds </ci>

        </apply>
        <apply><times />
          <ci> CaInactDS </ci>
          <apply><minus />
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus /> 
              <apply><divide />

                <ci> Ca_ds </ci>
                <apply><plus />
                  <ci> K_dsoff </ci>
                  <ci> Ca_ds </ci>
                </apply>
              </apply>

              <ci> f2ds </ci>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="calcium_background_current" cmeta:id="calcium_background_current">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#calcium_background_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The background calcium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_b_Ca" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_bca" initial_value="0.038555e-3" units="mS_per_mmsq" />
    
    <variable name="E_Ca" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_b_Ca_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            Calculation of the background calcium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_b_Ca_calculation_eq">
      <apply id="i_b_Ca_calculation"><eq />
        <ci> i_b_Ca </ci>

        <apply><times />
          <ci> g_bca </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_Ca </ci> 
          </apply>

        </apply>
      </apply>
    </math>
  </component>
  
  <component name="transient_outward_current" cmeta:id="transient_outward_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#transient_outward_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            The doubly gated transient outward current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_to" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_to" initial_value="0.77100e-3" units="mS_per_mmsq" />
    <variable name="g_tos" initial_value="0.0" units="dimensionless" />
    
    <variable name="E_K" public_interface="in" units="mV" />

    <variable name="Ca_i" public_interface="in" units="mM" />
    <variable
        name="V" public_interface="in"
        private_interface="out" units="mV" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    
    <variable name="s" private_interface="in" units="dimensionless" />
    <variable name="r" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_to_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            Evaluation of the transient outward current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_to_calculation_eq">
      <apply id="i_to_calculation"><eq />
        <ci> i_to </ci>

        <apply><times />
          <ci> g_to </ci>
          <apply><plus />
            <ci> g_tos </ci>
            <apply><times />
              <ci> s </ci>

              <apply><minus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <ci> g_tos </ci>
              </apply>
            </apply>
          </apply>
          <ci> r </ci>

          <apply><minus />
            <ci> V </ci>
            <ci> E_K </ci>
          </apply>
        </apply>
      </apply>
    </math>

  </component>
  
  <component name="transient_outward_current_s_gate" cmeta:id="transient_outward_current_s_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#transient_outward_current_s_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The first gate of the transient outward current.
          </rdf:value>
        </cmeta:comment>

      </rdf:Description>
    </rdf:RDF>

    <variable
        name="s" public_interface="out"
        initial_value="0.9950485" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#s_diff_eq">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            The gating kinetics.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="s_diff_eq">
      <apply id="s_diff"><eq />
        <apply><diff />

          <bvar><ci> time </ci></bvar>
          <ci> s </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <cn cellml:units="per_ms"> 0.000033 </cn>

            <apply><exp />
              <apply><divide />
                <apply><minus />
                  <ci> V </ci>
                </apply>
                <cn cellml:units="mV"> 17.0 </cn>
              </apply>

            </apply>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> s </ci>
            </apply>
          </apply>
          <apply><times />

            <apply><divide />
              <cn cellml:units="per_ms"> 0.033 </cn>
              <apply><plus />
                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp />
                  <apply><divide />
                    <apply><minus />

                      <apply><plus />
                        <ci> V </ci>
                        <cn cellml:units="mV"> 10.0 </cn>
                      </apply>
                    </apply>
                    <cn cellml:units="mV"> 8.0 </cn>

                  </apply>
                </apply>
              </apply>
            </apply>
            <ci> s </ci>
          </apply>
        </apply>
      </apply>

    </math>
  </component>
  
  <component name="transient_outward_current_r_gate" cmeta:id="transient_outward_current_r_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#transient_outward_current_r_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The second of the two gates for the transient outward current.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable
        name="r" public_interface="out"
        initial_value="0.0" units="dimensionless" />
    <variable name="r_ss" public_interface="out" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#r_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The gating kinetics for the r gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="r_diff_eq">

      <apply id="r_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> r </ci>
        </apply>
        <apply><times />
          <cn cellml:units="per_ms"> 0.333 </cn>

          <apply><minus />
            <ci> r_ss </ci>
            <ci> r </ci>
          </apply>
        </apply>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#r_ss_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the steady-state component of the gating kinetics
            for the r gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="r_ss_calculation_eq">
      <apply id="r_ss_calculation"><eq />
        <ci> r_ss </ci>
        <apply><divide />
          <cn cellml:units="dimensionless"> 1.0 </cn>
          <apply><plus />
            <cn cellml:units="dimensionless"> 1.0 </cn>

            <apply><exp />
              <apply><times />
                <cn cellml:units="dimensionless"> -0.2 </cn>
                <apply><plus />
                  <ci> V </ci>
                  <cn cellml:units="mV"> 4.0 </cn>

                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>    
  </component>
  
  <component name="ACh_dependent_potassium_current" cmeta:id="ACh_dependent_potassium_current">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ACh_dependent_potassium_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Acetylcholine (ACh) dependent potassium current. Once more, 
            this current has been included for completeness with respect 
            to the original publication but is usually left out of simulations.
            It is useful for simulating specific cellular conditions, but
            this formulation has not been tested.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_K_ACh" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_KACh" initial_value="0.0" units="mS_per_mmsq" />
    <variable name="ACh" public_interface="out" initial_value="0.0" units="mM" />
    <variable name="K_ACh" initial_value="0.2795e-6" units="mM"/>
    <variable name="K_KACh" initial_value="10.0" units="mM"/>
    
    <variable name="E_K" public_interface="in" units="mV" />
    <variable name="K_o" public_interface="in" units="mM" />
    <variable name="K_mk1" public_interface="in" units="mM" />

    <variable name="R" public_interface="in" units="gas_constant" />
    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="T" public_interface="in" private_interface="out" units="K" />
    <variable name="V" public_interface="in" private_interface="out" units="mV" />
    <variable
        name="time" public_interface="in"
        private_interface="out" units="ms" />
    
    <variable name="x_ACh1" private_interface="in" units="dimensionless" />
    <variable name="x_ACh2" private_interface="in" units="dimensionless" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_K_ACh_calculation_eq">

        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Evaluation of the ACh dependent potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_K_ACh_calculation_eq">
      <apply id="i_K_ACh_calculation"><eq />

        <ci> i_K_ACh </ci>
        <apply><times />
          <ci> g_KACh </ci>
          <apply><divide />
            <ci> K_o </ci>
            <apply><plus />

              <ci> K_o </ci>
              <ci> K_KACh </ci>
            </apply>
          </apply>
          <ci> x_ACh1 </ci>
          <ci> x_ACh2 </ci>

          <apply><divide />
            <apply><power/>
              <ci>ACh</ci>
              <cn cellml:units="dimensionless">1.4969</cn>
            </apply>
            <apply><plus />
              <apply><power/>
                <ci>ACh</ci>

                <cn cellml:units="dimensionless">1.4969</cn>
              </apply>
              <apply><power />
                <ci>K_ACh</ci>
                <cn cellml:units="dimensionless">1.4969</cn>
              </apply>
            </apply>

          </apply>
          <apply><divide />
            <apply><minus />
              <ci> V </ci>
              <ci> E_K </ci>
            </apply>
            <apply><plus />

              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><exp />
                <apply><divide />
                  <apply><times/>
                    <cn cellml:units="dimensionless"> 0.4 </cn>
                    <apply><minus />
                      <ci> V </ci>

                      <apply><plus />
                        <ci> E_K </ci>
                        <cn cellml:units="mV"> 140.0 </cn>
                      </apply>
                    </apply>
                  </apply>
                  <apply><divide />

                    <apply><times />
                      <ci> R </ci>
                      <ci> T </ci>
                    </apply>
                    <ci> F </ci>
                  </apply>

                </apply>
              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="ACh_dependent_potassium_current_xACh1_gate" cmeta:id="ACh_dependent_potassium_current_xACh1_gate">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ACh_dependent_potassium_current_xACh1_gate">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The first of two gates for the ACh dependent potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="x_ACh1" initial_value="0.5" public_interface="out" units="dimensionless" />
    <variable name="alpha_ACh" initial_value="0.003684211" units="per_ms" />
    <variable name="V" public_interface="in" units="mV"/>
    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#x_ACh1_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            Gating kinetics for the first gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="x_ACh1_diff_eq">
      <apply id="x_ACh1_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>

          <ci> x_ACh1 </ci>
        </apply>
        <apply><minus />
          <apply><times />
            <ci> alpha_ACh </ci>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>

              <ci> x_ACh1 </ci>
            </apply>
          </apply>
          <apply><times />
            <apply><divide/>
              <cn cellml:units="per_ms">0.00582</cn>
              <apply><plus/>

                <cn cellml:units="dimensionless"> 1.0 </cn>
                <apply><exp/>
                  <apply><minus/>
                    <apply><divide/>
                      <apply><plus/>
                        <ci>V</ci>
                        <cn cellml:units="mV">50.0</cn>

                      </apply>
                      <cn cellml:units="mV">15.0</cn>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
            <ci> x_ACh1 </ci>

          </apply>
        </apply>
      </apply>
    </math>
  </component>
          
  <component name="ACh_dependent_potassium_current_xACh2_gate" cmeta:id="ACh_dependent_potassium_current_xACh2_gate">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ACh_dependent_potassium_current_xACh2_gate">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            The second of the two gates for the ACh dependent potassium current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="x_ACh2" initial_value="0.5" public_interface="out" units="dimensionless" />
    <variable name="alpha_ACh" initial_value="0.07309924" units="per_ms" />
    <variable name="V" public_interface="in" units="mV"/>

    <variable name="time" public_interface="in" units="ms" />
   
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#x_ACh2_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Gating kinetics for the second gate.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="x_ACh2_diff_eq">
      <apply id="x_ACh2_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> x_ACh2 </ci>
        </apply>

        <apply><minus />
          <apply><times />
            <ci> alpha_ACh </ci>
            <apply><minus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <ci> x_ACh2 </ci>

            </apply>
          </apply>
          <apply><times />
            <apply><divide/>
              <cn cellml:units="per_ms">0.12</cn>
              <apply><plus/>
                <cn cellml:units="dimensionless"> 1.0 </cn>

                <apply><exp/>
                  <apply><minus/>
                    <apply><divide/>
                      <apply><plus/>
                        <ci>V</ci>
                        <cn cellml:units="mV">50.0</cn>
                      </apply>
                      <cn cellml:units="mV">15.0</cn>

                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
            <ci> x_ACh2 </ci>
          </apply>
        </apply>

      </apply>
    </math>
  </component>
          
  <component name="sodium_potassium_pump" cmeta:id="sodium_potassium_pump">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#sodium_potassium_pump">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The sodium potassium pump.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_NaK" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="i_NaK_max" initial_value="107.95e-3" units="uA_per_mmsq" />
    <variable name="K_mk" initial_value="1.0" units="mM" />
    <variable name="K_mNa" initial_value="40.0" units="mM" />
    
    <variable name="K_o" public_interface="in" units="mM" />

    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_NaK_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium potassium pump current.
          </rdf:value>
        </cmeta:comment>

      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_NaK_calculation_eq">
      <apply id="i_NaK_calculation"><eq />
        <ci> i_NaK </ci>
        <apply><times />
          <ci> i_NaK_max </ci>

          <apply><divide />
            <ci> K_o </ci>
            <apply><plus />
              <ci> K_o </ci>
              <ci> K_mk </ci>
            </apply>

          </apply>
          <apply><divide />
            <ci> Na_i </ci>
            <apply><plus />
              <ci> Na_i </ci>
              <ci> K_mNa </ci>

            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="sodium_calcium_pump" cmeta:id="sodium_calcium_pump">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#sodium_calcium_pump">

        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The sodium calcium exchanger. A fraction of the Na-Ca exchangers
            (INaCaFract) are assumed to emmpty into the diadic subspace, while
            the remainder of the channels open into the bulk cytosol.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
  
    <units name="uA_per_mmsq_per_mM4">
      <unit units="uA"/>

      <unit units="mm" exponent="-2"/>
      <unit units="mM" exponent="-4"/>
    </units>
    <units name="per_mM4">
      <unit units="mM" exponent="-4"/>
    </units>
    
    <variable name="i_NaCa" public_interface="out" units="uA_per_mmsq" />
    <variable name="i_NaCa_ds" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="K_NaCa" initial_value="0.07711e-3" units="uA_per_mmsq_per_mM4" />

    <variable name="d_NaCa" initial_value="0.0" units="per_mM4" />
    <variable name="gamma" initial_value="0.5" units="dimensionless" />
    
    <variable name="INaCaFract" initial_value="0.001" units="dimensionless"/>
    
    <variable name="Na_i" public_interface="in" units="mM" />
    <variable name="Na_o" public_interface="in" units="mM" />
    <variable name="Ca_i" public_interface="in" units="mM" />  
    <variable name="Ca_o" public_interface="in" units="mM" />
    <variable name="Ca_ds" public_interface="in" units="mM" />
    <variable name="R" public_interface="in" units="gas_constant" />

    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="T" public_interface="in" units="K" />
    <variable name="V" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_NaCa_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium calcium exchanger current for the channels
            exposed to the bulk myoplasm.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_NaCa_calculation_eq">
      <apply id="i_NaCa_calculation"><eq />
        <ci> i_NaCa </ci>
        <apply><times />
          <apply><minus/>

            <cn cellml:units="dimensionless"> 1.0 </cn>
            <ci>INaCaFract</ci>
          </apply>
          <ci> K_NaCa </ci>
          <apply><divide />
            <apply><minus />

              <apply><times />
                <apply><exp />
                  <apply><times />
                    <ci> gamma </ci>
                    <apply><divide />
                      <ci> V </ci>
                      <apply><divide />

                        <apply><times />
                          <ci> R </ci>
                          <ci> T </ci>
                        </apply>
                        <ci> F </ci>
                      </apply>

                    </apply>
                  </apply>
                </apply>
                <apply><power />
                  <ci> Na_i </ci>
                  <cn cellml:units="dimensionless"> 3.0 </cn>
                </apply>

                <ci> Ca_o </ci>
              </apply>
              <apply><times />
                <apply><exp />
                  <apply><times />
                    <apply><minus />
                      <ci> gamma </ci>

                      <cn cellml:units="dimensionless"> 1.0 </cn>
                    </apply>
                    <apply><divide />
                      <ci> V </ci>
                      <apply><divide />
                        <apply><times />
                          <ci> R </ci>

                          <ci> T </ci>
                        </apply>
                        <ci> F </ci>
                      </apply>
                    </apply>
                  </apply>
                </apply>

                <apply><power />
                  <ci> Na_o </ci>
                  <cn cellml:units="dimensionless"> 3.0 </cn>
                </apply>
                <ci> Ca_i </ci>
              </apply>

            </apply>
            <apply><plus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><times />
                <ci> d_NaCa </ci>
                <apply><plus />
                  <apply><times />

                    <ci> Ca_i </ci>
                    <apply><power />
                      <ci> Na_o </ci>
                      <cn cellml:units="dimensionless"> 3.0 </cn>
                    </apply>
                  </apply>

                  <apply><times />
                    <ci> Ca_o </ci>
                    <apply><power />
                      <ci> Na_i </ci>
                      <cn cellml:units="dimensionless"> 3.0 </cn>
                    </apply>

                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><divide/>
            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus/>

              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><divide/>
                <ci>Ca_i</ci>
                <cn cellml:units="mM"> 0.0069 </cn>
              </apply>
            </apply>

          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_NaCa_ds_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the sodium calcium exchanger current for the channels
            opening into the diadic subspace.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_NaCa_ds_calculation_eq">
      <apply id="i_NaCa_ds_calculation"><eq />
        <ci> i_NaCa_ds </ci>
        <apply><times />
          <ci>INaCaFract</ci>

          <ci> K_NaCa </ci>
          <apply><divide />
            <apply><minus />
              <apply><times />
                <apply><exp />
                  <apply><times />
                    <ci> gamma </ci>

                    <apply><divide />
                      <ci> V </ci>
                      <apply><divide />
                        <apply><times />
                          <ci> R </ci>
                          <ci> T </ci>

                        </apply>
                        <ci> F </ci>
                      </apply>
                    </apply>
                  </apply>
                </apply>
                <apply><power />
                  <ci> Na_i </ci>

                  <cn cellml:units="dimensionless"> 3.0 </cn>
                </apply>
                <ci> Ca_o </ci>
              </apply>
              <apply><times />
                <apply><exp />

                  <apply><times />
                    <apply><minus />
                      <ci> gamma </ci>
                      <cn cellml:units="dimensionless"> 1.0 </cn>
                    </apply>
                    <apply><divide />
                      <ci> V </ci>

                      <apply><divide />
                        <apply><times />
                          <ci> R </ci>
                          <ci> T </ci>
                        </apply>
                        <ci> F </ci>

                      </apply>
                    </apply>
                  </apply>
                </apply>
                <apply><power />
                  <ci> Na_o </ci>
                  <cn cellml:units="dimensionless"> 3.0 </cn>

                </apply>
                <ci> Ca_ds </ci>
              </apply>
            </apply>
            <apply><plus />
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><times />

                <ci> d_NaCa </ci>
                <apply><plus />
                  <apply><times />
                    <ci> Ca_ds </ci>
                    <apply><power />
                      <ci> Na_o </ci>

                      <cn cellml:units="dimensionless"> 3.0 </cn>
                    </apply>
                  </apply>
                  <apply><times />
                    <ci> Ca_o </ci>
                    <apply><power />
                      <ci> Na_i </ci>

                      <cn cellml:units="dimensionless"> 3.0 </cn>
                    </apply>
                  </apply>
                </apply>
              </apply>
            </apply>
          </apply>
          <apply><divide/>

            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><plus/>
              <cn cellml:units="dimensionless"> 1.0 </cn>
              <apply><divide/>
                <ci>Ca_ds</ci>
                <cn cellml:units="mM"> 0.0069 </cn>

              </apply>
            </apply>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="calcium_uptake_from_myoplasm_to_NSR" cmeta:id="calcium_uptake_from_myoplasm_to_NSR">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#calcium_uptake_from_myoplasm_to_NSR">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The sarcoplasmic reticulum calcium pump which transports calcium
            from the bulk myoplasm into the network SR.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_up" public_interface="out" units="mM_per_ms" />

    
    <variable name="K_cyca" initial_value="0.0003" units="mM" />
    <variable name="K_xcs" initial_value="0.4" units="dimensionless" />
    <variable name="K_srca" initial_value="0.5" units="mM" />
    
    <variable name="Ca_i" public_interface="in" units="mM" />
    <variable name="Ca_up" public_interface="in" units="mM" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_up_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            Calculation of the calcium uptake flux.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_up_calculation_eq">      
      <apply id="i_up_calculation"><eq />
        <ci> i_up </ci>

        <apply><divide />
          <apply><minus />
            <apply><times />
              <cn cellml:units="mM_per_ms"> 0.0004 </cn>
              <ci> Ca_i </ci>
            </apply>
            <apply><times />

              <cn cellml:units="mM_per_ms"> 0.00003 </cn>
              <ci> Ca_up </ci>
              <apply><divide />
                <apply><times />
                  <ci> K_cyca </ci>
                  <ci> K_xcs </ci>

                </apply>
                <ci> K_srca </ci>
              </apply>
            </apply>
          </apply>
          <apply><plus />
            <ci> Ca_i </ci>

            <apply><times />
              <ci> Ca_up </ci>
              <apply><divide />
                <apply><times />
                  <ci> K_cyca </ci>
                  <ci> K_xcs </ci>

                </apply>
                <ci> K_srca </ci>
              </apply>
            </apply>
            <apply><times />
              <ci> K_cyca </ci>
              <ci> K_xcs </ci>

            </apply>
            <ci> K_cyca </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="calcium_transfer_from_NSR_to_JSR" cmeta:id="calcium_transfer_from_NSR_to_JSR">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#calcium_transfer_from_NSR_to_JSR">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Diffusion down the concentration gradient to transfer calcium from
            the uptake stores in the network SR to the release stores in the
            junctional SR.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_tr" public_interface="out" units="mM_per_ms" />
    
    <variable name="Ca_rel" public_interface="in" units="mM" />
    <variable name="Ca_up" public_interface="in" units="mM" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_tr_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            Calculation of the transfer flux between the uptake and release
            calcium stores.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_tr_calculation_eq">
      <apply id="i_tr_calculation"><eq />
        <ci> i_tr </ci>

        <apply><times />
          <cn cellml:units="per_ms"> 0.05 </cn>
          <apply><minus />
            <ci> Ca_up </ci>
            <ci> Ca_rel </ci>
          </apply>

        </apply>
      </apply>
    </math>
  </component>
  
  <component name="length_dependence" cmeta:id="length_dependence">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#length_dependence">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            This component describes the addition of
            length dependence to the Noble models. However, in this implementation
            of the model, it is unused - sarcomere length (SL) is a constant 0, 
            resulting in the removal of length dependence from the model.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="f_stretch" public_interface="out" units="dimensionless" />
    
    <variable name="SL" public_interface="out" initial_value="0.0" units="mm" />
    <variable name="SLRef" public_interface="out" initial_value="2.0e-3" units="mm" />
    <variable name="gamma_SR_SL" public_interface="out" initial_value="1.5e+3" units="per_mm" />

    <variable name="gamma_SAC_SL" initial_value="2.5e+3" units="per_mm" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#f_stretch_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the scaling factor for the stretch activated currents
            based on the change in length from the reference state.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="f_stretch_calculation_eq">
      <apply id="f_stretch_calculation"><eq />
        <ci> f_stretch </ci>
        <apply><divide />
          <cn cellml:units="dimensionless"> 1.0 </cn>
          <apply><plus />

            <cn cellml:units="dimensionless"> 1.0 </cn>
            <apply><exp />
              <apply><times />
                <cn cellml:units="dimensionless"> -2.0 </cn> 
                <ci> gamma_SAC_SL </ci>
                <apply><minus />

                  <ci> SL </ci>
                  <ci> SLRef </ci>
                </apply>
              </apply>
            </apply>
          </apply>
        </apply>

      </apply>
    </math>
  </component>
  
  <component name="calcium_leak_from_SR" cmeta:id="calcium_leak_from_SR">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#calcium_leak_from_SR">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The length dependent leakage of calcium from the junctional
            SR into the cytolsol.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_leak" public_interface="out" units="mM_per_ms" />
    
    <variable name="SL" public_interface="in" units="mm" />
    <variable name="gamma_SR_SL" public_interface="in" units="per_mm" />
    <variable name="Ca_rel" public_interface="in" units="mM" />
    
    <variable name="alpha_SRleak" initial_value="0.00005" units="per_ms"/>

    
    <math xmlns="http://www.w3.org/1998/Math/MathML">      
      <apply id="i_leak_calculation"><eq />
        <ci> i_leak </ci>
        <apply><times/>
          <apply><exp/>
            <apply><times/>
              <ci>gamma_SR_SL</ci>
              <ci>SL</ci>

            </apply>
          </apply>
          <ci>alpha_SRleak</ci>
          <ci>Ca_rel</ci>
        </apply>
      </apply>
    </math>
  </component>

  
  <component name="ds_decay_flux" cmeta:id="ds_decay_flux">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ds_decay_flux">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Description of the diffusion of calcium out of the diadic
            subspace into the bulk cytosol.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>

    <variable name="i_decay" public_interface="out" units="mM_per_ms" />
    
    <variable name="Ca_ds" public_interface="in" units="mM" />
    
    <variable name="alpha_ca_ds_decay" initial_value="0.01" units="per_ms"/>
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_leak_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            Calculation of the flux of calcium out of the diadic subspace.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_leak_calculation_eq">
      <apply id="i_leak_calculation"><eq />
        <ci> i_decay</ci>

        <apply><times/>
          <ci>alpha_ca_ds_decay</ci>
          <ci>Ca_ds</ci>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="calcium_release_from_SR" cmeta:id="calcium_release_from_SR">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#calcium_release_from_SR">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The calcium induced calcium release from the junctional SR into 
            the bulk myoplasm. Assumed that activation of calcium release sites
            by the diadic subspace calcium triggers calcium release in the whole
            cytosol.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    
    <variable name="Ca_rel" public_interface="in" units="mM" />
    <variable name="Ca_i" public_interface="in" units="mM" />
    <variable name="Ca_ds" public_interface="in" units="mM" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="V" public_interface="in" units="mV" />
    
    <variable name="i_rel" public_interface="out" units="mM_per_ms"/>

    <variable name="ActivatorFract" initial_value="0.00191" units="dimensionless"/>
    <variable name="ProductFract" initial_value="0.28546" units="dimensionless"/>

    <variable name="OpenReleaseChannelFract" units="dimensionless"/>
    <variable name="RegulatoryBindingSite" units="dimensionless"/>
    <variable name="PrecursorFract" units="dimensionless"/>
    <variable name="alpha_act" units="per_ms"/>
    <variable name="alpha_inact" units="per_ms"/>
    <variable name="SR_speed_factor" units="dimensionless"/>
    
    <variable name="K_mca" initial_value="0.0005" units="mM" />
    <variable name="K_mca_ds" initial_value="0.01" units="mM" />
    <variable name="alpha_rel" initial_value="0.25" units="per_ms"/>

       
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#OpenReleaseChannelFract_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The fraction of release sites in the open state.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="OpenReleaseChannelFract_calculation_eq">
      <apply id="OpenReleaseChannelFract_calculation"><eq/>
        <ci>OpenReleaseChannelFract</ci>
        <apply><power/>
          <apply><divide/>
            <ci>ActivatorFract</ci>
            <apply><plus/>
              <ci>ActivatorFract</ci>

              <cn cellml:units="dimensionless">0.25</cn>
            </apply>
          </apply>
          <cn cellml:units="dimensionless">2.0</cn>
        </apply>
      </apply><!--OpenReleaseChannelFract_calculation-->
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#i_rel_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the calcium release flux from the JSR into the cytosol.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_rel_calculation_eq">

      <apply id="i_rel_calculation"><eq/>
        <ci>i_rel</ci>
        <apply><times/>
          <ci>alpha_rel</ci>
          <ci>OpenReleaseChannelFract</ci>
          <ci>Ca_rel</ci>
        </apply>

      </apply><!--i_rel_calculation-->
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#RegulatoryBindingSite_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Regulatory binding sites.
          </rdf:value>
        </cmeta:comment>

      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="RegulatoryBindingSite_calculation_eq">
      <apply id="RegulatoryBindingSite_calculation"><eq/>
        <ci>RegulatoryBindingSite</ci>
        <apply><power/>
          <apply><plus/>
            <apply><divide/>

              <ci>Ca_i</ci>
              <apply><plus/>
                <ci>Ca_i</ci>
                <ci>K_mca</ci>
              </apply>
            </apply>
            <apply><times/>

              <apply><minus/>
                <cn cellml:units="dimensionless">1.0</cn>
                <apply><divide/>
                  <ci>Ca_i</ci>
                  <apply><plus/>
                    <ci>Ca_i</ci>
                    <ci>K_mca</ci>

                  </apply>
                </apply>
              </apply>
              <apply><divide/>
                <ci>Ca_ds</ci>
                <apply><plus/>
                  <ci>Ca_ds</ci>
                  <ci>K_mca_ds</ci>

                </apply>
              </apply>
            </apply><!--times-->
          </apply><!--plus-->
          <cn cellml:units="dimensionless">2.0</cn>
        </apply><!--power-->
      </apply><!--RegulatoryBindingSite_calculation-->
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#PrecursorFract_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Fraction of release channels in the precursor state.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="PrecursorFract_calculation_eq">
      <apply id="PrecursorFract_calculation"><eq/>
        <ci>PrecursorFract</ci>
        <apply><minus/>
          <cn cellml:units="dimensionless">1.0</cn>
          <apply><plus/>
            <ci>ActivatorFract</ci>

            <ci>ProductFract</ci>
          </apply>
        </apply>
      </apply><!--PrecursorFract_calculation-->
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="alpha_act_calculation_eq">
      <apply id="alpha_act_calculation"><eq/>
        <ci>alpha_act</ci>

        <apply><times/>
          <cn cellml:units="per_ms">0.5</cn>
          <ci>RegulatoryBindingSite</ci>
        </apply>
      </apply><!--alpha_act_calculation-->
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="alpha_inact_calculation_eq">
      <apply id="alpha_inact_calculation"><eq/>

        <ci>alpha_inact</ci>
        <apply><plus/>
          <cn cellml:units="per_ms">0.06</cn>
          <apply><times/>
            <cn cellml:units="dimensionless">0.5</cn>
            <ci>RegulatoryBindingSite</ci>
          </apply>

        </apply>
      </apply><!--alpha_inact_calculation-->
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="SR_speed_factor_calculation_eq">
      <apply id="SR_speed_factor_calculation"><eq/>
        <ci>SR_speed_factor</ci>
        <piecewise>
          <piece>

            <cn cellml:units="dimensionless">5.0</cn>
            <apply><lt/>
              <ci>V</ci>
              <cn cellml:units="mV">-50.0</cn>
            </apply>
          </piece>
          <otherwise>

            <cn cellml:units="dimensionless">1.0</cn>
          </otherwise>
        </piecewise>
      </apply><!--SR_speed_factor_calculation-->
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="ActivatorFract_diff_eq">
      <apply id="ActivatorFract_diff"><eq/>
        <apply><diff/>

          <bvar>
            <ci>time</ci>
          </bvar>
          <ci>ActivatorFract</ci>
        </apply>
        <apply><times/>
          <ci>SR_speed_factor</ci>

          <apply><minus/>
            <apply><times/>
              <ci>alpha_act</ci>
              <ci>PrecursorFract</ci>
            </apply>
            <apply><times/>
              <ci>alpha_inact</ci>

              <ci>ActivatorFract</ci>
            </apply>
          </apply>
        </apply>
      </apply><!--ActivatorFract_diff_eq-->
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="ProductFract_diff_eq">
      <apply id="ProductFract_diff"><eq/>

        <apply><diff/>
          <bvar>
            <ci>time</ci>
          </bvar>
          <ci>ProductFract</ci>
        </apply>
        <apply><times/>
          <ci>SR_speed_factor</ci>

          <apply><minus/>
            <apply><times/>
              <ci>alpha_inact</ci>
              <ci>ActivatorFract</ci>
            </apply>
            <apply><times/>
              <cn cellml:units="dimensionless">0.001</cn>

              <ci>ProductFract</ci>
            </apply>
          </apply>
        </apply>
      </apply><!--ProductFract_diff_eq-->
    </math>
  </component>
  
  <component name="stretch_dependent_Ca_current" cmeta:id="stretch_dependent_Ca_current">

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#stretch_dependent_Ca_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A stretch activated calcium current. Unused and untested in this 
            implementation, but included for completeness.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Ca_stretch" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_Ca_stretch" initial_value="154.22e-3" units="mS_per_mmsq" />
    
    <variable name="E_Ca" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="f_stretch" public_interface="in" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ca_stretch_calculation_eq">

        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ca_stretch_calculation_eq">
      <apply id="i_Ca_stretch_calculation"><eq />

        <ci> i_Ca_stretch </ci>
        <apply><times />
          <ci> g_Ca_stretch </ci>
          <ci> f_stretch </ci>
          <apply><minus />
            <ci> V </ci>

            <ci> E_Ca </ci>
          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="stretch_dependent_K_current" cmeta:id="stretch_dependent_K_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#stretch_dependent_K_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Stretch activated potassium current - unused and untested, but 
            included for completeness.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_K_stretch" public_interface="out" units="uA_per_mmsq" />

    
    <variable name="g_K_stretch" initial_value="154.22e-3" units="mS_per_mmsq" />
    
    <variable name="E_K" public_interface="in" units="mV" />
    <variable name="time" public_interface="in" units="ms" />
    <variable name="f_stretch" public_interface="in" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_K_stretch_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            Calculation of the current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_K_stretch_calculation_eq">
      <apply id="i_K_stretch_calculation"><eq />
        <ci> i_K_stretch </ci>

        <apply><times />
          <ci> g_K_stretch </ci>
          <ci> f_stretch </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_K </ci>

          </apply>
        </apply>
      </apply>
    </math>
  </component>
  
  <component name="stretch_dependent_Na_current" cmeta:id="stretch_dependent_Na_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#stretch_dependent_Na_current">
        <cmeta:comment rdf:parseType="Resource">

          <rdf:value>
            A stretch activated sodium current - unused and untested, but
            included for completeness.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Na_stretch" public_interface="out" units="uA_per_mmsq" />
    
    <variable name="g_Na_stretch" initial_value="154.22e-3" units="mS_per_mmsq" />
    
    <variable name="E_Na" public_interface="in" units="mV" />

    <variable name="time" public_interface="in" units="ms" />
    <variable name="f_stretch" public_interface="in" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Na_stretch_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the current.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Na_stretch_calculation_eq">
      <apply id="i_Na_stretch_calculation"><eq />
        <ci> i_Na_stretch </ci>
        <apply><times />
          <ci> g_Na_stretch </ci>

          <ci> f_stretch </ci>
          <apply><minus />
            <ci> V </ci>
            <ci> E_Na </ci>
          </apply>
        </apply>

      </apply>
    </math>
  </component>
  
  <component name="stretch_dependent_Ns_current" cmeta:id="stretch_dependent_Ns_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#stretch_dependent_Ns_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A non-specific stretch activated current. Not used and untested, but
            included for completeness.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <variable name="i_Ns_stretch" public_interface="out" units="uA_per_mmsq" />
   
    <variable name="g_Ns_stretch" initial_value="154.22e-3" units="mS_per_mmsq" />
    <variable name="E_Ns_stretch" initial_value="-30.0" units="mV" />
   
    <variable name="time" public_interface="in" units="ms" />
    <variable name="f_stretch" public_interface="in" units="dimensionless" />

    <variable name="V" public_interface="in" units="mV" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_Ns_stretch_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_Ns_stretch_calculation_eq">
      <apply id="i_Ns_stretch_calculation"><eq />
        <ci> i_Ns_stretch </ci>
        <apply><times />
          <ci> g_Ns_stretch </ci>
          <ci> f_stretch </ci>

          <apply><minus />
            <ci> V </ci>
            <ci> E_Ns_stretch </ci>
          </apply>
        </apply>
      </apply>
    </math>

  </component>
  
  <component name="stretch_dependent_An_current" cmeta:id="stretch_dependent_An_current">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#stretch_dependent_An_current">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A anion specific stretch ativated current - unused and untested, but 
            included for completeness.
          </rdf:value>
        </cmeta:comment>

      </rdf:Description>
    </rdf:RDF>

    <variable name="i_An_stretch" public_interface="out" units="uA_per_mmsq" />
   
    <variable name="g_An_stretch" initial_value="154.22e-3" units="mS_per_mmsq" />
    <variable name="E_An_stretch" initial_value="-20.0" units="mV" />
   
    <variable name="time" public_interface="in" units="ms" />
    <variable name="f_stretch" public_interface="in" units="dimensionless" />
    <variable name="V" public_interface="in" units="mV" />

    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#i_An_stretch_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            Calculation of the current.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="i_An_stretch_calculation_eq">
      <apply id="i_An_stretch_calculation"><eq />
        <ci> i_An_stretch </ci>
        <apply><times />
          <ci> g_An_stretch </ci>
          <ci> f_stretch </ci>

          <apply><minus />
            <ci> V </ci>
            <ci> E_An_stretch </ci>
          </apply>
        </apply>
      </apply>
    </math>

  </component>
  
  <component name="ionic_concentrations" cmeta:id="ionic_concentrations">
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#ionic_concentrations">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            A convenient grouping of all the ionic concentration differential
            equations.
          </rdf:value>
        </cmeta:comment>

      </rdf:Description>
    </rdf:RDF>

    <variable
        name="Na_i" public_interface="out"
        initial_value="5.5997" units="mM" />
    <variable
        name="Na_o" public_interface="out"
        initial_value="140.0" units="mM" />
    <variable
        name="K_i" public_interface="out"
        initial_value="139.3050" units="mM" />
    <variable
        name="K_o" public_interface="out"
        initial_value="4.0" units="mM" />
    <variable
        name="Ca_i" public_interface="out"
        initial_value="0.0000082" units="mM" />
    <variable
        name="Ca_o" public_interface="out"
        initial_value="2.0" units="mM" />

    <variable
        name="Ca_ds" public_interface="out"
        initial_value="0.0000171" units="mM" />
    <variable
        name="Ca_up" public_interface="out"
        initial_value="0.2872393" units="mM" />
    <variable
        name="Ca_rel" public_interface="out"
        initial_value="0.2846761" units="mM" />
    
    <variable name="Ca_calmod" initial_value="0.0003258" units="mM" />
    <variable name="dy_Ca_calmod" units="mM_per_ms"/>
    <variable name="Ca_troponin" initial_value="0.0002060" units="mM" />
    <variable name="dy_Ca_troponin" units="mM_per_ms"/>
    <variable name="CALM" initial_value="0.02" units="mM" />
    <variable name="TROP" initial_value="0.05" units="mM" />

    <variable name="alpha_trop" initial_value="100.0" units="per_mM_per_ms" />
    <variable name="beta_trop" initial_value="0.2" units="per_ms" />
    <variable name="gamma_trop_SL" initial_value="2.5e+3" units="per_mm" />
    <variable name="V_i" initial_value="0.49" units="dimensionless" />
    <variable name="V_rel" initial_value="0.1" units="dimensionless" />
    <variable name="V_ds" initial_value="0.1" units="dimensionless" />
    <variable name="V_up" initial_value="0.01" units="dimensionless" />
    <variable name="V_ecs" initial_value="0.3" units="dimensionless" />
    
    <variable name="Am" public_interface="in" units="per_mm"/>

    <variable name="SL" public_interface="in" units="mm" />
    <variable name="i_leak" public_interface="in" units="mM_per_ms" />
    <variable name="i_decay" public_interface="in" units="mM_per_ms" />
    <variable name="i_up" public_interface="in" units="mM_per_ms" />
    <variable name="i_tr" public_interface="in" units="mM_per_ms" />
    <variable name="i_rel" public_interface="in" units="mM_per_ms" />
    <variable name="i_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_p_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_Na" public_interface="in" units="uA_per_mmsq" />

    <variable name="i_NaK" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_NaCa" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_NaCa_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Na_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Na_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_to" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_ACh" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_ATP" public_interface="in" units="uA_per_mmsq" />

    <variable name="i_K1" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_K_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_K_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Ca" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_Ca_L_Ca_ds" public_interface="in" units="uA_per_mmsq" />
    <variable name="i_b_Ca" public_interface="in" units="uA_per_mmsq" />

    <variable name="i_Ca_stretch" public_interface="in" units="uA_per_mmsq" />
    <variable name="F" public_interface="in" units="faradays_constant" />
    <variable name="time" public_interface="in" units="ms" />
    
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Na_i_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of intracellular sodium concentration.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Na_i_diff_eq">
      <apply id="Na_i_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Na_i </ci>

        </apply>
        <apply><times />
          <apply><minus/>
            <apply><divide />
              <ci> Am </ci>
              <apply><times />
                <ci> V_i </ci>

                <ci> F </ci>
              </apply>
            </apply>
          </apply>
          <apply><plus />
            <ci> i_Na </ci>
            <ci> i_p_Na </ci>

            <apply><times/>
              <ci> i_b_Na </ci>
              <apply><divide/>
                <ci>Na_o</ci>
                <cn cellml:units="mM">140.0</cn>
              </apply>
            </apply>

            <apply><times />
              <ci> i_NaK </ci>
              <cn cellml:units="dimensionless"> 3.0 </cn>
            </apply>
            <apply><times />
              <ci> i_NaCa </ci>

              <cn cellml:units="dimensionless"> 3.0 </cn>
            </apply>
            <apply><times />
              <ci> i_NaCa_ds </ci>
              <cn cellml:units="dimensionless"> 3.0 </cn>
            </apply>

            <ci> i_Ca_L_Na </ci>
            <ci> i_Ca_L_Na_ds </ci>
            <ci> i_Na_stretch </ci>
          </apply>
        </apply>
      </apply>

    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#K_i_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of intracellular potassium concentration.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>

    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="K_i_diff_eq">
      <apply id="K_i_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> K_i </ci>
        </apply>

        <apply><times />
          <apply><minus/>
            <apply><divide />
              <ci> Am </ci>
              <apply><times />
                <ci> V_i </ci>
                <ci> F </ci>

              </apply>
            </apply>
          </apply>
          <apply><minus />
            <apply><plus />
              <ci> i_K1 </ci>
              <ci> i_to </ci>

              <ci> i_b_K </ci>
              <ci> i_K </ci>
              <ci> i_K_stretch </ci>
              <ci> i_Ca_L_K </ci>
              <ci> i_Ca_L_K_ds </ci>

              <ci> i_K_ACh </ci>
              <ci> i_K_ATP </ci>
            </apply>
            <apply><times />
              <ci> i_NaK </ci>
              <cn cellml:units="dimensionless"> 2.0 </cn>

            </apply>
          </apply>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Ca_i_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>

            The rate of change of intracellular calcium concentration.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_i_diff_eq">
      <apply id="Ca_i_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>

          <ci> Ca_i </ci>
        </apply>
        <apply><minus/>
          <apply><plus />
            <apply><times />
              <apply><minus/>
                <apply><divide />
                  <ci> Am </ci>

                  <apply><times />
                    <cn cellml:units="dimensionless"> 2.0 </cn>
                    <ci> V_i </ci>
                    <ci> F </ci>
                  </apply>
                </apply>

              </apply>
              <apply><minus />
                <apply><plus />
                  <ci> i_Ca_L_Ca </ci>
                  <ci> i_b_Ca </ci>
                  <ci> i_Ca_stretch </ci>

                </apply>
                <apply><times />
                  <ci> i_NaCa </ci>
                  <cn cellml:units="dimensionless"> 2.0 </cn>
                </apply>
              </apply>
            </apply><!--times-->

            <apply><times />
              <ci> i_rel </ci>
              <apply><divide />
                <ci> V_rel </ci>
                <ci> V_i </ci>
              </apply>

            </apply>
            <apply><times />
              <ci> i_leak </ci>
              <apply><divide />
                <ci> V_rel </ci>
                <ci> V_i </ci>

              </apply>
            </apply>
            <apply><times />
              <ci> i_decay </ci>
              <apply><divide />
                <ci> V_ds </ci>
                <ci> V_i </ci>

              </apply>
            </apply>
          </apply><!--plus-->
          <apply><plus/>
            <ci>i_up</ci>
            <ci>dy_Ca_calmod</ci>
            <ci>dy_Ca_troponin</ci>

          </apply><!--plus-->
        </apply><!--minus-->
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Ca_ds_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of calcium concentration in the diadic subspace.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_ds_diff_eq">
      <apply id="Ca_ds_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Ca_ds </ci>

        </apply>
        <apply><minus />
          <apply><times />
            <apply><minus/>
              <apply><divide />
                <ci> Am </ci>
                <apply><times />
                  <cn cellml:units="dimensionless"> 2.0 </cn>

                  <ci> V_ds </ci>
                  <ci> F </ci>
                </apply>
              </apply>
            </apply>
            <apply><minus />
              <ci> i_Ca_L_Ca_ds </ci>

              <apply><times />
                <ci> i_NaCa_ds </ci>
                <cn cellml:units="dimensionless"> 2.0 </cn>
              </apply>
            </apply>
          </apply><!--times-->
          <ci>i_decay</ci>

        </apply><!--minus-->
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#Ca_up_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of calcium concentration in the network SR
            uptake store.
          </rdf:value>

        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_up_diff_eq">
      <apply id="Ca_up_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Ca_up </ci>

        </apply>
        <apply><minus />
          <apply><times />
            <apply><divide />
              <ci> V_i </ci>
              <ci> V_up </ci>
            </apply>

            <ci> i_up </ci>
          </apply>
          <ci> i_tr </ci>
        </apply>
      </apply>
    </math>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">

      <rdf:Description rdf:about="#Ca_rel_diff_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of calcium concentration in the junctional SR
            release store.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_rel_diff_eq">

      <apply id="Ca_rel_diff"><eq />
        <apply><diff />
          <bvar><ci> time </ci></bvar>
          <ci> Ca_rel </ci>
        </apply>
        <apply><minus />
          <apply><times />

            <apply><divide />
              <ci> V_up </ci>
              <ci> V_rel </ci>
            </apply>
            <ci> i_tr </ci>
          </apply>

          <apply><plus/>
            <ci> i_rel </ci>
            <ci>i_leak</ci>
          </apply>
        </apply>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#dy_Ca_calmod_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of calcium bound to calmodulin.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="dy_Ca_calmod_calculation_eq">
      <apply id="dy_Ca_calmod_calculation"><eq/>
        <ci>dy_Ca_calmod</ci>
        <apply><minus />
          <apply><times />
            <cn cellml:units="per_mM_per_ms"> 100.0 </cn>
            <ci> Ca_i </ci>

            <apply><minus />
              <ci> CALM </ci>
              <ci> Ca_calmod </ci>
            </apply>
          </apply>
          <apply><times />
            <cn cellml:units="per_ms"> 0.05 </cn>

            <ci> Ca_calmod </ci>
          </apply>
        </apply>
      </apply>
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_calmod_diff_eq">
      <apply id="Ca_calmod_diff"><eq />
        <apply><diff />

          <bvar><ci> time </ci></bvar>
          <ci> Ca_calmod </ci>
        </apply>
        <ci>dy_Ca_calmod</ci>
      </apply>
    </math>

    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:cmeta="http://www.cellml.org/metadata/1.0#">
      <rdf:Description rdf:about="#dy_Ca_troponoin_calculation_eq">
        <cmeta:comment rdf:parseType="Resource">
          <rdf:value>
            The rate of change of calcium bound to troponin.
          </rdf:value>
        </cmeta:comment>
      </rdf:Description>
    </rdf:RDF>

    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="dy_Ca_troponoin_calculation_eq">
      <apply id="dy_Ca_troponoin_calculation"><eq/>
        <ci>dy_Ca_troponin</ci>
        <apply><minus />
          <apply><times />
            <ci> alpha_trop </ci>
            <ci> Ca_i </ci>

            <apply><minus />
              <ci> TROP </ci>
              <ci> Ca_troponin </ci>
            </apply>
          </apply>
          <apply><times />
            <ci> beta_trop </ci>

            <ci> Ca_troponin </ci>
          </apply>
        </apply>
      </apply>
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" cmeta:id="Ca_troponin_diff_eq">
      <apply id="Ca_troponin_diff"><eq />
        <apply><diff />

          <bvar><ci> time </ci></bvar>
          <ci> Ca_troponin </ci>
        </apply>
        <ci>dy_Ca_troponin</ci>
      </apply>
    </math>

  </component>
    
  <group>
    <relationship_ref relationship="containment" />
    <component_ref component="membrane">
      <component_ref component="fast_sodium_current">
        <component_ref component="fast_sodium_current_m_gate" />
        <component_ref component="fast_sodium_current_h_gate" />
      </component_ref>
      <component_ref component="L_type_Ca_channel">

        <component_ref component="L_type_Ca_channel_d_gate" />
        <component_ref component="L_type_Ca_channel_f_gate" />
        <component_ref component="L_type_Ca_channel_f2_gate" />
        <component_ref component="L_type_Ca_channel_f2ds_gate" />
      </component_ref>
      <component_ref component="rapid_time_dependent_potassium_current">
        <component_ref component="rapid_time_dependent_potassium_current_Xr1_gate" />
        <component_ref component="rapid_time_dependent_potassium_current_Xr2_gate" />
      </component_ref>

      <component_ref component="slow_time_dependent_potassium_current">
        <component_ref component="slow_time_dependent_potassium_current_Xs_gate" />
      </component_ref>
      <component_ref component="total_potassium_current" />
      <component_ref component="potassium_background_current" />
      <component_ref component="time_independent_potassium_current" />
      <component_ref component="sodium_activated_potassium_current" />
      <component_ref component="ATP_dependent_potassium_current" />
      <component_ref component="persistent_sodium_current" />

      <component_ref component="sodium_background_current" />
      <component_ref component="calcium_background_current" />
      <component_ref component="transient_outward_current">
        <component_ref component="transient_outward_current_s_gate" />
        <component_ref component="transient_outward_current_r_gate" />
      </component_ref>
      <component_ref component="ACh_dependent_potassium_current">
        <component_ref component="ACh_dependent_potassium_current_xACh1_gate" />
        <component_ref component="ACh_dependent_potassium_current_xACh2_gate" />

      </component_ref>
      <component_ref component="sodium_potassium_pump" />
      <component_ref component="sodium_calcium_pump" />
      <component_ref component="calcium_uptake_from_myoplasm_to_NSR" />
      <component_ref component="calcium_transfer_from_NSR_to_JSR" />
      <component_ref component="calcium_leak_from_SR" />
      <component_ref component="calcium_release_from_SR" />
      <component_ref component="ds_decay_flux"/>
      <component_ref component="length_dependence" />

      <component_ref component="stretch_dependent_Ca_current" />
      <component_ref component="stretch_dependent_K_current" />
      <component_ref component="stretch_dependent_Na_current" />
      <component_ref component="stretch_dependent_Ns_current" />
      <component_ref component="stretch_dependent_An_current" />
      <component_ref component="ionic_concentrations" />
      <component_ref component="reversal_potentials" />
    </component_ref>
  </group>

  
  <group>
    <relationship_ref relationship="encapsulation" />
    <component_ref component="fast_sodium_current">
      <component_ref component="fast_sodium_current_m_gate" />
      <component_ref component="fast_sodium_current_h_gate" />
    </component_ref>
    <component_ref component="L_type_Ca_channel">
      <component_ref component="L_type_Ca_channel_d_gate" />
      <component_ref component="L_type_Ca_channel_f_gate" />

      <component_ref component="L_type_Ca_channel_f2_gate" />
      <component_ref component="L_type_Ca_channel_f2ds_gate" />
    </component_ref>
    <component_ref component="rapid_time_dependent_potassium_current">
      <component_ref component="rapid_time_dependent_potassium_current_Xr1_gate" />
      <component_ref component="rapid_time_dependent_potassium_current_Xr2_gate" />
    </component_ref>
    <component_ref component="slow_time_dependent_potassium_current">
      <component_ref component="slow_time_dependent_potassium_current_Xs_gate" />

    </component_ref>
    <component_ref component="ACh_dependent_potassium_current">
      <component_ref component="ACh_dependent_potassium_current_xACh1_gate" />
      <component_ref component="ACh_dependent_potassium_current_xACh2_gate" />
    </component_ref>
    <component_ref component="transient_outward_current">
      <component_ref component="transient_outward_current_s_gate"/>
      <component_ref component="transient_outward_current_r_gate"/>
    </component_ref>

  </group>
  
  <!--
    "Time" is passed from the "environment" component into the
    "membrane" and current components.
  -->
  
  <connection>
    <map_components
        component_1="membrane" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />

  </connection>
  
  <connection>
    <map_components
        component_1="fast_sodium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>

  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />

  </connection>
  
  <connection>
    <map_components
        component_1="rapid_time_dependent_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="slow_time_dependent_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>

  
  <connection>
    <map_components
        component_1="time_independent_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_activated_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>

    <map_components
        component_1="ATP_dependent_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="ACh_dependent_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="persistent_sodium_current" component_2="environment" />

    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_background_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="potassium_background_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />

  </connection>
  
  <connection>
    <map_components
        component_1="calcium_background_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="transient_outward_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>

  
  <connection>
    <map_components
        component_1="stretch_dependent_Ca_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="stretch_dependent_K_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>

    <map_components
        component_1="stretch_dependent_Na_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="stretch_dependent_Ns_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="stretch_dependent_An_current" component_2="environment" />

    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_potassium_pump" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_calcium_pump" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />

  </connection>
  
  <connection>
    <map_components
        component_1="ionic_concentrations" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="total_potassium_current" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>

  
  <connection>
    <map_components
        component_1="calcium_uptake_from_myoplasm_to_NSR" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_transfer_from_NSR_to_JSR" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <connection>

    <map_components
        component_1="calcium_release_from_SR" component_2="environment" />
    <map_variables variable_1="time" variable_2="time" />
  </connection>
  
  <!--
    Several variables are passed between the "membrane" and its sub-components.
  -->
  
  <connection>
    <map_components
        component_1="membrane" component_2="reversal_potentials" />
    <map_variables variable_1="R" variable_2="R" />
    <map_variables variable_1="T" variable_2="T" />
    <map_variables variable_1="F" variable_2="F" />

  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="fast_sodium_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_Na" variable_2="i_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="L_type_Ca_channel" />
    <map_variables variable_1="V" variable_2="V" />

    <map_variables variable_1="i_Ca_L_Ca" variable_2="i_Ca_L_Ca" />
    <map_variables variable_1="i_Ca_L_Na" variable_2="i_Ca_L_Na" />
    <map_variables variable_1="i_Ca_L_K" variable_2="i_Ca_L_K" />
    <map_variables variable_1="i_Ca_L_Ca_ds" variable_2="i_Ca_L_Ca_ds" />
    <map_variables variable_1="i_Ca_L_Na_ds" variable_2="i_Ca_L_Na_ds" />
    <map_variables variable_1="i_Ca_L_K_ds" variable_2="i_Ca_L_K_ds" />
    <map_variables variable_1="R" variable_2="R" />
    <map_variables variable_1="T" variable_2="T" />
    <map_variables variable_1="F" variable_2="F" />

  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="total_potassium_current" />
    <map_variables variable_1="i_K" variable_2="i_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="rapid_time_dependent_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>

  
  <connection>
    <map_components
        component_1="membrane" component_2="slow_time_dependent_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="transient_outward_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_to" variable_2="i_to" />
  </connection>

  
  <connection>
    <map_components
        component_1="membrane" component_2="sodium_activated_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="ATP_dependent_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_K_ATP" variable_2="i_K_ATP" />
  </connection>

  
  <connection>
    <map_components
        component_1="membrane" component_2="time_independent_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_K1" variable_2="i_K1" />
    <map_variables variable_1="R" variable_2="R" />
    <map_variables variable_1="T" variable_2="T" />
    <map_variables variable_1="F" variable_2="F" />
  </connection>
  
  <connection>

    <map_components
        component_1="membrane" component_2="persistent_sodium_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_p_Na" variable_2="i_p_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="sodium_background_current" />
    <map_variables variable_1="V" variable_2="V" />
     <map_variables variable_1="i_b_Na" variable_2="i_b_Na" />
  </connection>

  
  <connection>
    <map_components
        component_1="membrane" component_2="calcium_background_current" />
    <map_variables variable_1="V" variable_2="V" />
     <map_variables variable_1="i_b_Ca" variable_2="i_b_Ca" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="potassium_background_current" />
    <map_variables variable_1="V" variable_2="V" />
     <map_variables variable_1="i_b_K" variable_2="i_b_K" />

  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="sodium_potassium_pump" />
    <map_variables variable_1="i_NaK" variable_2="i_NaK" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="sodium_calcium_pump" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_NaCa" variable_2="i_NaCa" />

    <map_variables variable_1="i_NaCa_ds" variable_2="i_NaCa_ds" />
    <map_variables variable_1="R" variable_2="R" />
    <map_variables variable_1="T" variable_2="T" />
    <map_variables variable_1="F" variable_2="F" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="ACh_dependent_potassium_current" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="i_K_ACh" variable_2="i_K_ACh" />

    <map_variables variable_1="R" variable_2="R" />
    <map_variables variable_1="T" variable_2="T" />
    <map_variables variable_1="F" variable_2="F" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="stretch_dependent_Ca_current" />
    <map_variables variable_1="i_Ca_stretch" variable_2="i_Ca_stretch" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>

  
  <connection>
    <map_components
        component_1="membrane" component_2="stretch_dependent_K_current" />
    <map_variables variable_1="i_K_stretch" variable_2="i_K_stretch" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="stretch_dependent_Na_current" />
    <map_variables variable_1="i_Na_stretch" variable_2="i_Na_stretch" />
    <map_variables variable_1="V" variable_2="V" />

  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="stretch_dependent_Ns_current" />
    <map_variables variable_1="i_Ns_stretch" variable_2="i_Ns_stretch" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="stretch_dependent_An_current" />
    <map_variables variable_1="i_An_stretch" variable_2="i_An_stretch" />

    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="membrane" component_2="ionic_concentrations" />
    <map_variables variable_1="F" variable_2="F" />
    <map_variables variable_1="Am" variable_2="Am" />
  </connection>
          
  <!--  Several variables are passed between the sibling components. -->        
  
  <connection>

    <map_components
        component_1="reversal_potentials" component_2="sodium_background_current" />
    <map_variables variable_1="E_Na" variable_2="E_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="persistent_sodium_current" />
    <map_variables variable_1="E_Na" variable_2="E_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="stretch_dependent_Na_current" />

    <map_variables variable_1="E_Na" variable_2="E_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="stretch_dependent_K_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="potassium_background_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />

  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="sodium_activated_potassium_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="time_independent_potassium_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>

  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="rapid_time_dependent_potassium_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="transient_outward_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>
  
  <connection>

    <map_components
        component_1="reversal_potentials" component_2="ACh_dependent_potassium_current" />
    <map_variables variable_1="E_K" variable_2="E_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="slow_time_dependent_potassium_current" />
    <map_variables variable_1="E_Ks" variable_2="E_Ks" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="calcium_background_current" />

    <map_variables variable_1="E_Ca" variable_2="E_Ca" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="stretch_dependent_Ca_current" />
    <map_variables variable_1="E_Ca" variable_2="E_Ca" />
  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="fast_sodium_current" />
    <map_variables variable_1="E_mh" variable_2="E_mh" />

  </connection>
  
  <connection>
    <map_components
        component_1="reversal_potentials" component_2="ionic_concentrations" />
    <map_variables variable_1="K_o" variable_2="K_o" />
    <map_variables variable_1="Na_o" variable_2="Na_o" />
    <map_variables variable_1="K_i" variable_2="K_i" />
    <map_variables variable_1="Na_i" variable_2="Na_i" />
    <map_variables variable_1="Ca_o" variable_2="Ca_o" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />

  </connection>
  
  <connection>
    <map_components
        component_1="time_independent_potassium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="K_o" variable_2="K_o" />
    <map_variables variable_1="i_K1" variable_2="i_K1" />
  </connection>
  
  <connection>
    <map_components
        component_1="time_independent_potassium_current" component_2="ACh_dependent_potassium_current" />
    <map_variables variable_1="K_mk1" variable_2="K_mk1" />

  </connection>
  
  <connection>
    <map_components
        component_1="total_potassium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_K" variable_2="i_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="total_potassium_current" component_2="rapid_time_dependent_potassium_current" />
    <map_variables variable_1="i_Kr" variable_2="i_Kr" />
  </connection>

  
  <connection>
    <map_components
        component_1="total_potassium_current" component_2="slow_time_dependent_potassium_current" />
    <map_variables variable_1="i_Ks" variable_2="i_Ks" />
  </connection>
  
  <connection>
    <map_components
        component_1="total_potassium_current" component_2="sodium_activated_potassium_current" />
    <map_variables variable_1="i_KNa" variable_2="i_KNa" />
  </connection>
  
  <connection>

    <map_components
        component_1="potassium_background_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_b_K" variable_2="i_b_K" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_activated_potassium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="Na_i" variable_2="Na_i" />
  </connection>
  
  <connection>
    <map_components
        component_1="fast_sodium_current" component_2="ionic_concentrations" />

    <map_variables variable_1="i_Na" variable_2="i_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="persistent_sodium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_p_Na" variable_2="i_p_Na" />
  </connection>
  
  <connection>
    <map_components
        component_1="sodium_background_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_b_Na" variable_2="i_b_Na" />

    <map_variables variable_1="Na_i" variable_2="Na_i" />
  </connection>
  
  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="ionic_concentrations" />
    <map_variables variable_1="i_Ca_L_Ca" variable_2="i_Ca_L_Ca" />
    <map_variables variable_1="i_Ca_L_K" variable_2="i_Ca_L_K" />
    <map_variables variable_1="i_Ca_L_Na" variable_2="i_Ca_L_Na" />
    <map_variables variable_1="i_Ca_L_Ca_ds" variable_2="i_Ca_L_Ca_ds" />
    <map_variables variable_1="i_Ca_L_Na_ds" variable_2="i_Ca_L_Na_ds" />

    <map_variables variable_1="i_Ca_L_K_ds" variable_2="i_Ca_L_K_ds" />
    <map_variables variable_1="Ca_o" variable_2="Ca_o" />
    <map_variables variable_1="Na_o" variable_2="Na_o" />
    <map_variables variable_1="K_o" variable_2="K_o" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="Na_i" variable_2="Na_i" />
    <map_variables variable_1="K_i" variable_2="K_i" />
    <map_variables variable_1="Ca_ds" variable_2="Ca_ds" />
  </connection>

  
  <connection>
    <map_components
        component_1="calcium_background_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_b_Ca" variable_2="i_b_Ca" />
  </connection>
  
  <connection>
    <map_components
        component_1="transient_outward_current" component_2="ionic_concentrations" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="i_to" variable_2="i_to" />
  </connection>

  
  <connection>
    <map_components
        component_1="ACh_dependent_potassium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="K_o" variable_2="K_o" />
    <map_variables variable_1="i_K_ACh" variable_2="i_K_ACh" />
  </connection>
  
  <connection>
    <map_components
        component_1="ATP_dependent_potassium_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_K_ATP" variable_2="i_K_ATP" />
  </connection>

  
  <connection>
    <map_components
        component_1="sodium_potassium_pump" component_2="ionic_concentrations" />
    <map_variables variable_1="i_NaK" variable_2="i_NaK" />
    <map_variables variable_1="K_o" variable_2="K_o" />
    <map_variables variable_1="Na_i" variable_2="Na_i" />
  </connection> 
  
  <connection>
    <map_components
        component_1="sodium_calcium_pump" component_2="ionic_concentrations" />
    <map_variables variable_1="i_NaCa" variable_2="i_NaCa" />

    <map_variables variable_1="i_NaCa_ds" variable_2="i_NaCa_ds" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="Na_i" variable_2="Na_i" />
    <map_variables variable_1="Ca_o" variable_2="Ca_o" />
    <map_variables variable_1="Na_o" variable_2="Na_o" />
    <map_variables variable_1="Ca_ds" variable_2="Ca_ds" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_uptake_from_myoplasm_to_NSR" component_2="ionic_concentrations" />

    <map_variables variable_1="i_up" variable_2="i_up" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="Ca_up" variable_2="Ca_up" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_transfer_from_NSR_to_JSR" component_2="ionic_concentrations" />
    <map_variables variable_1="i_tr" variable_2="i_tr" />
    <map_variables variable_1="Ca_rel" variable_2="Ca_rel" />
    <map_variables variable_1="Ca_up" variable_2="Ca_up" />

  </connection>
  
  <connection>
    <map_components
        component_1="calcium_release_from_SR" component_2="ionic_concentrations" />
    <map_variables variable_1="i_rel" variable_2="i_rel" />
    <map_variables variable_1="Ca_rel" variable_2="Ca_rel" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_leak_from_SR" component_2="ionic_concentrations" />
    <map_variables variable_1="i_leak" variable_2="i_leak" />

    <map_variables variable_1="Ca_rel" variable_2="Ca_rel" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_leak_from_SR" component_2="length_dependence" />
    <map_variables variable_1="gamma_SR_SL" variable_2="gamma_SR_SL" />
    <map_variables variable_1="SL" variable_2="SL" />
  </connection>
  
  <connection>
    <map_components
        component_1="ds_decay_flux" component_2="ionic_concentrations" />

    <map_variables variable_1="i_decay" variable_2="i_decay" />
    <map_variables variable_1="Ca_ds" variable_2="Ca_ds" />
  </connection>
  
  <connection>
    <map_components
        component_1="calcium_release_from_SR" component_2="ionic_concentrations" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="Ca_ds" variable_2="Ca_ds" />
  </connection> 
  
  <connection>

    <map_components
        component_1="calcium_release_from_SR" component_2="membrane" />
    <map_variables variable_1="V" variable_2="V" />
  </connection> 
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="ionic_concentrations" />
    <map_variables variable_1="SL" variable_2="SL" />
  </connection>
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="stretch_dependent_Ca_current" />

    <map_variables variable_1="f_stretch" variable_2="f_stretch" />
  </connection>
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="stretch_dependent_Na_current" />
    <map_variables variable_1="f_stretch" variable_2="f_stretch" />
  </connection>
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="stretch_dependent_K_current" />
    <map_variables variable_1="f_stretch" variable_2="f_stretch" />

  </connection> 
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="stretch_dependent_Ns_current" />
    <map_variables variable_1="f_stretch" variable_2="f_stretch" />
  </connection>
  
  <connection>
    <map_components
        component_1="length_dependence" component_2="stretch_dependent_An_current" />
    <map_variables variable_1="f_stretch" variable_2="f_stretch" />
  </connection>

  
  <connection>
    <map_components
        component_1="stretch_dependent_Ca_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_Ca_stretch" variable_2="i_Ca_stretch" />
  </connection>
  
  <connection>
    <map_components
        component_1="stretch_dependent_K_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_K_stretch" variable_2="i_K_stretch" />
  </connection>
  
  <connection>

    <map_components
        component_1="stretch_dependent_Na_current" component_2="ionic_concentrations" />
    <map_variables variable_1="i_Na_stretch" variable_2="i_Na_stretch" />
  </connection>
  
  <!--  
    Various variables are passed between parent components and their            
    encapsulated gates.
  -->
  
  <connection>
    <map_components
        component_1="rapid_time_dependent_potassium_current" component_2="rapid_time_dependent_potassium_current_Xr1_gate" />
    <map_variables variable_1="Xr1" variable_2="Xr1" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />

  </connection>
  
  <connection>
    <map_components
        component_1="rapid_time_dependent_potassium_current" component_2="rapid_time_dependent_potassium_current_Xr2_gate" />
    <map_variables variable_1="Xr2" variable_2="Xr2" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="slow_time_dependent_potassium_current" component_2="slow_time_dependent_potassium_current_Xs_gate" />

    <map_variables variable_1="Xs" variable_2="Xs" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="fast_sodium_current" component_2="fast_sodium_current_m_gate" />
    <map_variables variable_1="m" variable_2="m" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />

  </connection>

  <connection>
    <map_components
        component_1="fast_sodium_current" component_2="fast_sodium_current_h_gate" />
    <map_variables variable_1="h" variable_2="h" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>

    <map_components
        component_1="L_type_Ca_channel" component_2="L_type_Ca_channel_d_gate" />
    <map_variables variable_1="d" variable_2="d" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="L_type_Ca_channel_f_gate" />
    <map_variables variable_1="f" variable_2="f" />
    <map_variables variable_1="time" variable_2="time" />

    <map_variables variable_1="Ca_i" variable_2="Ca_i" />
    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="K_cachoff" variable_2="K_cachoff" />
  </connection>
  
  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="L_type_Ca_channel_f2_gate" />
    <map_variables variable_1="f2" variable_2="f2" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="Ca_i" variable_2="Ca_i" />

    <map_variables variable_1="V" variable_2="V" />
    <map_variables variable_1="K_cachoff" variable_2="K_cachoff" />
  </connection>
  
  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="L_type_Ca_channel_f2ds_gate" />
    <map_variables variable_1="f2ds" variable_2="f2ds" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="Ca_ds" variable_2="Ca_ds" />
    <map_variables variable_1="V" variable_2="V" />

  </connection>
  
  <connection>
    <map_components
        component_1="L_type_Ca_channel" component_2="ACh_dependent_potassium_current" />
    <map_variables variable_1="ACh" variable_2="ACh" />
  </connection>
  
  <connection>
    <map_components
        component_1="transient_outward_current" component_2="transient_outward_current_s_gate" />
    <map_variables variable_1="s" variable_2="s" />
    <map_variables variable_1="time" variable_2="time" />

    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>
    <map_components
        component_1="transient_outward_current" component_2="transient_outward_current_r_gate" />
    <map_variables variable_1="r" variable_2="r" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  
  <connection>

    <map_components
        component_1="ACh_dependent_potassium_current" component_2="ACh_dependent_potassium_current_xACh1_gate" />
    <map_variables variable_1="x_ACh1" variable_2="x_ACh1" />
    <map_variables variable_1="time" variable_2="time" />
    <map_variables variable_1="V" variable_2="V" />
  </connection>
  <connection>
    <map_components
        component_1="ACh_dependent_potassium_current" component_2="ACh_dependent_potassium_current_xACh2_gate" />
    <map_variables variable_1="x_ACh2" variable_2="x_ACh2" />
    <map_variables variable_1="time" variable_2="time" />

    <map_variables variable_1="V" variable_2="V" />
  </connection>
      
</model>