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 15 entries in each of the rate and state variable arrays. C There are a total of 16 entries in the constant variable array. C C C VOI is time in component environment (hour). C STATES(1) is x in component x (dimensionless). C CONSTS(1) is d in component model_parameters (first_order_rate_constant). C CONSTS(2) is gamma in component model_parameters (first_order_rate_constant). C CONSTS(3) is lambda in component model_parameters (first_order_rate_constant). C CONSTS(4) is beta in component model_parameters (first_order_rate_constant). C STATES(2) is v in component v (dimensionless). C STATES(3) is y0 in component y0 (dimensionless). C CONSTS(5) is a0 in component model_parameters (first_order_rate_constant). C CONSTS(6) is eta in component model_parameters (first_order_rate_constant). C CONSTS(7) is phi in component model_parameters (first_order_rate_constant). C STATES(4) is L in component L (dimensionless). C CONSTS(8) is pa in component model_parameters (first_order_rate_constant). C STATES(5) is za in component za (dimensionless). C STATES(6) is y1 in component y1 (dimensionless). C CONSTS(9) is a1 in component model_parameters (first_order_rate_constant). C CONSTS(10) is k in component model_parameters (first_order_rate_constant). C CONSTS(11) is u in component model_parameters (first_order_rate_constant). C STATES(7) is m_8 in component m_8 (dimensionless). C CONSTS(12) is r in component model_parameters (first_order_rate_constant). C STATES(8) is m_7 in component m_7 (dimensionless). C STATES(9) is m_6 in component m_6 (dimensionless). C STATES(10) is m_5 in component m_5 (dimensionless). C STATES(11) is m_4 in component m_4 (dimensionless). C STATES(12) is m_3 in component m_3 (dimensionless). C STATES(13) is m_2 in component m_2 (dimensionless). C STATES(14) is m_1 in component m_1 (dimensionless). C STATES(15) is m_0 in component m_0 (dimensionless). C CONSTS(13) is alpha in component model_parameters (first_order_rate_constant). C CONSTS(14) is ca in component model_parameters (first_order_rate_constant). C CONSTS(15) is ba in component model_parameters (first_order_rate_constant). C ALGBRC(1) is log_za in component za (dimensionless). C CONSTS(16) is R0 in component R0 (dimensionless). C RATES(1) is d/dt x in component x (dimensionless). C RATES(3) is d/dt y0 in component y0 (dimensionless). C RATES(6) is d/dt y1 in component y1 (dimensionless). C RATES(4) is d/dt L in component L (dimensionless). C RATES(2) is d/dt v in component v (dimensionless). C RATES(7) is d/dt m_8 in component m_8 (dimensionless). C RATES(8) is d/dt m_7 in component m_7 (dimensionless). C RATES(9) is d/dt m_6 in component m_6 (dimensionless). C RATES(10) is d/dt m_5 in component m_5 (dimensionless). C RATES(11) is d/dt m_4 in component m_4 (dimensionless). C RATES(12) is d/dt m_3 in component m_3 (dimensionless). C RATES(13) is d/dt m_2 in component m_2 (dimensionless). C RATES(14) is d/dt m_1 in component m_1 (dimensionless). C RATES(15) is d/dt m_0 in component m_0 (dimensionless). C RATES(5) is d/dt za in component za (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 1 CONSTS(1) = 0.1 CONSTS(2) = 0.5 CONSTS(3) = 10 CONSTS(4) = 0.1 STATES(2) = 1 STATES(3) = 0 CONSTS(5) = 0.1 CONSTS(6) = 0.01 CONSTS(7) = 0.1 STATES(4) = 0 CONSTS(8) = 0.000001 STATES(5) = 1 STATES(6) = 0 CONSTS(9) = 0.2 CONSTS(10) = 1 CONSTS(11) = 1 STATES(7) = 0 CONSTS(12) = 1 STATES(8) = 0 STATES(9) = 0 STATES(10) = 0 STATES(11) = 0 STATES(12) = 0 STATES(13) = 0 STATES(14) = 0 STATES(15) = 1 CONSTS(13) = 0.2 CONSTS(14) = 15.5 CONSTS(15) = 0.1 CONSTS(16) = (( CONSTS(3)*CONSTS(6))/( CONSTS(1)*CONSTS(9)*(CONSTS(5)+CONSTS(6))))*(CONSTS(4)+( CONSTS(2)*CONSTS(7))/(CONSTS(7)+CONSTS(1))) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = CONSTS(3) - ( CONSTS(1)*STATES(1)+ CONSTS(4)*STATES(1)*STATES(2)+ CONSTS(2)*STATES(1)*STATES(2)) RATES(3) = ( CONSTS(4)*STATES(1)*STATES(2) - ( CONSTS(5)*STATES(3)+ CONSTS(6)*STATES(3)+ CONSTS(8)*STATES(3)*STATES(5)))+ CONSTS(7)*STATES(4) RATES(6) = CONSTS(6)*STATES(3) - ( CONSTS(9)*STATES(6)+ CONSTS(8)*STATES(6)*STATES(5)) RATES(4) = CONSTS(2)*STATES(1)*STATES(2) - ( CONSTS(7)*STATES(4)+ CONSTS(1)*STATES(4)) RATES(2) = CONSTS(10)*STATES(6) - CONSTS(11)*STATES(2) RATES(7) = 2.00000*CONSTS(12)*STATES(8) - CONSTS(12)*STATES(7) RATES(8) = 2.00000*CONSTS(12)*STATES(9) - CONSTS(12)*STATES(8) RATES(9) = 2.00000*CONSTS(12)*STATES(10) - CONSTS(12)*STATES(9) RATES(10) = 2.00000*CONSTS(12)*STATES(11) - CONSTS(12)*STATES(10) RATES(11) = 2.00000*CONSTS(12)*STATES(12) - CONSTS(12)*STATES(11) RATES(12) = 2.00000*CONSTS(12)*STATES(13) - CONSTS(12)*STATES(12) RATES(13) = 2.00000*CONSTS(12)*STATES(14) - CONSTS(12)*STATES(13) RATES(14) = 2.00000*CONSTS(12)*STATES(15) - CONSTS(12)*STATES(14) RATES(15) = - CONSTS(12)*STATES(15) RATES(5) = ( CONSTS(13)*STATES(7)+ CONSTS(14)*(STATES(3)+STATES(6))*STATES(5)) - CONSTS(15)*STATES(5) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = arbitrary_log(STATES(5), 10) RETURN END