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 16 entries in each of the rate and state variable arrays.
   There are a total of 58 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is MPF in component MPF (dimensionless).
 * CONSTANTS[0] is k1 in component rate_constants (first_order_rate_constant).
 * ALGEBRAIC[0] is k2 in component rate_constants (first_order_rate_constant).
 * ALGEBRAIC[2] is kwee in component rate_constants (first_order_rate_constant).
 * ALGEBRAIC[4] is kc25 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[1] is kj in component rate_constants (first_order_rate_constant).
 * CONSTANTS[2] is kjr in component rate_constants (first_order_rate_constant).
 * CONSTANTS[3] is k6_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[4] is k6 in component rate_constants (first_order_rate_constant).
 * STATES[1] is mass in component mass (dimensionless).
 * STATES[2] is preMPF in component preMPF (dimensionless).
 * STATES[3] is Rum1 in component Rum1 (dimensionless).
 * STATES[4] is Rum1P in component Rum1P (dimensionless).
 * STATES[5] is CR in component CR (dimensionless).
 * STATES[6] is CRP in component CRP (dimensionless).
 * STATES[7] is Ste9 in component Ste9 (dimensionless).
 * CONSTANTS[5] is kste9r_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[6] is kste9r in component rate_constants (first_order_rate_constant).
 * CONSTANTS[7] is kste9 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[8] is Jste9r in component Ste9 (dimensionless).
 * CONSTANTS[9] is Jste9 in component Ste9 (dimensionless).
 * ALGEBRAIC[1] is MPF_a in component MPF_a (dimensionless).
 * ALGEBRAIC[3] is PP in component PP (dimensionless).
 * CONSTANTS[10] is SK in component dimensionless_constants (dimensionless).
 * STATES[8] is Mik1 in component Mik1 (dimensionless).
 * CONSTANTS[11] is ks in component rate_constants (first_order_rate_constant).
 * CONSTANTS[12] is kmr_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[13] is kmr in component rate_constants (first_order_rate_constant).
 * CONSTANTS[14] is km in component rate_constants (first_order_rate_constant).
 * CONSTANTS[15] is Jmikr in component Mik1 (dimensionless).
 * CONSTANTS[16] is Jmik in component Mik1 (dimensionless).
 * STATES[9] is Wee1 in component Wee1 (dimensionless).
 * CONSTANTS[17] is kwr_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[18] is kwr in component rate_constants (first_order_rate_constant).
 * CONSTANTS[19] is kw in component rate_constants (first_order_rate_constant).
 * CONSTANTS[20] is Jweer in component Wee1 (dimensionless).
 * CONSTANTS[21] is Jwee in component Wee1 (dimensionless).
 * STATES[10] is Cdc25 in component Cdc25 (dimensionless).
 * CONSTANTS[22] is k25 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[23] is k5 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[24] is k25r_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[25] is k25r in component rate_constants (first_order_rate_constant).
 * CONSTANTS[26] is J25 in component Cdc25 (dimensionless).
 * CONSTANTS[27] is J25r in component Cdc25 (dimensionless).
 * STATES[11] is Slp1 in component Slp1 (dimensionless).
 * CONSTANTS[28] is kas in component rate_constants (first_order_rate_constant).
 * CONSTANTS[29] is kad in component rate_constants (first_order_rate_constant).
 * STATES[12] is Slp1_a in component Slp1_a (dimensionless).
 * CONSTANTS[30] is kaa_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[31] is kaa in component rate_constants (first_order_rate_constant).
 * CONSTANTS[32] is kai in component rate_constants (first_order_rate_constant).
 * STATES[13] is Inh in component Inh (dimensionless).
 * CONSTANTS[33] is k3 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[34] is ki in component rate_constants (first_order_rate_constant).
 * CONSTANTS[35] is kir in component rate_constants (first_order_rate_constant).
 * ALGEBRAIC[5] is k4 in component rate_constants (first_order_rate_constant).
 * STATES[14] is PI in component PI (dimensionless).
 * CONSTANTS[36] is kp in component rate_constants (first_order_rate_constant).
 * CONSTANTS[37] is kpp_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[38] is kpp in component rate_constants (first_order_rate_constant).
 * ALGEBRAIC[6] is k2c in component rate_constants (first_order_rate_constant).
 * CONSTANTS[39] is epsilon_p in component dimensionless_constants (dimensionless).
 * CONSTANTS[40] is mu in component mass (first_order_rate_constant).
 * STATES[15] is R_dna in component R_dna (dimensionless).
 * CONSTANTS[41] is K in component R_dna (dimensionless).
 * CONSTANTS[42] is Y in component R_dna (dimensionless).
 * CONSTANTS[43] is epsilon in component dimensionless_constants (dimensionless).
 * ALGEBRAIC[7] is ratio in component ratio (dimensionless).
 * CONSTANTS[44] is V2_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[45] is V2 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[46] is V2c in component rate_constants (first_order_rate_constant).
 * CONSTANTS[47] is V2c_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[48] is Vwee in component rate_constants (first_order_rate_constant).
 * CONSTANTS[49] is Vwee_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[50] is Vmik in component rate_constants (first_order_rate_constant).
 * CONSTANTS[51] is Vmik_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[52] is V25 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[53] is V25_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[54] is Vpyp in component rate_constants (first_order_rate_constant).
 * CONSTANTS[55] is V4 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[56] is V4_ in component rate_constants (first_order_rate_constant).
 * CONSTANTS[57] is Pyp3 in component rate_constants (dimensionless).
 * RATES[0] is d/dt MPF in component MPF (dimensionless).
 * RATES[2] is d/dt preMPF in component preMPF (dimensionless).
 * RATES[7] is d/dt Ste9 in component Ste9 (dimensionless).
 * RATES[8] is d/dt Mik1 in component Mik1 (dimensionless).
 * RATES[9] is d/dt Wee1 in component Wee1 (dimensionless).
 * RATES[10] is d/dt Cdc25 in component Cdc25 (dimensionless).
 * RATES[11] is d/dt Slp1 in component Slp1 (dimensionless).
 * RATES[12] is d/dt Slp1_a in component Slp1_a (dimensionless).
 * RATES[13] is d/dt Inh in component Inh (dimensionless).
 * RATES[14] is d/dt PI in component PI (dimensionless).
 * RATES[6] is d/dt CRP in component CRP (dimensionless).
 * RATES[5] is d/dt CR in component CR (dimensionless).
 * RATES[3] is d/dt Rum1 in component Rum1 (dimensionless).
 * RATES[4] is d/dt Rum1P in component Rum1P (dimensionless).
 * RATES[1] is d/dt mass in component mass (dimensionless).
 * RATES[15] is d/dt R_dna in component R_dna (dimensionless).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0;
