Skip to content

AnkurArohi/powsybl-single-line-diagram

 
 

Repository files navigation

PowSyBl Single Line Diagram

Actions Status Coverage Status Quality Gate MPL-2.0 License Slack

PowSyBl (Power System Blocks) is an open source framework written in Java, that makes it easy to write complex software for power systems’ simulations and analysis. Its modular approach allows developers to extend or customize its features.

PowSyBl is part of the LF Energy Foundation, a project of The Linux Foundation that supports open source innovation projects within the energy and electricity sectors.

PowSyBl Logo

Read more at https://www.powsybl.org !

This project and everyone participating in it is governed by the PowSyBl Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to powsybl-tsc@lists.lfenergy.org.

PowSyBl vs PowSyBl Single Line Diagram

PowSyBl Single Line Diagram is a component build on top of the Network model available in the PowSyBl Core repository responsible for generating a single line diagram.

The main features are:

  • Node/Breaker and bus/breaker topology.
  • SVG diagram to be used in various front-end technologies.
  • Voltage level, substation and zone diagrams.
  • Highly customizable rendering using equipment component libraries, CSS and configurable labels (position and content).
  • Multiple layout modes: fully automatic, semi-automatic (using relative positions for busbar sections and feeders), CGMES DL.

Diagram demo The example above corresponds to a CGMES file from the ENTSO-E sample files. A guide to generate this diagram is available here.

Getting started

To generate a SVG single line diagram from a voltage level, we first need to add a Maven dependency for the Network model and additionally for this example three other ones: two for the Network test case, one for simple logging capabilities:

<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-iidm-impl</artifactId>
    <version>4.8.0</version>
</dependency>
<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-iidm-test</artifactId>
    <version>4.8.0</version>
</dependency>
<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-config-test</artifactId>
    <version>4.8.0</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.7.22</version>
</dependency>

We can now load a node/breaker test Network:

Network network = FictitiousSwitchFactory.create();

After adding the single line diagram core module dependency:

<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-single-line-diagram-core</artifactId>
    <version>2.10.0</version>
</dependency>

We can now generate a SVG for the voltage level N with the following simple unique code line:

SingleLineDiagram.draw(network, "N", "/tmp/n.svg");

We obtain the SVG below.

Diagram demo

Note that a JSON file named n_metadata.json is also generated in the same folder, containing all the metadata needed to interact with the diagram.

About

Single line diagram generation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.5%
  • CSS 0.5%