Generated Code
The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
C
C There are a total of 7 entries in the algebraic variable array.
C There are a total of 3 entries in each of the rate and state variable arrays.
C There are a total of 16 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is tau in component membrane (millisecond).
C ALGBRC(5) is i_K in component potassium_current (picoA).
C ALGBRC(7) is i_K_ATP in component ATP_sensitive_potassium_current (picoA).
C ALGBRC(4) is i_Ca in component calcium_current (picoA).
C ALGBRC(6) is i_s in component slow_current (picoA).
C CONSTS(2) is g_Ca in component calcium_current (nanoS).
C CONSTS(3) is V_Ca in component calcium_current (millivolt).
C ALGBRC(1) is m_infinity in component calcium_current_m_gate (dimensionless).
C CONSTS(4) is V_m in component calcium_current_m_gate (millivolt).
C CONSTS(5) is theta_m in component calcium_current_m_gate (millivolt).
C CONSTS(6) is V_K in component potassium_current (millivolt).
C CONSTS(7) is g_K in component potassium_current (nanoS).
C STATES(2) is n in component potassium_current_n_gate (dimensionless).
C ALGBRC(2) is n_infinity in component potassium_current_n_gate (dimensionless).
C CONSTS(8) is V_n in component potassium_current_n_gate (millivolt).
C CONSTS(9) is theta_n in component potassium_current_n_gate (millivolt).
C CONSTS(10) is lambda in component potassium_current_n_gate (dimensionless).
C CONSTS(11) is g_s in component slow_current (nanoS).
C STATES(3) is s in component slow_current_s_gate (dimensionless).
C ALGBRC(3) is s_infinity in component slow_current_s_gate (dimensionless).
C CONSTS(12) is V_s in component slow_current_s_gate (millivolt).
C CONSTS(13) is theta_s in component slow_current_s_gate (millivolt).
C CONSTS(14) is tau_s in component slow_current_s_gate (millisecond).
C CONSTS(15) is g_K_ATP in component ATP_sensitive_potassium_current (nanoS).
C CONSTS(16) is p in component ATP_sensitive_potassium_current (dimensionless).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(2) is d/dt n in component potassium_current_n_gate (dimensionless).
C RATES(3) is d/dt s in component slow_current_s_gate (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = -64.0
CONSTS(1) = 20.0
CONSTS(2) = 3.6
CONSTS(3) = 25.0
CONSTS(4) = -20.0
CONSTS(5) = 12.0
CONSTS(6) = -75.0
CONSTS(7) = 10.0
STATES(2) = 0.01
CONSTS(8) = -17.0
CONSTS(9) = 5.6
CONSTS(10) = 0.9
CONSTS(11) = 4.0
STATES(3) = 0.01
CONSTS(12) = -22.0
CONSTS(13) = 8.0
CONSTS(14) = 20000.0
CONSTS(15) = 1.2
CONSTS(16) = 0.5
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = 1.00000/(1.00000+EXP((CONSTS(8) - STATES(1))/CONSTS(9)))
RATES(2) = ( CONSTS(10)*(ALGBRC(2) - STATES(2)))/CONSTS(1)
ALGBRC(3) = 1.00000/(1.00000+EXP((CONSTS(12) - STATES(1))/CONSTS(13)))
RATES(3) = (ALGBRC(3) - STATES(3))/CONSTS(14)
ALGBRC(5) = CONSTS(7)*STATES(2)*(STATES(1) - CONSTS(6))
ALGBRC(7) = CONSTS(15)*CONSTS(16)*(STATES(1) - CONSTS(6))
ALGBRC(1) = 1.00000/(1.00000+EXP((CONSTS(4) - STATES(1))/CONSTS(5)))
ALGBRC(4) = CONSTS(2)*ALGBRC(1)*(STATES(1) - CONSTS(3))
ALGBRC(6) = CONSTS(11)*STATES(3)*(STATES(1) - CONSTS(6))
RATES(1) = - (ALGBRC(4)+ALGBRC(5)+ALGBRC(7)+ALGBRC(6))/CONSTS(1)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = 1.00000/(1.00000+EXP((CONSTS(8) - STATES(1))/CONSTS(9)))
ALGBRC(3) = 1.00000/(1.00000+EXP((CONSTS(12) - STATES(1))/CONSTS(13)))
ALGBRC(5) = CONSTS(7)*STATES(2)*(STATES(1) - CONSTS(6))
ALGBRC(7) = CONSTS(15)*CONSTS(16)*(STATES(1) - CONSTS(6))
ALGBRC(1) = 1.00000/(1.00000+EXP((CONSTS(4) - STATES(1))/CONSTS(5)))
ALGBRC(4) = CONSTS(2)*ALGBRC(1)*(STATES(1) - CONSTS(3))
ALGBRC(6) = CONSTS(11)*STATES(3)*(STATES(1) - CONSTS(6))
RETURN
END
