/* There are a total of 1 entries in the algebraic variable array. There are a total of 17 entries in each of the rate and state variable arrays. There are a total of 16 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is Py in component Py (nanomolar). * CONSTANTS[0] is Zn in component model_parameters (nanomolar). * STATES[1] is Py1 in component Py1 (nanomolar). * CONSTANTS[1] is r3 in component model_parameters (third_order_rate_constant). * CONSTANTS[2] is r4 in component model_parameters (first_order_rate_constant). * STATES[2] is Dw in component Dw (nanomolar). * STATES[3] is Qw2 in component Qw2 (nanomolar). * CONSTANTS[3] is k_1 in component model_parameters (first_order_rate_constant). * CONSTANTS[4] is k1a in component model_parameters (second_order_rate_constant). * STATES[4] is Qw1 in component Qw1 (nanomolar). * STATES[5] is Rw in component Rw (nanomolar). * CONSTANTS[5] is k2 in component model_parameters (second_order_rate_constant). * CONSTANTS[6] is k_2 in component model_parameters (first_order_rate_constant). * ALGEBRAIC[0] is k3 in component model_parameters (first_order_rate_constant). * STATES[6] is Mw in component Mw (nanomolar). * STATES[7] is Px in component Px (nanomolar). * STATES[8] is Px1 in component Px1 (nanomolar). * STATES[9] is Dz in component Dz (nanomolar). * STATES[10] is Qz4 in component Qz4 (nanomolar). * CONSTANTS[7] is r1 in component model_parameters (second_order_rate_constant). * CONSTANTS[8] is r2 in component model_parameters (first_order_rate_constant). * CONSTANTS[9] is k1b in component model_parameters (second_order_rate_constant). * STATES[11] is Qz2 in component Qz2 (nanomolar). * CONSTANTS[10] is k1 in component model_parameters (second_order_rate_constant). * STATES[12] is Qz1 in component Qz1 (nanomolar). * STATES[13] is Rz in component Rz (nanomolar). * CONSTANTS[11] is k2a in component model_parameters (second_order_rate_constant). * STATES[14] is Qz3 in component Qz3 (nanomolar). * STATES[15] is Qz5 in component Qz5 (nanomolar). * CONSTANTS[12] is k2b in component model_parameters (second_order_rate_constant). * CONSTANTS[13] is k2c in component model_parameters (second_order_rate_constant). * STATES[16] is Mz in component Mz (nanomolar). * CONSTANTS[14] is td0 in component model_parameters (second). * CONSTANTS[15] is td in component model_parameters (second). * RATES[0] is d/dt Py in component Py (nanomolar). * RATES[1] is d/dt Py1 in component Py1 (nanomolar). * RATES[2] is d/dt Dw in component Dw (nanomolar). * RATES[5] is d/dt Rw in component Rw (nanomolar). * RATES[4] is d/dt Qw1 in component Qw1 (nanomolar). * RATES[3] is d/dt Qw2 in component Qw2 (nanomolar). * RATES[6] is d/dt Mw in component Mw (nanomolar). * RATES[7] is d/dt Px in component Px (nanomolar). * RATES[8] is d/dt Px1 in component Px1 (nanomolar). * RATES[9] is d/dt Dz in component Dz (nanomolar). * RATES[13] is d/dt Rz in component Rz (nanomolar). * RATES[12] is d/dt Qz1 in component Qz1 (nanomolar). * RATES[11] is d/dt Qz2 in component Qz2 (nanomolar). * RATES[14] is d/dt Qz3 in component Qz3 (nanomolar). * RATES[10] is d/dt Qz4 in component Qz4 (nanomolar). * RATES[15] is d/dt Qz5 in component Qz5 (nanomolar). * RATES[16] is d/dt Mz in component Mz (nanomolar). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 25.0; CONSTANTS[0] = 1E-5; STATES[1] = 0.0; CONSTANTS[1] = 4.41E10; CONSTANTS[2] = 9E-3; STATES[2] = 4.0; STATES[3] = 0.0; CONSTANTS[3] = 0.9; CONSTANTS[4] = 1.0; STATES[4] = 0.0; STATES[5] = 50.0; CONSTANTS[5] = 0.02; CONSTANTS[6] = 0.3; STATES[6] = 0.0; STATES[7] = 25.0; STATES[8] = 0.0; STATES[9] = 4.0; STATES[10] = 0.0; CONSTANTS[7] = 2.73E2; CONSTANTS[8] = 3.437E-4; CONSTANTS[9] = 1.253E-2; STATES[11] = 0.0; CONSTANTS[10] = 0.025; STATES[12] = 0.0; STATES[13] = 50.0; CONSTANTS[11] = 0.00005; STATES[14] = 0.0; STATES[15] = 0.0; CONSTANTS[12] = 0.0002; CONSTANTS[13] = 0.0037; STATES[16] = 0.0; CONSTANTS[14] = 1800.0; CONSTANTS[15] = 2700; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[2]*STATES[1] - CONSTANTS[1]*pow(CONSTANTS[0], 2.00000)*STATES[0]; RATES[1] = ( CONSTANTS[1]*pow(CONSTANTS[0], 2.00000)*STATES[0]+ CONSTANTS[3]*STATES[3]) - ( CONSTANTS[2]*STATES[1]+ CONSTANTS[4]*STATES[2]*STATES[1]); RATES[3] = CONSTANTS[4]*STATES[2]*STATES[1] - CONSTANTS[3]*STATES[3]; RATES[7] = ( CONSTANTS[8]*STATES[8]+ CONSTANTS[3]*STATES[10]) - ( CONSTANTS[7]*CONSTANTS[0]*STATES[7]+ CONSTANTS[9]*STATES[9]*STATES[7]); RATES[8] = ( CONSTANTS[7]*CONSTANTS[0]*STATES[7]+ CONSTANTS[3]*STATES[11]) - ( CONSTANTS[8]*STATES[8]+ CONSTANTS[10]*STATES[9]*STATES[8]); ALGEBRAIC[0] = (VOI>=0.00000&&VOI=CONSTANTS[14]&&VOI=0.00000&&VOI=CONSTANTS[14]&&VOI