Class TieLineUtil

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

public final class TieLineUtil extends Object
Author:
Luma Zamarreño <zamarrenolm at aia.es>, José Antonio Marqués <marquesja at aia.es>
  • Field Details

  • Method Details

    • buildMergedId

      public static String buildMergedId(String id1, String id2)
    • buildMergedName

      public static String buildMergedName(String id1, String id2, String name1, String name2)
    • mergeProperties

      public static void mergeProperties(DanglingLine dl1, DanglingLine dl2, Properties properties)
    • mergeProperties

      public static void mergeProperties(DanglingLine dl1, DanglingLine dl2, Properties properties, Reporter reporter)
    • mergeIdenticalAliases

      public static void mergeIdenticalAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases)
    • mergeIdenticalAliases

      public static void mergeIdenticalAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases, Reporter reporter)
    • mergeDifferentAliases

      public static void mergeDifferentAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases, Reporter reporter)
    • findCandidateDanglingLines

      public static List<DanglingLine> findCandidateDanglingLines(Network network, Predicate<String> logPairingKey)
      Analyze a network and return its dangling lines which are candidate to become tie lines when merging the network with another. Is candidate for a pairing key 'k':
    • the only connected dangling line of pairing key 'k', if disconnected dangling lines of pairing key 'k' exist;
    • the only disconnected dangling line of pairing key 'k', if no connected dangling line of pairing key 'k' exists.
    • no dangling line at all
    • Parameters:
      network - a network
      logPairingKey - a Predicate indicating if we want to log a warning when several dangling lines are found for the same pairing key.
      Returns:
      The list of the dangling lines which are candidate to become tie lines (one or zero by pairing key)
    • findAndAssociateDanglingLines

      public static void findAndAssociateDanglingLines(DanglingLine candidateDanglingLine, Function<String,List<DanglingLine>> getDanglingLinesByPairingKey, BiConsumer<DanglingLine,DanglingLine> associateDanglingLines)
      If it exists, find the dangling line in the merging network that should be associated to a candidate dangling line in the network to be merged. Two dangling lines in different IGM should be associated if: - they have the same non-null pairing key and are the only dangling lines to have this pairing key in their respective networks OR - they have the same non-null pairing key and are the only connected dangling lines to have this pairing key in their respective networks
      Parameters:
      candidateDanglingLine - candidate dangling line in the network to be merged
      getDanglingLinesByPairingKey - function to retrieve dangling lines with a given pairing key in the merging network.
      associateDanglingLines - function associating two dangling lines
    • getR

      public static double getR(DanglingLine dl1, DanglingLine dl2)
    • getX

      public static double getX(DanglingLine dl1, DanglingLine dl2)
    • getG1

      public static double getG1(DanglingLine dl1, DanglingLine dl2)
    • getB1

      public static double getB1(DanglingLine dl1, DanglingLine dl2)
    • getG2

      public static double getG2(DanglingLine dl1, DanglingLine dl2)
    • getB2

      public static double getB2(DanglingLine dl1, DanglingLine dl2)
    • getPairedDanglingLine

      public static Optional<DanglingLine> getPairedDanglingLine(DanglingLine danglingLine)

      Retrieve, if it exists, the dangling line paired to the given one.

      Parameters:
      danglingLine - a dangling line
      Returns:
      an Optional containing the dangling line paired to the given one