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 5 entries in the algebraic variable array.
   There are a total of 13 entries in each of the rate and state variable arrays.
   There are a total of 45 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is r in component r (dimensionless).
 * ALGEBRAIC[0] is c1 in component c1 (dimensionless).
 * STATES[1] is c2 in component c2 (dimensionless).
 * CONSTANTS[0] is L in component model_parameters (nanomolar).
 * CONSTANTS[1] is kt in component model_parameters (first_order_rate_constant).
 * CONSTANTS[2] is kxR0 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[3] is k_minusx in component model_parameters (first_order_rate_constant).
 * CONSTANTS[4] is KDL in component model_parameters (nanomolar).
 * CONSTANTS[5] is ke in component model_parameters (first_order_rate_constant).
 * ALGEBRAIC[1] is e_PI3K in component e_PI3K (dimensionless).
 * CONSTANTS[6] is kappa_PI3K in component e_PI3K (dimensionless).
 * CONSTANTS[7] is alpha_PI3K in component e_PI3K (dimensionless).
 * STATES[2] is m_3PI in component m_3PI (dimensionless).
 * CONSTANTS[8] is k_3PI in component m_3PI (first_order_rate_constant).
 * ALGEBRAIC[2] is e_GEF in component e_GEF (dimensionless).
 * CONSTANTS[9] is K_GR in component e_GEF (dimensionless).
 * CONSTANTS[10] is K_GP in component e_GEF (dimensionless).
 * STATES[3] is f_GEF in component f_GEF (dimensionless).
 * STATES[4] is m_Ras in component m_Ras (dimensionless).
 * CONSTANTS[11] is k_Ras in component m_Ras (first_order_rate_constant).
 * CONSTANTS[12] is gamma in component m_Ras (dimensionless).
 * STATES[5] is x1 in component x1 (dimensionless).
 * CONSTANTS[13] is kd_x1 in component x1 (first_order_rate_constant).
 * CONSTANTS[14] is KM_x11 in component model_parameters (dimensionless).
 * CONSTANTS[15] is KM_x12 in component model_parameters (dimensionless).
 * STATES[6] is y in component y (dimensionless).
 * ALGEBRAIC[3] is yp in component yp (dimensionless).
 * STATES[7] is x2 in component x2 (dimensionless).
 * CONSTANTS[16] is kd_x2 in component x2 (first_order_rate_constant).
 * CONSTANTS[17] is K_x2 in component x2 (dimensionless).
 * CONSTANTS[18] is KM_x21 in component model_parameters (dimensionless).
 * CONSTANTS[19] is KM_x22 in component model_parameters (dimensionless).
 * CONSTANTS[20] is Vmax_yph1_KM_yph1 in component y (first_order_rate_constant).
 * CONSTANTS[21] is KM_yph1 in component model_parameters (dimensionless).
 * CONSTANTS[22] is KM_yph2 in component model_parameters (dimensionless).
 * CONSTANTS[23] is Vmax_x11_KM_x11 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[24] is Vmax_x21_KM_x21 in component model_parameters (first_order_rate_constant).
 * STATES[8] is ypp in component ypp (dimensionless).
 * CONSTANTS[25] is Vmax_yph2_KM_yph2 in component ypp (first_order_rate_constant).
 * CONSTANTS[26] is KM_y1 in component model_parameters (dimensionless).
 * CONSTANTS[27] is KM_y2 in component model_parameters (dimensionless).
 * CONSTANTS[28] is Vmax_x12_KM_x12 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[29] is Vmax_x22_KM_x22 in component model_parameters (first_order_rate_constant).
 * STATES[9] is z in component z (dimensionless).
 * ALGEBRAIC[4] is zp in component zp (dimensionless).
 * CONSTANTS[30] is Vmax_zph1_KM_zph1 in component z (first_order_rate_constant).
 * CONSTANTS[31] is Vmax_y1_KM_y1 in component z (first_order_rate_constant).
 * CONSTANTS[32] is KM_zph1 in component model_parameters (dimensionless).
 * CONSTANTS[33] is KM_zph2 in component model_parameters (dimensionless).
 * STATES[10] is zpp in component zpp (dimensionless).
 * STATES[11] is e_ph in component e_ph (dimensionless).
 * CONSTANTS[34] is Vmax_zph2_KM_zph2 in component zpp (first_order_rate_constant).
 * CONSTANTS[35] is Vmax_y2_KM_y2 in component zpp (first_order_rate_constant).
 * CONSTANTS[36] is n in component f_GEF (dimensionless).
 * CONSTANTS[37] is Kf in component f_GEF (dimensionless).
 * CONSTANTS[38] is Zf in component f_GEF (dimensionless).
 * CONSTANTS[39] is k_FB_f in component f_GEF (first_order_rate_constant).
 * STATES[12] is w in component w (dimensionless).
 * CONSTANTS[40] is kd_w in component w (first_order_rate_constant).
 * CONSTANTS[41] is k_FB_ph in component e_ph (first_order_rate_constant).
 * CONSTANTS[42] is p in component e_ph (dimensionless).
 * CONSTANTS[43] is Wph in component e_ph (dimensionless).
 * CONSTANTS[44] is Kph in component e_ph (dimensionless).
 * RATES[0] is d/dt r in component r (dimensionless).
 * RATES[1] is d/dt c2 in component c2 (dimensionless).
 * RATES[2] is d/dt m_3PI in component m_3PI (dimensionless).
 * RATES[4] is d/dt m_Ras in component m_Ras (dimensionless).
 * RATES[5] is d/dt x1 in component x1 (dimensionless).
 * RATES[7] is d/dt x2 in component x2 (dimensionless).
 * RATES[6] is d/dt y in component y (dimensionless).
 * RATES[8] is d/dt ypp in component ypp (dimensionless).
 * RATES[9] is d/dt z in component z (dimensionless).
 * RATES[10] is d/dt zpp in component zpp (dimensionless).
 * RATES[3] is d/dt f_GEF in component f_GEF (dimensionless).
 * RATES[12] is d/dt w in component w (dimensionless).
 * RATES[11] is d/dt e_ph in component e_ph (dimensionless).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.5;
