{ "cells": [ { "cell_type": "markdown", "id": "ed13a6b8-1d5b-4ce0-9cd4-b81bac7b07dd", "metadata": {}, "source": [ "# Debugging" ] }, { "cell_type": "markdown", "id": "8bea1f41", "metadata": {}, "source": [ "This notebook demonstrates how to configure and control logging in the *OptiWindNet* to debug wind farm network optimization workflows. We explore logging at different scopes (individual modules, multiple modules, and globally). Additionally, we cover enabling verbose output for MILP solvers to inspect solver behavior in detail, observing optimization performance and progress." ] }, { "cell_type": "code", "execution_count": 1, "id": "2186c8ce", "metadata": {}, "outputs": [], "source": [ "import sys\n", "import logging\n", "import numpy as np\n", "from optiwindnet.api import WindFarmNetwork" ] }, { "cell_type": "code", "execution_count": 2, "id": "27dc2cb7", "metadata": {}, "outputs": [], "source": [ "# Display figures as SVG in Jupyter notebooks\n", "%config InlineBackend.figure_formats = ['svg']" ] }, { "cell_type": "markdown", "id": "1927b9de", "metadata": {}, "source": [ "## Logging" ] }, { "cell_type": "markdown", "id": "52d5dc9d", "metadata": {}, "source": [ "### Log one module\n", "\n", "As an example, set logging level for a specific file to `DEBUG` level." ] }, { "cell_type": "code", "execution_count": 3, "id": "ca81ef76", "metadata": {}, "outputs": [], "source": [ "logger_file1 = logging.getLogger('optiwindnet.mesh') # Or any other function\n", "\n", "stdoutHandler = logging.StreamHandler(stream=sys.stdout)\n", "logger_file1.addHandler(stdoutHandler)\n", "#logger_file1.setLevel(logging.INFO)\n", "logger_file1.setLevel(logging.DEBUG)" ] }, { "cell_type": "markdown", "id": "f414cd38", "metadata": {}, "source": [ "Initialize a `WindFarmNetwork()` instance and see the output log." ] }, { "cell_type": "code", "execution_count": 4, "id": "02c3b6b6", "metadata": {}, "outputs": [], "source": [ "wfn1 = WindFarmNetwork.from_yaml(filepath='data/example_location.yaml', cables=7)" ] }, { "cell_type": "markdown", "id": "c37bc91e", "metadata": {}, "source": [ "Run optimization" ] }, { "cell_type": "code", "execution_count": 5, "id": "7847b726", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "PART A\n", "PART B\n", "PART C\n", "is_hole: False, ring: 0, num_vertices: 4\n", "((-0.25564496185965113, 0.07687039890429721), (-0.0964256500979665, -0.015065913370998107), (-0.08974871121763778, -0.0073617531244649795), (-0.15754532138712932, 0.16598185242253038))\n", "is_hole: False, ring: 1, num_vertices: 4\n", "((0.24435503814034887, -0.13781886663242596), (-0.010909471361448774, 0.030131826741996243), (-0.021181685023492942, 0.021143639787707592), (0.03916757024101656, -0.18840951891799348))\n", "is_hole: True, ring: 0, num_vertices: 4\n", "((0.10285529494569041, 0.11898647491867832), (0.15421636325591126, 0.10614620784112311), (0.15421636325591126, 0.05221708611539121), (0.138808042762845, 0.04708097928436913))\n", "PART D\n", "PART E\n", "PART F\n", "convex_hull_A: [5, 11, 9, 7, 0, 1, 3, 4]\n", "hull_prunned: [5, 11, 9, 7, 0, 1, 3, 4]\n", "hull_prunned_edges: {(0, 1), (0, 7), (5, 11), (3, 4), (7, 9), (4, 5), (9, 11), (1, 3)}\n", "PART G\n", "hull_concave: [5, -1, 6, 11, 9, 7, 6, -1, 2, 0, 1, 3, 4]\n", "PART H\n", "holes\n", "s: 22, t: 23, sC: (0.138808042762845, 0.04708097928436913), tC: (0.15421636325591126, 0.05221708611539121)\n", "s: 23, t: 24, sC: (0.15421636325591126, 0.05221708611539121), tC: (0.15421636325591126, 0.10614620784112311)\n", "s: 24, t: 25, sC: (0.15421636325591126, 0.10614620784112311), tC: (0.10285529494569041, 0.11898647491867832)\n", "s: 25, t: 22, sC: (0.10285529494569041, 0.11898647491867832), tC: (0.138808042762845, 0.04708097928436913)\n", "{(24, 25), (22, 25), (23, 24), (22, 23)}\n", "PART I\n", "hull_concave\n", "concavities\n", "PART J\n", "PART K\n", "==== pivot 26 ====\n", "del_sup 26 28\n", "del_int 19 12\n", "del_sup 26 12\n", "del_sup 26 27\n", "==== pivot 27 ====\n", "del_sup 27 26\n", "==== pivot 28 ====\n", "del_int 14 17\n", "del_sup 28 17\n", "del_sup 28 26\n", "PART L\n", "PART M\n", "A_edge: 0–7 length: 1997.762; path: [0, 21, 20, 7]\n", "s: 0; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 0, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 7; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 7; False\n", "Took the 2nd continue.\n", "A_edge: 3–-1 length: 1159.045; path: [3, 25, -1]\n", "s: 3; b: 25; t: -1; b_conc_id: 0\n", "a: 24; c: 22; s: 3, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 5–11 length: 1311.176; path: [5, 15, 16, 11]\n", "s: 5; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: 5, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 11; False\n", "Took the 2nd continue.\n", "A_edge: 2–7 length: 1400.502; path: [2, 21, 20, 7]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 7; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 7; False\n", "Took the 2nd continue.\n", "A_edge: 10–-1 length: 909.253; path: [10, 16, 15, -1]\n", "s: 10; b: 16; t: 15; b_conc_id: 2\n", "a: 17; c: 15; s: 10, t: 15; False\n", "Took the 2nd continue.\n", "s: 16; b: 15; t: -1; b_conc_id: 2\n", "a: 16; c: 14; s: 16, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 4–6 length: 1022.923; path: [4, 21, 20, 6]\n", "s: 4; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 4, t: 20; False\n", "(0) 4 21 20 shortcut\n", "s: 4; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 4, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 1–4 length: 920.305; path: [1, 23, 22, 4]\n", "s: 1; b: 23; t: 22; b_conc_id: 0\n", "a: 22; c: 24; s: 1, t: 22; False\n", "(0) 1 23 22 shortcut\n", "s: 1; b: 22; t: 4; b_conc_id: 0\n", "a: 25; c: 23; s: 1, t: 4; False\n", "Took the 2nd continue.\n", "A_edge: 0–6 length: 1616.066; path: [0, 21, 20, 6]\n", "s: 0; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 0, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 11–-1 length: 985.722; path: [11, 16, 15, -1]\n", "s: 11; b: 16; t: 15; b_conc_id: 2\n", "a: 17; c: 15; s: 11, t: 15; False\n", "Took the 2nd continue.\n", "s: 16; b: 15; t: -1; b_conc_id: 2\n", "a: 16; c: 14; s: 16, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 1–7 length: 1845.557; path: [1, 2, 21, 20, 7]\n", "A_edge: 2–6 length: 1018.806; path: [2, 21, 20, 6]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 5–6 length: 969.949; path: [5, 15, 6]\n", "s: 5; b: 15; t: 6; b_conc_id: 2\n", "a: 16; c: 14; s: 5, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 4–11 length: 1514.511; path: [4, 20, 15, 16, 11]\n", "A_edge: 2–11 length: 1511.620; path: [2, 21, 20, 15, 16, 11]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 15; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 15; False\n", "(1) 21 20 15 shortcut\n", "s: 21; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: 21, t: 16; False\n", "(1) 21 15 16 shortcut\n", "s: 21; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 21, t: 11; False\n", "Took the 2nd continue.\n", "A_edge: 2–8 length: 1355.415; path: [2, 21, 20, 6, 8]\n", "PART N\n", "updating d2root of ⟨-1, 0⟩ (path [-1, 21, 0])\n", "s: -1; b: 21; t: 0; b_conc_id: 1\n", "a: 12; c: 20; s: -1, t: 0; False\n", "updating d2root of ⟨-1, 11⟩ (path [-1, 15, 16, 11])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 11; False\n", "Took the 2nd continue.\n", "d2roots[11, -1] updated\n", "updating d2root of ⟨-1, 10⟩ (path [-1, 15, 16, 10])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 10; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 10; False\n", "Took the 2nd continue.\n", "d2roots[10, -1] updated\n", "updating d2root of ⟨-1, 3⟩ (path [-1, 25, 3])\n", "s: -1; b: 25; t: 3; b_conc_id: 0\n", "a: 24; c: 22; s: -1, t: 3; False\n", "Took the 2nd continue.\n", "d2roots[3, -1] updated\n", "updating d2root of ⟨-1, 9⟩ (path [-1, 15, 16, 10, 9])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 9; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 9; False\n", "d2roots[9, -1] updated\n", "PART O\n", "PART P\n" ] } ], "source": [ "res1 = wfn1.optimize()" ] }, { "cell_type": "markdown", "id": "b47b766f", "metadata": {}, "source": [ "### Log several modules\n", "\n", "It is possible to log several files by repeating the steps." ] }, { "cell_type": "code", "execution_count": 6, "id": "ec24ebb2", "metadata": {}, "outputs": [], "source": [ "# set logger for second file\n", "logger_file2 = logging.getLogger('optiwindnet.pathfinding') # Or any other function\n", "\n", "stdoutHandler = logging.StreamHandler(stream=sys.stdout)\n", "logger_file2.addHandler(stdoutHandler)\n", "#logger_file2.setLevel(logging.INFO)\n", "logger_file2.setLevel(logging.DEBUG)" ] }, { "cell_type": "code", "execution_count": 7, "id": "46f01d70", "metadata": {}, "outputs": [], "source": [ "wfn2 = WindFarmNetwork.from_yaml(filepath='data/example_location.yaml', cables=7)" ] }, { "cell_type": "code", "execution_count": 8, "id": "0f165916", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "PART A\n", "PART B\n", "PART C\n", "is_hole: False, ring: 0, num_vertices: 4\n", "((-0.25564496185965113, 0.07687039890429721), (-0.0964256500979665, -0.015065913370998107), (-0.08974871121763778, -0.0073617531244649795), (-0.15754532138712932, 0.16598185242253038))\n", "is_hole: False, ring: 1, num_vertices: 4\n", "((0.24435503814034887, -0.13781886663242596), (-0.010909471361448774, 0.030131826741996243), (-0.021181685023492942, 0.021143639787707592), (0.03916757024101656, -0.18840951891799348))\n", "is_hole: True, ring: 0, num_vertices: 4\n", "((0.10285529494569041, 0.11898647491867832), (0.15421636325591126, 0.10614620784112311), (0.15421636325591126, 0.05221708611539121), (0.138808042762845, 0.04708097928436913))\n", "PART D\n", "PART E\n", "PART F\n", "convex_hull_A: [5, 11, 9, 7, 0, 1, 3, 4]\n", "hull_prunned: [5, 11, 9, 7, 0, 1, 3, 4]\n", "hull_prunned_edges: {(0, 1), (0, 7), (5, 11), (3, 4), (7, 9), (4, 5), (9, 11), (1, 3)}\n", "PART G\n", "hull_concave: [5, -1, 6, 11, 9, 7, 6, -1, 2, 0, 1, 3, 4]\n", "PART H\n", "holes\n", "s: 22, t: 23, sC: (0.138808042762845, 0.04708097928436913), tC: (0.15421636325591126, 0.05221708611539121)\n", "s: 23, t: 24, sC: (0.15421636325591126, 0.05221708611539121), tC: (0.15421636325591126, 0.10614620784112311)\n", "s: 24, t: 25, sC: (0.15421636325591126, 0.10614620784112311), tC: (0.10285529494569041, 0.11898647491867832)\n", "s: 25, t: 22, sC: (0.10285529494569041, 0.11898647491867832), tC: (0.138808042762845, 0.04708097928436913)\n", "{(24, 25), (22, 25), (23, 24), (22, 23)}\n", "PART I\n", "hull_concave\n", "concavities\n", "PART J\n", "PART K\n", "==== pivot 26 ====\n", "del_sup 26 28\n", "del_int 19 12\n", "del_sup 26 12\n", "del_sup 26 27\n", "==== pivot 27 ====\n", "del_sup 27 26\n", "==== pivot 28 ====\n", "del_int 14 17\n", "del_sup 28 17\n", "del_sup 28 26\n", "PART L\n", "PART M\n", "A_edge: 0–7 length: 1997.762; path: [0, 21, 20, 7]\n", "s: 0; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 0, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 7; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 7; False\n", "Took the 2nd continue.\n", "A_edge: 3–-1 length: 1159.045; path: [3, 25, -1]\n", "s: 3; b: 25; t: -1; b_conc_id: 0\n", "a: 24; c: 22; s: 3, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 5–11 length: 1311.176; path: [5, 15, 16, 11]\n", "s: 5; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: 5, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 11; False\n", "Took the 2nd continue.\n", "A_edge: 2–7 length: 1400.502; path: [2, 21, 20, 7]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 7; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 7; False\n", "Took the 2nd continue.\n", "A_edge: 10–-1 length: 909.253; path: [10, 16, 15, -1]\n", "s: 10; b: 16; t: 15; b_conc_id: 2\n", "a: 17; c: 15; s: 10, t: 15; False\n", "Took the 2nd continue.\n", "s: 16; b: 15; t: -1; b_conc_id: 2\n", "a: 16; c: 14; s: 16, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 4–6 length: 1022.923; path: [4, 21, 20, 6]\n", "s: 4; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 4, t: 20; False\n", "(0) 4 21 20 shortcut\n", "s: 4; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 4, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 1–4 length: 920.305; path: [1, 23, 22, 4]\n", "s: 1; b: 23; t: 22; b_conc_id: 0\n", "a: 22; c: 24; s: 1, t: 22; False\n", "(0) 1 23 22 shortcut\n", "s: 1; b: 22; t: 4; b_conc_id: 0\n", "a: 25; c: 23; s: 1, t: 4; False\n", "Took the 2nd continue.\n", "A_edge: 0–6 length: 1616.066; path: [0, 21, 20, 6]\n", "s: 0; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 0, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 11–-1 length: 985.722; path: [11, 16, 15, -1]\n", "s: 11; b: 16; t: 15; b_conc_id: 2\n", "a: 17; c: 15; s: 11, t: 15; False\n", "Took the 2nd continue.\n", "s: 16; b: 15; t: -1; b_conc_id: 2\n", "a: 16; c: 14; s: 16, t: -1; False\n", "Took the 2nd continue.\n", "A_edge: 1–7 length: 1845.557; path: [1, 2, 21, 20, 7]\n", "A_edge: 2–6 length: 1018.806; path: [2, 21, 20, 6]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 6; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 5–6 length: 969.949; path: [5, 15, 6]\n", "s: 5; b: 15; t: 6; b_conc_id: 2\n", "a: 16; c: 14; s: 5, t: 6; False\n", "Took the 2nd continue.\n", "A_edge: 4–11 length: 1514.511; path: [4, 20, 15, 16, 11]\n", "A_edge: 2–11 length: 1511.620; path: [2, 21, 20, 15, 16, 11]\n", "s: 2; b: 21; t: 20; b_conc_id: 1\n", "a: 12; c: 20; s: 2, t: 20; False\n", "Took the 2nd continue.\n", "s: 21; b: 20; t: 15; b_conc_id: 1\n", "a: 21; c: 19; s: 21, t: 15; False\n", "(1) 21 20 15 shortcut\n", "s: 21; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: 21, t: 16; False\n", "(1) 21 15 16 shortcut\n", "s: 21; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 21, t: 11; False\n", "Took the 2nd continue.\n", "A_edge: 2–8 length: 1355.415; path: [2, 21, 20, 6, 8]\n", "PART N\n", "updating d2root of ⟨-1, 0⟩ (path [-1, 21, 0])\n", "s: -1; b: 21; t: 0; b_conc_id: 1\n", "a: 12; c: 20; s: -1, t: 0; False\n", "updating d2root of ⟨-1, 11⟩ (path [-1, 15, 16, 11])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 11; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 11; False\n", "Took the 2nd continue.\n", "d2roots[11, -1] updated\n", "updating d2root of ⟨-1, 10⟩ (path [-1, 15, 16, 10])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 10; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 10; False\n", "Took the 2nd continue.\n", "d2roots[10, -1] updated\n", "updating d2root of ⟨-1, 3⟩ (path [-1, 25, 3])\n", "s: -1; b: 25; t: 3; b_conc_id: 0\n", "a: 24; c: 22; s: -1, t: 3; False\n", "Took the 2nd continue.\n", "d2roots[3, -1] updated\n", "updating d2root of ⟨-1, 9⟩ (path [-1, 15, 16, 10, 9])\n", "s: -1; b: 15; t: 16; b_conc_id: 2\n", "a: 16; c: 14; s: -1, t: 16; False\n", "Took the 2nd continue.\n", "s: 15; b: 16; t: 9; b_conc_id: 2\n", "a: 17; c: 15; s: 15, t: 9; False\n", "d2roots[9, -1] updated\n", "PART O\n", "PART P\n", ">PathFinder: \"example_location\" (T = 12)\n", " starting... subroot = <0>\n", " sr_u <0>, «0~1», tradeoff = -1045.968\n", " starting... subroot = <1>\n", " sr_u <1>, «1~0», tradeoff = -851.372\n", " starting... subroot = <2>\n", " sr_u <2>, «2~1», tradeoff = -416.066\n", " starting... subroot = <3>\n", " sr_u <3>, «3~4», tradeoff = -595.165\n", " starting... subroot = <4>\n", " sr_u <4>, «4~3», tradeoff = -62.100\n", " starting... subroot = <5>\n", " 5\n", " starting... subroot = <6>\n", " sr_u <6>, «6~8», tradeoff = -292.727\n", " starting... subroot = <7>\n", " sr_u <7>, «7~6», tradeoff = -577.867\n", " starting... subroot = <8>\n", " sr_u <8>, «8~6», tradeoff = -567.296\n", " starting... subroot = <9>\n", " sr_u <9>, «9~10», tradeoff = -841.283\n", " starting... subroot = <10>\n", " sr_u <10>, «10~9», tradeoff = -515.130\n", " starting... subroot = <11>\n", " sr_u <11>, «11~10», tradeoff = -511.075\n", "[1]\n", " «0~1», sr_u: <0>\n", " «0~1» subroot <1>\n", "heap top: <1>, «[1, 0]» -851.372\n", "[2]\n", "stale_subtrees: {1}\n", " starting... subroot = <1>\n", " sr_u <1>, «1~2», tradeoff = -830.788\n", " «9~10», sr_u: <9>\n", " «9~10» subroot <10>\n", "heap top: <1>, «[1, 2]» -830.788\n", "[3]\n", "stale_subtrees: {10}\n", " starting... subroot = <10>\n", " sr_u <10>, «10~8», tradeoff = -494.133\n", " «1~2», sr_u: <1>\n", " «1~2» subroot <2>\n", "heap top: <3>, «[3, 4]» -595.165\n", "[4]\n", "stale_subtrees: {2}\n", " starting... subroot = <2>\n", " sr_u <2>, «1~3», tradeoff = -308.157\n", " «3~4», sr_u: <3>\n", " «3~4» subroot <4>\n", "heap top: <7>, «[7, 6]» -577.867\n", "[5]\n", "stale_subtrees: {4}\n", " starting... subroot = <4>\n", " sr_u <4>, «3~1», tradeoff = -73.014\n", " «7~6», sr_u: <7>\n", " «7~6» subroot <6>\n", "heap top: <8>, «[8, 6]» -567.296\n", "[6]\n", "stale_subtrees: {6}\n", " starting... subroot = <6>\n", " sr_u <6>, «6~8», tradeoff = -292.727\n", " «8~6», sr_u: <8>\n", " «8~6» subroot <6>\n", "heap top: <11>, «[11, 10]» -511.075\n", "[7]\n", "stale_subtrees: {6}\n", " starting... subroot = <6>\n", " sr_u <6>, «8~10», tradeoff = -214.216\n", " «11~10», sr_u: <11>\n", " «11~10» subroot <10>\n", "heap top: <10>, «[10, 8]» -494.133\n", "[8]\n", "stale_subtrees: {10}\n", " starting... subroot = <10>\n", " sr_u <10>, «10~8», tradeoff = -494.133\n", " «10~8», sr_u: <10>\n", " «10~8» subroot <6>\n", "heap top: <2>, «[1, 3]» -308.157\n", "[9]\n", "stale_subtrees: {6}\n", " starting... subroot = <6>\n", " 6\n", " «1~3», sr_u: <2>\n", " «1~3» subroot <4>\n", "heap top: <4>, «[3, 1]» -73.014\n", "[10]\n", "stale_subtrees: {4}\n", " starting... subroot = <4>\n", " 4\n", ">PathFinder: \"example_location\" (T = 12)\n", ">PathFinder: \"example_location\" (T = 12)\n", "0 €Σλ = 5773.4 m(+1) [-1]: 3κ = 7, T = 12" ], "text/plain": [ "" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn4" ] } ], "metadata": { "kernelspec": { "display_name": "OptiWindNet", "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.9" } }, "nbformat": 4, "nbformat_minor": 5 }