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 7 entries in the algebraic variable array.
There are a total of 20 entries in each of the rate and state variable arrays.
There are a total of 33 entries in the constant variable array.
*/
/*
* VOI is time in component environment (minute).
* ALGEBRAIC[0] is x1 in component x1 (molar).
* STATES[0] is x2 in component x2 (molar).
* CONSTANTS[0] is k1 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[1] is k_minus1 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[20] is k4 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[2] is k_minus4 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[21] is k_minus3 in component reaction_constants (second_order_rate_constant).
* STATES[1] is x3 in component x3 (molar).
* STATES[2] is x5 in component x5 (molar).
* STATES[3] is x6 in component x6 (molar).
* CONSTANTS[3] is PTP in component reaction_constants (molar).
* CONSTANTS[4] is k3 in component reaction_constants (first_order_rate_constant).
* STATES[4] is x4 in component x4 (molar).
* CONSTANTS[22] is k2 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[23] is k_minus2 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[5] is k4b in component reaction_constants (first_order_rate_constant).
* CONSTANTS[6] is k_minus4b in component reaction_constants (first_order_rate_constant).
* STATES[5] is x7 in component x7 (molar).
* STATES[6] is x8 in component x8 (molar).
* ALGEBRAIC[1] is k5 in component reaction_constants (rate).
* CONSTANTS[7] is k_minus5 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[8] is k6 in component reaction_constants (second_order_rate_constant).
* STATES[7] is x9 in component x9 (molar).
* CONSTANTS[9] is k7 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[24] is k_minus7 in component reaction_constants (second_order_rate_constant).
* STATES[8] is x10 in component x10 (molar).
* CONSTANTS[10] is IRp in component reaction_constants (molar).
* CONSTANTS[25] is k8 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[11] is k_minus8 in component reaction_constants (first_order_rate_constant).
* STATES[9] is x11 in component x11 (molar).
* STATES[10] is x12 in component x12 (molar).
* STATES[11] is x13 in component x13 (percentage).
* ALGEBRAIC[2] is k9 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[26] is k_minus9 in component reaction_constants (second_order_rate_constant).
* CONSTANTS[27] is k10 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[12] is k_minus10 in component reaction_constants (second_order_rate_constant).
* STATES[12] is x14 in component x14 (percentage).
* STATES[13] is x15 in component x15 (percentage).
* CONSTANTS[13] is PTEN in component reaction_constants (molar).
* CONSTANTS[14] is SHIP in component reaction_constants (molar).
* STATES[14] is x16 in component x16 (percentage).
* ALGEBRAIC[3] is k11 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[28] is k_minus11 in component reaction_constants (first_order_rate_constant).
* STATES[15] is x17 in component x17 (percentage).
* STATES[16] is x18 in component x18 (percentage).
* ALGEBRAIC[4] is k12 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[29] is k_minus12 in component reaction_constants (first_order_rate_constant).
* STATES[17] is x19 in component x19 (percentage).
* STATES[18] is x20 in component x20 (percentage).
* CONSTANTS[30] is k13 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[15] is k_minus13 in component reaction_constants (first_order_rate_constant).
* ALGEBRAIC[6] is k13b in component reaction_constants (first_order_rate_constant).
* CONSTANTS[31] is k14 in component reaction_constants (first_order_rate_constant).
* CONSTANTS[16] is k_minus14 in component reaction_constants (first_order_rate_constant).
* STATES[19] is x21 in component x21 (percentage).
* CONSTANTS[32] is k9_basal in component reaction_constants (first_order_rate_constant).
* CONSTANTS[17] is k9_stimulated in component reaction_constants (first_order_rate_constant).
* ALGEBRAIC[5] is effect in component reaction_constants (dimensionless).
* CONSTANTS[18] is APequil in component reaction_constants (dimensionless).
* CONSTANTS[19] is PI3K in component reaction_constants (molar).
* RATES[0] is d/dt x2 in component x2 (molar).
* RATES[1] is d/dt x3 in component x3 (molar).
* RATES[4] is d/dt x4 in component x4 (molar).
* RATES[2] is d/dt x5 in component x5 (molar).
* RATES[3] is d/dt x6 in component x6 (molar).
* RATES[5] is d/dt x7 in component x7 (molar).
* RATES[6] is d/dt x8 in component x8 (molar).
* RATES[7] is d/dt x9 in component x9 (molar).
* RATES[8] is d/dt x10 in component x10 (molar).
* RATES[9] is d/dt x11 in component x11 (molar).
* RATES[10] is d/dt x12 in component x12 (molar).
* RATES[11] is d/dt x13 in component x13 (percentage).
* RATES[12] is d/dt x14 in component x14 (percentage).
* RATES[13] is d/dt x15 in component x15 (percentage).
* RATES[14] is d/dt x16 in component x16 (percentage).
* RATES[15] is d/dt x17 in component x17 (percentage).
* RATES[16] is d/dt x18 in component x18 (percentage).
* RATES[17] is d/dt x19 in component x19 (percentage).
* RATES[18] is d/dt x20 in component x20 (percentage).
* RATES[19] is d/dt x21 in component x21 (percentage).
* There are a total of 2 condition variables.
*/
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 9e-13;
CONSTANTS[0] = 6e7;
CONSTANTS[1] = 0.2;
CONSTANTS[2] = 0.003;
STATES[1] = 0;
STATES[2] = 0;
STATES[3] = 1e-13;
CONSTANTS[3] = 1;
CONSTANTS[4] = 2500;
STATES[4] = 0;
CONSTANTS[5] = 2.1e-3;
CONSTANTS[6] = 2.1e-4;
STATES[5] = 0;
STATES[6] = 0;
CONSTANTS[7] = 1.67e-18;
CONSTANTS[8] = 0.461;
STATES[7] = 1e-13;
CONSTANTS[9] = 4.16;
STATES[8] = 1e-13;
CONSTANTS[10] = 8.97e-13;
CONSTANTS[11] = 10;
STATES[9] = 1e-13;
STATES[10] = 0;
STATES[11] = 0.31;
CONSTANTS[12] = 2.77;
STATES[12] = 99.4;
STATES[13] = 0.29;
CONSTANTS[13] = 1;
CONSTANTS[14] = 1;
STATES[14] = 100;
STATES[15] = 0;
STATES[16] = 100;
STATES[17] = 0;
STATES[18] = 96;
CONSTANTS[15] = 0.167;
CONSTANTS[16] = 0.001155;
STATES[19] = 4;
CONSTANTS[17] = 1.39;
CONSTANTS[18] = 9.09;
CONSTANTS[19] = 5e-15;
CONSTANTS[20] = CONSTANTS[2]/9.00000;
CONSTANTS[21] = CONSTANTS[1]/1.00000;
CONSTANTS[22] = CONSTANTS[0];
CONSTANTS[23] = 100.000*CONSTANTS[1];
CONSTANTS[24] = (2.50000/7.45000)*CONSTANTS[9];
CONSTANTS[25] = (( CONSTANTS[11]*5.00000)/70.7750)*1.00000e+12;
CONSTANTS[26] = (94.0000/3.10000)*CONSTANTS[17];
CONSTANTS[27] = (3.10000/2.90000)*CONSTANTS[12];
CONSTANTS[28] = 10.0000*log(2.00000)*1.00000;
CONSTANTS[29] = 10.0000*log(2.00000)*1.00000;
CONSTANTS[30] = (4.00000/96.0000)*CONSTANTS[15];
CONSTANTS[31] = CONSTANTS[16]/96.0000;
CONSTANTS[32] = (0.310000/99.4000)*CONSTANTS[26];
RATES[0] = 0.1001;
RATES[1] = 0.1001;
RATES[4] = 0.1001;
RATES[2] = 0.1001;
RATES[3] = 0.1001;
RATES[5] = 0.1001;
RATES[6] = 0.1001;
RATES[7] = 0.1001;
RATES[8] = 0.1001;
RATES[9] = 0.1001;
RATES[10] = 0.1001;
RATES[11] = 0.1001;
RATES[12] = 0.1001;
RATES[13] = 0.1001;
RATES[14] = 0.1001;
RATES[15] = 0.1001;
RATES[16] = 0.1001;
RATES[17] = 0.1001;
RATES[18] = 0.1001;
RATES[19] = 0.1001;
}
void
computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
resid[0] = RATES[0] - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[21]*CONSTANTS[3]*STATES[2]+ CONSTANTS[2]*STATES[3]) - ( CONSTANTS[0]*ALGEBRAIC[0]*STATES[0]+ CONSTANTS[20]*STATES[0]);
resid[1] = RATES[1] - CONSTANTS[0]*ALGEBRAIC[0]*STATES[0] - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[4]*STATES[1]);
resid[2] = RATES[4] - ( CONSTANTS[22]*ALGEBRAIC[0]*STATES[2]+ CONSTANTS[6]*STATES[5]) - ( CONSTANTS[23]*STATES[4]+ CONSTANTS[5]*STATES[4]);
resid[3] = RATES[2] - ( CONSTANTS[4]*STATES[1]+ CONSTANTS[23]*STATES[4]+ CONSTANTS[6]*STATES[6]) - ( CONSTANTS[22]*ALGEBRAIC[0]*STATES[2]+ CONSTANTS[21]*CONSTANTS[3]*STATES[2]+ CONSTANTS[5]*STATES[2]);
resid[4] = RATES[3] - (ALGEBRAIC[1]+ CONSTANTS[8]*CONSTANTS[3]*(STATES[5]+STATES[6])+ CONSTANTS[20]*STATES[0]) - ( CONSTANTS[7]*STATES[3]+ CONSTANTS[2]*STATES[3]);
resid[5] = RATES[5] - CONSTANTS[5]*STATES[4] - ( CONSTANTS[6]*STATES[5]+ CONSTANTS[8]*CONSTANTS[3]*STATES[5]);
resid[6] = RATES[6] - CONSTANTS[5]*STATES[2] - ( CONSTANTS[6]*STATES[6]+ CONSTANTS[8]*CONSTANTS[3]*STATES[6]);
resid[7] = RATES[7] - CONSTANTS[24]*CONSTANTS[3]*STATES[8] - ( CONSTANTS[9]*STATES[7]*(STATES[4]+STATES[2]))/CONSTANTS[10];
resid[8] = RATES[8] - (( CONSTANTS[9]*STATES[7]*(STATES[4]+STATES[2]))/CONSTANTS[10]+ CONSTANTS[11]*STATES[10]) - ( CONSTANTS[24]*CONSTANTS[3]+ CONSTANTS[25]*STATES[9])*STATES[8];
resid[9] = RATES[9] - CONSTANTS[11]*STATES[10] - CONSTANTS[25]*STATES[8]*STATES[9];
resid[10] = RATES[10] - CONSTANTS[25]*STATES[8]*STATES[9] - CONSTANTS[11]*STATES[10];
resid[11] = RATES[11] - ( ALGEBRAIC[2]*STATES[12]+ CONSTANTS[27]*STATES[13]) - ( CONSTANTS[26]*CONSTANTS[13]+ CONSTANTS[12]*CONSTANTS[14])*STATES[11];
resid[12] = RATES[12] - CONSTANTS[26]*CONSTANTS[13]*STATES[11] - ALGEBRAIC[2]*STATES[12];
resid[13] = RATES[13] - CONSTANTS[12]*CONSTANTS[14]*STATES[11] - CONSTANTS[27]*STATES[13];
resid[14] = RATES[14] - CONSTANTS[28]*STATES[15] - ALGEBRAIC[3]*STATES[14];
resid[15] = RATES[15] - ALGEBRAIC[3]*STATES[14] - CONSTANTS[28]*STATES[15];
resid[16] = RATES[16] - CONSTANTS[29]*STATES[17] - ALGEBRAIC[4]*STATES[16];
resid[17] = RATES[17] - ALGEBRAIC[4]*STATES[16] - CONSTANTS[29]*STATES[17];
resid[18] = RATES[18] - ( CONSTANTS[15]*STATES[19]+CONSTANTS[31]) - ( (CONSTANTS[30]+ALGEBRAIC[6])*STATES[18]+ CONSTANTS[16]*STATES[18]);
resid[19] = RATES[19] - - CONSTANTS[15]*STATES[19]+ (CONSTANTS[30]+ALGEBRAIC[6])*STATES[18];
}
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] = (CONDVAR[0]<0.00000 ? 1.00000e-07 : 0.00000);
ALGEBRAIC[1] = (CONDVAR[1]>0.00000 ? 10.0000*CONSTANTS[7] : 60.0000*CONSTANTS[7]);
ALGEBRAIC[2] = ( (CONSTANTS[17] - CONSTANTS[32])*STATES[10])/CONSTANTS[19]+CONSTANTS[32];
ALGEBRAIC[3] = ( 0.100000*CONSTANTS[28]*(STATES[11] - 0.310000))/(3.10000 - 0.310000);
ALGEBRAIC[4] = ( 0.100000*CONSTANTS[29]*(STATES[11] - 0.310000))/(3.10000 - 0.310000);
ALGEBRAIC[5] = ( 0.200000*STATES[15]+ 0.800000*STATES[17])/CONSTANTS[18];
ALGEBRAIC[6] = (40.0000/60.0000 - 4.00000/96.0000)*CONSTANTS[15]*ALGEBRAIC[5];
}
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;
SI[11] = 1.0;
SI[12] = 1.0;
SI[13] = 1.0;
SI[14] = 1.0;
SI[15] = 1.0;
SI[16] = 1.0;
SI[17] = 1.0;
SI[18] = 1.0;
SI[19] = 1.0;
}
void
computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES,
double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS)
{
CONDVAR[0] = VOI - 15.0000;
CONDVAR[1] = (STATES[3]+STATES[5]+STATES[6]) - 1.00000e-13;
}
