C C There are a total of 16 entries in the algebraic variable array. C There are a total of 9 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 VOI is time in component environment (hour). C STATES(1) is A in component A (molecules). C ALGBRC(1) is RXN1 in component RXN1 (flux). C ALGBRC(2) is RXN2 in component RXN2 (flux). C ALGBRC(5) is RXN5 in component RXN5 (flux). C ALGBRC(11) is RXN11 in component RXN11 (flux). C ALGBRC(6) is RXN6 in component RXN6 (flux). C ALGBRC(10) is RXN10 in component RXN10 (flux). C ALGBRC(12) is RXN12 in component RXN12 (flux). C STATES(2) is C in component C (molecules). C ALGBRC(3) is RXN3 in component RXN3 (flux). C STATES(3) is DA in component DA (molecules). C ALGBRC(7) is RXN7 in component RXN7 (flux). C STATES(4) is DAp in component DAp (molecules). C ALGBRC(8) is RXN8 in component RXN8 (flux). C STATES(5) is DR in component DR (molecules). C ALGBRC(13) is RXN13 in component RXN13 (flux). C STATES(6) is DRP in component DRP (molecules). C ALGBRC(14) is RXN14 in component RXN14 (flux). C STATES(7) is MA in component MA (molecules). C ALGBRC(9) is RXN9 in component RXN9 (flux). C STATES(8) is MR in component MR (molecules). C ALGBRC(15) is RXN15 in component RXN15 (flux). C ALGBRC(16) is RXN16 in component RXN16 (flux). C STATES(9) is R in component R (molecules). C ALGBRC(4) is RXN4 in component RXN4 (flux). C CONSTS(1) is Gamma_1 in component RXN1 (second_order_rate). C CONSTS(2) is Delta_1 in component RXN2 (first_order_rate). C CONSTS(3) is Delta_2 in component RXN3 (first_order_rate). C CONSTS(4) is Delta_3 in component RXN4 (first_order_rate). C CONSTS(5) is Gamma_2 in component RXN5 (second_order_rate). C CONSTS(6) is Thetha_1 in component RXN6 (first_order_rate). C CONSTS(7) is Alpha_1 in component RXN7 (first_order_rate). C CONSTS(8) is Alpha_2 in component RXN8 (first_order_rate). C CONSTS(9) is Delta_4 in component RXN9 (first_order_rate). C CONSTS(10) is BetaA_1 in component RXN10 (first_order_rate). C CONSTS(11) is Gamma_3 in component RXN11 (second_order_rate). C CONSTS(12) is Theta_2 in component RXN12 (first_order_rate). C CONSTS(13) is Alpha_3 in component RXN13 (first_order_rate). C CONSTS(14) is Alpha_4 in component RXN14 (first_order_rate). C CONSTS(15) is Delta_5 in component RXN15 (first_order_rate). C CONSTS(16) is BetaR_1 in component RXN16 (first_order_rate). C RATES(1) is d/dt A in component A (molecules). C RATES(2) is d/dt C in component C (molecules). C RATES(3) is d/dt DA in component DA (molecules). C RATES(4) is d/dt DAp in component DAp (molecules). C RATES(5) is d/dt DR in component DR (molecules). C RATES(6) is d/dt DRP in component DRP (molecules). C RATES(7) is d/dt MA in component MA (molecules). C RATES(8) is d/dt MR in component MR (molecules). C RATES(9) is d/dt R in component R (molecules). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.0 STATES(2) = 0.0 STATES(3) = 1 STATES(4) = 0.0 STATES(5) = 1 STATES(6) = 1 STATES(7) = 0.0 STATES(8) = 0.0 STATES(9) = 0.0 CONSTS(1) = 2 CONSTS(2) = 1 CONSTS(3) = 1 CONSTS(4) = 0.2 CONSTS(5) = 1 CONSTS(6) = 50 CONSTS(7) = 50 CONSTS(8) = 500 CONSTS(9) = 10 CONSTS(10) = 50 CONSTS(11) = 1 CONSTS(12) = 100 CONSTS(13) = 0.01 CONSTS(14) = 50 CONSTS(15) = 0.5 CONSTS(16) = 5 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(1)*STATES(9)*CONSTS(1) ALGBRC(3) = STATES(2)*CONSTS(3) RATES(2) = (1.00000/1.00000)*( - 1.00000*ALGBRC(3)+ALGBRC(1)) ALGBRC(5) = STATES(1)*STATES(3)*CONSTS(5) ALGBRC(6) = STATES(4)*CONSTS(6) ALGBRC(7) = STATES(3)*CONSTS(7) RATES(3) = (1.00000/1.00000)*( -1.00000*ALGBRC(5)+ -1.00000*ALGBRC(7)+ALGBRC(6)+ALGBRC(7)) ALGBRC(8) = STATES(4)*CONSTS(8) RATES(4) = (1.00000/1.00000)*( -1.00000*ALGBRC(6)+ -1.00000*ALGBRC(8)+ALGBRC(5)+ALGBRC(8)) ALGBRC(10) = STATES(7)*CONSTS(10) ALGBRC(9) = STATES(7)*CONSTS(9) RATES(7) = (1.00000/1.00000)*( -1.00000*ALGBRC(9)+ -1.00000*ALGBRC(10)+ALGBRC(7)+ALGBRC(8)+ALGBRC(10)) ALGBRC(2) = STATES(1)*CONSTS(2) ALGBRC(11) = STATES(1)*STATES(5)*CONSTS(11) ALGBRC(12) = STATES(6)*CONSTS(12) RATES(1) = (1.00000/1.00000)*( - 1.00000*ALGBRC(1)+ - 1.00000*ALGBRC(2)+ - 1.00000*ALGBRC(5)+ - 1.00000*ALGBRC(11)+ALGBRC(6)+ALGBRC(10)+ALGBRC(12)) ALGBRC(13) = STATES(5)*CONSTS(13) RATES(5) = (1.00000/1.00000)*( -1.00000*ALGBRC(11)+ -1.00000*ALGBRC(13)+ALGBRC(12)+ALGBRC(13)) ALGBRC(14) = STATES(6)*CONSTS(14) RATES(6) = (1.00000/1.00000)*( -1.00000*ALGBRC(12)+ -1.00000*ALGBRC(14)+ALGBRC(11)+ALGBRC(14)) ALGBRC(15) = STATES(8)*CONSTS(15) ALGBRC(16) = STATES(8)*CONSTS(16) RATES(8) = (1.00000/1.00000)*( -1.00000*ALGBRC(15)+ -1.00000*ALGBRC(16)+ALGBRC(13)+ALGBRC(14)+ALGBRC(16)) ALGBRC(4) = STATES(9)*CONSTS(4) RATES(9) = (1.00000/1.00000)*( -1.00000*ALGBRC(1)+ -1.00000*ALGBRC(4)+ALGBRC(3)+ALGBRC(16)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(1)*STATES(9)*CONSTS(1) ALGBRC(3) = STATES(2)*CONSTS(3) ALGBRC(5) = STATES(1)*STATES(3)*CONSTS(5) ALGBRC(6) = STATES(4)*CONSTS(6) ALGBRC(7) = STATES(3)*CONSTS(7) ALGBRC(8) = STATES(4)*CONSTS(8) ALGBRC(10) = STATES(7)*CONSTS(10) ALGBRC(9) = STATES(7)*CONSTS(9) ALGBRC(2) = STATES(1)*CONSTS(2) ALGBRC(11) = STATES(1)*STATES(5)*CONSTS(11) ALGBRC(12) = STATES(6)*CONSTS(12) ALGBRC(13) = STATES(5)*CONSTS(13) ALGBRC(14) = STATES(6)*CONSTS(14) ALGBRC(15) = STATES(8)*CONSTS(15) ALGBRC(16) = STATES(8)*CONSTS(16) ALGBRC(4) = STATES(9)*CONSTS(4) RETURN END