Location: BG_to_channel @ ffe0f7085fd6 / BG_to.cellml

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2022-02-28 15:14:59+13:00
Desc:
Fix equation finding K Kappa and update parameters
Permanent Source URI:
https://models.fieldml.org/workspace/82e/rawfile/ffe0f7085fd622917c43914d1045c8f96dd254df/BG_to.cellml

<?xml version='1.0' encoding='UTF-8'?>
<!-- transient outward -->
<model name="BG_transient_outward" 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">
    <import xlink:href="units_and_constants/units_BG.cellml">
        <units name="mM" units_ref="mM"/>
        <units name="fmol" units_ref="fmol"/>
        <units name="per_fmol" units_ref="per_fmol"/>
        <units name="J_per_mol" units_ref="J_per_mol"/>
        <units name="fmol_per_sec" units_ref="fmol_per_sec"/>
        <units name="C_per_mol" units_ref="C_per_mol"/>
        <units name="J_per_C" units_ref="J_per_C"/>
        <units name="microm3" units_ref="microm3"/>
        <units name="fF" units_ref="fF"/>
        <units name="fC" units_ref="fC"/>
        <units name="fA" units_ref="fA"/>
    </import>
    <units name="microm3">
        <unit exponent="3" prefix="micro" units="metre"/>
    </units>
    <component name="environment">
        <variable name="time" public_interface="out" units="second"/>
        <variable initial_value="1.0e6" name="C_m" public_interface="out" units="fF"/>
        <variable initial_value="0.116325" name="q_Ko" public_interface="out" units="fmol"/>
        <variable initial_value="3.65002" name="q_Ki" public_interface="out" units="fmol"/>
        <variable initial_value="1e4" name="vol_o" public_interface="out" units="microm3"/>
        <variable initial_value="-8.5e4" name="q_mem" public_interface="out" units="fC"/>
        <variable name="Vmem" units="volt"/>
        <variable initial_value="2494.34" name="RT" public_interface="out" units="J_per_mol"/>
        <variable initial_value="1" name="z" public_interface="out" units="dimensionless"/>
        <variable initial_value="96500" name="F" public_interface="out" units="C_per_mol"/>
        <variable name="v_to" public_interface="in" units="fmol_per_sec"/>
        <variable name="I_mem" public_interface="in" units="fA"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>q_Ki</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_to</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>q_Ko</ci>
                </apply>
                <ci>v_to</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>time</ci>
                    </bvar>
                    <ci>q_mem</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>I_mem</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Vmem</ci>
                <apply>
                    <divide/>
                    <ci>q_mem</ci>
                    <ci>C_m</ci>
                </apply>
            </apply>
        </math>
    </component>
    <component name="to_parameters">
        <variable initial_value="4553.87" name="kappa_to" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="192.53" name="kappa_z00" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="3.81216" name="kappa_z01" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1135.74" name="kappa_z10" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="22.4882" name="kappa_z11" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1674.95" name="kappa_z20" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="33.1647" name="kappa_z21" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="0.0529623" name="kappa_y00" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="0.468641" name="kappa_y10" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1.38227" name="kappa_y20" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1.35902" name="kappa_y30" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1.77585" name="K_Ki" public_interface="out" units="per_fmol"/>
        <variable initial_value="13.0225" name="K_Ke" public_interface="out" units="per_fmol"/>
        <variable initial_value="26.7487" name="K_S00" public_interface="out" units="per_fmol"/>
        <variable initial_value="3.02293" name="K_S10" public_interface="out" units="per_fmol"/>
        <variable initial_value="1.02489" name="K_S20" public_interface="out" units="per_fmol"/>
        <variable initial_value="1.04242" name="K_S30" public_interface="out" units="per_fmol"/>
        <variable initial_value="1350.92" name="K_S01" public_interface="out" units="per_fmol"/>
        <variable initial_value="152.67" name="K_S11" public_interface="out" units="per_fmol"/>
        <variable initial_value="51.761" name="K_S21" public_interface="out" units="per_fmol"/>
        <variable initial_value="52.6467" name="K_S31" public_interface="out" units="per_fmol"/>
        <variable initial_value="0.668915" name="z_zf" public_interface="out" units="dimensionless"/>
        <variable initial_value="-0.652791" name="z_yf" public_interface="out" units="dimensionless"/>
        <variable initial_value="-0.604422" name="z_zr" public_interface="out" units="dimensionless"/>
        <variable initial_value="0.591213" name="z_yr" public_interface="out" units="dimensionless"/>
    </component>
    <component name="to_channel">
        <variable name="t" private_interface="out" public_interface="in" units="second"/>
        <variable name="RT" private_interface="out" public_interface="in" units="J_per_mol"/>
        <variable name="z" public_interface="in" units="dimensionless"/>
        <variable name="F" private_interface="out" public_interface="in" units="C_per_mol"/>
        <variable name="C_m" public_interface="in" units="fF"/>
        <!-- Parameters-->
        <variable name="kappa_to" public_interface="in" units="fmol_per_sec"/>
        <variable name="K_Ki" public_interface="in" units="per_fmol"/>
        <variable name="K_Ke" public_interface="in" units="per_fmol"/>
        <variable name="vol_o" public_interface="in" units="microm3"/>
        <!-- state variables-->
        <variable name="q_Ki" public_interface="in" units="fmol"/>
        <variable name="q_Ko" public_interface="in" units="fmol"/>
        <variable name="q_mem" public_interface="in" units="fC"/>
        <variable name="v_to" public_interface="out" units="fmol_per_sec"/>
        <variable name="I_mem" public_interface="out" units="fA"/>
        <variable name="u_Ki" units="J_per_mol"/>
        <variable name="u_Ko" units="J_per_mol"/>
        <variable name="V_mem" units="J_per_C"/>
        <variable name="Am_to" units="J_per_mol"/>
        <variable name="Af_K" units="J_per_mol"/>
        <variable name="Ar_K" units="J_per_mol"/>
        <!-- Conservation laws-->
        <!-- Constitutive relations - Convention: positive flow from inside to outside-->
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>Am_to</ci>
                <apply>
                    <times/>
                    <ci>F</ci>
                    <ci>V_mem</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_Ki</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_Ki</ci>
                            <ci>q_Ki</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>u_Ko</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_Ke</ci>
                            <ci>q_Ko</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
        </math>
        <!-- account for rvdv = exp(V/100) term-->
        <variable initial_value="1" name="k_P" units="volt"/>
        <variable name="q_P" units="fmol"/>
        <variable initial_value="1" name="K_P" units="per_fmol"/>
        <variable name="mu_P" units="J_per_mol"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>q_P</ci>
                <apply>
                    <times/>
                    <cn cellml:units="fmol">1</cn>
                    <apply>
                        <exp/>
                        <apply>
                            <divide/>
                            <ci>V_mem</ci>
                            <ci>k_P</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_P</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_P</ci>
                            <ci>q_P</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_K</ci>
                <apply>
                    <plus/>
                    <ci>mu_s31</ci>
                    <ci>u_Ki</ci>
                    <ci>Am_to</ci>
                    <ci>mu_P</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_K</ci>
                <apply>
                    <plus/>
                    <ci>mu_s31</ci>
                    <ci>u_Ko</ci>
                    <ci>mu_P</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_to</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <cn cellml:units="dimensionless">1</cn>
                            <ci>kappa_to</ci>
                            <apply>
                                <minus/>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Af_K</ci>
                                        <ci>RT</ci>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_K</ci>
                                        <ci>RT</ci>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <eq/>
                            <ci>Am_to</ci>
                            <cn cellml:units="J_per_mol">0</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <times/>
                            <apply>
                                <divide/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <times/>
                                        <cn cellml:units="dimensionless">1</cn>
                                        <ci>kappa_to</ci>
                                        <ci>Am_to</ci>
                                    </apply>
                                    <ci>RT</ci>
                                </apply>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <exp/>
                                        <apply>
                                            <divide/>
                                            <ci>Am_to</ci>
                                            <ci>RT</ci>
                                        </apply>
                                    </apply>
                                    <cn cellml:units="dimensionless">1</cn>
                                </apply>
                            </apply>
                            <apply>
                                <minus/>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Af_K</ci>
                                        <ci>RT</ci>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_K</ci>
                                        <ci>RT</ci>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>V_mem</ci>
                <apply>
                    <divide/>
                    <ci>q_mem</ci>
                    <ci>C_m</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>I_mem</ci>
                <apply>
                    <times/>
                    <ci>z</ci>
                    <ci>F</ci>
                    <ci>v_to</ci>
                </apply>
            </apply>
        </math>
        <!-- GATE-->
        <variable name="v_s00" units="fmol_per_sec"/>
        <variable name="v_s10" units="fmol_per_sec"/>
        <variable name="v_s20" units="fmol_per_sec"/>
        <variable name="v_s30" units="fmol_per_sec"/>
        <variable name="v_s01" units="fmol_per_sec"/>
        <variable name="v_s11" units="fmol_per_sec"/>
        <variable name="v_s21" units="fmol_per_sec"/>
        <variable name="v_s31" units="fmol_per_sec"/>
        <variable name="v_z00" units="fmol_per_sec"/>
        <variable name="v_z10" units="fmol_per_sec"/>
        <variable name="v_z20" units="fmol_per_sec"/>
        <variable name="v_z01" units="fmol_per_sec"/>
        <variable name="v_z11" units="fmol_per_sec"/>
        <variable name="v_z21" units="fmol_per_sec"/>
        <variable name="v_y00" units="fmol_per_sec"/>
        <variable name="v_y10" units="fmol_per_sec"/>
        <variable name="v_y20" units="fmol_per_sec"/>
        <variable name="v_y30" units="fmol_per_sec"/>
        <variable name="mu_s00" units="J_per_mol"/>
        <variable name="mu_s10" units="J_per_mol"/>
        <variable name="mu_s20" units="J_per_mol"/>
        <variable name="mu_s30" units="J_per_mol"/>
        <variable name="mu_s01" units="J_per_mol"/>
        <variable name="mu_s11" units="J_per_mol"/>
        <variable name="mu_s21" units="J_per_mol"/>
        <variable name="mu_s31" units="J_per_mol"/>
        <variable name="Af_z00" units="J_per_mol"/>
        <variable name="Ar_z00" units="J_per_mol"/>
        <variable name="Af_z10" units="J_per_mol"/>
        <variable name="Ar_z10" units="J_per_mol"/>
        <variable name="Af_z20" units="J_per_mol"/>
        <variable name="Ar_z20" units="J_per_mol"/>
        <variable name="Af_z01" units="J_per_mol"/>
        <variable name="Ar_z01" units="J_per_mol"/>
        <variable name="Af_z11" units="J_per_mol"/>
        <variable name="Ar_z11" units="J_per_mol"/>
        <variable name="Af_z21" units="J_per_mol"/>
        <variable name="Ar_z21" units="J_per_mol"/>
        <variable name="Af_y00" units="J_per_mol"/>
        <variable name="Ar_y00" units="J_per_mol"/>
        <variable name="Af_y10" units="J_per_mol"/>
        <variable name="Ar_y10" units="J_per_mol"/>
        <variable name="Af_y20" units="J_per_mol"/>
        <variable name="Ar_y20" units="J_per_mol"/>
        <variable name="Af_y30" units="J_per_mol"/>
        <variable name="Ar_y30" units="J_per_mol"/>
        <variable name="kappa_z00" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_z01" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_z10" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_z11" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_z20" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_z21" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_y00" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_y10" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_y20" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_y30" public_interface="in" units="fmol_per_sec"/>
        <variable name="K_S00" public_interface="in" units="per_fmol"/>
        <variable name="K_S10" public_interface="in" units="per_fmol"/>
        <variable name="K_S20" public_interface="in" units="per_fmol"/>
        <variable name="K_S30" public_interface="in" units="per_fmol"/>
        <variable name="K_S01" public_interface="in" units="per_fmol"/>
        <variable name="K_S11" public_interface="in" units="per_fmol"/>
        <variable name="K_S21" public_interface="in" units="per_fmol"/>
        <variable name="K_S31" public_interface="in" units="per_fmol"/>
        <variable name="z_zf" public_interface="in" units="dimensionless"/>
        <variable name="z_yf" public_interface="in" units="dimensionless"/>
        <variable name="z_zr" public_interface="in" units="dimensionless"/>
        <variable name="z_yr" public_interface="in" units="dimensionless"/>
        <variable initial_value="0.999993" name="q_s00" units="fmol"/>
        <variable initial_value="1e-6" name="q_s10" units="fmol"/>
        <variable initial_value="1e-6" name="q_s20" units="fmol"/>
        <variable initial_value="1e-6" name="q_s30" units="fmol"/>
        <variable initial_value="1e-6" name="q_s01" units="fmol"/>
        <variable initial_value="1e-6" name="q_s11" units="fmol"/>
        <variable initial_value="1e-6" name="q_s21" units="fmol"/>
        <variable initial_value="1e-6" name="q_s31" units="fmol"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>Af_z00</ci>
                <apply>
                    <plus/>
                    <ci>mu_s00</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z00</ci>
                <apply>
                    <plus/>
                    <ci>mu_s10</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_z10</ci>
                <apply>
                    <plus/>
                    <ci>mu_s10</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z10</ci>
                <apply>
                    <plus/>
                    <ci>mu_s20</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_z20</ci>
                <apply>
                    <plus/>
                    <ci>mu_s20</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z20</ci>
                <apply>
                    <plus/>
                    <ci>mu_s30</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_z01</ci>
                <apply>
                    <plus/>
                    <ci>mu_s01</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z01</ci>
                <apply>
                    <plus/>
                    <ci>mu_s11</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_z11</ci>
                <apply>
                    <plus/>
                    <ci>mu_s11</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z11</ci>
                <apply>
                    <plus/>
                    <ci>mu_s21</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_z21</ci>
                <apply>
                    <plus/>
                    <ci>mu_s21</ci>
                    <apply>
                        <times/>
                        <ci>z_zf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_z21</ci>
                <apply>
                    <plus/>
                    <ci>mu_s31</ci>
                    <apply>
                        <times/>
                        <ci>z_zr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_y00</ci>
                <apply>
                    <plus/>
                    <ci>mu_s00</ci>
                    <apply>
                        <times/>
                        <ci>z_yf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_y00</ci>
                <apply>
                    <plus/>
                    <ci>mu_s01</ci>
                    <apply>
                        <times/>
                        <ci>z_yr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_y10</ci>
                <apply>
                    <plus/>
                    <ci>mu_s10</ci>
                    <apply>
                        <times/>
                        <ci>z_yf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_y10</ci>
                <apply>
                    <plus/>
                    <ci>mu_s11</ci>
                    <apply>
                        <times/>
                        <ci>z_yr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_y20</ci>
                <apply>
                    <plus/>
                    <ci>mu_s20</ci>
                    <apply>
                        <times/>
                        <ci>z_yf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_y20</ci>
                <apply>
                    <plus/>
                    <ci>mu_s21</ci>
                    <apply>
                        <times/>
                        <ci>z_yr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_y30</ci>
                <apply>
                    <plus/>
                    <ci>mu_s30</ci>
                    <apply>
                        <times/>
                        <ci>z_yf</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_y30</ci>
                <apply>
                    <plus/>
                    <ci>mu_s31</ci>
                    <apply>
                        <times/>
                        <ci>z_yr</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z00</ci>
                <apply>
                    <times/>
                    <ci>kappa_z00</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z00</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z00</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z10</ci>
                <apply>
                    <times/>
                    <ci>kappa_z10</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z10</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z10</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z20</ci>
                <apply>
                    <times/>
                    <ci>kappa_z20</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z20</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z20</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z01</ci>
                <apply>
                    <times/>
                    <ci>kappa_z01</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z01</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z01</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z11</ci>
                <apply>
                    <times/>
                    <ci>kappa_z11</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z11</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z11</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_z21</ci>
                <apply>
                    <times/>
                    <ci>kappa_z21</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_z21</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_z21</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_y00</ci>
                <apply>
                    <times/>
                    <ci>kappa_y00</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_y00</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_y00</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_y10</ci>
                <apply>
                    <times/>
                    <ci>kappa_y10</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_y10</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_y10</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_y20</ci>
                <apply>
                    <times/>
                    <ci>kappa_y20</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_y20</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_y20</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_y30</ci>
                <apply>
                    <times/>
                    <ci>kappa_y30</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_y30</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_y30</ci>
                                <ci>RT</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s00</ci>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_z00</ci>
                    </apply>
                    <ci>v_y00</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s10</ci>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_z00</ci>
                        <ci>v_z10</ci>
                    </apply>
                    <ci>v_y10</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s20</ci>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_z10</ci>
                        <ci>v_z20</ci>
                    </apply>
                    <ci>v_y20</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s30</ci>
                <apply>
                    <minus/>
                    <ci>v_z20</ci>
                    <ci>v_y30</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s01</ci>
                <apply>
                    <minus/>
                    <ci>v_y00</ci>
                    <ci>v_z01</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s11</ci>
                <apply>
                    <plus/>
                    <apply>
                        <minus/>
                        <ci>v_z01</ci>
                        <ci>v_z11</ci>
                    </apply>
                    <ci>v_y10</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s21</ci>
                <apply>
                    <plus/>
                    <apply>
                        <minus/>
                        <ci>v_z11</ci>
                        <ci>v_z21</ci>
                    </apply>
                    <ci>v_y20</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_s31</ci>
                <apply>
                    <plus/>
                    <ci>v_z21</ci>
                    <ci>v_y30</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s00</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S00</ci>
                            <ci>q_s00</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s10</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S10</ci>
                            <ci>q_s10</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s20</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S20</ci>
                            <ci>q_s20</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s30</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S30</ci>
                            <ci>q_s30</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s01</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S01</ci>
                            <ci>q_s01</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s11</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S11</ci>
                            <ci>q_s11</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s21</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S21</ci>
                            <ci>q_s21</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_s31</ci>
                <apply>
                    <times/>
                    <ci>RT</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_S31</ci>
                            <ci>q_s31</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s00</ci>
                </apply>
                <ci>v_s00</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s10</ci>
                </apply>
                <ci>v_s10</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s20</ci>
                </apply>
                <ci>v_s20</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s30</ci>
                </apply>
                <ci>v_s30</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s01</ci>
                </apply>
                <ci>v_s01</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s11</ci>
                </apply>
                <ci>v_s11</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s21</ci>
                </apply>
                <ci>v_s21</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_s31</ci>
                </apply>
                <ci>v_s31</ci>
            </apply>
        </math>
    </component>
    <connection>
        <map_components component_1="environment" component_2="to_channel"/>
        <map_variables variable_1="time" variable_2="t"/>
        <map_variables variable_1="RT" variable_2="RT"/>
        <map_variables variable_1="z" variable_2="z"/>
        <map_variables variable_1="F" variable_2="F"/>
        <map_variables variable_1="q_Ki" variable_2="q_Ki"/>
        <map_variables variable_1="q_Ko" variable_2="q_Ko"/>
        <map_variables variable_1="q_mem" variable_2="q_mem"/>
        <map_variables variable_1="C_m" variable_2="C_m"/>
        <map_variables variable_1="vol_o" variable_2="vol_o"/>
        <map_variables variable_1="v_to" variable_2="v_to"/>
        <map_variables variable_1="I_mem" variable_2="I_mem"/>
    </connection>
    <connection>
        <map_components component_1="to_channel" component_2="to_parameters"/>
        <map_variables variable_1="kappa_to" variable_2="kappa_to"/>
        <map_variables variable_1="kappa_z00" variable_2="kappa_z00"/>
        <map_variables variable_1="kappa_z01" variable_2="kappa_z01"/>
        <map_variables variable_1="kappa_z10" variable_2="kappa_z10"/>
        <map_variables variable_1="kappa_z11" variable_2="kappa_z11"/>
        <map_variables variable_1="kappa_z20" variable_2="kappa_z20"/>
        <map_variables variable_1="kappa_z21" variable_2="kappa_z21"/>
        <map_variables variable_1="kappa_y00" variable_2="kappa_y00"/>
        <map_variables variable_1="kappa_y10" variable_2="kappa_y10"/>
        <map_variables variable_1="kappa_y20" variable_2="kappa_y20"/>
        <map_variables variable_1="kappa_y30" variable_2="kappa_y30"/>
        <map_variables variable_1="K_Ki" variable_2="K_Ki"/>
        <map_variables variable_1="K_Ke" variable_2="K_Ke"/>
        <map_variables variable_1="K_S00" variable_2="K_S00"/>
        <map_variables variable_1="K_S10" variable_2="K_S10"/>
        <map_variables variable_1="K_S20" variable_2="K_S20"/>
        <map_variables variable_1="K_S30" variable_2="K_S30"/>
        <map_variables variable_1="K_S01" variable_2="K_S01"/>
        <map_variables variable_1="K_S11" variable_2="K_S11"/>
        <map_variables variable_1="K_S21" variable_2="K_S21"/>
        <map_variables variable_1="K_S31" variable_2="K_S31"/>
        <map_variables variable_1="z_zf" variable_2="z_zf"/>
        <map_variables variable_1="z_yf" variable_2="z_yf"/>
        <map_variables variable_1="z_zr" variable_2="z_zr"/>
        <map_variables variable_1="z_yr" variable_2="z_yr"/>
    </connection>
</model>