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 1 entries in the algebraic variable array.
   There are a total of 4 entries in each of the rate and state variable arrays.
   There are a total of 14 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is C in component C (nanomolar).
 * CONSTANTS[0] is kf1 in component model_parameters (second_order_rate_constant).
 * CONSTANTS[12] is kr1 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[1] is kx2 in component model_parameters (second_order_rate_constant).
 * CONSTANTS[2] is k_x2 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[3] is kt in component model_parameters (first_order_rate_constant).
 * STATES[1] is D in component D (nanomolar).
 * CONSTANTS[4] is L in component model_parameters (nanomolar).
 * STATES[2] is R in component R (nanomolar).
 * CONSTANTS[13] is k_x1 in component model_parameters (first_order_rate_constant).
 * CONSTANTS[5] is ke in component model_parameters (first_order_rate_constant).
 * CONSTANTS[6] is R_initial in component R (nanomolar).
 * CONSTANTS[7] is krec in component model_parameters (first_order_rate_constant).
 * STATES[3] is Ri in component Ri (nanomolar).
 * CONSTANTS[8] is Vs in component model_parameters (flux).
 * CONSTANTS[9] is kdeg in component model_parameters (first_order_rate_constant).
 * ALGEBRAIC[0] is signal in component signal (dimensionless).
 * CONSTANTS[10] is kappaE in component model_parameters (dimensionless).
 * CONSTANTS[11] is KD in component model_parameters (nanomolar).
 * RATES[0] is d/dt C in component C (nanomolar).
 * RATES[1] is d/dt D in component D (nanomolar).
 * RATES[2] is d/dt R in component R (nanomolar).
 * RATES[3] is d/dt Ri in component Ri (nanomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.0;
CONSTANTS[0] = 0.1;
CONSTANTS[1] = 4.83;
CONSTANTS[2] = 0.016;
CONSTANTS[3] = 0.005;
STATES[1] = 0.0;
CONSTANTS[4] = 0.01;
STATES[2] = 2000.0;
CONSTANTS[5] = 0.10;
CONSTANTS[6] = 2000.0;
CONSTANTS[7] = 0.0;
STATES[3] = 200.0;
CONSTANTS[8] = 10.0;
CONSTANTS[9] = 0.05;
CONSTANTS[10] = 0.20;
CONSTANTS[11] = 1.0;
CONSTANTS[12] =  CONSTANTS[11]*CONSTANTS[0];
CONSTANTS[13] =  0.0100000*CONSTANTS[12];
RATES[0] = 0.1001;
RATES[1] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 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[0]*CONSTANTS[4]*STATES[2]+ CONSTANTS[2]*STATES[1]) -  (CONSTANTS[12]+ CONSTANTS[1]*STATES[2]+CONSTANTS[3])*STATES[0];
resid[1] = RATES[1] -  CONSTANTS[1]*STATES[2]*STATES[0] -  (CONSTANTS[2]+CONSTANTS[13]+CONSTANTS[5])*STATES[1];
resid[2] = RATES[2] - (CONSTANTS[8]+ CONSTANTS[12]*STATES[0]+ (CONSTANTS[2]+ 2.00000*CONSTANTS[13])*STATES[1]+ CONSTANTS[7]*STATES[3]) -  ( CONSTANTS[0]*CONSTANTS[4]+ CONSTANTS[1]*STATES[0]+CONSTANTS[3])*STATES[2];
resid[3] = RATES[3] -  CONSTANTS[3]*(STATES[2]+STATES[0]) -  (CONSTANTS[7]+CONSTANTS[9])*STATES[3];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = (( 2.00000*STATES[1])/CONSTANTS[6])/(CONSTANTS[10]+( 2.00000*STATES[1])/CONSTANTS[6]);
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}