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 0 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 30 entries in the constant variable array.
 */
/*
 * VOI is t in component environment (s).
 * CONSTANTS[0] is kf5 in component RAF (per_um_s).
 * CONSTANTS[1] is kb5 in component RAF (per_s).
 * CONSTANTS[2] is km1 in component RAF (um).
 * CONSTANTS[3] is km2 in component RAF (um).
 * CONSTANTS[4] is km3 in component RAF (um).
 * CONSTANTS[5] is km4 in component RAF (um).
 * CONSTANTS[6] is Vmax1 in component RAF (per_s).
 * CONSTANTS[7] is Vmax2 in component RAF (per_s).
 * CONSTANTS[8] is Vmax3 in component RAF (per_s).
 * CONSTANTS[9] is Vmax4 in component RAF (per_s).
 * CONSTANTS[10] is PKC in component undefinedvariables (um).
 * CONSTANTS[11] is PP2A in component RAF (um).
 * STATES[0] is MAPK_star in component MAPK (um).
 * STATES[1] is Raf in component RAF (um).
 * STATES[2] is Raf_star in component RAF (um).
 * STATES[3] is Raf_star_star in component RAF (um).
 * STATES[4] is GTPRas in component RAF (um).
 * STATES[5] is GTPRasRaf_star in component RAF (um).
 * CONSTANTS[12] is km6 in component MAPKK (um).
 * CONSTANTS[13] is km7 in component MAPKK (um).
 * CONSTANTS[14] is km8 in component MAPKK (um).
 * CONSTANTS[15] is km9 in component MAPKK (um).
 * CONSTANTS[16] is Vmax6 in component MAPKK (per_s).
 * CONSTANTS[17] is Vmax7 in component MAPKK (per_s).
 * CONSTANTS[18] is Vmax8 in component MAPKK (per_s).
 * CONSTANTS[19] is Vmax9 in component MAPKK (per_s).
 * CONSTANTS[20] is PP2A in component MAPKK (um).
 * STATES[6] is MAPKK in component MAPKK (um).
 * STATES[7] is MAPKK_star in component MAPKK (um).
 * STATES[8] is MAPKK_star_star in component MAPKK (um).
 * CONSTANTS[21] is km10 in component MAPK (um).
 * CONSTANTS[22] is km11 in component MAPK (um).
 * CONSTANTS[23] is km12 in component MAPK (um).
 * CONSTANTS[24] is km13 in component MAPK (um).
 * CONSTANTS[25] is Vmax10 in component MAPK (per_s).
 * CONSTANTS[26] is Vmax11 in component MAPK (per_s).
 * CONSTANTS[27] is Vmax12 in component MAPK (per_s).
 * CONSTANTS[28] is Vmax13 in component MAPK (per_s).
 * STATES[9] is MAPK in component MAPK (um).
 * STATES[10] is MAPK_tyr in component MAPK (um).
 * CONSTANTS[29] is MKP1 in component MAPK (um).
 * RATES[5] is d/dt GTPRasRaf_star in component RAF (um).
 * RATES[4] is d/dt GTPRas in component RAF (um).
 * RATES[1] is d/dt Raf in component RAF (um).
 * RATES[2] is d/dt Raf_star in component RAF (um).
 * RATES[3] is d/dt Raf_star_star in component RAF (um).
 * RATES[6] is d/dt MAPKK in component MAPKK (um).
 * RATES[7] is d/dt MAPKK_star in component MAPKK (um).
 * RATES[8] is d/dt MAPKK_star_star in component MAPKK (um).
 * RATES[9] is d/dt MAPK in component MAPK (um).
 * RATES[10] is d/dt MAPK_tyr in component MAPK (um).
 * RATES[0] is d/dt MAPK_star in component MAPK (um).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 0.00004;
CONSTANTS[1] = 0.5;
CONSTANTS[2] = 66.666666667;
CONSTANTS[3] = 25.64166667;
CONSTANTS[4] = 15.6565;
CONSTANTS[5] = 15.6565;
CONSTANTS[6] = 4;
CONSTANTS[7] = 10;
CONSTANTS[8] = 6;
CONSTANTS[9] = 6;
CONSTANTS[10] = 0.1;
CONSTANTS[11] = 0.224;
STATES[0] = 0;
STATES[1] = 0.1;
STATES[2] = 0;
STATES[3] = 0;
STATES[4] = 0.1;
STATES[5] = 0;
CONSTANTS[12] = 0.159091667;
CONSTANTS[13] = 0.159091667;
CONSTANTS[14] = 15.6565;
CONSTANTS[15] = 15.6565;
CONSTANTS[16] = 0.105;
CONSTANTS[17] = 0.105;
CONSTANTS[18] = 6;
CONSTANTS[19] = 6;
CONSTANTS[20] = 0.224;
STATES[6] = 0.18;
STATES[7] = 0;
STATES[8] = 0;
CONSTANTS[21] = 0.046296667;
CONSTANTS[22] = 0.046296667;
CONSTANTS[23] = 0.066666667;
CONSTANTS[24] = 0.066666667;
CONSTANTS[25] = 0.15;
CONSTANTS[26] = 0.15;
CONSTANTS[27] = 1;
CONSTANTS[28] = 1;
STATES[9] = 0.36;
STATES[10] = 0;
CONSTANTS[29] = 0.032;
RATES[5] = 0.1001;
RATES[4] = 0.1001;
RATES[1] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[6] = 0.1001;
RATES[7] = 0.1001;
RATES[8] = 0.1001;
RATES[9] = 0.1001;
RATES[10] = 0.1001;
RATES[0] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[5] -  STATES[4]*STATES[2]*CONSTANTS[0] -  STATES[5]*CONSTANTS[1];
resid[1] = RATES[4] -  - STATES[4]*STATES[2]*CONSTANTS[0]+ STATES[5]*CONSTANTS[1];
resid[2] = RATES[1] - ( - CONSTANTS[10]*STATES[1]*CONSTANTS[6])/(CONSTANTS[2]+STATES[1])+( STATES[2]*CONSTANTS[11]*CONSTANTS[8])/(CONSTANTS[4]+STATES[2]);
resid[3] = RATES[2] - ((( CONSTANTS[10]*STATES[1]*CONSTANTS[6])/(CONSTANTS[2]+STATES[1]) - ( STATES[2]*CONSTANTS[11]*CONSTANTS[8])/(CONSTANTS[4]+STATES[2])) - ( STATES[2]*STATES[0]*CONSTANTS[7])/(CONSTANTS[3]+STATES[2]))+( STATES[3]*CONSTANTS[11]*CONSTANTS[9])/(CONSTANTS[5]+STATES[3]);
resid[4] = RATES[3] - ( STATES[2]*STATES[0]*CONSTANTS[7])/(CONSTANTS[3]+STATES[2]) - ( STATES[3]*CONSTANTS[11]*CONSTANTS[9])/(CONSTANTS[5]+STATES[3]);
resid[5] = RATES[6] - ( - STATES[6]*CONSTANTS[16]*STATES[5])/(CONSTANTS[12]+STATES[6])+( STATES[7]*CONSTANTS[18]*CONSTANTS[20])/(CONSTANTS[14]+STATES[7]);
resid[6] = RATES[7] - ((( STATES[6]*CONSTANTS[16]*STATES[5])/(CONSTANTS[12]+STATES[6]) - ( STATES[7]*CONSTANTS[18]*CONSTANTS[20])/(CONSTANTS[14]+STATES[7])) - ( STATES[7]*CONSTANTS[17]*STATES[5])/(CONSTANTS[13]+STATES[7]))+( STATES[8]*CONSTANTS[19]*CONSTANTS[20])/(CONSTANTS[15]+STATES[8]);
resid[7] = RATES[8] - ( STATES[7]*CONSTANTS[17]*STATES[5])/(CONSTANTS[13]+STATES[7]) - ( STATES[8]*CONSTANTS[19]*CONSTANTS[20])/(CONSTANTS[15]+STATES[8]);
resid[8] = RATES[9] - ( - STATES[9]*CONSTANTS[25]*STATES[8])/(CONSTANTS[21]+STATES[9])+( STATES[10]*CONSTANTS[27]*CONSTANTS[29])/(CONSTANTS[23]+STATES[10]);
resid[9] = RATES[10] - ((( STATES[9]*CONSTANTS[25]*STATES[8])/(CONSTANTS[21]+STATES[9]) - ( STATES[10]*CONSTANTS[27]*CONSTANTS[29])/(CONSTANTS[23]+STATES[10])) - ( STATES[10]*CONSTANTS[26]*STATES[8])/(CONSTANTS[22]+STATES[10]))+( STATES[0]*CONSTANTS[28]*CONSTANTS[29])/(CONSTANTS[24]+STATES[0]);
resid[10] = RATES[0] - ( STATES[10]*CONSTANTS[26]*STATES[8])/(CONSTANTS[22]+STATES[10]) - ( STATES[0]*CONSTANTS[28]*CONSTANTS[29])/(CONSTANTS[24]+STATES[0]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
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)
{
}