/* There are a total of 18 entries in the algebraic variable array. There are a total of 16 entries in each of the rate and state variable arrays. There are a total of 76 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * STATES[0] is N in component N (nanomolar). * CONSTANTS[0] is KdN in component N (nanomolar). * CONSTANTS[1] is vsN in component N (flux). * CONSTANTS[2] is vdN in component N (flux). * CONSTANTS[3] is kc in component model_parameters (first_order_rate_constant). * CONSTANTS[4] is KIF in component model_parameters (nanomolar). * STATES[1] is F in component F (nanomolar). * CONSTANTS[5] is epsilon in component model_parameters (dimensionless). * CONSTANTS[6] is j in component model_parameters (dimensionless). * STATES[2] is Na in component Na (nanomolar). * ALGEBRAIC[0] is Vtr in component Na (flux). * CONSTANTS[7] is KdNa in component Na (nanomolar). * CONSTANTS[8] is VdNa in component Na (flux). * CONSTANTS[9] is kt1 in component Na (first_order_rate_constant). * CONSTANTS[10] is kt2 in component Na (first_order_rate_constant). * STATES[3] is Nan in component Nan (nanomolar). * CONSTANTS[11] is KdNan in component Nan (nanomolar). * CONSTANTS[12] is VdNan in component Nan (flux). * STATES[4] is MF in component MF (nanomolar). * CONSTANTS[13] is KdMF in component MF (nanomolar). * CONSTANTS[14] is KIG1 in component MF (nanomolar). * ALGEBRAIC[1] is vsFK in component MF (flux). * CONSTANTS[15] is vsF in component MF (flux). * CONSTANTS[16] is vmF in component MF (flux). * CONSTANTS[17] is KA in component MF (nanomolar). * STATES[5] is K in component K (nanomolar). * CONSTANTS[18] is p in component model_parameters (dimensionless). * CONSTANTS[19] is KdF in component F (nanomolar). * CONSTANTS[20] is vdF in component F (flux). * CONSTANTS[21] is ksF in component F (first_order_rate_constant). * ALGEBRAIC[7] is V1 in component Wnt_parameters (flux). * CONSTANTS[22] is theta in component model_parameters (dimensionless). * STATES[6] is B in component B (nanomolar). * CONSTANTS[23] is kd1 in component B (first_order_rate_constant). * CONSTANTS[24] is vsB in component B (flux). * ALGEBRAIC[13] is VK in component Wnt_parameters (flux). * ALGEBRAIC[17] is VP in component Wnt_parameters (flux). * ALGEBRAIC[8] is V2 in component Wnt_parameters (flux). * CONSTANTS[25] is Kt in component Wnt_parameters (nanomolar). * ALGEBRAIC[2] is AK in component Wnt_parameters (nanomolar). * STATES[7] is Bp in component Bp (nanomolar). * CONSTANTS[26] is kd2 in component Bp (first_order_rate_constant). * STATES[8] is BN in component BN (nanomolar). * STATES[9] is MAx in component MAx (nanomolar). * CONSTANTS[27] is v0 in component MAx (flux). * CONSTANTS[28] is vMB in component MAx (flux). * CONSTANTS[29] is vmd in component MAx (flux). * CONSTANTS[30] is KaB in component MAx (nanomolar). * CONSTANTS[31] is KaXa in component MAx (nanomolar). * CONSTANTS[32] is Kmd in component MAx (nanomolar). * CONSTANTS[33] is n in component MAx (dimensionless). * CONSTANTS[34] is m in component MAx (dimensionless). * CONSTANTS[35] is vMXa in component MAx (flux). * STATES[10] is Xa in component Xa (nanomolar). * STATES[11] is A in component A (nanomolar). * CONSTANTS[36] is ksAx in component A (first_order_rate_constant). * CONSTANTS[37] is vdAx in component A (flux). * CONSTANTS[38] is KdAx in component A (nanomolar). * CONSTANTS[39] is d1 in component Wnt_parameters (first_order_rate_constant). * CONSTANTS[40] is a1 in component Wnt_parameters (second_order_rate_constant). * CONSTANTS[41] is K1 in component Wnt_parameters (nanomolar). * CONSTANTS[42] is K2 in component Wnt_parameters (nanomolar). * CONSTANTS[43] is D in component Wnt_parameters (nanomolar). * CONSTANTS[44] is KID in component Wnt_parameters (nanomolar). * CONSTANTS[45] is kt3 in component Wnt_parameters (first_order_rate_constant). * CONSTANTS[46] is kt4 in component Wnt_parameters (first_order_rate_constant). * CONSTANTS[47] is VMK in component Wnt_parameters (flux). * CONSTANTS[48] is VMP in component Wnt_parameters (flux). * STATES[12] is Rasa in component Rasa (nanomolar). * ALGEBRAIC[9] is VaRas in component FGF_parameters (flux). * ALGEBRAIC[14] is VdRas in component FGF_parameters (flux). * CONSTANTS[49] is eta in component model_parameters (dimensionless). * STATES[13] is ERKa in component ERKa (nanomolar). * ALGEBRAIC[10] is VaErk in component FGF_parameters (flux). * ALGEBRAIC[15] is VdErk in component FGF_parameters (flux). * ALGEBRAIC[11] is VaX in component FGF_parameters (flux). * ALGEBRAIC[16] is VdX in component FGF_parameters (flux). * STATES[14] is MDusp in component MDusp (nanomolar). * ALGEBRAIC[6] is VsMDusp in component FGF_parameters (flux). * ALGEBRAIC[12] is VdMDusp in component FGF_parameters (flux). * STATES[15] is Dusp in component Dusp (nanomolar). * CONSTANTS[50] is ksDusp in component Dusp (first_order_rate_constant). * CONSTANTS[51] is vdDusp in component Dusp (flux). * CONSTANTS[52] is KdDusp in component Dusp (nanomolar). * ALGEBRAIC[3] is Rasi in component FGF_parameters (nanomolar). * ALGEBRAIC[4] is ERKi in component FGF_parameters (nanomolar). * ALGEBRAIC[5] is Xi in component FGF_parameters (nanomolar). * CONSTANTS[53] is Rast in component FGF_parameters (nanomolar). * CONSTANTS[54] is ERKt in component FGF_parameters (nanomolar). * CONSTANTS[55] is Xt in component FGF_parameters (nanomolar). * CONSTANTS[56] is kcDusp in component FGF_parameters (first_order_rate_constant). * CONSTANTS[57] is VMaRas in component FGF_parameters (flux). * CONSTANTS[58] is VMdRas in component FGF_parameters (flux). * CONSTANTS[59] is VMaErk in component FGF_parameters (flux). * CONSTANTS[60] is VMaX in component FGF_parameters (flux). * CONSTANTS[61] is VMdX in component FGF_parameters (flux). * CONSTANTS[62] is VMsMDusp in component FGF_parameters (flux). * CONSTANTS[63] is VMdMDusp in component FGF_parameters (flux). * CONSTANTS[64] is Fgf in component FGF_parameters (nanomolar). * CONSTANTS[65] is KaFgf in component FGF_parameters (nanomolar). * CONSTANTS[66] is KaRas in component FGF_parameters (nanomolar). * CONSTANTS[67] is KdRas in component FGF_parameters (nanomolar). * CONSTANTS[68] is KdErk in component FGF_parameters (nanomolar). * CONSTANTS[69] is KaErk in component FGF_parameters (nanomolar). * CONSTANTS[70] is KaX in component FGF_parameters (nanomolar). * CONSTANTS[71] is KdX in component FGF_parameters (nanomolar). * CONSTANTS[72] is KaMDusp in component FGF_parameters (nanomolar). * CONSTANTS[73] is KdMDusp in component FGF_parameters (nanomolar). * CONSTANTS[74] is q in component FGF_parameters (dimensionless). * CONSTANTS[75] is r in component FGF_parameters (dimensionless). * RATES[0] is d/dt N in component N (nanomolar). * RATES[2] is d/dt Na in component Na (nanomolar). * RATES[3] is d/dt Nan in component Nan (nanomolar). * RATES[4] is d/dt MF in component MF (nanomolar). * RATES[1] is d/dt F in component F (nanomolar). * RATES[5] is d/dt K in component K (nanomolar). * RATES[6] is d/dt B in component B (nanomolar). * RATES[7] is d/dt Bp in component Bp (nanomolar). * RATES[8] is d/dt BN in component BN (nanomolar). * RATES[9] is d/dt MAx in component MAx (nanomolar). * RATES[11] is d/dt A in component A (nanomolar). * RATES[12] is d/dt Rasa in component Rasa (nanomolar). * RATES[13] is d/dt ERKa in component ERKa (nanomolar). * RATES[10] is d/dt Xa in component Xa (nanomolar). * RATES[14] is d/dt MDusp in component MDusp (nanomolar). * RATES[15] is d/dt Dusp in component Dusp (nanomolar). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.5; CONSTANTS[0] = 1.4; CONSTANTS[1] = 0.23; CONSTANTS[2] = 2.82; CONSTANTS[3] = 3.45; CONSTANTS[4] = 0.5; STATES[1] = 0.001; CONSTANTS[5] = 0.3; CONSTANTS[6] = 2.0; STATES[2] = 0.2; CONSTANTS[7] = 0.001; CONSTANTS[8] = 0.01; CONSTANTS[9] = 0.1; CONSTANTS[10] = 0.1; STATES[3] = 0.0; CONSTANTS[11] = 0.001; CONSTANTS[12] = 0.1; STATES[4] = 0.1; CONSTANTS[13] = 0.768; CONSTANTS[14] = 2.5; CONSTANTS[15] = 3.0; CONSTANTS[16] = 1.92; CONSTANTS[17] = 0.05; STATES[5] = 3.0; CONSTANTS[18] = 2.0; CONSTANTS[19] = 0.37; CONSTANTS[20] = 0.39; CONSTANTS[21] = 0.3; CONSTANTS[22] = 1.5; STATES[6] = 0.1; CONSTANTS[23] = 0.0; CONSTANTS[24] = 0.087; CONSTANTS[25] = 3.0; STATES[7] = 0.1; CONSTANTS[26] = 7.062; STATES[8] = 0.001; STATES[9] = 0.1; CONSTANTS[27] = 0.06; CONSTANTS[28] = 1.64; CONSTANTS[29] = 0.8; CONSTANTS[30] = 0.7; CONSTANTS[31] = 0.05; CONSTANTS[32] = 0.48; CONSTANTS[33] = 2.0; CONSTANTS[34] = 2.0; CONSTANTS[35] = 0.5; STATES[10] = 0.1; STATES[11] = 0.1; CONSTANTS[36] = 0.02; CONSTANTS[37] = 0.6; CONSTANTS[38] = 0.63; CONSTANTS[39] = 0.1; CONSTANTS[40] = 1.8; CONSTANTS[41] = 0.28; CONSTANTS[42] = 0.03; CONSTANTS[43] = 2.0; CONSTANTS[44] = 0.5; CONSTANTS[45] = 0.7; CONSTANTS[46] = 1.5; CONSTANTS[47] = 5.08; CONSTANTS[48] = 1.0; STATES[12] = 0.5; CONSTANTS[49] = 0.3; STATES[13] = 0.2; STATES[14] = 0.1; STATES[15] = 0.1; CONSTANTS[50] = 0.5; CONSTANTS[51] = 2.0; CONSTANTS[52] = 0.5; CONSTANTS[53] = 2.0; CONSTANTS[54] = 2.0; CONSTANTS[55] = 2.0; CONSTANTS[56] = 1.35; CONSTANTS[57] = 4.968; CONSTANTS[58] = 0.41; CONSTANTS[59] = 3.30; CONSTANTS[60] = 1.6; CONSTANTS[61] = 0.5; CONSTANTS[62] = 0.9; CONSTANTS[63] = 0.5; CONSTANTS[64] = 1.0; CONSTANTS[65] = 0.5; CONSTANTS[66] = 0.103; CONSTANTS[67] = 0.1; CONSTANTS[68] = 0.05; CONSTANTS[69] = 0.05; CONSTANTS[70] = 0.05; CONSTANTS[71] = 0.05; CONSTANTS[72] = 0.5; CONSTANTS[73] = 0.5; CONSTANTS[74] = 2.0; CONSTANTS[75] = 2.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[5]*(CONSTANTS[1] - ( CONSTANTS[2]*(STATES[0]/(CONSTANTS[0]+STATES[0]))+ CONSTANTS[3]*STATES[0]*(pow(CONSTANTS[4], CONSTANTS[6])/(pow(CONSTANTS[4], CONSTANTS[6])+pow(STATES[1], CONSTANTS[6]))))); RATES[1] = CONSTANTS[5]*( CONSTANTS[21]*STATES[4] - CONSTANTS[20]*(STATES[1]/(CONSTANTS[19]+STATES[1]))); RATES[9] = CONSTANTS[22]*((CONSTANTS[27]+ CONSTANTS[28]*(pow(STATES[8], CONSTANTS[33])/(pow(CONSTANTS[30], CONSTANTS[33])+pow(STATES[8], CONSTANTS[33])))+ CONSTANTS[35]*(pow(STATES[10], CONSTANTS[34])/(pow(CONSTANTS[31], CONSTANTS[34])+pow(STATES[10], CONSTANTS[34])))) - CONSTANTS[29]*(STATES[9]/(CONSTANTS[32]+STATES[9]))); RATES[15] = CONSTANTS[49]*( CONSTANTS[50]*STATES[14] - CONSTANTS[51]*(STATES[15]/(CONSTANTS[52]+STATES[15]))); ALGEBRAIC[0] = CONSTANTS[9]*STATES[2] - CONSTANTS[10]*STATES[3]; RATES[2] = CONSTANTS[5]*( CONSTANTS[3]*STATES[0]*(pow(CONSTANTS[4], CONSTANTS[6])/(pow(CONSTANTS[4], CONSTANTS[6])+pow(STATES[1], CONSTANTS[6]))) - ( CONSTANTS[8]*(STATES[2]/(CONSTANTS[7]+STATES[2]))+ALGEBRAIC[0])); RATES[3] = CONSTANTS[5]*(ALGEBRAIC[0] - CONSTANTS[12]*(STATES[3]/(CONSTANTS[11]+STATES[3]))); ALGEBRAIC[1] = CONSTANTS[15]*(CONSTANTS[14]/(CONSTANTS[14]+STATES[5])); RATES[4] = CONSTANTS[5]*( ALGEBRAIC[1]*(pow(STATES[3], CONSTANTS[18])/(pow(CONSTANTS[17], CONSTANTS[18])+pow(STATES[3], CONSTANTS[18]))) - CONSTANTS[16]*(STATES[4]/(CONSTANTS[13]+STATES[4]))); ALGEBRAIC[2] = CONSTANTS[25] - STATES[5]; ALGEBRAIC[7] = CONSTANTS[39]*ALGEBRAIC[2] - CONSTANTS[40]*STATES[11]*STATES[5]; RATES[5] = CONSTANTS[22]*ALGEBRAIC[7]; ALGEBRAIC[8] = CONSTANTS[46]*STATES[8] - CONSTANTS[45]*STATES[6]; RATES[8] = - ( CONSTANTS[22]*ALGEBRAIC[8]); RATES[11] = CONSTANTS[22]*(( CONSTANTS[36]*STATES[9]+ALGEBRAIC[7]) - CONSTANTS[37]*(STATES[11]/(CONSTANTS[38]+STATES[11]))); ALGEBRAIC[6] = CONSTANTS[62]*(pow(STATES[10], CONSTANTS[74])/(pow(CONSTANTS[72], CONSTANTS[74])+pow(STATES[10], CONSTANTS[74]))); ALGEBRAIC[12] = CONSTANTS[63]*(STATES[14]/(CONSTANTS[73]+STATES[14])); RATES[14] = CONSTANTS[49]*(ALGEBRAIC[6] - ALGEBRAIC[12]); ALGEBRAIC[3] = CONSTANTS[53] - STATES[12]; ALGEBRAIC[9] = CONSTANTS[57]*(pow(CONSTANTS[64], CONSTANTS[75])/(pow(CONSTANTS[65], CONSTANTS[75])+pow(CONSTANTS[64], CONSTANTS[75])))*(ALGEBRAIC[3]/(CONSTANTS[66]+ALGEBRAIC[3])); ALGEBRAIC[14] = CONSTANTS[58]*(STATES[12]/(CONSTANTS[67]+STATES[12])); RATES[12] = CONSTANTS[49]*(ALGEBRAIC[9] - ALGEBRAIC[14]); ALGEBRAIC[4] = CONSTANTS[54] - STATES[13]; ALGEBRAIC[10] = CONSTANTS[59]*(STATES[12]/CONSTANTS[53])*(ALGEBRAIC[4]/(CONSTANTS[69]+ALGEBRAIC[4])); ALGEBRAIC[15] = CONSTANTS[56]*STATES[15]*(STATES[13]/(CONSTANTS[68]+STATES[13])); RATES[13] = CONSTANTS[49]*(ALGEBRAIC[10] - ALGEBRAIC[15]); ALGEBRAIC[5] = CONSTANTS[55] - STATES[10]; ALGEBRAIC[11] = CONSTANTS[60]*(STATES[13]/CONSTANTS[54])*(ALGEBRAIC[5]/(CONSTANTS[70]+ALGEBRAIC[5])); ALGEBRAIC[16] = CONSTANTS[61]*(STATES[10]/(CONSTANTS[71]+STATES[10])); RATES[10] = CONSTANTS[49]*(ALGEBRAIC[11] - ALGEBRAIC[16]); ALGEBRAIC[13] = CONSTANTS[47]*(CONSTANTS[44]/(CONSTANTS[44]+CONSTANTS[43]))*(STATES[6]/(CONSTANTS[41]+STATES[6])); ALGEBRAIC[17] = CONSTANTS[48]*(STATES[7]/(CONSTANTS[42]+STATES[7])); RATES[6] = CONSTANTS[22]*((CONSTANTS[24]+ALGEBRAIC[17]+ALGEBRAIC[8]) - ( ALGEBRAIC[13]*(ALGEBRAIC[2]/CONSTANTS[25])+ CONSTANTS[23]*STATES[6])); RATES[7] = CONSTANTS[22]*( ALGEBRAIC[13]*(ALGEBRAIC[2]/CONSTANTS[25]) - (ALGEBRAIC[17]+ CONSTANTS[26]*STATES[7])); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = CONSTANTS[9]*STATES[2] - CONSTANTS[10]*STATES[3]; ALGEBRAIC[1] = CONSTANTS[15]*(CONSTANTS[14]/(CONSTANTS[14]+STATES[5])); ALGEBRAIC[2] = CONSTANTS[25] - STATES[5]; ALGEBRAIC[7] = CONSTANTS[39]*ALGEBRAIC[2] - CONSTANTS[40]*STATES[11]*STATES[5]; ALGEBRAIC[8] = CONSTANTS[46]*STATES[8] - CONSTANTS[45]*STATES[6]; ALGEBRAIC[6] = CONSTANTS[62]*(pow(STATES[10], CONSTANTS[74])/(pow(CONSTANTS[72], CONSTANTS[74])+pow(STATES[10], CONSTANTS[74]))); ALGEBRAIC[12] = CONSTANTS[63]*(STATES[14]/(CONSTANTS[73]+STATES[14])); ALGEBRAIC[3] = CONSTANTS[53] - STATES[12]; ALGEBRAIC[9] = CONSTANTS[57]*(pow(CONSTANTS[64], CONSTANTS[75])/(pow(CONSTANTS[65], CONSTANTS[75])+pow(CONSTANTS[64], CONSTANTS[75])))*(ALGEBRAIC[3]/(CONSTANTS[66]+ALGEBRAIC[3])); ALGEBRAIC[14] = CONSTANTS[58]*(STATES[12]/(CONSTANTS[67]+STATES[12])); ALGEBRAIC[4] = CONSTANTS[54] - STATES[13]; ALGEBRAIC[10] = CONSTANTS[59]*(STATES[12]/CONSTANTS[53])*(ALGEBRAIC[4]/(CONSTANTS[69]+ALGEBRAIC[4])); ALGEBRAIC[15] = CONSTANTS[56]*STATES[15]*(STATES[13]/(CONSTANTS[68]+STATES[13])); ALGEBRAIC[5] = CONSTANTS[55] - STATES[10]; ALGEBRAIC[11] = CONSTANTS[60]*(STATES[13]/CONSTANTS[54])*(ALGEBRAIC[5]/(CONSTANTS[70]+ALGEBRAIC[5])); ALGEBRAIC[16] = CONSTANTS[61]*(STATES[10]/(CONSTANTS[71]+STATES[10])); ALGEBRAIC[13] = CONSTANTS[47]*(CONSTANTS[44]/(CONSTANTS[44]+CONSTANTS[43]))*(STATES[6]/(CONSTANTS[41]+STATES[6])); ALGEBRAIC[17] = CONSTANTS[48]*(STATES[7]/(CONSTANTS[42]+STATES[7])); }