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 22 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 26 entries in the constant variable array.
C
C
C VOI is t in component GLUT2_BG (second).
C CONSTS(1) is R in component params_BG (J_per_K_mol).
C CONSTS(2) is T in component params_BG (kelvin).
C CONSTS(3) is K_Ai in component params_BG (per_fmol).
C CONSTS(24) is q_init_Ai in component params_BG (fmol).
C CONSTS(4) is K_Ao in component params_BG (per_fmol).
C CONSTS(21) is q_init_Ao in component params_BG (fmol).
C CONSTS(5) is K_1 in component params_BG (per_fmol).
C CONSTS(6) is q_init_1 in component params_BG (fmol).
C CONSTS(7) is K_2 in component params_BG (per_fmol).
C CONSTS(8) is q_init_2 in component params_BG (fmol).
C CONSTS(9) is K_3 in component params_BG (per_fmol).
C CONSTS(10) is q_init_3 in component params_BG (fmol).
C CONSTS(11) is K_4 in component params_BG (per_fmol).
C CONSTS(12) is q_init_4 in component params_BG (fmol).
C CONSTS(13) is kappa_r1 in component params_BG (fmol_per_s).
C CONSTS(14) is kappa_r2 in component params_BG (fmol_per_s).
C CONSTS(15) is kappa_r3 in component params_BG (fmol_per_s).
C CONSTS(16) is kappa_r4 in component params_BG (fmol_per_s).
C CONSTS(26) is mu_Ai in component GLUT2_BG (J_per_mol).
C ALGBRC(17) is v_Ai in component GLUT2_BG (fmol_per_s).
C CONSTS(23) is mu_Ao in component GLUT2_BG (J_per_mol).
C ALGBRC(18) is v_Ao in component GLUT2_BG (fmol_per_s).
C ALGBRC(1) is mu_1 in component GLUT2_BG (J_per_mol).
C ALGBRC(19) is v_1 in component GLUT2_BG (fmol_per_s).
C ALGBRC(2) is mu_2 in component GLUT2_BG (J_per_mol).
C ALGBRC(20) is v_2 in component GLUT2_BG (fmol_per_s).
C ALGBRC(3) is mu_3 in component GLUT2_BG (J_per_mol).
C ALGBRC(21) is v_3 in component GLUT2_BG (fmol_per_s).
C ALGBRC(4) is mu_4 in component GLUT2_BG (J_per_mol).
C ALGBRC(22) is v_4 in component GLUT2_BG (fmol_per_s).
C ALGBRC(5) is A_f_r1 in component GLUT2_BG (J_per_mol).
C ALGBRC(7) is v_r1 in component GLUT2_BG (fmol_per_s).
C ALGBRC(6) is A_r_r1 in component GLUT2_BG (J_per_mol).
C ALGBRC(8) is A_f_r2 in component GLUT2_BG (J_per_mol).
C ALGBRC(10) is v_r2 in component GLUT2_BG (fmol_per_s).
C ALGBRC(9) is A_r_r2 in component GLUT2_BG (J_per_mol).
C ALGBRC(11) is A_f_r3 in component GLUT2_BG (J_per_mol).
C ALGBRC(15) is v_r3 in component GLUT2_BG (fmol_per_s).
C ALGBRC(13) is A_r_r3 in component GLUT2_BG (J_per_mol).
C ALGBRC(12) is A_f_r4 in component GLUT2_BG (J_per_mol).
C ALGBRC(16) is v_r4 in component GLUT2_BG (fmol_per_s).
C ALGBRC(14) is A_r_r4 in component GLUT2_BG (J_per_mol).
C CONSTS(25) is q_Ai in component GLUT2_BG (fmol).
C CONSTS(22) is q_Ao in component GLUT2_BG (fmol).
C STATES(1) is q_1 in component GLUT2_BG (fmol).
C STATES(2) is q_2 in component GLUT2_BG (fmol).
C STATES(3) is q_3 in component GLUT2_BG (fmol).
C STATES(4) is q_4 in component GLUT2_BG (fmol).
C CONSTS(17) is V_i in component params_BG (pL).
C CONSTS(18) is g_i in component params_BG (mM).
C CONSTS(19) is g_o in component params_BG (mM).
C CONSTS(20) is V_o in component params_BG (pL).
C RATES(1) is d/dt q_1 in component GLUT2_BG (fmol).
C RATES(2) is d/dt q_2 in component GLUT2_BG (fmol).
C RATES(3) is d/dt q_3 in component GLUT2_BG (fmol).
C RATES(4) is d/dt q_4 in component GLUT2_BG (fmol).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 8.31
      CONSTS(2) = 273.15
      CONSTS(3) = 149.65
      CONSTS(4) = 149.65
      CONSTS(5) = 33.20
      CONSTS(6) = 0.0017
      CONSTS(7) = 4.25e+03
      CONSTS(8) = 0.0017
      CONSTS(9) = 344.59
      CONSTS(10) = 0.0017
      CONSTS(11) = 1.99
      CONSTS(12) = 0.0017
      CONSTS(13) = 0.36
      CONSTS(14) = 0.26
      CONSTS(15) = 1.01e+05
      CONSTS(16) = 1.01e+04
      CONSTS(17) = 0.09
      CONSTS(18) = 10
      CONSTS(19) = 1e-5
      CONSTS(20) = 0.09
      CONSTS(21) =  CONSTS(19)*CONSTS(20)
      CONSTS(22) = CONSTS(21)
      CONSTS(23) =  CONSTS(1)*CONSTS(2)*log( CONSTS(4)*CONSTS(22))
      CONSTS(24) =  CONSTS(18)*CONSTS(17)
      CONSTS(25) = CONSTS(24)
      CONSTS(26) =  CONSTS(1)*CONSTS(2)*log( CONSTS(3)*CONSTS(25))
      STATES(1) = CONSTS(6)
      STATES(2) = CONSTS(8)
      STATES(3) = CONSTS(10)
      STATES(4) = CONSTS(12)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(4) =  CONSTS(1)*CONSTS(2)*log( CONSTS(11)*STATES(4))
      ALGBRC(5) = ALGBRC(4)
      ALGBRC(1) =  CONSTS(1)*CONSTS(2)*log( CONSTS(5)*STATES(1))
      ALGBRC(6) = ALGBRC(1)
      ALGBRC(7) =  CONSTS(13)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(11) = CONSTS(23)+ALGBRC(1)
      ALGBRC(2) =  CONSTS(1)*CONSTS(2)*log( CONSTS(7)*STATES(2))
      ALGBRC(13) = ALGBRC(2)
      ALGBRC(15) =  CONSTS(15)*(EXP(ALGBRC(11)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(13)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(19) = ALGBRC(7) - ALGBRC(15)
      RATES(1) = ALGBRC(19)
      ALGBRC(8) = ALGBRC(2)
      ALGBRC(3) =  CONSTS(1)*CONSTS(2)*log( CONSTS(9)*STATES(3))
      ALGBRC(9) = ALGBRC(3)
      ALGBRC(10) =  CONSTS(14)*(EXP(ALGBRC(8)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(9)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(20) = ALGBRC(15) - ALGBRC(10)
      RATES(2) = ALGBRC(20)
      ALGBRC(12) = ALGBRC(3)
      ALGBRC(14) = CONSTS(26)+ALGBRC(4)
      ALGBRC(16) =  CONSTS(16)*(EXP(ALGBRC(12)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(14)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(21) = ALGBRC(10) - ALGBRC(16)
      RATES(3) = ALGBRC(21)
      ALGBRC(22) = ALGBRC(16) - ALGBRC(7)
      RATES(4) = ALGBRC(22)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(4) =  CONSTS(1)*CONSTS(2)*log( CONSTS(11)*STATES(4))
      ALGBRC(5) = ALGBRC(4)
      ALGBRC(1) =  CONSTS(1)*CONSTS(2)*log( CONSTS(5)*STATES(1))
      ALGBRC(6) = ALGBRC(1)
      ALGBRC(7) =  CONSTS(13)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(11) = CONSTS(23)+ALGBRC(1)
      ALGBRC(2) =  CONSTS(1)*CONSTS(2)*log( CONSTS(7)*STATES(2))
      ALGBRC(13) = ALGBRC(2)
      ALGBRC(15) =  CONSTS(15)*(EXP(ALGBRC(11)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(13)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(19) = ALGBRC(7) - ALGBRC(15)
      ALGBRC(8) = ALGBRC(2)
      ALGBRC(3) =  CONSTS(1)*CONSTS(2)*log( CONSTS(9)*STATES(3))
      ALGBRC(9) = ALGBRC(3)
      ALGBRC(10) =  CONSTS(14)*(EXP(ALGBRC(8)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(9)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(20) = ALGBRC(15) - ALGBRC(10)
      ALGBRC(12) = ALGBRC(3)
      ALGBRC(14) = CONSTS(26)+ALGBRC(4)
      ALGBRC(16) =  CONSTS(16)*(EXP(ALGBRC(12)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(14)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(21) = ALGBRC(10) - ALGBRC(16)
      ALGBRC(22) = ALGBRC(16) - ALGBRC(7)
      ALGBRC(17) = ALGBRC(16)
      ALGBRC(18) = - ALGBRC(15)
      RETURN
      END