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 10 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 Per_m in component Per_m (nanomolar).
 * CONSTANTS[0] is B1 in component Per_m (dimensionless).
 * CONSTANTS[1] is C1 in component Per_m (flux).
 * CONSTANTS[2] is S1 in component Per_m (flux).
 * CONSTANTS[3] is D1 in component Per_m (flux).
 * CONSTANTS[4] is L1 in component Per_m (nanomolar).
 * CONSTANTS[5] is R1 in component Per_m (nanomolar).
 * CONSTANTS[6] is A1 in component Per_m (nanomolar).
 * STATES[1] is PT_n in component PT_n (nanomolar).
 * STATES[2] is CC_n in component CC_n (nanomolar).
 * CONSTANTS[7] is D0 in component parameters (first_order_rate_constant).
 * CONSTANTS[8] is a in component parameters (dimensionless).
 * CONSTANTS[9] is r in component parameters (dimensionless).
 * STATES[3] is Per_c in component Per_c (nanomolar).
 * CONSTANTS[10] is S2 in component Per_c (first_order_rate_constant).
 * CONSTANTS[11] is D2 in component Per_c (first_order_rate_constant).
 * CONSTANTS[12] is L2 in component Per_c (nanomolar).
 * CONSTANTS[13] is Dbt_c in component Per_c (nanomolar).
 * CONSTANTS[14] is V1 in component parameters (second_order_rate_constant).
 * CONSTANTS[15] is V2 in component parameters (first_order_rate_constant).
 * STATES[4] is Tim_c in component Tim_c (nanomolar).
 * STATES[5] is PT_c in component PT_c (nanomolar).
 * STATES[6] is Tim_m in component Tim_m (nanomolar).
 * CONSTANTS[16] is B2 in component Tim_m (dimensionless).
 * CONSTANTS[17] is C2 in component Tim_m (flux).
 * CONSTANTS[18] is S3 in component Tim_m (flux).
 * CONSTANTS[19] is D3 in component Tim_m (flux).
 * CONSTANTS[20] is L3 in component Tim_m (nanomolar).
 * CONSTANTS[21] is R2 in component Tim_m (nanomolar).
 * CONSTANTS[22] is A2 in component Tim_m (nanomolar).
 * CONSTANTS[23] is S4 in component Tim_c (first_order_rate_constant).
 * CONSTANTS[24] is D4 in component Tim_c (flux).
 * CONSTANTS[25] is L4 in component Tim_c (nanomolar).
 * CONSTANTS[26] is D5 in component PT_c (flux).
 * CONSTANTS[27] is L5 in component PT_c (nanomolar).
 * CONSTANTS[28] is K1 in component parameters (nanomolar).
 * CONSTANTS[29] is K2 in component parameters (nanomolar).
 * CONSTANTS[30] is T1 in component parameters (flux).
 * CONSTANTS[31] is T2 in component parameters (flux).
 * CONSTANTS[32] is D6 in component PT_n (flux).
 * CONSTANTS[33] is L6 in component PT_n (nanomolar).
 * STATES[7] is Clk_m in component Clk_m (nanomolar).
 * CONSTANTS[34] is B3 in component Clk_m (dimensionless).
 * CONSTANTS[35] is C3 in component Clk_m (flux).
 * CONSTANTS[36] is S5 in component Clk_m (flux).
 * CONSTANTS[37] is D7 in component Clk_m (flux).
 * CONSTANTS[38] is L7 in component Clk_m (nanomolar).
 * CONSTANTS[39] is R3 in component Clk_m (nanomolar).
 * CONSTANTS[40] is A3 in component Clk_m (nanomolar).
 * STATES[8] is Clk_c in component Clk_c (nanomolar).
 * CONSTANTS[41] is S6 in component Clk_c (first_order_rate_constant).
 * CONSTANTS[42] is D8 in component Clk_c (flux).
 * CONSTANTS[43] is L8 in component Clk_c (nanomolar).
 * CONSTANTS[44] is V3 in component parameters (second_order_rate_constant).
 * CONSTANTS[45] is V4 in component parameters (first_order_rate_constant).
 * CONSTANTS[46] is Cyc_c in component Cyc_c (nanomolar).
 * STATES[9] is CC_c in component CC_c (nanomolar).
 * CONSTANTS[47] is D9 in component CC_c (flux).
 * CONSTANTS[48] is L9 in component CC_c (nanomolar).
 * CONSTANTS[49] is K3 in component parameters (nanomolar).
 * CONSTANTS[50] is K4 in component parameters (nanomolar).
 * CONSTANTS[51] is T3 in component parameters (flux).
 * CONSTANTS[52] is T4 in component parameters (flux).
 * CONSTANTS[53] is D10 in component CC_n (flux).
 * CONSTANTS[54] is L10 in component CC_n (nanomolar).
 * RATES[0] is d/dt Per_m in component Per_m (nanomolar).
 * RATES[3] is d/dt Per_c in component Per_c (nanomolar).
 * RATES[6] is d/dt Tim_m in component Tim_m (nanomolar).
 * RATES[4] is d/dt Tim_c in component Tim_c (nanomolar).
 * RATES[5] is d/dt PT_c in component PT_c (nanomolar).
 * RATES[1] is d/dt PT_n in component PT_n (nanomolar).
 * RATES[7] is d/dt Clk_m in component Clk_m (nanomolar).
 * RATES[8] is d/dt Clk_c in component Clk_c (nanomolar).
 * RATES[9] is d/dt CC_c in component CC_c (nanomolar).
 * RATES[2] is d/dt CC_n in component CC_n (nanomolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.5;
CONSTANTS[0] = 0.0;
CONSTANTS[1] = 0.0;
CONSTANTS[2] = 1.45;
CONSTANTS[3] = 0.94;
CONSTANTS[4] = 0.3;
CONSTANTS[5] = 1.02;
CONSTANTS[6] = 0.45;
STATES[1] = 1.0;
STATES[2] = 0.4;
CONSTANTS[7] = 0.012;
CONSTANTS[8] = 1.0;
CONSTANTS[9] = 4.0;
STATES[3] = 0.6;
CONSTANTS[10] = 0.48;
CONSTANTS[11] = 0.44;
CONSTANTS[12] = 0.2;
CONSTANTS[13] = 1.0;
CONSTANTS[14] = 1.45;
CONSTANTS[15] = 1.45;
STATES[4] = 0.8;
STATES[5] = 0.9;
STATES[6] = 0.7;
CONSTANTS[16] = 0.0;
CONSTANTS[17] = 0.0;
CONSTANTS[18] = 1.45;
CONSTANTS[19] = 0.94;
CONSTANTS[20] = 0.3;
CONSTANTS[21] = 1.02;
CONSTANTS[22] = 0.45;
CONSTANTS[23] = 0.48;
CONSTANTS[24] = 0.44;
CONSTANTS[25] = 0.2;
CONSTANTS[26] = 0.44;
CONSTANTS[27] = 0.2;
CONSTANTS[28] = 2.0;
CONSTANTS[29] = 2.0;
CONSTANTS[30] = 1.73;
CONSTANTS[31] = 0.72;
CONSTANTS[32] = 0.29;
CONSTANTS[33] = 0.2;
STATES[7] = 0.1;
CONSTANTS[34] = 0.6;
CONSTANTS[35] = 0.0;
CONSTANTS[36] = 1.63;
CONSTANTS[37] = 0.54;
CONSTANTS[38] = 0.13;
CONSTANTS[39] = 0.89;
CONSTANTS[40] = 0.8;
STATES[8] = 0.2;
CONSTANTS[41] = 0.47;
CONSTANTS[42] = 0.6;
CONSTANTS[43] = 0.2;
CONSTANTS[44] = 1.63;
CONSTANTS[45] = 1.63;
CONSTANTS[46] = 1.0;
STATES[9] = 0.3;
CONSTANTS[47] = 0.6;
CONSTANTS[48] = 0.2;
CONSTANTS[49] = 2.0;
CONSTANTS[50] = 2.0;
CONSTANTS[51] = 1.63;
CONSTANTS[52] = 0.52;
CONSTANTS[53] = 0.3;
CONSTANTS[54] = 0.2;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = (CONSTANTS[1]+ CONSTANTS[2]*((pow(STATES[2]/CONSTANTS[6], CONSTANTS[8])+CONSTANTS[0])/(1.00000+pow(STATES[1]/CONSTANTS[5], CONSTANTS[9])+pow(STATES[2]/CONSTANTS[6], CONSTANTS[8])+CONSTANTS[0]))) - ( CONSTANTS[3]*(STATES[0]/(CONSTANTS[4]+STATES[0]))+ CONSTANTS[7]*STATES[0]);
RATES[3] = ( CONSTANTS[10]*STATES[0]+ CONSTANTS[15]*STATES[5]) - ( CONSTANTS[14]*STATES[3]*STATES[4]+ CONSTANTS[11]*CONSTANTS[13]*(STATES[3]/(CONSTANTS[12]+STATES[3]))+ CONSTANTS[7]*STATES[3]);
RATES[6] = (CONSTANTS[17]+ CONSTANTS[18]*((pow(STATES[2]/CONSTANTS[22], CONSTANTS[8])+CONSTANTS[16])/(1.00000+pow(STATES[1]/CONSTANTS[21], CONSTANTS[9])+pow(STATES[2]/CONSTANTS[22], CONSTANTS[8])+CONSTANTS[16]))) - ( CONSTANTS[19]*(STATES[6]/(CONSTANTS[20]+STATES[6]))+ CONSTANTS[7]*STATES[6]);
RATES[4] = ( CONSTANTS[23]*STATES[6]+ CONSTANTS[15]*STATES[5]) - ( CONSTANTS[14]*STATES[3]*STATES[4]+ CONSTANTS[24]*(STATES[4]/(CONSTANTS[25]+STATES[4]))+ CONSTANTS[7]*STATES[4]);
RATES[5] = ( CONSTANTS[14]*STATES[3]*STATES[4]+ CONSTANTS[31]*(STATES[1]/(CONSTANTS[29]+STATES[1]))) - ( CONSTANTS[15]*STATES[5]+ CONSTANTS[30]*(STATES[5]/(CONSTANTS[28]+STATES[5]))+ CONSTANTS[26]*(STATES[5]/(CONSTANTS[27]+STATES[5]))+ CONSTANTS[7]*STATES[5]);
RATES[1] =  CONSTANTS[30]*(STATES[5]/(CONSTANTS[28]+STATES[5])) - ( CONSTANTS[31]*(STATES[1]/(CONSTANTS[29]+STATES[1]))+ CONSTANTS[32]*(STATES[1]/(CONSTANTS[33]+STATES[1]))+ CONSTANTS[7]*STATES[1]);
RATES[7] = (CONSTANTS[35]+ CONSTANTS[36]*((pow(STATES[1]/CONSTANTS[40], CONSTANTS[8])+CONSTANTS[34])/(1.00000+pow(STATES[2]/CONSTANTS[39], CONSTANTS[9])+pow(STATES[1]/CONSTANTS[40], CONSTANTS[8])+CONSTANTS[34]))) - ( CONSTANTS[37]*(STATES[7]/(CONSTANTS[38]+STATES[7]))+ CONSTANTS[7]*STATES[7]);
RATES[8] = ( CONSTANTS[41]*STATES[7]+ CONSTANTS[45]*STATES[9]) - ( CONSTANTS[44]*STATES[8]*CONSTANTS[46]+ CONSTANTS[42]*(STATES[8]/(CONSTANTS[43]+STATES[8]))+ CONSTANTS[7]*STATES[8]);
RATES[9] = ( CONSTANTS[44]*STATES[8]*CONSTANTS[46]+ CONSTANTS[52]*(STATES[2]/(CONSTANTS[50]+STATES[2]))) - ( CONSTANTS[45]*STATES[9]+ CONSTANTS[51]*(STATES[9]/(CONSTANTS[49]+STATES[9]))+ CONSTANTS[47]*(STATES[9]/(CONSTANTS[48]+STATES[9]))+ CONSTANTS[7]*STATES[9]);
RATES[2] =  CONSTANTS[51]*(STATES[9]/(CONSTANTS[49]+STATES[9])) - ( CONSTANTS[52]*(STATES[2]/(CONSTANTS[50]+STATES[2]))+ CONSTANTS[53]*(STATES[2]/(CONSTANTS[54]+STATES[2]))+ CONSTANTS[7]*STATES[2]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}