Skip to content

Commit b038f88

Browse files
committed
old uncommented code removed
1 parent 7818446 commit b038f88

File tree

1 file changed

+0
-159
lines changed

1 file changed

+0
-159
lines changed

src/CIM.Mapper/DAX.IO.CIM/Serialization/CIM100/CIM100Serializer.cs

Lines changed: 0 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,165 +2014,6 @@ private void MapSwitchEquipmentFields(CIMIdentifiedObject cimObj, Switch xmlObj)
20142014
}
20152015
}
20162016

2017-
/*
2018-
private IEnumerable<IdentifiedObject> MapSubstation(CIMEquipmentContainer cimObj, Substation xmlObj)
2019-
{
2020-
Dictionary<int, VoltageLevel> substationVoltageLevels = new Dictionary<int, VoltageLevel>();
2021-
2022-
// Create voltage levels
2023-
int voltageLevelCounter = 0;
2024-
2025-
List<int> vlCandidates = new List<int>();
2026-
2027-
foreach (var child in cimObj.Children)
2028-
vlCandidates.Add(child.VoltageLevel);
2029-
2030-
// Make sure we add transformer cables in satallite stations, lv on local trafo etc
2031-
foreach (var child in cimObj.Children)
2032-
{
2033-
if (child is CIMPowerTransformer)
2034-
{
2035-
var tfCables = child.GetNeighboursNeighbors(CIMClassEnum.ACLineSegment);
2036-
2037-
foreach (var tfCable in tfCables)
2038-
vlCandidates.Add(tfCable.VoltageLevel);
2039-
}
2040-
2041-
// local trafo voltage level hack - because we don't have any conducting equipment component on the secondary side, we need add 400 volt voltage level here
2042-
if (child is CIMPowerTransformer && child.Name != null && child.Name.ToLower().Contains("lokal"))
2043-
{
2044-
vlCandidates.Add(400);
2045-
}
2046-
}
2047-
2048-
foreach (var vl in vlCandidates)
2049-
{
2050-
if (!substationVoltageLevels.ContainsKey(vl))
2051-
{
2052-
voltageLevelCounter++;
2053-
2054-
var baseVoltage = vl;
2055-
2056-
substationVoltageLevels[vl] = new VoltageLevel()
2057-
{
2058-
BaseVoltage =
2059-
baseVoltage,
2060-
mRID = GUIDHelper.CreateDerivedGuid(cimObj.mRID, voltageLevelCounter).ToString(),
2061-
name = GetVoltageString(baseVoltage),
2062-
EquipmentContainer1 = new VoltageLevelEquipmentContainer() { @ref = xmlObj.mRID }
2063-
};
2064-
2065-
CheckIfProcessed(substationVoltageLevels[vl].mRID, substationVoltageLevels[vl]);
2066-
2067-
if (_includeEquipment)
2068-
yield return substationVoltageLevels[vl];
2069-
}
2070-
}
2071-
2072-
// Needed to fix switches outside bays relationship
2073-
_substationVoltageLevelsByMrid.Add(cimObj.mRID, substationVoltageLevels);
2074-
2075-
2076-
// Process substation children
2077-
foreach (var child in cimObj.Children)
2078-
{
2079-
// Bay
2080-
if (child.ClassType == CIMClassEnum.Bay)
2081-
{
2082-
CIMEquipmentContainer bay = child as CIMEquipmentContainer;
2083-
2084-
var xmlBay = new BayExt();
2085-
2086-
MapIdentifiedObjectFields(bay, xmlBay);
2087-
2088-
xmlBay.order = bay.GetPropertyValueAsString("cim.order");
2089-
2090-
if (substationVoltageLevels.ContainsKey(bay.VoltageLevel))
2091-
xmlBay.VoltageLevel = new BayVoltageLevel() { @ref = substationVoltageLevels[bay.VoltageLevel].mRID };
2092-
2093-
if (_includeEquipment)
2094-
yield return xmlBay;
2095-
2096-
// Process bay children
2097-
foreach (var bayChild in bay.Children)
2098-
{
2099-
foreach (var identifiedObject in ProcessLeafObject(bayChild, xmlBay, child.VoltageLevel, substationVoltageLevels))
2100-
{
2101-
yield return identifiedObject;
2102-
}
2103-
}
2104-
}
2105-
else
2106-
{
2107-
foreach (var identifiedObject in ProcessLeafObject(child, xmlObj, cimObj.VoltageLevel, substationVoltageLevels))
2108-
{
2109-
yield return identifiedObject;
2110-
}
2111-
}
2112-
}
2113-
}
2114-
2115-
private IEnumerable<IdentifiedObject> MapEnclosure(CIMEquipmentContainer cimObj, Substation xmlObj)
2116-
{
2117-
Dictionary<int, VoltageLevel> substationVoltageLevels = new Dictionary<int, VoltageLevel>();
2118-
2119-
// Always 400 volt voltage level
2120-
var baseVoltage = 400;
2121-
var voltageLevel = new VoltageLevel()
2122-
{
2123-
BaseVoltage = baseVoltage,
2124-
mRID = GUIDHelper.CreateDerivedGuid(cimObj.mRID, 1).ToString(),
2125-
name = GetVoltageString(baseVoltage),
2126-
EquipmentContainer1 = new VoltageLevelEquipmentContainer() { @ref = xmlObj.mRID }
2127-
};
2128-
CheckIfProcessed(voltageLevel.mRID, voltageLevel);
2129-
2130-
if (_includeEquipment)
2131-
yield return voltageLevel;
2132-
2133-
substationVoltageLevels.Add(400, voltageLevel);
2134-
2135-
2136-
// Process substation children
2137-
foreach (var child in cimObj.Children)
2138-
{
2139-
// Bay
2140-
if (child.ClassType == CIMClassEnum.Bay)
2141-
{
2142-
CIMEquipmentContainer bay = child as CIMEquipmentContainer;
2143-
2144-
var xmlBay = new BayExt();
2145-
2146-
MapIdentifiedObjectFields(bay, xmlBay);
2147-
2148-
xmlBay.order = bay.GetPropertyValueAsString("cim.order");
2149-
2150-
if (substationVoltageLevels.ContainsKey(bay.VoltageLevel))
2151-
xmlBay.VoltageLevel = new BayVoltageLevel() { @ref = substationVoltageLevels[bay.VoltageLevel].mRID };
2152-
2153-
if (_includeEquipment)
2154-
yield return xmlBay;
2155-
2156-
// Process bay children
2157-
foreach (var bayChild in bay.Children)
2158-
{
2159-
foreach (var identifiedObject in ProcessLeafObject(bayChild, xmlBay, child.VoltageLevel, substationVoltageLevels))
2160-
{
2161-
yield return identifiedObject;
2162-
}
2163-
}
2164-
}
2165-
else
2166-
{
2167-
foreach (var identifiedObject in ProcessLeafObject(child, xmlObj, cimObj.VoltageLevel, substationVoltageLevels))
2168-
{
2169-
yield return identifiedObject;
2170-
}
2171-
}
2172-
}
2173-
}
2174-
*/
2175-
21762017
private IEnumerable<IdentifiedObject> MapTerminals(CIMConductingEquipment cimObj, ConductingEquipment xmlObj)
21772018
{
21782019
if (_includeEquipment)

0 commit comments

Comments
 (0)