Class Networks

java.lang.Object
com.powsybl.iidm.network.util.Networks

public final class Networks extends Object
Author:
Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
  • Method Details

    • isBusValid

      public static boolean isBusValid(int feederCount)
    • getExecutionTags

      public static Map<String,String> getExecutionTags(Network network)
    • dumpVariantId

      public static void dumpVariantId(Path workingDir, String variantId) throws IOException
      Throws:
      IOException
    • dumpVariantId

      public static void dumpVariantId(Path workingDir, Network network) throws IOException
      Throws:
      IOException
    • printBalanceSummary

      public static void printBalanceSummary(String title, Network network, Writer writer) throws IOException
      Throws:
      IOException
    • printGeneratorsSetpointDiff

      public static void printGeneratorsSetpointDiff(Network network, org.slf4j.Logger logger)
    • getNodesByBus

      public static Map<String,Set<Integer>> getNodesByBus(VoltageLevel voltageLevel)
      Return the list of nodes (N/B topology) for each bus of a the Bus view If a node is not associated to a bus, it is not included in any list.
      Parameters:
      voltageLevel - The voltage level to traverse
      Returns:
      the list of nodes (N/B topology) for each bus of a Bus view
    • getNodes

      public static IntStream getNodes(String busId, VoltageLevel voltageLevel, Function<Terminal,Bus> getBusFromTerminal)
    • getEquivalentTerminal

      public static Terminal getEquivalentTerminal(VoltageLevel voltageLevel, int node)
      Return a terminal for the specified node. If a terminal is attached to the node, return this terminal. Otherwise, this method traverses the topology and return the first equivalent terminal found.
      Parameters:
      voltageLevel - The voltage level to traverse
      node - The starting node
      Returns:
      A terminal for the specified node or null.
    • executeWithReporter

      public static void executeWithReporter(Network network, Reporter reporter, Runnable runnable)
      Set a Reporter in the reporter context of the given network, execute a runnable then restore the reporter context.
      Parameters:
      network - a network
      reporter - the reporter to use
      runnable - the runnable to execute
    • allowReporterContextMultiThreadAccess

      public static AbstractReporterContext allowReporterContextMultiThreadAccess(AbstractReporterContext reporterContext, boolean allow)
      Returns a ReporterContext containing the same reporters as the given one, but reconfigured to allow it, or not, to be accessed simultaneously by different threads. When this option is activated, the reporter context can have a different content for each thread.
      Parameters:
      reporterContext - the ReporterContext to reconfigure
      allow - allow multi-thread access to the ReporterContext
      Returns:
      the reconfigured ReporterContext