Class SubstationIdMapping
- java.lang.Object
-
- com.powsybl.cgmes.conversion.SubstationIdMapping
-
public class SubstationIdMapping extends Object
CGMES standard:
A PowerTransformer is contained in one Substation, but it can connect a Terminal to another different Substation
A Switch can connect to different voltageLevelsIIDM Model:
Ends of transformers need to be in the same substation
Ends of switches need to be in the same voltageLevelSolution:
CGMES substations that are connected by transformers will be mapped to a single IIDM substation
CGMES voltageLevels that are connected by switches will be mapped to a single IIDM voltageLevelExample:
We suppose that VL1, VL2, VL3, VL4, VL5, VL6 and VL7 are CGMES voltageLevels,
Sw23 is a switch connecting voltageLevels VL2 and VL3,
Sw34 is a switch connecting voltageLevels VL3 and VL4 and
Sw67 is a switch connecting voltageLevels VL6 and VL7Steps:
Fill voltageLevelAdjacency Map
Two voltageLevels are adjacent if they are connected by a switch
The voltageLevelAdjacency Map will include the following records
(VL1, [])
(VL2, [VL2, VL3])
(VL3, [VL2, VL3, VL4])
(VL4, [VL3, VL4])
(VL5, [])
(VL6, [VL6, VL7])
(VL7, [VL6, VL7])
For each non-visited VoltageLevel-key of the voltageLevelAdjacency Map all connected voltageLevels will be calculated
Two voltageLevels are connected if they are adjacent
(allConnected method)
All connected VoltageLevels to VL1 will be [VL1]
All connected VoltageLevels to VL2 will be [VL2, VL3, VL4]
All connected VoltageLevels to VL5 will be [VL5]
All connected VoltageLevels to VL6 will be [VL6, VL7]So the following voltageLevels should be merged
[VL2, VL3, VL4] and the representative (IIDM voltageLevel) will be VL2
[VL6, VL7] and the representative (IIDM voltageLevel) will be VL6And finally previous data is recorded in the voltageLevelMapping Map as
(For each merged voltageLevel a record (merged voltageLevel, representative voltageLevel) is added)
(VL3, VL2)
(VL4, VL2)
(VL7, VL6)
The voltageLevelMapping Map will be used to assign the IIDM voltageLevel during the conversion process
The same algorithm is used to identify the substations that should be merged but:
Two substations are adjacent if there is a transformer between them.
The two substations associated with two adjacent voltageLevels, are adjacent if they are different substations.- Author:
- Luma Zamarreño
, José Antonio Marqués
-
-
Constructor Summary
Constructors Constructor Description SubstationIdMapping(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
build()
Set<String>
mergedSubstations(String cgmesIdentifier)
Set<String>
mergedVoltageLevels(String cgmesIdentifier)
String
substationIidm(String cgmesIdentifier)
boolean
substationIsMapped(String cgmesIdentifier)
String
voltageLevelIidm(String cgmesIdentifier)
boolean
voltageLevelIsMapped(String cgmesIdentifier)
-