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 0 entries in the algebraic variable array.
C There are a total of 3 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 STATES(1) is G in component glucose_dynamics (mg_per_dl).
C CONSTS(1) is R0 in component glucose_dynamics (mg_per_dl_per_day).
C CONSTS(2) is SI in component glucose_dynamics (ml_per_microU_per_day).
C CONSTS(3) is EG0 in component glucose_dynamics (per_day).
C STATES(2) is I in component insulin_dynamics (microU_per_ml).
C CONSTS(4) is alpha in component insulin_dynamics (mg2_per_dl2).
C CONSTS(5) is sigma in component insulin_dynamics (microU_per_ml_per_day).
C CONSTS(6) is k in component insulin_dynamics (per_day).
C STATES(3) is beta in component beta_cell_dynamics (mg).
C CONSTS(7) is d0 in component beta_cell_dynamics (per_day).
C CONSTS(8) is r1 in component beta_cell_dynamics (dl_per_mg_per_day).
C CONSTS(9) is r2 in component beta_cell_dynamics (dl2_per_mg2_per_day).
C RATES(1) is d/dt G in component glucose_dynamics (mg_per_dl).
C RATES(2) is d/dt I in component insulin_dynamics (microU_per_ml).
C RATES(3) is d/dt beta in component beta_cell_dynamics (mg).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 600
      CONSTS(1) = 846
      CONSTS(2) = 0.72
      CONSTS(3) = 1.44
      STATES(2) = 0
      CONSTS(4) = 2000
      CONSTS(5) = 43.2
      CONSTS(6) = 432
      STATES(3) = 0
      CONSTS(7) = 0.06
      CONSTS(8) = 0.84e-3
      CONSTS(9) = 0.24e-5
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = CONSTS(1) -  (CONSTS(3)+ CONSTS(2)*STATES(2))*STATES(1)
      RATES(2) = ( (STATES(3)/1.00000)*CONSTS(5)*STATES(1) ** 2.00000)/(CONSTS(4)+STATES(1) ** 2.00000) -  CONSTS(6)*STATES(2)
      RATES(3) =  ( CONSTS(8)*STATES(1)+- CONSTS(7)+ - CONSTS(9)*STATES(1) ** 2.00000)*STATES(3)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RETURN
      END