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 8 entries in the algebraic variable array.
   There are a total of 7 entries in each of the rate and state variable arrays.
   There are a total of 35 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is Y in component Y (dimensionless).
 * CONSTANTS[0] is k1 in component Y (first_order_rate_constant).
 * ALGEBRAIC[6] is k2 in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[1] is k3 in component kinetic_parameters (first_order_rate_constant).
 * ALGEBRAIC[0] is C in component C (dimensionless).
 * STATES[1] is M in component M (dimensionless).
 * ALGEBRAIC[7] is kwee in component kinetic_parameters (first_order_rate_constant).
 * ALGEBRAIC[5] is kcdc25 in component kinetic_parameters (first_order_rate_constant).
 * STATES[2] is preMPF in component preMPF (dimensionless).
 * STATES[3] is Cdc25P in component Cdc25P (dimensionless).
 * CONSTANTS[2] is k25 in component Cdc25P (first_order_rate_constant).
 * CONSTANTS[3] is Km25 in component Cdc25P (dimensionless).
 * CONSTANTS[4] is k25r in component Cdc25P (first_order_rate_constant).
 * CONSTANTS[33] is k25ro in component Cdc25P (first_order_rate_constant).
 * CONSTANTS[5] is Km25r in component Cdc25P (dimensionless).
 * CONSTANTS[32] is p in component p (dimensionless).
 * ALGEBRAIC[2] is Cdc25 in component Cdc25 (dimensionless).
 * STATES[4] is Wee1 in component Wee1 (dimensionless).
 * CONSTANTS[6] is kw in component Wee1 (first_order_rate_constant).
 * CONSTANTS[7] is Kmw in component Wee1 (dimensionless).
 * CONSTANTS[8] is kwr in component Wee1 (first_order_rate_constant).
 * CONSTANTS[34] is kwro in component Wee1 (first_order_rate_constant).
 * CONSTANTS[9] is Kmwr in component Wee1 (dimensionless).
 * ALGEBRAIC[3] is Wee1P in component Wee1P (dimensionless).
 * STATES[5] is IEP in component IEP (dimensionless).
 * CONSTANTS[10] is kie in component IEP (first_order_rate_constant).
 * CONSTANTS[11] is Kmie in component IEP (dimensionless).
 * CONSTANTS[12] is kier in component IEP (first_order_rate_constant).
 * CONSTANTS[13] is Kmier in component IEP (dimensionless).
 * ALGEBRAIC[1] is IE in component IE (dimensionless).
 * STATES[6] is APC_ in component APC_ (dimensionless).
 * CONSTANTS[14] is kap in component APC_ (first_order_rate_constant).
 * CONSTANTS[15] is Kmap in component APC_ (dimensionless).
 * CONSTANTS[16] is kapr in component APC_ (first_order_rate_constant).
 * CONSTANTS[17] is Kmapr in component APC_ (dimensionless).
 * ALGEBRAIC[4] is APC in component APC (dimensionless).
 * CONSTANTS[18] is Cdc2tot in component C (dimensionless).
 * CONSTANTS[19] is Cdc25tot in component Cdc25 (dimensionless).
 * CONSTANTS[20] is Wee1tot in component Wee1P (dimensionless).
 * CONSTANTS[21] is IEtot in component IE (dimensionless).
 * CONSTANTS[22] is APCtot in component APC (dimensionless).
 * CONSTANTS[23] is R in component p (dimensionless).
 * CONSTANTS[24] is s in component p (dimensionless).
 * CONSTANTS[25] is q in component p (dimensionless).
 * CONSTANTS[26] is V2 in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[27] is V2_ in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[28] is V25 in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[29] is V25_ in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[30] is Vwee in component kinetic_parameters (first_order_rate_constant).
 * CONSTANTS[31] is Vwee_ in component kinetic_parameters (first_order_rate_constant).
 * RATES[0] is d/dt Y in component Y (dimensionless).
 * RATES[1] is d/dt M in component M (dimensionless).
 * RATES[2] is d/dt preMPF in component preMPF (dimensionless).
 * RATES[3] is d/dt Cdc25P in component Cdc25P (dimensionless).
 * RATES[4] is d/dt Wee1 in component Wee1 (dimensionless).
 * RATES[5] is d/dt IEP in component IEP (dimensionless).
 * RATES[6] is d/dt APC_ in component APC_ (dimensionless).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.01577552;
