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 26 entries in the algebraic variable array.
C There are a total of 17 entries in each of the rate and state variable arrays.
C There are a total of 49 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is A in component differentials (molar).
C STATES(2) is G in component differentials (molar).
C STATES(3) is GA in component differentials (molar).
C STATES(4) is T in component differentials (molar).
C STATES(5) is R in component differentials (molar).
C STATES(6) is GT in component differentials (molar).
C STATES(7) is GD in component differentials (molar).
C STATES(8) is Pi_ in component differentials (molar).
C STATES(9) is D in component differentials (molar).
C STATES(10) is RG in component differentials (molar).
C STATES(11) is RGT in component differentials (molar).
C STATES(12) is GAT in component differentials (molar).
C STATES(13) is GAD in component differentials (molar).
C STATES(14) is RGD in component differentials (molar).
C STATES(15) is RGA in component differentials (molar).
C STATES(16) is RGAT in component differentials (molar).
C STATES(17) is RGAD in component differentials (molar).
C ALGBRC(1) is A1 in component A1 (molar_per_second).
C ALGBRC(10) is A2 in component A2 (molar_per_second).
C ALGBRC(11) is A3 in component A3 (molar_per_second).
C ALGBRC(18) is A4 in component A4 (molar_per_second).
C ALGBRC(22) is A5 in component A5 (molar_per_second).
C ALGBRC(24) is A6 in component A6 (molar_per_second).
C ALGBRC(5) is R1 in component R1 (molar_per_second).
C ALGBRC(9) is R2 in component R2 (molar_per_second).
C ALGBRC(12) is R3 in component R3 (molar_per_second).
C ALGBRC(19) is R4 in component R4 (molar_per_second).
C ALGBRC(21) is R5 in component R5 (molar_per_second).
C ALGBRC(25) is R6 in component R6 (molar_per_second).
C ALGBRC(4) is T1 in component T1 (molar_per_second).
C ALGBRC(15) is T2 in component T2 (molar_per_second).
C ALGBRC(8) is T3 in component T3 (molar_per_second).
C ALGBRC(20) is T4 in component T4 (molar_per_second).
C ALGBRC(6) is P1 in component P1 (molar_per_second).
C ALGBRC(16) is P2 in component P2 (molar_per_second).
C ALGBRC(13) is P3 in component P3 (molar_per_second).
C ALGBRC(23) is P4 in component P4 (molar_per_second).
C ALGBRC(7) is D1 in component D1 (molar_per_second).
C ALGBRC(17) is D2 in component D2 (molar_per_second).
C ALGBRC(14) is D3 in component D3 (molar_per_second).
C ALGBRC(26) is D4 in component D4 (molar_per_second).
C ALGBRC(2) is Z in component output (dimensionless).
C ALGBRC(3) is v in component output (per_second).
C CONSTS(1) is G_tot in component output (molar).
C CONSTS(2) is k1 in component P1 (per_second).
C CONSTS(3) is k1 in component P2 (per_second).
C CONSTS(4) is k1 in component P3 (per_second).
C CONSTS(5) is k1 in component P4 (per_second).
C CONSTS(6) is k1 in component A1 (per_molar_per_second).
C CONSTS(7) is k2 in component A1 (per_second).
C CONSTS(8) is k1 in component T1 (per_molar_per_second).
C CONSTS(9) is k2 in component T1 (per_second).
C CONSTS(10) is k1 in component R1 (per_molar_per_second).
C CONSTS(11) is k2 in component R1 (per_second).
C CONSTS(12) is k2 in component P1 (per_molar_per_second).
C CONSTS(13) is k1 in component D1 (per_second).
C CONSTS(14) is k2 in component D1 (per_molar_per_second).
C CONSTS(15) is k1 in component T3 (per_molar_per_second).
C CONSTS(16) is k2 in component T3 (per_second).
C CONSTS(17) is k1 in component R2 (per_molar_per_second).
C CONSTS(18) is k2 in component R2 (per_second).
C CONSTS(19) is k1 in component A2 (per_molar_per_second).
C CONSTS(20) is k2 in component A2 (per_second).
C CONSTS(21) is k1 in component A3 (per_molar_per_second).
C CONSTS(22) is k2 in component A3 (per_second).
C CONSTS(23) is k1 in component R3 (per_molar_per_second).
C CONSTS(24) is k2 in component R3 (per_second).
C CONSTS(25) is k2 in component P3 (per_molar_per_second).
C CONSTS(26) is k1 in component D3 (per_second).
C CONSTS(27) is k2 in component D3 (per_molar_per_second).
C CONSTS(28) is k1 in component T2 (per_molar_per_second).
C CONSTS(29) is k2 in component T2 (per_second).
C CONSTS(30) is k2 in component P2 (per_molar_per_second).
C CONSTS(31) is k1 in component D2 (per_second).
C CONSTS(32) is k2 in component D2 (per_molar_per_second).
C CONSTS(33) is k1 in component A4 (per_molar_per_second).
C CONSTS(34) is k2 in component A4 (per_second).
C CONSTS(35) is k1 in component R4 (per_molar_per_second).
C CONSTS(36) is k2 in component R4 (per_second).
C CONSTS(37) is k1 in component T4 (per_molar_per_second).
C CONSTS(38) is k2 in component T4 (per_second).
C CONSTS(39) is k1 in component R5 (per_molar_per_second).
C CONSTS(40) is k2 in component R5 (per_second).
C CONSTS(41) is k1 in component A5 (per_molar_per_second).
C CONSTS(42) is k2 in component A5 (per_second).
C CONSTS(43) is k2 in component P4 (per_molar_per_second).
C CONSTS(44) is k1 in component A6 (per_molar_per_second).
C CONSTS(45) is k2 in component A6 (per_second).
C CONSTS(46) is k1 in component R6 (per_molar_per_second).
C CONSTS(47) is k2 in component R6 (per_second).
C CONSTS(48) is k1 in component D4 (per_second).
C CONSTS(49) is k2 in component D4 (per_molar_per_second).
C RATES(1) is d/dt A in component differentials (molar).
C RATES(2) is d/dt G in component differentials (molar).
C RATES(3) is d/dt GA in component differentials (molar).
C RATES(4) is d/dt T in component differentials (molar).
C RATES(5) is d/dt R in component differentials (molar).
C RATES(6) is d/dt GT in component differentials (molar).
C RATES(7) is d/dt GD in component differentials (molar).
C RATES(8) is d/dt Pi_ in component differentials (molar).
C RATES(9) is d/dt D in component differentials (molar).
C RATES(10) is d/dt RG in component differentials (molar).
C RATES(11) is d/dt RGT in component differentials (molar).
C RATES(12) is d/dt GAT in component differentials (molar).
C RATES(13) is d/dt GAD in component differentials (molar).
C RATES(14) is d/dt RGD in component differentials (molar).
C RATES(15) is d/dt RGA in component differentials (molar).
C RATES(16) is d/dt RGAT in component differentials (molar).
C RATES(17) is d/dt RGAD in component differentials (molar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0
      STATES(2) = 0
      STATES(3) = 0
      STATES(4) = 0.000468
      STATES(5) = 1e-6
      STATES(6) = 0
      STATES(7) = 1e-8
      STATES(8) = 0.0044
      STATES(9) = 0.000149
      STATES(10) = 0
      STATES(11) = 0
      STATES(12) = 0
      STATES(13) = 0
      STATES(14) = 0
      STATES(15) = 0
      STATES(16) = 0
      STATES(17) = 0
      CONSTS(1) = 1e-8
      CONSTS(2) = 0.013
      CONSTS(3) = 25
      CONSTS(4) = 0.013
      CONSTS(5) = 25
      CONSTS(6) = 8780000
      CONSTS(7) = 8
      CONSTS(8) = 529000
      CONSTS(9) = 8.38e-6
      CONSTS(10) = 636000000
      CONSTS(11) = 0.0179
      CONSTS(12) = 9.03e-7
      CONSTS(13) = 0.0001
      CONSTS(14) = 62.3
      CONSTS(15) = 853000
      CONSTS(16) = 0.00468
      CONSTS(17) = 132000000
      CONSTS(18) = 1.28
      CONSTS(19) = 386000
      CONSTS(20) = 0.0408
      CONSTS(21) = 64100
      CONSTS(22) = 0.95
      CONSTS(23) = 94700000
      CONSTS(24) = 0.00227
      CONSTS(25) = 2.22e-9
      CONSTS(26) = 2
      CONSTS(27) = 1470000
      CONSTS(28) = 44700
      CONSTS(29) = 8.32e-8
      CONSTS(30) = 0.244
      CONSTS(31) = 0.0001
      CONSTS(32) = 3.83
      CONSTS(33) = 74300
      CONSTS(34) = 0.00572
      CONSTS(35) = 22800000
      CONSTS(36) = 5.43e-5
      CONSTS(37) = 1620000
      CONSTS(38) = 0.00875
      CONSTS(39) = 6200000
      CONSTS(40) = 0.0433
      CONSTS(41) = 6300000
      CONSTS(42) = 0.478
      CONSTS(43) = 0.00297
      CONSTS(44) = 13000
      CONSTS(45) = 0.685
      CONSTS(46) = 49400000
      CONSTS(47) = 0.00421
      CONSTS(48) = 2.75
      CONSTS(49) = 2940
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(6)*STATES(2)*STATES(1) -  CONSTS(7)*STATES(3)
      ALGBRC(5) =  CONSTS(10)*STATES(2)*STATES(5) -  CONSTS(11)*STATES(10)
      ALGBRC(4) =  CONSTS(8)*STATES(2)*STATES(4) -  CONSTS(9)*STATES(6)
      ALGBRC(7) =  CONSTS(13)*STATES(7) -  CONSTS(14)*STATES(2)*STATES(9)
      RATES(2) = ALGBRC(7) - (ALGBRC(1)+ALGBRC(4)+ALGBRC(5))
      ALGBRC(10) =  CONSTS(19)*STATES(6)*STATES(1) -  CONSTS(20)*STATES(12)
      ALGBRC(9) =  CONSTS(17)*STATES(6)*STATES(5) -  CONSTS(18)*STATES(11)
      ALGBRC(6) =  CONSTS(2)*STATES(6) -  CONSTS(12)*STATES(7)*STATES(8)
      RATES(6) = ((ALGBRC(4) - ALGBRC(6)) - ALGBRC(9)) - ALGBRC(10)
      ALGBRC(11) =  CONSTS(21)*STATES(7)*STATES(1) -  CONSTS(22)*STATES(13)
      ALGBRC(12) =  CONSTS(23)*STATES(7)*STATES(5) -  CONSTS(24)*STATES(14)
      RATES(7) = ((ALGBRC(6) - ALGBRC(7)) - ALGBRC(11)) - ALGBRC(12)
      ALGBRC(18) =  CONSTS(33)*STATES(10)*STATES(1) -  CONSTS(34)*STATES(15)
      ALGBRC(8) =  CONSTS(15)*STATES(10)*STATES(4) -  CONSTS(16)*STATES(11)
      ALGBRC(14) =  CONSTS(26)*STATES(14) -  CONSTS(27)*STATES(10)*STATES(9)
      RATES(10) = ((ALGBRC(5) - ALGBRC(8))+ALGBRC(14)) - ALGBRC(18)
      ALGBRC(19) =  CONSTS(35)*STATES(3)*STATES(5) -  CONSTS(36)*STATES(15)
      ALGBRC(15) =  CONSTS(28)*STATES(3)*STATES(4) -  CONSTS(29)*STATES(12)
      ALGBRC(17) =  CONSTS(31)*STATES(13) -  CONSTS(32)*STATES(3)*STATES(9)
      RATES(3) = ((ALGBRC(1) - ALGBRC(15))+ALGBRC(17)) - ALGBRC(19)
      ALGBRC(20) =  CONSTS(37)*STATES(15)*STATES(4) -  CONSTS(38)*STATES(16)
      RATES(4) = - (ALGBRC(4)+ALGBRC(8)+ALGBRC(15)+ALGBRC(20))
      ALGBRC(21) =  CONSTS(39)*STATES(12)*STATES(5) -  CONSTS(40)*STATES(16)
      ALGBRC(16) =  CONSTS(3)*STATES(12) -  CONSTS(30)*STATES(13)*STATES(8)
      RATES(12) = ((ALGBRC(10)+ALGBRC(15)) - ALGBRC(16)) - ALGBRC(21)
      ALGBRC(22) =  CONSTS(41)*STATES(11)*STATES(1) -  CONSTS(42)*STATES(16)
      ALGBRC(13) =  CONSTS(4)*STATES(11) -  CONSTS(25)*STATES(14)*STATES(8)
      RATES(11) = ((ALGBRC(8)+ALGBRC(9)) - ALGBRC(13)) - ALGBRC(22)
      ALGBRC(23) =  CONSTS(5)*STATES(16) -  CONSTS(43)*STATES(17)*STATES(8)
      RATES(8) = ALGBRC(6)+ALGBRC(13)+ALGBRC(16)+ALGBRC(23)
      RATES(16) = (ALGBRC(20)+ALGBRC(21)+ALGBRC(22)) - ALGBRC(23)
      ALGBRC(24) =  CONSTS(44)*STATES(14)*STATES(1) -  CONSTS(45)*STATES(17)
      RATES(1) = - (ALGBRC(1)+ALGBRC(10)+ALGBRC(11)+ALGBRC(18)+ALGBRC(22)+ALGBRC(24))
      RATES(14) = ((ALGBRC(12)+ALGBRC(13)) - ALGBRC(14)) - ALGBRC(24)
      ALGBRC(25) =  CONSTS(46)*STATES(13)*STATES(5) -  CONSTS(47)*STATES(17)
      RATES(5) = - (ALGBRC(5)+ALGBRC(9)+ALGBRC(12)+ALGBRC(19)+ALGBRC(21)+ALGBRC(25))
      RATES(13) = ((ALGBRC(11)+ALGBRC(16)) - ALGBRC(17)) - ALGBRC(25)
      ALGBRC(26) =  CONSTS(48)*STATES(17) -  CONSTS(49)*STATES(15)*STATES(9)
      RATES(9) = ALGBRC(7)+ALGBRC(14)+ALGBRC(17)+ALGBRC(26)
      RATES(15) = ((ALGBRC(18)+ALGBRC(19)) - ALGBRC(20))+ALGBRC(26)
      RATES(17) = (ALGBRC(23)+ALGBRC(24)+ALGBRC(25)) - ALGBRC(26)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(6)*STATES(2)*STATES(1) -  CONSTS(7)*STATES(3)
      ALGBRC(5) =  CONSTS(10)*STATES(2)*STATES(5) -  CONSTS(11)*STATES(10)
      ALGBRC(4) =  CONSTS(8)*STATES(2)*STATES(4) -  CONSTS(9)*STATES(6)
      ALGBRC(7) =  CONSTS(13)*STATES(7) -  CONSTS(14)*STATES(2)*STATES(9)
      ALGBRC(10) =  CONSTS(19)*STATES(6)*STATES(1) -  CONSTS(20)*STATES(12)
      ALGBRC(9) =  CONSTS(17)*STATES(6)*STATES(5) -  CONSTS(18)*STATES(11)
      ALGBRC(6) =  CONSTS(2)*STATES(6) -  CONSTS(12)*STATES(7)*STATES(8)
      ALGBRC(11) =  CONSTS(21)*STATES(7)*STATES(1) -  CONSTS(22)*STATES(13)
      ALGBRC(12) =  CONSTS(23)*STATES(7)*STATES(5) -  CONSTS(24)*STATES(14)
      ALGBRC(18) =  CONSTS(33)*STATES(10)*STATES(1) -  CONSTS(34)*STATES(15)
      ALGBRC(8) =  CONSTS(15)*STATES(10)*STATES(4) -  CONSTS(16)*STATES(11)
      ALGBRC(14) =  CONSTS(26)*STATES(14) -  CONSTS(27)*STATES(10)*STATES(9)
      ALGBRC(19) =  CONSTS(35)*STATES(3)*STATES(5) -  CONSTS(36)*STATES(15)
      ALGBRC(15) =  CONSTS(28)*STATES(3)*STATES(4) -  CONSTS(29)*STATES(12)
      ALGBRC(17) =  CONSTS(31)*STATES(13) -  CONSTS(32)*STATES(3)*STATES(9)
      ALGBRC(20) =  CONSTS(37)*STATES(15)*STATES(4) -  CONSTS(38)*STATES(16)
      ALGBRC(21) =  CONSTS(39)*STATES(12)*STATES(5) -  CONSTS(40)*STATES(16)
      ALGBRC(16) =  CONSTS(3)*STATES(12) -  CONSTS(30)*STATES(13)*STATES(8)
      ALGBRC(22) =  CONSTS(41)*STATES(11)*STATES(1) -  CONSTS(42)*STATES(16)
      ALGBRC(13) =  CONSTS(4)*STATES(11) -  CONSTS(25)*STATES(14)*STATES(8)
      ALGBRC(23) =  CONSTS(5)*STATES(16) -  CONSTS(43)*STATES(17)*STATES(8)
      ALGBRC(24) =  CONSTS(44)*STATES(14)*STATES(1) -  CONSTS(45)*STATES(17)
      ALGBRC(25) =  CONSTS(46)*STATES(13)*STATES(5) -  CONSTS(47)*STATES(17)
      ALGBRC(26) =  CONSTS(48)*STATES(17) -  CONSTS(49)*STATES(15)*STATES(9)
      ALGBRC(2) = (STATES(6)+STATES(11)+STATES(16)+STATES(12))/CONSTS(1)
      ALGBRC(3) = ( CONSTS(5)*STATES(16)+ CONSTS(3)*STATES(12)+ CONSTS(4)*STATES(11)+ CONSTS(2)*STATES(6))/CONSTS(1)
      RETURN
      END