351 lines
182 KiB
Plaintext
351 lines
182 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"from skfuzzy import control as ctrl\n",
|
||
|
"\n",
|
||
|
"level = ctrl.Antecedent(np.arange(1.5, 9.0, 0.1), \"level\")\n",
|
||
|
"flow = ctrl.Antecedent(np.arange(0, 0.6, 0.01), \"flow\")\n",
|
||
|
"influx = ctrl.Consequent(np.arange(0, 0.6, 0.01), \"influx\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"c:\\Users\\user\\Projects\\python\\fuzzy\\.venv\\Lib\\site-packages\\skfuzzy\\control\\fuzzyvariable.py:125: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n",
|
||
|
" fig.show()\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGyCAYAAAAYveVYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABzWUlEQVR4nO3dd3hVVdr38e856b0XEhISSghpJwiCdBxpKggWIMiI4zj6jmNDdCwzClNU9PHR8Rm7WGdGCKCCKAooGqRJJwmQAKEFAmmkJ6Se8/6xh0gkQMpJ1in357pyKSf77P1LgHDvvda6l85kMpkQQgghhLARetUBhBBCCCHMSYobIYQQQtgUKW6EEEIIYVOkuBFCCCGETZHiRgghhBA2RYobIYQQQtgUKW6EEEIIYVOkuBFCCCGETZHiRggh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1RHcd+7f8cMP18Zy1EVzHMhNN7oOig6iR2a82xNeSU5fDgVQ+qjmLXpLixcXeNiMLNyYH//CR9b5RJT4W+48EzSHUSYetiJoGrj0wsVujfB/7NiLARGIIMqqPYNSlubJy7syO3DurJ8p0npWuxCsWHIW+n9LYR3cPRRXtCmLEUjLLHXHfbf3Y/+87uk20WLIAUN3Zg9tBenK2uZ+3+AtVR7E96Krj4QIz0uRDdxDALKvLg+EbVSezO8oPLCfUIZXTP0aqj2D0pbuxA32BPruntzyc/nVAdxb4YjdoddMLN4CR7yohu0vNq8O8tQ1PdrLK+kq+Pfc2t/W6VvjYWQIobOzF7aC+2HSvhcEGl6ij2I3cLlJ+UVVKie+l0Wj+lrFVQX606jd346uhX1DfVc0u
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGyCAYAAAAYveVYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABpxklEQVR4nO3deXyU5b3//9dM9n0hZJ+AQBSRJZhAABdoi9W6QU9bPVZFrdXfaavVUo/LcTvVVrSntfZYWxWr9rTu/SraammVCm4kbAlFQIQAzmRPgOz7zP37Y0wgEiDLzNyzvJ+PRx6ayT33/ckQwnvu63Ndl8UwDAMRERGRIGE1uwARERERT1K4ERERkaCicCMiIiJBReFGREREgorCjYiIiAQVhRsREREJKgo3IiIiElQUbkRERCSoKNyIiIhIUAm5cGMYBi0tLWhhZhERkeBkarh57733uOiii8jOzsZisbBq1aoTPmft2rWcfvrpREVFMWXKFJ599tkRXbO1tZWkpCRaW1tHV7SIiIj4NVPDTXt7O7NmzeKxxx4b1vH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7rVXxk/1/Lnl2LJmQniMVzbRfH3P68SGx3LOhHM8fm4Rf6BwIxIEkmIiOG96Ji9vcuDxkWZ7CeTOBat+XfhUWATknO7xpmKX4WLVnlV87aSvERsR/CvVSmjSbyuRIHFJkY2Khna22Js8d1KXEyo3Hp6aLL7V31TswcBaWlNKTXuNGoklqCnciASJ+ZPGkZMcwyue3Eyzfid0t2j
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGyCAYAAAAYveVYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABpwklEQVR4nO3deXxU5d3//9dM9n0hZJ+AQBSRJZhIAq5tsVpXerfqbVWstfqr1laL1qVuVVvR3q31rrUuWJe71br0q9RWa6tUrAsJW0IRECGAM9kTIDvZZs7vjzGBSIBkMjNnlvfz8chDMzlzzidDCO851+e6LothGAYiIiIiIcJqdgEiIiIi3qRwIyIiIiFF4UZERERCisKNiIiIhBSFGxEREQkpCjciIiISUhRuREREJKQo3IiIiEhIUbgRERGRkBJ24cYwDNrb29HCzCIiIqHJ1HDz73//m3PPPZfc3FwsFgvLly8/4nNWrlzJ8ccfT0xMDNOmTePZZ58d0zU7OjpISUmho6PDs6JFREQkoJkabrq6upgzZw6PPvroqI7fuXMnZ599Nl/60peoqqrihhtu4Lvf/S7/+Mc/fFypiIiIBAtLoGycabFYeO2111i0aNEhj7nlllt44403+Pjjj4ce++///m9aW1t56623RnWd9vZ2UlJSaGtrIzk5ebxli4iISICJNLuAsVi1ahULFy4c9tgZZ5zBDTfccMjn9Pb20tvbO/R5e3s7AKc8+C8iYhN8UqfIeKTERf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gqW7u5JxHPvD7df/2g5OYmZcypuds2bKFyMhISkv397xNmDCBY445hi1btgBw6qmncv3119Pc3Mx7773HaaedNhRurrzySj766CNuvvlmr34vgUrhRiSIXVhi45rn17OtsYNCX27J0FYLbQ41E/uLrQzWPg3deyA+3WeX2bx7M9v2buNHx//IZ9cIZFMnJvK3H5xkynV9YdasWaSnp/Pee+/x3nvv8fOf/5zs7GwefPBB1qxZQ39//9Bdn1CncCMSxL5ybBbpCdG8sq6Gn5x1rO8uNNj/oWZi/xhcAdqxGo4502eXeW37a2TGZ7IgNzz+wfuiuOiIMd9BMcuxxx7LwMAAFRUVQwFl9+7dbN26lRkz3I3gFouFk08+mb/85S9s2rSJk046ifj4eHp7e3niiScoKSkhISHBzG/Db9RQLBLEoiOtLCrK49X1NfQ7Xb67kL0C0o6CxEzfXUP2S50EiVk+bSruGejhzR1vcv7U84mwer5BofhHYWEh559/PldddRUffPABGzZs4NJLLyUvL4/zz98/XHzaaafxpz/9iaKiIhITE7FarZxyyik8//zzYdNvAwo3IkHvwhPyaens491Pmnx3EUe57tr4k8XiHgK0V/jsEivsK+jo72DRtEU+u4Z41zPPPENxcTHnnHMO8+fPxzAM3nzzzWEbTJ566qk4nU5OO+20ocdOO+20gx4LddoVXCQEnPfbD8hMiuWpy0u8f/LeTnigAM7+JZR8x/vnl5GtehRW3Au3OiDS+ztZf/ef32XANcCzZz7r9XMHmsFdwce707T4nrf+rHTnRiQEXFBi492tTTR1+GA36dp1YDi1Waa/2cpgoAca/uP1U9d21lJRX6EViSVkKdyIhIDz5uQSabXw2vpa75/cUeFee2XidO+fWw4tZzZExvlkE82/bP8L8ZHxnD7pdK+fWyQQKNyIhICUuCjOnJnNy2sdeH2k2V4O+fPAql8XfhURBXnHe72p2GW4WL59OV876mvER4X+SrUSnvTbSiREXFhio7q5i/X2Vu+d1OWEmjX7pyaLfw02FXsxsFbUV1DfVa9GYglpCjciIWL+lAnkpcbxijc
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import skfuzzy as fuzz\n",
|
||
|
"\n",
|
||
|
"level[\"low\"] = fuzz.zmf(level.universe, 2, 4)\n",
|
||
|
"level[\"average\"] = fuzz.trapmf(level.universe, [2, 4, 6, 8])\n",
|
||
|
"level[\"high\"] = fuzz.smf(level.universe, 6, 8)\n",
|
||
|
"level.view()\n",
|
||
|
"\n",
|
||
|
"flow[\"low\"] = fuzz.zmf(flow.universe, 0.2, 0.3)\n",
|
||
|
"flow[\"average\"] = fuzz.trapmf(flow.universe, [0.15, 0.25, 0.35, 0.45])\n",
|
||
|
"flow[\"high\"] = fuzz.smf(flow.universe, 0.3, 0.4)\n",
|
||
|
"flow.view()\n",
|
||
|
"\n",
|
||
|
"influx[\"low\"] = fuzz.zmf(influx.universe, 0.2, 0.3)\n",
|
||
|
"influx[\"average\"] = fuzz.trapmf(influx.universe, [0.15, 0.25, 0.35, 0.45])\n",
|
||
|
"influx[\"high\"] = fuzz.smf(influx.universe, 0.3, 0.4)\n",
|
||
|
"influx.view()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(<Figure size 640x480 with 1 Axes>, <Axes: >)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGFCAYAAABg2vAPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB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uYH5eMqkEO/9WYL7ADVbIuDyrHwDajEPDOnLMD4mtsB8A399EnCagKghLzNTID0rgn09PYUmZGjk2Gb70nEKM2Xwa/Vcdw47TaUh7PAj861a+EjtOp6H/qmMYs/n0I3P5fH8TMQxQJfKLlFBoeJGfIruQrYup2vacVaDfynCcTM0GgEov6GWPn0zNRr+V4dhzVsH3dxWwzbhx4DQBPVNadkGFn7SEpAZwNbsATo0tNHwmMhQv0g+g9N9mQrN+jkbsjXuivb/VajXUajWkUt37TCZ2G2bSPoYBeqZiparyJ+nReUj/7TmrEKQxEADs+DtNkONUpuz9rVQqcfz4cfz666/48ccfUatWLSQnJ2ulhqqoSqdDNYC0nELsOJ2Gbaeust2wgWAYoGeqKdfOpxZtnYf0myb6AWjDT0F7sfRMGA4fPox79+5BLpdDqVTCzu7Fbh4kpIfbMAPVn3Zhm3H9xjBAz9TcygwSQKNDqZJ/z0NUGU30A9A8NZbMngZ1yYPyryiVSkgkErz88su4c+cO6tWrJ2J9wk27ZOUXsc24nuLHMXomMxM5bDU8/GdrZcruaVSpsn4Amlr5rynNrMwwy3MaZDLZI70O1Go1wsPDYWlpiUaNGqF
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"rule1 = ctrl.Rule(level[\"low\"] & flow[\"high\"], influx[\"high\"])\n",
|
||
|
"rule2 = ctrl.Rule(level[\"low\"] & flow[\"average\"], influx[\"high\"])\n",
|
||
|
"rule3 = ctrl.Rule(level[\"low\"] & flow[\"low\"], influx[\"average\"])\n",
|
||
|
"rule4 = ctrl.Rule(level[\"average\"] & flow[\"high\"], influx[\"high\"])\n",
|
||
|
"rule5 = ctrl.Rule(level[\"average\"] & flow[\"average\"], influx[\"average\"])\n",
|
||
|
"rule6 = ctrl.Rule(level[\"average\"] & flow[\"low\"], influx[\"average\"])\n",
|
||
|
"rule7 = ctrl.Rule(level[\"high\"] & flow[\"high\"], influx[\"average\"])\n",
|
||
|
"rule8 = ctrl.Rule(level[\"high\"] & flow[\"average\"], influx[\"low\"])\n",
|
||
|
"rule9 = ctrl.Rule(level[\"high\"] & flow[\"low\"], influx[\"low\"])\n",
|
||
|
"\n",
|
||
|
"rule1.view()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"influx_ctrl = ctrl.ControlSystem(\n",
|
||
|
" [\n",
|
||
|
" rule1,\n",
|
||
|
" rule2,\n",
|
||
|
" rule3,\n",
|
||
|
" rule4,\n",
|
||
|
" rule5,\n",
|
||
|
" rule6,\n",
|
||
|
" rule7,\n",
|
||
|
" rule8,\n",
|
||
|
" rule9,\n",
|
||
|
" ]\n",
|
||
|
")\n",
|
||
|
"\n",
|
||
|
"influxes = ctrl.ControlSystemSimulation(influx_ctrl)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"=============\n",
|
||
|
" Antecedents \n",
|
||
|
"=============\n",
|
||
|
"Antecedent: level = 2.5\n",
|
||
|
" - low : 0.875\n",
|
||
|
" - average : 0.25\n",
|
||
|
" - high : 0.0\n",
|
||
|
"Antecedent: flow = 0.4\n",
|
||
|
" - low : 0.0\n",
|
||
|
" - average : 0.4999999999999997\n",
|
||
|
" - high : 1.0\n",
|
||
|
"\n",
|
||
|
"=======\n",
|
||
|
" Rules \n",
|
||
|
"=======\n",
|
||
|
"RULE #0:\n",
|
||
|
" IF level[low] AND flow[high] THEN influx[high]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[low] : 0.875\n",
|
||
|
" - flow[high] : 1.0\n",
|
||
|
" level[low] AND flow[high] = 0.875\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[high] : 0.875\n",
|
||
|
"\n",
|
||
|
"RULE #1:\n",
|
||
|
" IF level[low] AND flow[average] THEN influx[high]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[low] : 0.875\n",
|
||
|
" - flow[average] : 0.4999999999999997\n",
|
||
|
" level[low] AND flow[average] = 0.4999999999999997\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[high] : 0.4999999999999997\n",
|
||
|
"\n",
|
||
|
"RULE #2:\n",
|
||
|
" IF level[low] AND flow[low] THEN influx[average]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[low] : 0.875\n",
|
||
|
" - flow[low] : 0.0\n",
|
||
|
" level[low] AND flow[low] = 0.0\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[average] : 0.0\n",
|
||
|
"\n",
|
||
|
"RULE #3:\n",
|
||
|
" IF level[average] AND flow[high] THEN influx[high]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[average] : 0.25\n",
|
||
|
" - flow[high] : 1.0\n",
|
||
|
" level[average] AND flow[high] = 0.25\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[high] : 0.25\n",
|
||
|
"\n",
|
||
|
"RULE #4:\n",
|
||
|
" IF level[average] AND flow[average] THEN influx[average]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[average] : 0.25\n",
|
||
|
" - flow[average] : 0.4999999999999997\n",
|
||
|
" level[average] AND flow[average] = 0.25\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[average] : 0.25\n",
|
||
|
"\n",
|
||
|
"RULE #5:\n",
|
||
|
" IF level[average] AND flow[low] THEN influx[average]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[average] : 0.25\n",
|
||
|
" - flow[low] : 0.0\n",
|
||
|
" level[average] AND flow[low] = 0.0\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[average] : 0.0\n",
|
||
|
"\n",
|
||
|
"RULE #6:\n",
|
||
|
" IF level[high] AND flow[high] THEN influx[average]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[high] : 0.0\n",
|
||
|
" - flow[high] : 1.0\n",
|
||
|
" level[high] AND flow[high] = 0.0\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[average] : 0.0\n",
|
||
|
"\n",
|
||
|
"RULE #7:\n",
|
||
|
" IF level[high] AND flow[average] THEN influx[low]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[high] : 0.0\n",
|
||
|
" - flow[average] : 0.4999999999999997\n",
|
||
|
" level[high] AND flow[average] = 0.0\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[low] : 0.0\n",
|
||
|
"\n",
|
||
|
"RULE #8:\n",
|
||
|
" IF level[high] AND flow[low] THEN influx[low]\n",
|
||
|
"\tAND aggregation function : fmin\n",
|
||
|
"\tOR aggregation function : fmax\n",
|
||
|
"\n",
|
||
|
" Aggregation (IF-clause):\n",
|
||
|
" - level[high] : 0.0\n",
|
||
|
" - flow[low] : 0.0\n",
|
||
|
" level[high] AND flow[low] = 0.0\n",
|
||
|
" Activation (THEN-clause):\n",
|
||
|
" influx[low] : 0.0\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"==============================\n",
|
||
|
" Intermediaries and Conquests \n",
|
||
|
"==============================\n",
|
||
|
"Consequent: influx = 0.4315251220586045\n",
|
||
|
" low:\n",
|
||
|
" Accumulate using accumulation_max : 0.0\n",
|
||
|
" average:\n",
|
||
|
" Accumulate using accumulation_max : 0.25\n",
|
||
|
" high:\n",
|
||
|
" Accumulate using accumulation_max : 0.875\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"np.float64(0.4315251220586045)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"influxes.input[\"level\"] = 2.5\n",
|
||
|
"influxes.input[\"flow\"] = 0.4\n",
|
||
|
"influxes.compute()\n",
|
||
|
"influxes.print_state()\n",
|
||
|
"influxes.output[\"influx\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 31,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGyCAYAAAAYveVYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABrY0lEQVR4nO3de3xT9f0/8NfJPWnTJm3SC23aCq0icim2guAFtuFw3vfd1KET5pz+5mXq0HmZClM3cJs6N8dEUXQXEXVfRfeF4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ERLr/8ctx44434+OOPsWvXLvzwhz9ETk4OLr/8yJTC3Llz8corr6C4uBjJyclQKBQ4//zz8fLLL7PeJo5oVApcUZyDN3bUwucPRO5C9nLAfAqQnHHyY2nsTPlAcmZEi4p7+3uxoXoDLp9wOZQKeTefpcTD5EaGXnzxRZSUlOCSSy7BrFmzIIoiNmzYMKTB5Jw5c+D3+zF37tzBx+bOnXvMYxT7rjorFy5PH97/silyF3GUcdQmmgQhOAVoL4/YJTbZN6HT14krCq+I2DWIpMJpKZkYWNoNAGazGX/7299OeHxxcTG+3hD+zjvvZAuHODQxKwVTc1Px2rZafPuMrPBfwOsBGr4ASn4U/nPT8eWdDWx6BOjvA1SasJ/+zco3UZJZgryUKBSjE0UZR26IZODKUhve39+Eps4IdJN2bgdEP5tlRpvtbKC/F2j4POyndnqcKK8v547EJFtMbohk4LJp46BSCHhzhzP8J3eUB/desU4M/7np+LKnAip9RJpovlX5FgwqAy7IvyDs5yaKBUxuiGQ
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"influx.view(sim=influxes)"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": ".venv",
|
||
|
"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.12.7"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|