Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addition of quick intro + update on website link #455

Merged
merged 6 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/nad-sld-diagrams.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 70 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,70 +22,9 @@ Read more at https://www.powsybl.org!
This project and everyone participating in it is governed by the [PowSyBl Code of Conduct](https://github.com/powsybl/.github/blob/main/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior to [powsybl-tsc@lists.lfenergy.org](mailto: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](https://en.wikipedia.org/wiki/One-line_diagram).

The main features are:
- Node/Breaker and bus/breaker topology.
- [SVG](https://fr.wikipedia.org/wiki/Scalable_Vector_Graphics) 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](.github/diagram-demo.svg)
*The example above corresponds to a CGMES file from the ENTSO-E sample files.*
*A guide to generate this diagram is available [here](https://www.powsybl.org/pages/documentation/developer/api_guide/single-line-diagram/svg-writing.html).*

## 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 two other ones: one for the `Network` test case, one for simple logging capabilities:

```xml
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-impl</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-test</artifactId>
<version>5.0.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`:
```java
Network network = FictitiousSwitchFactory.create();
```

After adding the single line diagram core module dependency:
```xml
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-single-line-diagram-core</artifactId>
<version>3.0.0</version>
</dependency>
```

We can now generate a SVG for the voltage level `N` with the following simple unique code line:
```java
SingleLineDiagram.draw(network, "N", "/tmp/n.svg");
```

We obtain the SVG below.

![Diagram demo](.github/example_n.svg)

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.
**PowSyBl diagram allows users to generate customizable network graph diagrams (denominated network-area diagrams in PowSyBl) and single-line diagrams.**
flo-dup marked this conversation as resolved.
Show resolved Hide resolved

![Diagrams available](.github/nad-sld-diagrams.jpg)
flo-dup marked this conversation as resolved.
Show resolved Hide resolved

## PowSyBl vs PowSyBl Network Area Diagram

Expand All @@ -97,7 +36,7 @@ PowSyBl Network Area Diagram is a component build on top of the `Network` model
A network area diagram emphasizes the electrical structure of the network, and may differ substantially from the network physical geography.
It displays the graph whose nodes are the network voltage levels, and whose edges are the lines and transformers between those voltage levels.

## Getting started
### Getting started
In order to generate a SVG from a given network, we need to add some Maven dependencies:
- `powsybl-network-area-diagram` for the network area diagram itself
- `powsybl-iidm-impl` for the network model
Expand Down Expand Up @@ -174,3 +113,70 @@ That is, the voltage levels between two voltage levels which are connected in th
<p align="center">
<img src=".github/partial_diagram_example_1_25.svg?sanitize=true" alt="Diagram IEEE30 partial network VL1-VL25" width="65%"/>
</p>


## PowSyBl vs PowSyBl Single Line Diagram
flo-dup marked this conversation as resolved.
Show resolved Hide resolved

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](https://en.wikipedia.org/wiki/One-line_diagram).

The main features are:
- Node/Breaker and bus/breaker topology.
- [SVG](https://fr.wikipedia.org/wiki/Scalable_Vector_Graphics) diagram to be used in various front-end technologies.
- Voltage-level, substation and zone diagrams.
flo-dup marked this conversation as resolved.
Show resolved Hide resolved
- 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](.github/diagram-demo.svg)
*The example above corresponds to a CGMES file from the ENTSO-E sample files.*
*A guide to generate this diagram is available [here](https://www.powsybl.org/pages/documentation/developer/api_guide/svg-writing.html).*
flo-dup marked this conversation as resolved.
Show resolved Hide resolved

### 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 two other ones: one for the `Network` test case, one for simple logging capabilities:

```xml
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-impl</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-test</artifactId>
<version>5.0.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`:
```java
Network network = FictitiousSwitchFactory.create();
```

After adding the single line diagram core module dependency:
```xml
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-single-line-diagram-core</artifactId>
<version>3.0.0</version>
</dependency>
```

We can now generate a SVG for the voltage level `N` with the following simple unique code line:
```java
SingleLineDiagram.draw(network, "N", "/tmp/n.svg");
```

We obtain the SVG below.

![Diagram demo](.github/example_n.svg)

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.