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 13 entries in the algebraic variable array.
C There are a total of 8 entries in each of the rate and state variable arrays.
C There are a total of 55 entries in the constant variable array.
C
C
C ALGBRC(1) is time in component environment (second).
C STATES(1) is p in component p (dimensionless).
C CONSTS(31) is v1 in component v1 (dimensionless).
C ALGBRC(2) is v2 in component v2 (dimensionless).
C ALGBRC(7) is v7 in component v7 (dimensionless).
C VOI is tau in component normalised_constants (dimensionless).
C STATES(2) is a in component a (dimensionless).
C ALGBRC(3) is v3 in component v3 (dimensionless).
C CONSTS(49) is epsilon1 in component normalised_constants (dimensionless).
C STATES(3) is c in component c (dimensionless).
C ALGBRC(4) is v4 in component v4 (dimensionless).
C CONSTS(50) is epsilon2 in component normalised_constants (dimensionless).
C STATES(4) is k in component k (dimensionless).
C ALGBRC(5) is v5 in component v5 (dimensionless).
C ALGBRC(6) is v6 in component v6 (dimensionless).
C CONSTS(51) is epsilon3 in component normalised_constants (dimensionless).
C STATES(5) is o in component o (dimensionless).
C ALGBRC(8) is v8 in component v8 (dimensionless).
C CONSTS(52) is epsilon4 in component normalised_constants (dimensionless).
C STATES(6) is n in component n (dimensionless).
C ALGBRC(11) is vresp in component vresp (dimensionless).
C CONSTS(53) is epsilon5 in component normalised_constants (dimensionless).
C STATES(7) is en in component en (dimensionless).
C ALGBRC(13) is vATP in component vATP (dimensionless).
C ALGBRC(9) is vANT in component vANT (dimensionless).
C CONSTS(54) is epsilon6 in component normalised_constants (dimensionless).
C STATES(8) is s in component s (dimensionless).
C ALGBRC(10) is vleak in component vleak (dimensionless).
C CONSTS(55) is epsilon7 in component normalised_constants (dimensionless).
C CONSTS(32) is beta2 in component normalised_constants (dimensionless).
C CONSTS(33) is beta3 in component normalised_constants (dimensionless).
C CONSTS(34) is beta4 in component normalised_constants (dimensionless).
C CONSTS(35) is beta5 in component normalised_constants (dimensionless).
C CONSTS(36) is delta_6 in component normalised_constants (dimensionless).
C CONSTS(37) is beta6 in component normalised_constants (dimensionless).
C CONSTS(38) is beta7 in component normalised_constants (dimensionless).
C CONSTS(39) is beta8 in component normalised_constants (dimensionless).
C CONSTS(40) is beta_ANT in component normalised_constants (dimensionless).
C CONSTS(41) is beta_leak in component normalised_constants (dimensionless).
C CONSTS(42) is beta_resp in component normalised_constants (dimensionless).
C CONSTS(43) is delta_r1 in component normalised_constants (dimensionless).
C CONSTS(44) is delta_r2 in component normalised_constants (dimensionless).
C CONSTS(45) is beta_ATP in component normalised_constants (dimensionless).
C CONSTS(46) is delta_atp in component normalised_constants (dimensionless).
C ALGBRC(12) is en_crit in component en_crit (dimensionless).
C CONSTS(47) is Kapp_dash in component normalised_constants (dimensionless).
C CONSTS(48) is delta_crit in component normalised_constants (dimensionless).
C CONSTS(1) is At in component normalised_constants (millimolar).
C CONSTS(2) is Nt in component normalised_constants (millimolar).
C CONSTS(3) is Pyr_bar in component normalised_constants (dimensionless).
C CONSTS(4) is Cit_bar in component normalised_constants (dimensionless).
C CONSTS(5) is AcCoA_bar in component normalised_constants (dimensionless).
C CONSTS(6) is KG_bar in component normalised_constants (dimensionless).
C CONSTS(7) is OAA_bar in component normalised_constants (dimensionless).
C CONSTS(8) is k1 in component normalised_constants (micromolar_per_second).
C CONSTS(9) is k2 in component normalised_constants (second_order_rate_constant).
C CONSTS(10) is k3 in component normalised_constants (second_order_rate_constant).
C CONSTS(11) is k4 in component normalised_constants (second_order_rate_constant).
C CONSTS(12) is k5 in component normalised_constants (third_order_rate_constant).
C CONSTS(13) is k6 in component normalised_constants (first_order_rate_constant).
C CONSTS(14) is k7 in component normalised_constants (second_order_rate_constant).
C CONSTS(15) is k8 in component normalised_constants (first_order_rate_constant).
C CONSTS(16) is kresp in component normalised_constants (millimolar_per_second).
C CONSTS(17) is kATP in component normalised_constants (millimolar_per_second).
C CONSTS(18) is kANT in component normalised_constants (dimensionless).
C CONSTS(19) is kleak in component normalised_constants (molar_per_millivolt_per_second).
C CONSTS(20) is Keq in component normalised_constants (dimensionless).
C CONSTS(21) is K in component normalised_constants (millimolar).
C CONSTS(22) is alpha in component normalised_constants (per_millivolt).
C CONSTS(23) is b in component normalised_constants (per_millimolar).
C CONSTS(24) is delta_psi_m in component normalised_constants (millivolt).
C CONSTS(25) is R in component normalised_constants (joule_per_mole_kelvin).
C CONSTS(26) is T in component normalised_constants (kelvin).
C CONSTS(27) is F in component normalised_constants (coulomb_per_mole).
C CONSTS(28) is C in component normalised_constants (millimolar_per_millivolt).
C CONSTS(29) is Kapp in component normalised_constants (per_millimolar).
C CONSTS(30) is Pi in component normalised_constants (millimolar).
C RATES(1) is d/dt p in component p (dimensionless).
C RATES(2) is d/dt a in component a (dimensionless).
C RATES(3) is d/dt c in component c (dimensionless).
C RATES(4) is d/dt k in component k (dimensionless).
C RATES(5) is d/dt o in component o (dimensionless).
C RATES(6) is d/dt n in component n (dimensionless).
C RATES(7) is d/dt en in component en (dimensionless).
C RATES(8) is d/dt s in component s (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.154
      STATES(2) = 0.063
      STATES(3) = 0.44
      STATES(4) = 0.225
      STATES(5) = 0.005
      STATES(6) = 0.856
      STATES(7) = 3.536
      STATES(8) = 150.0
      CONSTS(1) = 4.160
      CONSTS(2) = 1.070
      CONSTS(3) = 0.161
      CONSTS(4) = 0.460
      CONSTS(5) = 0.105
      CONSTS(6) = 0.146
      CONSTS(7) = 0.004
      CONSTS(8) = 38
      CONSTS(9) = 152
      CONSTS(10) = 57142
      CONSTS(11) = 53
      CONSTS(12) = 40
      CONSTS(13) = 82361
      CONSTS(14) = 3.2e-3
      CONSTS(15) = 3.6
      CONSTS(16) = 2.5
      CONSTS(17) = 131.9
      CONSTS(18) = 0.1
      CONSTS(19) = 0.426
      CONSTS(20) = 0.3975
      CONSTS(21) = 2
      CONSTS(22) = 0.100
      CONSTS(23) = 0.004
      CONSTS(24) = 150.0
      CONSTS(25) = 8.314
      CONSTS(26) = 298
      CONSTS(27) = 96485
      CONSTS(28) = 6.75e-06
      CONSTS(29) = 4.4e-6
      CONSTS(30) = 2.440
      CONSTS(31) = 1.00000
      CONSTS(32) =  (CONSTS(9)/CONSTS(8))*CONSTS(2)*CONSTS(3)
      CONSTS(33) =  (CONSTS(10)/CONSTS(8))*CONSTS(7)*CONSTS(5)
      CONSTS(34) =  (CONSTS(11)/CONSTS(8))*CONSTS(2)*CONSTS(4)
      CONSTS(35) =  (CONSTS(12)/CONSTS(8))*CONSTS(2)*CONSTS(1)*CONSTS(6)
      CONSTS(36) = CONSTS(6)/( CONSTS(7)*CONSTS(20))
      CONSTS(37) =  (CONSTS(13)/CONSTS(8))*CONSTS(7)
      CONSTS(38) =  (CONSTS(14)/CONSTS(8))*CONSTS(1)*CONSTS(3)
      CONSTS(39) =  (CONSTS(15)/CONSTS(8))*CONSTS(7)
      CONSTS(40) =  (CONSTS(18)/CONSTS(8))*CONSTS(1)
      CONSTS(41) =  (CONSTS(19)/CONSTS(8))*CONSTS(24)
      CONSTS(42) = CONSTS(16)/CONSTS(8)
      CONSTS(43) = CONSTS(21)/CONSTS(2)
      CONSTS(44) =  CONSTS(22)*CONSTS(24)
      CONSTS(45) = CONSTS(17)/CONSTS(8)
      CONSTS(46) =  CONSTS(23)*CONSTS(1)
      CONSTS(47) =  CONSTS(29)*CONSTS(30)
      CONSTS(48) =  3.00000*(( 1.20000*CONSTS(27)*CONSTS(24))/( CONSTS(25)*CONSTS(26)))
      CONSTS(49) = CONSTS(5)/CONSTS(3)
      CONSTS(50) = CONSTS(4)/CONSTS(3)
      CONSTS(51) = CONSTS(6)/CONSTS(3)
      CONSTS(52) = CONSTS(7)/CONSTS(3)
      CONSTS(53) = CONSTS(2)/CONSTS(3)
      CONSTS(54) = CONSTS(1)/CONSTS(3)
      CONSTS(55) =  (CONSTS(24)/CONSTS(3))*CONSTS(28)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  CONSTS(32)*STATES(1)*STATES(6)
      ALGBRC(3) =  CONSTS(33)*STATES(5)*STATES(2)
      RATES(2) = (ALGBRC(2) - ALGBRC(3))/CONSTS(49)
      ALGBRC(4) =  CONSTS(34)*STATES(3)*STATES(6)
      RATES(3) = (ALGBRC(3) - ALGBRC(4))/CONSTS(50)
      ALGBRC(5) =  CONSTS(35)*STATES(4)*STATES(6)*(1.00000 - STATES(7))
      ALGBRC(6) =  CONSTS(37)*(STATES(5) -  CONSTS(36)*STATES(4))
      RATES(4) = ((ALGBRC(4)+ALGBRC(6)) - ALGBRC(5))/CONSTS(51)
      ALGBRC(7) =  CONSTS(38)*STATES(1)*STATES(7)
      RATES(1) = CONSTS(31) - (ALGBRC(2)+ALGBRC(7))
      ALGBRC(8) =  CONSTS(39)*STATES(5)
      RATES(5) = ((ALGBRC(5)+ALGBRC(7)) - (ALGBRC(3)+ALGBRC(8)+ALGBRC(6)))/CONSTS(52)
      ALGBRC(11) =  CONSTS(42)*((1.00000 - STATES(6))/((CONSTS(43)+1.00000) - STATES(6)))*(1.00000/(1.00000+EXP( CONSTS(44)*(STATES(8) - 1.00000))))
      RATES(6) = (ALGBRC(11) - (ALGBRC(2)+ALGBRC(4)+ 2.00000*ALGBRC(5)))/CONSTS(53)
      ALGBRC(12) = CONSTS(47)/(CONSTS(47)+EXP( -1.00000*CONSTS(48)*STATES(8)))
      ALGBRC(13) =  CONSTS(45)*(2.00000/(1.00000+EXP( CONSTS(46)*(STATES(7) -  ALGBRC(12)*STATES(8)))) - 1.00000)
      ALGBRC(9) =  CONSTS(40)*STATES(7)
      RATES(7) = ((ALGBRC(13)+ALGBRC(5)) - (ALGBRC(9)+ALGBRC(7)))/CONSTS(54)
      ALGBRC(10) =  CONSTS(41)*STATES(8)
      RATES(8) = ( 10.0000*ALGBRC(11) - ( 3.00000*ALGBRC(13)+ALGBRC(10)+ALGBRC(9)))/CONSTS(55)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) =  CONSTS(32)*STATES(1)*STATES(6)
      ALGBRC(3) =  CONSTS(33)*STATES(5)*STATES(2)
      ALGBRC(4) =  CONSTS(34)*STATES(3)*STATES(6)
      ALGBRC(5) =  CONSTS(35)*STATES(4)*STATES(6)*(1.00000 - STATES(7))
      ALGBRC(6) =  CONSTS(37)*(STATES(5) -  CONSTS(36)*STATES(4))
      ALGBRC(7) =  CONSTS(38)*STATES(1)*STATES(7)
      ALGBRC(8) =  CONSTS(39)*STATES(5)
      ALGBRC(11) =  CONSTS(42)*((1.00000 - STATES(6))/((CONSTS(43)+1.00000) - STATES(6)))*(1.00000/(1.00000+EXP( CONSTS(44)*(STATES(8) - 1.00000))))
      ALGBRC(12) = CONSTS(47)/(CONSTS(47)+EXP( -1.00000*CONSTS(48)*STATES(8)))
      ALGBRC(13) =  CONSTS(45)*(2.00000/(1.00000+EXP( CONSTS(46)*(STATES(7) -  ALGBRC(12)*STATES(8)))) - 1.00000)
      ALGBRC(9) =  CONSTS(40)*STATES(7)
      ALGBRC(10) =  CONSTS(41)*STATES(8)
CALL minimize(minfunc_0, CONSTS, VARIABLES, ALGBRC(1))
      RETURN
      END
REAL FUNCTION minfunc_0(CONSTS, VARIABLES)
            REAL CONSTS(*), VARIABLES(*) 
      minfunc_0 = abs(VOI -  (CONSTS(8)/CONSTS(3))*ALGBRC(1))
      RETURN
      END