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 5 entries in the algebraic variable array.
C There are a total of 7 entries in each of the rate and state variable arrays.
C There are a total of 34 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C STATES(1) is phi_I in component phi_I (cells_per_mm3).
C ALGBRC(4) is alpha in component model_parameters (dimensionless).
C CONSTS(1) is k1 in component model_parameters (dimensionless).
C CONSTS(2) is k2 in component model_parameters (per_day).
C CONSTS(3) is k3 in component model_parameters (mm3_per_cells).
C CONSTS(4) is k5 in component model_parameters (mm3_per_cells).
C CONSTS(5) is k6 in component model_parameters (mm3_per_microg).
C CONSTS(6) is d1 in component model_parameters (per_day).
C STATES(2) is phi_R in component phi_R (cells_per_mm3).
C ALGBRC(1) is K_T in component K_T (cells_per_mm3_per_day).
C STATES(3) is F in component F (cells_per_mm3).
C STATES(4) is C in component C (microg_per_mm3).
C STATES(5) is T in component T (pg_per_mm3).
C CONSTS(7) is k4 in component model_parameters (pg_per_cells_per_day).
C CONSTS(8) is k7 in component model_parameters (pg_per_cells_per_day).
C CONSTS(9) is d2 in component model_parameters (per_day).
C STATES(6) is P in component P (pg_per_mm3).
C CONSTS(10) is k8 in component model_parameters (pg_per_cells_per_day).
C CONSTS(11) is k9 in component model_parameters (pg_per_cells_per_day).
C CONSTS(12) is d3 in component model_parameters (per_day).
C CONSTS(13) is k10 in component model_parameters (per_day).
C CONSTS(14) is d4 in component model_parameters (per_day).
C ALGBRC(2) is M_P in component M_P (cells_per_mm3_per_day).
C CONSTS(15) is k11 in component model_parameters (microg_per_cells_per_day).
C ALGBRC(3) is f_T in component f_T (dimensionless).
C ALGBRC(5) is g_C in component g_C (dimensionless).
C CONSTS(16) is d5 in component model_parameters (mm3_per_cells_per_day).
C STATES(7) is H in component H (microg_per_mm3).
C CONSTS(17) is k12 in component model_parameters (microg_per_cells_per_day).
C CONSTS(18) is d6 in component model_parameters (per_day).
C CONSTS(19) is tau1 in component K_T (mm6_cells_per_pg3_day).
C CONSTS(20) is tau2 in component K_T (mm3_cells_per_pg2_day).
C CONSTS(21) is tau3 in component K_T (cells_per_pg_per_day).
C CONSTS(22) is tau4 in component K_T (cells_per_mm3_per_day).
C CONSTS(23) is tau1 in component M_P (mm6_cells_per_pg3_day).
C CONSTS(24) is tau2 in component M_P (mm3_cells_per_pg2_day).
C CONSTS(25) is tau3 in component M_P (cells_per_pg_per_day).
C CONSTS(26) is tau4 in component M_P (cells_per_mm3_per_day).
C CONSTS(27) is tau1 in component f_T (mm9_per_pg3).
C CONSTS(28) is tau2 in component f_T (mm6_per_pg2).
C CONSTS(29) is tau3 in component f_T (mm3_per_pg).
C CONSTS(30) is tau4 in component f_T (dimensionless).
C CONSTS(31) is tau1 in component g_C (mm9_per_microg3).
C CONSTS(32) is tau2 in component g_C (mm6_per_microg2).
C CONSTS(33) is tau3 in component g_C (mm3_per_microg).
C CONSTS(34) is tau4 in component g_C (dimensionless).
C RATES(1) is d/dt phi_I in component phi_I (cells_per_mm3).
C RATES(2) is d/dt phi_R in component phi_R (cells_per_mm3).
C RATES(5) is d/dt T in component T (pg_per_mm3).
C RATES(6) is d/dt P in component P (pg_per_mm3).
C RATES(3) is d/dt F in component F (cells_per_mm3).
C RATES(4) is d/dt C in component C (microg_per_mm3).
C RATES(7) is d/dt H in component H (microg_per_mm3).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 200.0
      CONSTS(1) = 0.05
      CONSTS(2) = 0.693
      CONSTS(3) = 0.002
      CONSTS(4) = 0.0025
      CONSTS(5) = 0.0004
      CONSTS(6) = 0.2
      STATES(2) = 200.0
      STATES(3) = 50.0
      STATES(4) = 10.0
      STATES(5) = 6.0
      CONSTS(7) = 0.07
      CONSTS(8) = 0.004
      CONSTS(9) = 9.1
      STATES(6) = 2.0
      CONSTS(10) = 0.015
      CONSTS(11) = 0.0015
      CONSTS(12) = 4.0
      CONSTS(13) = 0.924
      CONSTS(14) = 2.5
      CONSTS(15) = 5.0
      CONSTS(16) = 1.5E-5
      STATES(7) = 0.01
      CONSTS(17) = 0.001
      CONSTS(18) = 0.7
      CONSTS(19) = -2.47
      CONSTS(20) = 21.94
      CONSTS(21) = 6.41
      CONSTS(22) = 1.75
      CONSTS(23) = 15.333
      CONSTS(24) = -167.21
      CONSTS(25) = 452.38
      CONSTS(26) = 2.6593
      CONSTS(27) = 0.0092
      CONSTS(28) = -0.1552
      CONSTS(29) = 0.6279
      CONSTS(30) = 0.2527
      CONSTS(31) = -4.33E-10
      CONSTS(32) = 0.0000009
      CONSTS(33) = -0.00055
      CONSTS(34) = 0.13
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(5) = ( CONSTS(7)*STATES(1)+ CONSTS(8)*STATES(3)) -  CONSTS(9)*STATES(5)
      RATES(6) = ( CONSTS(10)*(STATES(1)+STATES(2))+ CONSTS(11)*STATES(3)) -  CONSTS(12)*STATES(6)
      RATES(7) =  CONSTS(17)*STATES(3) -  CONSTS(18)*STATES(7)
      ALGBRC(2) =  CONSTS(23)*STATES(6) ** 3.00000+ CONSTS(24)*STATES(6) ** 2.00000+ CONSTS(25)*STATES(6)+CONSTS(26)
      RATES(3) = (ALGBRC(2)+ CONSTS(13)*STATES(3)*(1.00000 - ( CONSTS(3)*(STATES(1)+STATES(2))+ CONSTS(4)*STATES(3)+ CONSTS(5)*STATES(4)))) -  CONSTS(14)*STATES(3)
      ALGBRC(4) = - ( 0.197000*arbitrary_log(STATES(7), 10))+0.440700
      ALGBRC(1) =  CONSTS(19)*STATES(5) ** 3.00000+ CONSTS(20)*STATES(5) ** 2.00000+ CONSTS(21)*STATES(5)+CONSTS(22)
      RATES(1) = ( ALGBRC(4)*ALGBRC(1)+ CONSTS(1)*CONSTS(2)*STATES(1)*(1.00000 - ( CONSTS(3)*(STATES(1)+STATES(2))+ CONSTS(4)*STATES(3)+ CONSTS(5)*STATES(4)))) -  CONSTS(6)*STATES(1)
      RATES(2) = ( (1.00000 - ALGBRC(4))*ALGBRC(1)+ CONSTS(1)*CONSTS(2)*STATES(2)*(1.00000 - ( CONSTS(3)*(STATES(1)+STATES(2))+ CONSTS(4)*STATES(3)+ CONSTS(5)*STATES(4)))) -  CONSTS(6)*STATES(2)
      ALGBRC(3) =  CONSTS(27)*STATES(5) ** 3.00000+ CONSTS(28)*STATES(5) ** 2.00000+ CONSTS(29)*STATES(5)+CONSTS(30)
      ALGBRC(5) =  CONSTS(31)*STATES(4) ** 3.00000+ CONSTS(32)*STATES(4) ** 2.00000+ CONSTS(33)*STATES(4)+CONSTS(34)
      RATES(4) =  CONSTS(15)*STATES(3)*ALGBRC(3)*ALGBRC(5) -  CONSTS(16)*STATES(3)*STATES(4)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  CONSTS(23)*STATES(6) ** 3.00000+ CONSTS(24)*STATES(6) ** 2.00000+ CONSTS(25)*STATES(6)+CONSTS(26)
      ALGBRC(4) = - ( 0.197000*arbitrary_log(STATES(7), 10))+0.440700
      ALGBRC(1) =  CONSTS(19)*STATES(5) ** 3.00000+ CONSTS(20)*STATES(5) ** 2.00000+ CONSTS(21)*STATES(5)+CONSTS(22)
      ALGBRC(3) =  CONSTS(27)*STATES(5) ** 3.00000+ CONSTS(28)*STATES(5) ** 2.00000+ CONSTS(29)*STATES(5)+CONSTS(30)
      ALGBRC(5) =  CONSTS(31)*STATES(4) ** 3.00000+ CONSTS(32)*STATES(4) ** 2.00000+ CONSTS(33)*STATES(4)+CONSTS(34)
      RETURN
      END