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 5 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 25 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(1) is pi_C in component model_parameters (dimensionless).
C CONSTS(23) 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(5) 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 CONSTS(11) is Io in component pi_L (flux).
C CONSTS(12) is IL in component pi_L (flux).
C CONSTS(13) is rL in component pi_L (flux).
C CONSTS(14) is KOP in component pi_L (picomole_day_picomole_cells).
C CONSTS(15) is KLP in component pi_L (picomole_picomole_cells).
C ALGBRC(4) is pi_P in component model_parameters (dimensionless).
C CONSTS(16) is f0 in component model_parameters (dimensionless).
C CONSTS(17) is dB in component model_parameters (first_order_rate_constant).
C ALGBRC(2) is IP in component model_parameters (flux).
C CONSTS(18) is kP in component model_parameters (first_order_rate_constant).
C ALGBRC(3) 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(19) is C_s in component model_parameters (picomolar).
C CONSTS(20) is SP in component model_parameters (flux).
C CONSTS(21) is k5 in component model_parameters (second_order_rate_constant).
C CONSTS(22) 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) = 0
CONSTS(12) = 0
CONSTS(13) = 1e3
CONSTS(14) = 2e5
CONSTS(15) = 3e6
CONSTS(16) = 0.05
CONSTS(17) = 0.7
CONSTS(18) = 86
CONSTS(19) = 5e-3
CONSTS(20) = 250
CONSTS(21) = 0.02
CONSTS(22) = 3
CONSTS(23) = CONSTS(16)*CONSTS(17)
CONSTS(24) = CONSTS(20)/CONSTS(18)
CONSTS(25) = CONSTS(22)/CONSTS(21)
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = (STATES(3)+ CONSTS(16)*CONSTS(19))/(STATES(3)+CONSTS(19))
RATES(1) = CONSTS(1)*ALGBRC(1) - (CONSTS(23)/ALGBRC(1))*STATES(1)
RATES(2) = (CONSTS(23)/ALGBRC(1))*STATES(1) - CONSTS(2)*STATES(2)
ALGBRC(2) = TERNRY(VOI.GT.20.0000.AND.VOI.LE.80.0000, 1000.00, 0.00000)
ALGBRC(3) = ALGBRC(2)/CONSTS(18)
ALGBRC(4) = (ALGBRC(3)+CONSTS(24))/(ALGBRC(3)+CONSTS(25))
ALGBRC(5) = (( (( (CONSTS(7)/CONSTS(8))*CONSTS(15))/1.00000)*ALGBRC(4)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( ((CONSTS(14)/1.00000)/ALGBRC(4))*STATES(1)+CONSTS(11))))*(1.00000+CONSTS(12)/CONSTS(13))
RATES(3) = CONSTS(3)*ALGBRC(5) - CONSTS(4)*ALGBRC(1)*STATES(3)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = (STATES(3)+ CONSTS(16)*CONSTS(19))/(STATES(3)+CONSTS(19))
ALGBRC(2) = TERNRY(VOI.GT.20.0000.AND.VOI.LE.80.0000, 1000.00, 0.00000)
ALGBRC(3) = ALGBRC(2)/CONSTS(18)
ALGBRC(4) = (ALGBRC(3)+CONSTS(24))/(ALGBRC(3)+CONSTS(25))
ALGBRC(5) = (( (( (CONSTS(7)/CONSTS(8))*CONSTS(15))/1.00000)*ALGBRC(4)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( ((CONSTS(14)/1.00000)/ALGBRC(4))*STATES(1)+CONSTS(11))))*(1.00000+CONSTS(12)/CONSTS(13))
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
