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 3 entries in each of the rate and state variable arrays.
C There are a total of 13 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C STATES(1) is C in component C (micromolar).
C CONSTS(1) is v_i in component C (micromolar_per_minute).
C CONSTS(2) is v_d in component C (micromolar_per_minute).
C STATES(2) is X in component X (micromolar).
C CONSTS(3) is K_d in component C (micromolar).
C CONSTS(4) is k_d in component C (per_minute).
C STATES(3) is M in component M (micromolar).
C ALGBRC(1) is V_1 in component V_1 (micromolar_per_minute).
C CONSTS(5) is K_1 in component M (per_minute).
C CONSTS(6) is V_2 in component M (per_minute).
C CONSTS(7) is K_2 in component M (per_minute).
C ALGBRC(2) is V_3 in component V_3 (micromolar_per_minute).
C CONSTS(8) is K_3 in component X (per_minute).
C CONSTS(9) is V_4 in component X (per_minute).
C CONSTS(10) is K_4 in component X (per_minute).
C CONSTS(11) is K_c in component V_1 (micromolar).
C CONSTS(12) is V_M1 in component V_1 (per_minute).
C CONSTS(13) is V_M3 in component V_3 (per_minute).
C RATES(1) is d/dt C in component C (micromolar).
C RATES(3) is d/dt M in component M (micromolar).
C RATES(2) is d/dt X in component X (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.1
      CONSTS(1) = 0.05
      CONSTS(2) = 0.25
      STATES(2) = 0.1
      CONSTS(3) = 0.02
      CONSTS(4) = 0.01
      STATES(3) = 0.1
      CONSTS(5) = 0.01
      CONSTS(6) = 1.5
      CONSTS(7) = 0.01
      CONSTS(8) = 0.01
      CONSTS(9) = 0.5
      CONSTS(10) = 0.01
      CONSTS(11) = 0.5
      CONSTS(12) = 3
      CONSTS(13) = 1
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = (CONSTS(1) -  CONSTS(2)*STATES(2)*(STATES(1)/(CONSTS(3)+STATES(1)))) -  CONSTS(4)*STATES(1)
      ALGBRC(1) =  (STATES(1)/(CONSTS(11)+STATES(1)))*CONSTS(12)
      RATES(3) =  ALGBRC(1)*((1.00000 - STATES(3))/(CONSTS(5)+(1.00000 - STATES(3)))) -  CONSTS(6)*(STATES(3)/(CONSTS(7)+STATES(3)))
      ALGBRC(2) =  STATES(3)*CONSTS(13)
      RATES(2) =  ALGBRC(2)*((1.00000 - STATES(2))/(CONSTS(8)+(1.00000 - STATES(2)))) -  CONSTS(9)*(STATES(2)/(CONSTS(10)+STATES(2)))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  (STATES(1)/(CONSTS(11)+STATES(1)))*CONSTS(12)
      ALGBRC(2) =  STATES(3)*CONSTS(13)
      RETURN
      END