/* 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 11 entries in the constant variable array. */ /* * VOI is time in component environment (hour). * STATES[0] is x in component x (dimensionless). * CONSTANTS[0] is d in component model_parameters (first_order_rate_constant). * CONSTANTS[1] is gamma in component model_parameters (first_order_rate_constant). * CONSTANTS[2] is lambda in component model_parameters (first_order_rate_constant). * CONSTANTS[3] is beta in component model_parameters (first_order_rate_constant). * STATES[1] is v in component v (dimensionless). * STATES[2] is y0 in component y0 (dimensionless). * CONSTANTS[4] is a0 in component model_parameters (first_order_rate_constant). * CONSTANTS[5] is eta in component model_parameters (first_order_rate_constant). * CONSTANTS[6] is phi in component model_parameters (first_order_rate_constant). * STATES[3] is L in component L (dimensionless). * STATES[4] is y1 in component y1 (dimensionless). * CONSTANTS[7] is a1 in component model_parameters (first_order_rate_constant). * CONSTANTS[8] is k in component model_parameters (first_order_rate_constant). * CONSTANTS[9] is u in component model_parameters (first_order_rate_constant). * CONSTANTS[10] is R0 in component R0 (dimensionless). * RATES[0] is d/dt x in component x (dimensionless). * RATES[2] is d/dt y0 in component y0 (dimensionless). * RATES[4] is d/dt y1 in component y1 (dimensionless). * RATES[3] is d/dt L in component L (dimensionless). * RATES[1] is d/dt v in component v (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 1; CONSTANTS[0] = 0.1; CONSTANTS[1] = 0.5; CONSTANTS[2] = 10; CONSTANTS[3] = 0.1; STATES[1] = 1; STATES[2] = 0; CONSTANTS[4] = 0.1; CONSTANTS[5] = 0.01; CONSTANTS[6] = 0.1; STATES[3] = 0; STATES[4] = 0; CONSTANTS[7] = 0.2; CONSTANTS[8] = 1; CONSTANTS[9] = 1; CONSTANTS[10] = (( CONSTANTS[2]*CONSTANTS[5])/( CONSTANTS[0]*CONSTANTS[7]*(CONSTANTS[4]+CONSTANTS[5])))*(CONSTANTS[3]+( CONSTANTS[1]*CONSTANTS[6])/(CONSTANTS[6]+CONSTANTS[0])); } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[2] - ( CONSTANTS[0]*STATES[0]+ CONSTANTS[3]*STATES[0]*STATES[1]+ CONSTANTS[1]*STATES[0]*STATES[1]); RATES[2] = ( CONSTANTS[3]*STATES[0]*STATES[1] - ( CONSTANTS[4]*STATES[2]+ CONSTANTS[5]*STATES[2]))+ CONSTANTS[6]*STATES[3]; RATES[4] = CONSTANTS[5]*STATES[2] - CONSTANTS[7]*STATES[4]; RATES[3] = CONSTANTS[1]*STATES[0]*STATES[1] - ( CONSTANTS[6]*STATES[3]+ CONSTANTS[0]*STATES[3]); RATES[1] = CONSTANTS[8]*STATES[4] - CONSTANTS[9]*STATES[1]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }