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 2 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 4 entries in the constant variable array.
C
C
C STATES(1) is A in component equation_1 (conc).
C STATES(2) is D in component equation_1 (conc).
C ALGBRC(1) is kf in component equation_1 (per_sec).
C CONSTS(1) is kb in component equation_1 (per_sec).
C VOI is time in component equation_1 (second).
C CONSTS(2) is kf_ in component equation_1 (per_conc_per_sec).
C CONSTS(3) is Tk in component equation_1 (kelvin).
C CONSTS(4) is T in component equation_1 (kelvin).
C ALGBRC(2) is V in component equation_1 (conc).
C RATES(1) is d/dt A in component equation_1 (conc).
C RATES(2) is d/dt D in component equation_1 (conc).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.99
      STATES(2) = 0
      CONSTS(1) = 0.00777
      CONSTS(2) = 0.00333
      CONSTS(3) = 313
      CONSTS(4) = 340
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(2)*EXP(CONSTS(4)/CONSTS(3))*(1.00000 - STATES(1))
      RATES(1) =  - ALGBRC(1)*STATES(1)+ CONSTS(1)*((1.00000 - STATES(1)) - STATES(2))
      RATES(2) =  ALGBRC(1)*((1.00000 - STATES(1)) - STATES(2))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(2)*EXP(CONSTS(4)/CONSTS(3))*(1.00000 - STATES(1))
      ALGBRC(2) = (1.00000 - STATES(1)) - STATES(2)
      RETURN
      END