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 3 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 R in component R (ng_ml).
C CONSTS(1) is b1 in component R (first_order_rate_constant).
C CONSTS(2) is b2 in component R (dimensionless).
C CONSTS(3) is b3 in component R (dimensionless).
C CONSTS(4) is g1 in component R (dimensionless).
C CONSTS(5) is g2 in component R (dimensionless).
C ALGBRC(1) is f_T in component R (ng_ml_hr).
C STATES(2) is T in component T (ng_ml).
C STATES(3) is L in component L (ng_ml).
C CONSTS(6) is b2 in component L (first_order_rate_constant).
C CONSTS(7) is g1 in component L (first_order_rate_constant).
C CONSTS(8) is b3 in component T (first_order_rate_constant).
C CONSTS(9) is g2 in component T (first_order_rate_constant).
C RATES(1) is d/dt R in component R (ng_ml).
C RATES(3) is d/dt L in component L (ng_ml).
C RATES(2) is d/dt T in component T (ng_ml).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = 0.1
CONSTS(1) = 1.0
CONSTS(2) = 1.0
CONSTS(3) = 1.0
CONSTS(4) = 10.0
CONSTS(5) = 10.0
STATES(2) = 0.0
STATES(3) = 0.0
CONSTS(6) = 1.0
CONSTS(7) = 10.0
CONSTS(8) = 1.0
CONSTS(9) = 10.0
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(3) = CONSTS(7)*STATES(1) - CONSTS(6)*STATES(3)
RATES(2) = CONSTS(9)*STATES(3) - CONSTS(8)*STATES(2)
ALGBRC(1) = ( CONSTS(1)*CONSTS(2)*CONSTS(3)*STATES(2))/( CONSTS(4)*CONSTS(5))
RATES(1) = ALGBRC(1) - CONSTS(1)*STATES(1)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = ( CONSTS(1)*CONSTS(2)*CONSTS(3)*STATES(2))/( CONSTS(4)*CONSTS(5))
RETURN
END
