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 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).
*/
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;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
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];
RATES[1] = - CONSTANTS[2]*STATES[0]*STATES[1]+ CONSTANTS[3]*STATES[2]+ CONSTANTS[4]*STATES[3];
RATES[2] = ( CONSTANTS[2]*STATES[0]*STATES[1] - CONSTANTS[3]*STATES[2]) - CONSTANTS[6]*STATES[2];
RATES[3] = (( CONSTANTS[6]*STATES[2] - CONSTANTS[4]*STATES[3]) - CONSTANTS[7]*STATES[3]) - CONSTANTS[8]*STATES[3];
RATES[4] = CONSTANTS[7]*STATES[3];
RATES[5] = CONSTANTS[8]*STATES[3];
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
