{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Operator strategy notebook "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "raw_mimetype": "text/markdown"
   },
   "source": [
    "This notebook illustrates how to run a security analysis with remedial actions. For a contingency, an operator strategy groups a list of actions and a condition to apply them. This small tutorial is based on a 6 nodes network, called Metrix, that is easily understandable. We are going to simulate contingencies and various operator strategies to show the available features. Network elements can be monitored in pre-contingency state, after a contingency and after each operator strategy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defaulting to user installation because normal site-packages is not writeable\n",
      "Looking in indexes: https://devin-depot.rte-france.com/repository/pypi-all/simple\n",
      "Requirement already satisfied: pypowsybl in /home/kuleszahug/.local/lib/python3.8/site-packages (1.4.0.dev1)\n",
      "Requirement already satisfied: prettytable in /home/kuleszahug/.local/lib/python3.8/site-packages (from pypowsybl) (2.0.0)\n",
      "Requirement already satisfied: numpy>=1.20.0 in /home/kuleszahug/.local/lib/python3.8/site-packages (from pypowsybl) (1.24.3)\n",
      "Requirement already satisfied: networkx in /home/kuleszahug/.local/lib/python3.8/site-packages (from pypowsybl) (3.1)\n",
      "Requirement already satisfied: pandas>=1.3.5 in /home/kuleszahug/.local/lib/python3.8/site-packages (from pypowsybl) (2.0.3)\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in /home/kuleszahug/.local/lib/python3.8/site-packages (from pandas>=1.3.5->pypowsybl) (2.8.2)\n",
      "Requirement already satisfied: pytz>=2020.1 in /home/kuleszahug/.local/lib/python3.8/site-packages (from pandas>=1.3.5->pypowsybl) (2023.3)\n",
      "Requirement already satisfied: tzdata>=2022.1 in /home/kuleszahug/.local/lib/python3.8/site-packages (from pandas>=1.3.5->pypowsybl) (2023.3)\n",
      "Requirement already satisfied: setuptools in /home/kuleszahug/.local/lib/python3.8/site-packages (from prettytable->pypowsybl) (69.1.1)\n",
      "Requirement already satisfied: wcwidth in /home/kuleszahug/.local/lib/python3.8/site-packages (from prettytable->pypowsybl) (0.2.6)\n",
      "Requirement already satisfied: six>=1.5 in /home/kuleszahug/.local/lib/python3.8/site-packages (from python-dateutil>=2.8.2->pandas>=1.3.5->pypowsybl) (1.16.0)\n",
      "\u001b[33mDEPRECATION: distro-info 0.23ubuntu1 has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n",
      "\u001b[0m\u001b[33mDEPRECATION: python-debian 0.1.36ubuntu1 has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of python-debian or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063\u001b[0m\u001b[33m\n",
      "\u001b[0mNote: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install pypowsybl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pypowsybl as pp\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from pypowsybl._pypowsybl import ConditionType"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "six_nodes = pp.network.create_metrix_tutorial_six_buses_network()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![6 nodes network](data/reseau_6_noeuds_ss_HDVC.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
       "<svg width=\"603.57\" height=\"600.00\" viewBox=\"-210.06 -188.45 1223.26 1216.02\" xmlns=\"http://www.w3.org/2000/svg\">\n",
       "    <style><![CDATA[\n",
       ".nad-branch-edges .nad-edge-path, .nad-3wt-edges .nad-edge-path {stroke: var(--nad-vl-color, lightgrey); stroke-width: 5; fill: none}\n",
       ".nad-branch-edges .nad-winding, .nad-3wt-nodes .nad-winding {stroke: var(--nad-vl-color, lightgrey); stroke-width: 5; fill: none}\n",
       ".nad-text-edges {stroke: black; stroke-width: 3; stroke-dasharray: 6,7}\n",
       ".nad-disconnected .nad-edge-path {stroke-dasharray: 10,10}\n",
       ".nad-vl-nodes .nad-busnode {fill: var(--nad-vl-color, lightgrey)}\n",
       ".nad-vl-nodes circle.nad-unknown-busnode {stroke: var(--nad-vl-color, #808080); stroke-width: 5; stroke-dasharray: 5,5; fill: none}\n",
       ".nad-hvdc-edge polyline.nad-hvdc {stroke: grey; stroke-width: 40}\n",
       ".nad-branch-edges .nad-tie-line-edge .nad-edge-path {stroke-width: 7}\n",
       ".nad-pst-arrow {stroke: #6a6a6a; stroke-width: 4; stroke-linecap: round; fill: none}\n",
       ".nad-state-out .nad-arrow-in {visibility: hidden}\n",
       ".nad-state-in .nad-arrow-out {visibility: hidden}\n",
       ".nad-active path {stroke: none; fill: #546e7a}\n",
       ".nad-reactive path {stroke: none; fill: #0277bd}\n",
       ".nad-current path {stroke: none; fill: #bd4802}\n",
       ".nad-text-background {flood-color: #90a4aeaa}\n",
       ".nad-text-nodes {font: 25px serif; fill: black; dominant-baseline: central}\n",
       ".nad-text-nodes foreignObject {overflow: visible; color: black}\n",
       ".nad-label-box {background-color: #6c6c6c20; width: max-content; padding: 10px; border-radius: 10px;}\n",
       ".nad-legend-square {width: 20px; height: 20px; background: var(--nad-vl-color, black);}\n",
       ".nad-edge-infos text, .nad-edge-label text {font: 20px serif; dominant-baseline:middle; stroke: #FFFFFFAA; stroke-width: 10; stroke-linejoin:round; paint-order: stroke}\n",
       ".nad-edge-infos .nad-state-in text {fill: #b71c1c}\n",
       ".nad-edge-infos .nad-state-out text {fill: #2e7d32}\n",
       ".nad-disconnected {--nad-vl-color: #808080}\n",
       ".nad-vl0to30-line {--nad-vl-color: #afb42b}\n",
       ".nad-vl0to30-0 {--nad-vl-color: #827717}\n",
       ".nad-vl0to30-1 {--nad-vl-color: #d4e157}\n",
       ".nad-vl0to30-2 {--nad-vl-color: #e6ee9c}\n",
       ".nad-vl0to30-3 {--nad-vl-color: #c0ca33}\n",
       ".nad-vl0to30-4 {--nad-vl-color: #f0fc83}\n",
       ".nad-vl0to30-5 {--nad-vl-color: #9e9d24}\n",
       ".nad-vl0to30-6 {--nad-vl-color: #cddc39}\n",
       ".nad-vl0to30-7 {--nad-vl-color: #dce775}\n",
       ".nad-vl0to30-8 {--nad-vl-color: #ddfc88}\n",
       ".nad-vl30to50-line {--nad-vl-color: #ef9a9a}\n",
       ".nad-vl30to50-0 {--nad-vl-color: #c2185b}\n",
       ".nad-vl30to50-1 {--nad-vl-color: #f06292}\n",
       ".nad-vl30to50-2 {--nad-vl-color: #d81b60}\n",
       ".nad-vl30to50-3 {--nad-vl-color: #ec407a}\n",
       ".nad-vl30to50-4 {--nad-vl-color: #880e4f}\n",
       ".nad-vl30to50-5 {--nad-vl-color: #ad1457}\n",
       ".nad-vl30to50-6 {--nad-vl-color: #e91e63}\n",
       ".nad-vl30to50-7 {--nad-vl-color: #f48fb1}\n",
       ".nad-vl30to50-8 {--nad-vl-color: #f8bbd0}\n",
       ".nad-vl50to70-line {--nad-vl-color: #9c27b0}\n",
       ".nad-vl50to70-0 {--nad-vl-color: #7b1fa2}\n",
       ".nad-vl50to70-1 {--nad-vl-color: #ba68c8}\n",
       ".nad-vl50to70-2 {--nad-vl-color: #512da8}\n",
       ".nad-vl50to70-3 {--nad-vl-color: #ab47bc}\n",
       ".nad-vl50to70-4 {--nad-vl-color: #e1bee7}\n",
       ".nad-vl50to70-5 {--nad-vl-color: #6a1b9a}\n",
       ".nad-vl50to70-6 {--nad-vl-color: #4a148c}\n",
       ".nad-vl50to70-7 {--nad-vl-color: #ce93d8}\n",
       ".nad-vl50to70-8 {--nad-vl-color: #9575cd}\n",
       ".nad-vl70to120-line {--nad-vl-color: #e65100}\n",
       ".nad-vl70to120-0 {--nad-vl-color: #fb8c00}\n",
       ".nad-vl70to120-1 {--nad-vl-color: #ffb74d}\n",
       ".nad-vl70to120-2 {--nad-vl-color: #f57c00}\n",
       ".nad-vl70to120-3 {--nad-vl-color: #ffa726}\n",
       ".nad-vl70to120-4 {--nad-vl-color: #ffe0b2}\n",
       ".nad-vl70to120-5 {--nad-vl-color: #ef6c00}\n",
       ".nad-vl70to120-6 {--nad-vl-color: #ff9800}\n",
       ".nad-vl70to120-7 {--nad-vl-color: #ffcc80}\n",
       ".nad-vl70to120-8 {--nad-vl-color: #fff3e0}\n",
       ".nad-vl120to180-line {--nad-vl-color: #00ACC1}\n",
       ".nad-vl120to180-0 {--nad-vl-color: #4fc3f7}\n",
       ".nad-vl120to180-1 {--nad-vl-color: #01579b}\n",
       ".nad-vl120to180-2 {--nad-vl-color: #b3e5fc}\n",
       ".nad-vl120to180-3 {--nad-vl-color: #039be5}\n",
       ".nad-vl120to180-4 {--nad-vl-color: #81d4fa}\n",
       ".nad-vl120to180-5 {--nad-vl-color: #0288d1}\n",
       ".nad-vl120to180-6 {--nad-vl-color: #29b6f6}\n",
       ".nad-vl120to180-7 {--nad-vl-color: #0277bd}\n",
       ".nad-vl120to180-8 {--nad-vl-color: #03a9f4}\n",
       ".nad-vl180to300-line {--nad-vl-color: #2e7d32}\n",
       ".nad-vl180to300-0 {--nad-vl-color: #81c784}\n",
       ".nad-vl180to300-1 {--nad-vl-color: #558b2f}\n",
       ".nad-vl180to300-2 {--nad-vl-color: #c8e6c9}\n",
       ".nad-vl180to300-3 {--nad-vl-color: #43a047}\n",
       ".nad-vl180to300-4 {--nad-vl-color: #a5d6a7}\n",
       ".nad-vl180to300-5 {--nad-vl-color: #388e3c}\n",
       ".nad-vl180to300-6 {--nad-vl-color: #66bb6a}\n",
       ".nad-vl180to300-7 {--nad-vl-color: #1b5e20}\n",
       ".nad-vl180to300-8 {--nad-vl-color: #4caf50}\n",
       ".nad-vl300to500-line {--nad-vl-color: #d32f2f}\n",
       ".nad-vl300to500-0 {--nad-vl-color: #ef5350}\n",
       ".nad-vl300to500-1 {--nad-vl-color: #ef9a9a}\n",
       ".nad-vl300to500-2 {--nad-vl-color: #b71c1c}\n",
       ".nad-vl300to500-3 {--nad-vl-color: #e57373}\n",
       ".nad-vl300to500-4 {--nad-vl-color: #e53935}\n",
       ".nad-vl300to500-5 {--nad-vl-color: #ff8a80}\n",
       ".nad-vl300to500-6 {--nad-vl-color: #f44336}\n",
       ".nad-vl300to500-7 {--nad-vl-color: #ffcdd2}\n",
       ".nad-vl300to500-8 {--nad-vl-color: #c62828}\n",
       ".nad-branch-edges .nad-overload .nad-edge-path {animation: line-blink 3s infinite}\n",
       ".nad-vl-nodes .nad-overvoltage {animation: node-over-blink 3s infinite}\n",
       ".nad-vl-nodes .nad-undervoltage {animation: node-under-blink 3s infinite}\n",
       "\n",
       "@keyframes line-blink {\n",
       "  0%, 80%, 100% {stroke: var(--nad-vl-color, black); stroke-width: 5}\n",
       "  40% {stroke: #FFEB3B; stroke-width: 15}\n",
       "}\n",
       "@keyframes node-over-blink {\n",
       "  0%, 80%, 100% {stroke: white; stroke-width: 0}\n",
       "  40% {stroke: #ff5722; stroke-width: 15}\n",
       "}\n",
       "@keyframes node-under-blink {\n",
       "  0%, 80%, 100% {stroke: white; stroke-width: 0}\n",
       "  40% {stroke: #00BCD4; stroke-width: 15}\n",
       "}\n",
       "]]></style>\n",
       "    <metadata>\n",
       "        <nad:nad xmlns:nad=\"http://www.powsybl.org/schema/nad-metadata/1_0\">\n",
       "            <nad:busNodes>\n",
       "                <nad:busNode svgId=\"1\" equipmentId=\"NE_poste_0\"/>\n",
       "                <nad:busNode svgId=\"3\" equipmentId=\"NO_poste_0\"/>\n",
       "                <nad:busNode svgId=\"5\" equipmentId=\"N_poste_0\"/>\n",
       "                <nad:busNode svgId=\"7\" equipmentId=\"SE_poste_0\"/>\n",
       "                <nad:busNode svgId=\"9\" equipmentId=\"SO_poste_0\"/>\n",
       "                <nad:busNode svgId=\"11\" equipmentId=\"S_poste_0\"/>\n",
       "            </nad:busNodes>\n",
       "            <nad:nodes>\n",
       "                <nad:node svgId=\"0\" equipmentId=\"NE_poste\" x=\"346.38\" y=\"143.78\"/>\n",
       "                <nad:node svgId=\"2\" equipmentId=\"NO_poste\" x=\"72.45\" y=\"391.67\"/>\n",
       "                <nad:node svgId=\"4\" equipmentId=\"N_poste\" x=\"-10.06\" y=\"26.55\"/>\n",
       "                <nad:node svgId=\"6\" equipmentId=\"SE_poste\" x=\"633.10\" y=\"460.99\"/>\n",
       "                <nad:node svgId=\"8\" equipmentId=\"SO_poste\" x=\"358.46\" y=\"708.10\"/>\n",
       "                <nad:node svgId=\"10\" equipmentId=\"S_poste\" x=\"713.20\" y=\"827.58\"/>\n",
       "            </nad:nodes>\n",
       "            <nad:edges>\n",
       "                <nad:edge svgId=\"12\" equipmentId=\"NE_N_1\" node1=\"0\" node2=\"4\"/>\n",
       "                <nad:edge svgId=\"13\" equipmentId=\"NE_N_2\" node1=\"0\" node2=\"4\"/>\n",
       "                <nad:edge svgId=\"14\" equipmentId=\"SE_NE_1\" node1=\"6\" node2=\"0\"/>\n",
       "                <nad:edge svgId=\"15\" equipmentId=\"SE_NE_2\" node1=\"6\" node2=\"0\"/>\n",
       "                <nad:edge svgId=\"16\" equipmentId=\"NE_NO_1\" node1=\"0\" node2=\"2\"/>\n",
       "                <nad:edge svgId=\"17\" equipmentId=\"NO_N_1\" node1=\"2\" node2=\"4\"/>\n",
       "                <nad:edge svgId=\"18\" equipmentId=\"NO_N_2\" node1=\"2\" node2=\"4\"/>\n",
       "                <nad:edge svgId=\"19\" equipmentId=\"SO_NO_1\" node1=\"8\" node2=\"2\"/>\n",
       "                <nad:edge svgId=\"20\" equipmentId=\"SO_NO_2\" node1=\"8\" node2=\"2\"/>\n",
       "                <nad:edge svgId=\"21\" equipmentId=\"S_SE_1\" node1=\"10\" node2=\"6\"/>\n",
       "                <nad:edge svgId=\"22\" equipmentId=\"S_SE_2\" node1=\"10\" node2=\"6\"/>\n",
       "                <nad:edge svgId=\"23\" equipmentId=\"HVDC1\" node1=\"8\" node2=\"6\"/>\n",
       "                <nad:edge svgId=\"24\" equipmentId=\"HVDC2\" node1=\"8\" node2=\"6\"/>\n",
       "                <nad:edge svgId=\"25\" equipmentId=\"S_SO_1\" node1=\"10\" node2=\"8\"/>\n",
       "                <nad:edge svgId=\"26\" equipmentId=\"S_SO_2\" node1=\"10\" node2=\"8\"/>\n",
       "            </nad:edges>\n",
       "        </nad:nad>\n",
       "    </metadata>\n",
       "    <g class=\"nad-vl-nodes\">\n",
       "        <g transform=\"translate(346.38,143.78)\" id=\"0\">\n",
       "            <circle r=\"27.50\" id=\"1\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "        <g transform=\"translate(72.45,391.67)\" id=\"2\">\n",
       "            <circle r=\"27.50\" id=\"3\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "        <g transform=\"translate(-10.06,26.55)\" id=\"4\">\n",
       "            <circle r=\"27.50\" id=\"5\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "        <g transform=\"translate(633.10,460.99)\" id=\"6\">\n",
       "            <circle r=\"27.50\" id=\"7\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "        <g transform=\"translate(358.46,708.10)\" id=\"8\">\n",
       "            <circle r=\"27.50\" id=\"9\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "        <g transform=\"translate(713.20,827.58)\" id=\"10\">\n",
       "            <circle r=\"27.50\" id=\"11\" class=\"nad-vl300to500-0 nad-busnode\"/>\n",
       "        </g>\n",
       "    </g>\n",
       "    <g class=\"nad-branch-edges\">\n",
       "        <g id=\"12\">\n",
       "            <g id=\"12.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"328.06,123.28 293.07,84.14 180.66,47.17\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(264.57,74.77)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-71.79)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-341.79)\" x=\"-19.00\" style=\"text-anchor:end\">-48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"12.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"16.86,20.93 68.25,10.20 180.66,47.17\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(96.75,19.57)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(108.21)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(18.21)\" x=\"19.00\">48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"13\">\n",
       "            <g id=\"13.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"319.47,149.40 268.07,160.13 155.66,123.16\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(239.58,150.76)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-71.79)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-341.79)\" x=\"-19.00\" style=\"text-anchor:end\">-48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"13.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"8.27,47.05 43.25,86.20 155.66,123.16\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(71.75,95.57)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(108.21)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(18.21)\" x=\"19.00\">48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"14\">\n",
       "            <g id=\"14.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"627.33,434.10 616.32,382.77 519.42,275.56\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(596.20,360.51)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-42.11)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-312.11)\" x=\"-19.00\" style=\"text-anchor:end\">-96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"14.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"372.55,152.23 422.52,168.36 519.42,275.56\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(442.63,190.61)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(137.89)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(47.89)\" x=\"19.00\">96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"15\">\n",
       "            <g id=\"15.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"606.93,452.54 556.97,436.41 460.07,329.21\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(536.85,414.16)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-42.11)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-312.11)\" x=\"-19.00\" style=\"text-anchor:end\">-96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"15.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"352.15,170.67 363.17,222.00 460.07,329.21\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(383.28,244.26)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(137.89)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(47.89)\" x=\"19.00\">96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"16\">\n",
       "            <g id=\"16.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"325.99,162.23 231.66,247.60\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(301.90,184.04)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-132.14)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-42.14)\" x=\"-19.00\" style=\"text-anchor:end\">-96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"16.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"92.84,373.22 187.17,287.86\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(116.94,351.42)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(47.86)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-42.14)\" x=\"19.00\">96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g class=\"nad-glued-center\">\n",
       "                <circle class=\"nad-vl300to500-line nad-winding\" cx=\"216.83\" cy=\"261.02\" r=\"20.00\"/>\n",
       "                <circle class=\"nad-vl300to500-line nad-winding\" cx=\"202.00\" cy=\"274.44\" r=\"20.00\"/>\n",
       "                <path d=\"M60.00,0 0,60.00 M52.00,0 60.00,0 60.00,8.00\" transform=\"matrix(-0.74,0.67,-0.67,-0.74,251.79,269.84)\" class=\"nad-pst-arrow\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"17\">\n",
       "            <g id=\"17.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"80.62,365.41 96.20,315.28 70.21,200.30\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(89.58,286.02)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-12.73)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-282.73)\" x=\"-19.00\" style=\"text-anchor:end\">48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"17.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"8.60,46.75 44.23,85.31 70.21,200.30\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(50.84,114.58)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(167.27)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(77.27)\" x=\"19.00\">-48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"18\">\n",
       "            <g id=\"18.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"53.79,371.48 18.16,332.91 -7.82,217.93\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(11.55,303.65)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-12.73)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-282.73)\" x=\"-19.00\" style=\"text-anchor:end\">48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"18.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"-18.22,52.81 -33.81,102.95 -7.82,217.93\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(-27.19,132.21)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(167.27)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(77.27)\" x=\"19.00\">-48</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"19\">\n",
       "            <g id=\"19.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"352.69,681.21 341.68,629.88 245.13,523.06\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(321.56,607.62)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-42.11)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-312.11)\" x=\"-19.00\" style=\"text-anchor:end\">96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"19.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"98.62,400.12 148.58,416.25 245.13,523.06\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(168.70,438.51)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(137.89)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(47.89)\" x=\"19.00\">-96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"20\">\n",
       "            <g id=\"20.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"332.29,699.65 282.33,683.52 185.78,576.71\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(262.21,661.26)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-42.11)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-312.11)\" x=\"-19.00\" style=\"text-anchor:end\">96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"20.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"78.22,418.56 89.24,469.89 185.78,576.71\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(109.35,492.15)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(137.89)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(47.89)\" x=\"19.00\">-96</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"21\">\n",
       "            <g id=\"21.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"721.55,801.38 737.49,751.35 712.23,635.74\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(731.08,722.04)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-12.33)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-282.33)\" x=\"-19.00\" style=\"text-anchor:end\">144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"21.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"651.61,481.32 686.97,520.13 712.23,635.74\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(693.37,549.44)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(167.67)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(77.67)\" x=\"19.00\">-144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"22\">\n",
       "            <g id=\"22.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"694.68,807.25 659.33,768.43 634.07,652.82\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(652.93,739.12)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-12.33)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-282.33)\" x=\"-19.00\" style=\"text-anchor:end\">144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"22.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"624.75,487.19 608.81,537.21 634.07,652.82\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(615.21,566.52)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(167.67)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(77.67)\" x=\"19.00\">-144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"23\" class=\"nad-hvdc-edge\">\n",
       "            <g id=\"23.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"385.36,702.39 436.72,691.49 522.53,614.28\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(459.02,671.42)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(48.02)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-41.98)\" x=\"19.00\">0</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"23.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"624.59,487.14 608.35,537.06 522.53,614.28\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(586.05,557.13)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-131.98)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-41.98)\" x=\"-19.00\" style=\"text-anchor:end\">0</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g class=\"nad-glued-center\">\n",
       "                <polyline points=\"496.52,637.69 548.55,590.87\" class=\"nad-hvdc\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"24\" class=\"nad-hvdc-edge\">\n",
       "            <g id=\"24.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"366.97,681.94 383.21,632.02 469.02,554.81\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(405.51,611.95)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(48.02)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-41.98)\" x=\"19.00\">0</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"24.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"606.20,466.69 554.84,477.59 469.02,554.81\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(532.54,497.66)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(-131.98)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-41.98)\" x=\"-19.00\" style=\"text-anchor:end\">0</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g class=\"nad-glued-center\">\n",
       "                <polyline points=\"443.01,578.22 495.04,531.40\" class=\"nad-hvdc\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"25\">\n",
       "            <g id=\"25.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"695.02,806.94 660.31,767.55 548.60,729.93\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(631.88,757.98)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-71.39)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-341.39)\" x=\"-19.00\" style=\"text-anchor:end\">-144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"25.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"385.42,702.67 436.89,692.30 548.60,729.93\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(465.32,701.88)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(108.61)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(18.61)\" x=\"19.00\">144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g id=\"26\">\n",
       "            <g id=\"26.1\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-1\" points=\"686.24,833.01 634.77,843.37 523.06,805.74\"/>\n",
       "                <g class=\"nad-glued-1 nad-edge-infos\" transform=\"translate(606.34,833.79)\">\n",
       "                    <g class=\"nad-active nad-state-in\">\n",
       "                        <g transform=\"rotate(-71.39)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(-341.39)\" x=\"-19.00\" style=\"text-anchor:end\">-144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "            <g id=\"26.2\" class=\"nad-vl300to500-line\">\n",
       "                <polyline class=\"nad-edge-path nad-stretchable nad-glued-2\" points=\"376.64,728.73 411.35,768.12 523.06,805.74\"/>\n",
       "                <g class=\"nad-glued-2 nad-edge-infos\" transform=\"translate(439.78,777.69)\">\n",
       "                    <g class=\"nad-active nad-state-out\">\n",
       "                        <g transform=\"rotate(108.61)\">\n",
       "                            <path class=\"nad-arrow-in\" transform=\"scale(10.00)\" d=\"M-1 -1 H1 L0 1z\"/>\n",
       "                            <path class=\"nad-arrow-out\" transform=\"scale(10.00)\" d=\"M-1 1 H1 L0 -1z\"/>\n",
       "                        </g>\n",
       "                        <text transform=\"rotate(18.61)\" x=\"19.00\">144</text>\n",
       "                    </g>\n",
       "                </g>\n",
       "            </g>\n",
       "        </g>\n",
       "    </g>\n",
       "    <g class=\"nad-text-edges\">\n",
       "        <polyline id=\"0-textedge\" points=\"376.05,139.33 446.38,128.78\"/>\n",
       "        <polyline id=\"2-textedge\" points=\"102.12,387.22 172.45,376.67\"/>\n",
       "        <polyline id=\"4-textedge\" points=\"19.61,22.10 89.94,11.55\"/>\n",
       "        <polyline id=\"6-textedge\" points=\"662.77,456.54 733.10,445.99\"/>\n",
       "        <polyline id=\"8-textedge\" points=\"388.13,703.65 458.46,693.10\"/>\n",
       "        <polyline id=\"10-textedge\" points=\"742.87,823.13 813.20,812.58\"/>\n",
       "    </g>\n",
       "    <g class=\"nad-text-nodes\">\n",
       "        <foreignObject id=\"0-textnode\" y=\"103.78\" x=\"446.38\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>NE_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / -0.0°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "        <foreignObject id=\"2-textnode\" y=\"351.67\" x=\"172.45\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>NO_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / 0.0°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "        <foreignObject id=\"4-textnode\" y=\"-13.45\" x=\"89.94\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>N_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / -0.0°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "        <foreignObject id=\"6-textnode\" y=\"420.99\" x=\"733.10\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>SE_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / -0.1°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "        <foreignObject id=\"8-textnode\" y=\"668.10\" x=\"458.46\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>SO_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / 0.0°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "        <foreignObject id=\"10-textnode\" y=\"787.58\" x=\"813.20\" height=\"1\" width=\"1\">\n",
       "            <div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"nad-label-box\">\n",
       "                <div>S_poste</div>\n",
       "                <table>\n",
       "                    <tr>\n",
       "                        <td>\n",
       "                            <div class=\"nad-vl300to500-0 nad-legend-square\"/>\n",
       "                        </td>\n",
       "                        <td>380.0 kV / -0.0°</td>\n",
       "                    </tr>\n",
       "                </table>\n",
       "            </div>\n",
       "        </foreignObject>\n",
       "    </g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<pypowsybl.network.impl.svg.Svg at 0x7f7380423b80>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "six_nodes.get_network_area_diagram()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa = pp.security.create_analysis()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "raw_mimetype": "text/markdown"
   },
   "source": [
    "We simulate a contingency on line S_SO_1. When loosing this line, flows are redirected and line S_SO_2 is overloaded. We are going to test various operator strategies to remove the limit violation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_single_element_contingency('S_SO_1', 'S_SO_1_contingency')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_monitored_elements(branch_ids=['S_SO_2', 'SO_NO_1'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We add a current limit on line S_SO_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "six_nodes.create_operational_limits(pd.DataFrame.from_records(index='element_id', data=[\n",
    "   {'element_id': 'S_SO_2', 'name': 'permanent_limit', 'element_type': 'LINE', 'side': 'TWO',\n",
    "    'type': 'CURRENT', 'value': 400,\n",
    "    'acceptable_duration': np.Inf, 'is_fictitious': False}\n",
    " ]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Detailed topology"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### SO_poste"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<svg height=\"529.0\" viewBox=\"0 0 630.0 529.0\" width=\"630.0\" xmlns=\"http://www.w3.org/2000/svg\">\n",
       "    <style><![CDATA[\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File: tautologies.css ------------------------------------------------- */\n",
       ".sld-out .sld-arrow-in {visibility: hidden}\n",
       ".sld-in .sld-arrow-out {visibility: hidden}\n",
       ".sld-closed .sld-sw-open {visibility: hidden}\n",
       ".sld-open .sld-sw-closed {visibility: hidden}\n",
       ".sld-hidden-node {visibility: hidden}\n",
       ".sld-top-feeder .sld-label {dominant-baseline: auto}\n",
       ".sld-bottom-feeder .sld-label {dominant-baseline: hanging}\n",
       ".sld-active-power .sld-label {dominant-baseline: mathematical}\n",
       ".sld-reactive-power .sld-label {dominant-baseline: mathematical}\n",
       ".sld-current .sld-label {dominant-baseline: mathematical}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File: topologicalBaseVoltages.css ------------------------------------- */\n",
       ".sld-disconnected {--sld-vl-color: #808080}\n",
       ".sld-vl300to500-0 {--sld-vl-color: #FF0000}\n",
       ".sld-vl300to500-1 {--sld-vl-color: #7F6C00}\n",
       ".sld-vl300to500-2 {--sld-vl-color: #F6B2FF}\n",
       ".sld-vl300to500-3 {--sld-vl-color: #996700}\n",
       ".sld-vl300to500-4 {--sld-vl-color: #FF85EB}\n",
       ".sld-vl300to500-5 {--sld-vl-color: #B25B00}\n",
       ".sld-vl300to500-6 {--sld-vl-color: #FF59B5}\n",
       ".sld-vl300to500-7 {--sld-vl-color: #CC4400}\n",
       ".sld-vl300to500-8 {--sld-vl-color: #FF2C67}\n",
       ".sld-vl300to500-9 {--sld-vl-color: #E52600}\n",
       ".sld-vl180to300-0 {--sld-vl-color: #218B21}\n",
       ".sld-vl180to300-1 {--sld-vl-color: #0D4940}\n",
       ".sld-vl180to300-2 {--sld-vl-color: #DFDAB9}\n",
       ".sld-vl180to300-3 {--sld-vl-color: #105640}\n",
       ".sld-vl180to300-4 {--sld-vl-color: #C2CB92}\n",
       ".sld-vl180to300-5 {--sld-vl-color: #14643C}\n",
       ".sld-vl180to300-6 {--sld-vl-color: #95B66B}\n",
       ".sld-vl180to300-7 {--sld-vl-color: #187036}\n",
       ".sld-vl180to300-8 {--sld-vl-color: #5FA046}\n",
       ".sld-vl180to300-9 {--sld-vl-color: #1C7E2D}\n",
       ".sld-vl120to180-0 {--sld-vl-color: #00AFAE}\n",
       ".sld-vl120to180-1 {--sld-vl-color: #000D58}\n",
       ".sld-vl120to180-2 {--sld-vl-color: #B8E7B2}\n",
       ".sld-vl120to180-3 {--sld-vl-color: #002169}\n",
       ".sld-vl120to180-4 {--sld-vl-color: #85D993}\n",
       ".sld-vl120to180-5 {--sld-vl-color: #003C7B}\n",
       ".sld-vl120to180-6 {--sld-vl-color: #59CB8B}\n",
       ".sld-vl120to180-7 {--sld-vl-color: #005C8C}\n",
       ".sld-vl120to180-8 {--sld-vl-color: #2CBD94}\n",
       ".sld-vl120to180-9 {--sld-vl-color: #00839E}\n",
       ".sld-vl70to120-0 {--sld-vl-color: #CC5500}\n",
       ".sld-vl70to120-1 {--sld-vl-color: #4A6600}\n",
       ".sld-vl70to120-2 {--sld-vl-color: #EFB2DD}\n",
       ".sld-vl70to120-3 {--sld-vl-color: #6E7A00}\n",
       ".sld-vl70to120-4 {--sld-vl-color: #E685AE}\n",
       ".sld-vl70to120-5 {--sld-vl-color: #8E8400}\n",
       ".sld-vl70to120-6 {--sld-vl-color: #DD596B}\n",
       ".sld-vl70to120-7 {--sld-vl-color: #A37B00}\n",
       ".sld-vl70to120-8 {--sld-vl-color: #D4432C}\n",
       ".sld-vl70to120-9 {--sld-vl-color: #B76B00}\n",
       ".sld-vl50to70-0 {--sld-vl-color: #A020EF}\n",
       ".sld-vl50to70-1 {--sld-vl-color: #7F0848}\n",
       ".sld-vl50to70-2 {--sld-vl-color: #B7DBFE}\n",
       ".sld-vl50to70-3 {--sld-vl-color: #960C6D}\n",
       ".sld-vl50to70-4 {--sld-vl-color: #8DA6FE}\n",
       ".sld-vl50to70-5 {--sld-vl-color: #AD109A}\n",
       ".sld-vl50to70-6 {--sld-vl-color: #6F66FB}\n",
       ".sld-vl50to70-7 {--sld-vl-color: #BC14C4}\n",
       ".sld-vl50to70-8 {--sld-vl-color: #7F42F6}\n",
       ".sld-vl50to70-9 {--sld-vl-color: #B11AD9}\n",
       ".sld-vl30to50-0 {--sld-vl-color: #FF8290}\n",
       ".sld-vl30to50-1 {--sld-vl-color: #7F6F41}\n",
       ".sld-vl30to50-2 {--sld-vl-color: #F6D9FF}\n",
       ".sld-vl30to50-3 {--sld-vl-color: #99784E}\n",
       ".sld-vl30to50-4 {--sld-vl-color: #FFC3FB}\n",
       ".sld-vl30to50-5 {--sld-vl-color: #B27D5B}\n",
       ".sld-vl30to50-6 {--sld-vl-color: #FFADE3}\n",
       ".sld-vl30to50-7 {--sld-vl-color: #CC7E68}\n",
       ".sld-vl30to50-8 {--sld-vl-color: #FF97BF}\n",
       ".sld-vl30to50-9 {--sld-vl-color: #E57B75}\n",
       ".sld-vl0to30-0 {--sld-vl-color: #AAAE27}\n",
       ".sld-vl0to30-1 {--sld-vl-color: #195B0F}\n",
       ".sld-vl0to30-2 {--sld-vl-color: #EABABE}\n",
       ".sld-vl0to30-3 {--sld-vl-color: #2D6C13}\n",
       ".sld-vl0to30-4 {--sld-vl-color: #DDA193}\n",
       ".sld-vl0to30-5 {--sld-vl-color: #477D17}\n",
       ".sld-vl0to30-6 {--sld-vl-color: #CE9A6E}\n",
       ".sld-vl0to30-7 {--sld-vl-color: #648D1C}\n",
       ".sld-vl0to30-8 {--sld-vl-color: #BEA04A}\n",
       ".sld-vl0to30-9 {--sld-vl-color: #869D22}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File : highlightLineStates.css ---------------------------------------- */\n",
       ".sld-wire.sld-feeder-disconnected {stroke: black}\n",
       ".sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3}\n",
       ".sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File : components.css ------------------------------------------------- */\n",
       "/* Stroke black */\n",
       ".sld-disconnector {stroke-width: 3; stroke: black; fill: none}\n",
       "/* Stroke blue */\n",
       ".sld-breaker {stroke-width: 2; stroke: blue; fill:white}\n",
       ".sld-load-break-switch {stroke: blue; fill: white}\n",
       "/* Stroke --sld-vl-color with fallback black */\n",
       ".sld-bus-connection {fill: var(--sld-vl-color, black)}\n",
       ".sld-cell-shape-flat .sld-bus-connection {visibility: hidden}\n",
       ".sld-busbar-section {stroke: var(--sld-vl-color, black); stroke-width: 3; fill: none}\n",
       "/* Stroke --sld-vl-color with fallback red */\n",
       ".sld-wire {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       "/* Stroke --sld-vl-color with fallback blue */\n",
       ".sld-load {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-battery {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-generator {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-two-wt {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-three-wt {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-winding {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-capacitor {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-inductor {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-pst {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-pst-arrow {stroke: black; fill: none}\n",
       ".sld-svc {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-vsc {stroke: var(--sld-vl-color, blue); font-size: 7.43px; fill: none}\n",
       ".sld-lcc {stroke: var(--sld-vl-color, blue); font-size: 7.43px; fill: none}\n",
       ".sld-ground {stroke: var(--sld-vl-color, blue); fill: none}\n",
       "/* Stroke none & fill: --sld-vl-color */\n",
       ".sld-node-infos {stroke: none; fill: var(--sld-vl-color, black)}\n",
       "/* Stroke none & fill: black */\n",
       ".sld-node {stroke: none; fill: black}\n",
       ".sld-flash {stroke: none; fill: black}\n",
       ".sld-lock {stroke: none; fill: black}\n",
       ".sld-unknown {stroke: none; fill: black}\n",
       "/* Fonts */\n",
       ".sld-label {stroke: none; fill: black; font: 8px serif}\n",
       ".sld-angle, .sld-voltage {font: 10px serif}\n",
       ".sld-graph-label {font: 12px serif}\n",
       "/* Specific */\n",
       ".sld-grid {stroke: #003700; stroke-dasharray: 1,10}\n",
       ".sld-feeder-info.sld-active-power {fill:black}\n",
       ".sld-feeder-info.sld-reactive-power {fill:blue}\n",
       ".sld-feeder-info.sld-current {fill:purple}\n",
       ".sld-frame {fill: var(--sld-background-color, transparent)}\n",
       "/* Stroke maroon for fictitious switch */\n",
       ".sld-breaker.sld-fictitious {stroke: maroon}\n",
       ".sld-disconnector.sld-fictitious {stroke: maroon}\n",
       ".sld-load-break-switch.sld-fictitious {stroke: maroon}\n",
       ".sld-busbar-section.sld-fictitious {stroke: var(--sld-vl-color, #c80000); stroke-width: 1}\n",
       "/* ground disconnector specific */\n",
       ".sld-ground-disconnection-attach {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       ".sld-open .sld-ground-disconnection-ground {stroke: black; fill: none}\n",
       ".sld-closed .sld-ground-disconnection-ground {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       ".sld-ground-disconnection .sld-sw-open {stroke: black; fill: none}\n",
       ".sld-ground-disconnection .sld-sw-closed {stroke: black; fill: none}\n",
       "\n",
       "]]></style>\n",
       "    <rect class=\"sld-frame\" height=\"100%\" width=\"100%\"/>\n",
       "    <g>\n",
       "        <g class=\"sld-busbar-section sld-vl300to500-0\" id=\"idSOO1_95_1\" transform=\"translate(52.5,252.0)\">\n",
       "            <line x1=\"0\" x2=\"525.0\" y1=\"0\" y2=\"0\"/>\n",
       "            <text class=\"sld-label\" id=\"SOO1_1_NW_LABEL\" x=\"-5.0\" y=\"-5.0\">SOO1_1</text>\n",
       "        </g>\n",
       "        <g class=\"sld-busbar-section sld-vl300to500-0\" id=\"idSOO1_95_mnv\" transform=\"translate(52.5,277.0)\">\n",
       "            <line x1=\"0\" x2=\"525.0\" y1=\"0\" y2=\"0\"/>\n",
       "            <text class=\"sld-label\" id=\"SOO1_mnv_NW_LABEL\" x=\"-5.0\" y=\"-5.0\">SOO1_mnv</text>\n",
       "        </g>\n",
       "        <g class=\"sld-intern-cell sld-cell-shape-vertical\" id=\"idINTERN_32_0\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95__95_SC12_95_0_95_INTERNAL_95_SO_95_poste_95_8\">\n",
       "                <polyline points=\"115.0,252.0,115.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95__95_SC12_95_1_95_INTERNAL_95_SO_95_poste_95_8\">\n",
       "                <polyline points=\"115.0,277.0,115.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_8_95_SOO1_95_SOO1_95_DJ_95_OMN\">\n",
       "                <polyline points=\"115.0,212.0,100.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_95_DJ_95_OMN_95_INTERNAL_95_SO_95_poste_95_9\">\n",
       "                <polyline points=\"80.0,212.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95__95_SC13_95_0_95_INTERNAL_95_SO_95_poste_95_9\">\n",
       "                <polyline points=\"65.0,252.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95__95_SC13_95_1_95_INTERNAL_95_SO_95_poste_95_9\">\n",
       "                <polyline points=\"65.0,277.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95__95_SC12_95_0\" transform=\"translate(111.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_8\" transform=\"translate(111.0,208.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95__95_SC12_95_1\" transform=\"translate(111.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO1_95_DJ_95_OMN\" transform=\"translate(80.0,202.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\" transform=\"rotate(90.0,10.0,10.0)\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\" transform=\"rotate(90.0,10.0,10.0)\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_9\" transform=\"translate(61.0,208.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95__95_SC13_95_0\" transform=\"translate(61.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95__95_SC13_95_1\" transform=\"translate(61.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_1\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO11_95_G_95_SC3_95_0_95_INTERNAL_95_SO_95_poste_95_2\">\n",
       "                <polyline points=\"415.0,252.0,415.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO11_95_G_95_SC3_95_1_95_INTERNAL_95_SO_95_poste_95_2\">\n",
       "                <polyline points=\"415.0,277.0,415.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_2_95_SOO1_95_SOO11_95_G_95_DJ3\">\n",
       "                <polyline points=\"415.0,307.0,415.0,337.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO11_95_G_95_DJ3_95_INTERNAL_95_SO_95_poste_95_SO_95_G1\">\n",
       "                <polyline points=\"415.0,357.0,415.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SO_95_G1_95_SO_95_G1\">\n",
       "                <polyline points=\"415.0,387.0,415.0,443.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSO_95_G1_ARROW_REACTIVE\" transform=\"translate(410.0,418.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSO_95_G1_ARROW_ACTIVE\" transform=\"translate(410.0,398.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-480</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO11_95_G_95_SC3_95_0\" transform=\"translate(411.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_2\" transform=\"translate(411.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_SOO11_95_G_95_SC3_95_1\" transform=\"translate(411.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO11_95_G_95_DJ3\" transform=\"translate(405.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SO_95_G1\" transform=\"translate(411.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-generator sld-bottom-feeder sld-vl300to500-0\" id=\"idSO_95_G1\" transform=\"translate(409.0,443.0)\">\n",
       "                <circle cx=\"6\" cy=\"6\" r=\"6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 2,6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 10,6\"/>\n",
       "                <text class=\"sld-label\" id=\"SO_G1_S_LABEL\" x=\"-5.0\" y=\"17.0\">SO_G1</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_2\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_1_95_SC5_95_0_95_INTERNAL_95_SO_95_poste_95_4\">\n",
       "                <polyline points=\"515.0,252.0,515.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_1_95_SC5_95_1_95_INTERNAL_95_SO_95_poste_95_4\">\n",
       "                <polyline points=\"515.0,277.0,515.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_4_95_SOO1_95_SOO1_32__32_NOD1_32__32_1_95_DJ5\">\n",
       "                <polyline points=\"515.0,307.0,515.0,337.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_1_95_DJ5_95_INTERNAL_95_SO_95_poste_95_SO_95_NO_95_1_95_ONE\">\n",
       "                <polyline points=\"515.0,357.0,515.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SO_95_NO_95_1_95_ONE_95_SO_95_NO_95_1_95_ONE\">\n",
       "                <polyline points=\"515.0,387.0,515.0,449.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSO_95_NO_95_1_95_ONE_ARROW_REACTIVE\" transform=\"translate(510.0,424.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idSO_95_NO_95_1_95_ONE_ARROW_ACTIVE\" transform=\"translate(510.0,404.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">96</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_1_95_SC5_95_0\" transform=\"translate(511.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_4\" transform=\"translate(511.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_1_95_SC5_95_1\" transform=\"translate(511.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_1_95_DJ5\" transform=\"translate(505.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SO_95_NO_95_1_95_ONE\" transform=\"translate(511.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-bottom-feeder\" id=\"idSO_95_NO_95_1_95_ONE\" transform=\"translate(515.0,449.0)\">\n",
       "                <text class=\"sld-label\" id=\"SO_NO_1_ONE_S_LABEL\" x=\"-5.0\" y=\"5.0\">SO_NO_1</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_3\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_2_95_SC7_95_0_95_INTERNAL_95_SO_95_poste_95_6\">\n",
       "                <polyline points=\"565.0,252.0,565.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_2_95_SC7_95_1_95_INTERNAL_95_SO_95_poste_95_6\">\n",
       "                <polyline points=\"565.0,277.0,565.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_6_95_SOO1_95_SOO1_32__32_NOD1_32__32_2_95_DJ7\">\n",
       "                <polyline points=\"565.0,222.0,565.0,192.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_32__32_NOD1_32__32_2_95_DJ7_95_INTERNAL_95_SO_95_poste_95_SO_95_NO_95_2_95_ONE\">\n",
       "                <polyline points=\"565.0,172.0,565.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SO_95_NO_95_2_95_ONE_95_SO_95_NO_95_2_95_ONE\">\n",
       "                <polyline points=\"565.0,142.0,565.0,80.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idSO_95_NO_95_2_95_ONE_ARROW_ACTIVE\" transform=\"translate(560.0,95.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">96</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSO_95_NO_95_2_95_ONE_ARROW_REACTIVE\" transform=\"translate(560.0,115.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_2_95_SC7_95_0\" transform=\"translate(561.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_6\" transform=\"translate(561.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_2_95_SC7_95_1\" transform=\"translate(561.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_SOO1_32__32_NOD1_32__32_2_95_DJ7\" transform=\"translate(555.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SO_95_NO_95_2_95_ONE\" transform=\"translate(561.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-top-feeder\" id=\"idSO_95_NO_95_2_95_ONE\" transform=\"translate(565.0,80.0)\">\n",
       "                <text class=\"sld-label\" id=\"SO_NO_2_ONE_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SO_NO_2</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_4\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_11_95_SOO1_95_Sect_32_1_32_HVDC1\">\n",
       "                <polyline points=\"165.0,222.0,165.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_HVDC1_95_INTERNAL_95_SO_95_poste_95_11\">\n",
       "                <polyline points=\"165.0,192.0,165.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_11_95_SOO1_95_Sect_32_mnv_32_HVDC1\">\n",
       "                <polyline points=\"165.0,222.0,165.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC1_95_SOO1_95_Disj_32_HVDC1\">\n",
       "                <polyline points=\"165.0,142.0,165.0,172.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC1_95_INTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC1\">\n",
       "                <polyline points=\"165.0,86.0,165.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSOO1_95_SOO1_95_HVDC1_ARROW_ACTIVE\" transform=\"translate(160.0,101.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSOO1_95_SOO1_95_HVDC1_ARROW_REACTIVE\" transform=\"translate(160.0,121.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_1_32_HVDC1\" transform=\"translate(161.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_11\" transform=\"translate(161.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_HVDC1\" transform=\"translate(155.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC1\" transform=\"translate(161.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-vsc sld-top-feeder sld-vl300to500-0\" id=\"idSOO1_95_SOO1_95_HVDC1\" transform=\"translate(157.0,76.0)\">\n",
       "                <text x=\"-15.5\" y=\"6.6\">AC / DC - VSC</text>\n",
       "                <text class=\"sld-label\" id=\"SOO1_SOO1_HVDC1_N_LABEL\" x=\"-5.0\" y=\"-5.0\">HVDC1</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_mnv_32_HVDC1\" transform=\"translate(161.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_5\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_13_95_SOO1_95_Sect_32_1_32_HVDC2\">\n",
       "                <polyline points=\"215.0,307.0,215.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_HVDC2_95_INTERNAL_95_SO_95_poste_95_13\">\n",
       "                <polyline points=\"215.0,337.0,215.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_13_95_SOO1_95_Sect_32_mnv_32_HVDC2\">\n",
       "                <polyline points=\"215.0,307.0,215.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC2_95_SOO1_95_Disj_32_HVDC2\">\n",
       "                <polyline points=\"215.0,387.0,215.0,357.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC2_95_INTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC2\">\n",
       "                <polyline points=\"215.0,443.0,215.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSOO1_95_SOO1_95_HVDC2_ARROW_REACTIVE\" transform=\"translate(210.0,418.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSOO1_95_SOO1_95_HVDC2_ARROW_ACTIVE\" transform=\"translate(210.0,398.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_1_32_HVDC2\" transform=\"translate(211.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_13\" transform=\"translate(211.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_HVDC2\" transform=\"translate(205.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SOO1_95_SOO1_95_HVDC2\" transform=\"translate(211.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-vsc sld-bottom-feeder sld-vl300to500-0\" id=\"idSOO1_95_SOO1_95_HVDC2\" transform=\"translate(207.0,445.0)\">\n",
       "                <text x=\"-15.5\" y=\"6.6\">AC / DC - VSC</text>\n",
       "                <text class=\"sld-label\" id=\"SOO1_SOO1_HVDC2_S_LABEL\" x=\"-5.0\" y=\"13.0\">HVDC2</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_mnv_32_HVDC2\" transform=\"translate(211.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_6\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_15_95_SOO1_95_Sect_32_1_32_SS1_32_SOO1_32_1\">\n",
       "                <polyline points=\"265.0,222.0,265.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_SS1_32_SOO1_32_1_95_INTERNAL_95_SO_95_poste_95_15\">\n",
       "                <polyline points=\"265.0,192.0,265.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_15_95_SOO1_95_Sect_32_mnv_32_SS1_32_SOO1_32_1\">\n",
       "                <polyline points=\"265.0,222.0,265.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_S_95_SO_95_1_95_TWO_95_SOO1_95_Disj_32_SS1_32_SOO1_32_1\">\n",
       "                <polyline points=\"265.0,142.0,265.0,172.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_S_95_SO_95_1_95_TWO_95_INTERNAL_95_SO_95_poste_95_S_95_SO_95_1_95_TWO\">\n",
       "                <polyline points=\"265.0,80.0,265.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idS_95_SO_95_1_95_TWO_ARROW_ACTIVE\" transform=\"translate(260.0,95.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">144</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idS_95_SO_95_1_95_TWO_ARROW_REACTIVE\" transform=\"translate(260.0,115.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_1_32_SS1_32_SOO1_32_1\" transform=\"translate(261.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_15\" transform=\"translate(261.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_SS1_32_SOO1_32_1\" transform=\"translate(255.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_S_95_SO_95_1_95_TWO\" transform=\"translate(261.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-top-feeder\" id=\"idS_95_SO_95_1_95_TWO\" transform=\"translate(265.0,80.0)\">\n",
       "                <text class=\"sld-label\" id=\"S_SO_1_TWO_N_LABEL\" x=\"-5.0\" y=\"-5.0\">S_SO_1</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_mnv_32_SS1_32_SOO1_32_1\" transform=\"translate(261.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_7\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_17_95_SOO1_95_Sect_32_1_32_SS1_32_SOO1_32_2\">\n",
       "                <polyline points=\"315.0,307.0,315.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_SS1_32_SOO1_32_2_95_INTERNAL_95_SO_95_poste_95_17\">\n",
       "                <polyline points=\"315.0,337.0,315.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_17_95_SOO1_95_Sect_32_mnv_32_SS1_32_SOO1_32_2\">\n",
       "                <polyline points=\"315.0,307.0,315.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_S_95_SO_95_2_95_TWO_95_SOO1_95_Disj_32_SS1_32_SOO1_32_2\">\n",
       "                <polyline points=\"315.0,387.0,315.0,357.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_S_95_SO_95_2_95_TWO_95_INTERNAL_95_SO_95_poste_95_S_95_SO_95_2_95_TWO\">\n",
       "                <polyline points=\"315.0,449.0,315.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idS_95_SO_95_2_95_TWO_ARROW_REACTIVE\" transform=\"translate(310.0,424.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idS_95_SO_95_2_95_TWO_ARROW_ACTIVE\" transform=\"translate(310.0,404.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">144</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_1_32_SS1_32_SOO1_32_2\" transform=\"translate(311.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_17\" transform=\"translate(311.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_SS1_32_SOO1_32_2\" transform=\"translate(305.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_S_95_SO_95_2_95_TWO\" transform=\"translate(311.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-bottom-feeder\" id=\"idS_95_SO_95_2_95_TWO\" transform=\"translate(315.0,449.0)\">\n",
       "                <text class=\"sld-label\" id=\"S_SO_2_TWO_S_LABEL\" x=\"-5.0\" y=\"5.0\">S_SO_2</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_mnv_32_SS1_32_SOO1_32_2\" transform=\"translate(311.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_8\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_19_95_SOO1_95_Sect_32_1_32_SOO11_95_L\">\n",
       "                <polyline points=\"365.0,222.0,365.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_SOO11_95_L_95_INTERNAL_95_SO_95_poste_95_19\">\n",
       "                <polyline points=\"365.0,192.0,365.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_19_95_SOO1_95_Sect_32_mnv_32_SOO11_95_L\">\n",
       "                <polyline points=\"365.0,222.0,365.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SO_95_L_95_SOO1_95_Disj_32_SOO11_95_L\">\n",
       "                <polyline points=\"365.0,142.0,365.0,172.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SO_95_L_95_INTERNAL_95_SO_95_poste_95_SO_95_L\">\n",
       "                <polyline points=\"365.0,84.5,365.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idSO_95_L_ARROW_ACTIVE\" transform=\"translate(360.0,99.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">480</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSO_95_L_ARROW_REACTIVE\" transform=\"translate(360.0,119.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_1_32_SOO11_95_L\" transform=\"translate(361.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_19\" transform=\"translate(361.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_SOO11_95_L\" transform=\"translate(355.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SO_95_L\" transform=\"translate(361.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-load sld-top-feeder sld-vl300to500-0\" id=\"idSO_95_L\" transform=\"translate(357.0,75.5)\">\n",
       "                <rect height=\"9\" width=\"16\"/>\n",
       "                <line x1=\"0\" x2=\"16\" y1=\"0\" y2=\"9\"/>\n",
       "                <line x1=\"16\" x2=\"0\" y1=\"0\" y2=\"9\"/>\n",
       "                <text class=\"sld-label\" id=\"SO_L_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SO_L</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_mnv_32_SOO11_95_L\" transform=\"translate(361.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_9\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_21_95_SOO1_95_Sect_32_1_32_SOO12_95_G\">\n",
       "                <polyline points=\"465.0,222.0,465.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SOO1_95_Disj_32_SOO12_95_G_95_INTERNAL_95_SO_95_poste_95_21\">\n",
       "                <polyline points=\"465.0,192.0,465.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_21_95_SOO1_95_Sect_32_mnv_32_SOO12_95_G\">\n",
       "                <polyline points=\"465.0,222.0,465.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_INTERNAL_95_SO_95_poste_95_SO_95_G2_95_SOO1_95_Disj_32_SOO12_95_G\">\n",
       "                <polyline points=\"465.0,142.0,465.0,172.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SO_95_poste_95_SO_95_G2_95_INTERNAL_95_SO_95_poste_95_SO_95_G2\">\n",
       "                <polyline points=\"465.0,86.0,465.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSO_95_G2_ARROW_ACTIVE\" transform=\"translate(460.0,101.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-480</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSO_95_G2_ARROW_REACTIVE\" transform=\"translate(460.0,121.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSOO1_95_Sect_32_1_32_SOO12_95_G\" transform=\"translate(461.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_21\" transform=\"translate(461.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Disj_32_SOO12_95_G\" transform=\"translate(455.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SO_95_poste_95_SO_95_G2\" transform=\"translate(461.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-generator sld-top-feeder sld-vl300to500-0\" id=\"idSO_95_G2\" transform=\"translate(459.0,74.0)\">\n",
       "                <circle cx=\"6\" cy=\"6\" r=\"6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 2,6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 10,6\"/>\n",
       "                <text class=\"sld-label\" id=\"SO_G2_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SO_G2</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSOO1_95_Sect_32_mnv_32_SOO12_95_G\" transform=\"translate(461.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "    </g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<pypowsybl.network.impl.svg.Svg at 0x7f738041b100>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "six_nodes.get_single_line_diagram('SO_poste')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### SE_poste"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<svg height=\"529.0\" viewBox=\"0 0 630.0 529.0\" width=\"630.0\" xmlns=\"http://www.w3.org/2000/svg\">\n",
       "    <style><![CDATA[\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File: tautologies.css ------------------------------------------------- */\n",
       ".sld-out .sld-arrow-in {visibility: hidden}\n",
       ".sld-in .sld-arrow-out {visibility: hidden}\n",
       ".sld-closed .sld-sw-open {visibility: hidden}\n",
       ".sld-open .sld-sw-closed {visibility: hidden}\n",
       ".sld-hidden-node {visibility: hidden}\n",
       ".sld-top-feeder .sld-label {dominant-baseline: auto}\n",
       ".sld-bottom-feeder .sld-label {dominant-baseline: hanging}\n",
       ".sld-active-power .sld-label {dominant-baseline: mathematical}\n",
       ".sld-reactive-power .sld-label {dominant-baseline: mathematical}\n",
       ".sld-current .sld-label {dominant-baseline: mathematical}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File: topologicalBaseVoltages.css ------------------------------------- */\n",
       ".sld-disconnected {--sld-vl-color: #808080}\n",
       ".sld-vl300to500-0 {--sld-vl-color: #FF0000}\n",
       ".sld-vl300to500-1 {--sld-vl-color: #7F6C00}\n",
       ".sld-vl300to500-2 {--sld-vl-color: #F6B2FF}\n",
       ".sld-vl300to500-3 {--sld-vl-color: #996700}\n",
       ".sld-vl300to500-4 {--sld-vl-color: #FF85EB}\n",
       ".sld-vl300to500-5 {--sld-vl-color: #B25B00}\n",
       ".sld-vl300to500-6 {--sld-vl-color: #FF59B5}\n",
       ".sld-vl300to500-7 {--sld-vl-color: #CC4400}\n",
       ".sld-vl300to500-8 {--sld-vl-color: #FF2C67}\n",
       ".sld-vl300to500-9 {--sld-vl-color: #E52600}\n",
       ".sld-vl180to300-0 {--sld-vl-color: #218B21}\n",
       ".sld-vl180to300-1 {--sld-vl-color: #0D4940}\n",
       ".sld-vl180to300-2 {--sld-vl-color: #DFDAB9}\n",
       ".sld-vl180to300-3 {--sld-vl-color: #105640}\n",
       ".sld-vl180to300-4 {--sld-vl-color: #C2CB92}\n",
       ".sld-vl180to300-5 {--sld-vl-color: #14643C}\n",
       ".sld-vl180to300-6 {--sld-vl-color: #95B66B}\n",
       ".sld-vl180to300-7 {--sld-vl-color: #187036}\n",
       ".sld-vl180to300-8 {--sld-vl-color: #5FA046}\n",
       ".sld-vl180to300-9 {--sld-vl-color: #1C7E2D}\n",
       ".sld-vl120to180-0 {--sld-vl-color: #00AFAE}\n",
       ".sld-vl120to180-1 {--sld-vl-color: #000D58}\n",
       ".sld-vl120to180-2 {--sld-vl-color: #B8E7B2}\n",
       ".sld-vl120to180-3 {--sld-vl-color: #002169}\n",
       ".sld-vl120to180-4 {--sld-vl-color: #85D993}\n",
       ".sld-vl120to180-5 {--sld-vl-color: #003C7B}\n",
       ".sld-vl120to180-6 {--sld-vl-color: #59CB8B}\n",
       ".sld-vl120to180-7 {--sld-vl-color: #005C8C}\n",
       ".sld-vl120to180-8 {--sld-vl-color: #2CBD94}\n",
       ".sld-vl120to180-9 {--sld-vl-color: #00839E}\n",
       ".sld-vl70to120-0 {--sld-vl-color: #CC5500}\n",
       ".sld-vl70to120-1 {--sld-vl-color: #4A6600}\n",
       ".sld-vl70to120-2 {--sld-vl-color: #EFB2DD}\n",
       ".sld-vl70to120-3 {--sld-vl-color: #6E7A00}\n",
       ".sld-vl70to120-4 {--sld-vl-color: #E685AE}\n",
       ".sld-vl70to120-5 {--sld-vl-color: #8E8400}\n",
       ".sld-vl70to120-6 {--sld-vl-color: #DD596B}\n",
       ".sld-vl70to120-7 {--sld-vl-color: #A37B00}\n",
       ".sld-vl70to120-8 {--sld-vl-color: #D4432C}\n",
       ".sld-vl70to120-9 {--sld-vl-color: #B76B00}\n",
       ".sld-vl50to70-0 {--sld-vl-color: #A020EF}\n",
       ".sld-vl50to70-1 {--sld-vl-color: #7F0848}\n",
       ".sld-vl50to70-2 {--sld-vl-color: #B7DBFE}\n",
       ".sld-vl50to70-3 {--sld-vl-color: #960C6D}\n",
       ".sld-vl50to70-4 {--sld-vl-color: #8DA6FE}\n",
       ".sld-vl50to70-5 {--sld-vl-color: #AD109A}\n",
       ".sld-vl50to70-6 {--sld-vl-color: #6F66FB}\n",
       ".sld-vl50to70-7 {--sld-vl-color: #BC14C4}\n",
       ".sld-vl50to70-8 {--sld-vl-color: #7F42F6}\n",
       ".sld-vl50to70-9 {--sld-vl-color: #B11AD9}\n",
       ".sld-vl30to50-0 {--sld-vl-color: #FF8290}\n",
       ".sld-vl30to50-1 {--sld-vl-color: #7F6F41}\n",
       ".sld-vl30to50-2 {--sld-vl-color: #F6D9FF}\n",
       ".sld-vl30to50-3 {--sld-vl-color: #99784E}\n",
       ".sld-vl30to50-4 {--sld-vl-color: #FFC3FB}\n",
       ".sld-vl30to50-5 {--sld-vl-color: #B27D5B}\n",
       ".sld-vl30to50-6 {--sld-vl-color: #FFADE3}\n",
       ".sld-vl30to50-7 {--sld-vl-color: #CC7E68}\n",
       ".sld-vl30to50-8 {--sld-vl-color: #FF97BF}\n",
       ".sld-vl30to50-9 {--sld-vl-color: #E57B75}\n",
       ".sld-vl0to30-0 {--sld-vl-color: #AAAE27}\n",
       ".sld-vl0to30-1 {--sld-vl-color: #195B0F}\n",
       ".sld-vl0to30-2 {--sld-vl-color: #EABABE}\n",
       ".sld-vl0to30-3 {--sld-vl-color: #2D6C13}\n",
       ".sld-vl0to30-4 {--sld-vl-color: #DDA193}\n",
       ".sld-vl0to30-5 {--sld-vl-color: #477D17}\n",
       ".sld-vl0to30-6 {--sld-vl-color: #CE9A6E}\n",
       ".sld-vl0to30-7 {--sld-vl-color: #648D1C}\n",
       ".sld-vl0to30-8 {--sld-vl-color: #BEA04A}\n",
       ".sld-vl0to30-9 {--sld-vl-color: #869D22}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File : highlightLineStates.css ---------------------------------------- */\n",
       ".sld-wire.sld-feeder-disconnected {stroke: black}\n",
       ".sld-wire.sld-feeder-connected-disconnected {stroke-dasharray: 3,3}\n",
       ".sld-wire.sld-feeder-disconnected-connected {stroke: black; stroke-dasharray: 3,3}\n",
       "/* ----------------------------------------------------------------------- */\n",
       "/* File : components.css ------------------------------------------------- */\n",
       "/* Stroke black */\n",
       ".sld-disconnector {stroke-width: 3; stroke: black; fill: none}\n",
       "/* Stroke blue */\n",
       ".sld-breaker {stroke-width: 2; stroke: blue; fill:white}\n",
       ".sld-load-break-switch {stroke: blue; fill: white}\n",
       "/* Stroke --sld-vl-color with fallback black */\n",
       ".sld-bus-connection {fill: var(--sld-vl-color, black)}\n",
       ".sld-cell-shape-flat .sld-bus-connection {visibility: hidden}\n",
       ".sld-busbar-section {stroke: var(--sld-vl-color, black); stroke-width: 3; fill: none}\n",
       "/* Stroke --sld-vl-color with fallback red */\n",
       ".sld-wire {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       "/* Stroke --sld-vl-color with fallback blue */\n",
       ".sld-load {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-battery {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-generator {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-two-wt {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-three-wt {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-winding {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-capacitor {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-inductor {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-pst {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-pst-arrow {stroke: black; fill: none}\n",
       ".sld-svc {stroke: var(--sld-vl-color, blue); fill: none}\n",
       ".sld-vsc {stroke: var(--sld-vl-color, blue); font-size: 7.43px; fill: none}\n",
       ".sld-lcc {stroke: var(--sld-vl-color, blue); font-size: 7.43px; fill: none}\n",
       ".sld-ground {stroke: var(--sld-vl-color, blue); fill: none}\n",
       "/* Stroke none & fill: --sld-vl-color */\n",
       ".sld-node-infos {stroke: none; fill: var(--sld-vl-color, black)}\n",
       "/* Stroke none & fill: black */\n",
       ".sld-node {stroke: none; fill: black}\n",
       ".sld-flash {stroke: none; fill: black}\n",
       ".sld-lock {stroke: none; fill: black}\n",
       ".sld-unknown {stroke: none; fill: black}\n",
       "/* Fonts */\n",
       ".sld-label {stroke: none; fill: black; font: 8px serif}\n",
       ".sld-angle, .sld-voltage {font: 10px serif}\n",
       ".sld-graph-label {font: 12px serif}\n",
       "/* Specific */\n",
       ".sld-grid {stroke: #003700; stroke-dasharray: 1,10}\n",
       ".sld-feeder-info.sld-active-power {fill:black}\n",
       ".sld-feeder-info.sld-reactive-power {fill:blue}\n",
       ".sld-feeder-info.sld-current {fill:purple}\n",
       ".sld-frame {fill: var(--sld-background-color, transparent)}\n",
       "/* Stroke maroon for fictitious switch */\n",
       ".sld-breaker.sld-fictitious {stroke: maroon}\n",
       ".sld-disconnector.sld-fictitious {stroke: maroon}\n",
       ".sld-load-break-switch.sld-fictitious {stroke: maroon}\n",
       ".sld-busbar-section.sld-fictitious {stroke: var(--sld-vl-color, #c80000); stroke-width: 1}\n",
       "/* ground disconnector specific */\n",
       ".sld-ground-disconnection-attach {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       ".sld-open .sld-ground-disconnection-ground {stroke: black; fill: none}\n",
       ".sld-closed .sld-ground-disconnection-ground {stroke: var(--sld-vl-color, #c80000); fill: none}\n",
       ".sld-ground-disconnection .sld-sw-open {stroke: black; fill: none}\n",
       ".sld-ground-disconnection .sld-sw-closed {stroke: black; fill: none}\n",
       "\n",
       "]]></style>\n",
       "    <rect class=\"sld-frame\" height=\"100%\" width=\"100%\"/>\n",
       "    <g>\n",
       "        <g class=\"sld-busbar-section sld-vl300to500-0\" id=\"idSEI1_95_1\" transform=\"translate(52.5,252.0)\">\n",
       "            <line x1=\"0\" x2=\"525.0\" y1=\"0\" y2=\"0\"/>\n",
       "            <text class=\"sld-label\" id=\"SEI1_1_NW_LABEL\" x=\"-5.0\" y=\"-5.0\">SEI1_1</text>\n",
       "        </g>\n",
       "        <g class=\"sld-busbar-section sld-vl300to500-0\" id=\"idSEI1_95_mnv\" transform=\"translate(52.5,277.0)\">\n",
       "            <line x1=\"0\" x2=\"525.0\" y1=\"0\" y2=\"0\"/>\n",
       "            <text class=\"sld-label\" id=\"SEI1_mnv_NW_LABEL\" x=\"-5.0\" y=\"-5.0\">SEI1_mnv</text>\n",
       "        </g>\n",
       "        <g class=\"sld-intern-cell sld-cell-shape-vertical\" id=\"idINTERN_32_0\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95__95_SC12_95_0_95_INTERNAL_95_SE_95_poste_95_12\">\n",
       "                <polyline points=\"115.0,252.0,115.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95__95_SC12_95_1_95_INTERNAL_95_SE_95_poste_95_12\">\n",
       "                <polyline points=\"115.0,277.0,115.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_12_95_SEI1_95_SEI1_95_DJ_95_OMN\">\n",
       "                <polyline points=\"115.0,212.0,100.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_95_DJ_95_OMN_95_INTERNAL_95_SE_95_poste_95_13\">\n",
       "                <polyline points=\"80.0,212.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95__95_SC13_95_0_95_INTERNAL_95_SE_95_poste_95_13\">\n",
       "                <polyline points=\"65.0,252.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95__95_SC13_95_1_95_INTERNAL_95_SE_95_poste_95_13\">\n",
       "                <polyline points=\"65.0,277.0,65.0,212.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95__95_SC12_95_0\" transform=\"translate(111.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_12\" transform=\"translate(111.0,208.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95__95_SC12_95_1\" transform=\"translate(111.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI1_95_DJ_95_OMN\" transform=\"translate(80.0,202.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\" transform=\"rotate(90.0,10.0,10.0)\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\" transform=\"rotate(90.0,10.0,10.0)\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_13\" transform=\"translate(61.0,208.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95__95_SC13_95_0\" transform=\"translate(61.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95__95_SC13_95_1\" transform=\"translate(61.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_1\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI11_95_G_95_SC3_95_0_95_INTERNAL_95_SE_95_poste_95_2\">\n",
       "                <polyline points=\"365.0,252.0,365.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI11_95_G_95_SC3_95_1_95_INTERNAL_95_SE_95_poste_95_2\">\n",
       "                <polyline points=\"365.0,277.0,365.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_2_95_SEI1_95_SEI11_95_G_95_DJ3\">\n",
       "                <polyline points=\"365.0,222.0,365.0,192.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI11_95_G_95_DJ3_95_INTERNAL_95_SE_95_poste_95_SE_95_G\">\n",
       "                <polyline points=\"365.0,172.0,365.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SE_95_G_95_SE_95_G\">\n",
       "                <polyline points=\"365.0,142.0,365.0,86.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSE_95_G_ARROW_ACTIVE\" transform=\"translate(360.0,101.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSE_95_G_ARROW_REACTIVE\" transform=\"translate(360.0,121.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI11_95_G_95_SC3_95_0\" transform=\"translate(361.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_2\" transform=\"translate(361.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_SEI11_95_G_95_SC3_95_1\" transform=\"translate(361.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI11_95_G_95_DJ3\" transform=\"translate(355.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SE_95_G\" transform=\"translate(361.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-generator sld-top-feeder sld-vl300to500-0\" id=\"idSE_95_G\" transform=\"translate(359.0,74.0)\">\n",
       "                <circle cx=\"6\" cy=\"6\" r=\"6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 2,6\"/>\n",
       "                <path d=\"M6,6 A 6 40 0 0 0 10,6\"/>\n",
       "                <text class=\"sld-label\" id=\"SE_G_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SE_G</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_2\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_1_95_SC5_95_0_95_INTERNAL_95_SE_95_poste_95_4\">\n",
       "                <polyline points=\"465.0,252.0,465.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_1_95_SC5_95_1_95_INTERNAL_95_SE_95_poste_95_4\">\n",
       "                <polyline points=\"465.0,277.0,465.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_4_95_SEI1_95_SS1_32__32_SEI1_32__32_1_95_DJ5\">\n",
       "                <polyline points=\"465.0,222.0,465.0,192.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_1_95_DJ5_95_INTERNAL_95_SE_95_poste_95_S_95_SE_95_1_95_TWO\">\n",
       "                <polyline points=\"465.0,172.0,465.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_S_95_SE_95_1_95_TWO_95_S_95_SE_95_1_95_TWO\">\n",
       "                <polyline points=\"465.0,142.0,465.0,80.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idS_95_SE_95_1_95_TWO_ARROW_ACTIVE\" transform=\"translate(460.0,95.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-144</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idS_95_SE_95_1_95_TWO_ARROW_REACTIVE\" transform=\"translate(460.0,115.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_1_95_SC5_95_0\" transform=\"translate(461.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_4\" transform=\"translate(461.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_1_95_SC5_95_1\" transform=\"translate(461.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_1_95_DJ5\" transform=\"translate(455.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_S_95_SE_95_1_95_TWO\" transform=\"translate(461.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-top-feeder\" id=\"idS_95_SE_95_1_95_TWO\" transform=\"translate(465.0,80.0)\">\n",
       "                <text class=\"sld-label\" id=\"S_SE_1_TWO_N_LABEL\" x=\"-5.0\" y=\"-5.0\">S_SE_1</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_3\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_2_95_SC7_95_0_95_INTERNAL_95_SE_95_poste_95_6\">\n",
       "                <polyline points=\"515.0,252.0,515.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_2_95_SC7_95_1_95_INTERNAL_95_SE_95_poste_95_6\">\n",
       "                <polyline points=\"515.0,277.0,515.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_6_95_SEI1_95_SS1_32__32_SEI1_32__32_2_95_DJ7\">\n",
       "                <polyline points=\"515.0,307.0,515.0,337.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SS1_32__32_SEI1_32__32_2_95_DJ7_95_INTERNAL_95_SE_95_poste_95_S_95_SE_95_2_95_TWO\">\n",
       "                <polyline points=\"515.0,357.0,515.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_S_95_SE_95_2_95_TWO_95_S_95_SE_95_2_95_TWO\">\n",
       "                <polyline points=\"515.0,387.0,515.0,449.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idS_95_SE_95_2_95_TWO_ARROW_REACTIVE\" transform=\"translate(510.0,424.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idS_95_SE_95_2_95_TWO_ARROW_ACTIVE\" transform=\"translate(510.0,404.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-144</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_2_95_SC7_95_0\" transform=\"translate(511.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_6\" transform=\"translate(511.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_2_95_SC7_95_1\" transform=\"translate(511.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SS1_32__32_SEI1_32__32_2_95_DJ7\" transform=\"translate(505.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_S_95_SE_95_2_95_TWO\" transform=\"translate(511.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-bottom-feeder\" id=\"idS_95_SE_95_2_95_TWO\" transform=\"translate(515.0,449.0)\">\n",
       "                <text class=\"sld-label\" id=\"S_SE_2_TWO_S_LABEL\" x=\"-5.0\" y=\"5.0\">S_SE_2</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_4\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_1_95_SC9_95_0_95_INTERNAL_95_SE_95_poste_95_8\">\n",
       "                <polyline points=\"565.0,252.0,565.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_1_95_SC9_95_1_95_INTERNAL_95_SE_95_poste_95_8\">\n",
       "                <polyline points=\"565.0,277.0,565.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_8_95_SEI1_95_SEI1_32__32_NETD_32__32_1_95_DJ9\">\n",
       "                <polyline points=\"565.0,222.0,565.0,192.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_1_95_DJ9_95_INTERNAL_95_SE_95_poste_95_SE_95_NE_95_1_95_ONE\">\n",
       "                <polyline points=\"565.0,172.0,565.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SE_95_NE_95_1_95_ONE_95_SE_95_NE_95_1_95_ONE\">\n",
       "                <polyline points=\"565.0,142.0,565.0,80.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSE_95_NE_95_1_95_ONE_ARROW_ACTIVE\" transform=\"translate(560.0,95.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-96</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSE_95_NE_95_1_95_ONE_ARROW_REACTIVE\" transform=\"translate(560.0,115.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_1_95_SC9_95_0\" transform=\"translate(561.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_8\" transform=\"translate(561.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_1_95_SC9_95_1\" transform=\"translate(561.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_1_95_DJ9\" transform=\"translate(555.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SE_95_NE_95_1_95_ONE\" transform=\"translate(561.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-top-feeder\" id=\"idSE_95_NE_95_1_95_ONE\" transform=\"translate(565.0,80.0)\">\n",
       "                <text class=\"sld-label\" id=\"SE_NE_1_ONE_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SE_NE_1</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_5\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_2_95_SC11_95_0_95_INTERNAL_95_SE_95_poste_95_10\">\n",
       "                <polyline points=\"165.0,252.0,165.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_2_95_SC11_95_1_95_INTERNAL_95_SE_95_poste_95_10\">\n",
       "                <polyline points=\"165.0,277.0,165.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_10_95_SEI1_95_SEI1_32__32_NETD_32__32_2_95_DJ11\">\n",
       "                <polyline points=\"165.0,222.0,165.0,192.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_32__32_NETD_32__32_2_95_DJ11_95_INTERNAL_95_SE_95_poste_95_SE_95_NE_95_2_95_ONE\">\n",
       "                <polyline points=\"165.0,172.0,165.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SE_95_NE_95_2_95_ONE_95_SE_95_NE_95_2_95_ONE\">\n",
       "                <polyline points=\"165.0,142.0,165.0,80.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSE_95_NE_95_2_95_ONE_ARROW_ACTIVE\" transform=\"translate(160.0,95.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">-96</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSE_95_NE_95_2_95_ONE_ARROW_REACTIVE\" transform=\"translate(160.0,115.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_2_95_SC11_95_0\" transform=\"translate(161.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_10\" transform=\"translate(161.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_2_95_SC11_95_1\" transform=\"translate(161.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_SEI1_32__32_NETD_32__32_2_95_DJ11\" transform=\"translate(155.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SE_95_NE_95_2_95_ONE\" transform=\"translate(161.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-top-feeder\" id=\"idSE_95_NE_95_2_95_ONE\" transform=\"translate(165.0,80.0)\">\n",
       "                <text class=\"sld-label\" id=\"SE_NE_2_ONE_N_LABEL\" x=\"-5.0\" y=\"-5.0\">SE_NE_2</text>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_6\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_15_95_SEI1_95_Sect_32_1_32_HVDC1\">\n",
       "                <polyline points=\"215.0,307.0,215.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_Disj_32_HVDC1_95_INTERNAL_95_SE_95_poste_95_15\">\n",
       "                <polyline points=\"215.0,337.0,215.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_15_95_SEI1_95_Sect_32_mnv_32_HVDC1\">\n",
       "                <polyline points=\"215.0,307.0,215.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC1_95_SEI1_95_Disj_32_HVDC1\">\n",
       "                <polyline points=\"215.0,387.0,215.0,357.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC1_95_INTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC1\">\n",
       "                <polyline points=\"215.0,443.0,215.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSEI1_95_SEI1_95_HVDC1_ARROW_REACTIVE\" transform=\"translate(210.0,418.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSEI1_95_SEI1_95_HVDC1_ARROW_ACTIVE\" transform=\"translate(210.0,398.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Sect_32_1_32_HVDC1\" transform=\"translate(211.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_15\" transform=\"translate(211.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Disj_32_HVDC1\" transform=\"translate(205.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC1\" transform=\"translate(211.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-vsc sld-bottom-feeder sld-vl300to500-0\" id=\"idSEI1_95_SEI1_95_HVDC1\" transform=\"translate(207.0,445.0)\">\n",
       "                <text x=\"-15.5\" y=\"6.6\">AC / DC - VSC</text>\n",
       "                <text class=\"sld-label\" id=\"SEI1_SEI1_HVDC1_S_LABEL\" x=\"-5.0\" y=\"13.0\">HVDC1</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_Sect_32_mnv_32_HVDC1\" transform=\"translate(211.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-top\" id=\"idEXTERN_32_7\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_17_95_SEI1_95_Sect_32_1_32_HVDC2\">\n",
       "                <polyline points=\"265.0,222.0,265.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_Disj_32_HVDC2_95_INTERNAL_95_SE_95_poste_95_17\">\n",
       "                <polyline points=\"265.0,192.0,265.0,222.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_17_95_SEI1_95_Sect_32_mnv_32_HVDC2\">\n",
       "                <polyline points=\"265.0,222.0,265.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC2_95_SEI1_95_Disj_32_HVDC2\">\n",
       "                <polyline points=\"265.0,142.0,265.0,172.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC2_95_INTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC2\">\n",
       "                <polyline points=\"265.0,86.0,265.0,142.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSEI1_95_SEI1_95_HVDC2_ARROW_ACTIVE\" transform=\"translate(260.0,101.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSEI1_95_SEI1_95_HVDC2_ARROW_REACTIVE\" transform=\"translate(260.0,121.0)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Sect_32_1_32_HVDC2\" transform=\"translate(261.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_17\" transform=\"translate(261.0,218.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Disj_32_HVDC2\" transform=\"translate(255.0,172.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SEI1_95_SEI1_95_HVDC2\" transform=\"translate(261.0,138.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-vsc sld-top-feeder sld-vl300to500-0\" id=\"idSEI1_95_SEI1_95_HVDC2\" transform=\"translate(257.0,76.0)\">\n",
       "                <text x=\"-15.5\" y=\"6.6\">AC / DC - VSC</text>\n",
       "                <text class=\"sld-label\" id=\"SEI1_SEI1_HVDC2_N_LABEL\" x=\"-5.0\" y=\"-5.0\">HVDC2</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_Sect_32_mnv_32_HVDC2\" transform=\"translate(261.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_8\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_19_95_SEI1_95_Sect_32_1_32_SEI11_95_L\">\n",
       "                <polyline points=\"315.0,307.0,315.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_Disj_32_SEI11_95_L_95_INTERNAL_95_SE_95_poste_95_19\">\n",
       "                <polyline points=\"315.0,337.0,315.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_19_95_SEI1_95_Sect_32_mnv_32_SEI11_95_L\">\n",
       "                <polyline points=\"315.0,307.0,315.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SE_95_L1_95_SEI1_95_Disj_32_SEI11_95_L\">\n",
       "                <polyline points=\"315.0,387.0,315.0,357.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SE_95_L1_95_INTERNAL_95_SE_95_poste_95_SE_95_L1\">\n",
       "                <polyline points=\"315.0,444.5,315.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSE_95_L1_ARROW_REACTIVE\" transform=\"translate(310.0,419.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-out\" id=\"idSE_95_L1_ARROW_ACTIVE\" transform=\"translate(310.0,399.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">480</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Sect_32_1_32_SEI11_95_L\" transform=\"translate(311.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_19\" transform=\"translate(311.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Disj_32_SEI11_95_L\" transform=\"translate(305.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SE_95_L1\" transform=\"translate(311.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-load sld-bottom-feeder sld-vl300to500-0\" id=\"idSE_95_L1\" transform=\"translate(307.0,444.5)\">\n",
       "                <rect height=\"9\" width=\"16\"/>\n",
       "                <line x1=\"0\" x2=\"16\" y1=\"0\" y2=\"9\"/>\n",
       "                <line x1=\"16\" x2=\"0\" y1=\"0\" y2=\"9\"/>\n",
       "                <text class=\"sld-label\" id=\"SE_L1_S_LABEL\" x=\"-5.0\" y=\"14.0\">SE_L1</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_Sect_32_mnv_32_SEI11_95_L\" transform=\"translate(311.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "        <g class=\"sld-extern-cell sld-cell-direction-bottom\" id=\"idEXTERN_32_9\">\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_21_95_SEI1_95_Sect_32_1_32_SEI11_95_L2\">\n",
       "                <polyline points=\"415.0,307.0,415.0,252.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SEI1_95_Disj_32_SEI11_95_L2_95_INTERNAL_95_SE_95_poste_95_21\">\n",
       "                <polyline points=\"415.0,337.0,415.0,307.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_21_95_SEI1_95_Sect_32_mnv_32_SEI11_95_L2\">\n",
       "                <polyline points=\"415.0,307.0,415.0,277.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_INTERNAL_95_SE_95_poste_95_SE_95_L2_95_SEI1_95_Disj_32_SEI11_95_L2\">\n",
       "                <polyline points=\"415.0,387.0,415.0,357.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-wire sld-vl300to500-0\" id=\"_95_SE_95_poste_95_SE_95_L2_95_INTERNAL_95_SE_95_poste_95_SE_95_L2\">\n",
       "                <polyline points=\"415.0,444.5,415.0,387.0\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-reactive-power sld-feeder-info sld-in\" id=\"idSE_95_L2_ARROW_REACTIVE\" transform=\"translate(410.0,419.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">—</text>\n",
       "            </g>\n",
       "            <g class=\"sld-active-power sld-feeder-info sld-in\" id=\"idSE_95_L2_ARROW_ACTIVE\" transform=\"translate(410.0,399.5)\">\n",
       "                <polygon class=\"sld-arrow-out\" points=\"5,0 10,10 0,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <polygon class=\"sld-arrow-in\" points=\"0,0 10,0 5,10\" transform=\"rotate(180.0,5.0,5.0)\"/>\n",
       "                <text class=\"sld-label\" x=\"15.0\" y=\"5.0\">0</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-open sld-disconnected\" id=\"idSEI1_95_Sect_32_1_32_SEI11_95_L2\" transform=\"translate(411.0,248.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_21\" transform=\"translate(411.0,303.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-breaker sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Disj_32_SEI11_95_L2\" transform=\"translate(405.0,337.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M1,1 V19 H19 V1z M10,5 V15\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M1,1 V19 H19 V1z M5,10 H15\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-node sld-hidden-node sld-fictitious sld-vl300to500-0\" id=\"idINTERNAL_95_SE_95_poste_95_SE_95_L2\" transform=\"translate(411.0,383.0)\">\n",
       "                <circle cx=\"4\" cy=\"4\" r=\"4\"/>\n",
       "            </g>\n",
       "            <g class=\"sld-load sld-bottom-feeder sld-vl300to500-0\" id=\"idSE_95_L2\" transform=\"translate(407.0,444.5)\">\n",
       "                <rect height=\"9\" width=\"16\"/>\n",
       "                <line x1=\"0\" x2=\"16\" y1=\"0\" y2=\"9\"/>\n",
       "                <line x1=\"16\" x2=\"0\" y1=\"0\" y2=\"9\"/>\n",
       "                <text class=\"sld-label\" id=\"SE_L2_S_LABEL\" x=\"-5.0\" y=\"14.0\">SE_L2</text>\n",
       "            </g>\n",
       "            <g class=\"sld-disconnector sld-closed sld-vl300to500-0\" id=\"idSEI1_95_Sect_32_mnv_32_SEI11_95_L2\" transform=\"translate(411.0,273.0)\">\n",
       "                <path class=\"sld-sw-closed\" d=\"M0,0 8,8 M8,0 0,8\"/>\n",
       "                <path class=\"sld-sw-open\" d=\"M8,0 0,8\"/>\n",
       "            </g>\n",
       "        </g>\n",
       "    </g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<pypowsybl.network.impl.svg.Svg at 0x7f73800904c0>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "six_nodes.get_single_line_diagram('SE_poste')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Topological remedial actions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "raw_mimetype": "text/markdown"
   },
   "source": [
    "You have to add all the actions involved in the strategies you want to test. Here, we want to see the effect of opening switches SS1_SS1_DJ_OMN or/and SOO1_SOO1_DJ_OMN: opening only the first one, only the second one or both.\n",
    "Operator strategies have the condition ANY_VIOLATION_CONDITION "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_switch_action(action_id='Switch_SS1_SS1_DJ_OMN_OPEN', switch_id='SS1_SS1_DJ_OMN', open=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_switch_action(action_id='Switch_SOO1_SOO1_DJ_OMN_OPEN', switch_id='SOO1_SOO1_DJ_OMN', open=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_operator_strategy('StrategyOpenSS1_SS1', 'S_SO_1_contingency', ['Switch_SS1_SS1_DJ_OMN_OPEN'], ConditionType.ANY_VIOLATION_CONDITION) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_operator_strategy('StrategyOpenSOO1_SOO1', 'S_SO_1_contingency', ['Switch_SOO1_SOO1_DJ_OMN_OPEN'], ConditionType.ANY_VIOLATION_CONDITION) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_operator_strategy('StrategyOpenBothSwitchs', 'S_SO_1_contingency', ['Switch_SS1_SS1_DJ_OMN_OPEN', 'Switch_SOO1_SOO1_DJ_OMN_OPEN'], ConditionType.ANY_VIOLATION_CONDITION) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Redispatch remedial actions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "raw_mimetype": "text/markdown"
   },
   "source": [
    "An other strategy could be to modify the active power target of some generators, in a way the two modifications compensate (also called re-dispatching). Decreasing active power target of generator SO_G2 and increasing active power of SE_G (closer to loads) could be efficient."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_generator_active_power_action(action_id='Simple_Redispatch_SO_G2', generator_id='SO_G2', is_relative=True, active_power=-100)\n",
    "sa.add_generator_active_power_action(action_id='Simple_Redispatch_SE_G', generator_id='SE_G', is_relative=True, active_power=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa.add_operator_strategy('StrategyRedispatch', 'S_SO_1_contingency', ['Simple_Redispatch_SO_G2', 'Simple_Redispatch_SE_G'], ConditionType.ANY_VIOLATION_CONDITION)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Run the security analysis "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "sa_result = sa.run_ac(six_nodes)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Check the results at each steps"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Pre contingency step"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We should have no limit violations at the pre contingency state."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PreContingencyResult(, status=CONVERGED, limit_violations=[0])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.pre_contingency_result"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Post contingency step"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Then the first contingency trigger the current limit installed on S_SO_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PostContingencyResult(contingency_id='S_SO_1_contingency', status=CONVERGED, limit_violations=[1])"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.find_post_contingency_result('S_SO_1_contingency')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LimitViolation(subject_id='S_SO_2', subject_name='', limit_type=CURRENT, limit=400.0, limit_name='permanent', acceptable_duration=2147483647, limit_reduction=1.0, value=419.2577908692318, side=TWO)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.find_post_contingency_result('S_SO_1_contingency').limit_violations[0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that the flow is at 419.25."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### StrategyOpenSS1_SS1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's check results for StrategyOpenSS1_SS1 :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OperatorStrategyResult(operator_strategy_id='StrategyOpenSS1_SS1', status=CONVERGED, limit_violations=[0])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " sa_result.operator_strategy_results['StrategyOpenSS1_SS1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "378.3380062100674"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.branch_results.loc['S_SO_1_contingency', 'StrategyOpenSS1_SS1', 'S_SO_2']['i2']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We no longer have a limit violation, and we see that flow on S_SO2 is under 400."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### StrategyOpenSOO1_SOO1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's check results for StrategyOpenSOO1_SOO1 :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OperatorStrategyResult(operator_strategy_id='StrategyOpenSOO1_SOO1', status=CONVERGED, limit_violations=[2])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " sa_result.operator_strategy_results['StrategyOpenSOO1_SOO1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LimitViolation(subject_id='SO_NO_1', subject_name='', limit_type=CURRENT, limit=700.0, limit_name=\"10'\", acceptable_duration=1, limit_reduction=1.0, value=1044.4966633667539, side=ONE)"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " sa_result.operator_strategy_results['StrategyOpenSOO1_SOO1'].limit_violations[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LimitViolation(subject_id='SO_NO_1', subject_name='', limit_type=CURRENT, limit=600.0, limit_name='permanent', acceptable_duration=2147483647, limit_reduction=1.0, value=1044.4966633667539, side=TWO)"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.operator_strategy_results['StrategyOpenSOO1_SOO1'].limit_violations[1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that we have two new limit violation on SO_NO_1. But still no limit violation on S_SO2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### StrategyOpenBothSwitchs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's check results for StrategyOpenBothSwitchs :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OperatorStrategyResult(operator_strategy_id='StrategyOpenBothSwitchs', status=CONVERGED, limit_violations=[2])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " sa_result.operator_strategy_results['StrategyOpenBothSwitchs']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LimitViolation(subject_id='SO_NO_1', subject_name='', limit_type=CURRENT, limit=700.0, limit_name=\"10'\", acceptable_duration=1, limit_reduction=1.0, value=1044.4966633667539, side=ONE)"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.operator_strategy_results['StrategyOpenSOO1_SOO1'].limit_violations[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LimitViolation(subject_id='SO_NO_1', subject_name='', limit_type=CURRENT, limit=600.0, limit_name='permanent', acceptable_duration=2147483647, limit_reduction=1.0, value=1044.4966633667539, side=TWO)"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.operator_strategy_results['StrategyOpenSOO1_SOO1'].limit_violations[1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We also have some violations on SO_NO_1 but still no violation on S_SO2."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### StrategyRedispatch"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Finally the StrategyRedispatch :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OperatorStrategyResult(operator_strategy_id='StrategyRedispatch', status=CONVERGED, limit_violations=[0])"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " sa_result.operator_strategy_results['StrategyRedispatch']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "No more limit violations !"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Observe the flow on each step of the analysis"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To have an overview on the flows on S_SO_2 you can print the whole monitored branche results : "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>p1</th>\n",
       "      <th>q1</th>\n",
       "      <th>i1</th>\n",
       "      <th>p2</th>\n",
       "      <th>q2</th>\n",
       "      <th>i2</th>\n",
       "      <th>flow_transfer</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>contingency_id</th>\n",
       "      <th>operator_strategy_id</th>\n",
       "      <th>branch_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\"></th>\n",
       "      <th rowspan=\"2\" valign=\"top\"></th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>54.531481</td>\n",
       "      <td>-110.016475</td>\n",
       "      <td>174.419119</td>\n",
       "      <td>-53.892618</td>\n",
       "      <td>110.107741</td>\n",
       "      <td>174.419119</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-133.377630</td>\n",
       "      <td>85.519336</td>\n",
       "      <td>226.042956</td>\n",
       "      <td>134.297348</td>\n",
       "      <td>-85.366050</td>\n",
       "      <td>226.042956</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"10\" valign=\"top\">S_SO_1_contingency</th>\n",
       "      <th rowspan=\"2\" valign=\"top\"></th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>79.418783</td>\n",
       "      <td>-124.999658</td>\n",
       "      <td>210.365186</td>\n",
       "      <td>-78.489460</td>\n",
       "      <td>125.132419</td>\n",
       "      <td>210.365186</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-249.100890</td>\n",
       "      <td>153.754036</td>\n",
       "      <td>419.257791</td>\n",
       "      <td>252.264878</td>\n",
       "      <td>-153.226705</td>\n",
       "      <td>419.257791</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">StrategyOpenSS1_SS1</th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>92.554967</td>\n",
       "      <td>-133.720643</td>\n",
       "      <td>231.007243</td>\n",
       "      <td>-91.434316</td>\n",
       "      <td>133.880736</td>\n",
       "      <td>231.007243</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-226.152625</td>\n",
       "      <td>136.898071</td>\n",
       "      <td>378.338006</td>\n",
       "      <td>228.729139</td>\n",
       "      <td>-136.468652</td>\n",
       "      <td>378.338006</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">StrategyOpenSOO1_SOO1</th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>451.041734</td>\n",
       "      <td>-580.734940</td>\n",
       "      <td>1044.496663</td>\n",
       "      <td>-428.131295</td>\n",
       "      <td>584.007860</td>\n",
       "      <td>1044.496663</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-136.449843</td>\n",
       "      <td>11.254213</td>\n",
       "      <td>199.930622</td>\n",
       "      <td>137.169344</td>\n",
       "      <td>-11.134296</td>\n",
       "      <td>199.930622</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">StrategyOpenBothSwitchs</th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>451.154164</td>\n",
       "      <td>-580.693805</td>\n",
       "      <td>1044.548491</td>\n",
       "      <td>-428.241452</td>\n",
       "      <td>583.967049</td>\n",
       "      <td>1044.548491</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-125.372880</td>\n",
       "      <td>9.603397</td>\n",
       "      <td>183.434283</td>\n",
       "      <td>125.978547</td>\n",
       "      <td>-9.502452</td>\n",
       "      <td>183.434283</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">StrategyRedispatch</th>\n",
       "      <th>SO_NO_1</th>\n",
       "      <td>59.361506</td>\n",
       "      <td>-124.265369</td>\n",
       "      <td>195.621370</td>\n",
       "      <td>-58.557884</td>\n",
       "      <td>124.380172</td>\n",
       "      <td>195.621370</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S_SO_2</th>\n",
       "      <td>-185.947603</td>\n",
       "      <td>155.624090</td>\n",
       "      <td>346.465617</td>\n",
       "      <td>188.108295</td>\n",
       "      <td>-155.263975</td>\n",
       "      <td>346.465617</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                              p1          q1  \\\n",
       "contingency_id     operator_strategy_id    branch_id                           \n",
       "                                           SO_NO_1     54.531481 -110.016475   \n",
       "                                           S_SO_2    -133.377630   85.519336   \n",
       "S_SO_1_contingency                         SO_NO_1     79.418783 -124.999658   \n",
       "                                           S_SO_2    -249.100890  153.754036   \n",
       "                   StrategyOpenSS1_SS1     SO_NO_1     92.554967 -133.720643   \n",
       "                                           S_SO_2    -226.152625  136.898071   \n",
       "                   StrategyOpenSOO1_SOO1   SO_NO_1    451.041734 -580.734940   \n",
       "                                           S_SO_2    -136.449843   11.254213   \n",
       "                   StrategyOpenBothSwitchs SO_NO_1    451.154164 -580.693805   \n",
       "                                           S_SO_2    -125.372880    9.603397   \n",
       "                   StrategyRedispatch      SO_NO_1     59.361506 -124.265369   \n",
       "                                           S_SO_2    -185.947603  155.624090   \n",
       "\n",
       "                                                               i1          p2  \\\n",
       "contingency_id     operator_strategy_id    branch_id                            \n",
       "                                           SO_NO_1     174.419119  -53.892618   \n",
       "                                           S_SO_2      226.042956  134.297348   \n",
       "S_SO_1_contingency                         SO_NO_1     210.365186  -78.489460   \n",
       "                                           S_SO_2      419.257791  252.264878   \n",
       "                   StrategyOpenSS1_SS1     SO_NO_1     231.007243  -91.434316   \n",
       "                                           S_SO_2      378.338006  228.729139   \n",
       "                   StrategyOpenSOO1_SOO1   SO_NO_1    1044.496663 -428.131295   \n",
       "                                           S_SO_2      199.930622  137.169344   \n",
       "                   StrategyOpenBothSwitchs SO_NO_1    1044.548491 -428.241452   \n",
       "                                           S_SO_2      183.434283  125.978547   \n",
       "                   StrategyRedispatch      SO_NO_1     195.621370  -58.557884   \n",
       "                                           S_SO_2      346.465617  188.108295   \n",
       "\n",
       "                                                              q2           i2  \\\n",
       "contingency_id     operator_strategy_id    branch_id                            \n",
       "                                           SO_NO_1    110.107741   174.419119   \n",
       "                                           S_SO_2     -85.366050   226.042956   \n",
       "S_SO_1_contingency                         SO_NO_1    125.132419   210.365186   \n",
       "                                           S_SO_2    -153.226705   419.257791   \n",
       "                   StrategyOpenSS1_SS1     SO_NO_1    133.880736   231.007243   \n",
       "                                           S_SO_2    -136.468652   378.338006   \n",
       "                   StrategyOpenSOO1_SOO1   SO_NO_1    584.007860  1044.496663   \n",
       "                                           S_SO_2     -11.134296   199.930622   \n",
       "                   StrategyOpenBothSwitchs SO_NO_1    583.967049  1044.548491   \n",
       "                                           S_SO_2      -9.502452   183.434283   \n",
       "                   StrategyRedispatch      SO_NO_1    124.380172   195.621370   \n",
       "                                           S_SO_2    -155.263975   346.465617   \n",
       "\n",
       "                                                      flow_transfer  \n",
       "contingency_id     operator_strategy_id    branch_id                 \n",
       "                                           SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  \n",
       "S_SO_1_contingency                         SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  \n",
       "                   StrategyOpenSS1_SS1     SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  \n",
       "                   StrategyOpenSOO1_SOO1   SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  \n",
       "                   StrategyOpenBothSwitchs SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  \n",
       "                   StrategyRedispatch      SO_NO_1              NaN  \n",
       "                                           S_SO_2               NaN  "
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sa_result.branch_results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Format de la Cellule Texte Brut",
  "kernelspec": {
   "display_name": "Python 3",
   "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.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}