/* There are a total of 9 entries in the algebraic variable array. There are a total of 21 entries in each of the rate and state variable arrays. There are a total of 38 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * ALGEBRAIC[0] is x1 in component x1 (molar). * STATES[0] is x2 in component x2 (molar). * CONSTANTS[0] is k1 in component reaction_constants (second_order_rate_constant). * CONSTANTS[1] is k_minus1 in component reaction_constants (first_order_rate_constant). * CONSTANTS[22] is k4 in component reaction_constants (first_order_rate_constant). * CONSTANTS[2] is k_minus4 in component reaction_constants (first_order_rate_constant). * CONSTANTS[23] is k_minus3 in component reaction_constants (second_order_rate_constant). * STATES[1] is x3 in component x3 (molar). * STATES[2] is x5 in component x5 (molar). * STATES[3] is x6 in component x6 (molar). * ALGEBRAIC[1] is PTP in component reaction_constants (molar). * CONSTANTS[3] is k3 in component reaction_constants (first_order_rate_constant). * STATES[4] is x4 in component x4 (molar). * CONSTANTS[24] is k2 in component reaction_constants (second_order_rate_constant). * CONSTANTS[25] is k_minus2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[4] is k4b in component reaction_constants (first_order_rate_constant). * CONSTANTS[5] is k_minus4b in component reaction_constants (first_order_rate_constant). * STATES[5] is x7 in component x7 (molar). * STATES[6] is x8 in component x8 (molar). * ALGEBRAIC[3] is k5 in component reaction_constants (rate). * CONSTANTS[6] is k_minus5 in component reaction_constants (first_order_rate_constant). * CONSTANTS[7] is k6 in component reaction_constants (second_order_rate_constant). * STATES[7] is x9 in component x9 (molar). * CONSTANTS[8] is k7 in component reaction_constants (first_order_rate_constant). * CONSTANTS[26] is k_minus7 in component reaction_constants (second_order_rate_constant). * CONSTANTS[27] is k7b in component reaction_constants (first_order_rate_constant). * CONSTANTS[35] is k_minus7b in component reaction_constants (first_order_rate_constant). * STATES[8] is x10 in component x10 (molar). * STATES[9] is x10a in component x10a (molar). * CONSTANTS[9] is IRp in component reaction_constants (molar). * ALGEBRAIC[2] is PKC in component reaction_constants (dimensionless). * CONSTANTS[28] is k8 in component reaction_constants (second_order_rate_constant). * CONSTANTS[10] is k_minus8 in component reaction_constants (first_order_rate_constant). * STATES[10] is x11 in component x11 (molar). * STATES[11] is x12 in component x12 (molar). * STATES[12] is x13 in component x13 (percentage). * ALGEBRAIC[4] is k9 in component reaction_constants (first_order_rate_constant). * CONSTANTS[29] is k_minus9 in component reaction_constants (second_order_rate_constant). * CONSTANTS[30] is k10 in component reaction_constants (first_order_rate_constant). * CONSTANTS[11] is k_minus10 in component reaction_constants (second_order_rate_constant). * STATES[13] is x14 in component x14 (percentage). * STATES[14] is x15 in component x15 (percentage). * CONSTANTS[12] is PTEN in component reaction_constants (molar). * CONSTANTS[13] is SHIP in component reaction_constants (molar). * STATES[15] is x16 in component x16 (percentage). * ALGEBRAIC[5] is k11 in component reaction_constants (first_order_rate_constant). * CONSTANTS[31] is k_minus11 in component reaction_constants (first_order_rate_constant). * STATES[16] is x17 in component x17 (percentage). * STATES[17] is x18 in component x18 (percentage). * ALGEBRAIC[6] is k12 in component reaction_constants (first_order_rate_constant). * CONSTANTS[32] is k_minus12 in component reaction_constants (first_order_rate_constant). * STATES[18] is x19 in component x19 (percentage). * STATES[19] is x20 in component x20 (percentage). * CONSTANTS[33] is k13 in component reaction_constants (first_order_rate_constant). * CONSTANTS[14] is k_minus13 in component reaction_constants (first_order_rate_constant). * ALGEBRAIC[8] is k13b in component reaction_constants (first_order_rate_constant). * CONSTANTS[34] is k14 in component reaction_constants (first_order_rate_constant). * CONSTANTS[15] is k_minus14 in component reaction_constants (first_order_rate_constant). * STATES[20] is x21 in component x21 (percentage). * CONSTANTS[16] is V_max in component reaction_constants (dimensionless). * CONSTANTS[17] is K_d in component reaction_constants (dimensionless). * CONSTANTS[18] is n in component reaction_constants (dimensionless). * CONSTANTS[19] is tau in component reaction_constants (minute). * CONSTANTS[36] is k9_basal in component reaction_constants (first_order_rate_constant). * CONSTANTS[20] is k9_stimulated in component reaction_constants (first_order_rate_constant). * ALGEBRAIC[7] is effect in component reaction_constants (dimensionless). * CONSTANTS[21] is APequil in component reaction_constants (dimensionless). * CONSTANTS[37] is PI3K in component reaction_constants (molar). * RATES[0] is d/dt x2 in component x2 (molar). * RATES[1] is d/dt x3 in component x3 (molar). * RATES[4] is d/dt x4 in component x4 (molar). * RATES[2] is d/dt x5 in component x5 (molar). * RATES[3] is d/dt x6 in component x6 (molar). * RATES[5] is d/dt x7 in component x7 (molar). * RATES[6] is d/dt x8 in component x8 (molar). * RATES[7] is d/dt x9 in component x9 (molar). * RATES[8] is d/dt x10 in component x10 (molar). * RATES[9] is d/dt x10a in component x10a (molar). * RATES[10] is d/dt x11 in component x11 (molar). * RATES[11] is d/dt x12 in component x12 (molar). * RATES[12] is d/dt x13 in component x13 (percentage). * RATES[13] is d/dt x14 in component x14 (percentage). * RATES[14] is d/dt x15 in component x15 (percentage). * RATES[15] is d/dt x16 in component x16 (percentage). * RATES[16] is d/dt x17 in component x17 (percentage). * RATES[17] is d/dt x18 in component x18 (percentage). * RATES[18] is d/dt x19 in component x19 (percentage). * RATES[19] is d/dt x20 in component x20 (percentage). * RATES[20] is d/dt x21 in component x21 (percentage). * There are a total of 4 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 9e-13; CONSTANTS[0] = 6e7; CONSTANTS[1] = 0.2; CONSTANTS[2] = 0.003; STATES[1] = 0; STATES[2] = 0; STATES[3] = 1e-13; CONSTANTS[3] = 2500; STATES[4] = 0; CONSTANTS[4] = 2.1e-3; CONSTANTS[5] = 2.1e-4; STATES[5] = 0; STATES[6] = 0; CONSTANTS[6] = 1.67e-18; CONSTANTS[7] = 0.461; STATES[7] = 1e-12; CONSTANTS[8] = 4.16; STATES[8] = 0; STATES[9] = 0; CONSTANTS[9] = 8.97e-13; CONSTANTS[10] = 10; STATES[10] = 1e-13; STATES[11] = 2.54e-15; STATES[12] = 0.31; CONSTANTS[11] = 2.77; STATES[13] = 99.4; STATES[14] = 0.29; CONSTANTS[12] = 1; CONSTANTS[13] = 1; STATES[15] = 100; STATES[16] = 0; STATES[17] = 100; STATES[18] = 0; STATES[19] = 96; CONSTANTS[14] = 0.167; CONSTANTS[15] = 0.001155; STATES[20] = 4; CONSTANTS[16] = 20; CONSTANTS[17] = 12; CONSTANTS[18] = 4; CONSTANTS[19] = 1.5; CONSTANTS[20] = 1.39; CONSTANTS[21] = 9.09; CONSTANTS[22] = CONSTANTS[2]/9.00000; CONSTANTS[23] = CONSTANTS[1]/1.00000; CONSTANTS[24] = CONSTANTS[0]; CONSTANTS[25] = 100.000*CONSTANTS[1]; CONSTANTS[26] = (2.50000/7.45000)*CONSTANTS[8]; CONSTANTS[27] = log(2.00000)/2.00000; CONSTANTS[28] = (( CONSTANTS[10]*5.00000)/70.7750)*1.00000e+12; CONSTANTS[29] = (94.0000/3.10000)*CONSTANTS[20]; CONSTANTS[30] = (3.10000/2.90000)*CONSTANTS[11]; CONSTANTS[31] = 10.0000*log(2.00000)*1.00000; CONSTANTS[32] = 10.0000*log(2.00000)*1.00000; CONSTANTS[33] = (4.00000/96.0000)*CONSTANTS[14]; CONSTANTS[34] = CONSTANTS[15]/96.0000; CONSTANTS[35] = ( (( CONSTANTS[27]*2.50000)/7.45000)*3.70000e-13)/(6.27000e-13 - (2.50000/7.45000)*3.70000e-13); CONSTANTS[36] = (0.310000/99.4000)*CONSTANTS[29]; CONSTANTS[37] = ( CONSTANTS[28]*3.70000e-13*1.00000e-13)/( CONSTANTS[28]*3.70000e-13+CONSTANTS[10]); RATES[0] = 0.1001; RATES[1] = 0.1001; RATES[4] = 0.1001; RATES[2] = 0.1001; RATES[3] = 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; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[23]*ALGEBRAIC[1]*STATES[2]+ CONSTANTS[2]*STATES[3]) - ( CONSTANTS[0]*ALGEBRAIC[0]*STATES[0]+ CONSTANTS[22]*STATES[0]); resid[1] = RATES[1] - CONSTANTS[0]*ALGEBRAIC[0]*STATES[0] - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[3]*STATES[1]); resid[2] = RATES[4] - ( CONSTANTS[24]*ALGEBRAIC[0]*STATES[2]+ CONSTANTS[5]*STATES[5]) - ( CONSTANTS[25]*STATES[4]+ CONSTANTS[4]*STATES[4]); resid[3] = RATES[2] - ( CONSTANTS[3]*STATES[1]+ CONSTANTS[25]*STATES[4]+ CONSTANTS[5]*STATES[6]) - ( CONSTANTS[24]*ALGEBRAIC[0]*STATES[2]+ CONSTANTS[23]*ALGEBRAIC[1]*STATES[2]+ CONSTANTS[4]*STATES[2]); resid[4] = RATES[3] - (ALGEBRAIC[3]+ CONSTANTS[7]*ALGEBRAIC[1]*(STATES[5]+STATES[6])+ CONSTANTS[22]*STATES[0]) - ( CONSTANTS[6]*STATES[3]+ CONSTANTS[2]*STATES[3]); resid[5] = RATES[5] - CONSTANTS[4]*STATES[4] - ( CONSTANTS[5]*STATES[5]+ CONSTANTS[7]*ALGEBRAIC[1]*STATES[5]); resid[6] = RATES[6] - CONSTANTS[4]*STATES[2] - ( CONSTANTS[5]*STATES[6]+ CONSTANTS[7]*ALGEBRAIC[1]*STATES[6]); resid[7] = RATES[7] - (( CONSTANTS[26]*ALGEBRAIC[1]*STATES[8] - ( CONSTANTS[8]*STATES[7]*(STATES[4]+STATES[2]))/CONSTANTS[9])+ CONSTANTS[35]*STATES[9]) - CONSTANTS[27]*ALGEBRAIC[2]*STATES[7]; resid[8] = RATES[8] - (( CONSTANTS[8]*STATES[7]*(STATES[4]+STATES[2]))/CONSTANTS[9]+ CONSTANTS[10]*STATES[11]) - ( CONSTANTS[26]*ALGEBRAIC[1]+ CONSTANTS[28]*STATES[10])*STATES[8]; resid[9] = RATES[9] - CONSTANTS[27]*ALGEBRAIC[2]*STATES[7] - CONSTANTS[35]*STATES[9]; resid[10] = RATES[10] - CONSTANTS[10]*STATES[11] - CONSTANTS[28]*STATES[8]*STATES[10]; resid[11] = RATES[11] - CONSTANTS[28]*STATES[8]*STATES[10] - CONSTANTS[10]*STATES[11]; resid[12] = RATES[12] - ( ALGEBRAIC[4]*STATES[13]+ CONSTANTS[30]*STATES[14]) - ( CONSTANTS[29]*CONSTANTS[12]+ CONSTANTS[11]*CONSTANTS[13])*STATES[12]; resid[13] = RATES[13] - CONSTANTS[29]*CONSTANTS[12]*STATES[12] - ALGEBRAIC[4]*STATES[13]; resid[14] = RATES[14] - CONSTANTS[11]*CONSTANTS[13]*STATES[12] - CONSTANTS[30]*STATES[14]; resid[15] = RATES[15] - CONSTANTS[31]*STATES[16] - ALGEBRAIC[5]*STATES[15]; resid[16] = RATES[16] - ALGEBRAIC[5]*STATES[15] - CONSTANTS[31]*STATES[16]; resid[17] = RATES[17] - CONSTANTS[32]*STATES[18] - ALGEBRAIC[6]*STATES[17]; resid[18] = RATES[18] - ALGEBRAIC[6]*STATES[17] - CONSTANTS[32]*STATES[18]; resid[19] = RATES[19] - ( CONSTANTS[14]*STATES[20]+CONSTANTS[34]) - ( (CONSTANTS[33]+ALGEBRAIC[8])*STATES[19]+ CONSTANTS[15]*STATES[19]); resid[20] = RATES[20] - - CONSTANTS[14]*STATES[20]+ (CONSTANTS[33]+ALGEBRAIC[8])*STATES[19]; } 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] = (CONDVAR[0]<0.00000 ? 1.00000e-07 : 0.00000); ALGEBRAIC[1] = (CONDVAR[1]<=0.00000||CONDVAR[2]>=0.00000 ? 1.00000 - ( 0.250000*STATES[16])/(100.000/11.0000) : 0.00000); ALGEBRAIC[2] = ( CONSTANTS[16]*pow(STATES[18], CONSTANTS[18]))/(pow(CONSTANTS[17], CONSTANTS[18])+pow(STATES[18], CONSTANTS[18])); ALGEBRAIC[3] = (CONDVAR[3]>0.00000 ? 10.0000*CONSTANTS[6] : 60.0000*CONSTANTS[6]); ALGEBRAIC[4] = ( (CONSTANTS[20] - CONSTANTS[36])*STATES[11])/CONSTANTS[37]+CONSTANTS[36]; ALGEBRAIC[5] = ( 0.100000*CONSTANTS[31]*(STATES[12] - 0.310000))/(3.10000 - 0.310000); ALGEBRAIC[6] = ( 0.100000*CONSTANTS[32]*(STATES[12] - 0.310000))/(3.10000 - 0.310000); ALGEBRAIC[7] = ( 0.200000*STATES[16]+ 0.800000*STATES[18])/CONSTANTS[21]; ALGEBRAIC[8] = (40.0000/60.0000 - 4.00000/96.0000)*CONSTANTS[14]*ALGEBRAIC[7]; } 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; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { CONDVAR[0] = VOI - 15.0000; CONDVAR[1] = STATES[16] - 400.000/11.0000; CONDVAR[2] = ALGEBRAIC[0] - 1.00000e-07; CONDVAR[3] = (STATES[3]+STATES[5]+STATES[6]) - 1.00000e-13; }