Package com.powsybl.iidm.network.util
Class TieLineUtil
- java.lang.Object
-
- com.powsybl.iidm.network.util.TieLineUtil
-
public final class TieLineUtil extends Object
- Author:
- Luma Zamarreño
, José Antonio Marqués
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
buildMergedId(String id1, String id2)
static String
buildMergedName(String id1, String id2, String name1, String name2)
static void
findAndAssociateDanglingLines(DanglingLine candidateDanglingLine, DanglingLine danglingLine, Function<String,List<DanglingLine>> getDanglingLinesByXnodeCode, 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.static double
getB1(DanglingLine dl1, DanglingLine dl2)
static double
getB2(DanglingLine dl1, DanglingLine dl2)
static double
getG1(DanglingLine dl1, DanglingLine dl2)
static double
getG2(DanglingLine dl1, DanglingLine dl2)
static double
getR(DanglingLine dl1, DanglingLine dl2)
static double
getX(DanglingLine dl1, DanglingLine dl2)
static void
mergeDifferentAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases, Reporter reporter)
static void
mergeIdenticalAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases)
static void
mergeIdenticalAliases(DanglingLine dl1, DanglingLine dl2, Map<String,String> aliases, Reporter reporter)
static void
mergeProperties(DanglingLine dl1, DanglingLine dl2, Properties properties)
static void
mergeProperties(DanglingLine dl1, DanglingLine dl2, Properties properties, Reporter reporter)
-
-
-
Method Detail
-
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)
-
findAndAssociateDanglingLines
public static void findAndAssociateDanglingLines(DanglingLine candidateDanglingLine, DanglingLine danglingLine, Function<String,List<DanglingLine>> getDanglingLinesByXnodeCode, 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 ID and at least one has a non-null X-node code OR - they have the same non-null X-node code and are the only dangling lines to have this X-node code in their respective networks OR - they have the same non-null X-node code and are the only connected dangling lines to have this X-node code in their respective networks- Parameters:
candidateDanglingLine
- candidate dangling line in the network to be mergeddanglingLine
- dangling line in the merging network with same ID as the candidate dangling line. Can be null.getDanglingLinesByXnodeCode
- function to retrieve dangling lines with a given X-node code 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)
-
-