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 4 entries in each of the rate and state variable arrays.
There are a total of 4 entries in the constant variable array.
*/
/*
* VOI is time in component environment (second).
* STATES[0] is Ca in component Ca (micromolar).
* CONSTANTS[0] is k1 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[1] is k1_ in component reaction_constants (first_order_rate_constant).
* CONSTANTS[2] is k2 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[3] is k2_ in component reaction_constants (first_order_rate_constant).
* STATES[1] is Trop in component Trop (micromolar).
* STATES[2] is CaTrop in component CaTrop (micromolar).
* STATES[3] is Ca2Trop in component Ca2Trop (micromolar).
* RATES[0] is d/dt Ca in component Ca (micromolar).
* RATES[1] is d/dt Trop in component Trop (micromolar).
* RATES[2] is d/dt CaTrop in component CaTrop (micromolar).
* RATES[3] is d/dt Ca2Trop in component Ca2Trop (micromolar).
*/
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.05;
CONSTANTS[0] = 2.033E14;
CONSTANTS[1] = 2642.0;
CONSTANTS[2] = 1.017E14;
CONSTANTS[3] = 13.21;
STATES[1] = 360.0;
STATES[2] = 0.01;
STATES[3] = 0.01;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = ( CONSTANTS[1]*STATES[2]+ CONSTANTS[3]*STATES[3]) - ( CONSTANTS[0]*STATES[0]*STATES[1]+ CONSTANTS[2]*STATES[0]*STATES[2]);
RATES[1] = CONSTANTS[1]*STATES[2] - CONSTANTS[0]*STATES[0]*STATES[1];
RATES[2] = ( CONSTANTS[0]*STATES[0]*STATES[1]+ CONSTANTS[3]*STATES[3]) - ( CONSTANTS[1]*STATES[2]+ CONSTANTS[2]*STATES[0]*STATES[2]);
RATES[3] = CONSTANTS[2]*STATES[0]*STATES[2] - CONSTANTS[3]*STATES[3];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
