Generated Code
The following is python code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
# Size of variable arrays: sizeAlgebraic = 0 sizeStates = 77 sizeConstants = 200 from math import * from numpy import * def createLegends(): legend_states = [""] * sizeStates legend_rates = [""] * sizeStates legend_algebraic = [""] * sizeAlgebraic legend_voi = "" legend_constants = [""] * sizeConstants legend_voi = "t in component environment (s)" legend_constants[0] = "Ca in component Calcium (um)" legend_constants[1] = "GTP in component undefinedvariables (um)" legend_constants[2] = "PKA in component undefinedvariables (um)" legend_states[0] = "PKC in component KEL_DAGIP3_Model_Modules (um)" legend_states[1] = "GAP in component B_Model_Modules (um)" legend_states[2] = "Raf in component B_Model_Modules (um)" legend_states[3] = "GEF_star in component DGBM_Model_Modules (um)" legend_states[4] = "CaM_GEF in component DGBM_Model_Modules (um)" legend_states[5] = "Gbg_GEF in component DGBM_Model_Modules (um)" legend_states[6] = "CaGqPLC in component DGBM_Model_Modules (um)" legend_states[7] = "CaPLC in component DGBM_Model_Modules (um)" legend_states[8] = "NgCaM in component DGBM_Model_Modules (um)" legend_states[9] = "GEF in component DGBM_Model_Modules (um)" legend_states[10] = "Ng in component DGBM_Model_Modules (um)" legend_states[11] = "Gbg in component DGBM_Model_Modules (um)" legend_states[12] = "Ga_GDP in component DGBM_Model_Modules (um)" legend_states[13] = "mGluR in component DGBM_Model_Modules (um)" legend_states[14] = "PLC in component DGBM_Model_Modules (um)" legend_states[15] = "Ca2CaM in component DGBM_Model_Modules (um)" legend_states[16] = "Ca3CaM in component DGBM_Model_Modules (um)" legend_states[17] = "Ng_star in component DGBM_Model_Modules (um)" legend_states[18] = "Gabg in component DGBM_Model_Modules (um)" legend_states[19] = "R in component DGBM_Model_Modules (um)" legend_states[20] = "Gabg_R in component DGBM_Model_Modules (um)" legend_states[21] = "Glu_synapse in component DGBM_Model_Modules (um)" legend_states[22] = "Gabg_GluR in component DGBM_Model_Modules (um)" legend_states[23] = "Glu in component DGBM_Model_Modules (um)" legend_states[24] = "Ga_GTP in component DGBM_Model_Modules (um)" legend_states[25] = "GqPLC in component DGBM_Model_Modules (um)" legend_states[26] = "GEF_inact in component DGBM_Model_Modules (um)" legend_states[27] = "Ca4CAM in component DGBM_Model_Modules (um)" legend_states[28] = "CaM in component DGBM_Model_Modules (um)" legend_constants[3] = "one in component DGBM_Model_Modules (dimensionless)" legend_constants[4] = "kfD1 in component DGBM_Model_Modules (per_s)" legend_constants[5] = "kbD1 in component DGBM_Model_Modules (per_s)" legend_constants[6] = "kfD2 in component DGBM_Model_Modules (per_s)" legend_constants[7] = "kbD2 in component DGBM_Model_Modules (per_um_s)" legend_constants[8] = "kfD3 in component DGBM_Model_Modules (per_s)" legend_constants[9] = "kbD3 in component DGBM_Model_Modules (per_um_s)" legend_constants[10] = "kfD4 in component DGBM_Model_Modules (per_um_s)" legend_constants[11] = "kbD4 in component DGBM_Model_Modules (per_s)" legend_constants[12] = "kfD5 in component DGBM_Model_Modules (per_s)" legend_constants[13] = "kbD5 in component DGBM_Model_Modules (per_um_s)" legend_constants[14] = "kfD6 in component DGBM_Model_Modules (per_s)" legend_constants[15] = "kfD7 in component DGBM_Model_Modules (per_s)" legend_constants[16] = "kfD8 in component DGBM_Model_Modules (per_um_s)" legend_constants[17] = "kfD9 in component DGBM_Model_Modules (per_um_s)" legend_constants[18] = "kfG1 in component DGBM_Model_Modules (per_um_s)" legend_constants[19] = "kbG1 in component DGBM_Model_Modules (per_s)" legend_constants[20] = "kfG2 in component DGBM_Model_Modules (per_um_s)" legend_constants[21] = "kbG2 in component DGBM_Model_Modules (per_s)" legend_constants[22] = "kfG3 in component DGBM_Model_Modules (per_um_s)" legend_constants[23] = "kbG3 in component DGBM_Model_Modules (per_s)" legend_constants[24] = "kfG4 in component DGBM_Model_Modules (per_um_s)" legend_constants[25] = "kbG4 in component DGBM_Model_Modules (per_s)" legend_constants[26] = "kfG5 in component DGBM_Model_Modules (per_s)" legend_constants[27] = "kfB2 in component DGBM_Model_Modules (per_s)" legend_constants[28] = "kbB2 in component DGBM_Model_Modules (per_s)" legend_constants[29] = "kmB3 in component DGBM_Model_Modules (um)" legend_constants[30] = "kfB5 in component DGBM_Model_Modules (per_um_s)" legend_constants[31] = "kbB5 in component DGBM_Model_Modules (per_s)" legend_constants[32] = "kfB7 in component DGBM_Model_Modules (per_s)" legend_constants[33] = "kbB7 in component DGBM_Model_Modules (per_s)" legend_constants[34] = "kfB8 in component DGBM_Model_Modules (per_um_s)" legend_constants[35] = "kbB8 in component DGBM_Model_Modules (per_s)" legend_constants[36] = "kmB1 in component DGBM_Model_Modules (um)" legend_constants[37] = "VmaxB1 in component DGBM_Model_Modules (per_s)" legend_constants[38] = "kmB6 in component DGBM_Model_Modules (um)" legend_constants[39] = "VmaxB6 in component DGBM_Model_Modules (per_s)" legend_constants[40] = "kfM1 in component DGBM_Model_Modules (per_um2_s)" legend_constants[41] = "kbM1 in component DGBM_Model_Modules (per_s)" legend_constants[42] = "kfM2 in component DGBM_Model_Modules (per_um_s)" legend_constants[43] = "kbM2 in component DGBM_Model_Modules (per_s)" legend_constants[44] = "kfM3 in component DGBM_Model_Modules (per_um_s)" legend_constants[45] = "kbM3 in component DGBM_Model_Modules (per_s)" legend_constants[46] = "kfM4 in component DGBM_Model_Modules (per_um_s)" legend_constants[47] = "kbM4 in component DGBM_Model_Modules (per_s)" legend_constants[48] = "kfM6 in component DGBM_Model_Modules (per_s)" legend_constants[49] = "kmM5 in component DGBM_Model_Modules (um)" legend_constants[50] = "VmaxM5 in component DGBM_Model_Modules (um_per_s)" legend_constants[51] = "kmM7 in component DGBM_Model_Modules (um)" legend_constants[52] = "VmaxM7 in component DGBM_Model_Modules (per_s)" legend_constants[53] = "kmM8 in component DGBM_Model_Modules (um)" legend_constants[54] = "VmaxM8 in component DGBM_Model_Modules (per_s)" legend_constants[55] = "kmH1 in component DGBM_Model_Modules (um)" legend_states[29] = "SHCstar_SOS_GRB2 in component A_Model_Module_SHC (um)" legend_states[30] = "MAPK_star in component H_Model_Module_MAPK (um)" legend_states[31] = "SOS in component A_Model_Module_SHC (um)" legend_states[32] = "MAPKK_star_star in component H_Model_Module_MAPKK (um)" legend_states[33] = "MAPKK_star in component H_Model_Module_MAPKK (um)" legend_states[34] = "Raf_star in component B_Model_Modules (um)" legend_states[35] = "GTPRasRaf_star in component B_Model_Modules (um)" legend_states[36] = "Raf_star_star in component B_Model_Modules (um)" legend_states[37] = "GTP_RAS in component B_Model_Modules (um)" legend_states[38] = "GDP_RAS in component B_Model_Modules (um)" legend_states[39] = "GAPstar in component B_Model_Modules (um)" legend_constants[56] = "PP2A in component B_Model_Modules (um)" legend_constants[57] = "one in component B_Model_Modules (dimensionless)" legend_constants[58] = "kfB12 in component B_Model_Modules (per_s)" legend_constants[59] = "kbB12 in component B_Model_Modules (per_s)" legend_constants[60] = "kmB9 in component B_Model_Modules (um)" legend_constants[61] = "VmaxB9 in component B_Model_Modules (per_s)" legend_constants[62] = "kmB10 in component B_Model_Modules (um)" legend_constants[63] = "VmaxB10 in component B_Model_Modules (per_s)" legend_constants[64] = "kmB11 in component B_Model_Modules (um)" legend_constants[65] = "VmaxB11 in component B_Model_Modules (per_s)" legend_constants[66] = "kmB13 in component B_Model_Modules (um)" legend_constants[67] = "VmaxB13 in component B_Model_Modules (per_s)" legend_constants[68] = "kfB4 in component B_Model_Modules (per_s)" legend_constants[69] = "kbB4 in component B_Model_Modules (per_s)" legend_constants[70] = "kmB3 in component B_Model_Modules (um)" legend_constants[71] = "VmaxB3 in component B_Model_Modules (per_s)" legend_constants[72] = "kmA7 in component B_Model_Modules (um)" legend_constants[73] = "VmaxA7 in component B_Model_Modules (per_s)" legend_constants[74] = "kfH5 in component B_Model_Modules (per_um_s)" legend_constants[75] = "kbH5 in component B_Model_Modules (per_s)" legend_constants[76] = "kmH1 in component B_Model_Modules (um)" legend_constants[77] = "kmH2 in component B_Model_Modules (um)" legend_constants[78] = "kmH3 in component B_Model_Modules (um)" legend_constants[79] = "kmH4 in component B_Model_Modules (um)" legend_constants[80] = "VmaxH1 in component B_Model_Modules (per_s)" legend_constants[81] = "VmaxH2 in component B_Model_Modules (per_s)" legend_constants[82] = "VmaxH3 in component B_Model_Modules (per_s)" legend_constants[83] = "VmaxH4 in component B_Model_Modules (per_s)" legend_constants[84] = "kmM8 in component B_Model_Modules (um)" legend_constants[85] = "kmB6 in component B_Model_Modules (um)" legend_constants[86] = "kmM7 in component B_Model_Modules (um)" legend_constants[87] = "kmA9 in component B_Model_Modules (um)" legend_constants[88] = "kmH8 in component B_Model_Modules (um)" legend_constants[89] = "kmH9 in component B_Model_Modules (um)" legend_states[40] = "MAPKK in component H_Model_Module_MAPKK (um)" legend_constants[90] = "PP2A in component H_Model_Module_MAPKK (um)" legend_constants[91] = "one in component H_Model_Module_MAPKK (dimensionless)" legend_constants[92] = "kmH6 in component H_Model_Module_MAPKK (um)" legend_constants[93] = "kmH7 in component H_Model_Module_MAPKK (um)" legend_constants[94] = "kmH8 in component H_Model_Module_MAPKK (um)" legend_constants[95] = "kmH9 in component H_Model_Module_MAPKK (um)" legend_constants[96] = "VmaxH6 in component H_Model_Module_MAPKK (per_s)" legend_constants[97] = "VmaxH7 in component H_Model_Module_MAPKK (per_s)" legend_constants[98] = "VmaxH8 in component H_Model_Module_MAPKK (per_s)" legend_constants[99] = "VmaxH9 in component H_Model_Module_MAPKK (per_s)" legend_constants[100] = "kmH3 in component H_Model_Module_MAPKK (um)" legend_constants[101] = "kmH4 in component H_Model_Module_MAPKK (um)" legend_states[41] = "MAPK in component H_Model_Module_MAPK (um)" legend_states[42] = "MAPK_tyr in component H_Model_Module_MAPK (um)" legend_constants[102] = "MKP1 in component H_Model_Module_MAPK (um)" legend_constants[103] = "one in component H_Model_Module_MAPK (dimensionless)" legend_constants[104] = "kmH10 in component H_Model_Module_MAPK (um)" legend_constants[105] = "kmH11 in component H_Model_Module_MAPK (um)" legend_constants[106] = "kmH12 in component H_Model_Module_MAPK (um)" legend_constants[107] = "kmH13 in component H_Model_Module_MAPK (um)" legend_constants[108] = "VmaxH10 in component H_Model_Module_MAPK (per_s)" legend_constants[109] = "VmaxH11 in component H_Model_Module_MAPK (per_s)" legend_constants[110] = "VmaxH12 in component H_Model_Module_MAPK (per_s)" legend_constants[111] = "VmaxH13 in component H_Model_Module_MAPK (per_s)" legend_states[43] = "EGF_EGFR in component A_Model_Module_EGFR (um)" legend_states[44] = "CaPLCg in component F_Model_Module_PLC (um)" legend_states[45] = "SHC in component A_Model_Module_SHC (um)" legend_states[46] = "SHCstar in component A_Model_Module_SHC (um)" legend_states[47] = "SOSstar_GRB2 in component A_Model_Module_SHC (um)" legend_states[48] = "SOS_GRB2 in component A_Model_Module_SHC (um)" legend_states[49] = "GRB2 in component A_Model_Module_SHC (um)" legend_states[50] = "SOSstar in component A_Model_Module_SHC (um)" legend_constants[112] = "one in component A_Model_Module_SHC (dimensionless)" legend_constants[113] = "kmA3 in component A_Model_Module_SHC (um)" legend_constants[114] = "kfA4 in component A_Model_Module_SHC (per_s)" legend_constants[115] = "kbA4 in component A_Model_Module_SHC (per_s)" legend_constants[116] = "kfA5 in component A_Model_Module_SHC (per_um_s)" legend_constants[117] = "kbA5 in component A_Model_Module_SHC (per_s)" legend_constants[118] = "kfA6 in component A_Model_Module_SHC (per_um_s)" legend_constants[119] = "kbA6 in component A_Model_Module_SHC (per_s)" legend_constants[120] = "kfA8 in component A_Model_Module_SHC (per_s)" legend_constants[121] = "kbA8 in component A_Model_Module_SHC (per_s)" legend_constants[122] = "kfA10 in component A_Model_Module_SHC (per_um_s)" legend_constants[123] = "kbA10 in component A_Model_Module_SHC (per_s)" legend_constants[124] = "kmA7 in component A_Model_Module_SHC (um)" legend_constants[125] = "kmA9 in component A_Model_Module_SHC (um)" legend_constants[126] = "VmaxA7 in component A_Model_Module_SHC (per_s)" legend_constants[127] = "VmaxA3 in component A_Model_Module_SHC (per_s)" legend_constants[128] = "VmaxA9 in component A_Model_Module_SHC (per_s)" legend_constants[129] = "kmH2 in component A_Model_Module_SHC (um)" legend_constants[130] = "kmF4 in component A_Model_Module_SHC (um)" legend_states[51] = "EGF_EGFR_INTERNAL in component A_Model_Module_EGFR (um)" legend_states[52] = "EGF in component A_Model_Module_EGFR (um)" legend_states[53] = "EGFR in component A_Model_Module_EGFR (um)" legend_constants[131] = "kfA1 in component A_Model_Module_EGFR (per_um_s)" legend_constants[132] = "kbA1 in component A_Model_Module_EGFR (per_s)" legend_constants[133] = "kfA2 in component A_Model_Module_EGFR (per_s)" legend_constants[134] = "kbA2 in component A_Model_Module_EGFR (per_s)" legend_states[54] = "CaPLCg_star in component F_Model_Module_PLC (um)" legend_states[55] = "PLCg in component F_Model_Module_PLC (um)" legend_states[56] = "PLCg_star in component F_Model_Module_PLC (um)" legend_constants[135] = "kfF1 in component F_Model_Module_PLC (per_um_s)" legend_constants[136] = "kbF1 in component F_Model_Module_PLC (per_s)" legend_constants[137] = "kfF3 in component F_Model_Module_PLC (per_s)" legend_constants[138] = "kfF5 in component F_Model_Module_PLC (per_um_s)" legend_constants[139] = "kbF5 in component F_Model_Module_PLC (per_s)" legend_constants[140] = "kmF4 in component F_Model_Module_PLC (um)" legend_constants[141] = "VmaxF4 in component F_Model_Module_PLC (per_s)" legend_constants[142] = "kmA3 in component F_Model_Module_PLC (um)" legend_constants[143] = "one in component F_Model_Module_PLC (dimensionless)" legend_states[57] = "PKC_i in component KEL_DAGIP3_Model_Modules (um)" legend_states[58] = "DAGPKC in component KEL_DAGIP3_Model_Modules (um)" legend_states[59] = "AADAGPKC in component KEL_DAGIP3_Model_Modules (um)" legend_states[60] = "DAGCaPKC in component KEL_DAGIP3_Model_Modules (um)" legend_states[61] = "CaPKC in component KEL_DAGIP3_Model_Modules (um)" legend_states[62] = "AA in component KEL_DAGIP3_Model_Modules (um)" legend_states[63] = "APC in component KEL_DAGIP3_Model_Modules (um)" legend_states[64] = "PIP2_star in component KEL_DAGIP3_Model_Modules (um)" legend_states[65] = "PLA2_cyt in component KEL_DAGIP3_Model_Modules (um)" legend_states[66] = "PLA2_star in component KEL_DAGIP3_Model_Modules (um)" legend_states[67] = "CaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_states[68] = "PIP2CaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_states[69] = "PIP2PLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_states[70] = "DAGCaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_states[71] = "CaPLA2_star in component KEL_DAGIP3_Model_Modules (um)" legend_states[72] = "PIP2 in component KEL_DAGIP3_Model_Modules (um)" legend_states[73] = "DAG in component KEL_DAGIP3_Model_Modules (um)" legend_states[74] = "IP3 in component KEL_DAGIP3_Model_Modules (um)" legend_states[75] = "Inositol in component KEL_DAGIP3_Model_Modules (um)" legend_states[76] = "PC in component KEL_DAGIP3_Model_Modules (um)" legend_constants[144] = "kfK1 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[145] = "kbK1 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[146] = "kfK2 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[147] = "kbK2 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[148] = "kfK3 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[149] = "kbK3 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[150] = "kfK4 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[151] = "kbK4 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[152] = "kfK5 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[153] = "kbK5 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[154] = "kfK6 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[155] = "kbK6 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[156] = "kfK7 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[157] = "kbK7 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[158] = "kfK8 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[159] = "kbK8 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[160] = "kfK9 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[161] = "kbK9 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[162] = "kfK10 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[163] = "kbK10 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[164] = "kfE1 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[165] = "kbE1 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[166] = "kfE3 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[167] = "kbE3 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[168] = "kfE5 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[169] = "kbE5 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[170] = "kfE7 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[171] = "kbE7 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[172] = "kfE10 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[173] = "kbE10 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[174] = "kfE11 in component KEL_DAGIP3_Model_Modules (per_um_s)" legend_constants[175] = "kbE11 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[176] = "kmE9 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[177] = "VmaxE9 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[178] = "kfE13 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[179] = "kbE13 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[180] = "kmE2 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[181] = "kmE4 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[182] = "kmE6 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[183] = "kmE8 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[184] = "kmE12 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[185] = "VmaxE2 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[186] = "VmaxE4 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[187] = "VmaxE6 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[188] = "VmaxE8 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[189] = "VmaxE12 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[190] = "kmF2 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[191] = "kmF6 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[192] = "VmaxF2 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[193] = "VmaxF6 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[194] = "kfG8 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[195] = "kfG9 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[196] = "kmG6 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[197] = "VmaxG6 in component KEL_DAGIP3_Model_Modules (per_s)" legend_constants[198] = "kmG7 in component KEL_DAGIP3_Model_Modules (um)" legend_constants[199] = "VmaxG7 in component KEL_DAGIP3_Model_Modules (per_s)" legend_rates[12] = "d/dt Ga_GDP in component DGBM_Model_Modules (um)" legend_rates[13] = "d/dt mGluR in component DGBM_Model_Modules (um)" legend_rates[18] = "d/dt Gabg in component DGBM_Model_Modules (um)" legend_rates[19] = "d/dt R in component DGBM_Model_Modules (um)" legend_rates[11] = "d/dt Gbg in component DGBM_Model_Modules (um)" legend_rates[20] = "d/dt Gabg_R in component DGBM_Model_Modules (um)" legend_rates[21] = "d/dt Glu_synapse in component DGBM_Model_Modules (um)" legend_rates[22] = "d/dt Gabg_GluR in component DGBM_Model_Modules (um)" legend_rates[23] = "d/dt Glu in component DGBM_Model_Modules (um)" legend_rates[24] = "d/dt Ga_GTP in component DGBM_Model_Modules (um)" legend_rates[14] = "d/dt PLC in component DGBM_Model_Modules (um)" legend_rates[25] = "d/dt GqPLC in component DGBM_Model_Modules (um)" legend_rates[7] = "d/dt CaPLC in component DGBM_Model_Modules (um)" legend_rates[6] = "d/dt CaGqPLC in component DGBM_Model_Modules (um)" legend_rates[26] = "d/dt GEF_inact in component DGBM_Model_Modules (um)" legend_rates[9] = "d/dt GEF in component DGBM_Model_Modules (um)" legend_rates[4] = "d/dt CaM_GEF in component DGBM_Model_Modules (um)" legend_rates[27] = "d/dt Ca4CAM in component DGBM_Model_Modules (um)" legend_rates[5] = "d/dt Gbg_GEF in component DGBM_Model_Modules (um)" legend_rates[3] = "d/dt GEF_star in component DGBM_Model_Modules (um)" legend_rates[28] = "d/dt CaM in component DGBM_Model_Modules (um)" legend_rates[8] = "d/dt NgCaM in component DGBM_Model_Modules (um)" legend_rates[15] = "d/dt Ca2CaM in component DGBM_Model_Modules (um)" legend_rates[16] = "d/dt Ca3CaM in component DGBM_Model_Modules (um)" legend_rates[17] = "d/dt Ng_star in component DGBM_Model_Modules (um)" legend_rates[10] = "d/dt Ng in component DGBM_Model_Modules (um)" legend_rates[37] = "d/dt GTP_RAS in component B_Model_Modules (um)" legend_rates[38] = "d/dt GDP_RAS in component B_Model_Modules (um)" legend_rates[1] = "d/dt GAP in component B_Model_Modules (um)" legend_rates[39] = "d/dt GAPstar in component B_Model_Modules (um)" legend_rates[35] = "d/dt GTPRasRaf_star in component B_Model_Modules (um)" legend_rates[2] = "d/dt Raf in component B_Model_Modules (um)" legend_rates[34] = "d/dt Raf_star in component B_Model_Modules (um)" legend_rates[36] = "d/dt Raf_star_star in component B_Model_Modules (um)" legend_rates[40] = "d/dt MAPKK in component H_Model_Module_MAPKK (um)" legend_rates[33] = "d/dt MAPKK_star in component H_Model_Module_MAPKK (um)" legend_rates[32] = "d/dt MAPKK_star_star in component H_Model_Module_MAPKK (um)" legend_rates[41] = "d/dt MAPK in component H_Model_Module_MAPK (um)" legend_rates[42] = "d/dt MAPK_tyr in component H_Model_Module_MAPK (um)" legend_rates[30] = "d/dt MAPK_star in component H_Model_Module_MAPK (um)" legend_rates[46] = "d/dt SHCstar in component A_Model_Module_SHC (um)" legend_rates[45] = "d/dt SHC in component A_Model_Module_SHC (um)" legend_rates[29] = "d/dt SHCstar_SOS_GRB2 in component A_Model_Module_SHC (um)" legend_rates[48] = "d/dt SOS_GRB2 in component A_Model_Module_SHC (um)" legend_rates[31] = "d/dt SOS in component A_Model_Module_SHC (um)" legend_rates[50] = "d/dt SOSstar in component A_Model_Module_SHC (um)" legend_rates[47] = "d/dt SOSstar_GRB2 in component A_Model_Module_SHC (um)" legend_rates[49] = "d/dt GRB2 in component A_Model_Module_SHC (um)" legend_rates[52] = "d/dt EGF in component A_Model_Module_EGFR (um)" legend_rates[53] = "d/dt EGFR in component A_Model_Module_EGFR (um)" legend_rates[43] = "d/dt EGF_EGFR in component A_Model_Module_EGFR (um)" legend_rates[51] = "d/dt EGF_EGFR_INTERNAL in component A_Model_Module_EGFR (um)" legend_rates[55] = "d/dt PLCg in component F_Model_Module_PLC (um)" legend_rates[44] = "d/dt CaPLCg in component F_Model_Module_PLC (um)" legend_rates[54] = "d/dt CaPLCg_star in component F_Model_Module_PLC (um)" legend_rates[56] = "d/dt PLCg_star in component F_Model_Module_PLC (um)" legend_rates[57] = "d/dt PKC_i in component KEL_DAGIP3_Model_Modules (um)" legend_rates[58] = "d/dt DAGPKC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[59] = "d/dt AADAGPKC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[61] = "d/dt CaPKC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[60] = "d/dt DAGCaPKC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[0] = "d/dt PKC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[62] = "d/dt AA in component KEL_DAGIP3_Model_Modules (um)" legend_rates[65] = "d/dt PLA2_cyt in component KEL_DAGIP3_Model_Modules (um)" legend_rates[69] = "d/dt PIP2PLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[64] = "d/dt PIP2_star in component KEL_DAGIP3_Model_Modules (um)" legend_rates[66] = "d/dt PLA2_star in component KEL_DAGIP3_Model_Modules (um)" legend_rates[71] = "d/dt CaPLA2_star in component KEL_DAGIP3_Model_Modules (um)" legend_rates[67] = "d/dt CaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[68] = "d/dt PIP2CaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[70] = "d/dt DAGCaPLA2 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[63] = "d/dt APC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[72] = "d/dt PIP2 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[73] = "d/dt DAG in component KEL_DAGIP3_Model_Modules (um)" legend_rates[74] = "d/dt IP3 in component KEL_DAGIP3_Model_Modules (um)" legend_rates[76] = "d/dt PC in component KEL_DAGIP3_Model_Modules (um)" legend_rates[75] = "d/dt Inositol in component KEL_DAGIP3_Model_Modules (um)" return (legend_states, legend_algebraic, legend_voi, legend_constants) def initConsts(): constants = [0.0] * sizeConstants; states = [0.0] * sizeStates; constants[0] = 1 constants[1] = 0.5 constants[2] = 0.1 states[0] = 0 states[1] = 0.002 states[2] = 0.2 states[3] = 0 states[4] = 0 states[5] = 0 states[6] = 0 states[7] = 0 states[8] = 0 states[9] = 0 states[10] = 10 states[11] = 0.1 states[12] = 1 states[13] = 0.3 states[14] = 0.8 states[15] = 0 states[16] = 0 states[17] = 0 states[18] = 0 states[19] = 0 states[20] = 0 states[21] = 0 states[22] = 0 states[23] = 0 states[24] = 0 states[25] = 0 states[26] = 0.1 states[27] = 0 states[28] = 20 constants[3] = 1 constants[4] = 500 constants[5] = 1000 constants[6] = 0.000028 constants[7] = 0.1 constants[8] = 0.000028 constants[9] = 10 constants[10] = 0.000001 constants[11] = 1 constants[12] = 0.00000001 constants[13] = 0.0001 constants[14] = 0.01 constants[15] = 0.0133 constants[16] = 0.00001 constants[17] = 0.0001 constants[18] = 0.000005 constants[19] = 1 constants[20] = 0.0000042 constants[21] = 1 constants[22] = 0.00005 constants[23] = 1 constants[24] = 0.0000042 constants[25] = 1 constants[26] = 0.0133 constants[27] = 1 constants[28] = 0 constants[29] = 3.333333333333 constants[30] = 0.0001 constants[31] = 1 constants[32] = 1 constants[33] = 0 constants[34] = 0.00001 constants[35] = 1 constants[36] = 7.5 constants[37] = 9 constants[38] = 3.33333333333 constants[39] = 4 constants[40] = 0.0000000002 constants[41] = 72 constants[42] = 0.000006 constants[43] = 10 constants[44] = 0.000000775 constants[45] = 10 constants[46] = 0.0000005 constants[47] = 1 constants[48] = 0.005 constants[49] = 10.012 constants[50] = 0.67 constants[51] = 28.626667 constants[52] = 0.58 constants[53] = 28.595 constants[54] = 0.35 constants[55] = 66.666666667 states[29] = 0 states[30] = 0 states[31] = 0.1 states[32] = 0 states[33] = 0 states[34] = 0 states[35] = 0 states[36] = 0 states[37] = 0 states[38] = 0.2 states[39] = 0 constants[56] = 0.224 constants[57] = 1 constants[58] = 0.0001 constants[59] = 0 constants[60] = 0.50505 constants[61] = 0.02 constants[62] = 0.50505 constants[63] = 0.02 constants[64] = 0.50505 constants[65] = 0.02 constants[66] = 1.0104 constants[67] = 10 constants[68] = 0.1 constants[69] = 0 constants[70] = 3.33333333333 constants[71] = 4 constants[72] = 0.50505 constants[73] = 0.02 constants[74] = 0.00004 constants[75] = 0.5 constants[76] = 66.666666667 constants[77] = 25.64166667 constants[78] = 15.6565 constants[79] = 15.6565 constants[80] = 4 constants[81] = 10 constants[82] = 6 constants[83] = 6 constants[84] = 28.595 constants[85] = 3.33333333333 constants[86] = 28.626667 constants[87] = 2.564166667 constants[88] = 15.6565 constants[89] = 15.6565 states[40] = 0.18 constants[90] = 0.224 constants[91] = 1 constants[92] = 0.159091667 constants[93] = 0.159091667 constants[94] = 15.6565 constants[95] = 15.6565 constants[96] = 0.105 constants[97] = 0.105 constants[98] = 6 constants[99] = 6 constants[100] = 15.6565 constants[101] = 15.6565 states[41] = 0.36 states[42] = 0 constants[102] = 0.032 constants[103] = 1 constants[104] = 0.046296667 constants[105] = 0.046296667 constants[106] = 0.066666667 constants[107] = 0.066666667 constants[108] = 0.15 constants[109] = 0.15 constants[110] = 1 constants[111] = 1 states[43] = 0 states[44] = 0 states[45] = 0.5 states[46] = 0 states[47] = 0 states[48] = 0 states[49] = 1 states[50] = 0 constants[112] = 1 constants[113] = 0.83333333333 constants[114] = 0.0016667 constants[115] = 0 constants[116] = 0.000000041667 constants[117] = 0.0168 constants[118] = 0.0000008333 constants[119] = 0.1 constants[120] = 0.001 constants[121] = 0 constants[122] = 0.000000041667 constants[123] = 0.0168 constants[124] = 0.40404 constants[125] = 2.564166667 constants[126] = 0.02 constants[127] = 0.2 constants[128] = 10 constants[129] = 25.64166667 constants[130] = 0.33333333333 states[51] = 0 states[52] = 166.67 states[53] = 0.16667 constants[131] = 0.000007 constants[132] = 0.25 constants[133] = 0.002 constants[134] = 0.00033 states[54] = 0 states[55] = 0.82 states[56] = 0 constants[135] = 0.0003 constants[136] = 10 constants[137] = 0.05 constants[138] = 0.00002 constants[139] = 10 constants[140] = 0.33333333333 constants[141] = 0.2 constants[142] = 0.83333333333 constants[143] = 1 states[57] = 1 states[58] = 0 states[59] = 0 states[60] = 0 states[61] = 0 states[62] = 0 states[63] = 30 states[64] = 2.5 states[65] = 0.4 states[66] = 0 states[67] = 0 states[68] = 0 states[69] = 0 states[70] = 0 states[71] = 0 states[72] = 10 states[73] = 0 states[74] = 0 states[75] = 0 states[76] = 0 constants[144] = 1 constants[145] = 50 constants[146] = 0.0000000002 constants[147] = 0.1 constants[148] = 1.2705 constants[149] = 3.5026 constants[150] = 0.000000002 constants[151] = 0.1 constants[152] = 1 constants[153] = 0.1 constants[154] = 2 constants[155] = 0.2 constants[156] = 0.000001 constants[157] = 0.5 constants[158] = 0.000000013333 constants[159] = 8.6348 constants[160] = 0.000000001 constants[161] = 0.1 constants[162] = 0.00000003 constants[163] = 2 constants[164] = 0.000000002 constants[165] = 0.5 constants[166] = 0.00000016667 constants[167] = 0.1 constants[168] = 0.00000002 constants[169] = 0.1 constants[170] = 0.000000005 constants[171] = 4 constants[172] = 0.17 constants[173] = 0 constants[174] = 0.00001 constants[175] = 0.1 constants[176] = 25.64166667 constants[177] = 20 constants[178] = 0.4 constants[179] = 0 constants[180] = 20 constants[181] = 20 constants[182] = 20 constants[183] = 20 constants[184] = 20 constants[185] = 11.04 constants[186] = 5.4 constants[187] = 36 constants[188] = 60 constants[189] = 120 constants[190] = 97 constants[191] = 19.79166667 constants[192] = 14 constants[193] = 57 constants[194] = 0.15 constants[195] = 2.5 constants[196] = 5 constants[197] = 48 constants[198] = 19.84166667 constants[199] = 10 return (states, constants) def computeRates(voi, states, constants): rates = [0.0] * sizeStates; algebraic = [0.0] * sizeAlgebraic rates[12] = (states[24]*constants[15]-states[12]*constants[16]*states[11])+states[6]*constants[26] rates[13] = ((constants[12]*states[22]-constants[13]*states[18]*states[13])-(constants[8]*states[13]-constants[9]*states[23]*states[19]))+constants[14]*states[22] rates[18] = (((states[12]*states[11]*constants[16]-(states[18]*states[19]*constants[10]-states[20]*constants[11]))+constants[12]*states[22])-constants[13]*states[18]*states[13])-constants[17]*states[18]*constants[1] rates[19] = (constants[8]*states[13]-constants[9]*states[23]*states[19])-(states[18]*states[19]*constants[10]-states[20]*constants[11]) rates[11] = (-states[12]*states[11]*constants[16]+constants[14]*states[22]+constants[17]*states[18]*constants[1])-(constants[34]*states[9]*states[11]-constants[35]*states[5]) rates[20] = ((states[18]*states[19]*constants[10]-states[20]*constants[11])+constants[6]*states[22])-states[20]*states[23]*constants[7] rates[21] = -(constants[4]*states[21]-constants[5]*states[23]) rates[22] = (-(constants[6]*states[22]-states[20]*states[23]*constants[7])-(constants[12]*states[22]-constants[13]*states[18]*states[13]))-constants[14]*states[22] rates[23] = ((((constants[4]*states[21]-constants[5]*states[23])+constants[6]*states[22])-states[20]*states[23]*constants[7])+constants[8]*states[13])-constants[9]*states[23]*states[19] rates[24] = ((constants[17]*states[18]*constants[1]-states[24]*constants[15])-(states[14]*states[24]*constants[20]-states[25]*constants[21]))-(states[6]*constants[25]+states[7]*states[24]*constants[24]) rates[14] = -(states[14]*constants[0]*constants[18]-states[7]*constants[19])-(states[14]*states[24]*constants[20]-states[25]*constants[21]) rates[25] = (states[14]*states[24]*constants[20]-states[25]*constants[21])-(constants[0]*states[25]*constants[22]-states[6]*constants[23]) rates[7] = ((states[14]*constants[0]*constants[18]-states[7]*constants[19])+states[6]*constants[26])-(-states[6]*constants[25]+states[7]*states[24]*constants[24]) rates[6] = (((states[25]*constants[0]*constants[22]-states[6]*constants[23])+states[7]*states[24]*constants[24])-states[6]*constants[25])-states[6]*constants[26] rates[26] = (constants[2]*constants[37]*states[9])/(constants[36]+states[9])-constants[27]*states[26] rates[9] = (((-((((constants[2]*constants[37]*states[9])/(constants[36]+states[9])+(states[0]*constants[39]*states[9])/(constants[38]*(constants[3]+states[1]/constants[29]+states[10]/constants[51]+states[2]/constants[55]+states[8]/constants[53])+states[9]))-constants[27]*states[26])-constants[32]*states[3])-constants[30]*states[27]*states[9])+constants[31]*states[4])-constants[34]*states[9]*states[11])+constants[35]*states[5] rates[4] = -constants[31]*states[4]+constants[30]*states[9]*states[27] rates[27] = (-(-constants[31]*states[4]+constants[30]*states[9]*states[27])+constants[0]*states[16]*constants[44])-constants[45]*states[27] rates[5] = -(-constants[34]*states[9]*states[11]+constants[35]*states[5]) rates[3] = (states[0]*constants[39]*states[9])/(constants[38]*(constants[3]+states[1]/constants[29]+states[10]/constants[51]+states[2]/constants[55]+states[8]/constants[53])+states[9])-constants[32]*states[3] rates[28] = (-(constants[40]*constants[0]*constants[0]*states[28]-constants[41]*states[15])-(constants[46]*states[10]*states[28]-constants[47]*states[8]))+(states[8]*states[0]*constants[54])/(states[8]+constants[53]) rates[8] = (constants[46]*states[10]*states[28]-constants[47]*states[8])-(states[8]*states[0]*constants[54])/(states[8]+constants[53]*(constants[3]+states[1]/constants[29]+states[9]/constants[38]+states[2]/constants[55]+states[10]/constants[51])) rates[15] = (constants[40]*constants[0]*constants[0]*states[28]-constants[41]*states[15])-(constants[0]*states[15]*constants[42]-constants[43]*states[16]) rates[16] = (constants[0]*states[15]*constants[42]-constants[43]*states[16])-(constants[0]*states[16]*constants[44]-constants[45]*states[27]) rates[17] = (((states[8]*states[0]*constants[54])/(states[8]+constants[53]*(constants[3]+states[1]/constants[29]+states[9]/constants[38]+states[2]/constants[55]+states[10]/constants[51]))-constants[48]*states[17])-(constants[50]*states[17])/(states[17]+constants[49]))+(states[10]*states[0]*constants[52])/(states[10]+constants[51]*(constants[3]+states[1]/constants[29]+states[9]/constants[38]+states[2]/constants[55]+states[8]/constants[53])) rates[10] = (constants[48]*states[17]+(constants[50]*states[17])/(states[17]+constants[49]))-(states[10]*states[0]*constants[52])/(states[10]+constants[51]*(constants[3]+states[1]/constants[29]+states[9]/constants[38]+states[2]/constants[55]+states[8]/constants[53])) rates[37] = ((((-states[1]*constants[67]*states[37])/(constants[66]+states[37])-constants[58]*states[37])+(states[3]*constants[63]*states[38])/(constants[62]+states[38])+(states[5]*constants[65]*states[38])/(constants[64]+states[38])+(states[4]*constants[61]*states[38])/(constants[60]+states[38])+(states[29]*constants[73]*states[38])/(constants[72]+states[38]))-states[37]*states[34]*constants[74])+states[35]*constants[75] rates[38] = -(((-states[1]*constants[67]*states[37])/(constants[66]+states[37])-constants[58]*states[37])+(states[3]*constants[63]*states[38])/(constants[62]+states[38])+(states[5]*constants[65]*states[38])/(constants[64]+states[38])+(states[4]*constants[61]*states[38])/(constants[60]+states[38]))-(states[29]*constants[73]*states[38])/(constants[72]+states[38]) rates[1] = (-states[0]*constants[71]*states[1])/(constants[70]*(constants[57]+states[2]/constants[76]+states[9]/constants[85]+states[10]/constants[86]+states[8]/constants[84])+states[1])+constants[68]*states[39] rates[39] = (states[0]*constants[71]*states[1])/(constants[70]*(constants[57]+states[2]/constants[76]+states[9]/constants[85]+states[10]/constants[86]+states[8]/constants[84])+states[1])-constants[68]*states[39] rates[35] = states[37]*states[34]*constants[74]-states[35]*constants[75] rates[2] = (-states[0]*states[2]*constants[80])/(constants[76]*(constants[57]+states[1]/constants[70]+states[9]/constants[85]+states[10]/constants[86]+states[8]/constants[84])+states[2])+(states[34]*constants[56]*constants[82])/(constants[78]*(constants[57]+states[36]/constants[79]+states[32]/constants[89]+states[33]/constants[88])+states[34]) rates[34] = (((states[0]*states[2]*constants[80])/(constants[76]*(constants[57]+states[1]/constants[70]+states[9]/constants[85]+states[10]/constants[86]+states[8]/constants[84])+states[2])-(states[34]*constants[56]*constants[82])/(constants[78]*(constants[57]+states[36]/constants[79]+states[32]/constants[89]+states[33]/constants[88])+states[34]))-(states[34]*states[30]*constants[81])/(constants[77]*(constants[57]+states[31]/constants[87])+states[34]))+(states[36]*constants[56]*constants[83])/(constants[79]*(constants[57]+states[34]/constants[78]+states[32]/constants[89]+states[33]/constants[88])+states[36]) rates[36] = (states[34]*states[30]*constants[81])/(constants[77]*(constants[57]+states[31]/constants[87])+states[34])-(states[36]*constants[56]*constants[83])/(constants[79]*(constants[57]+states[34]/constants[78]+states[32]/constants[89]+states[33]/constants[88])+states[36]) rates[40] = (-states[40]*constants[96]*states[35])/(constants[92]*(constants[91]+states[33]/constants[93])+states[40])+(states[33]*constants[98]*constants[90])/(constants[94]*(constants[91]+states[34]/constants[100]+states[36]/constants[101]+states[32]/constants[95])+states[33]) rates[33] = (((states[40]*constants[96]*states[35])/(constants[92]*(constants[91]+states[33]/constants[93])+states[40])-(states[33]*constants[98]*constants[90])/(constants[94]*(constants[91]+states[34]/constants[100]+states[36]/constants[101]+states[32]/constants[95])+states[33]))-(states[33]*constants[97]*states[35])/(constants[93]*(constants[91]+states[40]/constants[92])+states[33]))+(states[32]*constants[99]*constants[90])/(constants[95]*(constants[91]+states[34]/constants[100]+states[36]/constants[101]+states[33]/constants[94])+states[32]) rates[32] = (states[33]*constants[97]*states[35])/(constants[93]*(constants[91]+states[40]/constants[92])+states[33])-(states[32]*constants[99]*constants[90])/(constants[95]*(constants[91]+states[34]/constants[100]+states[36]/constants[101]+states[33]/constants[94])+states[32]) rates[41] = (-states[41]*constants[108]*states[32])/(constants[104]*(constants[103]+states[42]/constants[105])+states[41])+(states[42]*constants[110]*constants[102])/(constants[106]*(constants[103]+states[30]/constants[107])+states[42]) rates[42] = (((states[41]*constants[108]*states[32])/((constants[104]*states[42])/constants[105]+states[41])-(states[42]*constants[110]*constants[102])/(constants[106]*(constants[103]+states[30]/constants[107])+states[42]))-(states[42]*constants[109]*states[32])/(constants[105]*(constants[103]+states[42]/constants[106])+states[42]))+(states[30]*constants[111]*constants[102])/(constants[107]*(constants[103]+states[42]/constants[106])+states[30]) rates[30] = (states[42]*constants[109]*states[32])/(constants[105]*(constants[103]+states[41]/constants[104])+states[42])-(states[30]*constants[111]*constants[102])/(constants[107]*(constants[103]+states[42]/constants[106])+states[30]) rates[46] = (((states[43]*constants[127]*states[45])/(constants[113]*(constants[112]+states[44]/constants[130])+states[45])-constants[118]*states[46]*states[48])+constants[119]*states[29])-constants[114]*states[46] rates[45] = (constants[114]*states[46]-constants[115]*states[45])-(states[43]*constants[127]*states[45])/(constants[113]*(constants[112]+states[44]/constants[130])+states[45]) rates[29] = constants[118]*states[46]*states[48]-constants[119]*states[29] rates[48] = ((-constants[118]*states[46]*states[48]+constants[119]*states[29])-constants[117]*states[48])+constants[116]*states[31]*states[49] rates[31] = (((constants[120]*states[50]-constants[121]*states[31])-(states[30]*constants[128]*states[31])/(constants[125]*(constants[112]+states[34]/constants[129])+states[31]))+constants[117]*states[48])-constants[116]*states[31]*states[49] rates[50] = ((-constants[120]*states[50]+constants[121]*states[31]+(states[30]*constants[128]*states[31])/(constants[125]*(constants[112]+states[34]/constants[129])+states[31]))-constants[122]*states[50]*states[49])+constants[123]*states[47] rates[47] = constants[122]*states[50]*states[49]-constants[123]*states[47] rates[49] = ((constants[117]*states[48]-constants[116]*states[31]*states[49])-constants[122]*states[50]*states[49])+constants[123]*states[47] rates[52] = -constants[131]*states[52]*states[53]+constants[132]*states[43] rates[53] = -constants[131]*states[52]*states[53]+constants[132]*states[43] rates[43] = ((constants[131]*states[52]*states[53]-constants[132]*states[43])-constants[133]*states[43])+constants[134]*states[51] rates[51] = constants[133]*states[43]-constants[134]*states[51] rates[55] = -constants[0]*states[55]*constants[135]+states[44]*constants[136] rates[44] = (-(-constants[0]*states[55]*constants[135]+states[44]*constants[136])+constants[137]*states[54])-(constants[141]*states[43]*states[44])/(constants[140]*(constants[143]+states[45]/constants[142])+states[44]) rates[54] = (-(constants[137]*states[54]-(constants[141]*states[43]*states[44])/(constants[140]+states[44]))+constants[0]*states[56]*constants[138])-constants[139]*states[54] rates[56] = -constants[0]*states[56]*constants[138]+constants[139]*states[54] rates[57] = ((((((-states[57]*constants[144]+states[0]*constants[145])-states[57]*states[62]*constants[146])+states[0]*constants[147])-states[57]*states[73]*constants[160])+states[58]*constants[161])-states[57]*constants[0]*constants[156])+states[61]*constants[157] rates[58] = ((states[57]*states[73]*constants[160]-states[58]*constants[161])-states[58]*states[62]*constants[162])+states[59]*constants[163] rates[59] = ((states[58]*states[62]*constants[162]-states[59]*constants[163])-states[59]*constants[154])+states[0]*constants[155] rates[61] = ((((((states[57]*constants[0]*constants[156]-states[61]*constants[157])-states[61]*constants[148])+states[0]*constants[149])-states[61]*states[62]*constants[150])+states[0]*constants[151])-states[73]*states[61]*constants[158])+states[60]*constants[159] rates[60] = ((states[73]*states[61]*constants[158]-states[60]*constants[159])-states[60]*constants[152])+states[0]*constants[153] rates[0] = ((((((((((states[57]*constants[144]-states[0]*constants[145])+states[57]*states[62]*constants[146])-states[0]*constants[147])+states[61]*constants[148])-states[0]*constants[149])+states[61]*states[62]*constants[150])-states[0]*constants[151])+states[60]*constants[152])-states[0]*constants[153])+states[59]*constants[154])-states[0]*constants[155] rates[62] = ((((((-states[57]*states[62]*constants[146]+states[0]*constants[147])-states[61]*states[62]*constants[150])+states[0]*constants[151])-states[58]*states[62]*constants[162])+states[59]*constants[163])-states[62]*constants[178])+(states[71]*constants[189]*states[63])/(constants[184]+states[63])+(states[67]*constants[186]*states[63])/(constants[181]+states[63])+(states[70]*constants[188]*states[63])/(constants[183]+states[63])+(states[68]*constants[187]*states[63])/(constants[182]+states[63])+(states[69]*constants[185]*states[63])/(constants[180]+states[63]) rates[65] = ((((states[66]*constants[172]-states[64]*states[65]*constants[164])+states[69]*constants[165])-constants[0]*states[65]*constants[166])+states[67]*constants[167])-(states[41]*constants[177]*states[65])/(constants[176]+states[65]) rates[69] = states[64]*states[65]*constants[164]-states[69]*constants[165] rates[64] = ((-states[64]*states[65]*constants[164]+states[69]*constants[165])-states[64]*states[67]*constants[168])+states[68]*constants[169] rates[66] = ((-states[66]*constants[172]+(states[41]*constants[177]*states[65])/(constants[176]+states[65]))-constants[0]*states[66]*constants[174])+states[71]*constants[175] rates[71] = constants[0]*states[66]*constants[174]-states[71]*constants[175] rates[67] = ((((constants[0]*states[65]*constants[166]-states[67]*constants[167])-states[73]*states[67]*constants[170])+states[70]*constants[171])-states[64]*states[67]*constants[168])+states[68]*constants[169] rates[68] = states[64]*states[67]*constants[168]-states[68]*constants[169] rates[70] = states[73]*states[67]*constants[170]-states[70]*constants[171] rates[63] = states[62]*constants[178]-((states[71]*constants[189]*states[63])/(constants[184]+states[63])+(states[67]*constants[186]*states[63])/(constants[181]+states[63])+(states[70]*constants[188]*states[63])/(constants[183]+states[63])+(states[68]*constants[187]*states[63])/(constants[182]+states[63])+(states[69]*constants[185]*states[63])/(constants[180]+states[63])) rates[72] = (((-states[44]*constants[192]*states[72])/(constants[190]+states[72])-(states[54]*constants[193]*states[72])/(constants[191]+states[72]))-(states[7]*constants[199]*states[72])/(constants[198]+states[72]))-(states[6]*constants[197]*states[72])/(constants[196]+states[72]) rates[73] = (((((((((states[44]*constants[192]*states[72])/(constants[190]+states[72])+(states[54]*constants[193]*states[72])/(constants[191]+states[72])+(states[7]*constants[199]*states[72])/(constants[198]+states[72]))-constants[194]*states[73])+(states[6]*constants[197]*states[72])/(constants[196]+states[72]))-states[57]*states[73]*constants[160])+states[58]*constants[161])-states[73]*states[61]*constants[158])+states[60]*constants[159])-states[73]*states[67]*constants[170])+states[70]*constants[171] rates[74] = (((states[44]*constants[192]*states[72])/(constants[190]+states[72])+(states[54]*constants[193]*states[72])/(constants[191]+states[72])+(states[6]*constants[197]*states[72])/(constants[196]+states[72]))-constants[195]*states[74])+(states[7]*constants[199]*states[72])/(constants[198]+states[72]) rates[76] = constants[194]*states[73] rates[75] = constants[195]*states[74] return(rates) def computeAlgebraic(constants, states, voi): algebraic = array([[0.0] * len(voi)] * sizeAlgebraic) states = array(states) voi = array(voi) return algebraic def solve_model(): """Solve model with ODE solver""" from scipy.integrate import ode # Initialise constants and state variables (init_states, constants) = initConsts() # Set timespan to solve over voi = linspace(0, 10, 500) # Construct ODE object to solve r = ode(computeRates) r.set_integrator('vode', method='bdf', atol=1e-06, rtol=1e-06, max_step=1) r.set_initial_value(init_states, voi[0]) r.set_f_params(constants) # Solve model states = array([[0.0] * len(voi)] * sizeStates) states[:,0] = init_states for (i,t) in enumerate(voi[1:]): if r.successful(): r.integrate(t) states[:,i+1] = r.y else: break # Compute algebraic variables algebraic = computeAlgebraic(constants, states, voi) return (voi, states, algebraic) def plot_model(voi, states, algebraic): """Plot variables against variable of integration""" import pylab (legend_states, legend_algebraic, legend_voi, legend_constants) = createLegends() pylab.figure(1) pylab.plot(voi,vstack((states,algebraic)).T) pylab.xlabel(legend_voi) pylab.legend(legend_states + legend_algebraic, loc='best') pylab.show() if __name__ == "__main__": (voi, states, algebraic) = solve_model() plot_model(voi, states, algebraic)