/* There are a total of 0 entries in the algebraic variable array. There are a total of 5 entries in each of the rate and state variable arrays. There are a total of 10 entries in the constant variable array. */ /* * VOI is time in component environment (day). * STATES[0] is x in component x (cell). * CONSTANTS[0] is lamda in component x (cell_per_mm3_day). * CONSTANTS[1] is d in component x (first_order_rate_constant). * CONSTANTS[2] is beta in component model_parameters (mm3_per_vir_day). * STATES[1] is v in component v (vir). * STATES[2] is y in component y (cell). * CONSTANTS[3] is a in component y (first_order_rate_constant). * CONSTANTS[4] is alpha in component model_parameters (mm3_per_vir_day). * STATES[3] is w in component w (vir). * STATES[4] is z in component z (cell). * CONSTANTS[5] is b in component z (first_order_rate_constant). * CONSTANTS[6] is k in component v (vir_per_cell_day). * CONSTANTS[7] is u in component v (first_order_rate_constant). * CONSTANTS[8] is c in component w (vir_per_cell_day). * CONSTANTS[9] is q in component w (first_order_rate_constant). * RATES[0] is d/dt x in component x (cell). * RATES[2] is d/dt y in component y (cell). * RATES[4] is d/dt z in component z (cell). * RATES[1] is d/dt v in component v (vir). * RATES[3] is d/dt w in component w (vir). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 3; CONSTANTS[0] = 2.0; CONSTANTS[1] = 0.01; CONSTANTS[2] = 0.004; STATES[1] = 149; STATES[2] = 6; CONSTANTS[3] = 0.33; CONSTANTS[4] = 0.004; STATES[3] = 1; STATES[4] = 0; CONSTANTS[5] = 2.0; CONSTANTS[6] = 50.0; CONSTANTS[7] = 2.0; CONSTANTS[8] = 2000.0; CONSTANTS[9] = 2.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = 1.00000*CONSTANTS[0] - ( CONSTANTS[1]*STATES[0]+ 1.00000*CONSTANTS[2]*STATES[0]*STATES[1]); RATES[2] = 1.00000*CONSTANTS[2]*STATES[0]*STATES[1] - ( CONSTANTS[3]*STATES[2]+ 1.00000*CONSTANTS[4]*STATES[3]*STATES[2]); RATES[4] = 1.00000*CONSTANTS[4]*STATES[3]*STATES[2] - CONSTANTS[5]*STATES[4]; RATES[1] = CONSTANTS[6]*STATES[2] - CONSTANTS[7]*STATES[1]; RATES[3] = CONSTANTS[8]*STATES[4] - CONSTANTS[9]*STATES[3]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }