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 0 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 55 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (hour).
 * STATES[0] is MP in component MP (nanomolar).
 * CONSTANTS[46] is vsP in component MP (flux).
 * CONSTANTS[0] is vmP in component MP (flux).
 * CONSTANTS[1] is kdmp in component MP (first_order_rate_constant).
 * CONSTANTS[2] is KAP in component MP (nanomolar).
 * CONSTANTS[3] is KmP in component MP (nanomolar).
 * CONSTANTS[4] is vstot in component model_parameters (flux).
 * CONSTANTS[5] is n in component model_parameters (dimensionless).
 * STATES[1] is BN in component BN (nanomolar).
 * STATES[2] is MC in component MC (nanomolar).
 * CONSTANTS[47] is vsC in component MC (flux).
 * CONSTANTS[6] is vmC in component MC (flux).
 * CONSTANTS[7] is kdmc in component MC (first_order_rate_constant).
 * CONSTANTS[8] is KAC in component MC (nanomolar).
 * CONSTANTS[9] is KmC in component MC (nanomolar).
 * STATES[3] is MB in component MB (nanomolar).
 * CONSTANTS[48] is vsB in component MB (flux).
 * CONSTANTS[10] is vmB in component MB (flux).
 * CONSTANTS[11] is kdmb in component MB (first_order_rate_constant).
 * CONSTANTS[12] is KIB in component MB (nanomolar).
 * CONSTANTS[13] is KmB in component MB (nanomolar).
 * CONSTANTS[14] is m in component model_parameters (dimensionless).
 * STATES[4] is PC in component PC (nanomolar).
 * CONSTANTS[49] is ksP in component model_parameters (first_order_rate_constant).
 * CONSTANTS[15] is Kp in component model_parameters (nanomolar).
 * CONSTANTS[16] is Kdp in component model_parameters (nanomolar).
 * CONSTANTS[17] is k3 in component model_parameters (second_order_rate_constant).
 * CONSTANTS[18] is k4 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[19] is kdn in component model_parameters (first_order_rate_constant).
 * CONSTANTS[50] is V1P in component model_parameters (flux).
 * CONSTANTS[20] is V2P in component model_parameters (flux).
 * STATES[5] is PCP in component PCP (nanomolar).
 * STATES[6] is PCC in component PCC (nanomolar).
 * STATES[7] is CC in component CC (nanomolar).
 * CONSTANTS[51] is ksC in component model_parameters (first_order_rate_constant).
 * CONSTANTS[21] is kdnc in component model_parameters (first_order_rate_constant).
 * CONSTANTS[22] is V1C in component model_parameters (flux).
 * CONSTANTS[23] is V2C in component model_parameters (flux).
 * STATES[8] is CCP in component CCP (nanomolar).
 * CONSTANTS[24] is vdPC in component model_parameters (flux).
 * CONSTANTS[25] is Kd in component model_parameters (nanomolar).
 * CONSTANTS[26] is vdCC in component model_parameters (flux).
 * CONSTANTS[27] is k1 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[28] is k2 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[52] is V1PC in component model_parameters (flux).
 * CONSTANTS[29] is V2PC in component model_parameters (flux).
 * STATES[9] is PCCP in component PCCP (nanomolar).
 * STATES[10] is PCN in component PCN (nanomolar).
 * CONSTANTS[30] is k7 in component model_parameters (second_order_rate_constant).
 * CONSTANTS[31] is k8 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[53] is V3PC in component model_parameters (flux).
 * CONSTANTS[32] is V4PC in component model_parameters (flux).
 * STATES[11] is PCNP in component PCNP (nanomolar).
 * STATES[12] is IN in component IN (nanomolar).
 * CONSTANTS[33] is vdPCC in component model_parameters (flux).
 * CONSTANTS[34] is vdPCN in component model_parameters (flux).
 * STATES[13] is BC in component BC (nanomolar).
 * CONSTANTS[54] is ksB in component model_parameters (first_order_rate_constant).
 * CONSTANTS[35] is k5 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[36] is k6 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[37] is V1B in component model_parameters (flux).
 * CONSTANTS[38] is V2B in component model_parameters (flux).
 * STATES[14] is BCP in component BCP (nanomolar).
 * CONSTANTS[39] is vdBC in component model_parameters (flux).
 * CONSTANTS[40] is V3B in component model_parameters (flux).
 * CONSTANTS[41] is V4B in component model_parameters (flux).
 * STATES[15] is BNP in component BNP (nanomolar).
 * CONSTANTS[42] is vdBN in component model_parameters (flux).
 * CONSTANTS[43] is vdIN in component model_parameters (flux).
 * CONSTANTS[44] is kstot in component model_parameters (first_order_rate_constant).
 * CONSTANTS[45] is Vphos in component model_parameters (flux).
 * RATES[0] is d/dt MP in component MP (nanomolar).
 * RATES[2] is d/dt MC in component MC (nanomolar).
 * RATES[3] is d/dt MB in component MB (nanomolar).
 * RATES[4] is d/dt PC in component PC (nanomolar).
 * RATES[7] is d/dt CC in component CC (nanomolar).
 * RATES[5] is d/dt PCP in component PCP (nanomolar).
 * RATES[8] is d/dt CCP in component CCP (nanomolar).
 * RATES[6] is d/dt PCC in component PCC (nanomolar).
 * RATES[10] is d/dt PCN in component PCN (nanomolar).
 * RATES[9] is d/dt PCCP in component PCCP (nanomolar).
 * RATES[11] is d/dt PCNP in component PCNP (nanomolar).
 * RATES[13] is d/dt BC in component BC (nanomolar).
 * RATES[14] is d/dt BCP in component BCP (nanomolar).
 * RATES[1] is d/dt BN in component BN (nanomolar).
 * RATES[15] is d/dt BNP in component BNP (nanomolar).
 * RATES[12] is d/dt IN in component IN (nanomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.5;
CONSTANTS[0] = 1.1;
CONSTANTS[1] = 0.01;
CONSTANTS[2] = 0.7;
CONSTANTS[3] = 0.3;
CONSTANTS[4] = 1.0;
CONSTANTS[5] = 4.0;
STATES[1] = 0.1;
STATES[2] = 0.3;
CONSTANTS[6] = 1.0;
CONSTANTS[7] = 0.01;
CONSTANTS[8] = 1.0;
CONSTANTS[9] = 0.4;
STATES[3] = 3.1;
CONSTANTS[10] = 0.2;
CONSTANTS[11] = 0.01;
CONSTANTS[12] = 0.8;
CONSTANTS[13] = 0.4;
CONSTANTS[14] = 4.0;
STATES[4] = 0.1;
CONSTANTS[15] = 0.1;
CONSTANTS[16] = 0.3;
CONSTANTS[17] = 0.8;
CONSTANTS[18] = 0.2;
CONSTANTS[19] = 0.01;
CONSTANTS[20] = 0.3;
STATES[5] = 0.1;
STATES[6] = 0.1;
STATES[7] = 0.1;
CONSTANTS[21] = 0.01;
CONSTANTS[22] = 0.6;
CONSTANTS[23] = 0.1;
STATES[8] = 0.1;
CONSTANTS[24] = 0.7;
CONSTANTS[25] = 0.3;
CONSTANTS[26] = 0.7;
CONSTANTS[27] = 0.8;
CONSTANTS[28] = 0.2;
CONSTANTS[29] = 0.1;
STATES[9] = 0.1;
STATES[10] = 0.1;
CONSTANTS[30] = 0.5;
CONSTANTS[31] = 0.1;
CONSTANTS[32] = 0.1;
STATES[11] = 0.1;
STATES[12] = 0.1;
CONSTANTS[33] = 1.0;
CONSTANTS[34] = 1.0;
STATES[13] = 0.1;
CONSTANTS[35] = 0.4;
CONSTANTS[36] = 0.2;
CONSTANTS[37] = 1.0;
CONSTANTS[38] = 0.1;
STATES[14] = 0.1;
CONSTANTS[39] = 1.0;
CONSTANTS[40] = 1.0;
CONSTANTS[41] = 0.2;
STATES[15] = 0.1;
CONSTANTS[42] = 0.5;
CONSTANTS[43] = 0.8;
CONSTANTS[44] = 1.0;
CONSTANTS[45] = 0.6;
CONSTANTS[46] = CONSTANTS[4];
CONSTANTS[47] =  0.800000*CONSTANTS[4];
CONSTANTS[48] =  0.700000*CONSTANTS[4];
CONSTANTS[49] =  0.500000*CONSTANTS[44];
CONSTANTS[50] = CONSTANTS[45];
CONSTANTS[51] = CONSTANTS[44];
CONSTANTS[52] = CONSTANTS[45];
CONSTANTS[53] = CONSTANTS[45];
CONSTANTS[54] = CONSTANTS[44];
RATES[0] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[4] = 0.1001;
RATES[7] = 0.1001;
RATES[5] = 0.1001;
RATES[8] = 0.1001;
RATES[6] = 0.1001;
RATES[10] = 0.1001;
RATES[9] = 0.1001;
RATES[11] = 0.1001;
RATES[13] = 0.1001;
RATES[14] = 0.1001;
RATES[1] = 0.1001;
RATES[15] = 0.1001;
RATES[12] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] -  CONSTANTS[46]*(pow(STATES[1], CONSTANTS[5])/(pow(CONSTANTS[2], CONSTANTS[5])+pow(STATES[1], CONSTANTS[5]))) - ( CONSTANTS[0]*(STATES[0]/(CONSTANTS[3]+STATES[0]))+ CONSTANTS[1]*STATES[0]);
resid[1] = RATES[2] -  CONSTANTS[47]*(pow(STATES[1], CONSTANTS[5])/(pow(CONSTANTS[8], CONSTANTS[5])+pow(STATES[1], CONSTANTS[5]))) - ( CONSTANTS[6]*(STATES[2]/(CONSTANTS[9]+STATES[2]))+ CONSTANTS[7]*STATES[2]);
resid[2] = RATES[3] -  CONSTANTS[48]*(pow(CONSTANTS[12], CONSTANTS[14])/(pow(CONSTANTS[12], CONSTANTS[14])+pow(STATES[1], CONSTANTS[14]))) - ( CONSTANTS[10]*(STATES[3]/(CONSTANTS[13]+STATES[3]))+ CONSTANTS[11]*STATES[3]);
resid[3] = RATES[4] - ( CONSTANTS[49]*STATES[0]+ CONSTANTS[20]*(STATES[5]/(CONSTANTS[16]+STATES[5]))+ CONSTANTS[18]*STATES[6]) - ( CONSTANTS[50]*(STATES[4]/(CONSTANTS[15]+STATES[4]))+ CONSTANTS[17]*STATES[4]*STATES[7]+ CONSTANTS[19]*STATES[4]);
resid[4] = RATES[7] - ( CONSTANTS[51]*STATES[2]+ CONSTANTS[23]*(STATES[8]/(CONSTANTS[16]+STATES[8]))+ CONSTANTS[18]*STATES[6]) - ( CONSTANTS[22]*(STATES[7]/(CONSTANTS[15]+STATES[7]))+ CONSTANTS[17]*STATES[4]*STATES[7]+ CONSTANTS[21]*STATES[7]);
resid[5] = RATES[5] -  CONSTANTS[50]*(STATES[4]/(CONSTANTS[15]+STATES[4])) - ( CONSTANTS[20]*(STATES[5]/(CONSTANTS[16]+STATES[5]))+ CONSTANTS[24]*(STATES[5]/(CONSTANTS[25]+STATES[5]))+ CONSTANTS[19]*STATES[5]);
resid[6] = RATES[8] -  CONSTANTS[22]*(STATES[7]/(CONSTANTS[15]+STATES[7])) - ( CONSTANTS[23]*(STATES[8]/(CONSTANTS[16]+STATES[8]))+ CONSTANTS[26]*(STATES[8]/(CONSTANTS[25]+STATES[8]))+ CONSTANTS[19]*STATES[8]);
resid[7] = RATES[6] - ( CONSTANTS[29]*(STATES[9]/(CONSTANTS[16]+STATES[9]))+ CONSTANTS[17]*STATES[4]*STATES[7]+ CONSTANTS[28]*STATES[10]) - ( CONSTANTS[52]*(STATES[6]/(CONSTANTS[15]+STATES[6]))+ CONSTANTS[18]*STATES[6]+ CONSTANTS[27]*STATES[6]+ CONSTANTS[19]*STATES[6]);
resid[8] = RATES[10] - ( CONSTANTS[32]*(STATES[11]/(CONSTANTS[16]+STATES[11]))+ CONSTANTS[27]*STATES[6]+ CONSTANTS[31]*STATES[12]) - ( CONSTANTS[53]*(STATES[10]/(CONSTANTS[15]+STATES[10]))+ CONSTANTS[28]*STATES[10]+ CONSTANTS[30]*STATES[1]*STATES[10]+ CONSTANTS[19]*STATES[10]);
resid[9] = RATES[9] -  CONSTANTS[52]*(STATES[6]/(CONSTANTS[15]+STATES[6])) - ( CONSTANTS[29]*(STATES[9]/(CONSTANTS[16]+STATES[9]))+ CONSTANTS[33]*(STATES[9]/(CONSTANTS[25]+STATES[9]))+ CONSTANTS[19]*STATES[9]);
resid[10] = RATES[11] -  CONSTANTS[53]*(STATES[10]/(CONSTANTS[15]+STATES[10])) - ( CONSTANTS[32]*(STATES[11]/(CONSTANTS[16]+STATES[11]))+ CONSTANTS[34]*(STATES[11]/(CONSTANTS[25]+STATES[11]))+ CONSTANTS[19]*STATES[11]);
resid[11] = RATES[13] - ( CONSTANTS[38]*(STATES[14]/(CONSTANTS[16]+STATES[14]))+ CONSTANTS[36]*STATES[1]+ CONSTANTS[54]*STATES[3]) - ( CONSTANTS[37]*(STATES[13]/(CONSTANTS[15]+STATES[13]))+ CONSTANTS[35]*STATES[13]+ CONSTANTS[19]*STATES[13]);
resid[12] = RATES[14] -  CONSTANTS[37]*(STATES[13]/(CONSTANTS[15]+STATES[13])) - ( CONSTANTS[38]*(STATES[14]/(CONSTANTS[16]+STATES[14]))+ CONSTANTS[39]*(STATES[14]/(CONSTANTS[25]+STATES[14]))+ CONSTANTS[19]*STATES[14]);
resid[13] = RATES[1] - ( CONSTANTS[41]*(STATES[15]/(CONSTANTS[16]+STATES[15]))+ CONSTANTS[35]*STATES[13]+ CONSTANTS[31]*STATES[12]) - ( CONSTANTS[40]*(STATES[1]/(CONSTANTS[15]+STATES[1]))+ CONSTANTS[36]*STATES[1]+ CONSTANTS[30]*STATES[1]*STATES[10]+ CONSTANTS[19]*STATES[1]);
resid[14] = RATES[15] -  CONSTANTS[40]*(STATES[1]/(CONSTANTS[15]+STATES[1])) - ( CONSTANTS[41]*(STATES[15]/(CONSTANTS[16]+STATES[15]))+ CONSTANTS[42]*(STATES[15]/(CONSTANTS[25]+STATES[15]))+ CONSTANTS[19]*STATES[15]);
resid[15] = RATES[12] -  CONSTANTS[30]*STATES[1]*STATES[10] - ( CONSTANTS[31]*STATES[12]+ CONSTANTS[43]*(STATES[12]/(CONSTANTS[25]+STATES[12]))+ CONSTANTS[19]*STATES[12]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}