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 9 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 13 entries in the constant variable array.
C
C
C VOI is time in component environment (hour).
C CONSTS(1) is Ado in component Ado (micromolar).
C ALGBRC(1) is Met in component Met (micromolar).
C ALGBRC(2) is Hcy in component Hcy (micromolar).
C STATES(1) is AdoHcy in component AdoHcy (micromolar).
C CONSTS(2) is K_AHC in component K_AHC (micromolar).
C STATES(2) is AdoMet in component AdoMet (micromolar).
C ALGBRC(7) is V_MET in component V_MET (flux).
C ALGBRC(8) is V_GNMT in component V_GNMT (flux).
C ALGBRC(3) is V_MATI in component V_MATI (flux).
C ALGBRC(5) is V_MATIII in component V_MATIII (flux).
C ALGBRC(9) is V_D in component V_D (flux).
C CONSTS(3) is V_MATImax in component V_MATI (flux).
C CONSTS(4) is Km_MATI in component V_MATI (micromolar).
C CONSTS(5) is Ki_MATI in component V_MATI (micromolar).
C CONSTS(6) is V_MATIIImax in component V_MATIII (flux).
C ALGBRC(4) is Km1_MATIII in component V_MATIII (micromolar).
C CONSTS(7) is Km2_MATIII in component V_MATIII (micromolar).
C CONSTS(8) is V_METmax in component V_MET (flux).
C ALGBRC(6) is Km1_MET in component V_MET (micromolar).
C CONSTS(9) is Km2_MET_A in component V_MET (dimensionless).
C CONSTS(10) is V_GNMTmax in component V_GNMT (flux).
C CONSTS(11) is Km_GNMT in component V_GNMT (micromolar).
C CONSTS(12) is Ki_GNMT in component V_GNMT (micromolar).
C CONSTS(13) is alpha_d in component V_D (first_order_rate_constant).
C RATES(2) is d/dt AdoMet in component AdoMet (micromolar).
C RATES(1) is d/dt AdoHcy in component AdoHcy (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 1
      STATES(1) = 3
      CONSTS(2) = 0.1
      STATES(2) = 60
      CONSTS(3) = 561
      CONSTS(4) = 41
      CONSTS(5) = 50
      CONSTS(6) = 22870
      CONSTS(7) = 21.1
      CONSTS(8) = 4544
      CONSTS(9) = 10
      CONSTS(10) = 10600
      CONSTS(11) = 4500
      CONSTS(12) = 20
      CONSTS(13) = 1333
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) =  10.0000*(1.00000+STATES(1)/4.00000)
      ALGBRC(7) = CONSTS(8)/(1.00000+ALGBRC(6)/STATES(2)+CONSTS(9)+( CONSTS(9)*ALGBRC(6))/STATES(2))
      ALGBRC(8) = ( (CONSTS(10)/(1.00000+CONSTS(11)/STATES(2) ** 2.30000))*1.00000)/(1.00000+STATES(1)/CONSTS(12))
      ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.5.00000, 45.0000, TERNRY(VOI.GE.5.00000.AND.VOI.LT.15.0000, 52.0000, TERNRY(VOI.GE.15.0000.AND.VOI.LT.60.0000, 55.0000, TERNRY(VOI.GE.60.0000.AND.VOI.LT.75.0000, 52.0000, TERNRY(VOI.GE.75.0000, 45.0000, 0.0/0.0)
      ALGBRC(3) = CONSTS(3)/(1.00000+ (CONSTS(4)/ALGBRC(1))*(1.00000+STATES(2)/CONSTS(5)))
      ALGBRC(4) = 20000.0/(1.00000+ 5.70000*STATES(2)/(STATES(2)+600.000) ** 2.00000)
      ALGBRC(5) = CONSTS(6)/(1.00000+( ALGBRC(4)*CONSTS(7))/(ALGBRC(1) ** 2.00000+ ALGBRC(1)*CONSTS(7)))
      RATES(2) = (ALGBRC(3)+ALGBRC(5)) - (ALGBRC(7)+ALGBRC(8))
      ALGBRC(2) = ( STATES(1)*CONSTS(2))/CONSTS(1)
      ALGBRC(9) =  CONSTS(13)*ALGBRC(2)
      RATES(1) = ((ALGBRC(7)+ALGBRC(8)) - ALGBRC(9))/(1.00000+CONSTS(2)/CONSTS(1))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) =  10.0000*(1.00000+STATES(1)/4.00000)
      ALGBRC(7) = CONSTS(8)/(1.00000+ALGBRC(6)/STATES(2)+CONSTS(9)+( CONSTS(9)*ALGBRC(6))/STATES(2))
      ALGBRC(8) = ( (CONSTS(10)/(1.00000+CONSTS(11)/STATES(2) ** 2.30000))*1.00000)/(1.00000+STATES(1)/CONSTS(12))
      ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.5.00000, 45.0000, TERNRY(VOI.GE.5.00000.AND.VOI.LT.15.0000, 52.0000, TERNRY(VOI.GE.15.0000.AND.VOI.LT.60.0000, 55.0000, TERNRY(VOI.GE.60.0000.AND.VOI.LT.75.0000, 52.0000, TERNRY(VOI.GE.75.0000, 45.0000, 0.0/0.0)
      ALGBRC(3) = CONSTS(3)/(1.00000+ (CONSTS(4)/ALGBRC(1))*(1.00000+STATES(2)/CONSTS(5)))
      ALGBRC(4) = 20000.0/(1.00000+ 5.70000*STATES(2)/(STATES(2)+600.000) ** 2.00000)
      ALGBRC(5) = CONSTS(6)/(1.00000+( ALGBRC(4)*CONSTS(7))/(ALGBRC(1) ** 2.00000+ ALGBRC(1)*CONSTS(7)))
      ALGBRC(2) = ( STATES(1)*CONSTS(2))/CONSTS(1)
      ALGBRC(9) =  CONSTS(13)*ALGBRC(2)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END