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 4 entries in the algebraic variable array.
C There are a total of 10 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 S in component S (dimensionless).
C CONSTS(1) is r in component S (first_order_rate_constant).
C CONSTS(2) is epsilon in component S (dimensionless).
C ALGBRC(1) is H in component S (dimensionless).
C CONSTS(3) is d in component kinetic_parameters (first_order_rate_constant).
C CONSTS(4) is g in component memory_duration (first_order_rate_constant).
C CONSTS(5) is beta_1 in component kinetic_parameters (first_order_rate_constant).
C CONSTS(6) is beta_2 in component kinetic_parameters (first_order_rate_constant).
C STATES(2) is R_1 in component R1 (dimensionless).
C STATES(3) is R_2 in component R2 (dimensionless).
C STATES(4) is R_12 in component R12 (dimensionless).
C STATES(5) is P_1 in component P1 (dimensionless).
C STATES(6) is P_2 in component P2 (dimensionless).
C STATES(7) is I_1 in component I1 (dimensionless).
C STATES(8) is I_2 in component I2 (dimensionless).
C STATES(9) is I_12 in component I12 (dimensionless).
C STATES(10) is I_21 in component I21 (dimensionless).
C ALGBRC(2) is P in component S (dimensionless).
C CONSTS(7) is a_1 in component kinetic_parameters (first_order_rate_constant).
C CONSTS(8) is alpha_1 in component kinetic_parameters (first_order_rate_constant).
C CONSTS(9) is a_2 in component kinetic_parameters (first_order_rate_constant).
C CONSTS(10) is alpha_2 in component kinetic_parameters (first_order_rate_constant).
C CONSTS(11) is k_1 in component P1 (first_order_rate_constant).
C CONSTS(12) is u in component kinetic_parameters (first_order_rate_constant).
C ALGBRC(3) is log_P1 in component P1 (dimensionless).
C CONSTS(13) is k_2 in component P2 (first_order_rate_constant).
C ALGBRC(4) is log_P2 in component P2 (dimensionless).
C CONSTS(14) is G in component memory_duration (dimensionless).
C RATES(1) is d/dt S in component S (dimensionless).
C RATES(7) is d/dt I_1 in component I1 (dimensionless).
C RATES(8) is d/dt I_2 in component I2 (dimensionless).
C RATES(9) is d/dt I_12 in component I12 (dimensionless).
C RATES(10) is d/dt I_21 in component I21 (dimensionless).
C RATES(2) is d/dt R_1 in component R1 (dimensionless).
C RATES(3) is d/dt R_2 in component R2 (dimensionless).
C RATES(4) is d/dt R_12 in component R12 (dimensionless).
C RATES(5) is d/dt P_1 in component P1 (dimensionless).
C RATES(6) is d/dt P_2 in component P2 (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = 100
CONSTS(1) = 0.5
CONSTS(2) = 0.1
CONSTS(3) = 0.01
CONSTS(4) = 0.01
CONSTS(5) = 1
CONSTS(6) = 1
STATES(2) = 0
STATES(3) = 0
STATES(4) = 0
STATES(5) = 1
STATES(6) = 1
STATES(7) = 0
STATES(8) = 0
STATES(9) = 0
STATES(10) = 0
CONSTS(7) = 0.03
CONSTS(8) = 0.1
CONSTS(9) = 1
CONSTS(10) = 0.1
CONSTS(11) = 1
CONSTS(12) = 0.5
CONSTS(13) = 1
CONSTS(14) = 1.00000/CONSTS(4)
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(7) = ( CONSTS(5)*STATES(1)*STATES(5) - CONSTS(7)*STATES(7)) - CONSTS(8)*STATES(7)
RATES(8) = ( CONSTS(6)*STATES(1)*STATES(6) - CONSTS(9)*STATES(8)) - CONSTS(10)*STATES(8)
RATES(9) = ( CONSTS(6)*STATES(2)*STATES(6) - CONSTS(9)*STATES(9)) - CONSTS(10)*STATES(9)
RATES(10) = ( CONSTS(5)*STATES(3)*STATES(5) - CONSTS(7)*STATES(10)) - CONSTS(8)*STATES(10)
RATES(2) = (( CONSTS(8)*STATES(7) - CONSTS(3)*STATES(2)) - CONSTS(4)*STATES(2)) - CONSTS(6)*STATES(2)*STATES(6)
RATES(3) = (( CONSTS(10)*STATES(8) - CONSTS(3)*STATES(3)) - CONSTS(4)*STATES(3)) - CONSTS(5)*STATES(3)*STATES(5)
RATES(4) = (( CONSTS(10)*STATES(9)+ CONSTS(8)*STATES(10)) - CONSTS(3)*STATES(4)) - CONSTS(4)*STATES(4)
RATES(5) = CONSTS(11)*(STATES(7)+STATES(10)) - CONSTS(12)*STATES(5)
RATES(6) = CONSTS(13)*(STATES(8)+STATES(9)) - CONSTS(12)*STATES(6)
ALGBRC(1) = STATES(1)+STATES(7)+STATES(2)+STATES(8)+STATES(3)+STATES(9)+STATES(10)+STATES(4)
RATES(1) = (((( CONSTS(1)*ALGBRC(1))/( CONSTS(2)*ALGBRC(1)+1.00000) - CONSTS(3)*STATES(1)) - CONSTS(5)*STATES(1)*STATES(5)) - CONSTS(6)*STATES(1)*STATES(6))+ CONSTS(4)*(STATES(2)+STATES(3)+STATES(4))
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = STATES(1)+STATES(7)+STATES(2)+STATES(8)+STATES(3)+STATES(9)+STATES(10)+STATES(4)
ALGBRC(2) = STATES(5)+STATES(6)
ALGBRC(3) = arbitrary_log(STATES(5), 10)
ALGBRC(4) = arbitrary_log(STATES(6), 10)
RETURN
END
