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 29 entries in the algebraic variable array. C There are a total of 7 entries in each of the rate and state variable arrays. C There are a total of 20 entries in the constant variable array. C C C VOI is time in component environment (second). C CONSTS(1) is C_m in component environment (fF). C STATES(1) is q_K_o in component environment (fmol). C STATES(2) is q_K_i in component environment (fmol). C STATES(3) is q_r0s0_TO in component environment (fmol). C STATES(4) is q_r1s0_TO in component environment (fmol). C STATES(5) is q_r0s1_TO in component environment (fmol). C STATES(6) is q_r1s1_TO in component environment (fmol). C STATES(7) is q_mem in component environment (fC). C ALGBRC(1) is Vmem in component environment (volt). C CONSTS(2) is R in component environment (J_per_K_per_mol). C CONSTS(3) is T in component environment (kelvin). C CONSTS(4) is F in component environment (C_per_mol). C ALGBRC(21) is v_TO in component TO (fmol_per_sec). C ALGBRC(27) is I_mem_TO in component TO (fA). C CONSTS(5) is kappa_TO in component TO_parameters (fmol_per_sec). C CONSTS(6) is kappa_gTO_1 in component TO_parameters (fmol_per_sec). C CONSTS(7) is kappa_gTO_2 in component TO_parameters (fmol_per_sec). C CONSTS(8) is kappa_gTO_3 in component TO_parameters (fmol_per_sec). C CONSTS(9) is kappa_gTO_4 in component TO_parameters (fmol_per_sec). C CONSTS(10) is K_K_i in component TO_parameters (per_fmol). C CONSTS(11) is K_K_o in component TO_parameters (per_fmol). C CONSTS(12) is K_r0s0_TO in component TO_parameters (per_fmol). C CONSTS(13) is K_r1s0_TO in component TO_parameters (per_fmol). C CONSTS(14) is K_r0s1_TO in component TO_parameters (per_fmol). C CONSTS(15) is K_r1s1_TO in component TO_parameters (per_fmol). C CONSTS(16) is zK in component TO_parameters (dimensionless). C CONSTS(17) is z_rTO_f in component TO_parameters (dimensionless). C CONSTS(18) is z_sTO_f in component TO_parameters (dimensionless). C CONSTS(19) is z_rTO_r in component TO_parameters (dimensionless). C CONSTS(20) is z_sTO_r in component TO_parameters (dimensionless). C ALGBRC(2) is u_K_i in component TO (J_per_mol). C ALGBRC(3) is u_K_o in component TO (J_per_mol). C ALGBRC(4) is V_mem in component TO (J_per_C). C ALGBRC(5) is Am_TO in component TO (J_per_mol). C ALGBRC(19) is Af_TO in component TO (J_per_mol). C ALGBRC(20) is Ar_TO in component TO (J_per_mol). C ALGBRC(17) is v_r0s0_TO in component TO (fmol_per_sec). C ALGBRC(28) is v_r1s0_TO in component TO (fmol_per_sec). C ALGBRC(26) is v_r0s1_TO in component TO (fmol_per_sec). C ALGBRC(29) is v_r1s1_TO in component TO (fmol_per_sec). C ALGBRC(12) is v_gTO_1 in component TO (fmol_per_sec). C ALGBRC(16) is v_gTO_3 in component TO (fmol_per_sec). C ALGBRC(24) is v_gTO_2 in component TO (fmol_per_sec). C ALGBRC(25) is v_gTO_4 in component TO (fmol_per_sec). C ALGBRC(6) is mu_r0s0_TO in component TO (J_per_mol). C ALGBRC(9) is mu_r1s0_TO in component TO (J_per_mol). C ALGBRC(13) is mu_r0s1_TO in component TO (J_per_mol). C ALGBRC(18) is mu_r1s1_TO in component TO (J_per_mol). C ALGBRC(7) is Af_gTO_1 in component TO (J_per_mol). C ALGBRC(10) is Ar_gTO_1 in component TO (J_per_mol). C ALGBRC(8) is Af_gTO_3 in component TO (J_per_mol). C ALGBRC(14) is Ar_gTO_3 in component TO (J_per_mol). C ALGBRC(15) is Af_gTO_2 in component TO (J_per_mol). C ALGBRC(22) is Ar_gTO_2 in component TO (J_per_mol). C ALGBRC(11) is Af_gTO_4 in component TO (J_per_mol). C ALGBRC(23) is Ar_gTO_4 in component TO (J_per_mol). C RATES(2) is d/dt q_K_i in component environment (fmol). C RATES(1) is d/dt q_K_o in component environment (fmol). C RATES(7) is d/dt q_mem in component environment (fC). C RATES(3) is d/dt q_r0s0_TO in component environment (fmol). C RATES(4) is d/dt q_r1s0_TO in component environment (fmol). C RATES(5) is d/dt q_r0s1_TO in component environment (fmol). C RATES(6) is d/dt q_r1s1_TO in component environment (fmol). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 1.0e6 STATES(1) = 0.116325 STATES(2) = 3.65002 STATES(3) = 3.1966124E-07 STATES(4) = 3.1966124E-07 STATES(5) = 3.1966124E-07 STATES(6) = 3.1966124E-07 STATES(7) = -8.5e4 CONSTS(2) = 8.31 CONSTS(3) = 310 CONSTS(4) = 96500 CONSTS(5) = 1.91513 CONSTS(6) = 10.0063 CONSTS(7) = 0.053573 CONSTS(8) = 0.0622138 CONSTS(9) = 0.0155957 CONSTS(10) = 0.0402291 CONSTS(11) = 0.267055 CONSTS(12) = 0.00553253 CONSTS(13) = 0.0220702 CONSTS(14) = 1.03336 CONSTS(15) = 4.12222 CONSTS(16) = 1 CONSTS(17) = 2.28623234372134 CONSTS(18) = -1.51477720975217 CONSTS(19) = -0.131848324558065 CONSTS(20) = 1.75042355789096 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(4) = STATES(7)/CONSTS(1) ALGBRC(6) = CONSTS(2)*CONSTS(3)*log( CONSTS(12)*STATES(3)) ALGBRC(7) = ALGBRC(6)+ CONSTS(17)*CONSTS(4)*ALGBRC(4) ALGBRC(9) = CONSTS(2)*CONSTS(3)*log( CONSTS(13)*STATES(4)) ALGBRC(10) = ALGBRC(9)+ CONSTS(19)*CONSTS(4)*ALGBRC(4) ALGBRC(12) = CONSTS(6)*(EXP(ALGBRC(7)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3)))) ALGBRC(8) = ALGBRC(6)+ CONSTS(18)*CONSTS(4)*ALGBRC(4) ALGBRC(13) = CONSTS(2)*CONSTS(3)*log( CONSTS(14)*STATES(5)) ALGBRC(14) = ALGBRC(13)+ CONSTS(20)*CONSTS(4)*ALGBRC(4) ALGBRC(16) = CONSTS(8)*(EXP(ALGBRC(8)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(14)/( CONSTS(2)*CONSTS(3)))) ALGBRC(17) = - ALGBRC(12)+ALGBRC(16) RATES(3) = ALGBRC(17) ALGBRC(5) = CONSTS(4)*ALGBRC(4) ALGBRC(2) = CONSTS(2)*CONSTS(3)*log( CONSTS(10)*STATES(2)) ALGBRC(18) = CONSTS(2)*CONSTS(3)*log( CONSTS(15)*STATES(6)) ALGBRC(19) = ALGBRC(18)+ALGBRC(2)+ALGBRC(5) ALGBRC(3) = CONSTS(2)*CONSTS(3)*log( CONSTS(11)*STATES(1)) ALGBRC(20) = ALGBRC(18)+ALGBRC(3) ALGBRC(21) = TERNRY(ALGBRC(5).EQ.0.00000, 1.00000*CONSTS(5)*(EXP(ALGBRC(19)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(20)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(5)*ALGBRC(5))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(5)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(19)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(20)/( CONSTS(2)*CONSTS(3))))) RATES(2) = - ALGBRC(21) RATES(1) = ALGBRC(21) ALGBRC(15) = ALGBRC(13)+ CONSTS(17)*CONSTS(4)*ALGBRC(4) ALGBRC(22) = ALGBRC(18)+ CONSTS(19)*CONSTS(4)*ALGBRC(4) ALGBRC(24) = CONSTS(7)*(EXP(ALGBRC(15)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(22)/( CONSTS(2)*CONSTS(3)))) ALGBRC(26) = - ALGBRC(24)+ALGBRC(16) RATES(5) = ALGBRC(26) ALGBRC(11) = ALGBRC(9)+ CONSTS(18)*CONSTS(4)*ALGBRC(4) ALGBRC(23) = ALGBRC(18)+ CONSTS(20)*CONSTS(4)*ALGBRC(4) ALGBRC(25) = CONSTS(9)*(EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(23)/( CONSTS(2)*CONSTS(3)))) ALGBRC(27) = CONSTS(4)*( - CONSTS(16)*ALGBRC(21)+ (ALGBRC(12)+ALGBRC(24))*(CONSTS(19) - CONSTS(17))+ (ALGBRC(16)+ALGBRC(25))*(CONSTS(20) - CONSTS(18))) RATES(7) = ALGBRC(27) ALGBRC(28) = ALGBRC(12) - ALGBRC(25) RATES(4) = ALGBRC(28) ALGBRC(29) = ALGBRC(24)+ALGBRC(25) RATES(6) = ALGBRC(29) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(4) = STATES(7)/CONSTS(1) ALGBRC(6) = CONSTS(2)*CONSTS(3)*log( CONSTS(12)*STATES(3)) ALGBRC(7) = ALGBRC(6)+ CONSTS(17)*CONSTS(4)*ALGBRC(4) ALGBRC(9) = CONSTS(2)*CONSTS(3)*log( CONSTS(13)*STATES(4)) ALGBRC(10) = ALGBRC(9)+ CONSTS(19)*CONSTS(4)*ALGBRC(4) ALGBRC(12) = CONSTS(6)*(EXP(ALGBRC(7)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3)))) ALGBRC(8) = ALGBRC(6)+ CONSTS(18)*CONSTS(4)*ALGBRC(4) ALGBRC(13) = CONSTS(2)*CONSTS(3)*log( CONSTS(14)*STATES(5)) ALGBRC(14) = ALGBRC(13)+ CONSTS(20)*CONSTS(4)*ALGBRC(4) ALGBRC(16) = CONSTS(8)*(EXP(ALGBRC(8)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(14)/( CONSTS(2)*CONSTS(3)))) ALGBRC(17) = - ALGBRC(12)+ALGBRC(16) ALGBRC(5) = CONSTS(4)*ALGBRC(4) ALGBRC(2) = CONSTS(2)*CONSTS(3)*log( CONSTS(10)*STATES(2)) ALGBRC(18) = CONSTS(2)*CONSTS(3)*log( CONSTS(15)*STATES(6)) ALGBRC(19) = ALGBRC(18)+ALGBRC(2)+ALGBRC(5) ALGBRC(3) = CONSTS(2)*CONSTS(3)*log( CONSTS(11)*STATES(1)) ALGBRC(20) = ALGBRC(18)+ALGBRC(3) ALGBRC(21) = TERNRY(ALGBRC(5).EQ.0.00000, 1.00000*CONSTS(5)*(EXP(ALGBRC(19)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(20)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(5)*ALGBRC(5))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(5)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(19)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(20)/( CONSTS(2)*CONSTS(3))))) ALGBRC(15) = ALGBRC(13)+ CONSTS(17)*CONSTS(4)*ALGBRC(4) ALGBRC(22) = ALGBRC(18)+ CONSTS(19)*CONSTS(4)*ALGBRC(4) ALGBRC(24) = CONSTS(7)*(EXP(ALGBRC(15)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(22)/( CONSTS(2)*CONSTS(3)))) ALGBRC(26) = - ALGBRC(24)+ALGBRC(16) ALGBRC(11) = ALGBRC(9)+ CONSTS(18)*CONSTS(4)*ALGBRC(4) ALGBRC(23) = ALGBRC(18)+ CONSTS(20)*CONSTS(4)*ALGBRC(4) ALGBRC(25) = CONSTS(9)*(EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(23)/( CONSTS(2)*CONSTS(3)))) ALGBRC(27) = CONSTS(4)*( - CONSTS(16)*ALGBRC(21)+ (ALGBRC(12)+ALGBRC(24))*(CONSTS(19) - CONSTS(17))+ (ALGBRC(16)+ALGBRC(25))*(CONSTS(20) - CONSTS(18))) ALGBRC(28) = ALGBRC(12) - ALGBRC(25) ALGBRC(29) = ALGBRC(24)+ALGBRC(25) ALGBRC(1) = STATES(7)/CONSTS(1) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END