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

Irrelevant use of suffix _ONE / _TWO for the lines which originates from bus #393

Closed AnkurArohi closed 2 years ago

AnkurArohi commented 2 years ago

Bug , difficult , but take a CGMES IEEE14 network, find the voltage level where lines originate from the bus and then look for the suffix _ONE

(if a question doesn't apply, you can delete it)

AnkurArohi commented 2 years ago

1A4-1A5 1A8-1A7 Bd

geofjamg commented 2 years ago

As discussed with @flo-dup, this could be fixed by just using the equipmentId instead of the ID to fill feeder label.

geofjamg commented 2 years ago

@AnkurArohi feel free to open a PR to fix it.

AnkurArohi commented 2 years ago

@geofjamg I am trying the same But here Line type has no equipmentId

https://github.com/powsybl/powsybl-single-line-diagram/blob/e855eb2b6eff85dc491f4196b48b52ab57d5df5d/single-line-diagram-core/src/main/java/com/powsybl/sld/builders/NetworkGraphBuilder.java#L612-L631

flo-dup commented 2 years ago

You were referencing some code coming from building the graph, but the problem's not there: it's just a matter of choosing the proper label to display on the feeder node as said above. So it's later when generating the SVG with the DiagramLabelProvider. You should have a look at what String is taken, and correct it.

(Note that I updated your comment with code reference, as it was not clear that you were referencing some existing code)