CONSTANTS[0] = 0.024;
CONSTANTS[1] = 1.15;
STATES[1] = 0.0142077;
STATES[2] = 0.02541723;
STATES[3] = 0.4844362;
CONSTANTS[2] = 18;
CONSTANTS[3] = 0.1;
CONSTANTS[4] = 0.8;
CONSTANTS[5] = 1;
STATES[4] = 0.5155638;
CONSTANTS[6] = 18;
CONSTANTS[7] = 0.1;
CONSTANTS[8] = 0.8;
CONSTANTS[9] = 1;
STATES[5] = 0.002287817;
CONSTANTS[10] = 4.5;
CONSTANTS[11] = 0.01;
CONSTANTS[12] = 0.34;
CONSTANTS[13] = 0.01;
STATES[6] = 0.5051103;
CONSTANTS[14] = 0.3;
CONSTANTS[15] = 0.01;
CONSTANTS[16] = 0.3;
CONSTANTS[17] = 1;
CONSTANTS[18] = 1;
CONSTANTS[19] = 1;
CONSTANTS[20] = 1;
CONSTANTS[21] = 1;
CONSTANTS[22] = 1;
CONSTANTS[23] = 1;
CONSTANTS[24] = 0.021;
CONSTANTS[25] = 1;
CONSTANTS[26] = 0.01;
CONSTANTS[27] = 0.6;
CONSTANTS[28] = 0.04;
CONSTANTS[29] = 0.4;
CONSTANTS[30] = 0.025;
CONSTANTS[31] = 2.5;
CONSTANTS[32] =  CONSTANTS[24]*CONSTANTS[23]+CONSTANTS[25];
CONSTANTS[33] = CONSTANTS[4]/CONSTANTS[32];
CONSTANTS[34] = CONSTANTS[8]/CONSTANTS[32];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[1] = CONSTANTS[21] - STATES[5];
RATES[5] = ( CONSTANTS[10]*STATES[1]*ALGEBRAIC[1])/(CONSTANTS[11]+ALGEBRAIC[1]) - ( CONSTANTS[12]*STATES[5])/(CONSTANTS[13]+STATES[5]);
ALGEBRAIC[2] = CONSTANTS[19] - STATES[3];
RATES[3] = ( CONSTANTS[2]*STATES[1]*ALGEBRAIC[2])/(CONSTANTS[3]+ALGEBRAIC[2]) - ( CONSTANTS[4]*STATES[3])/(CONSTANTS[5]+STATES[3]);
ALGEBRAIC[3] = CONSTANTS[20] - STATES[4];
RATES[4] = ( - CONSTANTS[6]*STATES[1]*STATES[4])/(CONSTANTS[7]+STATES[4])+( CONSTANTS[8]*ALGEBRAIC[3])/(CONSTANTS[9]+ALGEBRAIC[3]);
ALGEBRAIC[4] = CONSTANTS[22] - STATES[6];
RATES[6] = ( CONSTANTS[14]*STATES[5]*ALGEBRAIC[4])/(CONSTANTS[15]+ALGEBRAIC[4]) - ( CONSTANTS[16]*STATES[6])/(CONSTANTS[17]+STATES[6]);
ALGEBRAIC[6] =  CONSTANTS[26]*ALGEBRAIC[4]+ CONSTANTS[27]*STATES[6];
ALGEBRAIC[0] = CONSTANTS[18] - (STATES[1]+STATES[2]);
RATES[0] = CONSTANTS[0] - ( ALGEBRAIC[6]*STATES[0]+ CONSTANTS[1]*STATES[0]*ALGEBRAIC[0]);
ALGEBRAIC[7] =  CONSTANTS[30]*ALGEBRAIC[3]+ CONSTANTS[31]*STATES[4];
ALGEBRAIC[5] =  CONSTANTS[28]*ALGEBRAIC[2]+ CONSTANTS[29]*STATES[3];
RATES[1] = ( ALGEBRAIC[5]*STATES[2]+ CONSTANTS[1]*STATES[0]*ALGEBRAIC[0]) - ( ALGEBRAIC[6]*STATES[1]+ ALGEBRAIC[7]*STATES[1]);
RATES[2] =  ALGEBRAIC[7]*STATES[1] - ( ALGEBRAIC[6]*STATES[2]+ ALGEBRAIC[5]*STATES[2]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[1] = CONSTANTS[21] - STATES[5];
ALGEBRAIC[2] = CONSTANTS[19] - STATES[3];
ALGEBRAIC[3] = CONSTANTS[20] - STATES[4];
ALGEBRAIC[4] = CONSTANTS[22] - STATES[6];
ALGEBRAIC[6] =  CONSTANTS[26]*ALGEBRAIC[4]+ CONSTANTS[27]*STATES[6];
ALGEBRAIC[0] = CONSTANTS[18] - (STATES[1]+STATES[2]);
ALGEBRAIC[7] =  CONSTANTS[30]*ALGEBRAIC[3]+ CONSTANTS[31]*STATES[4];
ALGEBRAIC[5] =  CONSTANTS[28]*ALGEBRAIC[2]+ CONSTANTS[29]*STATES[3];
}