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 3 entries in the algebraic variable array.
There are a total of 3 entries in each of the rate and state variable arrays.
There are a total of 19 entries in the constant variable array.
*/
/*
* VOI is time in component environment (minute).
* CONSTANTS[0] is VM2 in component parameters (micromolar_min).
* CONSTANTS[1] is VM3 in component parameters (micromolar_min).
* CONSTANTS[2] is KR in component parameters (micromolar).
* CONSTANTS[3] is KA in component parameters (micromolar).
* CONSTANTS[4] is KP in component parameters (micromolar).
* CONSTANTS[5] is n in component parameters (dimensionless).
* CONSTANTS[6] is m in component parameters (dimensionless).
* CONSTANTS[7] is p in component parameters (dimensionless).
* CONSTANTS[8] is kf in component parameters (per_minute).
* CONSTANTS[9] is k in component parameters (per_minute).
* STATES[0] is Y in component insensitive_pool (micromolar).
* STATES[1] is Z in component cytosol (micromolar).
* ALGEBRAIC[0] is v2 in component parameters (micromolar_min).
* ALGEBRAIC[1] is v3 in component parameters (micromolar_min).
* CONSTANTS[10] is v0 in component cytosol (micromolar_min).
* CONSTANTS[11] is v1beta in component cytosol (micromolar_min).
* CONSTANTS[12] is vP in component phosphorylation (micromolar_min).
* ALGEBRAIC[2] is vK in component kinase_reaction (micromolar_min).
* CONSTANTS[13] is K1 in component phosphorylation (dimensionless).
* CONSTANTS[14] is K2 in component phosphorylation (dimensionless).
* CONSTANTS[15] is WT in component phosphorylation (micromolar).
* STATES[2] is Wstar in component phosphorylation (dimensionless).
* CONSTANTS[16] is vMK in component kinase_reaction (micromolar_min).
* CONSTANTS[17] is Ka in component kinase_reaction (micromolar).
* CONSTANTS[18] is q in component kinase_reaction (dimensionless).
* RATES[1] is d/dt Z in component cytosol (micromolar).
* RATES[0] is d/dt Y in component insensitive_pool (micromolar).
* RATES[2] is d/dt Wstar in component phosphorylation (dimensionless).
* There are a total of 0 condition variables.
*/
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 65;
CONSTANTS[1] = 500;
CONSTANTS[2] = 2;
CONSTANTS[3] = 0.9;
CONSTANTS[4] = 1;
CONSTANTS[5] = 2;
CONSTANTS[6] = 2;
CONSTANTS[7] = 4;
CONSTANTS[8] = 1;
CONSTANTS[9] = 10;
STATES[0] = 1.7;
STATES[1] = 0.26;
CONSTANTS[10] = 1;
CONSTANTS[11] = 2.7;
CONSTANTS[12] = 2.5;
CONSTANTS[13] = 0.01;
CONSTANTS[14] = 0.01;
CONSTANTS[15] = 1;
STATES[2] = 0.37;
CONSTANTS[16] = 20;
CONSTANTS[17] = 2.5;
CONSTANTS[18] = 1;
RATES[1] = 0.1001;
RATES[0] = 0.1001;
RATES[2] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[1] - (((CONSTANTS[10]+CONSTANTS[11]) - ALGEBRAIC[0])+ALGEBRAIC[1]+ CONSTANTS[8]*STATES[0]) - CONSTANTS[9]*STATES[1];
resid[1] = RATES[0] - (ALGEBRAIC[0] - ALGEBRAIC[1]) - CONSTANTS[8]*STATES[0];
resid[2] = RATES[2] - (CONSTANTS[12]/CONSTANTS[15])*(( (ALGEBRAIC[2]/CONSTANTS[12])*(1.00000 - STATES[2]))/((CONSTANTS[13]+1.00000) - STATES[2]) - STATES[2]/(CONSTANTS[14]+STATES[2]));
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = ( CONSTANTS[0]*pow(STATES[1], CONSTANTS[5]))/(pow(CONSTANTS[4], CONSTANTS[5])+pow(STATES[1], CONSTANTS[5]));
ALGEBRAIC[1] = CONSTANTS[1]*(pow(STATES[0], CONSTANTS[6])/(pow(CONSTANTS[2], CONSTANTS[6])+pow(STATES[0], CONSTANTS[6])))*(pow(STATES[1], CONSTANTS[7])/(pow(CONSTANTS[3], CONSTANTS[7])+pow(STATES[1], CONSTANTS[7])));
ALGEBRAIC[2] = CONSTANTS[16]*(pow(STATES[1], CONSTANTS[18])/(pow(CONSTANTS[17], CONSTANTS[18])+pow(STATES[1], CONSTANTS[18])));
}
void
getStateInformation(double* SI)
{
SI[0] = 1.0;
SI[1] = 1.0;
SI[2] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}
