C C There are a total of 14 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 40 entries in the constant variable array. C C C VOI is time in component environment (day). C STATES(1) is OB_p in component OB_p (dimensionless). C CONSTS(1) is D_OB_u in component OB_p (first_order_rate_constant). C CONSTS(2) is pd_OB_p in component OB_p (first_order_rate_constant). C ALGBRC(2) is pi_TGF_beta_act in component TGF_beta (dimensionless). C ALGBRC(3) is pi_TGF_beta_rep in component TGF_beta (dimensionless). C CONSTS(3) is D_OB_p in component model_parameters (first_order_rate_constant). C STATES(2) is OB_a in component OB_a (dimensionless). C CONSTS(4) is A_OB_a in component OB_a (first_order_rate_constant). C CONSTS(5) is pd_OB_a in component OB_a (first_order_rate_constant). C STATES(3) is OC_a in component OC_a (dimensionless). C ALGBRC(1) is D_OC_p in component OC_a (first_order_rate_constant). C CONSTS(6) is A_OC_a in component OC_a (first_order_rate_constant). C CONSTS(7) is pd_OC_a in component OC_a (first_order_rate_constant). C ALGBRC(14) is pi_RANKL_act in component RANKL (dimensionless). C STATES(4) is BV in component BV (dimensionless). C CONSTS(8) is OC_a_initial in component BV (dimensionless). C CONSTS(9) is OB_a_initial in component BV (dimensionless). C CONSTS(10) is k_form in component BV (first_order_rate_constant). C CONSTS(11) is k_res in component BV (first_order_rate_constant). C CONSTS(12) is KD_TGF_repress in component TGF_beta (pM). C CONSTS(13) is KD_TGF_activate in component TGF_beta (pM). C CONSTS(14) is alpha in component TGF_beta (pM). C CONSTS(39) is pi_PTH_act in component PTH (dimensionless). C CONSTS(40) is pi_PTH_rep in component PTH (dimensionless). C CONSTS(15) is beta_PTH in component PTH (flux). C CONSTS(16) is Deg_PTH in component PTH (first_order_rate_constant). C CONSTS(17) is P_PTH_d in component PTH (flux). C CONSTS(36) is PTH_tot in component PTH (pM). C CONSTS(18) is KD_PTH_repress in component PTH (pM). C CONSTS(19) is KD_PTH_activate in component PTH (pM). C ALGBRC(5) is OPG in component OPG (pM). C CONSTS(20) is beta_OPG in component OPG (flux). C CONSTS(21) is beta1_OB_p_OPG in component OPG (dimensionless). C CONSTS(22) is beta2_OB_a_OPG in component OPG (dimensionless). C CONSTS(23) is OPG_max in component OPG (pM). C ALGBRC(4) is OPG_eff in component OPG (flux). C CONSTS(24) is P_OPG_d in component OPG (flux). C CONSTS(25) is Deg_OPG in component OPG (first_order_rate_constant). C ALGBRC(6) is Degr_OPG in component OPG (flux). C ALGBRC(7) is prod_OPG in component OPG (flux). C ALGBRC(10) is RANKL in component RANKL (dimensionless). C CONSTS(26) is K_A2_RANKL in component RANKL (dimensionless). C CONSTS(27) is K_A1_RANKL in component RANKL (dimensionless). C CONSTS(28) is RANK in component RANKL (pM). C ALGBRC(8) is RANKL_eff in component RANKL (pM). C ALGBRC(9) is RANKL_tot in component RANKL (pM). C CONSTS(37) is K_RANKL_OB_p in component RANKL (pM). C CONSTS(38) is K_RANKL_OB_a in component RANKL (pM). C ALGBRC(12) is OPG_RANKL in component RANKL (pM). C CONSTS(29) is R_RANKL in component RANKL (dimensionless). C ALGBRC(11) is RANKL_RANK in component RANKL (pM). C ALGBRC(13) is pd_RANKL in component RANKL (flux). C CONSTS(30) is P_RANKL_d in component RANKL (flux). C CONSTS(31) is R1_OB_p_RANKL in component RANKL (pM). C CONSTS(32) is R2_OB_a_RANKL in component RANKL (pM). C CONSTS(33) is beta_RANKL in component RANKL (flux). C CONSTS(34) is Deg_RANKL in component RANKL (first_order_rate_constant). C CONSTS(35) is KD_RANKL_activate in component RANKL (pM). C RATES(1) is d/dt OB_p in component OB_p (dimensionless). C RATES(2) is d/dt OB_a in component OB_a (dimensionless). C RATES(3) is d/dt OC_a in component OC_a (dimensionless). C RATES(4) is d/dt BV in component BV (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 6.194e-4 CONSTS(1) = 7.000e-4 CONSTS(2) = 0.0 CONSTS(3) = 2.674e-1 STATES(2) = 5.584e-4 CONSTS(4) = 1.890e-1 CONSTS(5) = 0.0 STATES(3) = 8.070e-4 CONSTS(6) = 7.000e-1 CONSTS(7) = 0.0 STATES(4) = 100.0 CONSTS(8) = 1.0 CONSTS(9) = 1.0 CONSTS(10) = 1.571e0 CONSTS(11) = 200.00 CONSTS(12) = 1.416e-3 CONSTS(13) = 4.545e-3 CONSTS(14) = 1.0 CONSTS(15) = 2.500e2 CONSTS(16) = 8.600e1 CONSTS(17) = 0.0 CONSTS(18) = 1.5e2 CONSTS(19) = 2.226e-1 CONSTS(20) = 1.625e8 CONSTS(21) = 0.0 CONSTS(22) = 1.0 CONSTS(23) = 2.000e8 CONSTS(24) = 0.0 CONSTS(25) = 3.500e-1 CONSTS(26) = 3.412e-2 CONSTS(27) = 1.000e-3 CONSTS(28) = 1.000e1 CONSTS(29) = 2.703e6 CONSTS(30) = 0.0 CONSTS(31) = 1.0 CONSTS(32) = 0.0 CONSTS(33) = 1.684e4 CONSTS(34) = 1.013e1 CONSTS(35) = 4.457e0 CONSTS(36) = (CONSTS(15)+CONSTS(17))/CONSTS(16) CONSTS(37) = CONSTS(31)*CONSTS(29) CONSTS(38) = CONSTS(32)*CONSTS(29) CONSTS(39) = CONSTS(36)/(CONSTS(36)+CONSTS(19)) CONSTS(40) = 1.00000/(1.00000+CONSTS(36)/CONSTS(18)) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(4) = CONSTS(10)*(STATES(2) - CONSTS(9)) - CONSTS(11)*(STATES(3) - CONSTS(8)) ALGBRC(2) = ( CONSTS(14)*STATES(3))/(CONSTS(13)+ CONSTS(14)*STATES(3)) ALGBRC(3) = 1.00000/(1.00000+( CONSTS(14)*STATES(3))/CONSTS(12)) RATES(1) = ( CONSTS(1)*ALGBRC(2) - CONSTS(3)*ALGBRC(3)*STATES(1))+CONSTS(2) RATES(2) = ( CONSTS(3)*ALGBRC(3)*STATES(1) - CONSTS(4)*STATES(2))+CONSTS(5) ALGBRC(1) = TERNRY(VOI.GT.0.00000.AND.VOI.LE.100.000, 0.0210000, 0.00210000) ALGBRC(8) = ( CONSTS(37)*STATES(1)+ CONSTS(38)*STATES(2))*CONSTS(39) ALGBRC(4) = ( CONSTS(21)*CONSTS(20)*STATES(1)+ CONSTS(22)*CONSTS(20)*STATES(2))*CONSTS(40) ALGBRC(5) = (CONSTS(24)+ALGBRC(4))/(ALGBRC(4)/CONSTS(23)+CONSTS(25)) ALGBRC(9) = 1.00000+ CONSTS(26)*CONSTS(28)+ CONSTS(27)*ALGBRC(5) ALGBRC(10) = (CONSTS(33)+CONSTS(30))/( ALGBRC(9)*(CONSTS(33)/ALGBRC(8)+CONSTS(34))) ALGBRC(11) = CONSTS(26)*ALGBRC(10)*CONSTS(28) ALGBRC(14) = ALGBRC(11)/(CONSTS(35)+ALGBRC(11)) RATES(3) = ( ALGBRC(1)*ALGBRC(14) - CONSTS(6)*ALGBRC(2)*STATES(3))+CONSTS(7) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(2) = ( CONSTS(14)*STATES(3))/(CONSTS(13)+ CONSTS(14)*STATES(3)) ALGBRC(3) = 1.00000/(1.00000+( CONSTS(14)*STATES(3))/CONSTS(12)) ALGBRC(1) = TERNRY(VOI.GT.0.00000.AND.VOI.LE.100.000, 0.0210000, 0.00210000) ALGBRC(8) = ( CONSTS(37)*STATES(1)+ CONSTS(38)*STATES(2))*CONSTS(39) ALGBRC(4) = ( CONSTS(21)*CONSTS(20)*STATES(1)+ CONSTS(22)*CONSTS(20)*STATES(2))*CONSTS(40) ALGBRC(5) = (CONSTS(24)+ALGBRC(4))/(ALGBRC(4)/CONSTS(23)+CONSTS(25)) ALGBRC(9) = 1.00000+ CONSTS(26)*CONSTS(28)+ CONSTS(27)*ALGBRC(5) ALGBRC(10) = (CONSTS(33)+CONSTS(30))/( ALGBRC(9)*(CONSTS(33)/ALGBRC(8)+CONSTS(34))) ALGBRC(11) = CONSTS(26)*ALGBRC(10)*CONSTS(28) ALGBRC(14) = ALGBRC(11)/(CONSTS(35)+ALGBRC(11)) ALGBRC(6) = CONSTS(25)*ALGBRC(5) ALGBRC(7) = ALGBRC(4)*(1.00000 - ALGBRC(5)/CONSTS(23))+CONSTS(24) ALGBRC(12) = CONSTS(27)*ALGBRC(5)*ALGBRC(10) ALGBRC(13) = ( CONSTS(33)*(1.00000 - ALGBRC(10)*(ALGBRC(9)/ALGBRC(8))) - CONSTS(34)*ALGBRC(10)*ALGBRC(9))+CONSTS(30) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END