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 6 entries in each of the rate and state variable arrays.
   There are a total of 9 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is x_1 in component x_1 (picomolar).
 * CONSTANTS[0] is k_t in component model_parameters (per_minute).
 * CONSTANTS[1] is B_max in component model_parameters (picomolar).
 * CONSTANTS[2] is k_on in component model_parameters (per_picomolar_per_minute).
 * STATES[1] is x_2 in component x_2 (picomolar).
 * CONSTANTS[3] is k_off in component model_parameters (per_minute).
 * STATES[2] is x_3 in component x_3 (picomolar).
 * CONSTANTS[4] is k_ex in component model_parameters (per_minute).
 * STATES[3] is x_4 in component x_4 (picomolar).
 * CONSTANTS[5] is k_mob in component model_parameters (per_minute).
 * CONSTANTS[6] is k_e in component model_parameters (per_minute).
 * CONSTANTS[7] is k_di in component model_parameters (per_minute).
 * CONSTANTS[8] is k_de in component model_parameters (per_minute).
 * STATES[4] is x_5 in component x_5 (picomolar).
 * STATES[5] is x_6 in component x_6 (picomolar).
 * RATES[0] is d/dt x_1 in component x_1 (picomolar).
 * RATES[1] is d/dt x_2 in component x_2 (picomolar).
 * RATES[2] is d/dt x_3 in component x_3 (picomolar).
 * RATES[3] is d/dt x_4 in component x_4 (picomolar).
 * RATES[4] is d/dt x_5 in component x_5 (picomolar).
 * RATES[5] is d/dt x_6 in component x_6 (picomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 516;
CONSTANTS[0] = 0.03294;
CONSTANTS[1] = 129;
CONSTANTS[2] = 0.10496e-3;
STATES[1] = 2010.19;
CONSTANTS[3] = 0.01721;
STATES[2] = 0;
CONSTANTS[4] = 0.00994;
STATES[3] = 0;
CONSTANTS[5] = 0.4178;
CONSTANTS[6] = 0.07483;
CONSTANTS[7] = 0.003179;
CONSTANTS[8] = 0.0164;
STATES[4] = 0;
STATES[5] = 0;
RATES[0] = 0.1001;
RATES[1] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[4] = 0.1001;
RATES[5] = 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[1]+ CONSTANTS[5]*STATES[2]) -  CONSTANTS[0]*STATES[0]) -  CONSTANTS[2]*STATES[0]*STATES[1])+ CONSTANTS[3]*STATES[2]+ CONSTANTS[4]*STATES[3];
resid[1] = RATES[1] -  - CONSTANTS[2]*STATES[0]*STATES[1]+ CONSTANTS[3]*STATES[2]+ CONSTANTS[4]*STATES[3];
resid[2] = RATES[2] - ( CONSTANTS[2]*STATES[0]*STATES[1] -  CONSTANTS[3]*STATES[2]) -  CONSTANTS[6]*STATES[2];
resid[3] = RATES[3] - (( CONSTANTS[6]*STATES[2] -  CONSTANTS[4]*STATES[3]) -  CONSTANTS[7]*STATES[3]) -  CONSTANTS[8]*STATES[3];
resid[4] = RATES[4] -  CONSTANTS[7]*STATES[3];
resid[5] = RATES[5] -  CONSTANTS[8]*STATES[3];
}
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;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}