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 5 entries in each of the rate and state variable arrays.
C There are a total of 18 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C STATES(1) is T in component T (per_ml).
C CONSTS(1) is lamda in component T (second_order_rate_constant).
C CONSTS(2) is d in component T (first_order_rate_constant).
C CONSTS(3) is k in component kinetic_parameters (flux).
C STATES(2) is VI in component VI (per_ml).
C STATES(3) is T_ in component T_ (per_ml).
C CONSTS(4) is tau in component T_ (first_order_rate_constant).
C CONSTS(5) is m in component T_ (first_order_rate_constant).
C CONSTS(6) is delta in component kinetic_parameters (first_order_rate_constant).
C CONSTS(7) is N in component kinetic_parameters (dimensionless).
C CONSTS(8) is c in component kinetic_parameters (first_order_rate_constant).
C ALGBRC(1) is epsilon_PI in component epsilon_PI (dimensionless).
C STATES(4) is VNI in component VNI (per_ml).
C CONSTS(9) is IC50 in component epsilon_PI (mg_per_ml).
C STATES(5) is Cc in component Cc (mg_per_ml).
C ALGBRC(2) is Cb in component Cb (mg_per_ml).
C CONSTS(10) is Vd in component Cb (ml).
C CONSTS(11) is F in component Cb (dimensionless).
C CONSTS(12) is D in component Cb (mg).
C CONSTS(13) is ka in component kinetic_parameters (first_order_rate_constant).
C CONSTS(14) is ke in component kinetic_parameters (first_order_rate_constant).
C CONSTS(15) is kacell in component Cc (first_order_rate_constant).
C CONSTS(16) is kecell in component Cc (first_order_rate_constant).
C ALGBRC(3) is Cx in component Cx (mg_per_ml).
C CONSTS(17) is H in component Cx (dimensionless).
C CONSTS(18) is fb in component Cx (dimensionless).
C RATES(1) is d/dt T in component T (per_ml).
C RATES(3) is d/dt T_ in component T_ (per_ml).
C RATES(2) is d/dt VI in component VI (per_ml).
C RATES(4) is d/dt VNI in component VNI (per_ml).
C RATES(5) is d/dt Cc in component Cc (mg_per_ml).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 1e6
      CONSTS(1) = 1e4
      CONSTS(2) = 0.01
      CONSTS(3) = 2.4e-8
      STATES(2) = 1
      STATES(3) = 1
      CONSTS(4) = 1.5
      CONSTS(5) = 0.01
      CONSTS(6) = 0.01
      CONSTS(7) = 2500
      CONSTS(8) = 23
      STATES(4) = 2
      CONSTS(9) = 9e-7
      STATES(5) = 0
      CONSTS(10) = 28000
      CONSTS(11) = 1
      CONSTS(12) = 600
      CONSTS(13) = 14.64
      CONSTS(14) = 6.86
      CONSTS(15) = 24000
      CONSTS(16) = 1.1
      CONSTS(17) = 0.052
      CONSTS(18) = 0.99
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = CONSTS(1) - ( CONSTS(2)*STATES(1)+ CONSTS(3)*STATES(1)*STATES(2))
      RATES(3) =  CONSTS(3)*STATES(1)*(VOI - CONSTS(4))*STATES(2)*(VOI - CONSTS(4))*EXP( - CONSTS(5)*CONSTS(4)) -  CONSTS(6)*STATES(3)
      ALGBRC(1) = STATES(5)/(CONSTS(9)+STATES(5))
      RATES(2) =  CONSTS(7)*CONSTS(6)*STATES(3)*(1.00000 - ALGBRC(1)) -  CONSTS(8)*STATES(2)
      RATES(4) =  CONSTS(7)*CONSTS(6)*STATES(3)*ALGBRC(1) -  CONSTS(8)*STATES(4)
      ALGBRC(2) =  (( CONSTS(11)*CONSTS(12))/CONSTS(10))*(CONSTS(13)/(CONSTS(14) - CONSTS(13)))*(EXP( - CONSTS(13)*VOI) - EXP( - CONSTS(14)*VOI))
      ALGBRC(3) = TERNRY( (1.00000 - CONSTS(18))*CONSTS(17)*ALGBRC(2) - STATES(5).GT.0.00000,  (1.00000 - CONSTS(18))*CONSTS(17)*ALGBRC(2) - STATES(5), 0.00000)
      RATES(5) =  CONSTS(15)*ALGBRC(3) -  CONSTS(16)*STATES(5)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = STATES(5)/(CONSTS(9)+STATES(5))
      ALGBRC(2) =  (( CONSTS(11)*CONSTS(12))/CONSTS(10))*(CONSTS(13)/(CONSTS(14) - CONSTS(13)))*(EXP( - CONSTS(13)*VOI) - EXP( - CONSTS(14)*VOI))
      ALGBRC(3) = TERNRY( (1.00000 - CONSTS(18))*CONSTS(17)*ALGBRC(2) - STATES(5).GT.0.00000,  (1.00000 - CONSTS(18))*CONSTS(17)*ALGBRC(2) - STATES(5), 0.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