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 8 entries in the algebraic variable array.
C There are a total of 8 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 CONSTS(1) is mu_T in component uninfected_CD4 (per_day).
C CONSTS(2) is r in component uninfected_CD4 (per_day).
C CONSTS(3) is T_max in component uninfected_CD4 (per_micro_L).
C CONSTS(4) is s_0 in component uninfected_CD4 (per_micro_L_day).
C CONSTS(5) is theta in component uninfected_CD4 (per_micro_L).
C CONSTS(6) is k_1 in component HIV1 (micro_L_per_day).
C CONSTS(7) is k_1_ in component hybrid_HIV1 (micro_L_per_day).
C STATES(1) is T_1 in component latently_infected_CD4 (per_micro_L).
C STATES(2) is V in component HIV1 (per_micro_L).
C STATES(3) is V_ in component hybrid_HIV1 (per_micro_L).
C ALGBRC(1) is s_V in component uninfected_CD4 (per_micro_L_day).
C STATES(4) is T in component uninfected_CD4 (per_micro_L).
C CONSTS(8) is k_2 in component latently_infected_CD4 (per_day).
C CONSTS(9) is k_1D in component actively_infected_CD4 (micro_L_per_day).
C CONSTS(10) is mu_b in component actively_infected_CD4 (per_day).
C STATES(5) is D in component DIV (per_micro_L).
C STATES(6) is T_2 in component actively_infected_CD4 (per_micro_L).
C CONSTS(11) is k_s in component actively_coinfected_CD4 (per_day).
C CONSTS(12) is mu_bD in component actively_coinfected_CD4 (per_day).
C STATES(7) is T_D2 in component actively_coinfected_CD4 (per_micro_L).
C CONSTS(13) is mu_TD in component stably_coinfected_CD4 (per_day).
C STATES(8) is T_D1 in component stably_coinfected_CD4 (per_micro_L).
C CONSTS(14) is mu_D in component DIV (per_day).
C ALGBRC(2) is N_t in component production_function (dimensionless).
C ALGBRC(4) is N_D_t in component DIV (dimensionless).
C ALGBRC(7) is pi_D_t in component DIV (per_day).
C CONSTS(15) is mu_V in component HIV1 (per_day).
C ALGBRC(5) is N_2_t in component HIV1 (dimensionless).
C ALGBRC(6) is N_t_ in component hybrid_HIV1 (dimensionless).
C ALGBRC(8) is pi_t_ in component hybrid_HIV1 (per_day).
C CONSTS(16) is N_0 in component production_function (dimensionless).
C CONSTS(17) is gamma in component production_function (dimensionless).
C CONSTS(18) is t_c in component production_function (day).
C ALGBRC(3) is T_tot in component cell_population (per_micro_L).
C RATES(4) is d/dt T in component uninfected_CD4 (per_micro_L).
C RATES(1) is d/dt T_1 in component latently_infected_CD4 (per_micro_L).
C RATES(6) is d/dt T_2 in component actively_infected_CD4 (per_micro_L).
C RATES(7) is d/dt T_D2 in component actively_coinfected_CD4 (per_micro_L).
C RATES(8) is d/dt T_D1 in component stably_coinfected_CD4 (per_micro_L).
C RATES(5) is d/dt D in component DIV (per_micro_L).
C RATES(2) is d/dt V in component HIV1 (per_micro_L).
C RATES(3) is d/dt V_ in component hybrid_HIV1 (per_micro_L).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0.02
      CONSTS(2) = 0.03
      CONSTS(3) = 1500
      CONSTS(4) = 10
      CONSTS(5) = 1
      CONSTS(6) = 2.4E-5
      CONSTS(7) = 2.4E-6
      STATES(1) = 0
      STATES(2) = 1E-3
      STATES(3) = 0
      STATES(4) = 1000
      CONSTS(8) = 0.017
      CONSTS(9) = 2.4E-6
      CONSTS(10) = 0.24
      STATES(5) = 0
      STATES(6) = 0
      CONSTS(11) = 0.24
      CONSTS(12) = 0.17
      STATES(7) = 0
      CONSTS(13) = 0.02
      STATES(8) = 0
      CONSTS(14) = 2.4
      CONSTS(15) = 2.4
      CONSTS(16) = 300
      CONSTS(17) = 25
      CONSTS(18) = 7305
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = (( CONSTS(6)*STATES(2)*STATES(4)+ CONSTS(7)*STATES(3)*STATES(4)) -  CONSTS(1)*STATES(1)) -  CONSTS(8)*STATES(1)
      RATES(6) = ( CONSTS(8)*STATES(1) -  CONSTS(9)*STATES(5)*STATES(6)) -  CONSTS(10)*STATES(6)
      RATES(7) = ( CONSTS(9)*STATES(5)*STATES(6) -  CONSTS(11)*STATES(7)) -  CONSTS(12)*STATES(7)
      RATES(8) =  CONSTS(11)*STATES(7) -  CONSTS(13)*STATES(8)
      ALGBRC(1) = ( CONSTS(4)*CONSTS(5))/(CONSTS(5)+STATES(2))
      RATES(4) = (((ALGBRC(1) -  CONSTS(1)*STATES(4))+ CONSTS(2)*STATES(4)*(1.00000 - (STATES(4)+STATES(1))/CONSTS(3))) -  CONSTS(6)*STATES(2)*STATES(4)) -  CONSTS(7)*STATES(3)*STATES(4)
      ALGBRC(2) =  CONSTS(16)*(1.00000+ CONSTS(17)*(VOI ** 2.00000/(VOI ** 2.00000+CONSTS(18) ** 2.00000)))
      ALGBRC(5) =  0.600000*ALGBRC(2)
      RATES(2) = (( ALGBRC(2)*CONSTS(10)*STATES(6)+ ALGBRC(5)*CONSTS(12)*STATES(7)) -  CONSTS(6)*STATES(2)*STATES(4)) -  CONSTS(15)*STATES(2)
      ALGBRC(4) =  0.200000*ALGBRC(2)
      ALGBRC(7) =  0.300000*CONSTS(10)*ALGBRC(2)
      RATES(5) = ( ALGBRC(4)*CONSTS(12)*STATES(7)+ ALGBRC(7)*STATES(8)) -  CONSTS(14)*STATES(5)
      ALGBRC(6) =  0.200000*ALGBRC(2)
      ALGBRC(8) =  0.100000*CONSTS(10)*ALGBRC(2)
      RATES(3) = (( ALGBRC(6)*CONSTS(12)*STATES(7)+ ALGBRC(8)*STATES(8)) -  CONSTS(15)*STATES(3)) -  CONSTS(7)*STATES(4)*STATES(3)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = ( CONSTS(4)*CONSTS(5))/(CONSTS(5)+STATES(2))
      ALGBRC(2) =  CONSTS(16)*(1.00000+ CONSTS(17)*(VOI ** 2.00000/(VOI ** 2.00000+CONSTS(18) ** 2.00000)))
      ALGBRC(5) =  0.600000*ALGBRC(2)
      ALGBRC(4) =  0.200000*ALGBRC(2)
      ALGBRC(7) =  0.300000*CONSTS(10)*ALGBRC(2)
      ALGBRC(6) =  0.200000*ALGBRC(2)
      ALGBRC(8) =  0.100000*CONSTS(10)*ALGBRC(2)
      ALGBRC(3) = STATES(4)+STATES(1)+STATES(6)
      RETURN
      END