Skip to content

Migration guide v2.9.0

Florian Dupuy edited this page Mar 11, 2022 · 1 revision

TopologyCalculation refactor

The TopologyCalculation class used to partition a VoltageLevelGraph into several TopologicallyConnectedNodeSets can be customized since this release with in particular an extremity criteria different from the default one (open switches). Therefore, as a border node for a connected component can now be something else than a SwitchNode, TopologicallyConnectedNodeSets now contains a Set<Node> for the border nodes. The following changes also occured:

  • TopologicallyConnectedNodeSets::getBorderSwitchNodesSet is renamed to TopologicallyConnectedNodeSets::getBorderNodes and returns a Set<Node> instead of a Set<SwitchNode>
  • TopologicallyConnectedNodeSets::getNodesSet is renamed to TopologicallyConnectedNodeSets::getNodes
  • TopologyCalculation::run(VoltageLevelGraph) static method has been replaced by TopologyCalculation::findConnectedNodeSets(VoltageLevelGraph), the custom extremity criteria is given in TopologyCalculation new constructor.
  • A new TopologyCalculation::run(VoltageLevelGraph, Predicate<TopologicallyConnectedNodesSet>) method has been introduced to filter the List<TopologicallyConnectedNodesSet> results

BusInfo feature

screenshot

Since this release, an information component (BusInfo) can be added on each busbar, similarly to the FeederInfo for feeders. This component is either on the left of the busbar or on its right. To use this new feature:

  • Use Optional<BusInfo> getBusInfo(BusNode node) of interface DiagramLabelProvider to provide the BusInfo for each busbar.
  • Use PositionVoltageLevelLayoutFactory::setBusInfoMap or BlockOrganizer new constructor with the Map<String, Side> map between bus ids and left/right side. To get the map consistent with the DiagramLabelProvider you're using, you can get that map with DiagramLabelProvider::getBusInfoSides(VoltageLevelGraph) utility method.
  • Use the interface DiagramStyleProvider::getBusInfoStyle(BusInfo) to provide the proper CSS classes for each BusInfo.
  • Use the new LayoutParameter::busInfoMargin to set the margin between the busbar extremity and the component.

Builders refactor

Since this release, the classes NetworkGraphBuilder and RawGraphBuilder have been moved to a new builders package. Besides the inner classes RawGraphBuilder.VoltageLevelBuilder and RawGraphBuilder.SubstationBuilder have been moved to independent classes VoltageLevelRawBuilder and SubstationRawBuilder in this same builders package.

Busbar alignment

A new parameters has been introduced in this release: LayoutParameters::busbarsAlignment. It allows to align the busbars in a substation (either on first or last busbar, or on the middle of the busbar sections) when layoutParameters.isAdaptCellHeightToContent() is true. Set this parameter to Alignment.NONE if you want the previous behaviour (no bus bar alignment, but voltage levels top alignment).