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 2 entries in each of the rate and state variable arrays. C There are a total of 9 entries in the constant variable array. C C C VOI is time in component environment (hour). C STATES(1) is S in component S (dimensionless). C CONSTS(1) is rs in component kinetic_parameters (first_order_rate_constant). C CONSTS(2) is epsilon_s in component kinetic_parameters (first_order_rate_constant). C CONSTS(3) is alpha in component kinetic_parameters (first_order_rate_constant). C CONSTS(4) is u in component kinetic_parameters (first_order_rate_constant). C CONSTS(5) is beta in component kinetic_parameters (first_order_rate_constant). C ALGBRC(1) is phi in component phi (dimensionless). C STATES(2) is M in component M (dimensionless). C CONSTS(6) is rm in component kinetic_parameters (first_order_rate_constant). C CONSTS(7) is epsilon_m in component kinetic_parameters (first_order_rate_constant). C CONSTS(9) is growth_rate in component phi (first_order_rate_constant). C CONSTS(8) is a in component kinetic_parameters (first_order_rate_constant). C RATES(1) is d/dt S in component S (dimensionless). C RATES(2) is d/dt M in component M (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.5 CONSTS(1) = 1 CONSTS(2) = 0.99 CONSTS(3) = 0.1 CONSTS(4) = 0.07 CONSTS(5) = 0.2 STATES(2) = 0.5 CONSTS(6) = 1.3 CONSTS(7) = 0.1 CONSTS(8) = 0.5 CONSTS(9) = (CONSTS(1)+CONSTS(6))*(1.00000 - CONSTS(8)/1.00000) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = (( STATES(1)*CONSTS(1))/1.00000)*(1.00000 - (CONSTS(4)/1.00000)*((1.00000 - ( CONSTS(5)*CONSTS(2))/1.00000) - (CONSTS(3)/1.00000)*(1.00000 - CONSTS(2)/1.00000)))+ (( STATES(2)*CONSTS(6))/1.00000)*(1.00000 - (CONSTS(4)/1.00000)*((1.00000 - ( CONSTS(5)*CONSTS(7))/1.00000) - (CONSTS(3)/1.00000)*(1.00000 - CONSTS(7)/1.00000))) RATES(1) = ( CONSTS(1)*STATES(1)*((1.00000 - CONSTS(4)*1.00000)+( CONSTS(5)*CONSTS(2)*CONSTS(4))/1.00000)+ (( CONSTS(3)*CONSTS(4)*CONSTS(1)*STATES(1))/1.00000)*(1.00000 - CONSTS(2))) - ALGBRC(1)*STATES(1)*1.00000 RATES(2) = ( CONSTS(6)*STATES(2)*((1.00000 - CONSTS(4)/1.00000)+( CONSTS(5)*CONSTS(7)*CONSTS(4))/1.00000)+ (( CONSTS(3)*CONSTS(4)*CONSTS(6)*STATES(2))/1.00000)*(1.00000 - CONSTS(7))) - ALGBRC(1)*STATES(2)*1.00000 RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = (( STATES(1)*CONSTS(1))/1.00000)*(1.00000 - (CONSTS(4)/1.00000)*((1.00000 - ( CONSTS(5)*CONSTS(2))/1.00000) - (CONSTS(3)/1.00000)*(1.00000 - CONSTS(2)/1.00000)))+ (( STATES(2)*CONSTS(6))/1.00000)*(1.00000 - (CONSTS(4)/1.00000)*((1.00000 - ( CONSTS(5)*CONSTS(7))/1.00000) - (CONSTS(3)/1.00000)*(1.00000 - CONSTS(7)/1.00000))) RETURN END