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 6 entries in each of the rate and state variable arrays.
   There are a total of 25 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * CONSTANTS[0] is j_1 in component parameters (flux).
 * CONSTANTS[1] is j_2 in component parameters (flux).
 * CONSTANTS[2] is j_3 in component parameters (flux).
 * CONSTANTS[3] is v_d1 in component parameters (flux).
 * CONSTANTS[4] is v_d2 in component parameters (flux).
 * CONSTANTS[5] is v_d3 in component parameters (flux).
 * CONSTANTS[6] is k_d1 in component parameters (first_order_rate_constant).
 * CONSTANTS[7] is k_d2 in component parameters (first_order_rate_constant).
 * CONSTANTS[8] is k_d3 in component parameters (first_order_rate_constant).
 * CONSTANTS[9] is k_c1 in component parameters (first_order_rate_constant).
 * CONSTANTS[10] is k_c2 in component parameters (first_order_rate_constant).
 * CONSTANTS[11] is k_c3 in component parameters (first_order_rate_constant).
 * CONSTANTS[12] is k_m1 in component parameters (nanomolar).
 * CONSTANTS[13] is k_m2 in component parameters (nanomolar).
 * CONSTANTS[14] is k_m3 in component parameters (nanomolar).
 * CONSTANTS[15] is v_12 in component parameters (flux).
 * CONSTANTS[16] is v_11 in component parameters (flux).
 * CONSTANTS[17] is v_10 in component parameters (flux).
 * CONSTANTS[18] is k_120 in component parameters (nanomolar).
 * CONSTANTS[19] is k_110 in component parameters (nanomolar).
 * CONSTANTS[20] is k_100 in component parameters (nanomolar).
 * CONSTANTS[21] is k_d4 in component parameters (first_order_rate_constant).
 * CONSTANTS[22] is k_d5 in component parameters (first_order_rate_constant).
 * CONSTANTS[23] is k_d6 in component parameters (first_order_rate_constant).
 * CONSTANTS[24] is n in component parameters (dimensionless).
 * STATES[0] is C_1 in component C_1 (nanomolar).
 * STATES[1] is C_2 in component C_2 (nanomolar).
 * STATES[2] is T_1 in component T_1 (nanomolar).
 * STATES[3] is C_3 in component C_3 (nanomolar).
 * STATES[4] is T_2 in component T_2 (nanomolar).
 * STATES[5] is T_3 in component T_3 (nanomolar).
 * RATES[0] is d/dt C_1 in component C_1 (nanomolar).
 * RATES[1] is d/dt C_2 in component C_2 (nanomolar).
 * RATES[3] is d/dt C_3 in component C_3 (nanomolar).
 * RATES[2] is d/dt T_1 in component T_1 (nanomolar).
 * RATES[4] is d/dt T_2 in component T_2 (nanomolar).
 * RATES[5] is d/dt T_3 in component T_3 (nanomolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 0.9;
CONSTANTS[1] = 0.5;
CONSTANTS[2] = 0.6;
CONSTANTS[3] = 6;
CONSTANTS[4] = 1.052;
CONSTANTS[5] = 3;
CONSTANTS[6] = 0.8;
CONSTANTS[7] = 0.9;
CONSTANTS[8] = 0.8;
CONSTANTS[9] = 0.2;
CONSTANTS[10] = 0.22;
CONSTANTS[11] = 0.6;
CONSTANTS[12] = 5;
CONSTANTS[13] = 5;
CONSTANTS[14] = 5;
CONSTANTS[15] = 15;
CONSTANTS[16] = 15;
CONSTANTS[17] = 15;
CONSTANTS[18] = 10;
CONSTANTS[19] = 10;
CONSTANTS[20] = 10;
CONSTANTS[21] = 0.16;
CONSTANTS[22] = 0.16;
CONSTANTS[23] = 0.16;
CONSTANTS[24] = 2;
STATES[0] = 0;
STATES[1] = 0;
STATES[2] = 6;
STATES[3] = 0;
STATES[4] = 5;
STATES[5] = 1;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = ( CONSTANTS[15]*pow(STATES[2], CONSTANTS[24]))/(pow(CONSTANTS[18], CONSTANTS[24])+pow(STATES[2], CONSTANTS[24])+pow(STATES[1], CONSTANTS[24])) -  CONSTANTS[21]*STATES[0];
RATES[1] = ( CONSTANTS[16]*pow(STATES[4], CONSTANTS[24]))/(pow(CONSTANTS[19], CONSTANTS[24])+pow(STATES[4], CONSTANTS[24])+pow(STATES[3], CONSTANTS[24])) -  CONSTANTS[22]*STATES[1];
RATES[3] = ( CONSTANTS[17]*pow(STATES[5], CONSTANTS[24]))/(pow(CONSTANTS[20], CONSTANTS[24])+pow(STATES[5], CONSTANTS[24])+pow(STATES[0], CONSTANTS[24])) -  CONSTANTS[23]*STATES[3];
RATES[2] = (CONSTANTS[0]+( CONSTANTS[3]*pow(STATES[5], CONSTANTS[24]))/(pow(CONSTANTS[12], CONSTANTS[24])+pow(STATES[5], CONSTANTS[24]))+ CONSTANTS[9]*STATES[0]) -  CONSTANTS[6]*STATES[2];
RATES[4] = (CONSTANTS[1]+( CONSTANTS[4]*pow(STATES[2], CONSTANTS[24]))/(pow(CONSTANTS[13], CONSTANTS[24])+pow(STATES[2], CONSTANTS[24]))+ CONSTANTS[10]*STATES[1]) -  CONSTANTS[7]*STATES[4];
RATES[5] = (CONSTANTS[2]+( CONSTANTS[5]*pow(STATES[4], CONSTANTS[24]))/(pow(CONSTANTS[14], CONSTANTS[24])+pow(STATES[4], CONSTANTS[24]))+ CONSTANTS[11]*STATES[3]) -  CONSTANTS[8]*STATES[5];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}