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 1 entries in the algebraic variable array. C There are a total of 4 entries in each of the rate and state variable arrays. C There are a total of 12 entries in the constant variable array. C C C VOI is time in component environment (day). C STATES(1) is T in component T (dimensionless). C CONSTS(1) is k in component T (first_order_rate_constant). C CONSTS(2) is r in component T (first_order_rate_constant). C CONSTS(3) is d in component T (first_order_rate_constant). C CONSTS(4) is gamma in component T (first_order_rate_constant). C STATES(2) is C in component C (dimensionless). C STATES(3) is A in component A (dimensionless). C CONSTS(5) is lambda in component A (first_order_rate_constant). C CONSTS(6) is delta_1 in component A (first_order_rate_constant). C CONSTS(7) is alpha in component kinetic_parameters (first_order_rate_constant). C STATES(4) is A_star in component A_star (dimensionless). C CONSTS(8) is delta_2 in component A_star (first_order_rate_constant). C CONSTS(9) is eta in component C (first_order_rate_constant). C CONSTS(10) is epsilon in component C (dimensionless). C CONSTS(11) is q in component C (first_order_rate_constant). C CONSTS(12) is mu in component C (first_order_rate_constant). C ALGBRC(1) is R in component ratio (dimensionless). C RATES(1) is d/dt T in component T (dimensionless). C RATES(3) is d/dt A in component A (dimensionless). C RATES(4) is d/dt A_star in component A_star (dimensionless). C RATES(2) is d/dt C in component C (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.1 CONSTS(1) = 10 CONSTS(2) = 0.5 CONSTS(3) = 0.1 CONSTS(4) = 1 STATES(2) = 0.015 STATES(3) = 1 CONSTS(5) = 1 CONSTS(6) = 0.1 CONSTS(7) = 0.05 STATES(4) = 2 CONSTS(8) = 1.5 CONSTS(9) = 2 CONSTS(10) = 1 CONSTS(11) = 0.5 CONSTS(12) = 0.1 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = ( CONSTS(2)*STATES(1)*(1.00000 - ( STATES(1)*1.00000)/CONSTS(1)) - CONSTS(3)*STATES(1)) - CONSTS(4)*STATES(1)*STATES(2) RATES(3) = (CONSTS(5) - CONSTS(6)*STATES(3)) - CONSTS(7)*STATES(3)*STATES(1) RATES(4) = CONSTS(7)*STATES(3)*STATES(1) - CONSTS(8)*STATES(4) RATES(2) = (( CONSTS(9)*STATES(4)*STATES(2))/( CONSTS(10)*STATES(2)+1.00000) - CONSTS(11)*STATES(1)*STATES(2)) - CONSTS(12)*STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( STATES(2)*STATES(4))/( CONSTS(11)*1.00000*STATES(1)) RETURN END