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 2 entries in each of the rate and state variable arrays.
   There are a total of 11 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * STATES[0] is GSH in component GSH (millimolar).
 * CONSTANTS[0] is V in component GSH (flux).
 * CONSTANTS[1] is Kms in component GSH (millimolar).
 * CONSTANTS[2] is Kmp in component GSH (millimolar).
 * CONSTANTS[3] is Kmq in component GSH (millimolar).
 * CONSTANTS[4] is Keq in component GSH (millimolar).
 * STATES[1] is SDLGSH in component SDLGSH (millimolar).
 * CONSTANTS[5] is D_lactate in component D_lactate (millimolar).
 * CONSTANTS[6] is HTA in component HTA (millimolar).
 * CONSTANTS[7] is V in component SDLGSH (flux).
 * CONSTANTS[8] is Kms in component SDLGSH (millimolar).
 * CONSTANTS[9] is Kmp in component SDLGSH (millimolar).
 * CONSTANTS[10] is Keq in component SDLGSH (dimensionless).
 * RATES[0] is d/dt GSH in component GSH (millimolar).
 * RATES[1] is d/dt SDLGSH in component SDLGSH (millimolar).
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 1.0;
CONSTANTS[0] = 3.44E-3;
CONSTANTS[1] = 0.49;
CONSTANTS[2] = 0.49;
CONSTANTS[3] = 0.49;
CONSTANTS[4] = 0.49;
STATES[1] = 1.0;
CONSTANTS[5] = 0.0;
CONSTANTS[6] = 1.0;
CONSTANTS[7] = 8.12E-2;
CONSTANTS[8] = 0.61;
CONSTANTS[9] = 0.61;
CONSTANTS[10] = 0.61;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[0] = ( (CONSTANTS[0]/CONSTANTS[1])*(STATES[1] - ( STATES[0]*CONSTANTS[5])/CONSTANTS[4]))/(1.00000+STATES[1]/CONSTANTS[1]+STATES[0]/CONSTANTS[2]+CONSTANTS[5]/CONSTANTS[3]);
RATES[1] = ( (CONSTANTS[7]/CONSTANTS[8])*(CONSTANTS[6] - STATES[1]/CONSTANTS[10]))/(1.00000+CONSTANTS[6]/CONSTANTS[8]+STATES[1]/CONSTANTS[9]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}