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 19 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 17 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_Na_o in component environment (fmol). C STATES(4) is q_Na_i in component environment (fmol). C STATES(5) is q_x0_funny in component environment (fmol). C STATES(6) is q_x1_funny in component environment (fmol). C STATES(7) is q_mem in component environment (fC). 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(14) is v_funny_K in component funny (fmol_per_sec). C ALGBRC(15) is v_funny_Na in component funny (fmol_per_sec). C ALGBRC(19) is I_mem_funny in component funny (fA). C CONSTS(5) is kappa_funny_Na in component funny_parameters (fmol_per_sec). C CONSTS(6) is kappa_funny_K in component funny_parameters (fmol_per_sec). C CONSTS(7) is kappa_R_xf in component funny_parameters (fmol_per_sec). C CONSTS(8) is K_Na_i in component funny_parameters (per_fmol). C CONSTS(9) is K_Na_o in component funny_parameters (per_fmol). C CONSTS(10) is K_K_i in component funny_parameters (per_fmol). C CONSTS(11) is K_K_o in component funny_parameters (per_fmol). C CONSTS(12) is K_x0_funny in component funny_parameters (per_fmol). C CONSTS(13) is K_x1_funny in component funny_parameters (per_fmol). C CONSTS(14) is zNa in component funny_parameters (dimensionless). C CONSTS(15) is zK in component funny_parameters (dimensionless). C CONSTS(16) is z_xff in component funny_parameters (dimensionless). C CONSTS(17) is z_xfr in component funny_parameters (dimensionless). C ALGBRC(1) is mu_K_i in component funny (J_per_mol). C ALGBRC(2) is mu_K_o in component funny (J_per_mol). C ALGBRC(3) is mu_Na_i in component funny (J_per_mol). C ALGBRC(4) is mu_Na_o in component funny (J_per_mol). C ALGBRC(5) is V_mem in component funny (J_per_C). C ALGBRC(7) is Am_Na in component funny (J_per_mol). C ALGBRC(6) is Am_K in component funny (J_per_mol). C ALGBRC(10) is Af_K in component funny (J_per_mol). C ALGBRC(11) is Ar_K in component funny (J_per_mol). C ALGBRC(12) is Af_Na in component funny (J_per_mol). C ALGBRC(13) is Ar_Na in component funny (J_per_mol). C ALGBRC(8) is mu_x0_funny in component funny (J_per_mol). C ALGBRC(9) is mu_x1_funny in component funny (J_per_mol). C ALGBRC(16) is Af_R_xf in component funny (J_per_mol). C ALGBRC(17) is Ar_R_xf in component funny (J_per_mol). C ALGBRC(18) is v_xf in component funny (fmol_per_sec). 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(4) is d/dt q_Na_i in component environment (fmol). C RATES(3) is d/dt q_Na_o in component environment (fmol). C RATES(7) is d/dt q_mem in component environment (fC). C RATES(5) is d/dt q_x0_funny in component environment (fmol). C RATES(6) is d/dt q_x1_funny in component environment (fmol). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 153400 STATES(1) = 27.9828 STATES(2) = 5510 STATES(3) = 9.3276 STATES(4) = 0.00456 STATES(5) = 5.4799070E-06 STATES(6) = 5.4799070E-06 STATES(7) = -8.5e4 CONSTS(2) = 8.31 CONSTS(3) = 310 CONSTS(4) = 96500 CONSTS(5) = 45.0247 CONSTS(6) = 91.4974 CONSTS(7) = 0.188833 CONSTS(8) = 1.80864 CONSTS(9) = 13.2633 CONSTS(10) = 2.57828 CONSTS(11) = 18.9074 CONSTS(12) = 0.00306604 CONSTS(13) = 61.5887 CONSTS(14) = 1 CONSTS(15) = 1 CONSTS(16) = -1.8309039 CONSTS(17) = 0.787348905 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(5) = STATES(7)/CONSTS(1) ALGBRC(6) = CONSTS(15)*CONSTS(4)*ALGBRC(5) ALGBRC(1) = CONSTS(2)*CONSTS(3)*log( CONSTS(10)*STATES(2)) ALGBRC(9) = CONSTS(2)*CONSTS(3)*log( CONSTS(13)*STATES(6)) ALGBRC(10) = ALGBRC(9)+ALGBRC(1)+ALGBRC(6) ALGBRC(2) = CONSTS(2)*CONSTS(3)*log( CONSTS(11)*STATES(1)) ALGBRC(11) = ALGBRC(9)+ALGBRC(2) ALGBRC(14) = TERNRY(ALGBRC(6).EQ.0.00000, 1.00000*CONSTS(6)*(EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(6)*ALGBRC(6))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(6)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3))))) RATES(2) = - ALGBRC(14) RATES(1) = ALGBRC(14) ALGBRC(7) = CONSTS(14)*CONSTS(4)*ALGBRC(5) ALGBRC(3) = CONSTS(2)*CONSTS(3)*log( CONSTS(8)*STATES(4)) ALGBRC(12) = ALGBRC(9)+ALGBRC(3)+ALGBRC(7) ALGBRC(4) = CONSTS(2)*CONSTS(3)*log( CONSTS(9)*STATES(3)) ALGBRC(13) = ALGBRC(9)+ALGBRC(4) ALGBRC(15) = TERNRY(ALGBRC(7).EQ.0.00000, 1.00000*CONSTS(5)*(EXP(ALGBRC(12)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(13)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(5)*ALGBRC(7))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(7)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(12)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(13)/( CONSTS(2)*CONSTS(3))))) RATES(4) = - ALGBRC(15) RATES(3) = ALGBRC(15) ALGBRC(8) = CONSTS(2)*CONSTS(3)*log( CONSTS(12)*STATES(5)) ALGBRC(16) = ALGBRC(8)+ CONSTS(16)*CONSTS(4)*ALGBRC(5) ALGBRC(17) = ALGBRC(9)+ CONSTS(17)*CONSTS(4)*ALGBRC(5) ALGBRC(18) = CONSTS(7)*(EXP(ALGBRC(16)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(17)/( CONSTS(2)*CONSTS(3)))) RATES(5) = - ALGBRC(18) RATES(6) = ALGBRC(18) ALGBRC(19) = CONSTS(4)*(( - CONSTS(15)*ALGBRC(14)+ CONSTS(14)*ALGBRC(15)+ CONSTS(17)*ALGBRC(18)) - CONSTS(16)*ALGBRC(18)) RATES(7) = ALGBRC(19) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(5) = STATES(7)/CONSTS(1) ALGBRC(6) = CONSTS(15)*CONSTS(4)*ALGBRC(5) ALGBRC(1) = CONSTS(2)*CONSTS(3)*log( CONSTS(10)*STATES(2)) ALGBRC(9) = CONSTS(2)*CONSTS(3)*log( CONSTS(13)*STATES(6)) ALGBRC(10) = ALGBRC(9)+ALGBRC(1)+ALGBRC(6) ALGBRC(2) = CONSTS(2)*CONSTS(3)*log( CONSTS(11)*STATES(1)) ALGBRC(11) = ALGBRC(9)+ALGBRC(2) ALGBRC(14) = TERNRY(ALGBRC(6).EQ.0.00000, 1.00000*CONSTS(6)*(EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(6)*ALGBRC(6))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(6)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(10)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(11)/( CONSTS(2)*CONSTS(3))))) ALGBRC(7) = CONSTS(14)*CONSTS(4)*ALGBRC(5) ALGBRC(3) = CONSTS(2)*CONSTS(3)*log( CONSTS(8)*STATES(4)) ALGBRC(12) = ALGBRC(9)+ALGBRC(3)+ALGBRC(7) ALGBRC(4) = CONSTS(2)*CONSTS(3)*log( CONSTS(9)*STATES(3)) ALGBRC(13) = ALGBRC(9)+ALGBRC(4) ALGBRC(15) = TERNRY(ALGBRC(7).EQ.0.00000, 1.00000*CONSTS(5)*(EXP(ALGBRC(12)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(13)/( CONSTS(2)*CONSTS(3)))), ((( 1.00000*CONSTS(5)*ALGBRC(7))/( CONSTS(2)*CONSTS(3)))/(EXP(ALGBRC(7)/( CONSTS(2)*CONSTS(3))) - 1.00000))*(EXP(ALGBRC(12)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(13)/( CONSTS(2)*CONSTS(3))))) ALGBRC(8) = CONSTS(2)*CONSTS(3)*log( CONSTS(12)*STATES(5)) ALGBRC(16) = ALGBRC(8)+ CONSTS(16)*CONSTS(4)*ALGBRC(5) ALGBRC(17) = ALGBRC(9)+ CONSTS(17)*CONSTS(4)*ALGBRC(5) ALGBRC(18) = CONSTS(7)*(EXP(ALGBRC(16)/( CONSTS(2)*CONSTS(3))) - EXP(ALGBRC(17)/( CONSTS(2)*CONSTS(3)))) ALGBRC(19) = CONSTS(4)*(( - CONSTS(15)*ALGBRC(14)+ CONSTS(14)*ALGBRC(15)+ CONSTS(17)*ALGBRC(18)) - CONSTS(16)*ALGBRC(18)) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END