/* There are a total of 0 entries in the algebraic variable array. There are a total of 3 entries in each of the rate and state variable arrays. There are a total of 11 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * STATES[0] is cortisol in component cortisol (mcg_ml). * CONSTANTS[0] is k1 in component cortisol (first_order_rate_constant). * CONSTANTS[1] is k2 in component cortisol (flux). * CONSTANTS[2] is k3 in component cortisol (first_order_rate_constant). * STATES[1] is ACTH in component ACTH (mcg_ml). * CONSTANTS[3] is k4 in component ACTH (first_order_rate_constant). * CONSTANTS[4] is k5 in component ACTH (flux). * CONSTANTS[5] is k6 in component ACTH (first_order_rate_constant). * CONSTANTS[6] is Kd in component ACTH (mcg_ml). * CONSTANTS[7] is Imax in component ACTH (dimensionless). * STATES[2] is CRH in component CRH (mcg_ml). * CONSTANTS[8] is k7 in component CRH (flux). * CONSTANTS[9] is k8 in component CRH (first_order_rate_constant). * CONSTANTS[10] is pulse in component CRH (flux). * RATES[0] is d/dt cortisol in component cortisol (mcg_ml). * RATES[1] is d/dt ACTH in component ACTH (mcg_ml). * RATES[2] is d/dt CRH in component CRH (mcg_ml). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.0; CONSTANTS[0] = 5E5; CONSTANTS[1] = 0.01; CONSTANTS[2] = 0.01; STATES[1] = 0.0; CONSTANTS[3] = 10.0; CONSTANTS[4] = 4E-3; CONSTANTS[5] = 0.035; CONSTANTS[6] = 0.004; CONSTANTS[7] = 0.99; STATES[2] = 50.0; CONSTANTS[8] = 1E-6; CONSTANTS[9] = 0.01; CONSTANTS[10] = 50.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( CONSTANTS[0]*STATES[1]+CONSTANTS[1]) - CONSTANTS[2]*STATES[0]; RATES[1] = ( CONSTANTS[3]*STATES[2]+CONSTANTS[4]) - ( CONSTANTS[5]*STATES[1]+ ( CONSTANTS[3]*STATES[2]+CONSTANTS[4])*(( CONSTANTS[7]*STATES[0])/(CONSTANTS[6]+STATES[0]))); RATES[2] = (CONSTANTS[10]+CONSTANTS[8]) - CONSTANTS[9]*STATES[2]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }