{ "cells": [ { "cell_type": "code", "execution_count": 39, "id": "6b0b44f6-bcbf-4092-9201-d1049430e165", "metadata": { "tags": [] }, "outputs": [], "source": [ "sample = \"\"\"\\\n", "Valve AA has flow rate=0; tunnels lead to valves DD, II, BB\n", "Valve BB has flow rate=13; tunnels lead to valves CC, AA\n", "Valve CC has flow rate=2; tunnels lead to valves DD, BB\n", "Valve DD has flow rate=20; tunnels lead to valves CC, AA, EE\n", "Valve EE has flow rate=3; tunnels lead to valves FF, DD\n", "Valve FF has flow rate=0; tunnels lead to valves EE, GG\n", "Valve GG has flow rate=0; tunnels lead to valves FF, HH\n", "Valve HH has flow rate=22; tunnel leads to valve GG\n", "Valve II has flow rate=0; tunnels lead to valves AA, JJ\n", "Valve JJ has flow rate=21; tunnel leads to valve II\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 40, "id": "3c34673d-f03a-43ee-89b7-0ee8e953c827", "metadata": { "tags": [] }, "outputs": [], "source": [ "import re\n", "pat = re.compile('Valve ([A-Z]{2}) has flow rate=([0-9]+); tunnels? leads? to valves? ([ ,A-Z]+)')\n", "P = dict()\n", "for i,l in enumerate(sample.splitlines()):\n", " g = pat.search(l)\n", " P[g[1]] = (i, int(g[2]), g[3].split(\", \"))\n" ] }, { "cell_type": "code", "execution_count": 42, "id": "8c46fa33-d751-444a-9a41-1bb2145df583", "metadata": { "tags": [] }, "outputs": [], "source": [ "import networkx as nx\n", "G = nx.DiGraph()\n", "for (k,(i,o,V)) in P.items():\n", " for v in V:\n", " G.add_edge(k,v) #,label=str(i))" ] }, { "cell_type": "code", "execution_count": 43, "id": "82fdac2e-de6d-44bf-b117-a00addbd8d49", "metadata": { "tags": [] }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAA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oJXSFEPYG68CNQSOgKIc4SiAs/AoWErhDinAJt4UcgkC/ShBDCiyR0hRDCiyR0hRDCiyR0hRDCiyR0hRDCiyR0hRDCiyR0hRDCiyR0hRDCixpt7agoSjFw0HvlCCHEJeFyp9MZ09CJRkNXCCGEe8nwghBCeJGErhBCeJGErhBCeJGErhBCeJGErhBCeNH/AcOu2gtLma/PAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import matplotlib.pyplot as plt\n", "nx.draw_networkx(G, with_labels=True)\n", "plt.draw()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.2" } }, "nbformat": 4, "nbformat_minor": 5 }