Generated Code

The following is c code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

/*
   There are a total of 10 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 45 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is Cdc13_Cdc2 in component Cdc13_Cdc2 (dimensionless).
 * CONSTANTS[0] is k1 in component Cdc13_Cdc2 (first_order_rate_constant).
 * ALGEBRAIC[3] is kwee in component kwee (first_order_rate_constant).
 * CONSTANTS[1] is ki in component parameters (first_order_rate_constant).
 * ALGEBRAIC[2] is kcdc25 in component kcdc25 (first_order_rate_constant).
 * CONSTANTS[2] is kir in component parameters (first_order_rate_constant).
 * ALGEBRAIC[0] is k2 in component k2 (first_order_rate_constant).
 * ALGEBRAIC[5] is k4 in component k4 (first_order_rate_constant).
 * STATES[1] is mass in component mass (dimensionless).
 * STATES[2] is Cdc13_P_Cdc2 in component Cdc13_P_Cdc2 (dimensionless).
 * STATES[3] is Rum1_Cdc13_Cdc2 in component Rum1_Cdc13_Cdc2 (dimensionless).
 * STATES[4] is Rum1 in component Rum1 (dimensionless).
 * ALGEBRAIC[1] is k2c in component k2c (first_order_rate_constant).
 * CONSTANTS[3] is k3 in component Rum1 (first_order_rate_constant).
 * STATES[5] is Cdc25P in component Cdc25P (dimensionless).
 * CONSTANTS[4] is k25 in component Cdc25P (first_order_rate_constant).
 * ALGEBRAIC[7] is k25r in component Cdc25P (first_order_rate_constant).
 * CONSTANTS[5] is k25r_ in component Cdc25P (first_order_rate_constant).
 * CONSTANTS[6] is J25 in component Cdc25P (dimensionless).
 * CONSTANTS[7] is J25r in component Cdc25P (dimensionless).
 * ALGEBRAIC[6] is ks in component parameters (first_order_rate_constant).
 * ALGEBRAIC[4] is MPF in component MPF (dimensionless).
 * STATES[6] is Wee1 in component Wee1 (dimensionless).
 * CONSTANTS[8] is kw in component Wee1 (first_order_rate_constant).
 * ALGEBRAIC[8] is kwr in component Wee1 (first_order_rate_constant).
 * CONSTANTS[9] is kwr_ in component Wee1 (first_order_rate_constant).
 * CONSTANTS[10] is Jw in component Wee1 (dimensionless).
 * CONSTANTS[11] is Jwr in component Wee1 (dimensionless).
 * STATES[7] is Mik1 in component Mik1 (dimensionless).
 * CONSTANTS[12] is km in component Mik1 (first_order_rate_constant).
 * ALGEBRAIC[9] is kmr in component Mik1 (first_order_rate_constant).
 * CONSTANTS[13] is kmr_ in component Mik1 (first_order_rate_constant).
 * CONSTANTS[14] is Jm in component Mik1 (dimensionless).
 * CONSTANTS[15] is Jmr in component Mik1 (dimensionless).
 * STATES[8] is AAE_total in component AAE_total (dimensionless).
 * CONSTANTS[16] is kas in component AAE_total (first_order_rate_constant).
 * CONSTANTS[17] is kad in component parameters (first_order_rate_constant).
 * STATES[9] is AAE in component AAE (dimensionless).
 * CONSTANTS[18] is kaa in component AAE (first_order_rate_constant).
 * CONSTANTS[19] is kaa_ in component AAE (first_order_rate_constant).
 * CONSTANTS[44] is kai in component AAE (first_order_rate_constant).
 * CONSTANTS[20] is kai_ in component AAE (first_order_rate_constant).
 * CONSTANTS[21] is kx in component AAE (first_order_rate_constant).
 * CONSTANTS[22] is Jaa in component AAE (dimensionless).
 * CONSTANTS[23] is Jai in component AAE (dimensionless).
 * STATES[10] is APC in component APC (dimensionless).
 * CONSTANTS[24] is kapr in component APC (first_order_rate_constant).
 * CONSTANTS[25] is kapr_ in component APC (first_order_rate_constant).
 * CONSTANTS[26] is kap in component APC (first_order_rate_constant).
 * CONSTANTS[27] is Japr in component APC (dimensionless).
 * CONSTANTS[28] is Jap in component APC (dimensionless).
 * CONSTANTS[29] is Puc1 in component parameters (dimensionless).
 * CONSTANTS[30] is mu in component mass (first_order_rate_constant).
 * CONSTANTS[31] is V2 in component k2 (first_order_rate_constant).
 * CONSTANTS[32] is V2_ in component k2 (first_order_rate_constant).
 * CONSTANTS[33] is V2c in component k2c (first_order_rate_constant).
 * CONSTANTS[34] is V2c_ in component k2c (first_order_rate_constant).
 * CONSTANTS[35] is k4_ in component k4 (first_order_rate_constant).
 * CONSTANTS[36] is k4__ in component k4 (first_order_rate_constant).
 * CONSTANTS[37] is V25 in component kcdc25 (first_order_rate_constant).
 * CONSTANTS[38] is V25_ in component kcdc25 (first_order_rate_constant).
 * CONSTANTS[39] is Vwee in component kwee (first_order_rate_constant).
 * CONSTANTS[40] is Vwee_ in component kwee (first_order_rate_constant).
 * CONSTANTS[41] is Vmik in component kwee (first_order_rate_constant).
 * CONSTANTS[42] is Vmik_ in component kwee (first_order_rate_constant).
 * CONSTANTS[43] is alpha in component MPF (dimensionless).
 * RATES[0] is d/dt Cdc13_Cdc2 in component Cdc13_Cdc2 (dimensionless).
 * RATES[2] is d/dt Cdc13_P_Cdc2 in component Cdc13_P_Cdc2 (dimensionless).
 * RATES[3] is d/dt Rum1_Cdc13_Cdc2 in component Rum1_Cdc13_Cdc2 (dimensionless).
 * RATES[4] is d/dt Rum1 in component Rum1 (dimensionless).
 * RATES[5] is d/dt Cdc25P in component Cdc25P (dimensionless).
 * RATES[6] is d/dt Wee1 in component Wee1 (dimensionless).
 * RATES[7] is d/dt Mik1 in component Mik1 (dimensionless).
 * RATES[8] is d/dt AAE_total in component AAE_total (dimensionless).
 * RATES[9] is d/dt AAE in component AAE (dimensionless).
 * RATES[10] is d/dt APC in component APC (dimensionless).
 * RATES[1] is d/dt mass in component mass (dimensionless).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 1;
CONSTANTS[0] = 0.03;
CONSTANTS[1] = 200;
CONSTANTS[2] = 1;
STATES[1] = 1;
STATES[2] = 0;
STATES[3] = 0;
STATES[4] = 0;
CONSTANTS[3] = 0.15;
STATES[5] = 0;
CONSTANTS[4] = 0.5;
CONSTANTS[5] = 0.2;
CONSTANTS[6] = 0.2;
CONSTANTS[7] = 0.2;
STATES[6] = 0;
CONSTANTS[8] = 0.5;
CONSTANTS[9] = 0.2;
CONSTANTS[10] = 0.2;
CONSTANTS[11] = 0.2;
STATES[7] = 0;
CONSTANTS[12] = 0.1;
CONSTANTS[13] = 0;
CONSTANTS[14] = 0.2;
CONSTANTS[15] = 0.2;
STATES[8] = 2;
CONSTANTS[16] = 0.25;
CONSTANTS[17] = 0.1;
STATES[9] = 2;
CONSTANTS[18] = 0.001;
CONSTANTS[19] = 1;
CONSTANTS[20] = 0.25;
CONSTANTS[21] = 0;
CONSTANTS[22] = 0.1;
CONSTANTS[23] = 0.1;
STATES[10] = 0;
CONSTANTS[24] = 0.04;
CONSTANTS[25] = 3;
CONSTANTS[26] = 4;
CONSTANTS[27] = 0.01;
CONSTANTS[28] = 0.01;
CONSTANTS[29] = 0.013;
CONSTANTS[30] = 0.005776;
CONSTANTS[31] = 0.03;
CONSTANTS[32] = 1;
CONSTANTS[33] = 0.03;
CONSTANTS[34] = 0.16;
CONSTANTS[35] = 0.15;
CONSTANTS[36] = 20;
CONSTANTS[37] = 0.01;
CONSTANTS[38] = 0.4;
CONSTANTS[39] = 0.01;
CONSTANTS[40] = 0.93;
CONSTANTS[41] = 0.002;
CONSTANTS[42] = 0.2;
CONSTANTS[43] = 0.1;
CONSTANTS[44] = CONSTANTS[20]+CONSTANTS[21];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[1] =  CONSTANTS[30]*STATES[1];
ALGEBRAIC[3] =  CONSTANTS[39]*( (1.00000 - STATES[6])*1.00000+ CONSTANTS[40]*STATES[6]+ CONSTANTS[41]*(1.00000 - STATES[7]))*1.00000+ CONSTANTS[42]*STATES[7];
ALGEBRAIC[2] =  CONSTANTS[37]*(1.00000 - STATES[5])+ CONSTANTS[38]*STATES[5];
ALGEBRAIC[0] =  CONSTANTS[31]*(1.00000 - STATES[10])+ CONSTANTS[32]*STATES[10];
RATES[2] =  ALGEBRAIC[3]*STATES[0] - ( ALGEBRAIC[2]*STATES[2]+ ALGEBRAIC[0]*STATES[2]);
ALGEBRAIC[4] = STATES[0]+ CONSTANTS[43]*STATES[2];
RATES[8] =  CONSTANTS[16]*ALGEBRAIC[4] -  CONSTANTS[17]*STATES[8];
RATES[9] = ( (CONSTANTS[18]+ CONSTANTS[19]*ALGEBRAIC[4])*(STATES[8] - STATES[9]))/((CONSTANTS[22]+STATES[8]) - STATES[9]) - (( CONSTANTS[44]*STATES[9])/(CONSTANTS[23]+STATES[9])+ CONSTANTS[17]*STATES[9]);
RATES[10] = ( (CONSTANTS[24]+ CONSTANTS[25]*STATES[9])*(1.00000 - STATES[10]))/((CONSTANTS[27]+1.00000) - STATES[10]) - ( CONSTANTS[26]*( CONSTANTS[29]*STATES[1]+ALGEBRAIC[4])*STATES[10])/(CONSTANTS[28]+STATES[10]);
ALGEBRAIC[5] = CONSTANTS[35]+ CONSTANTS[36]*( CONSTANTS[29]*STATES[1]+ALGEBRAIC[4]);
RATES[0] = ( CONSTANTS[0]*STATES[1]+ ALGEBRAIC[2]*STATES[2]+ STATES[3]*(CONSTANTS[2]+ALGEBRAIC[5])) - ( ALGEBRAIC[3]*STATES[0]+ CONSTANTS[1]*STATES[0]*STATES[4]+ ALGEBRAIC[0]*STATES[0]);
ALGEBRAIC[1] =  CONSTANTS[33]*(1.00000 - STATES[10])+ CONSTANTS[34]*STATES[10];
RATES[3] =  CONSTANTS[1]*STATES[4]*STATES[0] -  STATES[3]*(ALGEBRAIC[5]+ALGEBRAIC[1]+CONSTANTS[2]);
RATES[4] = (CONSTANTS[3]+ STATES[3]*(CONSTANTS[2]+ALGEBRAIC[1])) - ( ALGEBRAIC[5]*STATES[4]+ CONSTANTS[1]*STATES[0]*STATES[4]);
ALGEBRAIC[6] = (STATES[10]<=0.200000 ? 0.500000 : 0.00000);
ALGEBRAIC[7] = CONSTANTS[5]+ALGEBRAIC[6];
RATES[5] = ( CONSTANTS[4]*ALGEBRAIC[4]*(1.00000 - STATES[5]))/((CONSTANTS[6]+1.00000) - STATES[5]) - ( ALGEBRAIC[7]*STATES[5])/(CONSTANTS[7]+STATES[5]);
ALGEBRAIC[8] = CONSTANTS[9]+ALGEBRAIC[6];
RATES[6] = ( ALGEBRAIC[8]*(1.00000 - STATES[6]))/((CONSTANTS[11]+1.00000) - STATES[6]) - ( CONSTANTS[8]*ALGEBRAIC[4]*STATES[6])/(CONSTANTS[10]+STATES[6]);
ALGEBRAIC[9] = CONSTANTS[13]+ALGEBRAIC[6];
RATES[7] = ( ALGEBRAIC[9]*(1.00000 - STATES[7]))/((CONSTANTS[15]+1.00000) - STATES[7]) - ( CONSTANTS[12]*STATES[7])/(CONSTANTS[14]+STATES[7]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[3] =  CONSTANTS[39]*( (1.00000 - STATES[6])*1.00000+ CONSTANTS[40]*STATES[6]+ CONSTANTS[41]*(1.00000 - STATES[7]))*1.00000+ CONSTANTS[42]*STATES[7];
ALGEBRAIC[2] =  CONSTANTS[37]*(1.00000 - STATES[5])+ CONSTANTS[38]*STATES[5];
ALGEBRAIC[0] =  CONSTANTS[31]*(1.00000 - STATES[10])+ CONSTANTS[32]*STATES[10];
ALGEBRAIC[4] = STATES[0]+ CONSTANTS[43]*STATES[2];
ALGEBRAIC[5] = CONSTANTS[35]+ CONSTANTS[36]*( CONSTANTS[29]*STATES[1]+ALGEBRAIC[4]);
ALGEBRAIC[1] =  CONSTANTS[33]*(1.00000 - STATES[10])+ CONSTANTS[34]*STATES[10];
ALGEBRAIC[6] = (STATES[10]<=0.200000 ? 0.500000 : 0.00000);
ALGEBRAIC[7] = CONSTANTS[5]+ALGEBRAIC[6];
ALGEBRAIC[8] = CONSTANTS[9]+ALGEBRAIC[6];
ALGEBRAIC[9] = CONSTANTS[13]+ALGEBRAIC[6];
}