/* 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 T in component T (dimensionless). * CONSTANTS[0] is s in component T (first_order_rate_constant). * CONSTANTS[1] is dT in component T (first_order_rate_constant). * CONSTANTS[2] is b in component kinetic_parameters (first_order_rate_constant). * STATES[1] is I in component I (dimensionless). * CONSTANTS[3] is p in component I (first_order_rate_constant). * CONSTANTS[4] is dI in component I (first_order_rate_constant). * CONSTANTS[5] is ql in component kinetic_parameters (first_order_rate_constant). * CONSTANTS[6] is qa in component kinetic_parameters (first_order_rate_constant). * STATES[2] is E in component E (dimensionless). * STATES[3] is Il in component Il (dimensionless). * CONSTANTS[7] is al in component Il (first_order_rate_constant). * CONSTANTS[8] is c in component E (first_order_rate_constant). * CONSTANTS[9] is dE in component E (first_order_rate_constant). * CONSTANTS[10] is K in component E (dimensionless). * CONSTANTS[11] is dE_ in component E (first_order_rate_constant). * CONSTANTS[12] is K_ in component E (dimensionless). * RATES[0] is d/dt T in component T (dimensionless). * RATES[1] is d/dt I in component I (dimensionless). * RATES[3] is d/dt Il in component Il (dimensionless). * RATES[2] is d/dt E in component E (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 1.0; CONSTANTS[0] = 10.0; CONSTANTS[1] = 0.01; CONSTANTS[2] = 0.001; STATES[1] = 1.0; CONSTANTS[3] = 0.05; CONSTANTS[4] = 0.3; CONSTANTS[5] = 0.001; CONSTANTS[6] = 0.001; STATES[2] = 1.0; STATES[3] = 1.0; CONSTANTS[7] = 0.01; CONSTANTS[8] = 0.3; CONSTANTS[9] = 0.1; CONSTANTS[10] = 0.1; CONSTANTS[11] = 0.25; CONSTANTS[12] = 05.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[0] - ( CONSTANTS[1]*STATES[0]+ CONSTANTS[2]*STATES[0]*STATES[1]); RATES[1] = ( CONSTANTS[2]*STATES[0]*STATES[1] - ( CONSTANTS[4]*STATES[1]+ CONSTANTS[3]*STATES[2]*STATES[1]+ CONSTANTS[5]*STATES[1]))+ CONSTANTS[6]*STATES[1]; RATES[3] = CONSTANTS[5]*STATES[1] - ( CONSTANTS[7]*STATES[3]+ CONSTANTS[6]*STATES[3]); RATES[2] = ( CONSTANTS[8]*STATES[2]*STATES[1])/(STATES[1]+CONSTANTS[10]) - ( CONSTANTS[9]*STATES[2]+( CONSTANTS[11]*STATES[2]*STATES[1])/(CONSTANTS[12]+STATES[1])); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }