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 10 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 28 entries in the constant variable array. C C C VOI is time in component environment (minute). C STATES(1) is r in component r (nanomolar). C ALGBRC(1) is ract in component r (dimensionless). C ALGBRC(10) is hr in component r (dimensionless). C ALGBRC(5) is Ir in component r (flux). C ALGBRC(7) is Ir2 in component r (flux). C CONSTS(1) is k6 in component r (first_order_rate_constant). C CONSTS(2) is n1 in component r (dimensionless). C CONSTS(3) is theta_1 in component r (nanomolar). C CONSTS(4) is n3 in component r (dimensionless). C CONSTS(5) is theta_3 in component r (dimensionless). C STATES(2) is s in component s (nanomolar). C ALGBRC(9) is h_delta1 in component model_parameters (dimensionless). C CONSTS(6) is j1 in component model_parameters (dimensionless). C CONSTS(7) is Is2 in component s (flux). C ALGBRC(8) is Is in component model_parameters (flux). C CONSTS(8) is k7 in component model_parameters (first_order_rate_constant). C STATES(3) is g in component g (dimensionless). C STATES(4) is se in component se (nanomolar). C CONSTS(9) is Ise in component se (flux). C STATES(5) is f in component f (dimensionless). C CONSTS(10) is k1 in component f (second_order_rate_constant). C CONSTS(11) is k2 in component f (first_order_rate_constant). C CONSTS(12) is k3 in component f (first_order_rate_constant). C ALGBRC(3) is phi_b_s in component f (dimensionless). C CONSTS(13) is sb in component f (dimensionless). C CONSTS(14) is delta_b in component f (dimensionless). C CONSTS(15) is c in component model_parameters (nanomolar). C STATES(6) is h in component h (nanomolar). C CONSTS(16) is k4 in component h (first_order_rate_constant). C CONSTS(17) is k5 in component h (first_order_rate_constant). C ALGBRC(4) is phi_r_s in component h (dimensionless). C CONSTS(18) is sr in component h (dimensionless). C CONSTS(19) is delta_r in component h (dimensionless). C CONSTS(20) is k8 in component model_parameters (first_order_rate_constant). C CONSTS(21) is g1 in component g (first_order_rate_constant). C CONSTS(22) is gmax in component g (dimensionless). C CONSTS(23) is g2 in component g (per_nanomolar). C ALGBRC(6) is hact in component g (dimensionless). C CONSTS(24) is n2 in component g (dimensionless). C CONSTS(25) is theta_2 in component g (dimensionless). C ALGBRC(2) is h_delta in component model_parameters (dimensionless). C STATES(7) is hh in component hh (nanomolar). C CONSTS(26) is Ih in component hh (flux). C CONSTS(27) is delta in component model_parameters (per_nanomolar). C CONSTS(28) is delta1 in component model_parameters (per_nanomolar). C RATES(1) is d/dt r in component r (nanomolar). C RATES(2) is d/dt s in component s (nanomolar). C RATES(4) is d/dt se in component se (nanomolar). C RATES(5) is d/dt f in component f (dimensionless). C RATES(6) is d/dt h in component h (nanomolar). C RATES(3) is d/dt g in component g (dimensionless). C RATES(7) is d/dt hh in component hh (nanomolar). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.0 CONSTS(1) = 5.0 CONSTS(2) = 4.0 CONSTS(3) = 1.0 CONSTS(4) = 5.0 CONSTS(5) = 30.0 STATES(2) = 0.0 CONSTS(6) = 10 CONSTS(7) = 50.0 CONSTS(8) = 5.0 STATES(3) = 2.0 STATES(4) = 0.0 CONSTS(9) = 10.0 STATES(5) = 0.3 CONSTS(10) = 0.1 CONSTS(11) = 0.002 CONSTS(12) = 0.018 CONSTS(13) = 0.029 CONSTS(14) = 0.3 CONSTS(15) = 0.01 STATES(6) = 0.0 CONSTS(16) = 0.5 CONSTS(17) = 71.0 CONSTS(18) = -0.56 CONSTS(19) = 0.2 CONSTS(20) = 0.07 CONSTS(21) = 1.0 CONSTS(22) = 5.0 CONSTS(23) = 0.008 CONSTS(24) = 2.0 CONSTS(25) = 30.0 STATES(7) = 0.0 CONSTS(26) = 50.0 CONSTS(27) = 60.0 CONSTS(28) = 15.0 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(4) = CONSTS(9) - CONSTS(8)*STATES(4) RATES(7) = CONSTS(6)*(CONSTS(26) - CONSTS(20)*STATES(7)) ALGBRC(3) = 1.00000/(1.00000+EXP(- (arbitrary_log( 1.00000*(STATES(2)+STATES(4)), 10) - CONSTS(13))/CONSTS(14))) RATES(5) = - ( CONSTS(10)*(STATES(1)+CONSTS(15))*STATES(5))+ (CONSTS(11)+ CONSTS(12)*ALGBRC(3))*(1.00000 - STATES(5)) ALGBRC(4) = 1.00000/(1.00000+EXP(- (arbitrary_log( 1.00000*(STATES(2)+STATES(4)), 10) - CONSTS(18))/CONSTS(19))) RATES(6) = CONSTS(6)*( (CONSTS(16)+ CONSTS(17)*(1.00000 - ALGBRC(4)))*( (STATES(1)+CONSTS(15))*STATES(5)) - CONSTS(20)*STATES(6)) ALGBRC(8) = TERNRY(VOI.GT.0.00000.AND.VOI.LE.90.0000, 10.0000, TERNRY(VOI.GT.90.0000.AND.VOI.LE.180.000, 0.00000, TERNRY(VOI.GT.180.000.AND.VOI.LE.270.000, 10.0000, TERNRY(VOI.GT.270.000.AND.VOI.LE.360.000, 0.00000, 0.00000) RATES(2) = ( ALGBRC(8)*STATES(3) - CONSTS(8)*STATES(2))+CONSTS(7) ALGBRC(2) = (STATES(6)+STATES(7))*CONSTS(27) ALGBRC(6) = ALGBRC(2) ** CONSTS(24)/(ALGBRC(2) ** CONSTS(24)+ CONSTS(6)*CONSTS(25) ** CONSTS(24)) RATES(3) = CONSTS(21)*ALGBRC(6)*((CONSTS(22) - STATES(3))/CONSTS(22)) - CONSTS(23)*ALGBRC(8)*STATES(3) ALGBRC(1) = 1.00000 - STATES(2) ** CONSTS(2)/(STATES(2) ** CONSTS(2)+CONSTS(3) ** CONSTS(2)) ALGBRC(9) = (STATES(6)+STATES(7))*CONSTS(28) ALGBRC(10) = 1.00000 - ALGBRC(9) ** CONSTS(4)/(ALGBRC(9) ** CONSTS(4)+ CONSTS(6)*CONSTS(5) ** CONSTS(4)) ALGBRC(5) = TERNRY(VOI.GE.0.00000.AND.VOI.LE.90.0000, 0.00000, TERNRY(VOI.GE.91.0000.AND.VOI.LE.92.0000, 10.0000, TERNRY(VOI.GE.93.0000.AND.VOI.LE.113.000, 0.00000, TERNRY(VOI.GE.114.000.AND.VOI.LE.115.000, 10.0000, TERNRY(VOI.GE.116.000.AND.VOI.LE.136.000, 0.00000, TERNRY(VOI.GE.137.000.AND.VOI.LE.138.000, 10.0000, TERNRY(VOI.GE.139.000.AND.VOI.LE.159.000, 0.00000, TERNRY(VOI.GE.160.000.AND.VOI.LE.161.000, 10.0000, TERNRY(VOI.GE.162.000.AND.VOI.LE.252.000, 0.00000, TERNRY(VOI.GE.253.000.AND.VOI.LE.254.000, 10.0000, TERNRY(VOI.GE.255.000.AND.VOI.LE.275.000, 0.00000, TERNRY(VOI.GE.276.000.AND.VOI.LE.277.000, 10.0000, TERNRY(VOI.GE.278.000.AND.VOI.LE.298.000, 0.00000, TERNRY(VOI.GE.299.000.AND.VOI.LE.300.000, 10.0000, TERNRY(VOI.GE.301.000.AND.VOI.LE.321.000, 0.00000, TERNRY(VOI.GE.322.000.AND.VOI.LE.323.000, 10.0000, 0.00000) ALGBRC(7) = TERNRY(VOI.GE.0.00000.AND.VOI.LE.5.00000, 0.00000, TERNRY(VOI.GE.6.00000.AND.VOI.LE.7.00000, 1000.00, TERNRY(VOI.GE.8.00000.AND.VOI.LE.12.0000, 0.00000, TERNRY(VOI.GE.13.0000.AND.VOI.LE.14.0000, 1000.00, TERNRY(VOI.GE.15.0000.AND.VOI.LE.21.0000, 0.00000, TERNRY(VOI.GE.22.0000.AND.VOI.LE.23.0000, 1000.00, TERNRY(VOI.GE.24.0000.AND.VOI.LE.204.000, 0.00000, TERNRY(VOI.GE.205.000.AND.VOI.LE.206.000, 1000.00, TERNRY(VOI.GE.207.000.AND.VOI.LE.217.000, 0.00000, TERNRY(VOI.GE.218.000.AND.VOI.LE.219.000, 1000.00, TERNRY(VOI.GE.220.000.AND.VOI.LE.227.000, 0.00000, TERNRY(VOI.GE.228.000.AND.VOI.LE.229.000, 1000.00, TERNRY(VOI.GE.230.000.AND.VOI.LE.310.000, 0.00000, TERNRY(VOI.GE.311.000.AND.VOI.LE.312.000, 1000.00, TERNRY(VOI.GE.313.000.AND.VOI.LE.321.000, 0.00000, TERNRY(VOI.GE.322.000.AND.VOI.LE.323.000, 1000.00, 0.00000) RATES(1) = ( ALGBRC(1)*ALGBRC(10)*ALGBRC(5) - CONSTS(1)*STATES(1))+ALGBRC(7) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(3) = 1.00000/(1.00000+EXP(- (arbitrary_log( 1.00000*(STATES(2)+STATES(4)), 10) - CONSTS(13))/CONSTS(14))) ALGBRC(4) = 1.00000/(1.00000+EXP(- (arbitrary_log( 1.00000*(STATES(2)+STATES(4)), 10) - CONSTS(18))/CONSTS(19))) ALGBRC(8) = TERNRY(VOI.GT.0.00000.AND.VOI.LE.90.0000, 10.0000, TERNRY(VOI.GT.90.0000.AND.VOI.LE.180.000, 0.00000, TERNRY(VOI.GT.180.000.AND.VOI.LE.270.000, 10.0000, TERNRY(VOI.GT.270.000.AND.VOI.LE.360.000, 0.00000, 0.00000) ALGBRC(2) = (STATES(6)+STATES(7))*CONSTS(27) ALGBRC(6) = ALGBRC(2) ** CONSTS(24)/(ALGBRC(2) ** CONSTS(24)+ CONSTS(6)*CONSTS(25) ** CONSTS(24)) ALGBRC(1) = 1.00000 - STATES(2) ** CONSTS(2)/(STATES(2) ** CONSTS(2)+CONSTS(3) ** CONSTS(2)) ALGBRC(9) = (STATES(6)+STATES(7))*CONSTS(28) ALGBRC(10) = 1.00000 - ALGBRC(9) ** CONSTS(4)/(ALGBRC(9) ** CONSTS(4)+ CONSTS(6)*CONSTS(5) ** CONSTS(4)) ALGBRC(5) = TERNRY(VOI.GE.0.00000.AND.VOI.LE.90.0000, 0.00000, TERNRY(VOI.GE.91.0000.AND.VOI.LE.92.0000, 10.0000, TERNRY(VOI.GE.93.0000.AND.VOI.LE.113.000, 0.00000, TERNRY(VOI.GE.114.000.AND.VOI.LE.115.000, 10.0000, TERNRY(VOI.GE.116.000.AND.VOI.LE.136.000, 0.00000, TERNRY(VOI.GE.137.000.AND.VOI.LE.138.000, 10.0000, TERNRY(VOI.GE.139.000.AND.VOI.LE.159.000, 0.00000, TERNRY(VOI.GE.160.000.AND.VOI.LE.161.000, 10.0000, TERNRY(VOI.GE.162.000.AND.VOI.LE.252.000, 0.00000, TERNRY(VOI.GE.253.000.AND.VOI.LE.254.000, 10.0000, TERNRY(VOI.GE.255.000.AND.VOI.LE.275.000, 0.00000, TERNRY(VOI.GE.276.000.AND.VOI.LE.277.000, 10.0000, TERNRY(VOI.GE.278.000.AND.VOI.LE.298.000, 0.00000, TERNRY(VOI.GE.299.000.AND.VOI.LE.300.000, 10.0000, TERNRY(VOI.GE.301.000.AND.VOI.LE.321.000, 0.00000, TERNRY(VOI.GE.322.000.AND.VOI.LE.323.000, 10.0000, 0.00000) ALGBRC(7) = TERNRY(VOI.GE.0.00000.AND.VOI.LE.5.00000, 0.00000, TERNRY(VOI.GE.6.00000.AND.VOI.LE.7.00000, 1000.00, TERNRY(VOI.GE.8.00000.AND.VOI.LE.12.0000, 0.00000, TERNRY(VOI.GE.13.0000.AND.VOI.LE.14.0000, 1000.00, TERNRY(VOI.GE.15.0000.AND.VOI.LE.21.0000, 0.00000, TERNRY(VOI.GE.22.0000.AND.VOI.LE.23.0000, 1000.00, TERNRY(VOI.GE.24.0000.AND.VOI.LE.204.000, 0.00000, TERNRY(VOI.GE.205.000.AND.VOI.LE.206.000, 1000.00, TERNRY(VOI.GE.207.000.AND.VOI.LE.217.000, 0.00000, TERNRY(VOI.GE.218.000.AND.VOI.LE.219.000, 1000.00, TERNRY(VOI.GE.220.000.AND.VOI.LE.227.000, 0.00000, TERNRY(VOI.GE.228.000.AND.VOI.LE.229.000, 1000.00, TERNRY(VOI.GE.230.000.AND.VOI.LE.310.000, 0.00000, TERNRY(VOI.GE.311.000.AND.VOI.LE.312.000, 1000.00, TERNRY(VOI.GE.313.000.AND.VOI.LE.321.000, 0.00000, TERNRY(VOI.GE.322.000.AND.VOI.LE.323.000, 1000.00, 0.00000) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END