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 1 entries in each of the rate and state variable arrays.
   There are a total of 6 entries in the constant variable array.
 */
/*
 * VOI is time in component interface (ms).
 * CONSTANTS[0] is lambda in component interface (dimensionless).
 * CONSTANTS[1] is Ca_max in component interface (mM).
 * CONSTANTS[2] is beta in component interface (dimensionless).
 * CONSTANTS[3] is c50 in component interface (mM).
 * CONSTANTS[4] is h in component interface (dimensionless).
 * CONSTANTS[5] is T_ref in component interface (kPa).
 * ALGEBRAIC[0] is T in component active_contraction (kPa).
 * STATES[0] is Ca_actn in component interface (mM).
 * RATES[0] is d/dt Ca_actn in component interface (mM).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 1;
CONSTANTS[1] = 1;
CONSTANTS[2] = 1.45;
CONSTANTS[3] = 0.5;
CONSTANTS[4] = 3;
CONSTANTS[5] = 100;
STATES[0] = 0;
RATES[0] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] -  VOI*CONSTANTS[1];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] =  (( CONSTANTS[1]*pow(STATES[0], CONSTANTS[4]))/(pow(STATES[0], CONSTANTS[4])+pow(CONSTANTS[3], CONSTANTS[4])))*CONSTANTS[5]*(1.00000+ CONSTANTS[2]*(CONSTANTS[0] - 1.00000));
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
getStateInformation(double* SI)
{
SI[0] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}