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 29 entries in the algebraic variable array. There are a total of 15 entries in each of the rate and state variable arrays. There are a total of 46 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * CONSTANTS[0] is k1 in component rate_constants (first_order_rate_constant). * CONSTANTS[1] is kn1 in component rate_constants (first_order_rate_constant). * CONSTANTS[2] is k2 in component rate_constants (first_order_rate_constant). * CONSTANTS[3] is kn2 in component rate_constants (first_order_rate_constant). * CONSTANTS[4] is k2_ in component rate_constants (first_order_rate_constant). * CONSTANTS[5] is k3_ in component rate_constants (first_order_rate_constant). * CONSTANTS[6] is kn3_ in component rate_constants (first_order_rate_constant). * CONSTANTS[7] is k4 in component rate_constants (first_order_rate_constant). * CONSTANTS[8] is k5 in component rate_constants (first_order_rate_constant). * CONSTANTS[9] is k6 in component rate_constants (first_order_rate_constant). * CONSTANTS[10] is k7 in component rate_constants (first_order_rate_constant). * CONSTANTS[11] is kn7 in component rate_constants (first_order_rate_constant). * CONSTANTS[12] is k8 in component rate_constants (first_order_rate_constant). * CONSTANTS[13] is kn8 in component rate_constants (first_order_rate_constant). * CONSTANTS[14] is k8_ in component rate_constants (first_order_rate_constant). * CONSTANTS[15] is k9 in component rate_constants (first_order_rate_constant). * CONSTANTS[16] is kn9 in component rate_constants (first_order_rate_constant). * CONSTANTS[17] is k9_ in component rate_constants (first_order_rate_constant). * CONSTANTS[18] is k10 in component rate_constants (first_order_rate_constant). * CONSTANTS[19] is k11 in component rate_constants (first_order_rate_constant). * CONSTANTS[20] is k12 in component rate_constants (first_order_rate_constant). * CONSTANTS[21] is k13 in component rate_constants (first_order_rate_constant). * CONSTANTS[22] is k14 in component rate_constants (first_order_rate_constant). * CONSTANTS[23] is k14_ in component rate_constants (first_order_rate_constant). * CONSTANTS[24] is k15 in component rate_constants (first_order_rate_constant). * CONSTANTS[25] is k16 in component rate_constants (first_order_rate_constant). * CONSTANTS[26] is k17 in component rate_constants (first_order_rate_constant). * CONSTANTS[27] is k18 in component rate_constants (first_order_rate_constant). * CONSTANTS[28] is kn18 in component rate_constants (first_order_rate_constant). * CONSTANTS[29] is k20 in component rate_constants (first_order_rate_constant). * CONSTANTS[30] is k21 in component rate_constants (first_order_rate_constant). * CONSTANTS[31] is k22 in component rate_constants (first_order_rate_constant). * CONSTANTS[32] is k23 in component rate_constants (first_order_rate_constant). * CONSTANTS[33] is kn23 in component rate_constants (first_order_rate_constant). * CONSTANTS[34] is kPlk1 in component rate_constants (first_order_rate_constant). * CONSTANTS[35] is kPlk1_ in component rate_constants (first_order_rate_constant). * CONSTANTS[36] is kctak1 in component rate_constants (first_order_rate_constant). * CONSTANTS[37] is kctak1_ in component rate_constants (first_order_rate_constant). * CONSTANTS[38] is kex in component rate_constants (first_order_rate_constant). * STATES[0] is Chk1P in component Chk1P (dimensionless). * ALGEBRAIC[3] is V_n1 in component V_n1 (first_order_rate_constant). * ALGEBRAIC[2] is V_1 in component V_1 (first_order_rate_constant). * STATES[1] is Rad3 in component Rad3 (dimensionless). * CONSTANTS[41] is V_4 in component V_4 (first_order_rate_constant). * ALGEBRAIC[9] is V_5 in component V_5 (first_order_rate_constant). * STATES[2] is p53 in component p53 (dimensionless). * CONSTANTS[42] is V_10 in component V_10 (first_order_rate_constant). * ALGEBRAIC[17] is V_11 in component V_11 (first_order_rate_constant). * STATES[3] is preMPF in component preMPF (dimensionless). * ALGEBRAIC[19] is V_14 in component V_14 (first_order_rate_constant). * ALGEBRAIC[16] is V_n9 in component V_n9 (first_order_rate_constant). * ALGEBRAIC[15] is V_9 in component V_9 (first_order_rate_constant). * STATES[4] is MPF in component MPF (dimensionless). * ALGEBRAIC[27] is V_n23 in component V_n23 (first_order_rate_constant). * ALGEBRAIC[26] is V_23 in component V_23 (first_order_rate_constant). * ALGEBRAIC[20] is V_15 in component V_15 (first_order_rate_constant). * STATES[5] is p21 in component p21 (dimensionless). * CONSTANTS[43] is V_21 in component V_21 (first_order_rate_constant). * ALGEBRAIC[24] is V_20 in component V_20 (first_order_rate_constant). * ALGEBRAIC[25] is V_22 in component V_22 (first_order_rate_constant). * STATES[6] is p21_MPF in component p21_MPF (dimensionless). * STATES[7] is iCdc25 in component iCdc25 (dimensionless). * ALGEBRAIC[12] is V_n7 in component V_n7 (first_order_rate_constant). * ALGEBRAIC[8] is V_n3_ in component V_n3_ (first_order_rate_constant). * ALGEBRAIC[11] is V_7 in component V_7 (first_order_rate_constant). * ALGEBRAIC[6] is V_2_ in component V_2_ (first_order_rate_constant). * CONSTANTS[39] is V_in in component V_in (first_order_rate_constant). * STATES[8] is iCdc25Ps216 in component iCdc25Ps216 (dimensionless). * ALGEBRAIC[23] is V_n18 in component V_n18 (first_order_rate_constant). * ALGEBRAIC[22] is V_18 in component V_18 (first_order_rate_constant). * ALGEBRAIC[7] is V_3_ in component V_3_ (first_order_rate_constant). * STATES[9] is iCdc25Ps216_protein1433 in component iCdc25Ps216_protein1433 (dimensionless). * ALGEBRAIC[28] is V_ex in component V_ex (first_order_rate_constant). * STATES[10] is aCdc25 in component aCdc25 (dimensionless). * ALGEBRAIC[5] is V_n2 in component V_n2 (first_order_rate_constant). * ALGEBRAIC[4] is V_2 in component V_2 (first_order_rate_constant). * STATES[11] is aCdc25Ps216 in component aCdc25Ps216 (dimensionless). * STATES[12] is protein1433 in component protein1433 (dimensionless). * ALGEBRAIC[10] is V_6 in component V_6 (first_order_rate_constant). * CONSTANTS[44] is V_13 in component V_13 (first_order_rate_constant). * ALGEBRAIC[18] is V_12 in component V_12 (first_order_rate_constant). * STATES[13] is Wee1 in component Wee1 (dimensionless). * CONSTANTS[45] is V_16 in component V_16 (first_order_rate_constant). * ALGEBRAIC[14] is V_n8 in component V_n8 (first_order_rate_constant). * ALGEBRAIC[13] is V_8 in component V_8 (first_order_rate_constant). * STATES[14] is Wee1P in component Wee1P (dimensionless). * ALGEBRAIC[21] is V_17 in component V_17 (first_order_rate_constant). * ALGEBRAIC[0] is aCdc25_T in component aCdc25_T (dimensionless). * ALGEBRAIC[1] is Chk1 in component V_1 (dimensionless). * CONSTANTS[40] is Chk1_T in component V_1 (dimensionless). * RATES[0] is d/dt Chk1P in component Chk1P (dimensionless). * RATES[1] is d/dt Rad3 in component Rad3 (dimensionless). * RATES[2] is d/dt p53 in component p53 (dimensionless). * RATES[3] is d/dt preMPF in component preMPF (dimensionless). * RATES[4] is d/dt MPF in component MPF (dimensionless). * RATES[5] is d/dt p21 in component p21 (dimensionless). * RATES[6] is d/dt p21_MPF in component p21_MPF (dimensionless). * RATES[7] is d/dt iCdc25 in component iCdc25 (dimensionless). * RATES[8] is d/dt iCdc25Ps216 in component iCdc25Ps216 (dimensionless). * RATES[9] is d/dt iCdc25Ps216_protein1433 in component iCdc25Ps216_protein1433 (dimensionless). * RATES[10] is d/dt aCdc25 in component aCdc25 (dimensionless). * RATES[11] is d/dt aCdc25Ps216 in component aCdc25Ps216 (dimensionless). * RATES[12] is d/dt protein1433 in component protein1433 (dimensionless). * RATES[13] is d/dt Wee1 in component Wee1 (dimensionless). * RATES[14] is d/dt Wee1P in component Wee1P (dimensionless). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 1; CONSTANTS[1] = 10; CONSTANTS[2] = 0.1; CONSTANTS[3] = 0.01; CONSTANTS[4] = 0.1; CONSTANTS[5] = 100; CONSTANTS[6] = 0; CONSTANTS[7] = 0; CONSTANTS[8] = 1; CONSTANTS[9] = 0.01; CONSTANTS[10] = 1; CONSTANTS[11] = 0.01; CONSTANTS[12] = 0.1; CONSTANTS[13] = 0.01; CONSTANTS[14] = 0; CONSTANTS[15] = 1; CONSTANTS[16] = 1; CONSTANTS[17] = 0; CONSTANTS[18] = 0; CONSTANTS[19] = 1; CONSTANTS[20] = 0.1; CONSTANTS[21] = 1; CONSTANTS[22] = 0.0005; CONSTANTS[23] = 1; CONSTANTS[24] = 0.01; CONSTANTS[25] = 0.0002; CONSTANTS[26] = 0.1; CONSTANTS[27] = 1; CONSTANTS[28] = 0.01; CONSTANTS[29] = 0.1; CONSTANTS[30] = 0.01; CONSTANTS[31] = 0.1; CONSTANTS[32] = 0.1; CONSTANTS[33] = 1; CONSTANTS[34] = 0; CONSTANTS[35] = 0; CONSTANTS[36] = 0; CONSTANTS[37] = 0; CONSTANTS[38] = 1; STATES[0] = 0.000001; STATES[1] = 0; STATES[2] = 0; STATES[3] = 0.000001; STATES[4] = 0.00000001; STATES[5] = 0; STATES[6] = 0; STATES[7] = 0.000001; CONSTANTS[39] = 0.00001; STATES[8] = 0.00002; STATES[9] = 0.03; STATES[10] = 0.000001; STATES[11] = 0; STATES[12] = 2; STATES[13] = 0.001; STATES[14] = 0; CONSTANTS[40] = 1; CONSTANTS[41] = CONSTANTS[7]; CONSTANTS[42] = CONSTANTS[18]; CONSTANTS[43] = CONSTANTS[30]; CONSTANTS[44] = CONSTANTS[21]; CONSTANTS[45] = CONSTANTS[25]; 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; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - ALGEBRAIC[2] - ALGEBRAIC[3]; resid[1] = RATES[1] - CONSTANTS[41] - ALGEBRAIC[9]; resid[2] = RATES[2] - CONSTANTS[42] - ALGEBRAIC[17]; resid[3] = RATES[3] - (ALGEBRAIC[19]+ALGEBRAIC[16]) - ALGEBRAIC[15]; resid[4] = RATES[4] - (ALGEBRAIC[15]+ALGEBRAIC[27]) - (ALGEBRAIC[16]+ALGEBRAIC[26]+ALGEBRAIC[20]); resid[5] = RATES[5] - (ALGEBRAIC[24]+CONSTANTS[43]+ALGEBRAIC[27]) - (ALGEBRAIC[25]+ALGEBRAIC[26]); resid[6] = RATES[6] - ALGEBRAIC[26] - ALGEBRAIC[27]; resid[7] = RATES[7] - (ALGEBRAIC[12]+ALGEBRAIC[8]+CONSTANTS[39]) - (ALGEBRAIC[11]+ALGEBRAIC[6]); resid[8] = RATES[8] - (ALGEBRAIC[6]+ALGEBRAIC[23]) - (ALGEBRAIC[22]+ALGEBRAIC[7]); resid[9] = RATES[9] - ALGEBRAIC[7] - (ALGEBRAIC[8]+ALGEBRAIC[28]); resid[10] = RATES[10] - (ALGEBRAIC[11]+ALGEBRAIC[5]) - (ALGEBRAIC[12]+ALGEBRAIC[4]); resid[11] = RATES[11] - (ALGEBRAIC[4]+ALGEBRAIC[22]) - (ALGEBRAIC[5]+ALGEBRAIC[23]); resid[12] = RATES[12] - (ALGEBRAIC[10]+CONSTANTS[44]+ALGEBRAIC[8]) - (ALGEBRAIC[7]+ALGEBRAIC[18]); resid[13] = RATES[13] - (CONSTANTS[45]+ALGEBRAIC[14]) - ALGEBRAIC[13]; resid[14] = RATES[14] - ALGEBRAIC[13] - (ALGEBRAIC[14]+ALGEBRAIC[21]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = STATES[10]+STATES[11]; } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[1] = CONSTANTS[40] - STATES[0]; ALGEBRAIC[2] = CONSTANTS[0]*ALGEBRAIC[1]*STATES[1]; ALGEBRAIC[3] = CONSTANTS[1]*STATES[0]; ALGEBRAIC[4] = CONSTANTS[2]*STATES[0]*STATES[10]+ CONSTANTS[36]*STATES[10]; ALGEBRAIC[5] = CONSTANTS[3]*STATES[11]; ALGEBRAIC[6] = CONSTANTS[4]*STATES[0]*STATES[7]+ CONSTANTS[37]*STATES[7]; ALGEBRAIC[7] = CONSTANTS[5]*STATES[8]*STATES[12]; ALGEBRAIC[8] = CONSTANTS[6]*STATES[9]; ALGEBRAIC[9] = CONSTANTS[8]*STATES[1]; ALGEBRAIC[10] = CONSTANTS[9]*STATES[2]; ALGEBRAIC[11] = CONSTANTS[10]*STATES[4]*STATES[7]+ CONSTANTS[34]*STATES[7]; ALGEBRAIC[12] = CONSTANTS[11]*STATES[10]; ALGEBRAIC[13] = CONSTANTS[12]*STATES[4]*STATES[13]+ CONSTANTS[14]*STATES[13]; ALGEBRAIC[14] = CONSTANTS[13]*STATES[14]; ALGEBRAIC[15] = CONSTANTS[15]*(STATES[10]+STATES[11])*STATES[3]+ CONSTANTS[17]*STATES[3]; ALGEBRAIC[16] = CONSTANTS[16]*STATES[4]*STATES[13]; ALGEBRAIC[17] = CONSTANTS[19]*STATES[2]; ALGEBRAIC[18] = CONSTANTS[20]*STATES[12]; ALGEBRAIC[19] = (CONSTANTS[22]/(1.00000+ CONSTANTS[23]*STATES[2]))*1.00000; ALGEBRAIC[20] = CONSTANTS[24]*pow(STATES[4], 2.00000); ALGEBRAIC[21] = CONSTANTS[26]*STATES[14]; ALGEBRAIC[22] = CONSTANTS[27]*STATES[4]*STATES[8]+ CONSTANTS[35]*STATES[8]; ALGEBRAIC[23] = CONSTANTS[28]*STATES[11]; ALGEBRAIC[24] = CONSTANTS[29]*STATES[2]; ALGEBRAIC[25] = CONSTANTS[31]*STATES[5]; ALGEBRAIC[26] = CONSTANTS[32]*STATES[4]*STATES[5]; ALGEBRAIC[27] = CONSTANTS[33]*STATES[6]; ALGEBRAIC[28] = CONSTANTS[38]*STATES[9]; } 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; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }