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 0 entries in the algebraic variable array.
   There are a total of 3 entries in each of the rate and state variable arrays.
   There are a total of 12 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (second).
 * STATES[0] is a in component a (micromolar).
 * CONSTANTS[0] is k1 in component model_parameters (dimensionless).
 * CONSTANTS[1] is k2 in component model_parameters (dimensionless).
 * CONSTANTS[2] is k3 in component model_parameters (dimensionless).
 * STATES[1] is b in component b (micromolar).
 * STATES[2] is c in component c (micromolar).
 * CONSTANTS[3] is K4 in component model_parameters (dimensionless).
 * CONSTANTS[4] is k5 in component model_parameters (dimensionless).
 * CONSTANTS[5] is K6 in component model_parameters (dimensionless).
 * CONSTANTS[6] is k7 in component model_parameters (dimensionless).
 * CONSTANTS[7] is k8 in component model_parameters (dimensionless).
 * CONSTANTS[8] is K9 in component model_parameters (dimensionless).
 * CONSTANTS[9] is k10 in component model_parameters (dimensionless).
 * CONSTANTS[10] is k11 in component model_parameters (dimensionless).
 * CONSTANTS[11] is K12 in component model_parameters (dimensionless).
 * RATES[0] is d/dt a in component a (micromolar).
 * RATES[1] is d/dt b in component b (micromolar).
 * RATES[2] is d/dt c in component c (micromolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.01;
CONSTANTS[0] = 0.212;
CONSTANTS[1] = 2.9259;
CONSTANTS[2] = 1.52;
STATES[1] = 0.01;
STATES[2] = 0.01;
CONSTANTS[3] = 0.19;
CONSTANTS[4] = 4.88;
CONSTANTS[5] = 1.18;
CONSTANTS[6] = 1.24;
CONSTANTS[7] = 32.24;
CONSTANTS[8] = 29.09;
CONSTANTS[9] = 13.58;
CONSTANTS[10] = 153;
CONSTANTS[11] = 0.16;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = ((CONSTANTS[0]+ CONSTANTS[1]*STATES[0]) - ( CONSTANTS[2]*STATES[0]*STATES[1])/(STATES[0]+CONSTANTS[3])) - ( CONSTANTS[4]*STATES[0]*STATES[2])/(STATES[0]+CONSTANTS[5]);
RATES[1] =  CONSTANTS[6]*STATES[0] - ( CONSTANTS[7]*STATES[1])/(CONSTANTS[8]+STATES[1]);
RATES[2] =  CONSTANTS[9]*STATES[0] - ( CONSTANTS[10]*STATES[2])/(STATES[2]+CONSTANTS[11]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}