STATES[1] = 0.0;
CONSTANTS[0] = 1.0;
CONSTANTS[1] = 0.005;
CONSTANTS[2] = 0.3;
CONSTANTS[3] = 0.07;
CONSTANTS[4] = 1.5;
CONSTANTS[5] = 0.2;
CONSTANTS[6] = 0.3;
CONSTANTS[7] = 80.0;
STATES[2] = 0.0;
CONSTANTS[8] = 1.0;
CONSTANTS[9] = 495.0;
CONSTANTS[10] = 5.09;
STATES[3] = 1.0;
STATES[4] = 0.0;
CONSTANTS[11] = 1.0;
CONSTANTS[12] = 0.1;
STATES[5] = 0.0;
CONSTANTS[13] = 0.745;
CONSTANTS[14] = 30.3;
CONSTANTS[15] = 45.5;
STATES[6] = 1.0;
STATES[7] = 0.0;
CONSTANTS[16] = 2.85;
CONSTANTS[17] = 6.77;
CONSTANTS[18] = 21.6;
CONSTANTS[19] = 15.7;
CONSTANTS[20] = 4.40;
CONSTANTS[21] = 44.0;
CONSTANTS[22] = 12.7;
CONSTANTS[23] = 1.18;
CONSTANTS[24] = 0.405;
STATES[8] = 0.0;
CONSTANTS[25] = 6.77;
CONSTANTS[26] = 31.9;
CONSTANTS[27] = 8.81;
CONSTANTS[28] = 4.71;
CONSTANTS[29] = 2.41;
STATES[9] = 1.0;
CONSTANTS[30] = 0.451;
CONSTANTS[31] = 11.8;
CONSTANTS[32] = 14.0;
CONSTANTS[33] = 31.5;
STATES[10] = 0.0;
STATES[11] = 1.0;
CONSTANTS[34] = 0.228;
CONSTANTS[35] = 31.9;
CONSTANTS[36] = 1.03;
CONSTANTS[37] = 3.76;
CONSTANTS[38] = 0.272;
CONSTANTS[39] = 0.976;
STATES[12] = 0.0;
CONSTANTS[40] = 0.0333;
CONSTANTS[41] = 2.34;
CONSTANTS[42] = 1.98;
CONSTANTS[43] = 0.385;
CONSTANTS[44] = 4.64;
RATES[0] = 0.1001;
RATES[1] = 0.1001;
RATES[2] = 0.1001;
RATES[4] = 0.1001;
RATES[5] = 0.1001;
RATES[7] = 0.1001;
RATES[6] = 0.1001;
RATES[8] = 0.1001;
RATES[9] = 0.1001;
RATES[10] = 0.1001;
RATES[3] = 0.1001;
RATES[12] = 0.1001;
RATES[11] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] -  pow(1.00000+CONSTANTS[0]/CONSTANTS[4], -1.00000)*( CONSTANTS[1]*(1.00000 - (STATES[0]+ALGEBRAIC[0]))+ 2.00000*( CONSTANTS[3]*STATES[1] -  CONSTANTS[2]*pow(ALGEBRAIC[0], 2.00000)));
resid[1] = RATES[1] -  CONSTANTS[2]*pow(ALGEBRAIC[0], 2.00000) -  (CONSTANTS[3]+CONSTANTS[5])*STATES[1];
resid[2] = RATES[2] -  CONSTANTS[8]*(ALGEBRAIC[1] - STATES[2]);
resid[3] = RATES[4] -  CONSTANTS[11]*( (1.00000+CONSTANTS[12])*ALGEBRAIC[2] -  (1.00000+ CONSTANTS[12]*ALGEBRAIC[2])*STATES[4]);
resid[4] = RATES[5] -  CONSTANTS[13]*(STATES[4] - STATES[5]/(1.00000+STATES[6]/CONSTANTS[14]+ALGEBRAIC[3]/CONSTANTS[15]));
resid[5] = RATES[7] -  CONSTANTS[16]*(( (1.00000+CONSTANTS[17])*STATES[2])/(1.00000+ CONSTANTS[17]*STATES[2]) - STATES[7]/(1.00000+STATES[6]/CONSTANTS[18]+ALGEBRAIC[3]/CONSTANTS[19]));
resid[6] = RATES[6] - ( CONSTANTS[20]*ALGEBRAIC[3])/(1.00000+ALGEBRAIC[3]/CONSTANTS[21]+STATES[8]/CONSTANTS[22]) - (( CONSTANTS[23]*STATES[5]*STATES[6])/(1.00000+STATES[6]/CONSTANTS[14]+ALGEBRAIC[3]/CONSTANTS[15])+( CONSTANTS[24]*STATES[7]*STATES[6])/(1.00000+STATES[6]/CONSTANTS[18]+ALGEBRAIC[3]/CONSTANTS[19]));
resid[7] = RATES[8] - (( CONSTANTS[28]*STATES[5]*ALGEBRAIC[3])/(1.00000+STATES[6]/CONSTANTS[14]+ALGEBRAIC[3]/CONSTANTS[15])+( CONSTANTS[29]*STATES[7]*ALGEBRAIC[3])/(1.00000+STATES[6]/CONSTANTS[18]+ALGEBRAIC[3]/CONSTANTS[19])) - (( CONSTANTS[25]*STATES[8])/( (1.00000+STATES[9]/CONSTANTS[26]+ALGEBRAIC[4]/CONSTANTS[15])*(1.00000+ALGEBRAIC[3]/CONSTANTS[21])+STATES[8]/CONSTANTS[22]));
resid[8] = RATES[9] - ( CONSTANTS[30]*STATES[11]*ALGEBRAIC[4])/(1.00000+ALGEBRAIC[4]/CONSTANTS[32]+STATES[10]/CONSTANTS[33]) - ( CONSTANTS[31]*STATES[8])/(1.00000+STATES[9]/CONSTANTS[26]+ALGEBRAIC[4]/CONSTANTS[27]);
resid[9] = RATES[10] - ( CONSTANTS[35]*ALGEBRAIC[4])/(1.00000+STATES[9]/CONSTANTS[26]+ALGEBRAIC[4]/CONSTANTS[27]) - ( CONSTANTS[34]*STATES[11]*STATES[10])/(1.00000+ALGEBRAIC[4]/CONSTANTS[32]+STATES[10]/CONSTANTS[33]);
resid[10] = RATES[3] -  - CONSTANTS[39]*( (pow(STATES[10], CONSTANTS[36])/(pow(CONSTANTS[38], CONSTANTS[36])+pow(STATES[10], CONSTANTS[36])))*STATES[3] -  (1.00000/CONSTANTS[37])*(1.00000 - STATES[3]));
resid[11] = RATES[12] -  CONSTANTS[40]*(STATES[10] - STATES[12]);
resid[12] = RATES[11] -  CONSTANTS[41]*(pow(STATES[12], CONSTANTS[42])/(pow(CONSTANTS[43], CONSTANTS[42])+pow(STATES[12], CONSTANTS[42])) -  (1.00000/CONSTANTS[44])*(STATES[11] - 1.00000));
}
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] = ( CONSTANTS[0]*STATES[0])/CONSTANTS[4];
ALGEBRAIC[1] = ((1.00000+CONSTANTS[6]+ 2.00000*CONSTANTS[7]*STATES[1]) -  pow(pow(1.00000+CONSTANTS[6]+ 2.00000*CONSTANTS[7]*STATES[1], 2.00000), 1.0 / 2))/2.00000;
ALGEBRAIC[2] =  (( CONSTANTS[9]*STATES[1]+ CONSTANTS[10]*STATES[2])/(1.00000+ CONSTANTS[9]*STATES[1]+ CONSTANTS[10]*STATES[2]))*STATES[3];
ALGEBRAIC[3] = 1.00000 - (STATES[6]+STATES[8]);
ALGEBRAIC[4] = 1.00000 - (STATES[9]+STATES[10]);
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}