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.Traverser
-
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.int[]
getNodes()
Get the list of nodes.default Optional<Terminal>
getOptionalTerminal(int node)
Get the terminal corresponding to the {@param node} if the {@param node} is valid.Switch
getSwitch(String switchId)
Get a switch.int
getSwitchCount()
Get the switch count.Iterable<Switch>
getSwitches()
Get switches.Stream<Switch>
getSwitchStream()
Get switches.Terminal
getTerminal(int node)
Get the terminal corresponding to the {@param node}.Terminal
getTerminal1(String switchId)
Get the first terminal corresponding to the {@param switchId}.Terminal
getTerminal2(String switchId)
Get the second terminal corresponding to the {@param switchId}.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.Traverser traverser)
Performs a depth-first traversal of the topology graph, starting from {@param node}.
-
-
-
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 the {@param node}.- Throws:
PowsyblException
- if node is not found.
-
getOptionalTerminal
default Optional<Terminal> getOptionalTerminal(int node)
Get the terminal corresponding to the {@param node} if the {@param node} is valid. Return an empty optional if no existing terminal corresponds to {@param node}.- Throws:
PowsyblException
- if node is not valid.
-
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 the {@param switchId}. May return null.- Throws:
PowsyblException
- if switch is not found.
-
getTerminal2
Terminal getTerminal2(String switchId)
Get the second terminal corresponding to the {@param switchId}. 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.Traverser traverser)
Performs a depth-first traversal of the topology graph, starting from {@param node}. The {@param traverser} callback is called every time an edge is traversed.
-
-