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 7 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is x_7 in component x_7 (picomolar).
 * CONSTANTS[0] is k_t in component model_parameters (per_minute).
 * CONSTANTS[1] is B_maxSAv in component model_parameters (picomolar).
 * CONSTANTS[2] is k_onSAv in component model_parameters (per_picomolar_per_minute).
 * STATES[1] is x_8 in component x_8 (picomolar).
 * CONSTANTS[3] is k_offSAv in component model_parameters (per_minute).
 * STATES[2] is x_9 in component x_9 (picomolar).
 * CONSTANTS[4] is k_exSAv in component model_parameters (per_minute).
 * STATES[3] is x_10 in component x_10 (picomolar).
 * CONSTANTS[5] is k_di in component model_parameters (per_minute).
 * CONSTANTS[6] is k_de in component model_parameters (per_minute).
 * STATES[4] is x_11 in component x_11 (picomolar).
 * STATES[5] is x_12 in component x_12 (picomolar).
 * RATES[0] is d/dt x_7 in component x_7 (picomolar).
 * RATES[1] is d/dt x_8 in component x_8 (picomolar).
 * RATES[2] is d/dt x_9 in component x_9 (picomolar).
 * RATES[3] is d/dt x_10 in component x_10 (picomolar).
 * RATES[4] is d/dt x_11 in component x_11 (picomolar).
 * RATES[5] is d/dt x_12 in component x_12 (picomolar).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 76;
CONSTANTS[0] = 0.03294;
CONSTANTS[1] = 129;
CONSTANTS[2] = 2.294e-6;
STATES[1] = 999.293;
CONSTANTS[3] = 0.006799;
STATES[2] = 0;
CONSTANTS[4] = 0.011;
STATES[3] = 0;
CONSTANTS[5] = 0.003179;
CONSTANTS[6] = 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[0]*STATES[0]) -  CONSTANTS[2]*STATES[0]*STATES[1])+ CONSTANTS[3]*STATES[2];
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[0]*STATES[2];
resid[3] = RATES[3] - (( CONSTANTS[0]*STATES[2] -  CONSTANTS[4]*STATES[3]) -  CONSTANTS[5]*STATES[3]) -  CONSTANTS[6]*STATES[3];
resid[4] = RATES[4] -  CONSTANTS[5]*STATES[3];
resid[5] = RATES[5] -  CONSTANTS[6]*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)
{
}