Skip to content

Commit

Permalink
Merge branch 'main' into fix_explorer_nad_update
Browse files Browse the repository at this point in the history
  • Loading branch information
flo-dup authored Nov 25, 2024
2 parents e1a0268 + f981581 commit eb214da
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
Binary file modified docs/_static/img/network_explorer_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/img/network_explorer_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/img/network_explorer_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/img/networkmap_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/img/networkmap_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/user_guide/nad_widget.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NAD widget

NAD is an interactive widget that displays a Network Area Diagram's SVG, generated for example using the PyPowSyBl APIs, in a Jupyter notebook
The widget allows you to pan and zoom the diagram, to focus on a specific part when the network is large.
The widget allows you to pan and zoom the diagram, to focus on a specific part when the network is large. It is also possible to interactively move nodes by drag&drop (feature available with versions of pypowsybl equal to or greater than v1.8.1).

The following code, to be run in a notebook, first creates a network, then displays the NAD widget on it.

Expand Down Expand Up @@ -37,7 +37,7 @@ display_nad(svg, invalid_lf: bool = False, enable_callbacks: bool = False, grayo

- svg: the input SVG, as str or class providing an svg and metadata representation
- invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a shift+click on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a shift+click on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal to or greater than v1.8.1.
- grayout: if True, changes the diagram elements' color to gray.


Expand All @@ -48,7 +48,7 @@ update_nad(nadwidget, svg, invalid_lf: bool = False, enable_callbacks: bool = Fa
- nadwidget: the existing widget to update
- svg: the input NAD's SVG
- invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a SHIFT+CLICK on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a SHIFT+CLICK on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal to or greater than v1.8.1.
- grayout: if True, changes the diagram elements' color to gray.
- keep_viewbox: if True, keeps the current diagram content, including pan and zoom settings.

Expand Down
6 changes: 4 additions & 2 deletions docs/user_guide/network_explorer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Network explorer widget

Network explorer is interactive network explorer widget, built on pypowsybl-jupyter's widgets (SLD, NAD, Network map) and some standard [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/index.html): select lists, tabs, etc.
Network explorer is an interactive widget, built on pypowsybl-jupyter's widgets (SLD, NAD, Network map) and some standard [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/index.html): select lists, tabs, etc.

Through the widget, you can select a voltage level from the list (or search of a specific one using the Filter) and the NAD and SLD diagrams for that voltage level will be displayed in the two "Network Area" and "Single Line" tabs, respectively. Both diagrams can be panned and zoomed. A third tab, 'Network map' displays the network's substations and lines on a map, if substations and lines geo data is available in the network. The last displayed voltage levels are listed in a history box, on the explorer's bottom left corner.

Expand All @@ -23,7 +23,9 @@ The selected voltage level is the displayed NAD's center.

A 'depth' slider controls the size of the sub network.

Selecting a VL's node (through SHIFT+CLICK) will activate the SLD panel on the corresponding voltage level. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
Selecting a VL's node (through SHIFT+CLICK) will activate the SLD panel on the corresponding voltage level.
In the diagram, nodes can be moved interactively by drag&drop (e.g., to change the diagram layout for presentation purposes). However, the new node positions are not currently saved; Therefore, after switching to a new VL and then switching back to the current VL, the original nodes layout would be restored.
Please note that the select and move features require versions of PyPowSyBl equal to or greater than v1.8.1.

## Single Line tab

Expand Down

0 comments on commit eb214da

Please sign in to comment.