Generated Code
The following is c_ida code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
/* There are a total of 19 entries in the algebraic variable array. There are a total of 11 entries in each of the rate and state variable arrays. There are a total of 72 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * CONSTANTS[0] is G_o in component G_o (millimolar). * STATES[0] is G in component G (millimolar). * ALGEBRAIC[3] is V_IN in component V_IN (flux). * ALGEBRAIC[4] is V_HK in component V_HK (flux). * STATES[1] is G6P in component G6P (millimolar). * ALGEBRAIC[5] is V_PFK in component V_PFK (flux). * ALGEBRAIC[17] is V_G6PDH in component V_G6PDH (flux). * STATES[2] is FDP in component FDP (millimolar). * ALGEBRAIC[7] is V_ALD in component V_ALD (flux). * STATES[3] is G3P in component G3P (millimolar). * ALGEBRAIC[8] is V_GAPDH in component V_GAPDH (flux). * STATES[4] is DPG in component DPG (millimolar). * ALGEBRAIC[9] is V_PGK in component V_PGK (flux). * STATES[5] is PEP in component PEP (millimolar). * ALGEBRAIC[18] is V_PK in component V_PK (flux). * STATES[6] is Py in component Py (millimolar). * ALGEBRAIC[14] is V_TCA in component V_TCA (flux). * ALGEBRAIC[15] is V_ADH in component V_ADH (flux). * STATES[7] is ATP in component ATP (millimolar). * CONSTANTS[1] is PO in component ATP (dimensionless). * ALGEBRAIC[16] is V_ATPase in component V_ATPase (flux). * ALGEBRAIC[0] is ADP in component ADP (millimolar). * CONSTANTS[2] is Cn in component ADP (millimolar). * CONSTANTS[3] is AMP in component AMP (millimolar). * CONSTANTS[4] is GTP in component GTP (millimolar). * CONSTANTS[5] is GDP in component GDP (millimolar). * CONSTANTS[6] is H in component H (millimolar). * CONSTANTS[7] is NADP in component NADP (millimolar). * CONSTANTS[8] is NADH in component NADH (millimolar). * CONSTANTS[9] is NAD in component NAD (millimolar). * ALGEBRAIC[1] is CD in component CD (millimolar). * CONSTANTS[10] is CMTP in component CD (millimolar). * STATES[8] is CT in component CT (millimolar). * STATES[9] is CP in component CP (millimolar). * CONSTANTS[11] is kpol in component CT (third_order_rate_constant). * CONSTANTS[12] is kf in component CT (first_order_rate_constant). * CONSTANTS[13] is kb in component CT (second_order_rate_constant). * CONSTANTS[14] is kdp in component CP (first_order_rate_constant). * STATES[10] is PKp in component PKp (millimolar). * CONSTANTS[15] is kp2 in component PKp (second_order_rate_constant). * CONSTANTS[16] is kp3 in component PKp (first_order_rate_constant). * CONSTANTS[17] is k4 in component PKp (second_order_rate_constant). * ALGEBRAIC[2] is PKt in component PKt (millimolar). * CONSTANTS[18] is C_PK in component PKt (millimolar). * CONSTANTS[19] is Ke_in in component V_IN (millimolar). * CONSTANTS[20] is KG_in in component V_IN (millimolar). * CONSTANTS[21] is V_IN_max in component V_IN (flux). * CONSTANTS[22] is KG_m in component V_HK (millimolar). * CONSTANTS[23] is KG_s in component V_HK (millimolar). * CONSTANTS[24] is KATP_m in component V_HK (millimolar). * CONSTANTS[25] is V_HK_max in component V_HK (flux). * CONSTANTS[26] is KG6P_r in component V_PFK (millimolar). * CONSTANTS[27] is KATP_r in component V_PFK (millimolar). * CONSTANTS[28] is KAMP_r in component V_PFK (millimolar). * CONSTANTS[29] is cATP in component V_PFK (dimensionless). * CONSTANTS[30] is cAMP in component V_PFK (dimensionless). * CONSTANTS[31] is cG6P in component V_PFK (dimensionless). * CONSTANTS[32] is Lo in component V_PFK (dimensionless). * CONSTANTS[33] is gr in component V_PFK (dimensionless). * CONSTANTS[34] is n1 in component V_PFK (dimensionless). * CONSTANTS[35] is V_PFK_max in component V_PFK (flux). * ALGEBRAIC[6] is TUB in component V_G6PDH (millimolar). * CONSTANTS[36] is KG6P in component V_G6PDH (millimolar). * CONSTANTS[37] is KNADP in component V_G6PDH (millimolar). * CONSTANTS[38] is KNADP_ in component V_G6PDH (millimolar). * CONSTANTS[39] is KTUB in component V_G6PDH (millimolar). * CONSTANTS[40] is V_G6PDH_max in component V_G6PDH (flux). * CONSTANTS[41] is V_G6PDH_max_II in component V_G6PDH (flux). * CONSTANTS[42] is KG3P_m in component V_ALD (millimolar). * CONSTANTS[43] is KFDP_m in component V_ALD (millimolar). * CONSTANTS[44] is V_ALD_max in component V_ALD (flux). * CONSTANTS[45] is V_ALD_max_r in component V_ALD (flux). * CONSTANTS[46] is K1 in component V_GAPDH (millimolar). * CONSTANTS[47] is K2 in component V_GAPDH (millimolar). * CONSTANTS[48] is K3 in component V_GAPDH (millimolar). * CONSTANTS[49] is KG3P in component V_GAPDH (millimolar). * CONSTANTS[50] is KNAD in component V_GAPDH (millimolar). * CONSTANTS[51] is KNADH_i in component V_GAPDH (millimolar). * CONSTANTS[52] is V_GAPDH_max in component V_GAPDH (flux). * CONSTANTS[53] is KDPG_m in component V_PGK (millimolar). * CONSTANTS[54] is V_PGK_max in component V_PGK (flux). * ALGEBRAIC[10] is R in component V_PK (dimensionless). * ALGEBRAIC[11] is T in component V_PK (dimensionless). * CONSTANTS[55] is KpH in component V_PK (millimolar). * CONSTANTS[56] is KPEP_r in component V_PK (millimolar). * CONSTANTS[57] is KADP_r in component V_PK (millimolar). * CONSTANTS[58] is KFDP_r in component V_PK (millimolar). * CONSTANTS[59] is cADP in component V_PK (dimensionless). * CONSTANTS[60] is cFDP in component V_PK (dimensionless). * CONSTANTS[61] is cPEP in component V_PK (dimensionless). * CONSTANTS[62] is Lo_PK in component V_PK (dimensionless). * CONSTANTS[63] is gr_PK in component V_PK (dimensionless). * CONSTANTS[64] is gt_PK in component V_PK (dimensionless). * ALGEBRAIC[13] is n in component V_PK (dimensionless). * ALGEBRAIC[12] is V_PK_max in component V_PK (flux). * CONSTANTS[65] is V_PKt_max in component V_PK (flux). * CONSTANTS[66] is V_PKp_max in component V_PK (flux). * CONSTANTS[67] is KPy_m in component V_TCA (millimolar). * CONSTANTS[68] is V_TCA_max in component V_TCA (flux). * CONSTANTS[69] is KPy__m in component V_ADH (millimolar). * CONSTANTS[70] is V_ADH_max in component V_ADH (flux). * CONSTANTS[71] is KATP in component V_ATPase (first_order_rate_constant). * RATES[0] is d/dt G in component G (millimolar). * RATES[1] is d/dt G6P in component G6P (millimolar). * RATES[2] is d/dt FDP in component FDP (millimolar). * RATES[3] is d/dt G3P in component G3P (millimolar). * RATES[4] is d/dt DPG in component DPG (millimolar). * RATES[5] is d/dt PEP in component PEP (millimolar). * RATES[6] is d/dt Py in component Py (millimolar). * RATES[7] is d/dt ATP in component ATP (millimolar). * RATES[8] is d/dt CT in component CT (millimolar). * RATES[9] is d/dt CP in component CP (millimolar). * RATES[10] is d/dt PKp in component PKp (millimolar). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 1; STATES[0] = 0.01; STATES[1] = 0.01; STATES[2] = 0.01; STATES[3] = 0.01; STATES[4] = 0.01; STATES[5] = 0.01; STATES[6] = 0.01; STATES[7] = 1.4; CONSTANTS[1] = 4; CONSTANTS[2] = 9; CONSTANTS[3] = 0.5; CONSTANTS[4] = 0.95; CONSTANTS[5] = 0.05; CONSTANTS[6] = 3.2e-8; CONSTANTS[7] = 1; CONSTANTS[8] = 0.01; CONSTANTS[9] = 1; CONSTANTS[10] = 0.9; STATES[8] = 0.2; STATES[9] = 1.2; CONSTANTS[11] = 10; CONSTANTS[12] = 3; CONSTANTS[13] = 2.5; CONSTANTS[14] = 0.0025; STATES[10] = 0.005; CONSTANTS[15] = 10; CONSTANTS[16] = 0.05; CONSTANTS[17] = 0.02; CONSTANTS[18] = 0.01; CONSTANTS[19] = 12; CONSTANTS[20] = 0.001; CONSTANTS[21] = 10; CONSTANTS[22] = 0.11; CONSTANTS[23] = 0.0062; CONSTANTS[24] = 0.1; CONSTANTS[25] = 13; CONSTANTS[26] = 1; CONSTANTS[27] = 0.06; CONSTANTS[28] = 0.025; CONSTANTS[29] = 1; CONSTANTS[30] = 0.019; CONSTANTS[31] = 0.0005; CONSTANTS[32] = 25000; CONSTANTS[33] = 10; CONSTANTS[34] = 2; CONSTANTS[35] = 30; CONSTANTS[36] = 0.05; CONSTANTS[37] = 0.05; CONSTANTS[38] = 0.05; CONSTANTS[39] = 0.4; CONSTANTS[40] = 1.6; CONSTANTS[41] = 1; CONSTANTS[42] = 20; CONSTANTS[43] = 0.5; CONSTANTS[44] = 2.5; CONSTANTS[45] = 1; CONSTANTS[46] = 1.1; CONSTANTS[47] = 1.5; CONSTANTS[48] = 2.5; CONSTANTS[49] = 0.0025; CONSTANTS[50] = 0.18; CONSTANTS[51] = 0.0003; CONSTANTS[52] = 10; CONSTANTS[53] = 0.002; CONSTANTS[54] = 3; CONSTANTS[55] = 9.5e-9; CONSTANTS[56] = 1; CONSTANTS[57] = 0.06; CONSTANTS[58] = 0.025; CONSTANTS[59] = 1; CONSTANTS[60] = 0.01; CONSTANTS[61] = 0.02; CONSTANTS[62] = 1000; CONSTANTS[63] = 0.1; CONSTANTS[64] = 1; CONSTANTS[65] = 25; CONSTANTS[66] = 50; CONSTANTS[67] = 0.329; CONSTANTS[68] = 10; CONSTANTS[69] = 0.169; CONSTANTS[70] = 0.5; CONSTANTS[71] = 5; 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; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - ALGEBRAIC[3] - ALGEBRAIC[4]; resid[1] = RATES[1] - ALGEBRAIC[4] - (ALGEBRAIC[5]+ALGEBRAIC[17]); resid[2] = RATES[2] - ALGEBRAIC[5] - ALGEBRAIC[7]; resid[3] = RATES[3] - 2.00000*ALGEBRAIC[7] - ALGEBRAIC[8]; resid[4] = RATES[4] - ALGEBRAIC[8] - ALGEBRAIC[9]; resid[5] = RATES[5] - ALGEBRAIC[9] - ALGEBRAIC[18]; resid[6] = RATES[6] - ALGEBRAIC[18] - (ALGEBRAIC[14]+ALGEBRAIC[15]); resid[7] = RATES[7] - (ALGEBRAIC[9]+ALGEBRAIC[18]+ CONSTANTS[1]*ALGEBRAIC[14]) - (ALGEBRAIC[4]+ALGEBRAIC[5]+ALGEBRAIC[16]); resid[8] = RATES[8] - - ( CONSTANTS[11]*STATES[8]*pow(STATES[9], 2.00000)+ CONSTANTS[12]*ALGEBRAIC[1]+ CONSTANTS[13]*STATES[8]*CONSTANTS[5]); resid[9] = RATES[9] - CONSTANTS[11]*STATES[8]*pow(STATES[9], 2.00000) - CONSTANTS[14]*STATES[9]; resid[10] = RATES[10] - 0.100000*CONSTANTS[15]*ALGEBRAIC[2]*STATES[9] - ( CONSTANTS[16]*STATES[10]+ CONSTANTS[17]*STATES[10]*CONSTANTS[4]); } 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[1] = CONSTANTS[10] - (STATES[8]+STATES[9]); ALGEBRAIC[2] = CONSTANTS[18] - STATES[10]; ALGEBRAIC[3] = CONSTANTS[21]*(CONSTANTS[0]/( (CONSTANTS[20]+CONSTANTS[0])*(1.00000+STATES[1]/CONSTANTS[19])) - STATES[0]/( (CONSTANTS[20]+STATES[0])*(1.00000+STATES[1]/CONSTANTS[19]))); ALGEBRAIC[4] = ( CONSTANTS[25]*1.00000)/(1.00000+( CONSTANTS[23]*CONSTANTS[24])/( STATES[0]*STATES[7])+CONSTANTS[22]/STATES[0]+CONSTANTS[24]/STATES[7]); ALGEBRAIC[5] = ( (( (( CONSTANTS[35]*CONSTANTS[33]*STATES[1])/CONSTANTS[26])*STATES[7])/CONSTANTS[27])*pow(1.00000+STATES[1]/CONSTANTS[26]+STATES[7]/CONSTANTS[27]+( (( CONSTANTS[33]*STATES[1])/CONSTANTS[26])*STATES[7])/CONSTANTS[27], CONSTANTS[34] - 1.00000))/(pow(1.00000+STATES[1]/CONSTANTS[26]+STATES[7]/CONSTANTS[27]+( (( CONSTANTS[33]*STATES[1])/CONSTANTS[26])*STATES[7])/CONSTANTS[27], CONSTANTS[34])+ CONSTANTS[32]*pow((1.00000+( CONSTANTS[30]*CONSTANTS[3])/CONSTANTS[28])/(1.00000+CONSTANTS[3]/CONSTANTS[28]), CONSTANTS[34])*pow(1.00000+( CONSTANTS[31]*STATES[1])/CONSTANTS[26]+( CONSTANTS[29]*STATES[7])/CONSTANTS[27]+( (( CONSTANTS[33]*CONSTANTS[31]*STATES[1])/CONSTANTS[26])*CONSTANTS[29]*STATES[7])/CONSTANTS[27], CONSTANTS[34])); ALGEBRAIC[7] = (( CONSTANTS[44]*STATES[2])/CONSTANTS[43] - ( CONSTANTS[45]*STATES[3])/CONSTANTS[42])/(1.00000+STATES[2]/CONSTANTS[43]+STATES[3]/CONSTANTS[42]); ALGEBRAIC[0] = CONSTANTS[2] - (STATES[7]+CONSTANTS[3]); ALGEBRAIC[8] = CONSTANTS[52]/(1.00000+CONSTANTS[49]/STATES[3]+ (CONSTANTS[50]/CONSTANTS[9])*(1.00000+CONSTANTS[3]/CONSTANTS[46]+ALGEBRAIC[0]/CONSTANTS[47]+STATES[7]/CONSTANTS[48])+ (( CONSTANTS[49]*CONSTANTS[50])/( STATES[3]*CONSTANTS[9]))*(1.00000+CONSTANTS[8]/CONSTANTS[51])+1.00000+CONSTANTS[3]/CONSTANTS[46]+ALGEBRAIC[0]/CONSTANTS[47]+STATES[7]/CONSTANTS[48]); ALGEBRAIC[9] = ( CONSTANTS[54]*STATES[4])/(CONSTANTS[53]+STATES[4]); ALGEBRAIC[14] = ( CONSTANTS[68]*pow(STATES[6], 2.00000))/(pow(CONSTANTS[67], 2.00000)+pow(STATES[6], 2.00000)); ALGEBRAIC[15] = ( CONSTANTS[70]*STATES[6])/(CONSTANTS[69]+STATES[6]); ALGEBRAIC[16] = CONSTANTS[71]*STATES[7]; ALGEBRAIC[6] = STATES[8]+ALGEBRAIC[1]; ALGEBRAIC[17] = CONSTANTS[40]/(( CONSTANTS[36]*CONSTANTS[37])/( STATES[1]*CONSTANTS[7])+CONSTANTS[36]/STATES[1]+CONSTANTS[37]/CONSTANTS[7]+1.00000)+CONSTANTS[41]/(( CONSTANTS[36]*CONSTANTS[38]*CONSTANTS[39])/( STATES[1]*CONSTANTS[7]*ALGEBRAIC[6])+( CONSTANTS[36]*CONSTANTS[38])/( STATES[1]*CONSTANTS[7])+( CONSTANTS[38]*CONSTANTS[39])/( CONSTANTS[7]*ALGEBRAIC[6])+( CONSTANTS[36]*CONSTANTS[39])/( STATES[1]*ALGEBRAIC[6])+CONSTANTS[39]/ALGEBRAIC[6]+CONSTANTS[36]/STATES[1]+CONSTANTS[38]/CONSTANTS[7]+1.00000); ALGEBRAIC[10] = 1.00000+STATES[5]/CONSTANTS[56]+ALGEBRAIC[0]/CONSTANTS[57]+( (( CONSTANTS[63]*STATES[5])/CONSTANTS[56])*ALGEBRAIC[0])/CONSTANTS[57]; ALGEBRAIC[11] = 1.00000+( CONSTANTS[61]*STATES[5])/CONSTANTS[56]+( CONSTANTS[59]*ALGEBRAIC[0])/CONSTANTS[57]+( (( CONSTANTS[64]*CONSTANTS[61]*STATES[5])/CONSTANTS[56])*CONSTANTS[59]*ALGEBRAIC[0])/CONSTANTS[57]; ALGEBRAIC[13] = 4.00000+STATES[10]/CONSTANTS[18]; ALGEBRAIC[12] = CONSTANTS[65]+( (CONSTANTS[66] - CONSTANTS[65])*STATES[10])/CONSTANTS[18]; ALGEBRAIC[18] = ( (ALGEBRAIC[12]/(1.00000+CONSTANTS[55]/CONSTANTS[6]))*( CONSTANTS[63]*(STATES[5]/CONSTANTS[56])*(ALGEBRAIC[0]/CONSTANTS[57])*pow(ALGEBRAIC[10], ALGEBRAIC[13] - 1.00000)+ CONSTANTS[62]*pow((1.00000+( CONSTANTS[60]*STATES[2])/CONSTANTS[58])/(1.00000+STATES[2]/CONSTANTS[58]), ALGEBRAIC[13])*(STATES[2]/CONSTANTS[58])*CONSTANTS[64]*(( CONSTANTS[61]*STATES[5])/CONSTANTS[56])*(( CONSTANTS[59]*ALGEBRAIC[0])/CONSTANTS[57])*pow(ALGEBRAIC[11], ALGEBRAIC[13] - 1.00000)))/(pow(ALGEBRAIC[10], ALGEBRAIC[13])+ CONSTANTS[62]*pow((1.00000+( CONSTANTS[60]*STATES[2])/CONSTANTS[58])/(1.00000+STATES[2]/CONSTANTS[58]), ALGEBRAIC[13])*pow(ALGEBRAIC[11], ALGEBRAIC[13])); } 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; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }