C C There are a total of 13 entries in the algebraic variable array. C There are a total of 5 entries in each of the rate and state variable arrays. C There are a total of 14 entries in the constant variable array. C C C VOI is time in component environment (millisecond). C CONSTS(1) is alpha in component model_constants (dimensionless). C CONSTS(2) is lamda in component model_constants (dimensionless). C STATES(1) is V in component membrane (millivolt). C CONSTS(3) is Cm in component membrane (microF_per_cm2). C ALGBRC(9) is i_Ca_T in component T_type_calcium_current (microA_per_cm2). C ALGBRC(10) is i_Ca_L in component L_type_calcium_current (microA_per_cm2). C ALGBRC(12) is i_Ca_K in component calcium_activated_potassium_current (microA_per_cm2). C ALGBRC(11) is i_K in component potassium_current (microA_per_cm2). C ALGBRC(13) is i_Cl in component leak_chloride_current (microA_per_cm2). C ALGBRC(1) is V_tilde in component gate_voltage (millivolt). C CONSTS(4) is E_Ca in component T_type_calcium_current (millivolt). C CONSTS(5) is g_Ca_T in component T_type_calcium_current (milliS_per_cm2). C ALGBRC(8) is m in component T_type_calcium_current_m_gate (dimensionless). C STATES(2) is h in component T_type_calcium_current_h_gate (dimensionless). C ALGBRC(2) is alpha_m in component T_type_calcium_current_m_gate (per_millisecond). C ALGBRC(5) is beta_m in component T_type_calcium_current_m_gate (per_millisecond). C ALGBRC(3) is alpha_h in component T_type_calcium_current_h_gate (per_millisecond). C ALGBRC(6) is beta_h in component T_type_calcium_current_h_gate (per_millisecond). C CONSTS(6) is g_Ca_L in component L_type_calcium_current (milliS_per_cm2). C STATES(3) is x_Ca in component L_type_calcium_current_x_Ca_gate (dimensionless). C CONSTS(7) is tau_x_Ca in component L_type_calcium_current_x_Ca_gate (millisecond). C CONSTS(8) is E_K in component potassium_current (millivolt). C CONSTS(9) is g_K in component potassium_current (milliS_per_cm2). C STATES(4) is n in component potassium_current_n_gate (dimensionless). C ALGBRC(4) is alpha_n in component potassium_current_n_gate (per_millisecond). C ALGBRC(7) is beta_n in component potassium_current_n_gate (per_millisecond). C STATES(5) is Ca in component calcium_activated_potassium_current (millimolar). C CONSTS(10) is g_Ca_K in component calcium_activated_potassium_current (milliS_per_cm2). C CONSTS(11) is rho in component calcium_activated_potassium_current (per_millisecond). C CONSTS(12) is K_c in component calcium_activated_potassium_current (millimolar_per_millivolt). C CONSTS(13) is g_Cl in component leak_chloride_current (milliS_per_cm2). C CONSTS(14) is E_Cl in component leak_chloride_current (millivolt). C RATES(1) is d/dt V in component membrane (millivolt). C RATES(2) is d/dt h in component T_type_calcium_current_h_gate (dimensionless). C RATES(3) is d/dt x_Ca in component L_type_calcium_current_x_Ca_gate (dimensionless). C RATES(4) is d/dt n in component potassium_current_n_gate (dimensionless). C RATES(5) is d/dt Ca in component calcium_activated_potassium_current (millimolar). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.12 CONSTS(2) = 12.5 STATES(1) = -55.0 CONSTS(3) = 2.5 CONSTS(4) = 80.0 CONSTS(5) = 0.51 STATES(2) = 0.01 CONSTS(6) = 0.004 STATES(3) = 0.01 CONSTS(7) = 500.0 CONSTS(8) = -75.0 CONSTS(9) = 0.3 STATES(4) = 0.01 STATES(5) = 1E-4 CONSTS(10) = 0.03 CONSTS(11) = 0.125E3 CONSTS(12) = 425.0E-5 CONSTS(13) = 0.003 CONSTS(14) = -40.0 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(5) = (CONSTS(11)/CONSTS(1))*( CONSTS(12)*STATES(3)*(CONSTS(4) - STATES(1)) - STATES(5)) ALGBRC(1) = ( 127.000*STATES(1)+8265.00)/105.000 RATES(3) = (1.00000/(1.00000+EXP( 0.150000*(- ALGBRC(1) - 50.0000))) - STATES(3))/( CONSTS(1)*CONSTS(7)) ALGBRC(3) = 0.0700000*EXP((25.0000 - ALGBRC(1))/20.0000) ALGBRC(6) = 1.00000/(1.00000+EXP(5.50000 - ALGBRC(1)*0.100000)) RATES(2) = ( ALGBRC(3)*(1.00000 - STATES(2)) - ALGBRC(6)*STATES(2))/( CONSTS(1)*CONSTS(2)) ALGBRC(4) = ( 0.0100000*(55.0000 - ALGBRC(1)))/(EXP((55.0000 - ALGBRC(1))/10.0000) - 1.00000) ALGBRC(7) = 0.125000*EXP((45.0000 - ALGBRC(1))/80.0000) RATES(4) = ( ALGBRC(4)*(1.00000 - STATES(4)) - ALGBRC(7)*STATES(4))/( CONSTS(1)*CONSTS(2)) ALGBRC(2) = ( 0.100000*(50.0000 - ALGBRC(1)))/(EXP(5.00000 - ALGBRC(1)*0.100000) - 1.00000) ALGBRC(5) = 4.00000*EXP((25.0000 - ALGBRC(1))/18.0000) ALGBRC(8) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(5)) ALGBRC(9) = CONSTS(5)*ALGBRC(8) ** 3.00000*STATES(2)*(STATES(1) - CONSTS(4)) ALGBRC(10) = CONSTS(6)*STATES(3)*(STATES(1) - CONSTS(4)) ALGBRC(12) = ( CONSTS(10)*STATES(5)*(STATES(1) - CONSTS(8)))/(0.500000+STATES(5)) ALGBRC(11) = CONSTS(9)*STATES(4) ** 4.00000*(STATES(1) - CONSTS(8)) ALGBRC(13) = CONSTS(13)*(STATES(1) - CONSTS(14)) RATES(1) = - (1.00000/( CONSTS(3)*CONSTS(1)))*(ALGBRC(9)+ALGBRC(10)+ALGBRC(12)+ALGBRC(11)+ALGBRC(13)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( 127.000*STATES(1)+8265.00)/105.000 ALGBRC(3) = 0.0700000*EXP((25.0000 - ALGBRC(1))/20.0000) ALGBRC(6) = 1.00000/(1.00000+EXP(5.50000 - ALGBRC(1)*0.100000)) ALGBRC(4) = ( 0.0100000*(55.0000 - ALGBRC(1)))/(EXP((55.0000 - ALGBRC(1))/10.0000) - 1.00000) ALGBRC(7) = 0.125000*EXP((45.0000 - ALGBRC(1))/80.0000) ALGBRC(2) = ( 0.100000*(50.0000 - ALGBRC(1)))/(EXP(5.00000 - ALGBRC(1)*0.100000) - 1.00000) ALGBRC(5) = 4.00000*EXP((25.0000 - ALGBRC(1))/18.0000) ALGBRC(8) = ALGBRC(2)/(ALGBRC(2)+ALGBRC(5)) ALGBRC(9) = CONSTS(5)*ALGBRC(8) ** 3.00000*STATES(2)*(STATES(1) - CONSTS(4)) ALGBRC(10) = CONSTS(6)*STATES(3)*(STATES(1) - CONSTS(4)) ALGBRC(12) = ( CONSTS(10)*STATES(5)*(STATES(1) - CONSTS(8)))/(0.500000+STATES(5)) ALGBRC(11) = CONSTS(9)*STATES(4) ** 4.00000*(STATES(1) - CONSTS(8)) ALGBRC(13) = CONSTS(13)*(STATES(1) - CONSTS(14)) RETURN END