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 3 entries in each of the rate and state variable arrays.
C There are a total of 26 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C STATES(1) is R in component R (picomolar).
C CONSTS(1) is DR in component model_parameters (flux).
C ALGBRC(4) is pi_C in component model_parameters (dimensionless).
C CONSTS(22) is DB in component model_parameters (first_order_rate_constant).
C STATES(2) is B in component B (picomolar).
C CONSTS(2) is kB in component model_parameters (first_order_rate_constant).
C STATES(3) is C in component C (picomolar).
C CONSTS(3) is DC in component model_parameters (flux).
C ALGBRC(3) is pi_L in component pi_L (dimensionless).
C CONSTS(4) is DA in component model_parameters (first_order_rate_constant).
C CONSTS(5) is k1 in component pi_L (second_order_rate_constant).
C CONSTS(6) is k2 in component pi_L (first_order_rate_constant).
C CONSTS(7) is k3 in component pi_L (second_order_rate_constant).
C CONSTS(8) is k4 in component pi_L (first_order_rate_constant).
C CONSTS(9) is K in component pi_L (picomolar).
C CONSTS(10) is ko in component pi_L (first_order_rate_constant).
C ALGBRC(1) is Io in component pi_L (flux).
C ALGBRC(2) is IL in component pi_L (flux).
C CONSTS(11) is rL in component pi_L (flux).
C CONSTS(12) is KOP in component pi_L (picomole_day_picomole_cells).
C CONSTS(13) is KLP in component pi_L (picomole_picomole_cells).
C CONSTS(26) is pi_P in component model_parameters (dimensionless).
C CONSTS(14) is f0 in component model_parameters (dimensionless).
C CONSTS(15) is dB in component model_parameters (first_order_rate_constant).
C CONSTS(16) is IP in component model_parameters (flux).
C CONSTS(17) is kP in component model_parameters (first_order_rate_constant).
C CONSTS(23) is P in component model_parameters (picomolar).
C CONSTS(24) is P_0 in component model_parameters (picomolar).
C CONSTS(25) is P_s in component model_parameters (picomolar).
C CONSTS(18) is C_s in component model_parameters (picomolar).
C CONSTS(19) is SP in component model_parameters (flux).
C CONSTS(20) is k5 in component model_parameters (second_order_rate_constant).
C CONSTS(21) is k6 in component model_parameters (first_order_rate_constant).
C RATES(1) is d/dt R in component R (picomolar).
C RATES(2) is d/dt B in component B (picomolar).
C RATES(3) is d/dt C in component C (picomolar).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = 0
CONSTS(1) = 7e-4
STATES(2) = 0
CONSTS(2) = 0.189
STATES(3) = 0
CONSTS(3) = 2.1e-3
CONSTS(4) = 0.7
CONSTS(5) = 1e-2
CONSTS(6) = 10
CONSTS(7) = 5.8e-4
CONSTS(8) = 1.7e-2
CONSTS(9) = 10
CONSTS(10) = 0.35
CONSTS(11) = 1e3
CONSTS(12) = 2e5
CONSTS(13) = 3e6
CONSTS(14) = 0.05
CONSTS(15) = 0.7
CONSTS(16) = 0
CONSTS(17) = 86
CONSTS(18) = 5e-3
CONSTS(19) = 250
CONSTS(20) = 0.02
CONSTS(21) = 3
CONSTS(22) = CONSTS(14)*CONSTS(15)
CONSTS(23) = CONSTS(16)/CONSTS(17)
CONSTS(24) = CONSTS(19)/CONSTS(17)
CONSTS(25) = CONSTS(21)/CONSTS(20)
CONSTS(26) = (CONSTS(23)+CONSTS(24))/(CONSTS(23)+CONSTS(25))
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(4) = (STATES(3)+ CONSTS(14)*CONSTS(18))/(STATES(3)+CONSTS(18))
RATES(1) = CONSTS(1)*ALGBRC(4) - (CONSTS(22)/ALGBRC(4))*STATES(1)
RATES(2) = (CONSTS(22)/ALGBRC(4))*STATES(1) - CONSTS(2)*STATES(2)
ALGBRC(1) = TERNRY(VOI.GE.80.0000, 90000.0, 0.00000)
ALGBRC(2) = TERNRY(VOI.GE.20.0000, 10000.0, 0.00000)
ALGBRC(3) = (( (( (CONSTS(7)/CONSTS(8))*CONSTS(13))/1.00000)*CONSTS(26)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( ((CONSTS(12)/1.00000)/CONSTS(26))*STATES(1)+ALGBRC(1))))*(1.00000+ALGBRC(2)/CONSTS(11))
RATES(3) = CONSTS(3)*ALGBRC(3) - CONSTS(4)*ALGBRC(4)*STATES(3)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(4) = (STATES(3)+ CONSTS(14)*CONSTS(18))/(STATES(3)+CONSTS(18))
ALGBRC(1) = TERNRY(VOI.GE.80.0000, 90000.0, 0.00000)
ALGBRC(2) = TERNRY(VOI.GE.20.0000, 10000.0, 0.00000)
ALGBRC(3) = (( (( (CONSTS(7)/CONSTS(8))*CONSTS(13))/1.00000)*CONSTS(26)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( ((CONSTS(12)/1.00000)/CONSTS(26))*STATES(1)+ALGBRC(1))))*(1.00000+ALGBRC(2)/CONSTS(11))
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
