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 14 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(2) is lamda 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(3) is mu1 in component Y (first_order_rate_constant).
C CONSTS(4) is a in component Y (dimensionless).
C STATES(5) is Z in component Z (dimensionless).
C CONSTS(5) is mu2 in component V (first_order_rate_constant).
C CONSTS(6) is beta in component V (first_order_rate_constant).
C CONSTS(7) is b in component V (dimensionless).
C CONSTS(8) is theta in component Z (first_order_rate_constant).
C CONSTS(9) is rho in component Z (first_order_rate_constant).
C ALGBRC(1) is f_X in component Z (dimensionless).
C ALGBRC(2) is g_V in component Z (dimensionless).
C CONSTS(10) is C1 in component Z (dimensionless).
C CONSTS(11) is C2 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(14) 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) = 4.0E-3
CONSTS(2) = 4.0E8
STATES(2) = 1.35E-14
STATES(3) = 1.0
STATES(4) = 1.0
CONSTS(3) = 0.30
CONSTS(4) = 1.0
STATES(5) = 0.0
CONSTS(5) = 1.0
CONSTS(6) = 1.0E3
CONSTS(7) = 1.0
CONSTS(8) = 1.0E-6
CONSTS(9) = 0.50
CONSTS(10) = 0.04
CONSTS(11) = 1.0E3
CONSTS(12) = 1.0E11
CONSTS(13) = 1.0E-16
CONSTS(14) = 20.0
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(1) = CONSTS(2) - ( CONSTS(1)*STATES(1)+ STATES(2)*STATES(3)*STATES(1))
RATES(4) = STATES(2)*STATES(3)*STATES(4) - CONSTS(3)*(1.00000+ CONSTS(4)*STATES(5))*STATES(4)
RATES(3) = CONSTS(6)*STATES(4) - CONSTS(5)*(1.00000+ CONSTS(7)*STATES(5))*STATES(3)
RATES(2) = CONSTS(13)*STATES(3)*(CONSTS(14) - STATES(2))
ALGBRC(1) = ( (1.00000+CONSTS(10))*STATES(1)/CONSTS(12) ** 2.00000)/(CONSTS(10)+STATES(1)/CONSTS(12) ** 2.00000)
ALGBRC(2) = STATES(3)/(CONSTS(11)+STATES(3))
RATES(5) = CONSTS(8)*ALGBRC(2)+ CONSTS(9)*(ALGBRC(1) - STATES(5))*STATES(5)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = ( (1.00000+CONSTS(10))*STATES(1)/CONSTS(12) ** 2.00000)/(CONSTS(10)+STATES(1)/CONSTS(12) ** 2.00000)
ALGBRC(2) = STATES(3)/(CONSTS(11)+STATES(3))
RETURN
END
