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 5 entries in the algebraic variable array.
   There are a total of 11 entries in each of the rate and state variable arrays.
   There are a total of 55 entries in the constant variable array.
 */
/*
 * VOI is time in component environment (minute).
 * CONSTANTS[0] is V_max1 in component V1 (micromolar_per_minute).
 * CONSTANTS[1] is GEFt in component V1 (micromolar).
 * CONSTANTS[43] is V_1 in component V1 (per_minute).
 * CONSTANTS[2] is Str in component V2 (dimensionless).
 * CONSTANTS[3] is V_max2 in component V2 (micromolar_per_minute).
 * CONSTANTS[44] is V_2 in component V2 (per_minute).
 * CONSTANTS[4] is k_c3 in component V3 (per_minute).
 * CONSTANTS[5] is PKAt in component V3 (micromolar).
 * CONSTANTS[6] is GAPt in component V3 (micromolar).
 * CONSTANTS[45] is V_3 in component V3 (per_minute).
 * CONSTANTS[7] is V_max4 in component V4 (micromolar_per_minute).
 * CONSTANTS[46] is V_4 in component V4 (per_minute).
 * CONSTANTS[8] is k_gef in component V5 (per_minute).
 * CONSTANTS[9] is RASt in component V5 (micromolar).
 * CONSTANTS[47] is V_5 in component V5 (per_minute).
 * CONSTANTS[10] is k_gap in component V6 (per_minute).
 * CONSTANTS[48] is V_6 in component V6 (per_minute).
 * CONSTANTS[11] is k_c7 in component V7 (per_minute).
 * CONSTANTS[12] is PDEt in component V7 (micromolar).
 * CONSTANTS[49] is V_7 in component V7 (per_minute).
 * CONSTANTS[13] is V_max8 in component V8 (micromolar_per_minute).
 * CONSTANTS[50] is V_8 in component V8 (per_minute).
 * CONSTANTS[14] is a in component VPKAact (per_micromolar_squared_minute).
 * CONSTANTS[15] is r in component VPKAact (per_minute).
 * STATES[0] is R2C2 in component holoenzyme_R_C (dimensionless).
 * STATES[1] is cAMP in component cyclic_AMP (micromolar).
 * ALGEBRAIC[1] is C in component C_subunit (dimensionless).
 * ALGEBRAIC[0] is R2cAMP2 in component holoenzyme_R_cAMP (dimensionless).
 * ALGEBRAIC[4] is V_PKAact in component VPKAact (per_minute).
 * CONSTANTS[16] is K_1 in component active_GEF (dimensionless).
 * CONSTANTS[17] is K_2 in component active_GEF (dimensionless).
 * STATES[2] is GEFa in component active_GEF (dimensionless).
 * CONSTANTS[18] is K_3 in component active_GAP (dimensionless).
 * CONSTANTS[19] is K_4 in component active_GAP (dimensionless).
 * STATES[3] is GAPa in component active_GAP (dimensionless).
 * CONSTANTS[20] is K_5 in component RAS_to_GTP (dimensionless).
 * CONSTANTS[21] is K_6 in component RAS_to_GTP (dimensionless).
 * STATES[4] is RGTP in component RAS_to_GTP (dimensionless).
 * CONSTANTS[22] is k_a in component adenylate_cyclase (per_micromolar_minute).
 * CONSTANTS[23] is k_i in component adenylate_cyclase (per_minute).
 * STATES[5] is CYCLa in component adenylate_cyclase (dimensionless).
 * CONSTANTS[24] is K_7 in component active_PDE (dimensionless).
 * CONSTANTS[25] is K_8 in component active_PDE (dimensionless).
 * STATES[6] is PDEa in component active_PDE (dimensionless).
 * CONSTANTS[26] is k_s in component cyclic_AMP (per_minute).
 * CONSTANTS[27] is k_d in component cyclic_AMP (per_minute).
 * CONSTANTS[28] is CYCLt in component cyclic_AMP (micromolar).
 * CONSTANTS[29] is K_md in component cyclic_AMP (micromolar).
 * CONSTANTS[30] is k_c9 in component V9 (per_minute).
 * CONSTANTS[31] is MSNt in component V9 (micromolar).
 * CONSTANTS[51] is V_9 in component V9 (per_minute).
 * CONSTANTS[32] is V_max10 in component V10 (micromolar_per_minute).
 * CONSTANTS[52] is V_10 in component V10 (per_minute).
 * CONSTANTS[33] is k_c11 in component V11 (per_minute).
 * CONSTANTS[53] is V_11 in component V11 (per_minute).
 * CONSTANTS[34] is V_max12 in component V12 (micromolar_per_minute).
 * CONSTANTS[54] is V_12 in component V12 (per_minute).
 * CONSTANTS[35] is k_t1 in component cytosol (per_minute).
 * CONSTANTS[36] is k_t2 in component cytosol (per_minute).
 * CONSTANTS[37] is K_11 in component cytosol (dimensionless).
 * CONSTANTS[38] is K_12 in component cytosol (dimensionless).
 * STATES[7] is MN in component nucleus (dimensionless).
 * STATES[8] is MCP in component cytosol_phos (dimensionless).
 * STATES[9] is MC in component cytosol (dimensionless).
 * CONSTANTS[39] is K_9 in component nucleus (dimensionless).
 * CONSTANTS[40] is K_10 in component nucleus (dimensionless).
 * STATES[10] is MNP in component nucleus_phos (dimensionless).
 * CONSTANTS[41] is k_t3 in component nucleus_phos (per_minute).
 * CONSTANTS[42] is k_t4 in component nucleus_phos (per_minute).
 * ALGEBRAIC[2] is M_cyto in component Mcyto (dimensionless).
 * ALGEBRAIC[3] is M_nucl in component Mnucl (dimensionless).
 * RATES[2] is d/dt GEFa in component active_GEF (dimensionless).
 * RATES[3] is d/dt GAPa in component active_GAP (dimensionless).
 * RATES[4] is d/dt RGTP in component RAS_to_GTP (dimensionless).
 * RATES[5] is d/dt CYCLa in component adenylate_cyclase (dimensionless).
 * RATES[6] is d/dt PDEa in component active_PDE (dimensionless).
 * RATES[1] is d/dt cAMP in component cyclic_AMP (micromolar).
 * RATES[0] is d/dt R2C2 in component holoenzyme_R_C (dimensionless).
 * RATES[9] is d/dt MC in component cytosol (dimensionless).
 * RATES[7] is d/dt MN in component nucleus (dimensionless).
 * RATES[10] is d/dt MNP in component nucleus_phos (dimensionless).
 * RATES[8] is d/dt MCP in component cytosol_phos (dimensionless).
 * There are a total of 0 condition variables.
 */
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
CONSTANTS[0] = 1;
CONSTANTS[1] = 4;
CONSTANTS[2] = 1;
CONSTANTS[3] = 1;
CONSTANTS[4] = 3.5;
CONSTANTS[5] = 0.3;
CONSTANTS[6] = 1.5;
CONSTANTS[7] = 1.3;
CONSTANTS[8] = 240;
CONSTANTS[9] = 250;
CONSTANTS[10] = 600;
CONSTANTS[11] = 3.333;
CONSTANTS[12] = 0.5;
CONSTANTS[13] = 1.5;
CONSTANTS[14] = 1;
CONSTANTS[15] = 1;
STATES[0] = 0.5;
STATES[1] = 1;
CONSTANTS[16] = 0.05;
CONSTANTS[17] = 0.05;
STATES[2] = 0.36;
CONSTANTS[18] = 0.01;
CONSTANTS[19] = 0.01;
STATES[3] = 0.5;
CONSTANTS[20] = 0.001;
CONSTANTS[21] = 0.001;
STATES[4] = 0.1;
CONSTANTS[22] = 0.01;
CONSTANTS[23] = 1;
STATES[5] = 0.1;
CONSTANTS[24] = 0.01;
CONSTANTS[25] = 0.01;
STATES[6] = 0.5;
CONSTANTS[26] = 4;
CONSTANTS[27] = 100;
CONSTANTS[28] = 0.7;
CONSTANTS[29] = 20;
CONSTANTS[30] = 3.333;
CONSTANTS[31] = 1;
CONSTANTS[32] = 0.6;
CONSTANTS[33] = 3.333;
CONSTANTS[34] = 2;
CONSTANTS[35] = 10;
CONSTANTS[36] = 0.001;
CONSTANTS[37] = 0.05;
CONSTANTS[38] = 0.05;
STATES[7] = 0.25;
STATES[8] = 0.25;
STATES[9] = 0.25;
CONSTANTS[39] = 0.05;
CONSTANTS[40] = 0.05;
STATES[10] = 0.25;
CONSTANTS[41] = 0.001;
CONSTANTS[42] = 10;
CONSTANTS[43] = CONSTANTS[0]/CONSTANTS[1];
CONSTANTS[44] = ( CONSTANTS[2]*CONSTANTS[3])/CONSTANTS[1];
CONSTANTS[45] = ( CONSTANTS[4]*CONSTANTS[5])/CONSTANTS[6];
CONSTANTS[46] = CONSTANTS[7]/CONSTANTS[6];
CONSTANTS[47] = ( CONSTANTS[8]*CONSTANTS[1])/CONSTANTS[9];
CONSTANTS[48] = ( CONSTANTS[10]*CONSTANTS[6])/CONSTANTS[9];
CONSTANTS[49] = ( CONSTANTS[11]*CONSTANTS[5])/CONSTANTS[12];
CONSTANTS[50] = CONSTANTS[13]/CONSTANTS[12];
CONSTANTS[51] = ( CONSTANTS[30]*CONSTANTS[5])/CONSTANTS[31];
CONSTANTS[52] = ( CONSTANTS[2]*CONSTANTS[32])/CONSTANTS[31];
CONSTANTS[53] = ( CONSTANTS[33]*CONSTANTS[5])/CONSTANTS[31];
CONSTANTS[54] = ( CONSTANTS[2]*CONSTANTS[34])/CONSTANTS[31];
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[4] = 0.1001;
RATES[5] = 0.1001;
RATES[6] = 0.1001;
RATES[1] = 0.1001;
RATES[0] = 0.1001;
RATES[9] = 0.1001;
RATES[7] = 0.1001;
RATES[10] = 0.1001;
RATES[8] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
                 double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[2] - ( CONSTANTS[43]*(1.00000 - STATES[2]))/(CONSTANTS[16]+(1.00000 - STATES[2])) - ( CONSTANTS[44]*STATES[2])/(CONSTANTS[17]+STATES[2]);
