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 5 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 14 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is V in component membrane (millivolt).
C CONSTS(1) is Cm in component membrane (picoF).
C ALGBRC(1) is i_s in component calcium_channel (femtoA).
C ALGBRC(3) is i_K in component potassium_channel (femtoA).
C ALGBRC(4) is i_K_ACh in component acetyl_choline_activated_potassium_channel (femtoA).
C ALGBRC(5) is i_j in component coupling_current (femtoA).
C CONSTS(2) is g_s in component calcium_channel (picoS).
C CONSTS(3) is V_s in component calcium_channel (millivolt).
C CONSTS(4) is V_1 in component calcium_channel (millivolt).
C CONSTS(5) is V_2 in component calcium_channel (millivolt).
C CONSTS(6) is g_K in component potassium_channel (picoS).
C CONSTS(7) is V_K in component potassium_channel (millivolt).
C STATES(2) is w in component potassium_channel_w_gate (dimensionless).
C CONSTS(8) is lambda_w in component potassium_channel_w_gate (per_second).
C CONSTS(9) is V_3 in component potassium_channel_w_gate (millivolt).
C CONSTS(10) is V_4 in component potassium_channel_w_gate (millivolt).
C STATES(3) is u in component acetyl_choline_activated_potassium_channel_u_gate (dimensionless).
C CONSTS(14) is alpha in component acetyl_choline_activated_potassium_channel_u_gate (per_second).
C ALGBRC(2) is beta in component acetyl_choline_activated_potassium_channel_u_gate (per_second).
C CONSTS(11) is ACh in component acetyl_choline_activated_potassium_channel_u_gate (molar).
C CONSTS(12) is g_j in component coupling_current (picoS).
C CONSTS(13) is V_B in component coupling_current (millivolt).
C RATES(1) is d/dt V in component membrane (millivolt).
C RATES(2) is d/dt w in component potassium_channel_w_gate (dimensionless).
C RATES(3) is d/dt u in component acetyl_choline_activated_potassium_channel_u_gate (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = -52.07606
CONSTS(1) = 60
CONSTS(2) = 382.9118
CONSTS(3) = 214.1429
CONSTS(4) = -35.9358
CONSTS(5) = 7.8589
CONSTS(6) = 536.1093
CONSTS(7) = -259.0783
STATES(2) = 0.0008971
CONSTS(8) = 20.7796
CONSTS(9) = -27.9375
CONSTS(10) = 6.321
STATES(3) = 0.2344555
CONSTS(11) = 1e-6
CONSTS(12) = 0
CONSTS(13) = -50
CONSTS(14) = 0.0123320/(1.00000+4.20000e-06/CONSTS(11))
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(2) = CONSTS(8)*cosh((STATES(1) - CONSTS(9))/( 2.00000*CONSTS(10)))*( (1.00000/2.00000)*(1.00000+ tanh((STATES(1) - CONSTS(9))/CONSTS(10))) - STATES(2))
ALGBRC(2) = 0.0100000*EXP( 0.0133000*(STATES(1)+40.0000))
RATES(3) = CONSTS(14)*(1.00000 - STATES(3)) - ALGBRC(2)*STATES(3)
ALGBRC(1) = (1.00000/2.00000)*CONSTS(2)*(1.00000+ tanh((STATES(1) - CONSTS(4))/CONSTS(5)))*(STATES(1) - CONSTS(3))
ALGBRC(3) = CONSTS(6)*STATES(2)*(STATES(1) - CONSTS(7))
ALGBRC(4) = 1.00000*0.270000*STATES(3)*(STATES(1)+90.0000)
ALGBRC(5) = CONSTS(12)*(STATES(1) - CONSTS(13))
RATES(1) = - (ALGBRC(1)+ALGBRC(3)+ALGBRC(4)+ALGBRC(5))/CONSTS(1)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = 0.0100000*EXP( 0.0133000*(STATES(1)+40.0000))
ALGBRC(1) = (1.00000/2.00000)*CONSTS(2)*(1.00000+ tanh((STATES(1) - CONSTS(4))/CONSTS(5)))*(STATES(1) - CONSTS(3))
ALGBRC(3) = CONSTS(6)*STATES(2)*(STATES(1) - CONSTS(7))
ALGBRC(4) = 1.00000*0.270000*STATES(3)*(STATES(1)+90.0000)
ALGBRC(5) = CONSTS(12)*(STATES(1) - CONSTS(13))
RETURN
END
