C C There are a total of 6 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 17 entries in the constant variable array. C C C VOI is time in component temporalExistence (second). C CONSTS(1) is alphaTF in component Device_TFgenerator (uM_per_second). C CONSTS(15) is JTF in component Device_TFgenerator (uM_per_second). C STATES(1) is TFS in component BioEnv_TFSAssociation (uM). C ALGBRC(6) is Jgain_TF in component BioEnv_TFSAssociation_interface (uM_per_second). C CONSTS(16) is Jgain_TFS in component BioEnv_TFSAssociation_interface (uM_per_second). C ALGBRC(4) is JTF in component Device_PhzMSgenerator (uM_per_second). C STATES(2) is TF in component BioEnv_TFSAssociation (uM). C CONSTS(2) is s in component BioEnv_TFSAssociation (uM). C CONSTS(3) is betaTFS in component BioEnv_TFSAssociation (per_uM_per_second). C CONSTS(4) is kd in component BioEnv_TFSAssociation (per_second). C CONSTS(5) is deltaTFS in component BioEnv_TFSAssociation (per_second). C CONSTS(6) is deltaTF in component BioEnv_TFSAssociation (per_second). C ALGBRC(1) is Jassociation in component BioEnv_TFSAssociation (uM_per_second). C CONSTS(7) is gammaPhzMS in component Device_PhzMSgenerator (uM). C CONSTS(8) is betaPhzMS in component Device_PhzMSgenerator (uM_per_second). C ALGBRC(2) is JPhzMS in component Device_PhzMSgenerator (uM_per_second). C CONSTS(9) is gammaTF in component Device_PhzMSgenerator (uM). C CONSTS(10) is betaTF in component Device_PhzMSgenerator (uM_per_second). C CONSTS(11) is feedbackOn in component Device_PhzMSgenerator (dimensionless). C ALGBRC(5) is Jgain_PhzMS in component BioEnv_PhzMStoPYO_interface (uM_per_second). C CONSTS(17) is Jgain_PYO in component BioEnv_PhzMStoPYO_interface (uM_per_second). C STATES(3) is PhzMS in component BioEnv_PhzMStoPYO (uM). C STATES(4) is PYO in component BioEnv_PhzMStoPYO (uM). C CONSTS(12) is deltaPhzMS in component BioEnv_PhzMStoPYO (per_second). C CONSTS(13) is alphaPYO in component BioEnv_PhzMStoPYO (per_second). C CONSTS(14) is deltaPYO in component BioEnv_PhzMStoPYO (per_second). C ALGBRC(3) is JPYOformation in component BioEnv_PhzMStoPYO (uM_per_second). C RATES(2) is d/dt TF in component BioEnv_TFSAssociation (uM). C RATES(1) is d/dt TFS in component BioEnv_TFSAssociation (uM). C RATES(3) is d/dt PhzMS in component BioEnv_PhzMStoPYO (uM). C RATES(4) is d/dt PYO in component BioEnv_PhzMStoPYO (uM). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.05 STATES(1) = 0 STATES(2) = 8.6207 CONSTS(2) = 5 CONSTS(3) = 1e6 CONSTS(4) = 4e6 CONSTS(5) = 3.851e-4 CONSTS(6) = 5.8e-3 CONSTS(7) = 5 CONSTS(8) = 0.1 CONSTS(9) = 4 CONSTS(10) = 0.07 CONSTS(11) = 1 STATES(3) = 0 STATES(4) = 0 CONSTS(12) = 8.0225e-6 CONSTS(13) = 1.3 CONSTS(14) = 5.8e-1 CONSTS(15) = CONSTS(1) CONSTS(16) = 0.00000 CONSTS(17) = 0.00000 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(3)*CONSTS(2)*STATES(2) - CONSTS(4)*STATES(1) RATES(1) = (ALGBRC(1) - CONSTS(5)*STATES(1))+CONSTS(16) ALGBRC(3) = CONSTS(13)*STATES(3) RATES(4) = (CONSTS(17) - CONSTS(14)*STATES(4))+ALGBRC(3) ALGBRC(2) = ( CONSTS(8)*STATES(1))/(CONSTS(7)+STATES(1)) ALGBRC(5) = ALGBRC(2) RATES(3) = ALGBRC(5) - CONSTS(12)*STATES(3) ALGBRC(4) = TERNRY(CONSTS(11) .NE. 0.00000, ( CONSTS(10)*STATES(1))/(CONSTS(9)+STATES(1)), 0.00000) ALGBRC(6) = CONSTS(15)+ALGBRC(4) RATES(2) = (- ALGBRC(1)+ALGBRC(6)) - CONSTS(6)*STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(3)*CONSTS(2)*STATES(2) - CONSTS(4)*STATES(1) ALGBRC(3) = CONSTS(13)*STATES(3) ALGBRC(2) = ( CONSTS(8)*STATES(1))/(CONSTS(7)+STATES(1)) ALGBRC(5) = ALGBRC(2) ALGBRC(4) = TERNRY(CONSTS(11) .NE. 0.00000, ( CONSTS(10)*STATES(1))/(CONSTS(9)+STATES(1)), 0.00000) ALGBRC(6) = CONSTS(15)+ALGBRC(4) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END