Interface VoltageLevel.NodeBreakerView

  • Enclosing interface:
    VoltageLevel

    public static interface VoltageLevel.NodeBreakerView
    A node/breaker view of the topology.
    • Method Detail

      • getNodeCount

        @Deprecated
        default int getNodeCount()
        Deprecated.
        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.
      • getInternalConnectionCount

        int getInternalConnectionCount()
        Get internal connection count.
      • removeInternalConnections

        default void removeInternalConnections​(int node1,
                                               int node2)
        Remove all the internal connections between node1 and node2 (not orientated) if they exist.
      • 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.
      • 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
      • getSwitchStream

        Stream<Switch> getSwitchStream()
        Get switches.
      • 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.
      • 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.