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 11 entries in the algebraic variable array.
C There are a total of 6 entries in each of the rate and state variable arrays.
C There are a total of 16 entries in the constant variable array.
C
C
C ALGBRC(1) is N_x in component N_x (dimensionless).
C CONSTS(1) is N_0 in component model_parameters (dimensionless).
C VOI is x in component model_parameters (mm).
C CONSTS(2) is ksh in component model_parameters (per_mm).
C STATES(1) is F_DVR_v in component F_DVR_v (nl_min).
C ALGBRC(9) is Jv in component model_parameters (nl_min_mm).
C STATES(2) is F_DVR_GLU in component F_DVR_GLU (pmol_min).
C ALGBRC(10) is JGLU in component JGLU (pmol_min_mm).
C STATES(3) is F_DVR_LAC in component F_DVR_LAC (pmol_min).
C ALGBRC(11) is JLAC in component JLAC (pmol_min_mm).
C STATES(4) is F_AVR_v in component F_AVR_v (nl_min).
C ALGBRC(8) is J_ABS_V in component J_ABS_V (nl_min_mm).
C STATES(5) is F_AVR_GLU in component F_AVR_GLU (pmol_min).
C ALGBRC(7) is JGLY in component JGLY (pmol_min_mm).
C STATES(6) is F_AVR_LAC in component F_AVR_LAC (pmol_min).
C CONSTS(3) is PGLU in component JGLU (nl_min_mm).
C CONSTS(4) is sigma_GLU in component JGLU (dimensionless).
C ALGBRC(4) is c_DVR_GLU in component c_DVR_GLU (millimolar).
C ALGBRC(5) is c_AVR_GLU in component c_AVR_GLU (millimolar).
C CONSTS(5) is PLAC in component JLAC (nl_min_mm).
C CONSTS(6) is sigma_LAC in component JLAC (dimensionless).
C ALGBRC(6) is c_AVR_LAC in component c_AVR_LAC (millimolar).
C ALGBRC(2) is c_DVR_LAC in component c_DVR_LAC (millimolar).
C CONSTS(16) is Vmax in component JGLY (pmol_min_mm).
C CONSTS(7) is Km in component JGLY (millimolar).
C CONSTS(8) is GlyFract in component JGLY (dimensionless).
C CONSTS(15) is F_DVR_G_0 in component model_parameters (pmol_min).
C CONSTS(9) is L in component model_parameters (mm).
C CONSTS(14) is kv in component kv (nl_min_mm).
C CONSTS(10) is VolFract in component kv (dimensionless).
C CONSTS(13) is F_DVR_V_0 in component model_parameters (nl_min).
C CONSTS(11) is c_DVR_GLU_0 in component model_parameters (millimolar).
C ALGBRC(3) is x_L in component model_parameters (dimensionless).
C CONSTS(12) is b in component model_parameters (dimensionless).
C RATES(1) is d/dt F_DVR_v in component F_DVR_v (nl_min).
C RATES(2) is d/dt F_DVR_GLU in component F_DVR_GLU (pmol_min).
C RATES(3) is d/dt F_DVR_LAC in component F_DVR_LAC (pmol_min).
C RATES(4) is d/dt F_AVR_v in component F_AVR_v (nl_min).
C RATES(5) is d/dt F_AVR_GLU in component F_AVR_GLU (pmol_min).
C RATES(6) is d/dt F_AVR_LAC in component F_AVR_LAC (pmol_min).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 128.0
      CONSTS(2) = 1.213
      STATES(1) = 3.75
      STATES(2) = 0.01
      STATES(3) = 0.01
      STATES(4) = 0.01
      STATES(5) = 0.01
      STATES(6) = 0.01
      CONSTS(3) = 1.2
      CONSTS(4) = 0.5
      CONSTS(5) = 33.93
      CONSTS(6) = 0.5
      CONSTS(7) = 0.1
      CONSTS(8) = 0.2
      CONSTS(9) = 4.0
      CONSTS(10) = 0.3
      CONSTS(11) = 10.0
      CONSTS(12) = 4.0
      CONSTS(13) =  3.75000*CONSTS(1)
      CONSTS(14) =  (CONSTS(2)/( CONSTS(1)*(1.00000 - EXP(- ( CONSTS(2)*CONSTS(9))))))*CONSTS(10)*CONSTS(13)
      CONSTS(15) =  CONSTS(13)*CONSTS(11)
      CONSTS(16) =  (CONSTS(2)/( CONSTS(1)*(1.00000 - EXP(- ( CONSTS(2)*CONSTS(9))))))*( CONSTS(8)*CONSTS(15))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(1)*EXP(- ( CONSTS(2)*VOI))
      ALGBRC(9) =  0.300000*(STATES(1)/( CONSTS(1)*CONSTS(12)))*ALGBRC(1)
      RATES(1) = - (ALGBRC(9)+ CONSTS(2)*STATES(1))
      ALGBRC(8) =  CONSTS(14)*ALGBRC(1)
      RATES(4) = ALGBRC(9)+ CONSTS(2)*STATES(1)+ALGBRC(8)
      ALGBRC(4) = STATES(2)/STATES(1)
      ALGBRC(5) = STATES(5)/STATES(4)
      ALGBRC(10) =  ALGBRC(1)*CONSTS(3)*(ALGBRC(4) - ALGBRC(5))+ (1.00000 - CONSTS(4))*ALGBRC(9)*((ALGBRC(4)+ALGBRC(5))/2.00000)
      RATES(2) = - (ALGBRC(10)+ CONSTS(2)*STATES(2))
      ALGBRC(6) = STATES(6)/STATES(4)
      ALGBRC(11) =  ALGBRC(1)*CONSTS(5)*(ALGBRC(4) - ALGBRC(6))+ (1.00000 - CONSTS(6))*ALGBRC(9)*((ALGBRC(4)+ALGBRC(6))/2.00000)
      RATES(3) = - (ALGBRC(11)+ CONSTS(2)*STATES(3))
      ALGBRC(7) =  ALGBRC(1)*(( CONSTS(16)*ALGBRC(5))/(CONSTS(7)+ALGBRC(5)))
      RATES(5) = (ALGBRC(10)+ CONSTS(2)*STATES(2)) - ALGBRC(7)
      RATES(6) = ALGBRC(11)+ CONSTS(2)*STATES(3)+ 2.00000*ALGBRC(7)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(1)*EXP(- ( CONSTS(2)*VOI))
      ALGBRC(9) =  0.300000*(STATES(1)/( CONSTS(1)*CONSTS(12)))*ALGBRC(1)
      ALGBRC(8) =  CONSTS(14)*ALGBRC(1)
      ALGBRC(4) = STATES(2)/STATES(1)
      ALGBRC(5) = STATES(5)/STATES(4)
      ALGBRC(10) =  ALGBRC(1)*CONSTS(3)*(ALGBRC(4) - ALGBRC(5))+ (1.00000 - CONSTS(4))*ALGBRC(9)*((ALGBRC(4)+ALGBRC(5))/2.00000)
      ALGBRC(6) = STATES(6)/STATES(4)
      ALGBRC(11) =  ALGBRC(1)*CONSTS(5)*(ALGBRC(4) - ALGBRC(6))+ (1.00000 - CONSTS(6))*ALGBRC(9)*((ALGBRC(4)+ALGBRC(6))/2.00000)
      ALGBRC(7) =  ALGBRC(1)*(( CONSTS(16)*ALGBRC(5))/(CONSTS(7)+ALGBRC(5)))
      ALGBRC(2) = STATES(3)/STATES(1)
      ALGBRC(3) = VOI/CONSTS(9)
      RETURN
      END