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 6 entries in the algebraic variable array.
There are a total of 12 entries in each of the rate and state variable arrays.
There are a total of 34 entries in the constant variable array.
*/
/*
* VOI is time in component environment (minute).
* CONSTANTS[0] is k1 in component rate_constants (first_order_rate_constant).
* CONSTANTS[1] is k2 in component rate_constants (first_order_rate_constant).
* CONSTANTS[2] is k3 in component rate_constants (first_order_rate_constant).
* CONSTANTS[3] is k4 in component rate_constants (first_order_rate_constant).
* CONSTANTS[4] is k5 in component rate_constants (first_order_rate_constant).
* CONSTANTS[5] is k6 in component rate_constants (first_order_rate_constant).
* CONSTANTS[6] is k7 in component rate_constants (first_order_rate_constant).
* CONSTANTS[7] is k8 in component rate_constants (first_order_rate_constant).
* CONSTANTS[8] is k9 in component rate_constants (first_order_rate_constant).
* CONSTANTS[9] is k10 in component rate_constants (first_order_rate_constant).
* CONSTANTS[10] is k11 in component rate_constants (first_order_rate_constant).
* CONSTANTS[11] is k12 in component rate_constants (first_order_rate_constant).
* CONSTANTS[12] is k13 in component rate_constants (first_order_rate_constant).
* CONSTANTS[13] is k14 in component rate_constants (first_order_rate_constant).
* CONSTANTS[14] is k15 in component rate_constants (first_order_rate_constant).
* CONSTANTS[15] is k16 in component rate_constants (first_order_rate_constant).
* CONSTANTS[16] is k2u in component rate_constants (first_order_rate_constant).
* CONSTANTS[17] is k7u in component rate_constants (first_order_rate_constant).
* CONSTANTS[18] is k16u in component rate_constants (first_order_rate_constant).
* CONSTANTS[19] is az in component rate_constants (first_order_rate_constant).
* CONSTANTS[20] is bz in component rate_constants (first_order_rate_constant).
* CONSTANTS[21] is cz in component rate_constants (first_order_rate_constant).
* CONSTANTS[22] is aw in component rate_constants (first_order_rate_constant).
* CONSTANTS[23] is bw in component rate_constants (first_order_rate_constant).
* CONSTANTS[24] is cw in component rate_constants (first_order_rate_constant).
* CONSTANTS[25] is ai in component rate_constants (first_order_rate_constant).
* CONSTANTS[26] is bi in component rate_constants (first_order_rate_constant).
* CONSTANTS[27] is ci in component rate_constants (first_order_rate_constant).
* STATES[0] is cyclin_CDK_active in component cyclin_CDK_active (dimensionless).
* ALGEBRAIC[0] is kplus_z in component rate_constants (first_order_rate_constant).
* ALGEBRAIC[1] is kplus_w in component rate_constants (first_order_rate_constant).
* ALGEBRAIC[2] is kplus_i in component rate_constants (first_order_rate_constant).
* CONSTANTS[31] is kminus_z in component rate_constants (first_order_rate_constant).
* CONSTANTS[32] is kminus_w in component rate_constants (first_order_rate_constant).
* CONSTANTS[33] is kminus_i in component rate_constants (first_order_rate_constant).
* STATES[1] is cyclin in component cyclin (dimensionless).
* STATES[2] is cyclin_CDK_inactive in component cyclin_CDK_inactive (dimensionless).
* ALGEBRAIC[3] is CDK in component CDK (dimensionless).
* STATES[3] is APC in component APC (dimensionless).
* STATES[4] is wee1 in component wee1 (dimensionless).
* STATES[5] is Cdc25_2P in component Cdc25_2P (dimensionless).
* STATES[6] is CKI in component CKI (dimensionless).
* STATES[7] is cyclin_CDK_CKI in component cyclin_CDK_CKI (dimensionless).
* STATES[8] is cyclin_CDK_CKI_P in component cyclin_CDK_CKI_P (dimensionless).
* STATES[9] is Cdc25 in component Cdc25 (dimensionless).
* STATES[10] is Cdc25_P in component Cdc25_P (dimensionless).
* STATES[11] is wee1_P in component wee1_P (dimensionless).
* CONSTANTS[28] is tau in component APC (minute).
* ALGEBRAIC[4] is h_x in component APC (dimensionless).
* CONSTANTS[29] is a in component APC (dimensionless).
* CONSTANTS[30] is CDK_T in component CDK (dimensionless).
* ALGEBRAIC[5] is cyclin_T in component cyclin_T (dimensionless).
* RATES[1] is d/dt cyclin in component cyclin (dimensionless).
* RATES[2] is d/dt cyclin_CDK_inactive in component cyclin_CDK_inactive (dimensionless).
* RATES[0] is d/dt cyclin_CDK_active in component cyclin_CDK_active (dimensionless).
* RATES[9] is d/dt Cdc25 in component Cdc25 (dimensionless).
* RATES[10] is d/dt Cdc25_P in component Cdc25_P (dimensionless).
* RATES[5] is d/dt Cdc25_2P in component Cdc25_2P (dimensionless).
* RATES[4] is d/dt wee1 in component wee1 (dimensionless).
* RATES[11] is d/dt wee1_P in component wee1_P (dimensionless).
* RATES[3] is d/dt APC in component APC (dimensionless).
* RATES[6] is d/dt CKI in component CKI (dimensionless).
* RATES[7] is d/dt cyclin_CDK_CKI in component cyclin_CDK_CKI (dimensionless).
* RATES[8] is d/dt cyclin_CDK_CKI_P in component cyclin_CDK_CKI_P (dimensionless).
*/
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 300;
CONSTANTS[1] = 5;
CONSTANTS[2] = 30;
CONSTANTS[3] = 30;
CONSTANTS[4] = 0.1;
CONSTANTS[5] = 1;
CONSTANTS[6] = 10;
CONSTANTS[7] = 100;
CONSTANTS[8] = 1;
CONSTANTS[9] = 10;
CONSTANTS[10] = 1;
CONSTANTS[11] = 0;
CONSTANTS[12] = 1;
CONSTANTS[13] = 1;
CONSTANTS[14] = 1;
CONSTANTS[15] = 2;
CONSTANTS[16] = 50;
CONSTANTS[17] = 0;
CONSTANTS[18] = 25;
CONSTANTS[19] = 10;
CONSTANTS[20] = 0.1;
CONSTANTS[21] = 1;
CONSTANTS[22] = 10;
CONSTANTS[23] = 0.1;
CONSTANTS[24] = 1;
CONSTANTS[25] = 10;
CONSTANTS[26] = 0.1;
CONSTANTS[27] = 1;
STATES[0] = 0.1;
STATES[1] = 0;
STATES[2] = 0.1;
STATES[3] = 0;
STATES[4] = 0;
STATES[5] = 0;
STATES[6] = 0;
STATES[7] = 0;
STATES[8] = 0;
STATES[9] = 0;
STATES[10] = 0;
STATES[11] = 0;
CONSTANTS[28] = 25;
CONSTANTS[29] = 4;
CONSTANTS[30] = 200;
CONSTANTS[31] = CONSTANTS[19];
CONSTANTS[32] = CONSTANTS[22];
CONSTANTS[33] = CONSTANTS[25];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = ((((( CONSTANTS[4]*STATES[2]+ STATES[5]*STATES[2]*1.00000) - CONSTANTS[5]*STATES[0]) - STATES[4]*STATES[0]*1.00000) - (CONSTANTS[6]+ CONSTANTS[17]*STATES[3])*STATES[0]) - CONSTANTS[13]*STATES[0]*STATES[6])+ CONSTANTS[14]*STATES[7]+ (CONSTANTS[15]+ CONSTANTS[18]*STATES[3])*STATES[8];
RATES[6] = ((CONSTANTS[11] - CONSTANTS[12]*STATES[6]) - CONSTANTS[11]*STATES[0]*STATES[6])+ CONSTANTS[14]*STATES[7];
ALGEBRAIC[3] = ((((CONSTANTS[30] - STATES[0]) - STATES[2]) - STATES[7]) - STATES[8])/CONSTANTS[30];
RATES[1] = ((CONSTANTS[0]+ CONSTANTS[3]*STATES[2]) - CONSTANTS[2]*STATES[1]*ALGEBRAIC[3]) - (CONSTANTS[1]+ CONSTANTS[16]*STATES[3])*STATES[1];
RATES[2] = ((( CONSTANTS[2]*STATES[1]*ALGEBRAIC[3]+ CONSTANTS[5]*STATES[0]+ STATES[4]*STATES[0]*1.00000) - CONSTANTS[3]*STATES[2]) - CONSTANTS[4]*STATES[2]) - STATES[5]*STATES[2]*1.00000;
ALGEBRAIC[0] = CONSTANTS[20]+ CONSTANTS[21]*STATES[0];
RATES[9] = ((CONSTANTS[7]+ CONSTANTS[31]*STATES[10]) - ALGEBRAIC[0]*STATES[9]) - CONSTANTS[8]*STATES[9];
RATES[10] = ( ALGEBRAIC[0]*(STATES[9] - STATES[10])+ CONSTANTS[31]*(STATES[5] - STATES[10])) - CONSTANTS[8]*STATES[10];
RATES[5] = ( ALGEBRAIC[0]*STATES[10] - CONSTANTS[31]*STATES[5]) - CONSTANTS[8]*STATES[5];
ALGEBRAIC[1] = CONSTANTS[23]+ CONSTANTS[24]*STATES[0];
RATES[4] = ((CONSTANTS[9]+ CONSTANTS[32]*STATES[11]) - ALGEBRAIC[1]*STATES[4]) - CONSTANTS[10]*STATES[4];
RATES[11] = ( ALGEBRAIC[1]*STATES[4] - CONSTANTS[32]*STATES[11]) - CONSTANTS[10]*STATES[11];
ALGEBRAIC[4] = pow(STATES[0], 2.00000)/(pow(CONSTANTS[29], 2.00000)+pow(STATES[0], 2.00000));
RATES[3] = (ALGEBRAIC[4] - STATES[3])/CONSTANTS[28];
ALGEBRAIC[2] = CONSTANTS[26]+ CONSTANTS[27]*STATES[0];
RATES[7] = (( CONSTANTS[13]*STATES[0]*STATES[6] - CONSTANTS[14]*STATES[7])+ CONSTANTS[33]*STATES[8]) - ALGEBRAIC[2]*STATES[7];
RATES[8] = ( ALGEBRAIC[2]*STATES[7] - CONSTANTS[33]*STATES[8]) - (CONSTANTS[15]+ CONSTANTS[18]*STATES[3])*STATES[8];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[3] = ((((CONSTANTS[30] - STATES[0]) - STATES[2]) - STATES[7]) - STATES[8])/CONSTANTS[30];
ALGEBRAIC[0] = CONSTANTS[20]+ CONSTANTS[21]*STATES[0];
ALGEBRAIC[1] = CONSTANTS[23]+ CONSTANTS[24]*STATES[0];
ALGEBRAIC[4] = pow(STATES[0], 2.00000)/(pow(CONSTANTS[29], 2.00000)+pow(STATES[0], 2.00000));
ALGEBRAIC[2] = CONSTANTS[26]+ CONSTANTS[27]*STATES[0];
ALGEBRAIC[5] = STATES[1]+STATES[0]+STATES[2];
}
