powsybl-core
powsybl-core copied to clipboard
[Topology] Add a "bus branch" topology kind
- Do you want to request a feature or report a bug?
Feature.
- What is the current behavior?
Voltage levels exhibit 3 topology views, but actual instances can only be of 2 kinds. Views types are defined by topology levels: NODE_BREAKER, BUS_BREAKER, BUS_BRANCH While kinds are: NODE_BREAKER, BUS_BREAKER
Therefore, we cannot have pure "bus branch" voltage levels, but only a bus branch view of a node breaker or bus breaker level. For those topology kinds, possible topologies of the voltage level are constrained by the underlying topology description (in iidm-impl, node/switch graph or configured bus/switch graph).
- What is the expected behavior?
In some contexts, in particular research, it's convenient to be able to change the topology for a variant without any constraints. See for example that issue https://github.com/powsybl/pypowsybl/issues/80.
For example, we may want to define the topology of a voltage level by explicitly defining buses:
VoltageLevel vl = ...; // A voltage level with BUS_BRANCH topology kind
vl.getBusView().newBus()
.id(busId)
.addConnectable(generator)
.addBranch(line, Side.ONE)
.add();
...
vl.getBusView().removeBus(busId)
That would create a new Bus
instance, only for the current variant.
For other topology kinds, those methods should throw an UnsupportedOperationException
.
- What is the motivation / use case for changing the behavior?
Being able to define topology for a variant without being constrained by an underlying unmodifiable topology.