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 32 entries in the algebraic variable array.
   There are a total of 23 entries in each of the rate and state variable arrays.
   There are a total of 50 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (second).
 * STATES[0] is EGF in component EGF (nanomolar).
 * ALGEBRAIC[0] is v1 in component v1 (flux).
 * STATES[1] is R in component R (nanomolar).
 * STATES[2] is Ra in component Ra (nanomolar).
 * ALGEBRAIC[1] is v2 in component v2 (flux).
 * STATES[3] is R2 in component R2 (nanomolar).
 * ALGEBRAIC[2] is v3 in component v3 (flux).
 * ALGEBRAIC[3] is v4 in component v4 (flux).
 * STATES[4] is RP in component RP (nanomolar).
 * ALGEBRAIC[6] is v7 in component v7 (flux).
 * ALGEBRAIC[10] is v11 in component v11 (flux).
 * ALGEBRAIC[14] is v15 in component v15 (flux).
 * ALGEBRAIC[17] is v18 in component v18 (flux).
 * ALGEBRAIC[19] is v20 in component v20 (flux).
 * ALGEBRAIC[4] is v5 in component v5 (flux).
 * ALGEBRAIC[8] is v9 in component v9 (flux).
 * ALGEBRAIC[12] is v13 in component v13 (flux).
 * STATES[5] is R_PL in component R_PL (nanomolar).
 * ALGEBRAIC[5] is v6 in component v6 (flux).
 * STATES[6] is R_PLP in component R_PLP (nanomolar).
 * STATES[7] is R_G in component R_G (nanomolar).
 * ALGEBRAIC[9] is v10 in component v10 (flux).
 * STATES[8] is R_G_S in component R_G_S (nanomolar).
 * STATES[9] is R_Sh in component R_Sh (nanomolar).
 * ALGEBRAIC[13] is v14 in component v14 (flux).
 * STATES[10] is R_ShP in component R_ShP (nanomolar).
 * ALGEBRAIC[23] is v24 in component v24 (flux).
 * ALGEBRAIC[16] is v17 in component v17 (flux).
 * STATES[11] is R_Sh_G in component R_Sh_G (nanomolar).
 * ALGEBRAIC[18] is v19 in component v19 (flux).
 * STATES[12] is R_Sh_G_S in component R_Sh_G_S (nanomolar).
 * STATES[13] is G_S in component G_S (nanomolar).
 * ALGEBRAIC[22] is v23 in component v23 (flux).
 * ALGEBRAIC[11] is v12 in component v12 (flux).
 * STATES[14] is ShP in component ShP (nanomolar).
 * ALGEBRAIC[20] is v21 in component v21 (flux).
 * ALGEBRAIC[15] is v16 in component v16 (flux).
 * STATES[15] is Sh_G in component Sh_G (nanomolar).
 * ALGEBRAIC[21] is v22 in component v22 (flux).
 * STATES[16] is Sh_G_S in component Sh_G_S (nanomolar).
 * STATES[17] is PLC_gamma in component PLC_gamma (nanomolar).
 * ALGEBRAIC[7] is v8 in component v8 (flux).
 * STATES[18] is PLC_gamma_P in component PLC_gamma_P (nanomolar).
 * ALGEBRAIC[24] is v25 in component v25 (flux).
 * STATES[19] is PLC_gamma_P_I in component PLC_gamma_P_I (nanomolar).
 * STATES[20] is Grb in component Grb (nanomolar).
 * STATES[21] is Shc in component Shc (nanomolar).
 * STATES[22] is SOS in component SOS (nanomolar).
 * CONSTANTS[0] is k1 in component v1 (second_order_rate_constant).
 * CONSTANTS[1] is k1_ in component v1 (first_order_rate_constant).
 * CONSTANTS[2] is k2 in component v2 (second_order_rate_constant).
 * CONSTANTS[3] is k2_ in component v2 (first_order_rate_constant).
 * CONSTANTS[4] is k3 in component v3 (first_order_rate_constant).
 * CONSTANTS[5] is k3_ in component v3 (first_order_rate_constant).
 * CONSTANTS[6] is K4 in component v4 (nanomolar).
 * CONSTANTS[7] is V4 in component v4 (flux).
 * CONSTANTS[8] is k5 in component v5 (second_order_rate_constant).
 * CONSTANTS[9] is k5_ in component v5 (first_order_rate_constant).
 * CONSTANTS[10] is k6 in component v6 (first_order_rate_constant).
 * CONSTANTS[11] is k6_ in component v6 (first_order_rate_constant).
 * CONSTANTS[12] is k7 in component v7 (first_order_rate_constant).
 * CONSTANTS[13] is k7_ in component v7 (second_order_rate_constant).
 * CONSTANTS[14] is K8 in component v8 (nanomolar).
 * CONSTANTS[15] is V8 in component v8 (flux).
 * CONSTANTS[16] is k9 in component v9 (second_order_rate_constant).
 * CONSTANTS[17] is k9_ in component v9 (first_order_rate_constant).
 * CONSTANTS[18] is k10 in component v10 (second_order_rate_constant).
 * CONSTANTS[19] is k10_ in component v10 (first_order_rate_constant).
 * CONSTANTS[20] is k11 in component v11 (first_order_rate_constant).
 * CONSTANTS[21] is k11_ in component v11 (second_order_rate_constant).
 * CONSTANTS[22] is k12 in component v12 (first_order_rate_constant).
 * CONSTANTS[23] is k12_ in component v12 (second_order_rate_constant).
 * CONSTANTS[24] is k13 in component v13 (second_order_rate_constant).
 * CONSTANTS[25] is k13_ in component v13 (first_order_rate_constant).
 * CONSTANTS[26] is k14 in component v14 (first_order_rate_constant).
 * CONSTANTS[27] is k14_ in component v14 (first_order_rate_constant).
 * CONSTANTS[28] is k15 in component v15 (first_order_rate_constant).
 * CONSTANTS[29] is k15_ in component v15 (second_order_rate_constant).
 * CONSTANTS[30] is K16 in component v16 (nanomolar).
 * CONSTANTS[31] is V16 in component v16 (flux).
 * CONSTANTS[32] is k17 in component v17 (second_order_rate_constant).
 * CONSTANTS[33] is k17_ in component v17 (first_order_rate_constant).
 * CONSTANTS[34] is k18 in component v18 (first_order_rate_constant).
 * CONSTANTS[35] is k18_ in component v18 (second_order_rate_constant).
 * CONSTANTS[36] is k19 in component v19 (second_order_rate_constant).
 * CONSTANTS[37] is k19_ in component v19 (first_order_rate_constant).
 * CONSTANTS[38] is k20 in component v20 (first_order_rate_constant).
 * CONSTANTS[39] is k20_ in component v20 (second_order_rate_constant).
 * CONSTANTS[40] is k21 in component v21 (second_order_rate_constant).
 * CONSTANTS[41] is k21_ in component v21 (first_order_rate_constant).
 * CONSTANTS[42] is k22 in component v22 (second_order_rate_constant).
 * CONSTANTS[43] is k22_ in component v22 (first_order_rate_constant).
 * CONSTANTS[44] is k23 in component v23 (first_order_rate_constant).
 * CONSTANTS[45] is k23_ in component v23 (second_order_rate_constant).
 * CONSTANTS[46] is k24 in component v24 (second_order_rate_constant).
 * CONSTANTS[47] is k24_ in component v24 (first_order_rate_constant).
 * CONSTANTS[48] is k25 in component v25 (first_order_rate_constant).
 * CONSTANTS[49] is k25_ in component v25 (first_order_rate_constant).
 * ALGEBRAIC[25] is totEGFRphos in component combined_concs (nanomolar).
 * ALGEBRAIC[26] is totPLCgammaphos in component combined_concs (nanomolar).
 * ALGEBRAIC[28] is totGrb_EGFR in component combined_concs (nanomolar).
 * ALGEBRAIC[29] is totGrb_Shc in component combined_concs (nanomolar).
 * ALGEBRAIC[27] is totShcphos in component combined_concs (nanomolar).
 * ALGEBRAIC[30] is totShc_EGFR in component combined_concs (nanomolar).
 * ALGEBRAIC[31] is totSOS_EGFR in component combined_concs (nanomolar).
 * RATES[0] is d/dt EGF in component EGF (nanomolar).
 * RATES[1] is d/dt R in component R (nanomolar).
 * RATES[2] is d/dt Ra in component Ra (nanomolar).
 * RATES[3] is d/dt R2 in component R2 (nanomolar).
 * RATES[4] is d/dt RP in component RP (nanomolar).
 * RATES[5] is d/dt R_PL in component R_PL (nanomolar).
 * RATES[6] is d/dt R_PLP in component R_PLP (nanomolar).
 * RATES[7] is d/dt R_G in component R_G (nanomolar).
 * RATES[8] is d/dt R_G_S in component R_G_S (nanomolar).
 * RATES[9] is d/dt R_Sh in component R_Sh (nanomolar).
 * RATES[10] is d/dt R_ShP in component R_ShP (nanomolar).
 * RATES[11] is d/dt R_Sh_G in component R_Sh_G (nanomolar).
 * RATES[12] is d/dt R_Sh_G_S in component R_Sh_G_S (nanomolar).
 * RATES[13] is d/dt G_S in component G_S (nanomolar).
 * RATES[14] is d/dt ShP in component ShP (nanomolar).
 * RATES[15] is d/dt Sh_G in component Sh_G (nanomolar).
 * RATES[16] is d/dt Sh_G_S in component Sh_G_S (nanomolar).
 * RATES[17] is d/dt PLC_gamma in component PLC_gamma (nanomolar).
 * RATES[18] is d/dt PLC_gamma_P in component PLC_gamma_P (nanomolar).
 * RATES[19] is d/dt PLC_gamma_P_I in component PLC_gamma_P_I (nanomolar).
 * RATES[20] is d/dt Grb in component Grb (nanomolar).
 * RATES[21] is d/dt Shc in component Shc (nanomolar).
 * RATES[22] is d/dt SOS in component SOS (nanomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 680;
STATES[1] = 100;
STATES[2] = 0;
STATES[3] = 0;
STATES[4] = 0;
STATES[5] = 0;
STATES[6] = 0;
STATES[7] = 0;
STATES[8] = 0;
STATES[9] = 0;
STATES[10] = 0;
STATES[11] = 0;
STATES[12] = 0;
STATES[13] = 0;
STATES[14] = 0;
STATES[15] = 0;
STATES[16] = 0;
STATES[17] = 105;
STATES[18] = 0;
STATES[19] = 0;
STATES[20] = 85;
STATES[21] = 150;
STATES[22] = 34;
CONSTANTS[0] = 0.003;
CONSTANTS[1] = 0.06;
CONSTANTS[2] = 0.01;
CONSTANTS[3] = 0.1;
CONSTANTS[4] = 1;
CONSTANTS[5] = 0.01;
CONSTANTS[6] = 50;
CONSTANTS[7] = 450;
CONSTANTS[8] = 0.06;
CONSTANTS[9] = 0.2;
CONSTANTS[10] = 1;
CONSTANTS[11] = 0.05;
CONSTANTS[12] = 0.3;
CONSTANTS[13] = 0.006;
CONSTANTS[14] = 100;
CONSTANTS[15] = 1;
CONSTANTS[16] = 0.003;
CONSTANTS[17] = 0.05;
CONSTANTS[18] = 0.01;
CONSTANTS[19] = 0.06;
CONSTANTS[20] = 0.03;
CONSTANTS[21] = 4.5e-3;
CONSTANTS[22] = 1.5e-3;
CONSTANTS[23] = 1e-4;
CONSTANTS[24] = 0.09;
CONSTANTS[25] = 0.6;
CONSTANTS[26] = 6;
CONSTANTS[27] = 0.06;
CONSTANTS[28] = 0.3;
CONSTANTS[29] = 9e-4;
CONSTANTS[30] = 340;
CONSTANTS[31] = 1.7;
CONSTANTS[32] = 0.003;
CONSTANTS[33] = 0.1;
CONSTANTS[34] = 0.3;
CONSTANTS[35] = 9e-4;
CONSTANTS[36] = 0.01;
CONSTANTS[37] = 2.14e-2;
CONSTANTS[38] = 0.12;
CONSTANTS[39] = 2.4e-4;
CONSTANTS[40] = 0.003;
CONSTANTS[41] = 0.1;
CONSTANTS[42] = 0.03;
CONSTANTS[43] = 0.064;
CONSTANTS[44] = 0.1;
CONSTANTS[45] = 0.021;
CONSTANTS[46] = 0.009;
CONSTANTS[47] = 4.29e-2;
CONSTANTS[48] = 1;
CONSTANTS[49] = 0.03;
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;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] - - ALGEBRAIC[0];
resid[1] = RATES[1] - - ALGEBRAIC[0];
resid[2] = RATES[2] - ALGEBRAIC[0] -  2.00000*ALGEBRAIC[1];
resid[3] = RATES[3] - (ALGEBRAIC[1]+ALGEBRAIC[3]) - ALGEBRAIC[2];
resid[4] = RATES[4] - (ALGEBRAIC[2]+ALGEBRAIC[6]+ALGEBRAIC[10]+ALGEBRAIC[14]+ALGEBRAIC[17]+ALGEBRAIC[19]) - (ALGEBRAIC[3]+ALGEBRAIC[4]+ALGEBRAIC[8]+ALGEBRAIC[12]);
resid[5] = RATES[5] - ALGEBRAIC[4] - ALGEBRAIC[5];
resid[6] = RATES[6] - ALGEBRAIC[5] - ALGEBRAIC[6];
resid[7] = RATES[7] - ALGEBRAIC[8] - ALGEBRAIC[9];
resid[8] = RATES[8] - ALGEBRAIC[9] - ALGEBRAIC[10];
resid[9] = RATES[9] - ALGEBRAIC[12] - ALGEBRAIC[13];
resid[10] = RATES[10] - ALGEBRAIC[13] - (ALGEBRAIC[23]+ALGEBRAIC[14]+ALGEBRAIC[16]);
resid[11] = RATES[11] - ALGEBRAIC[16] - (ALGEBRAIC[17]+ALGEBRAIC[18]);
resid[12] = RATES[12] - (ALGEBRAIC[18]+ALGEBRAIC[23]) - ALGEBRAIC[19];
resid[13] = RATES[13] - (ALGEBRAIC[10]+ALGEBRAIC[22]) - (ALGEBRAIC[11]+ALGEBRAIC[23]);
resid[14] = RATES[14] - (ALGEBRAIC[14]+ALGEBRAIC[22]) - (ALGEBRAIC[20]+ALGEBRAIC[15]);
resid[15] = RATES[15] - (ALGEBRAIC[17]+ALGEBRAIC[20]) - ALGEBRAIC[21];
resid[16] = RATES[16] - (ALGEBRAIC[19]+ALGEBRAIC[21]) - ALGEBRAIC[22];
resid[17] = RATES[17] - ALGEBRAIC[7] - ALGEBRAIC[4];
resid[18] = RATES[18] - ALGEBRAIC[6] - (ALGEBRAIC[7]+ALGEBRAIC[24]);
resid[19] = RATES[19] - ALGEBRAIC[24];
resid[20] = RATES[20] - ALGEBRAIC[11] - (ALGEBRAIC[8]+ALGEBRAIC[16]+ALGEBRAIC[20]);
resid[21] = RATES[21] - ALGEBRAIC[15] - ALGEBRAIC[12];
resid[22] = RATES[22] - ALGEBRAIC[11] - (ALGEBRAIC[9]+ALGEBRAIC[18]+ALGEBRAIC[21]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[25] =  2.00000*(STATES[4]+STATES[5]+STATES[6]+STATES[7]+STATES[8]+STATES[9]+STATES[10]+STATES[11]+STATES[12]);
ALGEBRAIC[26] = STATES[6]+STATES[18];
ALGEBRAIC[27] = STATES[10]+STATES[11]+STATES[12]+STATES[14]+STATES[15]+STATES[16];
ALGEBRAIC[28] = STATES[7]+STATES[8]+STATES[11]+STATES[12];
ALGEBRAIC[29] = STATES[11]+STATES[15]+STATES[12]+STATES[16];
ALGEBRAIC[30] = STATES[10]+STATES[11]+STATES[12];
ALGEBRAIC[31] = STATES[8]+STATES[12];
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] =  CONSTANTS[0]*STATES[1]*STATES[0] -  CONSTANTS[1]*STATES[2];
ALGEBRAIC[1] =  CONSTANTS[2]*STATES[2]*STATES[2] -  CONSTANTS[3]*STATES[3];
ALGEBRAIC[2] =  CONSTANTS[4]*STATES[3] -  CONSTANTS[5]*STATES[4];
ALGEBRAIC[3] = ( CONSTANTS[7]*STATES[4])/(CONSTANTS[6]+STATES[4]);
ALGEBRAIC[4] =  CONSTANTS[8]*STATES[4]*STATES[17] -  CONSTANTS[9]*STATES[5];
ALGEBRAIC[5] =  CONSTANTS[10]*STATES[5] -  CONSTANTS[11]*STATES[6];
ALGEBRAIC[6] =  CONSTANTS[12]*STATES[6] -  CONSTANTS[13]*STATES[4]*STATES[18];
ALGEBRAIC[7] = ( CONSTANTS[15]*STATES[18])/(CONSTANTS[14]+STATES[18]);
ALGEBRAIC[8] =  CONSTANTS[16]*STATES[4]*STATES[20] -  CONSTANTS[17]*STATES[7];
ALGEBRAIC[9] =  CONSTANTS[18]*STATES[7]*STATES[22] -  CONSTANTS[19]*STATES[8];
ALGEBRAIC[10] =  CONSTANTS[20]*STATES[8] -  CONSTANTS[21]*STATES[4]*STATES[13];
ALGEBRAIC[11] =  CONSTANTS[22]*STATES[13] -  CONSTANTS[23]*STATES[20]*STATES[22];
ALGEBRAIC[12] =  CONSTANTS[24]*STATES[4]*STATES[21] -  CONSTANTS[25]*STATES[9];
ALGEBRAIC[13] =  CONSTANTS[26]*STATES[9] -  CONSTANTS[27]*STATES[10];
ALGEBRAIC[14] =  CONSTANTS[28]*STATES[10] -  CONSTANTS[29]*STATES[14]*STATES[4];
ALGEBRAIC[15] = ( CONSTANTS[31]*STATES[14])/(CONSTANTS[30]+STATES[14]);
ALGEBRAIC[16] =  CONSTANTS[32]*STATES[10]*STATES[20] -  CONSTANTS[33]*STATES[11];
ALGEBRAIC[17] =  CONSTANTS[34]*STATES[11] -  CONSTANTS[35]*STATES[4]*STATES[15];
ALGEBRAIC[18] =  CONSTANTS[36]*STATES[11]*STATES[22] -  CONSTANTS[37]*STATES[12];
ALGEBRAIC[19] =  CONSTANTS[38]*STATES[12] -  CONSTANTS[39]*STATES[16]*STATES[4];
ALGEBRAIC[20] =  CONSTANTS[40]*STATES[14]*STATES[20] -  CONSTANTS[41]*STATES[15];
ALGEBRAIC[21] =  CONSTANTS[42]*STATES[15]*STATES[22] -  CONSTANTS[43]*STATES[16];
ALGEBRAIC[22] =  CONSTANTS[44]*STATES[16] -  CONSTANTS[45]*STATES[14]*STATES[13];
ALGEBRAIC[23] =  CONSTANTS[46]*STATES[10]*STATES[13] -  CONSTANTS[47]*STATES[12];
ALGEBRAIC[24] =  CONSTANTS[48]*STATES[18] -  CONSTANTS[49]*STATES[19];
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}