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 13 entries in the constant variable array.
C
C
C VOI is time in component enviroment (second).
C STATES(1) is P in component P (micromolar).
C CONSTS(1) is V_p in component P (per_second).
C CONSTS(2) is k_p in component P (micromolar).
C CONSTS(3) is IPR_3_flux in component P (flux).
C STATES(2) is c in component c (micromolar).
C ALGBRC(3) is J_flux in component J_flux (flux).
C ALGBRC(1) is J_pump in component J_pump (flux).
C CONSTS(13) is J_leak in component J_leak (flux).
C CONSTS(4) is k_flux in component J_flux (micromolar_per_second).
C ALGBRC(2) is mu in component mu (dimensionless).
C STATES(3) is h in component h (dimensionless).
C CONSTS(5) is b in component J_flux (dimensionless).
C CONSTS(6) is k_1 in component J_flux (micromolar).
C CONSTS(7) is gamma in component J_pump (micromolar_per_second).
C CONSTS(8) is k_gamma in component J_pump (micromolar).
C CONSTS(9) is beta in component J_leak (flux).
C CONSTS(10) is k_mu in component mu (micromolar).
C CONSTS(11) is k_2 in component h (micromolar).
C CONSTS(12) is tau_h in component h (second).
C RATES(1) is d/dt P in component P (micromolar).
C RATES(2) is d/dt c in component c (micromolar).
C RATES(3) is d/dt h in component h (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0
      CONSTS(1) = 0.08
      CONSTS(2) = 1
      CONSTS(3) = 0.72
      STATES(2) = 0.3
      CONSTS(4) = 3
      STATES(3) = 1
      CONSTS(5) = 0.11
      CONSTS(6) = 0.7
      CONSTS(7) = 1
      CONSTS(8) = 0.27
      CONSTS(9) = 0.15
      CONSTS(10) = 0.01
      CONSTS(11) = 0.7
      CONSTS(12) = 0.2
      CONSTS(13) = CONSTS(9)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = TERNRY(VOI.LE.15.0000, CONSTS(3) - ( CONSTS(1)*STATES(1)*CONSTS(2))/(CONSTS(2)+STATES(1)), ( - CONSTS(1)*STATES(1)*CONSTS(2))/(CONSTS(2)+STATES(1)))
      RATES(3) = (CONSTS(11) ** 2.00000/(CONSTS(11) ** 2.00000+STATES(2) ** 2.00000) - STATES(3))/CONSTS(12)
      ALGBRC(2) = STATES(1) ** 3.00000/(CONSTS(10) ** 3.00000+STATES(1) ** 3.00000)
      ALGBRC(3) =  CONSTS(4)*ALGBRC(2)*STATES(3)*(CONSTS(5)+( (1.00000 - CONSTS(5))*STATES(2))/(CONSTS(6)+STATES(2)))
      ALGBRC(1) = ( CONSTS(7)*STATES(2) ** 2.00000)/(CONSTS(8) ** 2.00000+STATES(2) ** 2.00000)
      RATES(2) = (ALGBRC(3) - ALGBRC(1))+CONSTS(13)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = STATES(1) ** 3.00000/(CONSTS(10) ** 3.00000+STATES(1) ** 3.00000)
      ALGBRC(3) =  CONSTS(4)*ALGBRC(2)*STATES(3)*(CONSTS(5)+( (1.00000 - CONSTS(5))*STATES(2))/(CONSTS(6)+STATES(2)))
      ALGBRC(1) = ( CONSTS(7)*STATES(2) ** 2.00000)/(CONSTS(8) ** 2.00000+STATES(2) ** 2.00000)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END