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

Documentation... and refactoring #517

Merged
merged 23 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
39b4eb0
Bump to v4.0.0-SNAPSHOT
So-Fras Apr 6, 2023
5a85af0
Simplify LegBusSet
BenoitJeanson Feb 23, 2023
8aaae07
renaming of LegBusSet/HorizontalBusLane/LBSCluster to VerticalBusSet/…
BenoitJeanson Mar 20, 2023
0c455d7
create layout.positionprocessor subpackage and fill it in
BenoitJeanson Mar 23, 2023
356263b
Clarify PositionFinder interface by transferring some of particulars …
BenoitJeanson Mar 23, 2023
df2c0b9
update documentation on position package
BenoitJeanson Mar 24, 2023
f55938c
rename HorizontalBusSet into HorizontalBusList
BenoitJeanson Mar 31, 2023
5f538d3
tiny reorganization PositionFromExtension
BenoitJeanson Mar 31, 2023
d049290
Rename subpackage positionprocessor into position
BenoitJeanson Apr 7, 2023
feceb6a
Rename VBSClusterSide in BSClusterSide
BenoitJeanson Apr 21, 2023
c22fdc7
Remove cyclic dependency between Links and BSClusterSide
BenoitJeanson Apr 25, 2023
5342c7f
update doc
BenoitJeanson Mar 31, 2023
d2a698a
code smell fix
BenoitJeanson May 4, 2023
0f9e1f5
Merge branch 'main' into Documentation2
flo-dup Sep 28, 2023
e10c414
Merge branch 'main' into Documentation2
flo-dup Apr 4, 2024
424fb10
Replace findAny by findFirst
flo-dup Apr 4, 2024
a621510
Rename position packages and PositionFromExtension
flo-dup Apr 4, 2024
237511a
Adjust tiny refactor HBLManager
flo-dup Apr 4, 2024
de57174
Renaming variable
flo-dup Apr 4, 2024
beb775e
HorizontalBusListManager functional interface and renamed
flo-dup Apr 4, 2024
fb78230
Fix Link code smells
flo-dup Apr 4, 2024
c766e46
Merge branch 'main' into Documentation2
flo-dup Apr 5, 2024
bbd5e8a
Fix code smell
flo-dup Apr 5, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import com.powsybl.sld.cgmes.dl.conversion.CgmesDLExporter;
import com.powsybl.sld.cgmes.dl.conversion.CgmesDLUtils;
import com.powsybl.sld.layout.*;
import com.powsybl.sld.layout.positionbyclustering.PositionByClustering;
import com.powsybl.sld.layout.positionfromextension.PositionFromExtension;
import com.powsybl.sld.layout.position.clustering.PositionByClustering;
import com.powsybl.sld.layout.position.predefined.PositionPredefined;
import com.powsybl.tools.Command;
import com.powsybl.tools.Tool;
import com.powsybl.tools.ToolOptions;
Expand Down Expand Up @@ -46,7 +46,7 @@ public class LayoutToCgmesDlExporterTool implements Tool {
private static final String DIAGRAM_NAME = "diagram-name";

private final Map<String, VoltageLevelLayoutFactory> voltageLevelsLayouts
= Map.ofEntries(Map.entry("auto-extensions", new PositionVoltageLevelLayoutFactory(new PositionFromExtension())),
= Map.ofEntries(Map.entry("auto-extensions", new PositionVoltageLevelLayoutFactory(new PositionPredefined())),
Map.entry(DEFAULT_VOLTAGE_LAYOUT, new PositionVoltageLevelLayoutFactory(new PositionByClustering())));

private final Map<String, SubstationLayoutFactory> substationsLayouts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.powsybl.sld.cgmes.dl.conversion.CgmesDLUtils;
import com.powsybl.sld.cgmes.dl.iidm.extensions.*;
import com.powsybl.sld.layout.*;
import com.powsybl.sld.layout.positionbyclustering.PositionByClustering;
import com.powsybl.sld.layout.position.clustering.PositionByClustering;
import com.powsybl.sld.library.ComponentTypeName;
import com.powsybl.sld.model.coordinate.Orientation;
import com.powsybl.sld.model.graphs.*;
Expand Down
43 changes: 43 additions & 0 deletions single-line-diagram/single-line-diagram-core/doc/BSCluster.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
= `BSCluster`

== Definition
`BSCluster` (`BusNode` Sets Cluster) are used by implementations of `PositionFinder`.

****
It is composed of 2 kinds of sets of `BusNode` Sets that present an horizontal and a vertical view of the structure of a `VoltageLevel`:

- `List<VerticalBusSet> verticalBusSets` see link:VerticalBusSet.adoc[VerticalBusSet]
- `List<HorizontalBusList> horizontalBusLists` see link:HorizontalBusList.adoc[HorizontalBusList]
****


[IMPORTANT]
====
`VerticalBusSet` is a `Set` as it is important to have no duplicate `BusNodes` whereas, it is possible to have duplicate `BusNodes` in the `HorizontalBusList`.

The rules are as follow:

- for `VerticalBusSet`, a `BusNode` may appear:
* in multiple `VerticalBusSets`,
* but only once in a `VerticalBusSet`;
- for `HorizontalBusList`, a `BusNode` may appear:
* multiple times in a `HorizontalBusList`, in that case the occurences shall have contiguous indexes,
* shall appear only in one single `HorizontalBusList`.
====

The goal is at the end to be able to merge the `VoltageLevel` into a single `BSCluster` having to this kind of pattern:

image::images/BSClusterFinal.svg[align="center"]

== Key methods

=== Build
A `BSCluster` is initiated with one `VerticalBusSet` that:

- is put as is as first element `verticalBusSets`,
- inititiates one `HorizontalBusList` for each of its `BusNode`

Each `PositionFinder` using `BSCluster` implementation provides a strategy to merge them together in order to get a single `BSCluster`.

=== Merge
The merge of 2 `BSClusters` is done by calling the `merge` method giving it a `HorizontalBusListManager`. Indeed if the merging of the `verticalBusSets` is just a concatenation, the merging of the `horizontalBusLists` differs from one `PositionFinder` to another.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,3 @@ Last, the second `ExternCell` cell is build with the second `SHUNT` node and the

.Descrimination of a `SHUNT` cell
image::images/rawGraphExternShunt.svg[align="center"]

'''
==== The `PatternCellDetector` class

This detector is based on pattern matching algorithm. The patterns are described in `/resources/pattern.xml`.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
= `HorizontalBusList`
Loading