resid[1] = RATES[3] - ( CONSTANTS[45]*ALGEBRAIC[1]*(1.00000 - STATES[3]))/(CONSTANTS[18]+(1.00000 - STATES[3])) - ( CONSTANTS[46]*STATES[3])/(CONSTANTS[19]+STATES[3]);
resid[2] = RATES[4] - ( CONSTANTS[47]*STATES[2]*(1.00000 - STATES[4]))/(CONSTANTS[20]+(1.00000 - STATES[4])) - ( CONSTANTS[48]*STATES[3]*STATES[4])/(CONSTANTS[21]+STATES[4]);
resid[3] = RATES[5] -  CONSTANTS[22]*STATES[4]*CONSTANTS[9]*(1.00000 - STATES[5]) -  CONSTANTS[23]*STATES[5];
resid[4] = RATES[6] - ( CONSTANTS[49]*ALGEBRAIC[1]*(1.00000 - STATES[6]))/(CONSTANTS[24]+(1.00000 - STATES[6])) - ( CONSTANTS[50]*STATES[6])/(CONSTANTS[25]+STATES[6]);
resid[5] = RATES[1] - ( CONSTANTS[26]*STATES[5]*CONSTANTS[28] - ( CONSTANTS[27]*CONSTANTS[12]*STATES[6]*STATES[1])/(CONSTANTS[29]+STATES[1])) -  2.00000*ALGEBRAIC[4]*CONSTANTS[5];
resid[6] = RATES[0] -  - CONSTANTS[14]*STATES[0]*pow(STATES[1], 2.00000)+ CONSTANTS[15]*pow(ALGEBRAIC[1], 2.00000)*ALGEBRAIC[0]*pow(CONSTANTS[5], 2.00000)*1.00000;
resid[7] = RATES[9] - (( - CONSTANTS[35]*STATES[9]+ CONSTANTS[36]*STATES[7]) - ( CONSTANTS[53]*ALGEBRAIC[1]*STATES[9])/(CONSTANTS[37]+STATES[9]))+( CONSTANTS[54]*STATES[8])/(CONSTANTS[38]+STATES[8]);
resid[8] = RATES[7] - (( CONSTANTS[35]*STATES[9] -  CONSTANTS[36]*STATES[7]) - ( CONSTANTS[51]*ALGEBRAIC[1]*STATES[7])/(CONSTANTS[39]+STATES[7]))+( CONSTANTS[52]*STATES[10])/(CONSTANTS[40]+STATES[10]);
resid[9] = RATES[10] - ((( CONSTANTS[51]*ALGEBRAIC[1]*STATES[7])/(CONSTANTS[39]+STATES[7]) - ( CONSTANTS[52]*STATES[10])/(CONSTANTS[40]+STATES[10]))+ CONSTANTS[41]*STATES[8]) -  CONSTANTS[42]*STATES[10];
resid[10] = RATES[8] - ( - CONSTANTS[41]*STATES[8]+ CONSTANTS[42]*STATES[10]+( CONSTANTS[53]*ALGEBRAIC[1]*STATES[9])/(CONSTANTS[37]+STATES[9])) - ( CONSTANTS[54]*STATES[8])/(CONSTANTS[38]+STATES[8]);
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[2] = STATES[9]+STATES[8];
ALGEBRAIC[3] = STATES[7]+STATES[10];
}
void
computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
ALGEBRAIC[0] = 1.00000 - STATES[0];
ALGEBRAIC[1] =  2.00000*(1.00000 - STATES[0]);
ALGEBRAIC[4] =  CONSTANTS[14]*STATES[0]*pow(STATES[1], 2.00000) -  CONSTANTS[15]*ALGEBRAIC[1]*ALGEBRAIC[0]*pow(CONSTANTS[5], 2.00000)*1.00000;
}
void
getStateInformation(double* SI)
{
SI[0] = 1.0;
SI[1] = 1.0;
SI[2] = 1.0;
SI[3] = 1.0;
SI[4] = 1.0;
SI[5] = 1.0;
SI[6] = 1.0;
SI[7] = 1.0;
SI[8] = 1.0;
SI[9] = 1.0;
SI[10] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
             double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
}