C C There are a total of 3 entries in the algebraic variable array. C There are a total of 13 entries in each of the rate and state variable arrays. C There are a total of 30 entries in the constant variable array. C C C VOI is time in component environment (minute). C STATES(1) is cAMP in component cAMP (nmol_g). C CONSTS(1) is Ko in component cAMP (dimensionless). C CONSTS(2) is Ka in component cAMP (per_nanomolar). C CONSTS(3) is Kb in component cAMP (per_nanomolar). C CONSTS(4) is Kdsm in component cAMP (nmol_g). C CONSTS(5) is Vmsm in component cAMP (flux). C CONSTS(6) is Vdsm in component cAMP (flux). C ALGBRC(1) is ACTH in component cAMP (picomolar). C ALGBRC(2) is IS in component IS (nmol_g). C CONSTS(7) is Crpt in component IS (nmol_g). C CONSTS(8) is K in component IS (dimensionless). C CONSTS(9) is Kd in component IS (nmol_g). C CONSTS(10) is n in component IS (dimensionless). C STATES(2) is V in component V (flux). C CONSTS(11) is P in component V (minute_2). C CONSTS(12) is Q in component V (first_order_rate_constant). C STATES(3) is W in component W (flux). C CONSTS(13) is T in component W (nmol2_min2_g2). C CONSTS(14) is U in component W (first_order_rate_constant). C STATES(4) is CHOC in component CHOC (nmol_g). C CONSTS(15) is Lmtr in component model_parameters (first_order_rate_constant). C STATES(5) is Kmtr in component Kmtr (first_order_rate_constant). C STATES(6) is CHOM in component CHOM (nmol_g). C CONSTS(16) is Kbac in component model_parameters (first_order_rate_constant). C STATES(7) is Kfor in component Kfor (first_order_rate_constant). C CONSTS(17) is Kcb in component model_parameters (first_order_rate_constant). C CONSTS(18) is Kcf in component model_parameters (first_order_rate_constant). C STATES(8) is CHON in component CHON (nmol_g). C STATES(9) is CHOL in component CHOL (nmol_g). C CONSTS(19) is C in component Kmtr (g_nmol_min2). C CONSTS(20) is D in component Kmtr (first_order_rate_constant). C CONSTS(21) is R in component Kfor (g_nmol_min2). C CONSTS(22) is S in component Kfor (first_order_rate_constant). C CONSTS(23) is Vm in component model_parameters (flux). C CONSTS(24) is Km in component model_parameters (nmol_g). C STATES(10) is PREG in component PREG (nmol_g). C CONSTS(25) is Vmptr in component model_parameters (flux). C CONSTS(26) is Kmptr in component model_parameters (nmol_g). C STATES(11) is PRO in component PRO (nmol_g). C CONSTS(27) is HA in component PRO (dimensionless). C CONSTS(28) is AH in component model_parameters (first_order_rate_constant). C STATES(12) is HYPR in component HYPR (nmol_g). C CONSTS(29) is HY in component model_parameters (first_order_rate_constant). C STATES(13) is CORT in component CORT (nmol_g). C CONSTS(30) is LH in component CORT (first_order_rate_constant). C ALGBRC(3) is LH_CORT in component CORT (flux). C RATES(1) is d/dt cAMP in component cAMP (nmol_g). C RATES(2) is d/dt V in component V (flux). C RATES(3) is d/dt W in component W (flux). C RATES(4) is d/dt CHOC in component CHOC (nmol_g). C RATES(6) is d/dt CHOM in component CHOM (nmol_g). C RATES(9) is d/dt CHOL in component CHOL (nmol_g). C RATES(5) is d/dt Kmtr in component Kmtr (first_order_rate_constant). C RATES(7) is d/dt Kfor in component Kfor (first_order_rate_constant). C RATES(8) is d/dt CHON in component CHON (nmol_g). C RATES(10) is d/dt PREG in component PREG (nmol_g). C RATES(11) is d/dt PRO in component PRO (nmol_g). C RATES(12) is d/dt HYPR in component HYPR (nmol_g). C RATES(13) is d/dt CORT in component CORT (nmol_g). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.95 CONSTS(1) = 0.013 CONSTS(2) = 0.01 CONSTS(3) = 1000.0 CONSTS(4) = 10.0 CONSTS(5) = 6.0 CONSTS(6) = 10.0 CONSTS(7) = 3.0 CONSTS(8) = 80.0 CONSTS(9) = 2.11 CONSTS(10) = 4.0 STATES(2) = 11.3 CONSTS(11) = 0.052 CONSTS(12) = 0.042 STATES(3) = 10.0 CONSTS(13) = 8.0 CONSTS(14) = 0.0015 STATES(4) = 532.0 CONSTS(15) = 1.65 STATES(5) = 0.446 STATES(6) = 11.3 CONSTS(16) = 10.0 STATES(7) = 0.370 CONSTS(17) = 0.01 CONSTS(18) = 0.00033 STATES(8) = 3.03 STATES(9) = 3000.0 CONSTS(19) = 6.25 CONSTS(20) = 125.0 CONSTS(21) = 3.0 CONSTS(22) = 76.0 CONSTS(23) = 1890.0 CONSTS(24) = 270.0 STATES(10) = 6.56 CONSTS(25) = 500.0 CONSTS(26) = 150.0 STATES(11) = 0.64 CONSTS(27) = 0.5 CONSTS(28) = 16.4 STATES(12) = 0.64 CONSTS(29) = 16.4 STATES(13) = 5.2 CONSTS(30) = 0.724 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(3) = CONSTS(13)*STATES(4) ** -1.00000 - CONSTS(14)*STATES(3) RATES(4) = (STATES(2)+STATES(3)+ CONSTS(15)*STATES(6)) - STATES(5)*STATES(4) RATES(6) = ( STATES(5)*STATES(4)+ CONSTS(16)*STATES(8)+ CONSTS(18)*STATES(9)) - ( CONSTS(15)*STATES(6)+ CONSTS(17)*STATES(6)+ STATES(7)*STATES(6)) RATES(9) = CONSTS(17)*STATES(6) - CONSTS(18)*STATES(9) RATES(8) = STATES(7)*STATES(6) - ( CONSTS(16)*STATES(8)+( CONSTS(23)*STATES(8))/(CONSTS(24)+STATES(8))) RATES(10) = ( CONSTS(23)*STATES(8))/(CONSTS(24)+STATES(8)) - ( CONSTS(25)*STATES(10))/(CONSTS(26)+STATES(10)) RATES(11) = CONSTS(27)*(( CONSTS(25)*STATES(10))/(CONSTS(26)+STATES(10))) - CONSTS(28)*STATES(11) RATES(12) = CONSTS(28)*STATES(11) - CONSTS(29)*STATES(12) RATES(13) = CONSTS(29)*STATES(12) - CONSTS(30)*STATES(13) ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.10.0000, 12.0000, TERNRY(VOI.GE.10.0000.AND.VOI.LT.20.0000, 16.0000, TERNRY(VOI.GE.20.0000.AND.VOI.LT.35.0000, 12.0000, TERNRY(VOI.GE.35.0000.AND.VOI.LT.45.0000, 16.0000, 12.0000) RATES(1) = ( CONSTS(5)*CONSTS(1)*(1.00000+ CONSTS(3)*ALGBRC(1)))/((1.00000+ CONSTS(2)*ALGBRC(1))+ CONSTS(1)*(1.00000+ CONSTS(3)*ALGBRC(1))) - ( CONSTS(6)*STATES(1))/(CONSTS(4)+STATES(1)) ALGBRC(2) = ( CONSTS(8)*CONSTS(7)*STATES(1) ** CONSTS(10))/(CONSTS(9) ** CONSTS(10)+STATES(1) ** CONSTS(10)) RATES(2) = CONSTS(11)*ALGBRC(2) - CONSTS(12)*STATES(2) RATES(5) = CONSTS(19)*ALGBRC(2) - CONSTS(20)*STATES(5) RATES(7) = CONSTS(21)*ALGBRC(2) - CONSTS(22)*STATES(7) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.10.0000, 12.0000, TERNRY(VOI.GE.10.0000.AND.VOI.LT.20.0000, 16.0000, TERNRY(VOI.GE.20.0000.AND.VOI.LT.35.0000, 12.0000, TERNRY(VOI.GE.35.0000.AND.VOI.LT.45.0000, 16.0000, 12.0000) ALGBRC(2) = ( CONSTS(8)*CONSTS(7)*STATES(1) ** CONSTS(10))/(CONSTS(9) ** CONSTS(10)+STATES(1) ** CONSTS(10)) ALGBRC(3) = CONSTS(30)*STATES(13) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END