/* 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 13 entries in the constant variable array. */ /* * VOI is time in component environment (s). * STATES[0] is P in component P (dimensionless). * STATES[1] is Q in component Q (dimensionless). * CONSTANTS[0] is a in component P (per_s). * CONSTANTS[1] is b in component P (per_s). * CONSTANTS[2] is K in component P (dimensionless). * CONSTANTS[11] is P_star in component P_star (dimensionless). * CONSTANTS[3] is V_3 in component R (per_s). * CONSTANTS[4] is V_4 in component R (per_s). * CONSTANTS[5] is K_3 in component R (dimensionless). * CONSTANTS[6] is K_4 in component R (dimensionless). * STATES[2] is R in component R (dimensionless). * CONSTANTS[7] is V_1 in component Q (per_s). * CONSTANTS[8] is V_2 in component Q (per_s). * CONSTANTS[9] is K_1 in component Q (dimensionless). * CONSTANTS[10] is K_2 in component Q (dimensionless). * CONSTANTS[12] is R_star in component R_star (dimensionless). * RATES[0] is d/dt P in component P (dimensionless). * RATES[1] is d/dt Q in component Q (dimensionless). * RATES[2] is d/dt R in component R (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.0; STATES[1] = 0.0; CONSTANTS[0] = 0.1; CONSTANTS[1] = 0.1; CONSTANTS[2] = 0.2; CONSTANTS[3] = 6; CONSTANTS[4] = 2.5; CONSTANTS[5] = 0.01; CONSTANTS[6] = 0.01; STATES[2] = 0.0; CONSTANTS[7] = 1; CONSTANTS[8] = 1.5; CONSTANTS[9] = 0.01; CONSTANTS[10] = 0.01; CONSTANTS[11] = (CONSTANTS[4]/CONSTANTS[3])*((1.00000+ 2.00000*CONSTANTS[5])/(1.00000+ 2.00000*CONSTANTS[6])); CONSTANTS[12] = (CONSTANTS[7]/CONSTANTS[8])*((1.00000+ 2.00000*CONSTANTS[10])/(1.00000+ 2.00000*CONSTANTS[9])); } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[0]*STATES[1] - CONSTANTS[1]*(STATES[0]/(CONSTANTS[2]+STATES[0])); RATES[1] = CONSTANTS[7]*((1.00000 - STATES[1])/(CONSTANTS[9]+(1.00000 - STATES[1]))) - CONSTANTS[8]*STATES[2]*(STATES[1]/(CONSTANTS[10]+STATES[1])); RATES[2] = STATES[0]*CONSTANTS[3]*((1.00000 - STATES[2])/(CONSTANTS[5]+(1.00000 - STATES[2]))) - CONSTANTS[4]*(STATES[2]/(CONSTANTS[6]+STATES[2])); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }