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 4 entries in each of the rate and state variable arrays.
C There are a total of 7 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C CONSTS(1) is lambda in component model_parameters (cells_per_ml).
C CONSTS(2) is delta_1 in component model_parameters (cells_per_day).
C CONSTS(3) is delta in component model_parameters (cells_per_day).
C CONSTS(4) is np in component model_parameters (dimensionless).
C CONSTS(5) is c in component model_parameters (virons_per_day).
C CONSTS(6) is k in component model_parameters (ml_per_virons_per_day).
C CONSTS(7) is N in component model_parameters (virons_per_cell).
C STATES(1) is T in component uninfected_T_cells (cells_per_ml).
C STATES(2) is VI in component infectious_virus (virons_per_ml).
C STATES(3) is T_star in component infected_T_cells (cells_per_ml).
C ALGBRC(1) is log_VI in component infectious_virus (dimensionless).
C STATES(4) is VNI in component non_infectious_virus (virons_per_ml).
C ALGBRC(2) is virus_total in component total_virus (virons_per_ml).
C ALGBRC(3) is log_virus_total in component total_virus (dimensionless).
C RATES(1) is d/dt T in component uninfected_T_cells (cells_per_ml).
C RATES(3) is d/dt T_star in component infected_T_cells (cells_per_ml).
C RATES(2) is d/dt VI in component infectious_virus (virons_per_ml).
C RATES(4) is d/dt VNI in component non_infectious_virus (virons_per_ml).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 5.0
      CONSTS(2) = 0.03
      CONSTS(3) = 0.5
      CONSTS(4) = 1.0
      CONSTS(5) = 3
      CONSTS(6) = 3.43e-5
      CONSTS(7) = 480
      STATES(1) = 180.0
      STATES(2) = 134e3
      STATES(3) = 3.6
      STATES(4) = 0
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = ( CONSTS(1)*1.00000 - ( CONSTS(2)*STATES(1))/1.00000) -  CONSTS(6)*STATES(2)*STATES(1)
      RATES(3) =  CONSTS(6)*STATES(2)*STATES(1) -  (CONSTS(3)/1.00000)*STATES(3)
      RATES(2) = ( (1.00000 - CONSTS(4))*CONSTS(7)*CONSTS(3)*STATES(3))/1.00000 - ( CONSTS(5)*STATES(2))/1.00000
      RATES(4) = ( CONSTS(4)*CONSTS(7)*CONSTS(3)*STATES(3))/1.00000 - ( CONSTS(5)*STATES(4))/1.00000
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = arbitrary_log(STATES(2)/1.00000, 10)
      ALGBRC(2) = STATES(2)+STATES(4)
      ALGBRC(3) = arbitrary_log(ALGBRC(2)/1.00000, 10)
      RETURN
      END