CONSTANTS[0] = 0.02;
CONSTANTS[1] = 400;
CONSTANTS[2] = 1;
CONSTANTS[3] = 0.1;
CONSTANTS[4] = 5;
STATES[1] = 1;
STATES[2] = 1;
STATES[3] = 0;
STATES[4] = 0;
STATES[5] = 0;
STATES[6] = 0;
STATES[7] = 0;
CONSTANTS[5] = 0.03;
CONSTANTS[6] = 8;
CONSTANTS[7] = 5;
CONSTANTS[8] = 0.01;
CONSTANTS[9] = 0.01;
CONSTANTS[10] = 0.018;
STATES[8] = 0;
CONSTANTS[11] = 0.1;
CONSTANTS[12] = 0.01;
CONSTANTS[13] = 5;
CONSTANTS[14] = 1;
CONSTANTS[15] = 0.15;
CONSTANTS[16] = 0.15;
STATES[9] = 0;
CONSTANTS[17] = 0.4;
CONSTANTS[18] = 1;
CONSTANTS[19] = 2;
CONSTANTS[20] = 0.2;
CONSTANTS[21] = 0.2;
STATES[10] = 0;
CONSTANTS[22] = 1;
CONSTANTS[23] = 0.1;
CONSTANTS[24] = 0.4;
CONSTANTS[25] = 2;
CONSTANTS[26] = 0.05;
CONSTANTS[27] = 0.05;
STATES[11] = 0;
CONSTANTS[28] = 0.1;
CONSTANTS[29] = 0.1;
STATES[12] = 0;
CONSTANTS[30] = 0.01;
CONSTANTS[31] = 0.1;
CONSTANTS[32] = 0.1;
STATES[13] = 0;
CONSTANTS[33] = 0.1;
CONSTANTS[34] = 50;
CONSTANTS[35] = 0.5;
STATES[14] = 0.2;
CONSTANTS[36] = 100;
CONSTANTS[37] = 1;
CONSTANTS[38] = 100;
CONSTANTS[39] = 0.025;
CONSTANTS[40] = 0.00462;
STATES[15] = 1;
CONSTANTS[41] = 0.06;
CONSTANTS[42] = 0;
CONSTANTS[43] = 0.05;
CONSTANTS[44] = 0.02;
CONSTANTS[45] = 1;
CONSTANTS[46] = 0.5;
CONSTANTS[47] = 0.02;
CONSTANTS[48] = 10;
CONSTANTS[49] = 0.08;
CONSTANTS[50] = 2;
CONSTANTS[51] = 0.04;
CONSTANTS[52] = 10;
CONSTANTS[53] = 0.05;
CONSTANTS[54] = 0.07;
CONSTANTS[55] = 1;
CONSTANTS[56] = 0.01;
CONSTANTS[57] = 1;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[1] =  CONSTANTS[40]*STATES[1];
ALGEBRAIC[1] = STATES[0]+ CONSTANTS[43]*STATES[2];
RATES[11] =  CONSTANTS[28]*ALGEBRAIC[1] -  CONSTANTS[29]*STATES[11];
RATES[12] =  (CONSTANTS[30]+ CONSTANTS[31]*ALGEBRAIC[1])*(STATES[11] - STATES[12]) -  (CONSTANTS[32]+CONSTANTS[29])*STATES[12];
RATES[15] = ( CONSTANTS[41]*1.00000)/(1.00000+ CONSTANTS[42]*ALGEBRAIC[1]);
ALGEBRAIC[3] = 1.00000 - STATES[14];
RATES[7] = ( (CONSTANTS[5]+ CONSTANTS[6]*ALGEBRAIC[3])*(1.00000 - STATES[7]))/((CONSTANTS[8]+1.00000) - STATES[7]) - ( CONSTANTS[7]*(ALGEBRAIC[1]+ CONSTANTS[10]*STATES[1])*STATES[7])/(CONSTANTS[9]+STATES[7]);
RATES[8] = ( (CONSTANTS[11]+CONSTANTS[12]+ CONSTANTS[13]*ALGEBRAIC[3])*(1.00000 - STATES[8]))/((CONSTANTS[15]+1.00000) - STATES[8]) - ( CONSTANTS[14]*ALGEBRAIC[1]*STATES[8])/(CONSTANTS[16]+STATES[8]);
RATES[9] = ( (CONSTANTS[17]+ CONSTANTS[18]*ALGEBRAIC[3])*(1.00000 - STATES[9]))/((CONSTANTS[20]+1.00000) - STATES[9]) - ( CONSTANTS[19]*ALGEBRAIC[1]*STATES[9])/(CONSTANTS[21]+STATES[9]);
RATES[10] = ( CONSTANTS[22]*ALGEBRAIC[1]*(1.00000 - STATES[10]))/((CONSTANTS[26]+1.00000) - STATES[10]) - ( (CONSTANTS[23]+CONSTANTS[24]+ CONSTANTS[25]*ALGEBRAIC[3])*STATES[10])/(CONSTANTS[27]+STATES[10]);
ALGEBRAIC[0] = CONSTANTS[44]+ CONSTANTS[45]*STATES[7];
ALGEBRAIC[2] =  CONSTANTS[48]*STATES[9]+ CONSTANTS[49]*(1.00000 - STATES[9])+ CONSTANTS[50]*STATES[8]+ CONSTANTS[51]*(1.00000 - STATES[8]);
ALGEBRAIC[4] =  CONSTANTS[52]*STATES[10]+ CONSTANTS[53]*(1.00000 - STATES[10])+ CONSTANTS[54]*CONSTANTS[57];
RATES[0] = (((( CONSTANTS[0]*STATES[1] -  ALGEBRAIC[0]*STATES[0]) -  ALGEBRAIC[2]*STATES[0])+ ALGEBRAIC[4]*STATES[2]) -  CONSTANTS[1]*STATES[0]*(STATES[3]+STATES[4]))+ CONSTANTS[2]*(STATES[5]+STATES[6])+ CONSTANTS[3]*STATES[5]+ (CONSTANTS[3]+CONSTANTS[4])*STATES[6];
RATES[2] = ( ALGEBRAIC[2]*STATES[0] -  ALGEBRAIC[4]*STATES[2]) -  ALGEBRAIC[0]*STATES[2];
ALGEBRAIC[5] = CONSTANTS[56]+ CONSTANTS[55]*STATES[12];
RATES[13] = ((CONSTANTS[33] -  CONSTANTS[34]*STATES[13]*ALGEBRAIC[3])+ CONSTANTS[35]*STATES[14]) -  ALGEBRAIC[5]*STATES[13];
RATES[14] = ( CONSTANTS[34]*STATES[13]*ALGEBRAIC[3] -  CONSTANTS[35]*STATES[14]) -  ALGEBRAIC[5]*STATES[14];
ALGEBRAIC[6] = CONSTANTS[47]+ CONSTANTS[46]*STATES[7];
RATES[6] = (((( CONSTANTS[36]*(ALGEBRAIC[1]+ CONSTANTS[39]*CONSTANTS[10]*STATES[1])*STATES[5] -  (CONSTANTS[37]+ CONSTANTS[38]*ALGEBRAIC[3])*STATES[6])+ CONSTANTS[1]*STATES[0]*STATES[4]) -  CONSTANTS[2]*STATES[6]) -  ALGEBRAIC[6]*STATES[6]) -  (CONSTANTS[3]+CONSTANTS[4])*STATES[6];
RATES[5] = (((( CONSTANTS[1]*STATES[0]*STATES[3] -  CONSTANTS[2]*STATES[5]) -  ALGEBRAIC[6]*STATES[5]) -  CONSTANTS[3]*STATES[5]) -  CONSTANTS[36]*(ALGEBRAIC[1]+ CONSTANTS[39]*CONSTANTS[10]*STATES[1])*STATES[5])+ (CONSTANTS[37]+ CONSTANTS[38]*ALGEBRAIC[3])*STATES[6];
RATES[3] = ((((CONSTANTS[23] -  CONSTANTS[3]*STATES[3]) -  CONSTANTS[36]*(ALGEBRAIC[1]+ CONSTANTS[39]*CONSTANTS[10]*STATES[1])*STATES[3])+ (CONSTANTS[37]+ CONSTANTS[38]*ALGEBRAIC[3])*STATES[4]) -  CONSTANTS[1]*STATES[0]*STATES[3])+ CONSTANTS[2]*STATES[5]+ ALGEBRAIC[6]*STATES[5];
RATES[4] = ((( CONSTANTS[36]*(ALGEBRAIC[1]+ CONSTANTS[39]*CONSTANTS[10]*STATES[1])*STATES[3] -  (CONSTANTS[37]+ CONSTANTS[38]*ALGEBRAIC[3])*STATES[4]) -  (CONSTANTS[3]+CONSTANTS[4])*STATES[4]) -  CONSTANTS[1]*STATES[0]*STATES[4])+ CONSTANTS[2]*STATES[6]+ ALGEBRAIC[6]*STATES[6];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[1] = STATES[0]+ CONSTANTS[43]*STATES[2];
ALGEBRAIC[3] = 1.00000 - STATES[14];
ALGEBRAIC[0] = CONSTANTS[44]+ CONSTANTS[45]*STATES[7];
ALGEBRAIC[2] =  CONSTANTS[48]*STATES[9]+ CONSTANTS[49]*(1.00000 - STATES[9])+ CONSTANTS[50]*STATES[8]+ CONSTANTS[51]*(1.00000 - STATES[8]);
ALGEBRAIC[4] =  CONSTANTS[52]*STATES[10]+ CONSTANTS[53]*(1.00000 - STATES[10])+ CONSTANTS[54]*CONSTANTS[57];
ALGEBRAIC[5] = CONSTANTS[56]+ CONSTANTS[55]*STATES[12];
ALGEBRAIC[6] = CONSTANTS[47]+ CONSTANTS[46]*STATES[7];
ALGEBRAIC[7] = ALGEBRAIC[1]/ALGEBRAIC[3];
}