/* There are a total of 0 entries in the algebraic variable array. There are a total of 4 entries in each of the rate and state variable arrays. There are a total of 13 entries in the constant variable array. */ /* * VOI is time in component environment (day). * STATES[0] is A in component A (dimensionless). * CONSTANTS[0] is v in component A (first_order_rate_constant). * CONSTANTS[1] is k in component A (dimensionless). * CONSTANTS[2] is f in component A (dimensionless). * CONSTANTS[3] is sigma1 in component A (first_order_rate_constant). * CONSTANTS[4] is b1 in component A (first_order_rate_constant). * CONSTANTS[5] is muA in component A (first_order_rate_constant). * STATES[1] is G in component G (dimensionless). * STATES[2] is R in component R (dimensionless). * CONSTANTS[6] is pi1 in component R (first_order_rate_constant). * CONSTANTS[7] is beta in component R (first_order_rate_constant). * CONSTANTS[8] is muR in component R (first_order_rate_constant). * STATES[3] is E in component E (dimensionless). * CONSTANTS[9] is lambdaE in component E (first_order_rate_constant). * CONSTANTS[10] is muE in component E (first_order_rate_constant). * CONSTANTS[11] is gamma in component G (first_order_rate_constant). * CONSTANTS[12] is muG in component G (first_order_rate_constant). * RATES[0] is d/dt A in component A (dimensionless). * RATES[2] is d/dt R in component R (dimensionless). * RATES[3] is d/dt E in component E (dimensionless). * RATES[1] is d/dt G in component G (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 1.0; CONSTANTS[0] = 1.25e5; CONSTANTS[1] = 5e7; CONSTANTS[2] = 1e-4; CONSTANTS[3] = 3e-6; CONSTANTS[4] = 0.25; CONSTANTS[5] = 0.25; STATES[1] = 1e8; STATES[2] = 0.0; CONSTANTS[6] = 0.016; CONSTANTS[7] = 200.0; CONSTANTS[8] = 0.25; STATES[3] = 0.0; CONSTANTS[9] = 1000.0; CONSTANTS[10] = 0.25; CONSTANTS[11] = 2000.0; CONSTANTS[12] = 5.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( CONSTANTS[2]*CONSTANTS[0]*STATES[1])/(CONSTANTS[1]+STATES[1]) - ( ( CONSTANTS[3]*STATES[2]+CONSTANTS[4])*STATES[0]+ CONSTANTS[5]*STATES[0]); RATES[2] = ( CONSTANTS[6]*STATES[3]+CONSTANTS[7])*STATES[0] - CONSTANTS[8]*STATES[2]; RATES[3] = CONSTANTS[9]*STATES[0] - CONSTANTS[10]*STATES[3]; RATES[1] = CONSTANTS[11]*STATES[3] - (( CONSTANTS[0]*STATES[1])/(CONSTANTS[1]+STATES[1])+ CONSTANTS[12]*STATES[1]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }