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 3 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 27 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(3) 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(2) 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 CONSTS(11) is IL in component pi_L (flux).
C CONSTS(12) is rL in component pi_L (flux).
C CONSTS(13) is KOP in component pi_L (picomole_day_picomole_cells).
C CONSTS(14) is KLP in component pi_L (picomole_picomole_cells).
C CONSTS(27) is pi_P in component model_parameters (dimensionless).
C CONSTS(15) is f0 in component model_parameters (dimensionless).
C CONSTS(16) is dB in component model_parameters (first_order_rate_constant).
C CONSTS(17) is IP in component model_parameters (flux).
C CONSTS(18) is kP in component model_parameters (first_order_rate_constant).
C CONSTS(24) is P in component model_parameters (picomolar).
C CONSTS(25) is P_0 in component model_parameters (picomolar).
C CONSTS(26) 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.00
      CONSTS(1) = 7E-4
      STATES(2) = 0.00
      CONSTS(2) = 0.189
      STATES(3) = 0.00
      CONSTS(3) = 2.1E-3
      CONSTS(4) = 0.7
      CONSTS(5) = 1E-2
      CONSTS(6) = 10.0
      CONSTS(7) = 5.8E-4
      CONSTS(8) = 1.7E-2
      CONSTS(9) = 10.0
      CONSTS(10) = 0.35
      CONSTS(11) = 0.0
      CONSTS(12) = 1E3
      CONSTS(13) = 2E5
      CONSTS(14) = 3E6
      CONSTS(15) = 0.05
      CONSTS(16) = 0.7
      CONSTS(17) = 0.0
      CONSTS(18) = 86.0
      CONSTS(19) = 5E-3
      CONSTS(20) = 250.0
      CONSTS(21) = 0.02
      CONSTS(22) = 3.0
      CONSTS(23) =  CONSTS(15)*CONSTS(16)
      CONSTS(24) = CONSTS(17)/CONSTS(18)
      CONSTS(25) = CONSTS(20)/CONSTS(18)
      CONSTS(26) = CONSTS(22)/CONSTS(21)
      CONSTS(27) = (CONSTS(24)+CONSTS(25))/(CONSTS(24)+CONSTS(26))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(3) = (STATES(3)+ CONSTS(15)*CONSTS(19))/(STATES(3)+CONSTS(19))
      RATES(1) =  CONSTS(1)*ALGBRC(3) -  (CONSTS(23)/ALGBRC(3))*STATES(1)
      RATES(2) =  (CONSTS(23)/ALGBRC(3))*STATES(1) -  CONSTS(2)*STATES(2)
      ALGBRC(1) = TERNRY(VOI.GT.20.0000.AND.VOI.LE.80.0000, 200000., 0.00000)
      ALGBRC(2) =  (CONSTS(7)/CONSTS(8))*(( CONSTS(14)*CONSTS(27)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( (CONSTS(13)/CONSTS(27))*STATES(1)+ALGBRC(1))))*(1.00000+CONSTS(11)/CONSTS(12))
      RATES(3) =  CONSTS(3)*ALGBRC(2) -  CONSTS(4)*ALGBRC(3)*STATES(3)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(3) = (STATES(3)+ CONSTS(15)*CONSTS(19))/(STATES(3)+CONSTS(19))
      ALGBRC(1) = TERNRY(VOI.GT.20.0000.AND.VOI.LE.80.0000, 200000., 0.00000)
      ALGBRC(2) =  (CONSTS(7)/CONSTS(8))*(( CONSTS(14)*CONSTS(27)*STATES(2))/(1.00000+( CONSTS(7)*CONSTS(9))/CONSTS(8)+ (CONSTS(5)/( CONSTS(6)*CONSTS(10)))*( (CONSTS(13)/CONSTS(27))*STATES(1)+ALGBRC(1))))*(1.00000+CONSTS(11)/CONSTS(12))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END
Source
Derived from workspace Lemaire, Tobin, Greller, Cho, Suva, 2004 at changeset 5023c6be53d8.
This exposure was expired. A more up-to-date exposure is available, or view related resources.
Collaboration
To begin collaborating on this work, please use your git client and issue this command:
License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.