powsybl / powsybl-diagram

SVG diagrams generation: single-line substation diagrams and network graph diagrams
Mozilla Public License 2.0
76 stars 13 forks source link

Zone diagram (multiple substations) on a substation grid #520

Closed flo-dup closed 9 months ago

flo-dup commented 1 year ago

Describe the current behavior

The PR #518 introduces single-line-diagram for a list of substations (zone diagram). The resulting diagram displays one substation on each line, therefore a 12 substations diagram leads to 12 rows, with probably many parallel wires on the left and right side to link one substation to the other

Describe the expected behavior

As @flieks suggested in https://github.com/powsybl/powsybl-diagram/pull/518#issuecomment-1543736780, it would be nicer to have for instance 4 substations on each row for a 12 substations diagram, leading to a 3 rows diagram. In most cases, the resulting diagram should look more compact, with I think less parallel wires to link one substation to the other

Describe the motivation

Better looking zone diagram

Extra Information

Question is, how should the grid be specified?

First option would be enough I think. At least for a first version.

About algorithms, it would be nice to have something which minimizes the length of wires, but that's another (difficult) topic

flieks commented 1 year ago

Hi @flo-dup thanks for creating a seperate issue for this

This is kind of what we are trying to achieve: image Dont mind the green and orange borders. The orange is to group substations in the greater whole. The green ones are substations.

So our main substation busbars are always vertical lines and then the connections that go to other substations are horizontal lines.

Important for us would also be that when we add/remove 1 line somewhere and regenerate an svg, that it does not make a completely different layout with substations on the other side of the grid layout.

So-Fras commented 1 year ago

Hi @flieks, thanks for adding more information. The last point on layout stability is indeed understandable from a user's perspective. We will try to merge the existing PR with simple horizontal and vertical layouts by the end of the month. The aim is to include it in a release at the beginning of July. As for slightly more complex layouts (matrix layouts), ensuring the layout stability you need, we will probably work on it during the summer, I will let you know when I have more info myself.

So-Fras commented 1 year ago

Hi @flieks, here are some update on our work with @tadam50. Unfortunately, we won't be able to release powsybl-diagram with the #518 PR this month. However, we will try to merge it to main as soon as possible.

So-Fras commented 1 year ago

Hi @flieks, with a bit of a delay, we merged our first attempt at multi-substation graphs into main. It will be available in our next release (powsybl-diagram v4.0.0, expected for the first half of October). It works well for some configurations (voltage levels arranged horizontally inside substations and substations arranged horizontally as well for example): image

It is not as satisfactory when you combine different layouts (voltage levels arranged horizontally inside substations and substations arranged vertically for example) but we decided to merge the #518 PR anyway for users to have a first thing to play with.

We have started working on matricial layouts to allow users to display their graph as they wish. We believe matricial layouts would ensure the stability you are looking for. Of course, our main concern is now the management of snake lines between substations... :)