/* There are a total of 21 entries in the algebraic variable array. There are a total of 32 entries in each of the rate and state variable arrays. There are a total of 32 entries in the constant variable array. */ /* * VOI is time in component environment (second). * CONSTANTS[0] is k1 in component constants (second_order_rate_constant). * CONSTANTS[1] is k2 in component constants (first_order_rate_constant). * CONSTANTS[2] is k3 in component constants (second_order_rate_constant). * CONSTANTS[3] is k4 in component constants (first_order_rate_constant). * CONSTANTS[4] is k5 in component constants (second_order_rate_constant). * CONSTANTS[5] is k6 in component constants (first_order_rate_constant). * CONSTANTS[6] is k7 in component constants (second_order_rate_constant). * CONSTANTS[7] is k8 in component constants (first_order_rate_constant). * CONSTANTS[8] is k9 in component constants (second_order_rate_constant). * CONSTANTS[9] is k10 in component constants (first_order_rate_constant). * CONSTANTS[10] is k110 in component constants (first_order_rate_constant). * CONSTANTS[11] is k120 in component constants (second_order_rate_constant). * CONSTANTS[12] is k130 in component constants (first_order_rate_constant). * CONSTANTS[13] is k140 in component constants (first_order_rate_constant). * CONSTANTS[14] is p in component constants (first_order_rate_constant). * CONSTANTS[15] is k15 in component constants (second_order_rate_constant). * CONSTANTS[16] is k16 in component constants (first_order_rate_constant). * CONSTANTS[17] is k17 in component constants (first_order_rate_constant). * CONSTANTS[18] is k18 in component constants (second_order_rate_constant). * CONSTANTS[19] is k19 in component constants (first_order_rate_constant). * CONSTANTS[20] is k20 in component constants (first_order_rate_constant). * CONSTANTS[21] is k21 in component constants (second_order_rate_constant). * CONSTANTS[22] is k22 in component constants (first_order_rate_constant). * CONSTANTS[23] is k23 in component constants (first_order_rate_constant). * CONSTANTS[24] is k24 in component constants (second_order_rate_constant). * CONSTANTS[25] is k25 in component constants (first_order_rate_constant). * CONSTANTS[26] is k26 in component constants (first_order_rate_constant). * CONSTANTS[27] is k28 in component constants (second_order_rate_constant). * CONSTANTS[28] is k29 in component constants (second_order_rate_constant). * CONSTANTS[29] is d_6 in component constants (first_order_rate_constant). * CONSTANTS[30] is k_14 in component constants (flux). * CONSTANTS[31] is k_m1 in component constants (rate3). * ALGEBRAIC[0] is J1 in component Js (flux). * ALGEBRAIC[1] is J2 in component Js (flux). * ALGEBRAIC[2] is J3 in component Js (flux). * ALGEBRAIC[3] is J4 in component Js (flux). * ALGEBRAIC[4] is J5 in component Js (flux). * ALGEBRAIC[5] is J6 in component Js (flux). * ALGEBRAIC[6] is J7 in component Js (flux). * ALGEBRAIC[7] is J8 in component Js (flux). * ALGEBRAIC[8] is J9 in component Js (flux). * ALGEBRAIC[9] is J10 in component Js (flux). * ALGEBRAIC[10] is J11 in component Js (flux). * ALGEBRAIC[11] is J12 in component Js (flux). * ALGEBRAIC[12] is J13 in component Js (flux). * ALGEBRAIC[13] is J14 in component Js (flux). * ALGEBRAIC[14] is J15 in component Js (flux). * ALGEBRAIC[15] is J16 in component Js (flux). * ALGEBRAIC[16] is J17 in component Js (flux). * ALGEBRAIC[17] is J18 in component Js (flux). * ALGEBRAIC[18] is J19 in component Js (flux). * ALGEBRAIC[19] is v14 in component Js (flux). * ALGEBRAIC[20] is deg_no in component Js (flux). * STATES[0] is R_NOS2 in component cs (nanomolar). * STATES[1] is c1 in component cs (nanomolar). * STATES[2] is c2 in component cs (nanomolar). * STATES[3] is c3 in component cs (nanomolar). * STATES[4] is c4 in component cs (nanomolar). * STATES[5] is c5 in component cs (nanomolar). * STATES[6] is c6 in component cs (nanomolar). * STATES[7] is c7 in component cs (nanomolar). * STATES[8] is c8 in component cs (nanomolar). * STATES[9] is c9 in component cs (nanomolar). * STATES[10] is c10 in component cs (nanomolar). * STATES[11] is c11 in component cs (nanomolar). * STATES[12] is c12 in component cs (nanomolar). * STATES[13] is c13 in component cs (nanomolar). * STATES[14] is c14 in component cs (nanomolar). * STATES[15] is c15 in component cs (nanomolar). * STATES[16] is c16 in component cs (nanomolar). * STATES[17] is c17 in component cs (nanomolar). * STATES[18] is c18 in component cs (nanomolar). * STATES[19] is c19 in component cs (nanomolar). * STATES[20] is c20 in component cs (nanomolar). * STATES[21] is c21 in component cs (nanomolar). * STATES[22] is c22 in component cs (nanomolar). * STATES[23] is c23 in component cs (nanomolar). * STATES[24] is c24 in component cs (nanomolar). * STATES[25] is c25 in component cs (nanomolar). * STATES[26] is c26 in component cs (nanomolar). * STATES[27] is c27 in component cs (nanomolar). * STATES[28] is c28 in component cs (nanomolar). * STATES[29] is c29 in component cs (nanomolar). * STATES[30] is c30 in component cs (nanomolar). * STATES[31] is c31 in component cs (nanomolar). * RATES[0] is d/dt R_NOS2 in component cs (nanomolar). * RATES[1] is d/dt c1 in component cs (nanomolar). * RATES[2] is d/dt c2 in component cs (nanomolar). * RATES[3] is d/dt c3 in component cs (nanomolar). * RATES[4] is d/dt c4 in component cs (nanomolar). * RATES[5] is d/dt c5 in component cs (nanomolar). * RATES[6] is d/dt c6 in component cs (nanomolar). * RATES[7] is d/dt c7 in component cs (nanomolar). * RATES[8] is d/dt c8 in component cs (nanomolar). * RATES[9] is d/dt c9 in component cs (nanomolar). * RATES[10] is d/dt c10 in component cs (nanomolar). * RATES[11] is d/dt c11 in component cs (nanomolar). * RATES[12] is d/dt c12 in component cs (nanomolar). * RATES[13] is d/dt c13 in component cs (nanomolar). * RATES[14] is d/dt c14 in component cs (nanomolar). * RATES[15] is d/dt c15 in component cs (nanomolar). * RATES[16] is d/dt c16 in component cs (nanomolar). * RATES[17] is d/dt c17 in component cs (nanomolar). * RATES[18] is d/dt c18 in component cs (nanomolar). * RATES[19] is d/dt c19 in component cs (nanomolar). * RATES[20] is d/dt c20 in component cs (nanomolar). * RATES[21] is d/dt c21 in component cs (nanomolar). * RATES[22] is d/dt c22 in component cs (nanomolar). * RATES[23] is d/dt c23 in component cs (nanomolar). * RATES[24] is d/dt c24 in component cs (nanomolar). * RATES[25] is d/dt c25 in component cs (nanomolar). * RATES[26] is d/dt c26 in component cs (nanomolar). * RATES[27] is d/dt c27 in component cs (nanomolar). * RATES[28] is d/dt c28 in component cs (nanomolar). * RATES[29] is d/dt c29 in component cs (nanomolar). * RATES[30] is d/dt c30 in component cs (nanomolar). * RATES[31] is d/dt c31 in component cs (nanomolar). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 185e-6; CONSTANTS[1] = 1.25e-6; CONSTANTS[2] = 185e-6; CONSTANTS[3] = 1.25e-6; CONSTANTS[4] = 185e-6; CONSTANTS[5] = 1.25e-6; CONSTANTS[6] = 185e-6; CONSTANTS[7] = 1.25e-6; CONSTANTS[8] = 185e-6; CONSTANTS[9] = 1.25e-6; CONSTANTS[10] = 370e-6; CONSTANTS[11] = 14e-6; CONSTANTS[12] = 1.25e-6; CONSTANTS[13] = 370e-6; CONSTANTS[14] = 1750e-6; CONSTANTS[15] = 185e-6; CONSTANTS[16] = 1.25e-6; CONSTANTS[17] = 370e-6; CONSTANTS[18] = 500e-6; CONSTANTS[19] = 200e-6; CONSTANTS[20] = 100e-6; CONSTANTS[21] = 100e-6; CONSTANTS[22] = 60e-6; CONSTANTS[23] = 100000e-6; CONSTANTS[24] = 185e-6; CONSTANTS[25] = 1.25e-6; CONSTANTS[26] = 370e-6; CONSTANTS[27] = 500e-6; CONSTANTS[28] = 750000e-6; CONSTANTS[29] = 2.83e-4; CONSTANTS[30] = 41.6; CONSTANTS[31] = 10e5; STATES[0] = 0.616; STATES[1] = 0; STATES[2] = 100; STATES[3] = 0; STATES[4] = 150; STATES[5] = 0; STATES[6] = 100; STATES[7] = 0; STATES[8] = 100; STATES[9] = 0; STATES[10] = 100; STATES[11] = 0; STATES[12] = 0; STATES[13] = 250; STATES[14] = 0; STATES[15] = 0; STATES[16] = 0; STATES[17] = 100; STATES[18] = 0; STATES[19] = 0; STATES[20] = 80; STATES[21] = 0; STATES[22] = 0; STATES[23] = 200; STATES[24] = 0; STATES[25] = 0; STATES[26] = 0; STATES[27] = 0; STATES[28] = 0; STATES[29] = 800; STATES[30] = 0; STATES[31] = 0; RATES[0] = 0.1001; RATES[1] = 0.1001; RATES[2] = 0.1001; RATES[3] = 0.1001; RATES[4] = 0.1001; RATES[5] = 0.1001; RATES[6] = 0.1001; RATES[7] = 0.1001; RATES[8] = 0.1001; RATES[9] = 0.1001; RATES[10] = 0.1001; RATES[11] = 0.1001; RATES[12] = 0.1001; RATES[13] = 0.1001; RATES[14] = 0.1001; RATES[15] = 0.1001; RATES[16] = 0.1001; RATES[17] = 0.1001; RATES[18] = 0.1001; RATES[19] = 0.1001; RATES[20] = 0.1001; RATES[21] = 0.1001; RATES[22] = 0.1001; RATES[23] = 0.1001; RATES[24] = 0.1001; RATES[25] = 0.1001; RATES[26] = 0.1001; RATES[27] = 0.1001; RATES[28] = 0.1001; RATES[29] = 0.1001; RATES[30] = 0.1001; RATES[31] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - ALGEBRAIC[19] - ALGEBRAIC[20]; resid[1] = RATES[1] - - ALGEBRAIC[0]; resid[2] = RATES[2] - - ALGEBRAIC[0]+ALGEBRAIC[9]+ALGEBRAIC[5]; resid[3] = RATES[3] - ALGEBRAIC[0] - ALGEBRAIC[1]; resid[4] = RATES[4] - - ALGEBRAIC[1]+ALGEBRAIC[5]+ALGEBRAIC[11]; resid[5] = RATES[5] - ALGEBRAIC[1] - ALGEBRAIC[2]; resid[6] = RATES[6] - - ALGEBRAIC[2]+ALGEBRAIC[5]+ALGEBRAIC[11]; resid[7] = RATES[7] - ALGEBRAIC[2] - ALGEBRAIC[3]; resid[8] = RATES[8] - - ALGEBRAIC[3]+ALGEBRAIC[5]+ALGEBRAIC[11]; resid[9] = RATES[9] - (ALGEBRAIC[3] - ALGEBRAIC[4]) - ALGEBRAIC[8]; resid[10] = RATES[10] - - ALGEBRAIC[4]+ALGEBRAIC[7]; resid[11] = RATES[11] - ALGEBRAIC[4] - ALGEBRAIC[5]; resid[12] = RATES[12] - - ALGEBRAIC[6]+ALGEBRAIC[5]; resid[13] = RATES[13] - - ALGEBRAIC[6]+ALGEBRAIC[18]; resid[14] = RATES[14] - ALGEBRAIC[6] - ALGEBRAIC[7]; resid[15] = RATES[15] - ALGEBRAIC[7]; resid[16] = RATES[16] - ALGEBRAIC[7] - ALGEBRAIC[18]; resid[17] = RATES[17] - - ALGEBRAIC[8]+ALGEBRAIC[11]; resid[18] = RATES[18] - ALGEBRAIC[8] - ALGEBRAIC[9]; resid[19] = RATES[19] - ALGEBRAIC[9] - ALGEBRAIC[10]; resid[20] = RATES[20] - - ALGEBRAIC[10]; resid[21] = RATES[21] - ALGEBRAIC[10] - ALGEBRAIC[11]; resid[22] = RATES[22] - (ALGEBRAIC[11] - ALGEBRAIC[12])+ALGEBRAIC[13]; resid[23] = RATES[23] - - ALGEBRAIC[12]; resid[24] = RATES[24] - ALGEBRAIC[12] - ALGEBRAIC[13]; resid[25] = RATES[25] - ((ALGEBRAIC[13] - ALGEBRAIC[17]) - ALGEBRAIC[14])+ALGEBRAIC[15]; resid[26] = RATES[26] - ALGEBRAIC[15]; resid[27] = RATES[27] - ALGEBRAIC[16] - ALGEBRAIC[17]; resid[28] = RATES[28] - ALGEBRAIC[17]; resid[29] = RATES[29] - - ALGEBRAIC[14]; resid[30] = RATES[30] - ALGEBRAIC[14] - ALGEBRAIC[15]; resid[31] = RATES[31] - ALGEBRAIC[16] - ALGEBRAIC[18]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = CONSTANTS[0]*STATES[1]*STATES[2] - CONSTANTS[1]*STATES[3]; ALGEBRAIC[1] = CONSTANTS[2]*STATES[3]*STATES[4] - CONSTANTS[3]*STATES[5]; ALGEBRAIC[2] = CONSTANTS[4]*STATES[5]*STATES[6] - CONSTANTS[5]*STATES[7]; ALGEBRAIC[3] = CONSTANTS[6]*STATES[7]*STATES[8] - CONSTANTS[7]*STATES[9]; ALGEBRAIC[4] = CONSTANTS[8]*STATES[10]*STATES[9] - CONSTANTS[9]*STATES[11]; ALGEBRAIC[5] = CONSTANTS[10]*STATES[11]; ALGEBRAIC[6] = CONSTANTS[11]*STATES[12]*STATES[13] - CONSTANTS[12]*STATES[14]; ALGEBRAIC[7] = CONSTANTS[13]*STATES[14]; ALGEBRAIC[8] = CONSTANTS[15]*STATES[9]*STATES[17] - CONSTANTS[16]*STATES[18]; ALGEBRAIC[9] = CONSTANTS[17]*STATES[18]; ALGEBRAIC[10] = CONSTANTS[18]*STATES[19]*STATES[20] - CONSTANTS[19]*STATES[21]; ALGEBRAIC[11] = CONSTANTS[20]*STATES[21]; ALGEBRAIC[12] = CONSTANTS[21]*STATES[22]*STATES[23] - CONSTANTS[22]*STATES[24]; ALGEBRAIC[13] = CONSTANTS[23]*STATES[24]; ALGEBRAIC[14] = CONSTANTS[24]*STATES[25]*STATES[29] - CONSTANTS[25]*STATES[30]; ALGEBRAIC[15] = CONSTANTS[26]*STATES[30]; ALGEBRAIC[16] = CONSTANTS[14]*STATES[16]; ALGEBRAIC[17] = CONSTANTS[27]*STATES[27]*STATES[25]; ALGEBRAIC[18] = CONSTANTS[28]*STATES[16]*STATES[31]; ALGEBRAIC[19] = ( CONSTANTS[30]*pow(STATES[16], 2.00000))/(CONSTANTS[31]+pow(STATES[16], 2.00000)); ALGEBRAIC[20] = CONSTANTS[29]*STATES[0]; } void getStateInformation(double* SI) { SI[0] = 1.0; SI[1] = 1.0; SI[2] = 1.0; SI[3] = 1.0; SI[4] = 1.0; SI[5] = 1.0; SI[6] = 1.0; SI[7] = 1.0; SI[8] = 1.0; SI[9] = 1.0; SI[10] = 1.0; SI[11] = 1.0; SI[12] = 1.0; SI[13] = 1.0; SI[14] = 1.0; SI[15] = 1.0; SI[16] = 1.0; SI[17] = 1.0; SI[18] = 1.0; SI[19] = 1.0; SI[20] = 1.0; SI[21] = 1.0; SI[22] = 1.0; SI[23] = 1.0; SI[24] = 1.0; SI[25] = 1.0; SI[26] = 1.0; SI[27] = 1.0; SI[28] = 1.0; SI[29] = 1.0; SI[30] = 1.0; SI[31] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }