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 3 entries in the algebraic variable array. There are a total of 9 entries in each of the rate and state variable arrays. There are a total of 18 entries in the constant variable array. */ /* * VOI is time in component environment (second). * CONSTANTS[0] is NGF in component NGF (dimensionless). * CONSTANTS[1] is pro_TrkA in component pro_TrkA (dimensionless). * STATES[0] is TrkA in component TrkA (dimensionless). * STATES[1] is NGF_TrkA in component NGF_TrkA (dimensionless). * CONSTANTS[2] is k2_NGF_TrkA in component model_parameters (first_order_rate_constant). * CONSTANTS[3] is k1_NGF_TrkA in component model_parameters (first_order_rate_constant). * CONSTANTS[4] is TrkA_turnover in component model_parameters (first_order_rate_constant). * CONSTANTS[5] is k1_TrkA_phosphorylation in component model_parameters (first_order_rate_constant). * STATES[2] is pTrkA in component pTrkA (dimensionless). * STATES[3] is pTrkA_Akt in component pTrkA_Akt (dimensionless). * STATES[4] is Akt in component Akt (dimensionless). * CONSTANTS[6] is k1_pTrkA_degradation in component model_parameters (first_order_rate_constant). * CONSTANTS[7] is k1_Akt_phosphorylation in component model_parameters (first_order_rate_constant). * CONSTANTS[8] is k1_pTrkA_Akt in component model_parameters (first_order_rate_constant). * CONSTANTS[9] is k2_pTrkA_Akt in component model_parameters (first_order_rate_constant). * STATES[5] is pAkt in component pAkt (dimensionless). * CONSTANTS[10] is k1_pAkt_dephosphorylation in component model_parameters (first_order_rate_constant). * STATES[6] is S6 in component S6 (dimensionless). * STATES[7] is pAkt_S6 in component pAkt_S6 (dimensionless). * CONSTANTS[11] is k1_pAkt_S6 in component model_parameters (first_order_rate_constant). * CONSTANTS[12] is k2_pAkt_S6 in component model_parameters (first_order_rate_constant). * CONSTANTS[13] is k1_S6_phosphorylation in component model_parameters (first_order_rate_constant). * STATES[8] is pS6 in component pS6 (dimensionless). * CONSTANTS[14] is k1_pS6_dephosphorylation in component model_parameters (first_order_rate_constant). * ALGEBRAIC[0] is pTrkA_total in component pTrkA_total (dimensionless). * CONSTANTS[15] is pTrkA_scalefactor in component pTrkA_total (dimensionless). * ALGEBRAIC[1] is pAkt_total in component pAkt_total (dimensionless). * CONSTANTS[16] is pAkt_scalefactor in component pAkt_total (dimensionless). * ALGEBRAIC[2] is pS6_total in component pS6_total (dimensionless). * CONSTANTS[17] is pS6_scalefactor in component pS6_total (dimensionless). * RATES[0] is d/dt TrkA in component TrkA (dimensionless). * RATES[1] is d/dt NGF_TrkA in component NGF_TrkA (dimensionless). * RATES[2] is d/dt pTrkA in component pTrkA (dimensionless). * RATES[3] is d/dt pTrkA_Akt in component pTrkA_Akt (dimensionless). * RATES[4] is d/dt Akt in component Akt (dimensionless). * RATES[5] is d/dt pAkt in component pAkt (dimensionless). * RATES[7] is d/dt pAkt_S6 in component pAkt_S6 (dimensionless). * RATES[6] is d/dt S6 in component S6 (dimensionless). * RATES[8] is d/dt pS6 in component pS6 (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 30.0; CONSTANTS[1] = 8.52065e0; STATES[0] = 8.52065e0; STATES[1] = 0.0; CONSTANTS[2] = 1.33747e-2; CONSTANTS[3] = 2.69408e-3; CONSTANTS[4] = 0.0011032440769796; CONSTANTS[5] = 8.33178e-3; STATES[2] = 0.0; STATES[3] = 0.0; STATES[4] = 1.15595e0; CONSTANTS[6] = 6.8084e-2; CONSTANTS[7] = 2.02517e-2; CONSTANTS[8] = 8.82701e-2; CONSTANTS[9] = 1.47518e-10; STATES[5] = 0.0; CONSTANTS[10] = 1.28135e0; STATES[6] = 3.55234e0; STATES[7] = 0.0; CONSTANTS[11] = 6.83666e1; CONSTANTS[12] = 5.23519e-00; CONSTANTS[13] = 5.65150e-3; STATES[8] = 0.0; CONSTANTS[14] = 2.93167e-4; CONSTANTS[15] = 8.48783e-1; CONSTANTS[16] = 2.42381e0; CONSTANTS[17] = 5.25843e-1; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( CONSTANTS[2]*STATES[1]+ CONSTANTS[4]*(CONSTANTS[1] - STATES[0])) - CONSTANTS[3]*CONSTANTS[0]*STATES[0]; RATES[1] = CONSTANTS[3]*CONSTANTS[0]*STATES[0] - ( CONSTANTS[2]*STATES[1]+ CONSTANTS[5]*STATES[1]); RATES[2] = ( CONSTANTS[5]*STATES[1]+ CONSTANTS[7]*STATES[3]+ CONSTANTS[9]*STATES[3]) - ( CONSTANTS[6]*STATES[2]+ CONSTANTS[8]*STATES[2]*STATES[4]); RATES[3] = CONSTANTS[8]*STATES[2]*STATES[4] - ( CONSTANTS[9]*STATES[3]+ CONSTANTS[7]*STATES[3]); RATES[4] = ( CONSTANTS[9]*STATES[3]+ CONSTANTS[10]*STATES[5]) - CONSTANTS[8]*STATES[2]*STATES[4]; RATES[5] = ( CONSTANTS[7]*STATES[3]+ CONSTANTS[12]*STATES[7]+ CONSTANTS[13]*STATES[7]) - ( CONSTANTS[10]*STATES[5]+ CONSTANTS[11]*STATES[5]*STATES[6]); RATES[7] = CONSTANTS[11]*STATES[5]*STATES[6] - ( CONSTANTS[12]*STATES[7]+ CONSTANTS[13]*STATES[7]); RATES[6] = ( CONSTANTS[12]*STATES[7]+ CONSTANTS[14]*STATES[8]) - CONSTANTS[11]*STATES[5]*STATES[6]; RATES[8] = CONSTANTS[13]*STATES[7] - CONSTANTS[14]*STATES[8]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = (STATES[2]+STATES[3])*CONSTANTS[15]; ALGEBRAIC[1] = (STATES[5]+STATES[7])*CONSTANTS[16]; ALGEBRAIC[2] = STATES[8]*CONSTANTS[17]; }