Interface SlackTerminal

All Superinterfaces:
Extension<VoltageLevel>
All Known Implementing Classes:
SlackTerminalImpl

public interface SlackTerminal extends Extension<VoltageLevel>
Author:
Florian Dupuy <florian.dupuy at rte-france.com>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    attach(Bus bus)
    Create a SlackTerminal extension attached to the voltage level of the given bus, using the default TerminalFinder strategy.
    default String
    Return the name of this extension.
    Get the terminal pointed by the current SlackTerminal
    boolean
    Returns true if the current SlackTerminal is empty, meaning that this extension is unused
    static void
    reset(Network network)
    Set the terminal of all SlackTerminal extensions from the given network to null.
    static void
    reset(VoltageLevel voltageLevel, Terminal terminal)
    Reset the slackTerminal extension to the given terminal (may be null)
    Set the terminal pointed by the current SlackTerminal
    setTerminal(Terminal terminal, boolean cleanIfEmpty)
    Set the terminal pointed by the current SlackTerminal

    Methods inherited from interface com.powsybl.commons.extensions.Extension

    getExtendable, setExtendable
  • Field Details

  • Method Details

    • reset

      static void reset(Network network)
      Set the terminal of all SlackTerminal extensions from the given network to null. If the extension is empty, meaning that for each variant the terminal is null, this method automatically remove the extension.
      Parameters:
      network - A network to cleanup
    • reset

      static void reset(VoltageLevel voltageLevel, Terminal terminal)
      Reset the slackTerminal extension to the given terminal (may be null)
      Parameters:
      voltageLevel - the voltageLevel to reset the slackTerminal extension from
      terminal - the terminal to reset the extension to (may be null)
    • attach

      static void attach(Bus bus)
      Create a SlackTerminal extension attached to the voltage level of the given bus, using the default TerminalFinder strategy.
    • getName

      default String getName()
      Description copied from interface: Extension
      Return the name of this extension.
      Specified by:
      getName in interface Extension<VoltageLevel>
    • getTerminal

      Terminal getTerminal()
      Get the terminal pointed by the current SlackTerminal
      Returns:
      the corresponding terminal
    • setTerminal

      SlackTerminal setTerminal(Terminal terminal)
      Set the terminal pointed by the current SlackTerminal
      Parameters:
      terminal - the corresponding terminal
      Returns:
      the current SlackTerminal
    • setTerminal

      default SlackTerminal setTerminal(Terminal terminal, boolean cleanIfEmpty)
      Set the terminal pointed by the current SlackTerminal
      Parameters:
      terminal - the corresponding terminal (may be null)
      cleanIfEmpty - if true and if the slackTerminal is empty, removes the SlackTerminal extension from the corresponding VoltageLevel
      Returns:
      the current SlackTerminal
    • isEmpty

      boolean isEmpty()
      Returns true if the current SlackTerminal is empty, meaning that this extension is unused