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 2 entries in the algebraic variable array.
   There are a total of 34 entries in each of the rate and state variable arrays.
   There are a total of 55 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is v_c in component v_c (nanomolar).
 * ALGEBRAIC[0] is dv_c_dt in component dv_c_dt (flux).
 * CONSTANTS[0] is k_growth in component rate_constants (first_order_rate_constant).
 * STATES[1] is v_n in component v_n (nanomolar).
 * ALGEBRAIC[1] is k_volume in component k_volume (dimensionless).
 * STATES[2] is mcln2_c in component mcln2_c (nanomolar).
 * CONSTANTS[1] is k_50 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[2] is k_10 in component rate_constants (first_order_rate_constant).
 * STATES[3] is mcln2_n in component mcln2_n (nanomolar).
 * STATES[4] is mclb5_c in component mclb5_c (nanomolar).
 * CONSTANTS[3] is k_51 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[4] is k_11 in component rate_constants (first_order_rate_constant).
 * STATES[5] is mclb5_n in component mclb5_n (nanomolar).
 * CONSTANTS[5] is k_1 in component rate_constants (first_order_rate_constant).
 * STATES[6] is sbf_n in component sbf_n (nanomolar).
 * CONSTANTS[6] is k_2 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[7] is k_39 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[8] is k_34 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[9] is k_35 in component rate_constants (first_order_rate_constant).
 * STATES[7] is sbfwhi5p_n in component sbfwhi5p_n (nanomolar).
 * STATES[8] is whi5_n in component whi5_n (nanomolar).
 * STATES[9] is sbfwhi5_n in component sbfwhi5_n (nanomolar).
 * STATES[10] is cln3_c in component cln3_c (nanomolar).
 * CONSTANTS[10] is k_6 in component rate_constants (flux).
 * CONSTANTS[11] is k_43 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[12] is k_15 in component rate_constants (first_order_rate_constant).
 * STATES[11] is cln2_c in component cln2_c (nanomolar).
 * CONSTANTS[13] is k_3 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[14] is k_26 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[15] is k_27 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[16] is k_12 in component rate_constants (first_order_rate_constant).
 * STATES[12] is cdk1_c in component cdk1_c (nanomolar).
 * STATES[13] is cdk1cln2_c in component cdk1cln2_c (nanomolar).
 * STATES[14] is clb5_c in component clb5_c (nanomolar).
 * CONSTANTS[17] is k_4 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[18] is k_28 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[19] is k_29 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[20] is k_13 in component rate_constants (first_order_rate_constant).
 * STATES[15] is cdk1clb5_c in component cdk1clb5_c (nanomolar).
 * CONSTANTS[21] is k_7 in component rate_constants (flux).
 * CONSTANTS[22] is k_44 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[23] is k_49 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[24] is k_16 in component rate_constants (first_order_rate_constant).
 * STATES[16] is cdk1_n in component cdk1_n (nanomolar).
 * STATES[17] is cln3_n in component cln3_n (nanomolar).
 * CONSTANTS[25] is k_24 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[26] is k_25 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[27] is k_20 in component rate_constants (first_order_rate_constant).
 * STATES[18] is cdk1cln3_n in component cdk1cln3_n (nanomolar).
 * CONSTANTS[28] is k_21 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[29] is k_46 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[30] is k_53 in component rate_constants (first_order_rate_constant).
 * STATES[19] is cdk1cln2_n in component cdk1cln2_n (nanomolar).
 * CONSTANTS[31] is k_33 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[32] is k_32 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[33] is k_48 in component rate_constants (first_order_rate_constant).
 * STATES[20] is cdk1clb5sic1_c in component cdk1clb5sic1_c (nanomolar).
 * STATES[21] is sic1_c in component sic1_c (nanomolar).
 * STATES[22] is cdk1clb5_n in component cdk1clb5_n (nanomolar).
 * CONSTANTS[34] is k_41 in component rate_constants (first_order_rate_constant).
 * STATES[23] is cdk1clb5sic1p_n in component cdk1clb5sic1p_n (nanomolar).
 * CONSTANTS[35] is k_31 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[36] is k_30 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[37] is k_40 in component rate_constants (first_order_rate_constant).
 * STATES[24] is cdk1cln3far1_n in component cdk1cln3far1_n (nanomolar).
 * STATES[25] is far1_n in component far1_n (nanomolar).
 * STATES[26] is cdk1cln3far1p_n in component cdk1cln3far1p_n (nanomolar).
 * CONSTANTS[38] is k_36 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[39] is k_37 in component rate_constants (second_order_rate_constant).
 * STATES[27] is cdk1clb5sic1_n in component cdk1clb5sic1_n (nanomolar).
 * CONSTANTS[40] is k_47 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[41] is k_38 in component rate_constants (second_order_rate_constant).
 * CONSTANTS[42] is k_9 in component rate_constants (flux).
 * CONSTANTS[43] is k_18 in component rate_constants (first_order_rate_constant).
 * STATES[28] is whi5_c in component whi5_c (nanomolar).
 * CONSTANTS[44] is k_8 in component rate_constants (flux).
 * CONSTANTS[45] is k_45 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[46] is k_17 in component rate_constants (first_order_rate_constant).
 * STATES[29] is far1_c in component far1_c (nanomolar).
 * CONSTANTS[47] is k_5 in component rate_constants (flux).
 * CONSTANTS[48] is k_42 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[49] is k_14 in component rate_constants (first_order_rate_constant).
 * STATES[30] is whi5p_c in component whi5p_c (nanomolar).
 * CONSTANTS[50] is k_52 in component rate_constants (first_order_rate_constant).
 * STATES[31] is whi5p_n in component whi5p_n (nanomolar).
 * STATES[32] is sic1P_n in component sic1P_n (nanomolar).
 * STATES[33] is far1P_n in component far1P_n (nanomolar).
 * CONSTANTS[51] is k_22 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[52] is k_19 in component rate_constants (first_order_rate_constant).
 * CONSTANTS[53] is k_23 in component rate_constants (first_order_rate_constant).
 * RATES[0] is d/dt v_c in component v_c (nanomolar).
 * RATES[1] is d/dt v_n in component v_n (nanomolar).
 * RATES[2] is d/dt mcln2_c in component mcln2_c (nanomolar).
 * RATES[4] is d/dt mclb5_c in component mclb5_c (nanomolar).
 * RATES[3] is d/dt mcln2_n in component mcln2_n (nanomolar).
 * RATES[5] is d/dt mclb5_n in component mclb5_n (nanomolar).
 * RATES[6] is d/dt sbf_n in component sbf_n (nanomolar).
 * RATES[10] is d/dt cln3_c in component cln3_c (nanomolar).
 * RATES[11] is d/dt cln2_c in component cln2_c (nanomolar).
 * RATES[14] is d/dt clb5_c in component clb5_c (nanomolar).
 * RATES[12] is d/dt cdk1_c in component cdk1_c (nanomolar).
 * RATES[17] is d/dt cln3_n in component cln3_n (nanomolar).
 * RATES[16] is d/dt cdk1_n in component cdk1_n (nanomolar).
 * RATES[13] is d/dt cdk1cln2_c in component cdk1cln2_c (nanomolar).
 * RATES[15] is d/dt cdk1clb5_c in component cdk1clb5_c (nanomolar).
 * RATES[19] is d/dt cdk1cln2_n in component cdk1cln2_n (nanomolar).
 * RATES[22] is d/dt cdk1clb5_n in component cdk1clb5_n (nanomolar).
 * RATES[18] is d/dt cdk1cln3_n in component cdk1cln3_n (nanomolar).
 * RATES[9] is d/dt sbfwhi5_n in component sbfwhi5_n (nanomolar).
 * RATES[7] is d/dt sbfwhi5p_n in component sbfwhi5p_n (nanomolar).
 * RATES[24] is d/dt cdk1cln3far1_n in component cdk1cln3far1_n (nanomolar).
 * RATES[27] is d/dt cdk1clb5sic1_n in component cdk1clb5sic1_n (nanomolar).
 * RATES[23] is d/dt cdk1clb5sic1p_n in component cdk1clb5sic1p_n (nanomolar).
 * RATES[26] is d/dt cdk1cln3far1p_n in component cdk1cln3far1p_n (nanomolar).
 * RATES[20] is d/dt cdk1clb5sic1_c in component cdk1clb5sic1_c (nanomolar).
 * RATES[21] is d/dt sic1_c in component sic1_c (nanomolar).
 * RATES[28] is d/dt whi5_c in component whi5_c (nanomolar).
 * RATES[29] is d/dt far1_c in component far1_c (nanomolar).
 * RATES[30] is d/dt whi5p_c in component whi5p_c (nanomolar).
 * RATES[32] is d/dt sic1P_n in component sic1P_n (nanomolar).
 * RATES[33] is d/dt far1P_n in component far1P_n (nanomolar).
 * RATES[8] is d/dt whi5_n in component whi5_n (nanomolar).
 * RATES[25] is d/dt far1_n in component far1_n (nanomolar).
 * RATES[31] is d/dt whi5p_n in component whi5p_n (nanomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.5;
CONSTANTS[0] = 0.0051;
STATES[1] = 0.5;
STATES[2] = 0;
CONSTANTS[1] = 0.6;
CONSTANTS[2] = 0.12;
STATES[3] = 0;
STATES[4] = 0;
CONSTANTS[3] = 0.6;
CONSTANTS[4] = 0.12;
STATES[5] = 0;
CONSTANTS[5] = 0.03523;
STATES[6] = 0;
CONSTANTS[6] = 0.03523;
CONSTANTS[7] = 1;
CONSTANTS[8] = 8.46;
CONSTANTS[9] = 0.0005;
STATES[7] = 0;
STATES[8] = 0;
STATES[9] = 0.025544;
STATES[10] = 0.000485;
CONSTANTS[10] = 0.00001;
CONSTANTS[11] = 0.005;
CONSTANTS[12] = 0.01;
STATES[11] = 0;
CONSTANTS[13] = 0.32;
CONSTANTS[14] = 2.82;
CONSTANTS[15] = 0.55;
CONSTANTS[16] = 0.1;
STATES[12] = 0.333333;
STATES[13] = 0;
STATES[14] = 0;
CONSTANTS[17] = 0.32;
CONSTANTS[18] = 2.82;
CONSTANTS[19] = 0.55;
CONSTANTS[20] = 0.35;
STATES[15] = 0;
CONSTANTS[21] = 0.01;
CONSTANTS[22] = 0.005;
CONSTANTS[23] = 0.001;
CONSTANTS[24] = 0.03;
STATES[16] = 0.0074127;
STATES[17] = 0;
CONSTANTS[25] = 2.82;
CONSTANTS[26] = 0.55;
CONSTANTS[27] = 0.01;
STATES[18] = 0;
CONSTANTS[28] = 0;
CONSTANTS[29] = 0.1;
CONSTANTS[30] = 0.001;
STATES[19] = 0;
CONSTANTS[31] = 0.55;
CONSTANTS[32] = 84.6;
CONSTANTS[33] = 0.012;
STATES[20] = 0;
STATES[21] = 0.039234;
STATES[22] = 0;
CONSTANTS[34] = 1;
STATES[23] = 0;
CONSTANTS[35] = 0.55;
CONSTANTS[36] = 42300;
CONSTANTS[37] = 1;
STATES[24] = 0;
STATES[25] = 0;
STATES[26] = 0;
CONSTANTS[38] = 4363.6;
CONSTANTS[39] = 4363.6;
STATES[27] = 0;
CONSTANTS[40] = 1;
CONSTANTS[41] = 4363.6;
CONSTANTS[42] = 0.00005;
CONSTANTS[43] = 0.0008;
STATES[28] = 0.073564;
CONSTANTS[44] = 0.00004;
CONSTANTS[45] = 0.005;
CONSTANTS[46] = 0.01;
STATES[29] = 0.0037926;
CONSTANTS[47] = 0.000042;
CONSTANTS[48] = 0.005;
CONSTANTS[49] = 0.01;
STATES[30] = 0;
CONSTANTS[50] = 0.005;
STATES[31] = 0;
STATES[32] = 0;
STATES[33] = 0;
CONSTANTS[51] = 0.01;
CONSTANTS[52] = 0.01;
CONSTANTS[53] = 0.01;
CONSTANTS[54] = 0.00000;
RATES[0] = 0.1001;
RATES[2] = 0.1001;
RATES[4] = 0.1001;
RATES[3] = 0.1001;
RATES[5] = 0.1001;
RATES[6] = 0.1001;
RATES[10] = 0.1001;
RATES[11] = 0.1001;
RATES[14] = 0.1001;
RATES[12] = 0.1001;
RATES[17] = 0.1001;
RATES[16] = 0.1001;
RATES[13] = 0.1001;
RATES[15] = 0.1001;
RATES[19] = 0.1001;
RATES[22] = 0.1001;
RATES[18] = 0.1001;
RATES[9] = 0.1001;
RATES[7] = 0.1001;
RATES[24] = 0.1001;
RATES[27] = 0.1001;
RATES[23] = 0.1001;
RATES[26] = 0.1001;
RATES[20] = 0.1001;
RATES[21] = 0.1001;
RATES[28] = 0.1001;
RATES[29] = 0.1001;
RATES[30] = 0.1001;
RATES[32] = 0.1001;
RATES[33] = 0.1001;
RATES[8] = 0.1001;
RATES[25] = 0.1001;
RATES[31] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] - ALGEBRAIC[0];
resid[1] = RATES[2] - ( CONSTANTS[1]*STATES[3]*ALGEBRAIC[1] -  CONSTANTS[2]*STATES[2]) -  (ALGEBRAIC[0]/STATES[0])*STATES[2];
resid[2] = RATES[4] - ( CONSTANTS[3]*STATES[5]*ALGEBRAIC[1] -  CONSTANTS[4]*STATES[4]) -  (ALGEBRAIC[0]/STATES[0])*STATES[4];
resid[3] = RATES[3] -  CONSTANTS[5]*STATES[6] -  CONSTANTS[1]*STATES[3];
resid[4] = RATES[5] -  CONSTANTS[6]*STATES[6] -  CONSTANTS[3]*STATES[5];
resid[5] = RATES[6] - ( CONSTANTS[7]*STATES[7] -  CONSTANTS[8]*STATES[6]*STATES[8])+ CONSTANTS[9]*STATES[9];
resid[6] = RATES[10] - ((CONSTANTS[10] -  CONSTANTS[11]*STATES[10]) -  CONSTANTS[12]*STATES[10]) -  (ALGEBRAIC[0]/STATES[0])*STATES[10];
resid[7] = RATES[11] - ((( CONSTANTS[13]*STATES[2] -  CONSTANTS[14]*STATES[12]*STATES[11])+ CONSTANTS[15]*STATES[13]) -  CONSTANTS[16]*STATES[11]) -  (ALGEBRAIC[0]/STATES[0])*STATES[11];
resid[8] = RATES[14] - ((( CONSTANTS[17]*STATES[4] -  CONSTANTS[18]*STATES[14]*STATES[12])+ CONSTANTS[19]*STATES[15]) -  CONSTANTS[20]*STATES[14]) -  (ALGEBRAIC[0]/STATES[0])*STATES[14];
resid[9] = RATES[12] - ((((((CONSTANTS[21] -  CONSTANTS[22]*STATES[12])+ CONSTANTS[23]*STATES[16]+ CONSTANTS[15]*STATES[13]) -  CONSTANTS[14]*STATES[12]*STATES[11]) -  CONSTANTS[18]*STATES[12]*STATES[14])+ CONSTANTS[19]*STATES[15]) -  CONSTANTS[24]*STATES[12]) -  (ALGEBRAIC[0]/STATES[0])*STATES[12];
resid[10] = RATES[17] - ((( CONSTANTS[11]*STATES[10])/ALGEBRAIC[1] -  CONSTANTS[25]*STATES[17]*STATES[16])+ CONSTANTS[26]*STATES[18]) -  CONSTANTS[27]*STATES[17];
resid[11] = RATES[16] - (((( CONSTANTS[22]*STATES[12])/ALGEBRAIC[1] -  CONSTANTS[23]*STATES[16]) -  CONSTANTS[25]*STATES[17]*STATES[16])+ CONSTANTS[26]*STATES[18]) -  CONSTANTS[28]*STATES[16];
resid[12] = RATES[13] - ((( CONSTANTS[14]*STATES[12]*STATES[11] -  CONSTANTS[15]*STATES[13]) -  CONSTANTS[29]*STATES[13])+ CONSTANTS[30]*STATES[19]*ALGEBRAIC[1]) -  (ALGEBRAIC[0]/STATES[0])*STATES[13];
resid[13] = RATES[15] - (((( CONSTANTS[18]*STATES[12]*STATES[14] -  CONSTANTS[19]*STATES[15])+ CONSTANTS[31]*STATES[20]) -  CONSTANTS[32]*STATES[21]*STATES[15]) -  CONSTANTS[33]*STATES[15]) -  (ALGEBRAIC[0]/STATES[0])*STATES[15];
resid[14] = RATES[19] - ( CONSTANTS[29]*STATES[13])/ALGEBRAIC[1] -  CONSTANTS[30]*STATES[19];
resid[15] = RATES[22] -  CONSTANTS[34]*STATES[23]+( CONSTANTS[33]*STATES[15])/ALGEBRAIC[1];
resid[16] = RATES[18] - ((( CONSTANTS[25]*STATES[17]*STATES[16] -  CONSTANTS[26]*STATES[18])+ CONSTANTS[35]*STATES[24]) -  CONSTANTS[36]*STATES[25]*STATES[18])+ CONSTANTS[37]*STATES[26];
resid[17] = RATES[9] - ( CONSTANTS[8]*STATES[6]*STATES[8] -  CONSTANTS[9]*STATES[9]) -  CONSTANTS[38]*STATES[9]*STATES[18];
resid[18] = RATES[7] -  CONSTANTS[38]*STATES[9]*STATES[18] -  CONSTANTS[7]*STATES[7];
resid[19] = RATES[24] - ( CONSTANTS[36]*STATES[25]*STATES[18] -  CONSTANTS[35]*STATES[24]) -  CONSTANTS[39]*STATES[24]*STATES[19];
resid[20] = RATES[27] - ( CONSTANTS[40]*STATES[20])/ALGEBRAIC[1] -  CONSTANTS[41]*STATES[27]*STATES[19];
resid[21] = RATES[23] -  CONSTANTS[41]*STATES[27]*STATES[19] -  CONSTANTS[34]*STATES[23];
resid[22] = RATES[26] -  CONSTANTS[39]*STATES[24]*STATES[19] -  CONSTANTS[37]*STATES[26];
resid[23] = RATES[20] - (( CONSTANTS[32]*STATES[21]*STATES[15] -  CONSTANTS[31]*STATES[20]) -  CONSTANTS[40]*STATES[20]) -  (ALGEBRAIC[0]/STATES[0])*STATES[20];
resid[24] = RATES[21] - (((CONSTANTS[42] -  CONSTANTS[32]*STATES[21]*STATES[15])+ CONSTANTS[31]*STATES[20]) -  CONSTANTS[43]*STATES[21]) -  (ALGEBRAIC[0]/STATES[0])*STATES[21];
resid[25] = RATES[28] - ((CONSTANTS[44] -  CONSTANTS[45]*STATES[28]) -  CONSTANTS[46]*STATES[28]) -  (ALGEBRAIC[0]/STATES[0])*STATES[28];
resid[26] = RATES[29] - ((CONSTANTS[47] -  CONSTANTS[48]*STATES[29]) -  CONSTANTS[49]*STATES[29]) -  (ALGEBRAIC[0]/STATES[0])*STATES[29];
resid[27] = RATES[30] -  CONSTANTS[50]*STATES[31]*ALGEBRAIC[1];
resid[28] = RATES[32] -  CONSTANTS[34]*STATES[23];
resid[29] = RATES[33] -  CONSTANTS[37]*STATES[26];
resid[30] = RATES[8] - (( CONSTANTS[45]*STATES[28])/ALGEBRAIC[1] -  CONSTANTS[8]*STATES[8]*STATES[6]) -  CONSTANTS[51]*STATES[8];
resid[31] = RATES[25] - ((( CONSTANTS[48]*STATES[29])/ALGEBRAIC[1] -  CONSTANTS[36]*STATES[25]*STATES[18])+ CONSTANTS[35]*STATES[24]) -  CONSTANTS[52]*STATES[25];
resid[32] = RATES[31] - ( CONSTANTS[7]*STATES[7] -  CONSTANTS[50]*STATES[31]) -  CONSTANTS[53]*STATES[31];
resid[33] = RATES[1] - CONSTANTS[54];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] =  CONSTANTS[0]*STATES[0];
ALGEBRAIC[1] = STATES[1]/STATES[0];
}
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;
SI[11] = 1.0;
SI[12] = 1.0;
SI[13] = 1.0;
SI[14] = 1.0;
SI[15] = 1.0;
SI[16] = 1.0;
SI[17] = 1.0;
SI[18] = 1.0;
SI[19] = 1.0;
SI[20] = 1.0;
SI[21] = 1.0;
SI[22] = 1.0;
SI[23] = 1.0;
SI[24] = 1.0;
SI[25] = 1.0;
SI[26] = 1.0;
SI[27] = 1.0;
SI[28] = 1.0;
SI[29] = 1.0;
SI[30] = 1.0;
SI[31] = 1.0;
SI[32] = 1.0;
SI[33] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}