"Q pump muss größer gleich sein als alle nachfolgenden durchflüsse"
"Q pump löst sich auf wenn die nachfolgenden Durchflüsse klar sind mit $-l \\sum_{i \\in \\mathrm{S}} Q^2_i = \\alpha_1 Q^2 + \\alpha_2 Q n + \\alpha_3 n^2$"
" return pump>=sum(modell.Q_valve[node] for node in graph.successors(pump) if node in modell.valves)+sum(modell.Q_pump[n] for n in graph.successors(node) if node in modell.pumps)\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\core\\base\\PyomoModel.py:734\u001b[0m, in \u001b[0;36mModel.create_instance\u001b[1;34m(self, filename, data, name, namespace, namespaces, profile_memory, report_timing, **kwds)\u001b[0m\n\u001b[0;32m 731\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m _namespaces:\n\u001b[0;32m 732\u001b[0m _namespaces\u001b[38;5;241m.\u001b[39mappend(\u001b[38;5;28;01mNone\u001b[39;00m)\n\u001b[1;32m--> 734\u001b[0m \u001b[43minstance\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnamespaces\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m_namespaces\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprofile_memory\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprofile_memory\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 736\u001b[0m \u001b[38;5;66;03m#\u001b[39;00m\n\u001b[0;32m 737\u001b[0m \u001b[38;5;66;03m# Indicate that the model is concrete/constructed\u001b[39;00m\n\u001b[0;32m 738\u001b[0m \u001b[38;5;66;03m#\u001b[39;00m\n\u001b[0;32m 739\u001b[0m instance\u001b[38;5;241m.\u001b[39m_constructed \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\core\\base\\PyomoModel.py:771\u001b[0m, in \u001b[0;36mModel.load\u001b[1;34m(self, arg, namespaces, profile_memory)\u001b[0m\n\u001b[0;32m 769\u001b[0m msg \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCannot load model model data from with object of type \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 770\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(msg \u001b[38;5;241m%\u001b[39m \u001b[38;5;28mstr\u001b[39m(\u001b[38;5;28mtype\u001b[39m(arg)))\n\u001b[1;32m--> 771\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_load_model_data\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdp\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnamespaces\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprofile_memory\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mprofile_memory\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\core\\base\\PyomoModel.py:823\u001b[0m, in \u001b[0;36mModel._load_model_data\u001b[1;34m(self, modeldata, namespaces, **kwds)\u001b[0m\n\u001b[0;32m 820\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m component\u001b[38;5;241m.\u001b[39mctype \u001b[38;5;129;01mis\u001b[39;00m Model:\n\u001b[0;32m 821\u001b[0m \u001b[38;5;28;01mcontinue\u001b[39;00m\n\u001b[1;32m--> 823\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_initialize_component\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 824\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodeldata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnamespaces\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcomponent_name\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprofile_memory\u001b[49m\n\u001b[0;32m 825\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 827\u001b[0m \u001b[38;5;66;03m# Note: As is, connectors are expanded when using command-line pyomo but not calling model.create(...) in a Python script.\u001b[39;00m\n\u001b[0;32m 828\u001b[0m \u001b[38;5;66;03m# John says this has to do with extension points which are called from commandline but not when writing scripts.\u001b[39;00m\n\u001b[0;32m 829\u001b[0m \u001b[38;5;66;03m# Uncommenting the next two lines switches this (command-line fails because it tries to expand connectors twice)\u001b[39;00m\n\u001b[0;32m 830\u001b[0m \u001b[38;5;66;03m# connector_expander = ConnectorExpander()\u001b[39;00m\n\u001b[0;32m 831\u001b[0m \u001b[38;5;66;03m# connector_expander.apply(instance=self)\u001b[39;00m\n\u001b[0;32m 833\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m profile_memory \u001b[38;5;241m>\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m2\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m pympler_available:\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\core\\base\\objective.py:335\u001b[0m, in \u001b[0;36mObjective.construct\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m 333\u001b[0m \u001b[38;5;66;03m# Bypass the index validation and create the member directly\u001b[39;00m\n\u001b[0;32m 334\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m index \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mindex_set():\n\u001b[1;32m--> 335\u001b[0m ans \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_setitem_when_not_present(index, \u001b[43mrule\u001b[49m\u001b[43m(\u001b[49m\u001b[43mblock\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mindex\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[0;32m 336\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ans \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 337\u001b[0m ans\u001b[38;5;241m.\u001b[39mset_sense(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_init_sense(block, index))\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\solvers\\plugins\\solvers\\SCIPAMPL.py:222\u001b[0m, in \u001b[0;36mSCIPAMPL._postsolve\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 216\u001b[0m version \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_known_versions[executable]\n\u001b[0;32m 218\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m version \u001b[38;5;241m<\u001b[39m (\u001b[38;5;241m8\u001b[39m, \u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m0\u001b[39m):\n\u001b[0;32m 219\u001b[0m \u001b[38;5;66;03m# it may be possible to get results from older version but this was\u001b[39;00m\n\u001b[0;32m 220\u001b[0m \u001b[38;5;66;03m# not tested, so the old way of doing things is here preserved\u001b[39;00m\n\u001b[1;32m--> 222\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mSCIPAMPL\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_postsolve\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 224\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 225\u001b[0m \u001b[38;5;66;03m# repeat code from super(SCIPAMPL, self)._postsolve()\u001b[39;00m\n\u001b[0;32m 226\u001b[0m \u001b[38;5;66;03m# in order to access the log file and get the results from there\u001b[39;00m\n\u001b[0;32m 228\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_log_file \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
"File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python312\\site-packages\\pyomo\\opt\\solver\\shellcmd.py:290\u001b[0m, in \u001b[0;36mSystemCallSolver._postsolve\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 287\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 289\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_results_format \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 290\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mprocess_output\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_rc\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 291\u001b[0m \u001b[38;5;66;03m#\u001b[39;00m\n\u001b[0;32m 292\u001b[0m \u001b[38;5;66;03m# If keepfiles is true, then we pop the\u001b[39;00m\n\u001b[0;32m 293\u001b[0m \u001b[38;5;66;03m# TempfileManager context while telling it to\u001b[39;00m\n\u001b[0;32m 294\u001b[0m \u001b[38;5;66;03m# _not_ remove the files.\u001b[39;00m\n\u001b[0;32m 295\u001b[0m \u001b[38;5;66;03m#\u001b[39;00m\n\u001b[0;32m 296\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_keepfiles:\n\u001b[0;32m 297\u001b[0m \u001b[38;5;66;03m# in some cases, the solution filename is\u001b[39;00m\n\u001b[0;32m 298\u001b[0m \u001b[38;5;66;03m# not generated via the temp-file mechanism,\u001b[39;00m\n\u001b[0;32m 299\u001b[0m \u001b[38;5;66;03m# instead being automatically derived from\u001b[39;00m\n\u001b[0;32m 300\u001b[0m \u001b[38;5;66;03m# the input lp/nl filename. so, we may have\u001b[39;00m\n\u001b[0;32m 301\u001b[0m \u001b[38;5;66;03m# to clean it up manually.\u001b[39;00m\n",
"\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'C:\\\\Users\\\\STEINM~1\\\\AppData\\\\Local\\\\Temp\\\\tmp1r989oiw.pyomo.sol'"
31 return pump>=sum(modell.Q_valve[node] for node in graph.successors(pump) if node in modell.valves)+sum(modell.Q_pump[n] for n in graph.successors(node) if node in modell.pumps)
File ~\AppData\Roaming\Python\Python312\site-packages\pyomo\core\base\var.py:999, in IndexedVar.__getitem__(self, args)
997 def __getitem__(self, args) -> VarData:
998 try:
--> 999 return super().__getitem__(args)
1000 except RuntimeError:
1001 tmp = args if args.__class__ is tuple else (args,)
File ~\AppData\Roaming\Python\Python312\site-packages\pyomo\core\base\indexed_component.py:648, in IndexedComponent.__getitem__(self, index)