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 0 entries in the algebraic variable array. There are a total of 10 entries in each of the rate and state variable arrays. There are a total of 30 entries in the constant variable array. */ /* * VOI is t in component environment (s). * CONSTANTS[0] is kf2 in component GEF (per_s). * CONSTANTS[1] is kb2 in component GEF (per_s). * CONSTANTS[2] is kf5 in component GEF (per_um_s). * CONSTANTS[3] is kb5 in component GEF (per_s). * CONSTANTS[4] is kf7 in component GEF (per_s). * CONSTANTS[5] is kb7 in component GEF (per_s). * CONSTANTS[6] is kf8 in component GEF (per_um_s). * CONSTANTS[7] is kb8 in component GEF (per_s). * CONSTANTS[8] is km1 in component GEF (um). * CONSTANTS[9] is Vmax1 in component GEF (per_s). * CONSTANTS[10] is km6 in component GEF (um). * CONSTANTS[11] is Vmax6 in component GEF (per_s). * STATES[0] is GEF_inact in component GEF (um). * STATES[1] is GEF in component GEF (um). * CONSTANTS[12] is PKA in component undefinedVariables (um). * STATES[2] is Ca4CAM in component GEF (um). * CONSTANTS[13] is PKC in component undefinedVariables (um). * STATES[3] is Gby in component GEF (um). * STATES[4] is CaM_GEF in component GEF (um). * STATES[5] is Gby_GEF in component GEF (um). * CONSTANTS[14] is kf12 in component GTPRAS (per_s). * CONSTANTS[15] is kb12 in component GTPRAS (per_s). * CONSTANTS[16] is km9 in component GTPRAS (um). * CONSTANTS[17] is Vmax9 in component GTPRAS (per_s). * CONSTANTS[18] is km10 in component GTPRAS (um). * CONSTANTS[19] is Vmax10 in component GTPRAS (per_s). * CONSTANTS[20] is km11 in component GTPRAS (um). * CONSTANTS[21] is Vmax11 in component GTPRAS (per_s). * CONSTANTS[22] is km13 in component GTPRAS (um). * CONSTANTS[23] is Vmax13 in component GTPRAS (per_s). * STATES[6] is GTP_RAS in component GTPRAS (um). * STATES[7] is GDP_RAS in component GTPRAS (um). * STATES[8] is GAP in component GAP (um). * CONSTANTS[24] is kf4 in component GAP (per_s). * CONSTANTS[25] is kb4 in component GAP (per_s). * CONSTANTS[26] is km3 in component GAP (um). * CONSTANTS[27] is Vmax3 in component GAP (per_s). * STATES[9] is GAPstar in component GAP (um). * CONSTANTS[28] is Ca4CAM in component undefinedVariables (um). * CONSTANTS[29] is Gby in component undefinedVariables (um). * RATES[0] is d/dt GEF_inact in component GEF (um). * RATES[1] is d/dt GEF in component GEF (um). * RATES[3] is d/dt Gby in component GEF (um). * RATES[4] is d/dt CaM_GEF in component GEF (um). * RATES[2] is d/dt Ca4CAM in component GEF (um). * RATES[5] is d/dt Gby_GEF in component GEF (um). * RATES[6] is d/dt GTP_RAS in component GTPRAS (um). * RATES[7] is d/dt GDP_RAS in component GTPRAS (um). * RATES[8] is d/dt GAP in component GAP (um). * RATES[9] is d/dt GAPstar in component GAP (um). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 1; CONSTANTS[1] = 0; CONSTANTS[2] = 0.0001; CONSTANTS[3] = 1; CONSTANTS[4] = 1; CONSTANTS[5] = 0; CONSTANTS[6] = 0.00001; CONSTANTS[7] = 1; CONSTANTS[8] = 7.5; CONSTANTS[9] = 9; CONSTANTS[10] = 3.33333333333; CONSTANTS[11] = 4; STATES[0] = 0.1; STATES[1] = 0; CONSTANTS[12] = 1; STATES[2] = 1; CONSTANTS[13] = 1; STATES[3] = 1; STATES[4] = 0; STATES[5] = 0; CONSTANTS[14] = 0.0001; CONSTANTS[15] = 0; CONSTANTS[16] = 0.50505; CONSTANTS[17] = 0.02; CONSTANTS[18] = 0.50505; CONSTANTS[19] = 0.02; CONSTANTS[20] = 0.50505; CONSTANTS[21] = 0.02; CONSTANTS[22] = 1.0104; CONSTANTS[23] = 10; STATES[6] = 0; STATES[7] = 0.2; STATES[8] = 0.002; CONSTANTS[24] = 0.1; CONSTANTS[25] = 0; CONSTANTS[26] = 3.33333333333; CONSTANTS[27] = 4; STATES[9] = 0; CONSTANTS[28] = 1; CONSTANTS[29] = 1; RATES[0] = 0.1001; RATES[1] = 0.1001; RATES[3] = 0.1001; RATES[4] = 0.1001; RATES[2] = 0.1001; RATES[5] = 0.1001; RATES[6] = 0.1001; RATES[7] = 0.1001; RATES[8] = 0.1001; RATES[9] = 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[12]*CONSTANTS[9]*STATES[1])/(CONSTANTS[8]+STATES[1])+( CONSTANTS[13]*CONSTANTS[11]*STATES[1])/(CONSTANTS[10]+STATES[1])) - CONSTANTS[0]*STATES[0]) - CONSTANTS[4]*STATES[0]; resid[1] = RATES[1] - (((- (((( CONSTANTS[12]*CONSTANTS[9]*STATES[1])/(CONSTANTS[8]+STATES[1])+( CONSTANTS[13]*CONSTANTS[11]*STATES[1])/(CONSTANTS[10]+STATES[1])) - CONSTANTS[0]*STATES[0]) - CONSTANTS[4]*STATES[0]) - CONSTANTS[2]*STATES[2]*STATES[1])+ CONSTANTS[3]*STATES[4]) - CONSTANTS[6]*STATES[1]*STATES[3])+ CONSTANTS[7]*STATES[5]; resid[2] = RATES[3] - - CONSTANTS[6]*STATES[1]*STATES[3]+ CONSTANTS[7]*STATES[5]; resid[3] = RATES[4] - - CONSTANTS[3]*STATES[4]+ CONSTANTS[2]*STATES[1]*STATES[2]; resid[4] = RATES[2] - - ( - CONSTANTS[3]*STATES[4]+ CONSTANTS[2]*STATES[1]*STATES[2]); resid[5] = RATES[5] - - ( - CONSTANTS[6]*STATES[1]*STATES[3]+ CONSTANTS[7]*STATES[5]); resid[6] = RATES[6] - (( - STATES[8]*CONSTANTS[23]*STATES[6])/(CONSTANTS[22]+STATES[6]) - CONSTANTS[14]*STATES[6])+( STATES[0]*CONSTANTS[19]*STATES[7])/(CONSTANTS[18]+STATES[7])+( STATES[5]*CONSTANTS[21]*STATES[7])/(CONSTANTS[20]+STATES[7])+( STATES[4]*CONSTANTS[17]*STATES[7])/(CONSTANTS[16]+STATES[7]); resid[7] = RATES[7] - - ((( - STATES[8]*CONSTANTS[23]*STATES[6])/(CONSTANTS[22]+STATES[6]) - CONSTANTS[14]*STATES[6])+( STATES[0]*CONSTANTS[19]*STATES[7])/(CONSTANTS[18]+STATES[7])+( STATES[5]*CONSTANTS[21]*STATES[7])/(CONSTANTS[20]+STATES[7])+( STATES[4]*CONSTANTS[17]*STATES[7])/(CONSTANTS[16]+STATES[7])); resid[8] = RATES[8] - ( - CONSTANTS[13]*CONSTANTS[27]*STATES[8])/(CONSTANTS[26]+STATES[8])+ CONSTANTS[24]*STATES[9]; resid[9] = RATES[9] - ( CONSTANTS[13]*CONSTANTS[27]*STATES[8])/(CONSTANTS[26]+STATES[8]) - CONSTANTS[24]*STATES[9]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } 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; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }