Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Initial version #3

Merged
merged 37 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9f28dc3
Add model classes
flo-dup Oct 8, 2021
8405010
Build internal graph
flo-dup Oct 15, 2021
0e93e62
BusNode model changes
flo-dup Oct 18, 2021
473fece
Simplifying edge model
flo-dup Oct 18, 2021
338d78f
Adding layout interface
flo-dup Oct 18, 2021
34bdcfc
Add name to edges and nodes
flo-dup Oct 19, 2021
d09ad41
Add SVG writer
flo-dup Oct 19, 2021
50efc49
Adding style provider
flo-dup Oct 19, 2021
5f81730
Adding nominal voltage colors
flo-dup Oct 19, 2021
dff25a5
Add IEEE30bus test
flo-dup Oct 19, 2021
a604360
Adding number of buses in the voltage level nodes
flo-dup Oct 20, 2021
7ee33d2
Tuning the force layout for larger graphs
flo-dup Oct 20, 2021
65d8afc
Adding tests
flo-dup Oct 20, 2021
4c14f6a
Renaming
flo-dup Oct 20, 2021
908669a
Use jgrapht graph structure for edges <-> nodes links
flo-dup Oct 20, 2021
81b5849
Adding connected state(s) to edges
flo-dup Oct 20, 2021
39c5d37
Adding connected state to the edges by dashed half-line
flo-dup Oct 20, 2021
7ff30e7
Add NetworkAreaDiagram class
flo-dup Oct 20, 2021
d1c8a5b
Update tests
flo-dup Oct 20, 2021
9742590
Add OutputStream overloads
geofjamg Nov 3, 2021
9b73621
Correct duplicate bug
flo-dup Oct 22, 2021
5e03ae9
Add fork for multiedges
flo-dup Oct 22, 2021
3b4f2b0
Introduce AbstractLayout
flo-dup Nov 3, 2021
6bde668
Copy force layout sources from powsybl-single-line-diagram
flo-dup Nov 3, 2021
de29c24
Add null checks
flo-dup Nov 3, 2021
5a0f84e
Add getting started in the readme
flo-dup Nov 3, 2021
51f242d
Remove unused constant
flo-dup Nov 3, 2021
aeabb61
Using DefaultTopologyVisitor empty implementations
flo-dup Nov 3, 2021
2ec7cfd
Adding prefix to id provider
flo-dup Nov 3, 2021
7687839
BusNode renamed BusInnerNode: it is not really a node
flo-dup Nov 3, 2021
a3fbb79
Avoid creating point object just before shifting it
flo-dup Nov 3, 2021
5945259
Reordering parameters
flo-dup Nov 3, 2021
a7587cf
Using Writer instead of OutputStream
flo-dup Nov 3, 2021
dbae5d7
Adding size constraint on the resulting SVG
flo-dup Nov 3, 2021
d649511
Thinner lines
flo-dup Nov 3, 2021
4cbe823
Remove CSS having no class selector
flo-dup Nov 3, 2021
574ae63
Update README example
flo-dup Nov 3, 2021
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
305 changes: 305 additions & 0 deletions .github/diagram_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,60 @@ By participating, you are expected to uphold this code. Please report unacceptab

PowSyBl Network Area Diagram is a component build on top of the `Network` model available in the PowSyBl Core repository responsible for generating a concise diagram of the whole network or of a part of the network, showing in particular the interconnections between the different voltage levels.
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.
Additional information

## 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
- `powsybl-config-test` and `powsybl-ieee-cdf-converter` to load the `Network` example
- `slf4j-simple` for simple logging capabilities

```xml
<properties>
<powsybl.nad.version>0.1.0-SNAPSHOT</powsybl.nad.version>
<powsybl.core.version>4.4.0</powsybl.core.version>
<slf4j.version>1.7.22</slf4j.version>
</properties>

<dependencies>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-network-area-diagram</artifactId>
<version>${powsybl.nad.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-impl</artifactId>
<version>${powsybl.core.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-config-test</artifactId>
<version>${powsybl.core.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ieee-cdf-converter</artifactId>
<version>${powsybl.core.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
```

Then we simply need to load the example network and then generate the corresponding network area diagram SVG.
```java
Network network = IeeeCdfNetworkFactory.create30();
new NetworkAreaDiagram(network).draw(Path.of("/tmp/diagram.svg"));
```
We obtain the following SVG:

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


Note that the chosen example network is the IEEE 30-bus test case, which corresponds to a basic approximation of the American electric power system in December 1961.
Loading