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 2 entries in the algebraic variable array. C There are a total of 5 entries in each of the rate and state variable arrays. C There are a total of 15 entries in the constant variable array. C C C VOI is time in component environment (day). C STATES(1) is X in component X (dimensionless). C CONSTS(1) is mu0 in component X (first_order_rate_constant). C CONSTS(14) is s in component X (first_order_rate_constant). C STATES(2) is K in component K (first_order_rate_constant). C STATES(3) is V in component V (dimensionless). C STATES(4) is Y in component Y (dimensionless). C CONSTS(2) is mu1 in component Y (first_order_rate_constant). C CONSTS(3) is delta1 in component Y (first_order_rate_constant). C STATES(5) is Z in component Z (dimensionless). C ALGBRC(1) is CD4 in component CD4 (dimensionless). C CONSTS(4) is mu2 in component V (first_order_rate_constant). C CONSTS(5) is phi in component V (first_order_rate_constant). C CONSTS(6) is delta2 in component V (first_order_rate_constant). C CONSTS(7) is alpha in component Z (first_order_rate_constant). C CONSTS(8) is beta in component Z (first_order_rate_constant). C CONSTS(9) is gamma in component Z (first_order_rate_constant). C ALGBRC(2) is f_X in component Z (dimensionless). C CONSTS(10) is a in component Z (dimensionless). C CONSTS(11) is b in component Z (dimensionless). C CONSTS(12) is X0 in component Z (dimensionless). C CONSTS(13) is omega in component K (first_order_rate_constant). C CONSTS(15) is Kmax in component K (first_order_rate_constant). C RATES(1) is d/dt X in component X (dimensionless). C RATES(4) is d/dt Y in component Y (dimensionless). C RATES(3) is d/dt V in component V (dimensionless). C RATES(5) is d/dt Z in component Z (dimensionless). C RATES(2) is d/dt K in component K (first_order_rate_constant). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 1.0E11 CONSTS(1) = 0.004 STATES(2) = 1.35E-14 STATES(3) = 1000.0 STATES(4) = 100.0 CONSTS(2) = 0.30 CONSTS(3) = 0.30 STATES(5) = 0.0 CONSTS(4) = 1.0 CONSTS(5) = 1000.0 CONSTS(6) = 1.0 CONSTS(7) = 1.0E-6 CONSTS(8) = 0.5 CONSTS(9) = 0.5 CONSTS(10) = 1000.0 CONSTS(11) = 0.2 CONSTS(12) = 1.0E11 CONSTS(13) = 0.16E-15 CONSTS(14) = CONSTS(1)*1.00000e+11 CONSTS(15) = 1.35000e-14*20.0000 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = CONSTS(14) - ( CONSTS(1)*STATES(1)+ STATES(2)*STATES(3)*STATES(1)) RATES(4) = STATES(2)*STATES(3)*STATES(4) - (CONSTS(2)+ CONSTS(3)*STATES(5))*STATES(4) RATES(3) = CONSTS(5)*STATES(4) - (CONSTS(4)+ CONSTS(6)*STATES(5))*STATES(3) RATES(2) = CONSTS(13)*STATES(3)*(CONSTS(15) - STATES(2)) ALGBRC(2) = STATES(1)/CONSTS(12) ** 2.00000/(CONSTS(11)+STATES(1)/CONSTS(12) ** 2.00000) RATES(5) = ( CONSTS(7)*(STATES(3)/(CONSTS(10)+STATES(3)))+ CONSTS(8)*ALGBRC(2)*STATES(5)) - CONSTS(9)*STATES(5) ** 2.00000 RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = STATES(1)/CONSTS(12) ** 2.00000/(CONSTS(11)+STATES(1)/CONSTS(12) ** 2.00000) ALGBRC(1) = (STATES(1)+STATES(4))/1.00000e+11 RETURN END