<?xml version='1.0' encoding='UTF-8'?>
<model name="electrical_pacing_experiment" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!-- Not sure how to do this in CellML 2.0-->
    <import xlink:href="../../units.cellml">
        <units name="u_per_m" units_ref="u_per_m"/>
        <units name="ms" units_ref="ms"/>
        <units name="per_ms" units_ref="per_ms"/>
        <units name="mV" units_ref="mV"/>
        <units name="per_mV" units_ref="per_mV"/>
        <units name="uS_per_nF" units_ref="uS_per_nF"/>
        <units name="nA_per_nF" units_ref="nA_per_nF"/>
        <units name="molar" units_ref="molar"/>
        <units name="mM" units_ref="mM"/>
        <units name="uM" units_ref="uM"/>
        <units name="mM4" units_ref="mM4"/>
        <units name="mV_per_uM" units_ref="mV_per_uM"/>
        <units name="uM_per_ms" units_ref="uM_per_ms"/>
        <units name="per_uM_per_ms" units_ref="per_uM_per_ms"/>
        <units name="J_per_moleK" units_ref="J_per_moleK"/>
        <units name="coulomb_per_mmole" units_ref="coulomb_per_mmole"/>
        <units name="cm_per_s" units_ref="cm_per_s"/>
        <units name="mA_per_cm2" units_ref="mA_per_cm2"/>
        <units name="mmole_per_coulomb_cm" units_ref="mmole_per_coulomb_cm"/>
    </import>
    <!-- At the time of writing this we have to manually fetch interesting entries here...-->
    <component name="outputs">
        <variable initial_value="0.0" name="time" public_interface="out" units="ms"/>
        <!-- QOIs-->
        <variable name="V" public_interface="in" units="mV"/>
        <variable name="Ca_dyad" public_interface="in" units="uM"/>
        <variable name="Ca_submem" public_interface="in" units="uM"/>
        <variable name="Ca_i" public_interface="in" units="uM"/>
        <variable name="Ca_NSR" public_interface="in" units="uM"/>
        <variable name="Ca_JSR" public_interface="in" units="uM"/>
        <!-- Stimulation Settings-->
        <variable initial_value="0" name="stim_offset" public_interface="out" units="ms"/>
        <variable initial_value="220" name="stim_period" public_interface="out" units="ms"/>
        <variable initial_value="3" name="stim_duration" public_interface="out" units="ms"/>
        <variable initial_value="-15" name="stim_amplitude" public_interface="out" units="nA_per_nF"/>
    </component>
    <connection>
        <map_components component_1="outputs" component_2="cell_membrane"/>
        <map_variables variable_1="V" variable_2="V"/>
    </connection>
    <connection>
        <map_components component_1="outputs" component_2="Ca"/>
        <map_variables variable_1="Ca_dyad" variable_2="Ca_dyad"/>
        <map_variables variable_1="Ca_submem" variable_2="Ca_submem"/>
        <map_variables variable_1="Ca_i" variable_2="Ca_i"/>
        <map_variables variable_1="Ca_NSR" variable_2="Ca_NSR"/>
        <map_variables variable_1="Ca_JSR" variable_2="Ca_JSR"/>
    </connection>
    <import xlink:href="../../models/mahajan_shiferaw_2008.cellml">
        <component component_ref="interface" name="cell_model"/>
        <component component_ref="cell_membrane" name="cell_membrane"/>
        <component component_ref="Ca" name="Ca"/>
    </import>
    <import xlink:href="../common/periodic_electrical_stim_protocol.cellml">
        <component component_ref="stimulus_protocol" name="stimulus_protocol"/>
    </import>
    <connection>
        <map_components component_1="outputs" component_2="stimulus_protocol"/>
        <map_variables variable_1="time" variable_2="time"/>
        <map_variables variable_1="stim_offset" variable_2="stim_offset"/>
        <map_variables variable_1="stim_period" variable_2="stim_period"/>
        <map_variables variable_1="stim_duration" variable_2="stim_duration"/>
        <map_variables variable_1="stim_amplitude" variable_2="stim_amplitude"/>
    </connection>
    <connection>
        <map_components component_1="outputs" component_2="cell_model"/>
        <map_variables variable_1="time" variable_2="time"/>
    </connection>
    <connection>
        <map_components component_1="stimulus_protocol" component_2="cell_model"/>
        <map_variables variable_1="current" variable_2="i_stim"/>
    </connection>
</model>
