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 7 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 (second).
 * STATES[0] is Ca_cyt in component Ca_cyt (micromolar).
 * STATES[1] is J_ERch in component J_ERch (micromolar).
 * STATES[2] is J_ERpump in component J_ERpump (micromolar).
 * STATES[3] is J_ERleak in component J_ERleak (micromolar).
 * STATES[4] is J_in in component J_in (micromolar).
 * STATES[5] is J_out in component J_out (micromolar).
 * STATES[6] is Ca_ER in component Ca_ER (micromolar).
 * CONSTANTS[0] is K_ch in component J_ERch (micromolar).
 * CONSTANTS[1] is k_ERch in component J_ERch (micromolar).
 * CONSTANTS[2] is K_ERpump in component J_ERpump (micromolar).
 * CONSTANTS[3] is K_ERleak in component J_ERleak (micromolar).
 * CONSTANTS[4] is K_in in component J_in (micromolar).
 * CONSTANTS[5] is K_out in component J_out (micromolar).
 * RATES[0] is d/dt Ca_cyt in component Ca_cyt (micromolar).
 * RATES[6] is d/dt Ca_ER in component Ca_ER (micromolar).
 * RATES[1] is d/dt J_ERch in component J_ERch (micromolar).
 * RATES[2] is d/dt J_ERpump in component J_ERpump (micromolar).
 * RATES[3] is d/dt J_ERleak in component J_ERleak (micromolar).
 * RATES[4] is d/dt J_in in component J_in (micromolar).
 * RATES[5] is d/dt J_out in component J_out (micromolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.1;
STATES[1] = 0.1;
STATES[2] = 0.1;
STATES[3] = 0.1;
STATES[4] = 0.1;
STATES[5] = 0.1;
STATES[6] = 0.1;
CONSTANTS[0] = 3;
CONSTANTS[1] = 0.1;
CONSTANTS[2] = 2;
CONSTANTS[3] = 0.01;
CONSTANTS[4] = 0.8;
CONSTANTS[5] = 1;
CONSTANTS[6] = CONSTANTS[4];
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[4] = CONSTANTS[6];
RATES[0] = ((STATES[1] - STATES[2])+STATES[3]+STATES[4]) - STATES[5];
RATES[6] = (STATES[2] - STATES[3]) - STATES[1];
RATES[1] =  (( CONSTANTS[1]*pow(STATES[0], 4.00000))/(pow(CONSTANTS[0], 4.00000)+pow(STATES[0], 4.00000)))*STATES[6];
RATES[2] =  CONSTANTS[2]*STATES[0];
RATES[3] =  CONSTANTS[3]*STATES[6];
RATES[5] = ( CONSTANTS[5]*STATES[0])/1.00000;
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}