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 5 entries in each of the rate and state variable arrays.
C There are a total of 6 entries in the constant variable array.
C
C
C VOI is t in component time (second).
C STATES(1) is A in component Cformation (uM).
C STATES(2) is B in component Cformation (uM).
C STATES(3) is C in component Cformation (uM).
C ALGBRC(1) is J1 in component Cformation (uM_per_s).
C CONSTS(1) is kf1 in component Cformation (per_uM_per_s).
C CONSTS(2) is kr1 in component Cformation (per_s).
C CONSTS(6) is Cpc in component Cformation (uM_um2).
C CONSTS(3) is R in component Cformation (per_um).
C ALGBRC(2) is J2 in component Eformation (per_um2_per_s).
C STATES(4) is D in component Eformation (per_um2).
C STATES(5) is E in component Eformation (per_um2).
C CONSTS(4) is kf2 in component Eformation (per_uM_per_s).
C CONSTS(5) is kr2 in component Eformation (per_s).
C RATES(3) is d/dt C in component Cformation (uM).
C RATES(1) is d/dt A in component Cformation (uM).
C RATES(2) is d/dt B in component Cformation (uM).
C RATES(4) is d/dt D in component Eformation (per_um2).
C RATES(5) is d/dt E in component Eformation (per_um2).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 10
      STATES(2) = 5
      STATES(3) = 0
      CONSTS(1) = 0.2
      CONSTS(2) = 0.05
      CONSTS(3) = 5
      STATES(4) = 4
      STATES(5) = 0
      CONSTS(4) = 0.006
      CONSTS(5) = 0.001
      CONSTS(6) = CONSTS(3)/602.200
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(1)*STATES(1)*STATES(2) -  CONSTS(2)*STATES(3)
      RATES(1) = - ALGBRC(1)
      RATES(2) = - ALGBRC(1)
      ALGBRC(2) =  CONSTS(4)*STATES(3)*STATES(4) -  CONSTS(5)*STATES(5)
      RATES(3) = ALGBRC(1) -  CONSTS(6)*ALGBRC(2)
      RATES(4) = - ALGBRC(2)
      RATES(5) = ALGBRC(2)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(1)*STATES(1)*STATES(2) -  CONSTS(2)*STATES(3)
      ALGBRC(2) =  CONSTS(4)*STATES(3)*STATES(4) -  CONSTS(5)*STATES(5)
      RETURN
      END