Package com.powsybl.iidm.network
Interface VoltageLevel.NodeBreakerView
-
- Enclosing interface:
- VoltageLevel
public static interface VoltageLevel.NodeBreakerView
A node/breaker view of the topology.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
VoltageLevel.NodeBreakerView.InternalConnection
static interface
VoltageLevel.NodeBreakerView.InternalConnectionAdder
static interface
VoltageLevel.NodeBreakerView.SwitchAdder
static interface
VoltageLevel.NodeBreakerView.TopologyTraverser
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description BusbarSection
getBusbarSection(String id)
Get a busbar section.int
getBusbarSectionCount()
Get the busbar section count.Iterable<BusbarSection>
getBusbarSections()
Get busbar sections.Stream<BusbarSection>
getBusbarSectionStream()
Get busbar sections.int
getInternalConnectionCount()
Get internal connection count.Iterable<VoltageLevel.NodeBreakerView.InternalConnection>
getInternalConnections()
Get internal connections.Stream<VoltageLevel.NodeBreakerView.InternalConnection>
getInternalConnectionStream()
Get internal connection stream.default int
getMaximumNodeIndex()
Get the highest index of used nodes (i.e. attached to an equipment, a switch or an internal connection) in the voltage level.int
getNode1(String switchId)
Get the first node to which a switch is connected.int
getNode2(String switchId)
Get the second node to which a switch is connected.default int
getNodeCount()
Deprecated.UsegetMaximumNodeIndex()
instead.IntStream
getNodeInternalConnectedToStream(int node)
Get the indices of the nodes connected with an internal connections to thenode
.int[]
getNodes()
Get the list of nodes.List<Integer>
getNodesInternalConnectedTo(int node)
Get the internal connections connected to thenode
.default Optional<Terminal>
getOptionalTerminal(int node)
Get the terminal corresponding to thenode
if thenode
is valid.Switch
getSwitch(String switchId)
Get a switch.int
getSwitchCount()
Get the switch count.Iterable<Switch>
getSwitches()
Get switches.List<Switch>
getSwitches(int node)
Get the switches connected to thenode
.Stream<Switch>
getSwitchStream()
Get switches.Stream<Switch>
getSwitchStream(int node)
Get the switches connected to thenode
.Terminal
getTerminal(int node)
Get the terminal corresponding to thenode
.Terminal
getTerminal1(String switchId)
Get the first terminal corresponding to theswitchId
.Terminal
getTerminal2(String switchId)
Get the second terminal corresponding to theswitchId
.default boolean
hasAttachedEquipment(int node)
Check if aConnectable
, aSwitch
or anVoltageLevel.NodeBreakerView.InternalConnection
is attached to the given node.VoltageLevel.NodeBreakerView.SwitchAdder
newBreaker()
Get a builder to create a new breaker.BusbarSectionAdder
newBusbarSection()
Get a builder to create a new busbar section.VoltageLevel.NodeBreakerView.SwitchAdder
newDisconnector()
Get a builder to create a new disconnector.VoltageLevel.NodeBreakerView.InternalConnectionAdder
newInternalConnection()
Get a builder to create a new switch.VoltageLevel.NodeBreakerView.SwitchAdder
newSwitch()
Get a builder to create a new switch.default void
removeInternalConnections(int node1, int node2)
Remove all the internal connections between node1 and node2 (not orientated) if they exist.void
removeSwitch(String switchId)
Remove a switch.void
traverse(int[] node, VoltageLevel.NodeBreakerView.TopologyTraverser traverser)
Performs a depth-first traversal of the topology graph, starting from each node in arraynodes
.void
traverse(int node, VoltageLevel.NodeBreakerView.TopologyTraverser traverser)
Performs a depth-first traversal of the topology graph, starting fromnode
.
-
-
-
Method Detail
-
getNodeCount
@Deprecated default int getNodeCount()
Deprecated.UsegetMaximumNodeIndex()
instead.Get the count of used nodes (nodes attached to an equipment, a switch or an internal connection).
-
getMaximumNodeIndex
default int getMaximumNodeIndex()
Get the highest index of used nodes (i.e. attached to an equipment, a switch or an internal connection) in the voltage level.
-
getNodes
int[] getNodes()
Get the list of nodes.
-
newSwitch
VoltageLevel.NodeBreakerView.SwitchAdder newSwitch()
Get a builder to create a new switch.
-
newInternalConnection
VoltageLevel.NodeBreakerView.InternalConnectionAdder newInternalConnection()
Get a builder to create a new switch.
-
getInternalConnectionCount
int getInternalConnectionCount()
Get internal connection count.
-
getInternalConnections
Iterable<VoltageLevel.NodeBreakerView.InternalConnection> getInternalConnections()
Get internal connections.
-
getInternalConnectionStream
Stream<VoltageLevel.NodeBreakerView.InternalConnection> getInternalConnectionStream()
Get internal connection stream.
-
removeInternalConnections
default void removeInternalConnections(int node1, int node2)
Remove all the internal connections between node1 and node2 (not orientated) if they exist.
-
newBreaker
VoltageLevel.NodeBreakerView.SwitchAdder newBreaker()
Get a builder to create a new breaker.
-
newDisconnector
VoltageLevel.NodeBreakerView.SwitchAdder newDisconnector()
Get a builder to create a new disconnector.
-
getNode1
int getNode1(String switchId)
Get the first node to which a switch is connected.- Parameters:
switchId
- the id of the switch- Throws:
PowsyblException
- if switch is not found
-
getNode2
int getNode2(String switchId)
Get the second node to which a switch is connected.- Parameters:
switchId
- the id of the switch- Throws:
PowsyblException
- if switch is not found
-
getTerminal
Terminal getTerminal(int node)
Get the terminal corresponding to thenode
.- Throws:
PowsyblException
- if node is not found.
-
getOptionalTerminal
default Optional<Terminal> getOptionalTerminal(int node)
Get the terminal corresponding to thenode
if thenode
is valid. Return an empty optional if no existing terminal corresponds tonode
.- Throws:
PowsyblException
- if node is not valid.
-
getSwitchStream
Stream<Switch> getSwitchStream(int node)
Get the switches connected to thenode
.- Throws:
PowsyblException
- if node is not found.
-
getSwitches
List<Switch> getSwitches(int node)
Get the switches connected to thenode
.- Returns:
- Throws:
PowsyblException
- if node is not found.
-
getNodeInternalConnectedToStream
IntStream getNodeInternalConnectedToStream(int node)
Get the indices of the nodes connected with an internal connections to thenode
.- Throws:
PowsyblException
- if node is not found.
-
getNodesInternalConnectedTo
List<Integer> getNodesInternalConnectedTo(int node)
Get the internal connections connected to thenode
.- Returns:
- Throws:
PowsyblException
- if node is not found.
-
hasAttachedEquipment
default boolean hasAttachedEquipment(int node)
Check if aConnectable
, aSwitch
or anVoltageLevel.NodeBreakerView.InternalConnection
is attached to the given node.- Throws:
PowsyblException
- if node is not valid
-
getTerminal1
Terminal getTerminal1(String switchId)
Get the first terminal corresponding to theswitchId
. May return null.- Throws:
PowsyblException
- if switch is not found.
-
getTerminal2
Terminal getTerminal2(String switchId)
Get the second terminal corresponding to theswitchId
. May return null.- Throws:
PowsyblException
- if switch is not found.
-
getSwitch
Switch getSwitch(String switchId)
Get a switch.- Parameters:
switchId
- the id the switch- Returns:
- the switch or
null
if not found
-
getSwitchCount
int getSwitchCount()
Get the switch count.
-
removeSwitch
void removeSwitch(String switchId)
Remove a switch.- Parameters:
switchId
- the switch id
-
newBusbarSection
BusbarSectionAdder newBusbarSection()
Get a builder to create a new busbar section.
-
getBusbarSections
Iterable<BusbarSection> getBusbarSections()
Get busbar sections.
-
getBusbarSectionStream
Stream<BusbarSection> getBusbarSectionStream()
Get busbar sections.
-
getBusbarSectionCount
int getBusbarSectionCount()
Get the busbar section count.
-
getBusbarSection
BusbarSection getBusbarSection(String id)
Get a busbar section.- Parameters:
id
- the id of the busbar section
-
traverse
void traverse(int node, VoltageLevel.NodeBreakerView.TopologyTraverser traverser)
Performs a depth-first traversal of the topology graph, starting fromnode
. Thetraverser
callback is called every time an edge is traversed.
-
traverse
void traverse(int[] node, VoltageLevel.NodeBreakerView.TopologyTraverser traverser)
Performs a depth-first traversal of the topology graph, starting from each node in arraynodes
. Thetraverser
callback is called every time an edge is traversed.
-
-