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 1 entries in the algebraic variable array.
C There are a total of 4 entries in each of the rate and state variable arrays.
C There are a total of 9 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C CONSTS(1) is s in component uninfected (per_day_mm3).
C CONSTS(2) is r in component uninfected (per_day).
C CONSTS(3) is T_max in component uninfected (per_mm3).
C CONSTS(4) is mu_T in component uninfected (per_day).
C CONSTS(5) is k_1 in component latently_infected (mm3_per_day).
C STATES(1) is T_1 in component latently_infected (per_mm3).
C STATES(2) is T_2 in component actively_infected (per_mm3).
C STATES(3) is V in component free_virus_particle (per_mm3).
C STATES(4) is T in component uninfected (per_mm3).
C CONSTS(6) is k_2 in component actively_infected (per_day).
C CONSTS(7) is mu_b in component actively_infected (per_day).
C CONSTS(8) is mu_V in component free_virus_particle (per_day).
C CONSTS(9) is N in component free_virus_particle (dimensionless).
C ALGBRC(1) is T_tot in component T_cell_population (per_mm3).
C RATES(4) is d/dt T in component uninfected (per_mm3).
C RATES(1) is d/dt T_1 in component latently_infected (per_mm3).
C RATES(2) is d/dt T_2 in component actively_infected (per_mm3).
C RATES(3) is d/dt V in component free_virus_particle (per_mm3).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 10
      CONSTS(2) = 0.03
      CONSTS(3) = 1500
      CONSTS(4) = 0.02
      CONSTS(5) = 2.4E-5
      STATES(1) = 0
      STATES(2) = 0
      STATES(3) = 1.0E-3
      STATES(4) = 1000
      CONSTS(6) = 3E-3
      CONSTS(7) = 0.24
      CONSTS(8) = 2.4
      CONSTS(9) = 1400
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(4) = ((CONSTS(1) -  CONSTS(4)*STATES(4))+ CONSTS(2)*STATES(4)*(1.00000 - (STATES(4)+STATES(1)+STATES(2))/CONSTS(3))) -  CONSTS(5)*STATES(3)*STATES(4)
      RATES(1) = ( CONSTS(5)*STATES(3)*STATES(4) -  CONSTS(4)*STATES(1)) -  CONSTS(6)*STATES(1)
      RATES(2) =  CONSTS(6)*STATES(1) -  CONSTS(7)*STATES(2)
      RATES(3) = ( CONSTS(9)*CONSTS(7)*STATES(2) -  CONSTS(5)*STATES(3)*STATES(4)) -  CONSTS(8)*STATES(3)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = STATES(4)+STATES(1)+STATES(2)
      RETURN
      END