-
Notifications
You must be signed in to change notification settings - Fork 43
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
Complete the nodebreaker/busbreaker/bus views/topology APIs #3107
Comments
we should improve the drawing of https://javadoc.io/static/com.powsybl/powsybl-core/6.4.1/com/powsybl/iidm/network/doc-files/nodeBreakerTopologyGraph.svg to have the pink edge more closely associated with the coupler, it's far to the right and not obvious that this is what the pink edge represent (it's hard to draw something nice though, I guess that's why the pink edge was drawn directly between the nodes) |
We should add more voltage level examples to https://javadoc.io/doc/com.powsybl/powsybl-core/latest/com/powsybl/iidm/network/VoltageLevel.html (keep the existing simple and standard one, but add more to show what is possible)
|
We should highlight the differences/possibilities between a busbreakerview of a nodebreakertopology voltagelevel and an equivalent voltagelevel described directly in busbreaker topology. For example, when an equipment has an open switch to a busbar, in the busbreakerview it gets its own bus. To model this in busbreaker topology, you need to create this configured bus, but this is contrary to the docs that say
here the bus does not aggregate busbars. So we need to explain more the differences between a computed busbreakerview and a modeled busbreakertopology, are you always supposed to be able to create equivalent ones or are there cases where it's not possible ? Another example, in the busbreaker topology, an equipement is connectable only to one bus, whereas in the nodebreakertopology you can connect to any number of busbar. So you need to create more configured bus in the busbreakertopology to model this, but is it what you are supposed to do ? |
We should mention that in the busbreakertopology, the busbars from the nodebreakerview are still visible as equipments, it's a bit counterintutive (or maybe a feature ?) |
sample code to improve: System.out.println();
System.out.println(s1vl1.getTopologyKind());
if (s1vl1.getTopologyKind() == TopologyKind.NODE_BREAKER) {
System.out.println("busbars: " + s1vl1.getNodeBreakerView().getBusbarSectionStream().toList());
}
System.out.println("busbreakerviewbuses: " + s1vl1.getBusBreakerView().getBusStream().toList());
System.out.println("busviewbuses: " + s1vl1.getBusView().getBusStream().toList());
System.out.println("busviewbus -> busbreakerviewbus:" + s1vl1.getBusView().getBusStream().map(Bus::getId)
.collect(Collectors.toMap(Function.identity(), s1vl1.getBusBreakerView()::getBusesFromBusViewBusId)));
if (s1vl1.getTopologyKind() == TopologyKind.NODE_BREAKER) {
System.out.println("busviewbus -> busbars:" + s1vl1.getBusView().getBusStream().map(Bus::getId)
.collect(Collectors.toMap(Function.identity(),
// can it be simpler than getNodes and then filter for busbar?
busid -> Networks.getNodes(busid, s1vl1, t -> t.getBusView().getBus())
.mapToObj(node -> s1vl1.getNodeBreakerView().getTerminal(node))
.map(Terminal::getConnectable)
.filter(x -> x.getType() == IdentifiableType.BUSBAR_SECTION).toList())));
System.out.println("busviewbus -> busbars:" + s1vl1.getBusView().getBusStream()
.collect(Collectors.toMap(Bus::getId,
// what's the difference with getNodes ?
bus -> bus.getConnectedTerminalStream()
.map(Terminal::getConnectable)
.filter(x -> x.getType() == IdentifiableType.BUSBAR_SECTION).toList())));
System.out
.println("busbreakerviewbus -> busbars:" + s1vl1.getBusBreakerView().getBusStream().map(Bus::getId)
.collect(Collectors.toMap(Function.identity(),
busid -> Networks.getNodes(busid, s1vl1, t -> t.getBusBreakerView().getBus())
.mapToObj(node -> s1vl1.getNodeBreakerView().getTerminal(node))
.map(Terminal::getConnectable)
.filter(x -> x.getType() == IdentifiableType.BUSBAR_SECTION).toList())));
System.out.println("busbars -> bus: " + s1vl1.getNodeBreakerView().getBusbarSectionStream()
.map(BusbarSection::getId).collect(Collectors.toMap(Function.identity(),
busid -> Optional.ofNullable(s1vl1.getBusView().getMergedBus(busid)))));
System.out.println("busbreakerbus -> bus: not possible");
System.out.println("busbreakerbus -> busbar: not possible for "disconnected equipment buses");
System.out.println("bus -> connectable: "
+ s1vl1.getBusBreakerView().getBusStream().collect(Collectors.toMap(Bus::getId,
bus -> bus.getConnectedTerminalStream().map(Terminal::getConnectable).toList())));
}
if (s1vl1.getTopologyKind() == TopologyKind.BUS_BREAKER) {
System.out.println("busbreakerbus -> bus: " + s1vl1.getBusBreakerView().getBusStream().map(Bus::getId)
.collect(Collectors.toMap(Function.identity(),
busid -> Optional.ofNullable(s1vl1.getBusView().getMergedBus(busid)))));
System.out.println("bus -> connectable: " + s1vl1.getBusView().getBusStream()
.collect(Collectors.toMap(Bus::getId,
bus -> bus.getConnectedTerminalStream().map(Terminal::getConnectable).toList())));
}
|
Describe the current behavior
powysbl has many methods to associate objects between the different views depending on the different topology.
For example, voltageLevel.getBusView().getMergedBus( string id ) gives the bus from the busview from either an id of busbarsection (nodebreaker topology) or from the id of a configured bus (busbreaker topology)
Similarly, vl.getBusBreakerView().getBusesFromBusViewBusId() gives buses of the busbreakerview for a bus of the busview
Networks.getNodes gives the nodes for a bus of the busview (kind of like getConnectedTerminals ..?)
Unless I'm mistaken, the system is not complete, you can't get from busbreakerbuses to their busviewbuses
Another case, when a busbreakerbus doesn't have a busbar section, because a switch is open between the equipment and its busbar sections, you can't easily find the busbar section (that would be connected to after a call to connect() ). Something like getConnectableBusbarSection() is missing ? It would need the same predicate as connect()
Describe the expected behavior
Maybe add documentation on the modeling differences and commonalities between nodebreaker/busbreaker topology. Explain more how you can go from one view to another, etc. This should put some light on what is currently missing.
Describe the motivation
Have a homogeneous and simple and complete system
Extra Information
No response
The text was updated successfully, but these errors were encountered: