@enervance/insight-cim-model 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/rdf-xml.d.ts +2 -0
- package/dist/constants/rdf-xml.js +2 -0
- package/dist/constants/rdf-xml.js.map +1 -1
- package/dist/converter/integral7/ConverterIntegral7.js +23 -26
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/config/integral-prefix.d.ts +1 -0
- package/dist/converter/integral7/config/integral-prefix.js +2 -1
- package/dist/converter/integral7/config/integral-prefix.js.map +1 -1
- package/dist/converter/integral7/converter-i7.d.ts +37 -16
- package/dist/converter/integral7/converter-i7.js +1137 -606
- package/dist/converter/integral7/converter-i7.js.map +1 -1
- package/dist/converter/integral7/interface-i7/IDefaultValuesConfig.d.ts +7 -2
- package/dist/converter/integral7/interface-i7/IObjectMappingConfig.d.ts +3 -0
- package/dist/converter/integral7/interface-i7/data-structures-i7.d.ts +11 -0
- package/dist/converter/integral7/interface-i7/data-structures-i7.js.map +1 -1
- package/dist/converter/integral7/interface-i7/export-frame-i7.d.ts +13 -2
- package/dist/converter/integral7/interface-i7/export-frame-i7.js +36 -40
- package/dist/converter/integral7/interface-i7/export-frame-i7.js.map +1 -1
- package/dist/converter/integral7/model/dl-utils/SsabNsg.d.ts +30 -0
- package/dist/converter/integral7/model/dl-utils/SsabNsg.js +179 -0
- package/dist/converter/integral7/model/dl-utils/SsabNsg.js.map +1 -0
- package/dist/converter/integral7/model/dl-utils/constants.d.ts +4 -0
- package/dist/converter/integral7/model/dl-utils/constants.js +9 -0
- package/dist/converter/integral7/model/dl-utils/constants.js.map +1 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +3 -0
- package/dist/converter/integral7/model/integral/Laengskupplung.d.ts +11 -0
- package/dist/converter/integral7/model/integral/Laengskupplung.js +17 -0
- package/dist/converter/integral7/model/integral/Laengskupplung.js.map +1 -0
- package/dist/converter/integral7/model/integral/Point.d.ts +2 -0
- package/dist/converter/integral7/model/integral/Point.js +20 -0
- package/dist/converter/integral7/model/integral/Point.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +90 -4
- package/dist/converter/integral7/model/interfaces.js +9 -0
- package/dist/converter/integral7/model/interfaces.js.map +1 -1
- package/dist/converter/integral7/sql/integral.sql.d.ts +10 -0
- package/dist/converter/integral7/sql/integral.sql.js +116 -67
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils-cgmes-export.d.ts +2 -1
- package/dist/converter/integral7/utils-cgmes-export.js +35 -1
- package/dist/converter/integral7/utils-cgmes-export.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +6 -6
- package/dist/converter/integral7/utils.js +42 -33
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl/etl-eagle/etl-eagle-cim.d.ts +5 -0
- package/dist/etl/etl-eagle/etl-eagle-cim.js +17 -0
- package/dist/etl/etl-eagle/etl-eagle-cim.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/model/core/Equipment.d.ts +7 -4
- package/dist/model/core/Equipment.js +30 -13
- package/dist/model/core/Equipment.js.map +1 -1
- package/dist/model/core/IdentifiedObject.d.ts +6 -6
- package/dist/model/core/IdentifiedObject.js +20 -17
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/PSRType.d.ts +1 -1
- package/dist/model/core/PSRType.js +46 -46
- package/dist/model/core/PSRType.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +5 -4
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.d.ts +1 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js +11 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.js +1 -1
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCLineSegment.js +26 -26
- package/dist/model/dc/DCLineSegment.js.map +1 -1
- package/dist/model/dc/DCTerminal.d.ts +1 -0
- package/dist/model/dc/DCTerminal.js +11 -0
- package/dist/model/dc/DCTerminal.js.map +1 -1
- package/dist/model/dc/VsConverter.js +1 -1
- package/dist/model/dc/VsConverter.js.map +1 -1
- package/dist/model/diagram/DiagramObject.js +2 -2
- package/dist/model/diagram/DiagramObject.js.map +1 -1
- package/dist/model/equivalents/EquivalentBranch.js +45 -45
- package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
- package/dist/model/equivalents/EquivalentInjection.js +1 -1
- package/dist/model/equivalents/EquivalentInjection.js.map +1 -1
- package/dist/model/extensions/amprion/assets/AMPRIONSpanField.js +6 -0
- package/dist/model/extensions/amprion/assets/AMPRIONSpanField.js.map +1 -1
- package/dist/model/extensions/amprion/assets/AMPRIONWire.js +7 -0
- package/dist/model/extensions/amprion/assets/AMPRIONWire.js.map +1 -1
- package/dist/model/extensions/amprion/core/AMPRIONLine.js +23 -23
- package/dist/model/extensions/amprion/core/AMPRIONLine.js.map +1 -1
- package/dist/model/extensions/amprion/core/AMPRIONSubstation.js +1 -1
- package/dist/model/extensions/amprion/core/AMPRIONSubstation.js.map +1 -1
- package/dist/model/extensions/amprion/model/AMPRIONModel.js.map +1 -1
- package/dist/model/extensions/amprion/wires/AMPRIONACLineSegment.d.ts +1 -1
- package/dist/model/extensions/amprion/wires/AMPRIONACLineSegment.js +39 -39
- package/dist/model/extensions/amprion/wires/AMPRIONACLineSegment.js.map +1 -1
- package/dist/model/extensions/enervance/assetinfo/EVPowerTransformerEndInfo.d.ts +1 -0
- package/dist/model/extensions/enervance/assetinfo/EVPowerTransformerEndInfo.js +3 -0
- package/dist/model/extensions/enervance/assetinfo/EVPowerTransformerEndInfo.js.map +1 -1
- package/dist/model/extensions/enervance/assetinfo/EVPowerTransformerInfo.js.map +1 -1
- package/dist/model/extensions/enervance/assetinfo/EVTapChangerInfo.d.ts +1 -0
- package/dist/model/extensions/enervance/assetinfo/EVTapChangerInfo.js +3 -0
- package/dist/model/extensions/enervance/assetinfo/EVTapChangerInfo.js.map +1 -1
- package/dist/model/extensions/integral/common/INTEGRALMultiplierFactor.d.ts +14 -0
- package/dist/model/extensions/integral/common/INTEGRALMultiplierFactor.js +43 -0
- package/dist/model/extensions/integral/common/INTEGRALMultiplierFactor.js.map +1 -0
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.d.ts +9 -0
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js +34 -0
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js.map +1 -0
- package/dist/model/extensions/integral/model/INTEGRALModel.d.ts +8 -0
- package/dist/model/extensions/integral/model/INTEGRALModel.js +19 -0
- package/dist/model/extensions/integral/model/INTEGRALModel.js.map +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALACLineSegment.d.ts +8 -0
- package/dist/model/extensions/integral/wires/INTEGRALACLineSegment.js +34 -0
- package/dist/model/extensions/integral/wires/INTEGRALACLineSegment.js.map +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.d.ts +8 -0
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js +34 -0
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js.map +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.d.ts +8 -0
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js +34 -0
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js.map +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine copy.d.ts +8 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine copy.js +34 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine copy.js.map +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.d.ts +8 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js +34 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js +1 -1
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js +22 -3
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/core/WNFeeder.js +2 -2
- package/dist/model/extensions/neplan-westnetz/core/WNFeeder.js.map +1 -1
- package/dist/model/generation/GeneratingUnit.js +1 -1
- package/dist/model/generation/GeneratingUnit.js.map +1 -1
- package/dist/model/generation/HydroGeneratingUnit.js +1 -1
- package/dist/model/generation/HydroGeneratingUnit.js.map +1 -1
- package/dist/model/generation/SolarGeneratingUnit.js +1 -1
- package/dist/model/generation/SolarGeneratingUnit.js.map +1 -1
- package/dist/model/generation/ThermalGeneratingUnit.js +1 -1
- package/dist/model/generation/ThermalGeneratingUnit.js.map +1 -1
- package/dist/model/generation/WindGeneratingUnit.js +39 -39
- package/dist/model/generation/WindGeneratingUnit.js.map +1 -1
- package/dist/model/loadmodel/ConformLoad.js +35 -35
- package/dist/model/loadmodel/ConformLoad.js.map +1 -1
- package/dist/model/model/Model.d.ts +5 -5
- package/dist/model/model/Model.js +23 -21
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/statevariables/SvStatus.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +4 -4
- package/dist/model/wires/ACLineSegment.js +53 -53
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.js +1 -1
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/Breaker.js +35 -35
- package/dist/model/wires/Breaker.js.map +1 -1
- package/dist/model/wires/Disconnector.js +32 -32
- package/dist/model/wires/Disconnector.js.map +1 -1
- package/dist/model/wires/EnergyConsumer.js +33 -33
- package/dist/model/wires/EnergyConsumer.js.map +1 -1
- package/dist/model/wires/EnergySource.js +1 -1
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.d.ts +32 -1
- package/dist/model/wires/ExternalNetworkInjection.js +129 -11
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/GroundingImpedance.js +1 -1
- package/dist/model/wires/GroundingImpedance.js.map +1 -1
- package/dist/model/wires/Junction.js +21 -21
- package/dist/model/wires/Junction.js.map +1 -1
- package/dist/model/wires/Line.js +24 -24
- package/dist/model/wires/Line.js.map +1 -1
- package/dist/model/wires/LinearShuntCompensator.js +37 -37
- package/dist/model/wires/LinearShuntCompensator.js.map +1 -1
- package/dist/model/wires/PetersenCoil.js +35 -35
- package/dist/model/wires/PetersenCoil.js.map +1 -1
- package/dist/model/wires/PowerTransformer.js +3 -3
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.js +2 -2
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.d.ts +1 -1
- package/dist/model/wires/RatioTapChanger.js +15 -3
- package/dist/model/wires/RatioTapChanger.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.js +1 -1
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.js +37 -37
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/model/wires/StaticVarCompensator.js +1 -1
- package/dist/model/wires/StaticVarCompensator.js.map +1 -1
- package/dist/model/wires/SynchronousMachine.js +58 -58
- package/dist/model/wires/SynchronousMachine.js.map +1 -1
- package/dist/model/wires/TapChanger.js +8 -3
- package/dist/model/wires/TapChanger.js.map +1 -1
- package/dist/model/wires/TransformerControlMode.js.map +1 -1
- package/dist/util/collection/util-graph.d.ts +21 -3
- package/dist/util/collection/util-graph.js +94 -2
- package/dist/util/collection/util-graph.js.map +1 -1
- package/dist/util/util-create.d.ts +1 -1
- package/dist/util/util-create.js +14 -2
- package/dist/util/util-create.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,131 +2,149 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConverterI7 = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
+
const jszip_1 = tslib_1.__importDefault(require("jszip"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
|
+
const perf_hooks_1 = require("perf_hooks");
|
|
9
|
+
const cim_class_names_1 = require("../../constants/cim-class-names");
|
|
10
|
+
const cim_constants_1 = require("../../constants/cim-constants");
|
|
9
11
|
const rdf_xml_1 = require("../../constants/rdf-xml");
|
|
10
|
-
const utils_1 = require("../../util/utils");
|
|
11
|
-
const LoadArea_1 = require("../../model/loadmodel/LoadArea");
|
|
12
|
-
const SubLoadArea_1 = require("../../model/loadmodel/SubLoadArea");
|
|
13
|
-
const ConformLoadGroup_1 = require("../../model/loadmodel/ConformLoadGroup");
|
|
14
12
|
const CoordinateSystem_1 = require("../../model/common/CoordinateSystem");
|
|
15
|
-
const integral_sql_1 = require("./sql/integral.sql");
|
|
16
|
-
const GeographicalRegion_1 = require("../../model/core/GeographicalRegion");
|
|
17
|
-
const SubGeographicalRegion_1 = require("../../model/core/SubGeographicalRegion");
|
|
18
|
-
const integral_prefix_1 = require("./config/integral-prefix");
|
|
19
|
-
const utils_2 = require("./utils");
|
|
20
|
-
const AMPRIONSubstation_1 = require("../../model/extensions/amprion/core/AMPRIONSubstation");
|
|
21
13
|
const Location_1 = require("../../model/common/Location");
|
|
22
14
|
const PositionPoint_1 = require("../../model/common/PositionPoint");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
15
|
+
const Bay_1 = require("../../model/core/Bay");
|
|
16
|
+
const ConnectivityNode_1 = require("../../model/core/ConnectivityNode");
|
|
17
|
+
const CurveData_1 = require("../../model/core/CurveData");
|
|
18
|
+
const CurveStyle_1 = require("../../model/core/CurveStyle");
|
|
19
|
+
const GeographicalRegion_1 = require("../../model/core/GeographicalRegion");
|
|
20
|
+
const PhaseCode_1 = require("../../model/core/PhaseCode");
|
|
21
|
+
const SubGeographicalRegion_1 = require("../../model/core/SubGeographicalRegion");
|
|
22
|
+
const Substation_1 = require("../../model/core/Substation");
|
|
23
|
+
const Terminal_1 = require("../../model/core/Terminal");
|
|
31
24
|
const VoltageLevel_1 = require("../../model/core/VoltageLevel");
|
|
32
|
-
const
|
|
25
|
+
const ACDCConverterDCTerminal_1 = require("../../model/dc/ACDCConverterDCTerminal");
|
|
26
|
+
const CsConverter_1 = require("../../model/dc/CsConverter");
|
|
27
|
+
const CsOperatingModeKind_1 = require("../../model/dc/CsOperatingModeKind");
|
|
28
|
+
const DCConverterOperatingModeKind_1 = require("../../model/dc/DCConverterOperatingModeKind");
|
|
29
|
+
const DCConverterUnit_1 = require("../../model/dc/DCConverterUnit");
|
|
30
|
+
const DCLine_1 = require("../../model/dc/DCLine");
|
|
31
|
+
const DCLineSegment_1 = require("../../model/dc/DCLineSegment");
|
|
32
|
+
const DCNode_1 = require("../../model/dc/DCNode");
|
|
33
|
+
const DCTerminal_1 = require("../../model/dc/DCTerminal");
|
|
34
|
+
const VsConverter_1 = require("../../model/dc/VsConverter");
|
|
35
|
+
const VsPpccControlKind_1 = require("../../model/dc/VsPpccControlKind");
|
|
36
|
+
const VsQpccControlKind_1 = require("../../model/dc/VsQpccControlKind");
|
|
37
|
+
const Diagram_1 = require("../../model/diagram/Diagram");
|
|
38
|
+
const DiagramObject_1 = require("../../model/diagram/DiagramObject");
|
|
39
|
+
const DiagramObjectPoint_1 = require("../../model/diagram/DiagramObjectPoint");
|
|
40
|
+
const OrientationKind_1 = require("../../model/diagram/OrientationKind");
|
|
41
|
+
const ApparentPower_1 = require("../../model/domain/ApparentPower");
|
|
42
|
+
const CurrentFlow_1 = require("../../model/domain/CurrentFlow");
|
|
43
|
+
const UnitMultiplier_1 = require("../../model/domain/UnitMultiplier");
|
|
44
|
+
const UnitSymbol_1 = require("../../model/domain/UnitSymbol");
|
|
45
|
+
const Voltage_1 = require("../../model/domain/Voltage");
|
|
46
|
+
const SynchronousMachineTimeConstantReactance_1 = require("../../model/dynamics/standard-models/synchronous-machine-dynamics/SynchronousMachineTimeConstantReactance");
|
|
47
|
+
const EquivalentBranch_1 = require("../../model/equivalents/EquivalentBranch");
|
|
48
|
+
const EquivalentInjection_1 = require("../../model/equivalents/EquivalentInjection");
|
|
33
49
|
const AMPRIONBay_1 = require("../../model/extensions/amprion/core/AMPRIONBay");
|
|
34
|
-
const Substation_1 = require("../../model/core/Substation");
|
|
35
50
|
const AMPRIONConnectivityNode_1 = require("../../model/extensions/amprion/core/AMPRIONConnectivityNode");
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
51
|
+
const AMPRIONLine_1 = require("../../model/extensions/amprion/core/AMPRIONLine");
|
|
52
|
+
const AMPRIONSubstation_1 = require("../../model/extensions/amprion/core/AMPRIONSubstation");
|
|
53
|
+
const AMPRIONSeriesCompensator_1 = require("../../model/extensions/amprion/wires/AMPRIONSeriesCompensator");
|
|
54
|
+
const EVPowerTransformerEndInfo_1 = require("../../model/extensions/enervance/assetinfo/EVPowerTransformerEndInfo");
|
|
55
|
+
const EVPowerTransformerInfo_1 = require("../../model/extensions/enervance/assetinfo/EVPowerTransformerInfo");
|
|
56
|
+
const EVTapChangerInfo_1 = require("../../model/extensions/enervance/assetinfo/EVTapChangerInfo");
|
|
57
|
+
const EVWireInfo_1 = require("../../model/extensions/enervance/assetinfo/EVWireInfo");
|
|
58
|
+
const GeneratingUnit_1 = require("../../model/generation/GeneratingUnit");
|
|
59
|
+
const GeneratorControlSource_1 = require("../../model/generation/GeneratorControlSource");
|
|
60
|
+
const HydroEnergyConversionKind_1 = require("../../model/generation/HydroEnergyConversionKind");
|
|
61
|
+
const HydroGeneratingUnit_1 = require("../../model/generation/HydroGeneratingUnit");
|
|
62
|
+
const NuclearGeneratingUnit_1 = require("../../model/generation/NuclearGeneratingUnit");
|
|
63
|
+
const SolarGeneratingUnit_1 = require("../../model/generation/SolarGeneratingUnit");
|
|
64
|
+
const ThermalGeneratingUnit_1 = require("../../model/generation/ThermalGeneratingUnit");
|
|
65
|
+
const WindGeneratingUnit_1 = require("../../model/generation/WindGeneratingUnit");
|
|
66
|
+
const WindGenUnitKind_1 = require("../../model/generation/WindGenUnitKind");
|
|
67
|
+
const ConformLoadGroup_1 = require("../../model/loadmodel/ConformLoadGroup");
|
|
68
|
+
const LoadArea_1 = require("../../model/loadmodel/LoadArea");
|
|
69
|
+
const SubLoadArea_1 = require("../../model/loadmodel/SubLoadArea");
|
|
70
|
+
const CurrentLimit_1 = require("../../model/operationallimits/CurrentLimit");
|
|
71
|
+
const LimitTypeKind_1 = require("../../model/operationallimits/LimitTypeKind");
|
|
72
|
+
const OperationalLimitDirectionKind_1 = require("../../model/operationallimits/OperationalLimitDirectionKind");
|
|
73
|
+
const OperationalLimitSet_1 = require("../../model/operationallimits/OperationalLimitSet");
|
|
74
|
+
const OperationalLimitType_1 = require("../../model/operationallimits/OperationalLimitType");
|
|
75
|
+
const VoltageLimit_1 = require("../../model/operationallimits/VoltageLimit");
|
|
76
|
+
const ControlArea_1 = require("../../model/operations/ControlArea");
|
|
77
|
+
const Breaker_1 = require("../../model/wires/Breaker");
|
|
41
78
|
const BusbarSection_1 = require("../../model/wires/BusbarSection");
|
|
42
|
-
const
|
|
43
|
-
const ConformLoad_1 = require("../../model/loadmodel/ConformLoad");
|
|
79
|
+
const Disconnector_1 = require("../../model/wires/Disconnector");
|
|
44
80
|
const EnergyConsumer_1 = require("../../model/wires/EnergyConsumer");
|
|
45
81
|
const EnergySource_1 = require("../../model/wires/EnergySource");
|
|
46
|
-
const EquivalentInjection_1 = require("../../model/equivalents/EquivalentInjection");
|
|
47
82
|
const ExternalNetworkInjection_1 = require("../../model/wires/ExternalNetworkInjection");
|
|
48
|
-
const Disconnector_1 = require("../../model/wires/Disconnector");
|
|
49
|
-
const Breaker_1 = require("../../model/wires/Breaker");
|
|
50
83
|
const GroundingImpedance_1 = require("../../model/wires/GroundingImpedance");
|
|
84
|
+
const Junction_1 = require("../../model/wires/Junction");
|
|
85
|
+
const Line_1 = require("../../model/wires/Line");
|
|
86
|
+
const LinearShuntCompensator_1 = require("../../model/wires/LinearShuntCompensator");
|
|
51
87
|
const PetersenCoil_1 = require("../../model/wires/PetersenCoil");
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const CurrentFlow_1 = require("../../model/domain/CurrentFlow");
|
|
56
|
-
const UnitMultiplier_1 = require("../../model/domain/UnitMultiplier");
|
|
57
|
-
const UnitSymbol_1 = require("../../model/domain/UnitSymbol");
|
|
58
|
-
const OperationalLimitSet_1 = require("../../model/operationallimits/OperationalLimitSet");
|
|
59
|
-
const OperationalLimitType_1 = require("../../model/operationallimits/OperationalLimitType");
|
|
60
|
-
const OperationalLimitDirectionKind_1 = require("../../model/operationallimits/OperationalLimitDirectionKind");
|
|
61
|
-
const LimitTypeKind_1 = require("../../model/operationallimits/LimitTypeKind");
|
|
62
|
-
const EVWireInfo_1 = require("../../model/extensions/enervance/assetinfo/EVWireInfo");
|
|
63
|
-
const EVPowerTransformerInfo_1 = require("../../model/extensions/enervance/assetinfo/EVPowerTransformerInfo");
|
|
64
|
-
const EVPowerTransformerEndInfo_1 = require("../../model/extensions/enervance/assetinfo/EVPowerTransformerEndInfo");
|
|
65
|
-
const ApparentPower_1 = require("../../model/domain/ApparentPower");
|
|
66
|
-
const Voltage_1 = require("../../model/domain/Voltage");
|
|
67
|
-
const TapChangerInfo_1 = require("../../model/assetinfo/TapChangerInfo");
|
|
88
|
+
const PhaseTapChangerAsymmetrical_1 = require("../../model/wires/PhaseTapChangerAsymmetrical");
|
|
89
|
+
const PhaseTapChangerNonLinear_1 = require("../../model/wires/PhaseTapChangerNonLinear");
|
|
90
|
+
const PhaseTapChangerSymmetrical_1 = require("../../model/wires/PhaseTapChangerSymmetrical");
|
|
68
91
|
const PowerTransformer_1 = require("../../model/wires/PowerTransformer");
|
|
69
92
|
const PowerTransformerEnd_1 = require("../../model/wires/PowerTransformerEnd");
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
93
|
+
const RatioTapChanger_1 = require("../../model/wires/RatioTapChanger");
|
|
94
|
+
const RatioTapChangerTable_1 = require("../../model/wires/RatioTapChangerTable");
|
|
95
|
+
const ReactiveCapabilityCurve_1 = require("../../model/wires/ReactiveCapabilityCurve");
|
|
96
|
+
const RegulatingControl_1 = require("../../model/wires/RegulatingControl");
|
|
74
97
|
const RegulatingControlModeKind_1 = require("../../model/wires/RegulatingControlModeKind");
|
|
75
|
-
const
|
|
98
|
+
const StaticVarCompensator_1 = require("../../model/wires/StaticVarCompensator");
|
|
76
99
|
const SynchronousMachine_1 = require("../../model/wires/SynchronousMachine");
|
|
77
100
|
const SynchronousMachineKind_1 = require("../../model/wires/SynchronousMachineKind");
|
|
78
101
|
const SynchronousMachineOperatingMode_1 = require("../../model/wires/SynchronousMachineOperatingMode");
|
|
79
|
-
const
|
|
80
|
-
const CurveStyle_1 = require("../../model/core/CurveStyle");
|
|
81
|
-
const CurveData_1 = require("../../model/core/CurveData");
|
|
82
|
-
const RegulatingControl_1 = require("../../model/wires/RegulatingControl");
|
|
83
|
-
const ThermalGeneratingUnit_1 = require("../../model/generation/ThermalGeneratingUnit");
|
|
84
|
-
const SolarGeneratingUnit_1 = require("../../model/generation/SolarGeneratingUnit");
|
|
85
|
-
const WindGeneratingUnit_1 = require("../../model/generation/WindGeneratingUnit");
|
|
86
|
-
const WindGenUnitKind_1 = require("../../model/generation/WindGenUnitKind");
|
|
87
|
-
const NuclearGeneratingUnit_1 = require("../../model/generation/NuclearGeneratingUnit");
|
|
88
|
-
const HydroGeneratingUnit_1 = require("../../model/generation/HydroGeneratingUnit");
|
|
89
|
-
const HydroEnergyConversionKind_1 = require("../../model/generation/HydroEnergyConversionKind");
|
|
90
|
-
const GeneratingUnit_1 = require("../../model/generation/GeneratingUnit");
|
|
91
|
-
const GeneratorControlSource_1 = require("../../model/generation/GeneratorControlSource");
|
|
92
|
-
const SynchronousMachineTimeConstantReactance_1 = require("../../model/dynamics/standard-models/synchronous-machine-dynamics/SynchronousMachineTimeConstantReactance");
|
|
93
|
-
const LinearShuntCompensator_1 = require("../../model/wires/LinearShuntCompensator");
|
|
94
|
-
const StaticVarCompensator_1 = require("../../model/wires/StaticVarCompensator");
|
|
95
|
-
const DCConverterUnit_1 = require("../../model/dc/DCConverterUnit");
|
|
96
|
-
const CsConverter_1 = require("../../model/dc/CsConverter");
|
|
97
|
-
const CsOperatingModeKind_1 = require("../../model/dc/CsOperatingModeKind");
|
|
98
|
-
const DCNode_1 = require("../../model/dc/DCNode");
|
|
99
|
-
const ACDCConverterDCTerminal_1 = require("../../model/dc/ACDCConverterDCTerminal");
|
|
100
|
-
const VsConverter_1 = require("../../model/dc/VsConverter");
|
|
101
|
-
const VsPpccControlKind_1 = require("../../model/dc/VsPpccControlKind");
|
|
102
|
-
const VsQpccControlKind_1 = require("../../model/dc/VsQpccControlKind");
|
|
103
|
-
const DCLine_1 = require("../../model/dc/DCLine");
|
|
104
|
-
const DCLineSegment_1 = require("../../model/dc/DCLineSegment");
|
|
105
|
-
const DCConverterOperatingModeKind_1 = require("../../model/dc/DCConverterOperatingModeKind");
|
|
106
|
-
const DCTerminal_1 = require("../../model/dc/DCTerminal");
|
|
107
|
-
const AMPRIONSeriesCompensator_1 = require("../../model/extensions/amprion/wires/AMPRIONSeriesCompensator");
|
|
108
|
-
const jszip_1 = tslib_1.__importDefault(require("jszip"));
|
|
109
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
110
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
111
|
-
const AsynchronousMachine_1 = require("../../model/wires/AsynchronousMachine");
|
|
112
|
-
const EquivalentBranch_1 = require("../../model/equivalents/EquivalentBranch");
|
|
113
|
-
const AMPRIONLine_1 = require("../../model/extensions/amprion/core/AMPRIONLine");
|
|
114
|
-
const ControlArea_1 = require("../../model/operations/ControlArea");
|
|
115
|
-
const PhaseTapChangerSymmetrical_1 = require("../../model/wires/PhaseTapChangerSymmetrical");
|
|
116
|
-
const RatioTapChangerTable_1 = require("../../model/wires/RatioTapChangerTable");
|
|
117
|
-
const RatioTapChanger_1 = require("../../model/wires/RatioTapChanger");
|
|
102
|
+
const TapChangerControl_1 = require("../../model/wires/TapChangerControl");
|
|
118
103
|
const TransformerControlMode_1 = require("../../model/wires/TransformerControlMode");
|
|
104
|
+
const mysql_controller_1 = require("../../util/database/mysql-controller");
|
|
105
|
+
const INTEGRALMultiplierFactor_1 = require("../../model/extensions/integral/common/INTEGRALMultiplierFactor");
|
|
106
|
+
const INTEGRALACLineSegment_1 = require("../../model/extensions/integral/wires/INTEGRALACLineSegment");
|
|
107
|
+
const INTEGRALAsynchronousMachine_1 = require("../../model/extensions/integral/wires/INTEGRALAsynchronousMachine");
|
|
108
|
+
const INTEGRALExternalNetworkInjection_1 = require("../../model/extensions/integral/wires/INTEGRALExternalNetworkInjection");
|
|
109
|
+
const INTEGRALSynchronousMachine_1 = require("../../model/extensions/integral/wires/INTEGRALSynchronousMachine");
|
|
110
|
+
const util_create_1 = require("../../util/util-create");
|
|
111
|
+
const utils_1 = require("../../util/utils");
|
|
112
|
+
const integral_prefix_1 = require("./config/integral-prefix");
|
|
113
|
+
const ConverterIntegral7_1 = require("./ConverterIntegral7");
|
|
114
|
+
const data_structures_i7_1 = require("./interface-i7/data-structures-i7");
|
|
115
|
+
const export_frame_i7_1 = require("./interface-i7/export-frame-i7");
|
|
116
|
+
const KnotenSo_1 = require("./model/integral/KnotenSo");
|
|
117
|
+
const Leitung_1 = require("./model/integral/Leitung");
|
|
118
|
+
const Point_1 = require("./model/integral/Point");
|
|
119
|
+
const Schaltanlage_1 = require("./model/integral/Schaltanlage");
|
|
120
|
+
const Schaltanlagenabschnitt_1 = require("./model/integral/Schaltanlagenabschnitt");
|
|
121
|
+
const SchaltanlagenabschnittNsg_1 = require("./model/integral/SchaltanlagenabschnittNsg");
|
|
122
|
+
const SchaltanlageNSG_1 = require("./model/integral/SchaltanlageNSG");
|
|
123
|
+
const Schaltfeld_1 = require("./model/integral/Schaltfeld");
|
|
124
|
+
const Standort_1 = require("./model/integral/Standort");
|
|
125
|
+
const StandortNsg_1 = require("./model/integral/StandortNsg");
|
|
126
|
+
const integral_sql_1 = require("./sql/integral.sql");
|
|
127
|
+
const utils_2 = require("./utils");
|
|
128
|
+
const utils_schema_1 = require("./utils-schema");
|
|
129
|
+
const utils_trafo3w_1 = require("./utils-trafo3w");
|
|
130
|
+
const INTEGRALModel_1 = require("../../model/extensions/integral/model/INTEGRALModel");
|
|
131
|
+
const constants_1 = require("./model/dl-utils/constants");
|
|
132
|
+
const SsabNsg_1 = require("./model/dl-utils/SsabNsg");
|
|
133
|
+
const Laengskupplung_1 = require("./model/integral/Laengskupplung");
|
|
134
|
+
const INTEGRALConformLoad_1 = require("../../model/extensions/integral/loadmodel/INTEGRALConformLoad");
|
|
119
135
|
class ConverterI7 {
|
|
120
136
|
constructor() {
|
|
121
137
|
this.exportFrames = new Map();
|
|
122
138
|
this.exportFramesBoundary = new Map();
|
|
123
|
-
this.cimModelDefault = new
|
|
139
|
+
this.cimModelDefault = new INTEGRALModel_1.INTEGRALModel();
|
|
124
140
|
this.availableTableNames = [];
|
|
125
141
|
this.integralID2Type = new Map();
|
|
126
142
|
this.coordinateSystem = 'EPSG:4326';
|
|
127
143
|
this.integralID2UUID = new Map();
|
|
128
144
|
this.UUID2Integral7ID = new Map();
|
|
129
145
|
this.kdrosseltypen = new Map();
|
|
146
|
+
this.generatorTypen = new Map();
|
|
147
|
+
this.asynchronmotorTypen = new Map();
|
|
130
148
|
this.leitungAnschlussKnotenIDs = new Set();
|
|
131
149
|
this.trafo2wAnschlussKnotenIDs = new Set();
|
|
132
150
|
this.trafo3wAnschlussKnotenIDs = new Set();
|
|
@@ -145,6 +163,9 @@ class ConverterI7 {
|
|
|
145
163
|
yield this.convertBetriebsmitteltypenKdrossel();
|
|
146
164
|
yield this.convertBetriebsmitteltypenLeitung();
|
|
147
165
|
yield this.convertBetriebsmitteltypenTrafo();
|
|
166
|
+
yield this.convertBetriebsmitteltypenGenerator();
|
|
167
|
+
yield this.convertBetriebsmitteltypenAsynchronmotor();
|
|
168
|
+
yield this.convertMultiplikationsfaktoren();
|
|
148
169
|
yield this.queryLeitungsAnschlussIDs();
|
|
149
170
|
yield this.queryTrafosAnschlussIDs();
|
|
150
171
|
yield this.queryHgueAnschlussIDs();
|
|
@@ -236,8 +257,8 @@ class ConverterI7 {
|
|
|
236
257
|
startTime = perf_hooks_1.performance.now();
|
|
237
258
|
const standortIDs = [...integral7Modell.integralStandorte.keys()];
|
|
238
259
|
if (standortIDs.length)
|
|
239
|
-
yield this.
|
|
240
|
-
logExecutionTime(this.logger, startTime, `
|
|
260
|
+
yield this.convertSchaltanlagen(cimModel, integral7Modell, standortIDs, defaultValuesConfig);
|
|
261
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${standortIDs.length})`);
|
|
241
262
|
startTime = perf_hooks_1.performance.now();
|
|
242
263
|
const schaltanlagenIDs = [...integral7Modell.integralSchaltanlagen.keys()];
|
|
243
264
|
if (schaltanlagenIDs.length)
|
|
@@ -320,7 +341,7 @@ class ConverterI7 {
|
|
|
320
341
|
}
|
|
321
342
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
322
343
|
startTime = perf_hooks_1.performance.now();
|
|
323
|
-
yield this.convertErsatzQuerZweige(cimModel, soSfKnoten);
|
|
344
|
+
yield this.convertErsatzQuerZweige(cimModel, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
324
345
|
logExecutionTime(this.logger, startTime, `convertErsatzQuerZweige`);
|
|
325
346
|
}
|
|
326
347
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
@@ -407,6 +428,104 @@ class ConverterI7 {
|
|
|
407
428
|
startTime = perf_hooks_1.performance.now();
|
|
408
429
|
yield this.convertLaengskondensatoren(cimModel, integral7Modell, defaultValuesConfig);
|
|
409
430
|
logExecutionTime(this.logger, startTime, `convertLaengskondensatoren`);
|
|
431
|
+
startTime = perf_hooks_1.performance.now();
|
|
432
|
+
yield this.assignTerminalSequenceNumber(cimModel);
|
|
433
|
+
logExecutionTime(this.logger, startTime, `assignment of sequence number`);
|
|
434
|
+
startTime = perf_hooks_1.performance.now();
|
|
435
|
+
yield this.convertNetzvarianten(cimModel, integral7Modell);
|
|
436
|
+
logExecutionTime(this.logger, startTime, `convertNetzvarianten`);
|
|
437
|
+
for (const key of integral7Modell.i7SchemaID2UUID.keys()) {
|
|
438
|
+
startTime = perf_hooks_1.performance.now();
|
|
439
|
+
yield this.convertSchemaStandorte(cimModel, integral7Modell, standortIDs, key, false);
|
|
440
|
+
logExecutionTime(this.logger, startTime, `convertSchemaStandorte`);
|
|
441
|
+
startTime = perf_hooks_1.performance.now();
|
|
442
|
+
yield this.convertSchemaKnotenSo(cimModel, integral7Modell, knotenSoIDs, key, false);
|
|
443
|
+
logExecutionTime(this.logger, startTime, `convertSchemaKnotenSo`);
|
|
444
|
+
startTime = perf_hooks_1.performance.now();
|
|
445
|
+
yield this.convertSchemaSchaltanlage(cimModel, integral7Modell, schaltanlagenIDs, key, false);
|
|
446
|
+
logExecutionTime(this.logger, startTime, `convertSchemaSchaltanlage`);
|
|
447
|
+
startTime = perf_hooks_1.performance.now();
|
|
448
|
+
yield this.convertSchemaSchaltanlagenAbschnitte(cimModel, integral7Modell, schaltanlagenAbschnittIDs, key, false);
|
|
449
|
+
logExecutionTime(this.logger, startTime, `convertSchemaSchaltanlagenAbschnitte`);
|
|
450
|
+
startTime = perf_hooks_1.performance.now();
|
|
451
|
+
yield this.convertSchemaSammelschienenAbschnitte(cimModel, integral7Modell, schaltanlagenAbschnittIDs, key, false);
|
|
452
|
+
logExecutionTime(this.logger, startTime, `convertSchemaSammelschienenAbschnitte`);
|
|
453
|
+
startTime = perf_hooks_1.performance.now();
|
|
454
|
+
yield this.convertSchemaSchaltfeldElemente(cimModel, integral7Modell, schaltfeldIDs, key, false);
|
|
455
|
+
logExecutionTime(this.logger, startTime, `convertSchemaSchaltfeldElemente`);
|
|
456
|
+
startTime = perf_hooks_1.performance.now();
|
|
457
|
+
yield this.convertSchemaQuerkupplungen(cimModel, integral7Modell, key, false);
|
|
458
|
+
logExecutionTime(this.logger, startTime, `convertSchemaQuerkupplungen`);
|
|
459
|
+
startTime = perf_hooks_1.performance.now();
|
|
460
|
+
yield this.convertSchemaLaengskupplungen(cimModel, integral7Modell, key, false);
|
|
461
|
+
logExecutionTime(this.logger, startTime, `convertSchemaLaengskupplungen`);
|
|
462
|
+
integral7Modell.integralNSGStandorte.clear();
|
|
463
|
+
integral7Modell.integralNSGSchaltanlage.clear();
|
|
464
|
+
integral7Modell.integralNSGSAAbschnitt.clear();
|
|
465
|
+
integral7Modell.integralNSGSsab.clear();
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
assignTerminalSequenceNumber(cimModel) {
|
|
470
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
471
|
+
let terminal_visited = [];
|
|
472
|
+
for (const obj of cimModel.dcTerminals.entries()) {
|
|
473
|
+
const terminal = obj[1];
|
|
474
|
+
const terminalUUID = terminal.getUUID();
|
|
475
|
+
if (!(terminalUUID in terminal_visited)) {
|
|
476
|
+
const ce = terminal.dCConductingEquipment;
|
|
477
|
+
if (ce) {
|
|
478
|
+
let sequenceNumber = 0;
|
|
479
|
+
for (const term of ce.dCTerminals.entries()) {
|
|
480
|
+
let terminalTmp = term[1];
|
|
481
|
+
sequenceNumber++;
|
|
482
|
+
terminalTmp.sequenceNumber = sequenceNumber;
|
|
483
|
+
terminal_visited.push(terminalTmp.getUUID());
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
console.log(`Terminal without connection ${terminalUUID}`);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
for (const obj of cimModel.terminals.entries()) {
|
|
492
|
+
const terminal = obj[1];
|
|
493
|
+
const terminalUUID = terminal.getUUID();
|
|
494
|
+
if (!(terminalUUID in terminal_visited)) {
|
|
495
|
+
const ce = terminal.conductingEquipment;
|
|
496
|
+
if (ce) {
|
|
497
|
+
let sequenceNumber = 0;
|
|
498
|
+
for (const term of ce.terminals.entries()) {
|
|
499
|
+
let terminalTmp = term[1];
|
|
500
|
+
sequenceNumber++;
|
|
501
|
+
terminalTmp.sequenceNumber = sequenceNumber;
|
|
502
|
+
terminal_visited.push(terminalTmp.getUUID());
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
console.log(`Terminal without connection ${terminalUUID}`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
for (const obj of cimModel.acDCConverterDCTerminals.entries()) {
|
|
511
|
+
const terminal = obj[1];
|
|
512
|
+
const terminalUUID = terminal.getUUID();
|
|
513
|
+
if (!(terminalUUID in terminal_visited)) {
|
|
514
|
+
const ce = terminal.dCConductingEquipment;
|
|
515
|
+
if (ce) {
|
|
516
|
+
let sequenceNumber = 0;
|
|
517
|
+
for (const term of ce.dCTerminals.entries()) {
|
|
518
|
+
let terminalTmp = term[1];
|
|
519
|
+
sequenceNumber++;
|
|
520
|
+
terminalTmp.sequenceNumber = sequenceNumber;
|
|
521
|
+
terminal_visited.push(terminalTmp.getUUID());
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
console.log(`Terminal without connection ${terminalUUID}`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
410
529
|
});
|
|
411
530
|
}
|
|
412
531
|
convertGeoRegionen() {
|
|
@@ -418,7 +537,7 @@ class ConverterI7 {
|
|
|
418
537
|
.then((result) => {
|
|
419
538
|
for (const i7Data of result) {
|
|
420
539
|
const i7Schluesel = integral_prefix_1.GEOREGION_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
421
|
-
const region = new GeographicalRegion_1.GeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_GR"
|
|
540
|
+
const region = new GeographicalRegion_1.GeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_GR"]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
422
541
|
this.addIdMapping(i7Data.id, region.mrid, integral_sql_1.Integral7TableNames.REGION);
|
|
423
542
|
regions.push(region);
|
|
424
543
|
}
|
|
@@ -443,7 +562,7 @@ class ConverterI7 {
|
|
|
443
562
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.REGELZONE, 0, 0, []));
|
|
444
563
|
for (const i7Data of result) {
|
|
445
564
|
const i7Schluessel = integral_prefix_1.REGELZONE_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
446
|
-
const ctrlarea = new ControlArea_1.ControlArea(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_RZ"
|
|
565
|
+
const ctrlarea = new ControlArea_1.ControlArea(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_RZ"]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluessel);
|
|
447
566
|
cimModel.addControlArea(ctrlarea);
|
|
448
567
|
this.addIdMapping(i7Data.id, ctrlarea.mrid, integral_sql_1.Integral7TableNames.REGELZONE);
|
|
449
568
|
}
|
|
@@ -462,11 +581,11 @@ class ConverterI7 {
|
|
|
462
581
|
.then((result) => {
|
|
463
582
|
for (const i7Data of result) {
|
|
464
583
|
const i7Schluesel = integral_prefix_1.SUBGEOREGION_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
465
|
-
const subregion = new SubGeographicalRegion_1.SubGeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_SGR"
|
|
584
|
+
const subregion = new SubGeographicalRegion_1.SubGeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_SGR"]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
466
585
|
const regionUUID = this.integralID2UUID.get(i7Data.georegion);
|
|
467
586
|
let region = regions.find(elem => elem.mrid === regionUUID);
|
|
468
587
|
if (!region) {
|
|
469
|
-
region = utils_1.createIfNotExitsGeoregionByName(this.cimModelDefault, util_create_1.createNotation([defaultValuesConfig.GeographicalRegion.name, "_GR"
|
|
588
|
+
region = utils_1.createIfNotExitsGeoregionByName(this.cimModelDefault, util_create_1.createNotation([defaultValuesConfig.GeographicalRegion.name, "_GR"]));
|
|
470
589
|
this.logger.debug(`SubGeographicalRegion UUID ${subregion.mrid} I7-ID ${i7Data.id} Name ${i7Data.bezeichner} hat keine Region.`);
|
|
471
590
|
}
|
|
472
591
|
subregion.region = region;
|
|
@@ -489,17 +608,316 @@ class ConverterI7 {
|
|
|
489
608
|
}));
|
|
490
609
|
});
|
|
491
610
|
}
|
|
611
|
+
convertNetzvarianten(cimModel, integral7) {
|
|
612
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
613
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NETZVARIANTEN)) {
|
|
614
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NETZVARIANTEN, [2]));
|
|
615
|
+
for (const i7Data of result) {
|
|
616
|
+
const diagram = new Diagram_1.Diagram(utils_1.getUUID(i7Data.guid), i7Data.name, String(i7Data.id));
|
|
617
|
+
diagram.orientation = OrientationKind_1.OrientationKind.negative;
|
|
618
|
+
diagram.diagramStyle = cimModel.getDiagramStyle(cim_constants_1.DIAGRAM_LAYOUT_TYPES.NODE_BREAKER);
|
|
619
|
+
cimModel.addDiagram(diagram);
|
|
620
|
+
integral7.i7SchemaID2UUID.set(i7Data.id, diagram.mrid);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.NETZVARIANTEN} ist nicht vorhanden.`);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
convertSchemaStandorte(cimModel, integral7, standortIDs, variantenNr, onlyEingeblendet = true) {
|
|
629
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
630
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_STANDORT) && standortIDs.length > 0) {
|
|
631
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_STANDORT, standortIDs));
|
|
632
|
+
let filteredResults = result.filter(elem => elem.variantennr === variantenNr);
|
|
633
|
+
if (onlyEingeblendet) {
|
|
634
|
+
filteredResults = filteredResults.filter(elem => elem.eingeblendet === 1);
|
|
635
|
+
}
|
|
636
|
+
for (const i7Data of filteredResults) {
|
|
637
|
+
const standort = integral7.integralStandorte.get(i7Data.standort);
|
|
638
|
+
if (standort) {
|
|
639
|
+
standort.standortNsg = new StandortNsg_1.StandortNsgImpl(i7Data);
|
|
640
|
+
integral7.integralNSGStandorte.set(i7Data.id, standort.standortNsg);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.NSG_STANDORT} ist nicht vorhanden.`);
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
convertSchemaKnotenSo(cimModel, integral7, knotenSoIDs, variantenNr, onlyEingeblendet = true) {
|
|
650
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
651
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_KNOTEN_SO) && knotenSoIDs.length > 0) {
|
|
652
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_KNOTEN_SO, knotenSoIDs));
|
|
653
|
+
let filteredResults = result.filter(elem => elem.variantennr === variantenNr);
|
|
654
|
+
if (onlyEingeblendet) {
|
|
655
|
+
filteredResults = filteredResults.filter(elem => elem.eingeblendet === 1);
|
|
656
|
+
}
|
|
657
|
+
for (const i7Data of filteredResults) {
|
|
658
|
+
const diagramUUID = integral7.i7SchemaID2UUID.get(i7Data.variantennr);
|
|
659
|
+
const diagram = cimModel.getDiagram(diagramUUID);
|
|
660
|
+
const nsgStandort = integral7.integralNSGStandorte.get(i7Data.nsgso);
|
|
661
|
+
if (!diagram || !nsgStandort) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
const diagramObject = new DiagramObject_1.DiagramObject(utils_1.generateUUID(), 'Abzweig');
|
|
665
|
+
diagramObject.diagramUUID = diagramUUID;
|
|
666
|
+
diagramObject.setDiagram(diagram);
|
|
667
|
+
const diagramObjectPoint = new DiagramObjectPoint_1.DiagramObjectPoint(nsgStandort.xrel + i7Data.xrel, nsgStandort.yrel + i7Data.yrel);
|
|
668
|
+
diagramObjectPoint.mrid = utils_1.generateUUID();
|
|
669
|
+
diagramObjectPoint.diagramObject = diagramObject;
|
|
670
|
+
diagramObject.addDiagramObjectPoint(diagramObjectPoint);
|
|
671
|
+
cimModel.addDiagramObject(diagramObject);
|
|
672
|
+
cimModel.addDiagramObjectPoint(diagramObjectPoint);
|
|
673
|
+
const cimObjectUUID = this.integralID2UUID.get(i7Data.knotenso);
|
|
674
|
+
const cimObject = cimModel.getObject(cimObjectUUID);
|
|
675
|
+
if (cimObject) {
|
|
676
|
+
diagramObject.setIdentifiedObject(cimObject);
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
this.logger.debug(`KnotenSo/DiagramObject ${diagramObject.mrid} hat kein PSR-Objekt.`);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.NSG_KNOTEN_SO} ist nicht vorhanden.`);
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
convertSchemaSchaltanlage(cimModel, integral7, saIDs, variantenNr, onlyEingeblendet = true) {
|
|
689
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
690
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_SCHALTANLAGE) && saIDs.length > 0) {
|
|
691
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_SCHALTANLAGE, saIDs));
|
|
692
|
+
let filteredResults = result.filter(elem => elem.variantennr === variantenNr);
|
|
693
|
+
if (onlyEingeblendet) {
|
|
694
|
+
filteredResults = filteredResults.filter(elem => elem.eingeblendet === 1);
|
|
695
|
+
}
|
|
696
|
+
for (const i7Data of filteredResults) {
|
|
697
|
+
const schaltanlage = integral7.integralSchaltanlagen.get(i7Data.schaltanlage);
|
|
698
|
+
if (schaltanlage) {
|
|
699
|
+
schaltanlage.schaltanlageNsg = new SchaltanlageNSG_1.SchaltanlageNsgImpl(i7Data);
|
|
700
|
+
integral7.integralNSGSchaltanlage.set(i7Data.id, schaltanlage.schaltanlageNsg);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.NSG_SCHALTANLAGE} ist nicht vorhanden.`);
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
convertSchemaSchaltanlagenAbschnitte(cimModel, integral7, schaltanlagenabschnittIDs, variantenNr, onlyEingeblendet = true) {
|
|
710
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
711
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_SCHALTANLAGENABSCHNITT) && schaltanlagenabschnittIDs.length > 0) {
|
|
712
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_SCHALTANLAGENABSCHNITT, schaltanlagenabschnittIDs));
|
|
713
|
+
let filteredResults = result.filter(elem => elem.variantennr === variantenNr);
|
|
714
|
+
if (onlyEingeblendet) {
|
|
715
|
+
filteredResults = filteredResults.filter(elem => elem.eingeblendet === 1);
|
|
716
|
+
}
|
|
717
|
+
for (const i7Data of filteredResults) {
|
|
718
|
+
const saabschnitt = integral7.integralSchaltanlagenAbschnitte.get(i7Data.saabschnitt);
|
|
719
|
+
if (saabschnitt) {
|
|
720
|
+
saabschnitt.schaltanlagenabschnittNsg = new SchaltanlagenabschnittNsg_1.SchaltanlagenabschnittNsg(i7Data);
|
|
721
|
+
saabschnitt.schaltanlagenabschnittNsg.saabschnitt = saabschnitt;
|
|
722
|
+
saabschnitt.schaltanlagenabschnittNsg.nsgsa = integral7.integralNSGSchaltanlage.get(i7Data.nsgsa);
|
|
723
|
+
integral7.integralNSGSAAbschnitt.set(i7Data.id, saabschnitt.schaltanlagenabschnittNsg);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.NSG_SCHALTANLAGENABSCHNITT} ist nicht vorhanden.`);
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
convertSchemaSammelschienenAbschnitte(cimModel, integral7, schaltanlagenabschnittIDs, variantenNr, onlyEingeblendet = true) {
|
|
733
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
734
|
+
if (schaltanlagenabschnittIDs.length <= 0)
|
|
735
|
+
return;
|
|
736
|
+
const isEingeblendet = 1;
|
|
737
|
+
const innerSQLisEingeblendet = `IFNULL(
|
|
738
|
+
(SELECT max(slotnummer) + 1
|
|
739
|
+
FROM nsg_nsgschaltfeld AS nsg_nsgsf
|
|
740
|
+
WHERE nsg_nsgsf.nsgsaa = nsg_nsgsaab.id
|
|
741
|
+
AND nsg_nsgsf.eingeblendet = ${isEingeblendet}),
|
|
742
|
+
1)`;
|
|
743
|
+
const outerSQLisEingeblendet = `AND nsg_nsgsaab.eingeblendet = ${isEingeblendet}`;
|
|
744
|
+
const sqlStatement = `SELECT nsg_nsgsaab.variantennr,
|
|
745
|
+
nsg_nsgsaab.id,
|
|
746
|
+
${onlyEingeblendet ? innerSQLisEingeblendet : 'nsg_nsgsaab.laenge'} as laenge,
|
|
747
|
+
nsg_nsgsaab.nslots,
|
|
748
|
+
nsg_nsgsaab.saabschnitt,
|
|
749
|
+
nsg_nsgsaab.nsgsa,
|
|
750
|
+
nsg_nsgsaab.eingeblendet,
|
|
751
|
+
nsg_nsgsaab.nsglkp,
|
|
752
|
+
netz_ssab.pos AS posSSAB,
|
|
753
|
+
netz_ssab.id AS idSSAB
|
|
754
|
+
FROM nsg_nsgsaabschnitt AS nsg_nsgsaab
|
|
755
|
+
LEFT JOIN netz_ssab ON nsg_nsgsaab.saabschnitt = netz_ssab.saabschnitt
|
|
756
|
+
WHERE (${integral_sql_1.getWhereIDs('nsg_nsgsaab.saabschnitt', schaltanlagenabschnittIDs).join(' OR ')})
|
|
757
|
+
${onlyEingeblendet ? outerSQLisEingeblendet : ''};`;
|
|
758
|
+
const queryResults = yield this.mysqlController.execQuery(sqlStatement);
|
|
759
|
+
const filteredResults = queryResults.filter(elem => elem.variantennr === variantenNr);
|
|
760
|
+
for (const queryResult of filteredResults) {
|
|
761
|
+
const sa = integral7.integralNSGSchaltanlage.get(queryResult.nsgsa);
|
|
762
|
+
const so = integral7.integralNSGStandorte.get(sa.nsgsoid);
|
|
763
|
+
const leftOffset = queryResult.nslots * constants_1.NsgConstants.HORIZONTAL_OFFSET;
|
|
764
|
+
const topOffset = queryResult.posSSAB * constants_1.NsgConstants.VERTICAL_OFFSET;
|
|
765
|
+
const ssabLength = queryResult.laenge * constants_1.NsgConstants.HORIZONTAL_OFFSET;
|
|
766
|
+
let pointTopLeft = new Point_1.Point(leftOffset, topOffset);
|
|
767
|
+
let pointBottomRight = new Point_1.Point(leftOffset + ssabLength, topOffset);
|
|
768
|
+
const points = [];
|
|
769
|
+
points.push(pointTopLeft, pointBottomRight);
|
|
770
|
+
let maxX = 0;
|
|
771
|
+
for (const p of points) {
|
|
772
|
+
maxX = maxX < p.x ? p.x : maxX;
|
|
773
|
+
Point_1.Point.rotate(p, -90 * sa.ausrichtung);
|
|
774
|
+
}
|
|
775
|
+
const shiftValue = (queryResult.laenge + queryResult.nslots) * constants_1.NsgConstants.HORIZONTAL_OFFSET;
|
|
776
|
+
for (const p of points) {
|
|
777
|
+
p.x += so.xrel + sa.xrel + (sa.ausrichtung === 2 ? maxX : 0);
|
|
778
|
+
p.y += so.yrel + sa.yrel + (sa.ausrichtung === 3 ? maxX : 0);
|
|
779
|
+
}
|
|
780
|
+
integral7.integralNSGSsab.set(queryResult.idSSAB, queryResult);
|
|
781
|
+
const diagramObject = new DiagramObject_1.DiagramObject(utils_1.getUUID(''), 'SSAB Diagram');
|
|
782
|
+
diagramObject.rotation = 90 * sa.ausrichtung;
|
|
783
|
+
const cnUUID = this.integralID2UUID.get(queryResult.idSSAB);
|
|
784
|
+
const connectivityNode = cimModel.getConnectivityNode(cnUUID);
|
|
785
|
+
utils_schema_1.createDiagramObjectPoints(diagramObject, points);
|
|
786
|
+
diagramObject.setIdentifiedObject(connectivityNode);
|
|
787
|
+
const diagramUUID = integral7.i7SchemaID2UUID.get(sa.variantennr);
|
|
788
|
+
const diagram = cimModel.getDiagram(diagramUUID);
|
|
789
|
+
if (diagram) {
|
|
790
|
+
diagramObject.setDiagram(diagram);
|
|
791
|
+
diagram.addDiagramObject(diagramObject);
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
this.logger.debug(`SSAB/DiagramObject ${diagramObject.mrid} hat kein Diagram-Objekt.`);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
convertSchemaSchaltfeldElemente(cimModel, integral7, schaltfeldIDs, variantenNr, onlyEingeblendet = true) {
|
|
800
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
801
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_SCHALTFELD) && schaltfeldIDs.length > 0) {
|
|
802
|
+
const i7relevantTables = [
|
|
803
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.LEISTUNGSSCHALTER],
|
|
804
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNER_3P],
|
|
805
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNERFI_3P],
|
|
806
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_STARR]
|
|
807
|
+
];
|
|
808
|
+
const i7checkedTables = this.filterTablesByAvailability(i7relevantTables);
|
|
809
|
+
const i7knotenBeziehungen = yield this.mysqlController.execQuery(integral_sql_1.getI7KnotenBeziehungenQuery(i7checkedTables, schaltfeldIDs));
|
|
810
|
+
const resultsNsgSchaltfeld = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_SCHALTFELD, schaltfeldIDs));
|
|
811
|
+
let filteredResultsNsgSchaltfeld = resultsNsgSchaltfeld.filter(elem => elem.variantennr === variantenNr);
|
|
812
|
+
if (onlyEingeblendet) {
|
|
813
|
+
filteredResultsNsgSchaltfeld = filteredResultsNsgSchaltfeld.filter(elem => elem.eingeblendet === 1);
|
|
814
|
+
}
|
|
815
|
+
for (const i7Data of filteredResultsNsgSchaltfeld) {
|
|
816
|
+
const nodePointMap = new Map();
|
|
817
|
+
const schaltfeldLeftOffset = i7Data.slotnummer * constants_1.NsgConstants.HORIZONTAL_OFFSET;
|
|
818
|
+
const schaltfeldDeltaausrichtung = i7Data.deltaausrichtung;
|
|
819
|
+
const schaltfeldI7KnotenBeziehungen = i7knotenBeziehungen.filter(elem => elem.seliste === i7Data.schaltfeld);
|
|
820
|
+
let shiftFromBusbar = false;
|
|
821
|
+
if (schaltfeldI7KnotenBeziehungen.length == 1) {
|
|
822
|
+
shiftFromBusbar = true;
|
|
823
|
+
}
|
|
824
|
+
const ssabs = integral7.integralSchaltfelder.get(i7Data.schaltfeld).saabschnitt.ssab;
|
|
825
|
+
const maxSSabPos = Math.max(...ssabs.map(ssab => ssab.pos));
|
|
826
|
+
const onSSabNodes = schaltfeldI7KnotenBeziehungen.filter(elem => ssabs.find(ssab => ssab.id === elem.aknoten) !== undefined);
|
|
827
|
+
for (const node of onSSabNodes) {
|
|
828
|
+
const ssabYPos = integral7.integralNSGSsab.get(node.aknoten).posSSAB * constants_1.NsgConstants.VERTICAL_OFFSET;
|
|
829
|
+
let yStackPos = 1;
|
|
830
|
+
let crtNode = node;
|
|
831
|
+
while (crtNode) {
|
|
832
|
+
if (nodePointMap.get(crtNode.id) === undefined) {
|
|
833
|
+
let xPos = schaltfeldLeftOffset + (constants_1.NsgConstants.HORIZONTAL_OFFSET / 2);
|
|
834
|
+
let yPos = ssabYPos;
|
|
835
|
+
if (crtNode === node) {
|
|
836
|
+
yPos += shiftFromBusbar ? (schaltfeldDeltaausrichtung === 0 ? -1 : 1) * constants_1.NsgConstants.VERTICAL_OFFSET : 0;
|
|
837
|
+
}
|
|
838
|
+
else {
|
|
839
|
+
const ssabOffset = schaltfeldDeltaausrichtung === 0 ? 0 : maxSSabPos;
|
|
840
|
+
yPos = ((schaltfeldDeltaausrichtung === 0 ? -1 : 1) * (yStackPos) + ssabOffset) * constants_1.NsgConstants.VERTICAL_OFFSET;
|
|
841
|
+
yStackPos += 1;
|
|
842
|
+
}
|
|
843
|
+
nodePointMap.set(crtNode.id, new Point_1.Point(xPos, yPos));
|
|
844
|
+
}
|
|
845
|
+
crtNode = schaltfeldI7KnotenBeziehungen.find(elem => elem.aknoten === crtNode.eknoten);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
SsabNsg_1.DLUtilFunctions.rotateShiftAddBasedOnNsgSAA(cimModel, integral7, this.integralID2UUID, variantenNr, i7Data.nsgsaa, nodePointMap);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
convertSchemaQuerkupplungen(cimModel, integral7, variantenNr, onlyEingeblendet = true) {
|
|
854
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
855
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_QUERKUPPLUNG) && integral7.querkupplungIDs.length > 0) {
|
|
856
|
+
const i7relevantTables = [
|
|
857
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.LEISTUNGSSCHALTER],
|
|
858
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNER_3P],
|
|
859
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNERFI_3P],
|
|
860
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_STARR]
|
|
861
|
+
];
|
|
862
|
+
const i7checkedTables = this.filterTablesByAvailability(i7relevantTables);
|
|
863
|
+
const i7knotenBeziehungen = yield this.mysqlController.execQuery(integral_sql_1.getI7KnotenBeziehungenQuery(i7checkedTables, integral7.querkupplungIDs));
|
|
864
|
+
const resultsNsgKpFeld = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_QUERKUPPLUNG, integral7.querkupplungIDs));
|
|
865
|
+
let filteredResultsNsgKpFeld = resultsNsgKpFeld.filter(elem => elem.variantennr === variantenNr);
|
|
866
|
+
if (onlyEingeblendet) {
|
|
867
|
+
filteredResultsNsgKpFeld = filteredResultsNsgKpFeld.filter(elem => elem.eingeblendet === 1);
|
|
868
|
+
}
|
|
869
|
+
for (const i7Data of filteredResultsNsgKpFeld) {
|
|
870
|
+
const nodePointMap = new Map();
|
|
871
|
+
const kpFeldLeftOffset = i7Data.slotnummer * constants_1.NsgConstants.HORIZONTAL_OFFSET;
|
|
872
|
+
const kpFeldDeltaausrichtung = i7Data.deltaausrichtung;
|
|
873
|
+
const kpFeldI7KnotenBeziehungen = i7knotenBeziehungen.filter(elem => elem.seliste === i7Data.kpfeld);
|
|
874
|
+
const ssabs = integral7.integralNSGSAAbschnitt.get(i7Data.nsgsaa).saabschnitt.ssab;
|
|
875
|
+
const relevantSSabIDs = new Set();
|
|
876
|
+
ssabs.forEach(ssab => relevantSSabIDs.add(ssab.id));
|
|
877
|
+
SsabNsg_1.DLUtilFunctions.placeKupplung(kpFeldI7KnotenBeziehungen, nodePointMap, relevantSSabIDs, integral7.integralNSGSsab, kpFeldDeltaausrichtung, kpFeldLeftOffset, false);
|
|
878
|
+
SsabNsg_1.DLUtilFunctions.rotateShiftAddBasedOnNsgSAA(cimModel, integral7, this.integralID2UUID, variantenNr, i7Data.nsgsaa, nodePointMap);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
convertSchemaLaengskupplungen(cimModel, integral7, variantenNr, onlyEingeblendet = true) {
|
|
884
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
885
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.NSG_LAENGSKUPPLUNG) && integral7.laengskupplungIDs.length > 0) {
|
|
886
|
+
const i7relevantTables = [
|
|
887
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.LEISTUNGSSCHALTER],
|
|
888
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNER_3P],
|
|
889
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRENNERFI_3P],
|
|
890
|
+
integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_STARR]
|
|
891
|
+
];
|
|
892
|
+
const i7checkedTables = this.filterTablesByAvailability(i7relevantTables);
|
|
893
|
+
const i7knotenBeziehungen = yield this.mysqlController.execQuery(integral_sql_1.getI7KnotenBeziehungenQuery(i7checkedTables, integral7.laengskupplungIDs));
|
|
894
|
+
const resultsNsgLKupplung = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.NSG_LAENGSKUPPLUNG, [...integral7.integralNSGSAAbschnitt.keys()]));
|
|
895
|
+
let filteredResultsNsgLKupplung = resultsNsgLKupplung.filter(elem => elem.variantennr === variantenNr);
|
|
896
|
+
if (onlyEingeblendet) {
|
|
897
|
+
filteredResultsNsgLKupplung = filteredResultsNsgLKupplung.filter(elem => elem.eingeblendet === 1);
|
|
898
|
+
}
|
|
899
|
+
const nodePointMap = new Map();
|
|
900
|
+
for (const i7Data of filteredResultsNsgLKupplung) {
|
|
901
|
+
const schaltanlagenID = integral7.integralNSGSAAbschnitt.get(i7Data.nsgsaa).nsgsa.schaltanlageid;
|
|
902
|
+
const netzLaengskupplungsObjs = [...integral7.integralLaengskupplungen.values()].filter(elem => elem.schaltanlagenID === schaltanlagenID);
|
|
903
|
+
for (const netzLaengskupplungObj of netzLaengskupplungsObjs) {
|
|
904
|
+
const lKupplungI7KnotenBeziehungen = i7knotenBeziehungen.filter(elem => elem.seliste === netzLaengskupplungObj.id);
|
|
905
|
+
const relevantSSabIDs = new Set();
|
|
906
|
+
integral7.integralSchaltanlagen.get(schaltanlagenID).saab.forEach(netz_saab => netz_saab.ssab.forEach(ssab => relevantSSabIDs.add(ssab.id)));
|
|
907
|
+
SsabNsg_1.DLUtilFunctions.placeKupplung(lKupplungI7KnotenBeziehungen, nodePointMap, relevantSSabIDs, integral7.integralNSGSsab, 0, 0, true);
|
|
908
|
+
}
|
|
909
|
+
SsabNsg_1.DLUtilFunctions.rotateShiftAddBasedOnNsgSAA(cimModel, integral7, this.integralID2UUID, variantenNr, i7Data.nsgsaa, nodePointMap);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
}
|
|
492
914
|
convertStandorte(cimModel, integral7, whereID, defaultValuesConfig) {
|
|
493
915
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
494
916
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STANDORT)) {
|
|
495
917
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.STANDORT, whereID));
|
|
496
918
|
for (const i7Data of result) {
|
|
497
|
-
const i7Schluessel = integral_prefix_1.STANDORT_PRAEFIX +
|
|
498
|
-
utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
499
|
-
integral_prefix_1.MITTIGER_PUNKT +
|
|
500
|
-
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
501
919
|
const i7name = util_create_1.createNotation([utils_2.getName(i7Data), "_", utils_2.ueberpruefeZeichenkette(i7Data.ukz)], 32);
|
|
502
|
-
const substation = new AMPRIONSubstation_1.AMPRIONSubstation(utils_1.getUUID(i7Data.guid), i7name, i7Data.
|
|
920
|
+
const substation = new AMPRIONSubstation_1.AMPRIONSubstation(utils_1.getUUID(i7Data.guid), i7name, i7Data.kurzname, i7Data.kommentar, i7Data.stationsnummer, i7Data.ukz);
|
|
503
921
|
let subregion = cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
504
922
|
if (!subregion) {
|
|
505
923
|
const region = utils_1.createIfNotExitsGeoregionByName(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
@@ -531,7 +949,7 @@ class ConverterI7 {
|
|
|
531
949
|
}
|
|
532
950
|
});
|
|
533
951
|
}
|
|
534
|
-
|
|
952
|
+
convertSchaltanlagen(cimModel, integral7, standortIDs, defaultValuesConfig) {
|
|
535
953
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
536
954
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SCHALTANLAGE)) {
|
|
537
955
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SCHALTANLAGE, standortIDs));
|
|
@@ -550,7 +968,7 @@ class ConverterI7 {
|
|
|
550
968
|
i7Data.un +
|
|
551
969
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
552
970
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
553
|
-
const vl = new VoltageLevel_1.VoltageLevel(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "
|
|
971
|
+
const vl = new VoltageLevel_1.VoltageLevel(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_", i7Data.un.toString(), "_VL"]), i7Data.kurzname, i7Schluessel);
|
|
554
972
|
const un = utils_2.getU(i7Data.un, defaultValuesConfig.DefaultVoltage);
|
|
555
973
|
const baseVoltage = util_create_1.createBaseVoltageIfNotExists(cimModel, un, this.exportFramesBoundary);
|
|
556
974
|
vl.baseVoltage = baseVoltage;
|
|
@@ -578,6 +996,9 @@ class ConverterI7 {
|
|
|
578
996
|
this.logger.warn(`Schaltanlagenabschnitt ${i7Data.id} ist keiner Schaltanlage zugeornet.`);
|
|
579
997
|
continue;
|
|
580
998
|
}
|
|
999
|
+
else {
|
|
1000
|
+
voltageLevel.name = util_create_1.createNotation([voltageLevel.name, "_", i7Data.pos.toString()], 32, true);
|
|
1001
|
+
}
|
|
581
1002
|
const schaltanlagenabschnitt = new Schaltanlagenabschnitt_1.SchaltanlagenabschnittImpl(i7Data);
|
|
582
1003
|
schaltanlagenabschnitt.addSchaltanlage(integral7.integralSchaltanlagen.get(schaltanlagenabschnitt.schaltanlageid));
|
|
583
1004
|
integral7.integralSchaltanlagenAbschnitte.set(i7Data.id, schaltanlagenabschnitt);
|
|
@@ -602,8 +1023,8 @@ class ConverterI7 {
|
|
|
602
1023
|
const i7Schluessel = voltageLevel.description +
|
|
603
1024
|
integral_prefix_1.SCHALTFELD_PRAEFIX +
|
|
604
1025
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
605
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B",
|
|
606
|
-
bay.number = i7Data.feldnummer
|
|
1026
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"], 32, true), i7Data.kurzname, i7Schluessel);
|
|
1027
|
+
bay.number = utils_2.isNumericI7(i7Data.feldnummer) ? utils_2.convertToNumberI7(i7Data.feldnummer).toString() : undefined;
|
|
607
1028
|
bay.locationID = i7Data.ips_folder_id;
|
|
608
1029
|
bay.voltageLevel = voltageLevel;
|
|
609
1030
|
voltageLevel.addBay(bay);
|
|
@@ -629,8 +1050,8 @@ class ConverterI7 {
|
|
|
629
1050
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_SO, standortIDs));
|
|
630
1051
|
for (const i7Data of result) {
|
|
631
1052
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
632
|
-
const vl = new VoltageLevel_1.VoltageLevel(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data),
|
|
633
|
-
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN",
|
|
1053
|
+
const vl = new VoltageLevel_1.VoltageLevel(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), i7Data.un.toString(), "_VL"]), i7Data.kurzname);
|
|
1054
|
+
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"]), i7Data.kurzname, i7Data.kommentar);
|
|
634
1055
|
connectivityNode.setConnectivityNodeContainer(vl);
|
|
635
1056
|
vl.addConnectivityNode(connectivityNode);
|
|
636
1057
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
@@ -677,11 +1098,11 @@ class ConverterI7 {
|
|
|
677
1098
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SAMMELSCHIENE, schaltanlagenAbschnittIDs));
|
|
678
1099
|
for (const i7Data of result) {
|
|
679
1100
|
const i7Schaltanlagenabschnitt = integral7.integralSchaltanlagenAbschnitte.get(i7Data.saabschnitt);
|
|
680
|
-
const busbarSection = new BusbarSection_1.BusbarSection(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Schaltanlagenabschnitt), "_BBS"
|
|
1101
|
+
const busbarSection = new BusbarSection_1.BusbarSection(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Schaltanlagenabschnitt), "_BBS"]), i7Schaltanlagenabschnitt.kurzname);
|
|
681
1102
|
busbarSection.ipMax = i7Data.limit_ip;
|
|
682
1103
|
busbarSection.aggregate = false;
|
|
683
|
-
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data),
|
|
684
|
-
const terminal = this.createConnection(cimModel, busbarSection, connectivityNode, PhaseCode_1.PhaseCode.ABC, true
|
|
1104
|
+
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), i7Data.pos.toString(), "_CN"]), i7Data.kurzname);
|
|
1105
|
+
const terminal = this.createConnection(cimModel, busbarSection, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
685
1106
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Schaltanlagenabschnitt.id));
|
|
686
1107
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
687
1108
|
if (voltageLevel) {
|
|
@@ -720,7 +1141,7 @@ class ConverterI7 {
|
|
|
720
1141
|
const result = yield this.queryDataInChuncks(integral_sql_1.I7Objects.KNOTEN_SF, schaltfeldIDs);
|
|
721
1142
|
for (const i7Data of result) {
|
|
722
1143
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.schaltfeld));
|
|
723
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"
|
|
1144
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"]), 'knotensf', `${bay.description}/${i7Data.bezeichner}`);
|
|
724
1145
|
if (bay) {
|
|
725
1146
|
connectivityNode.connectivityNodeContainer = bay;
|
|
726
1147
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -744,7 +1165,7 @@ class ConverterI7 {
|
|
|
744
1165
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_KF)) {
|
|
745
1166
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_KF, querkupplungIDs));
|
|
746
1167
|
for (const i7Data of result) {
|
|
747
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"
|
|
1168
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"]), 'knotenkf');
|
|
748
1169
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.kpfeld));
|
|
749
1170
|
if (bay) {
|
|
750
1171
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -767,7 +1188,7 @@ class ConverterI7 {
|
|
|
767
1188
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_LK)) {
|
|
768
1189
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_LK, laengskupplungIDs));
|
|
769
1190
|
for (const i7Data of result) {
|
|
770
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"
|
|
1191
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_CN"]), 'KnotenLk');
|
|
771
1192
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.lkupplung));
|
|
772
1193
|
if (bay) {
|
|
773
1194
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -790,7 +1211,7 @@ class ConverterI7 {
|
|
|
790
1211
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SCHLAUFE)) {
|
|
791
1212
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SCHLAUFE, knotenSoIDs));
|
|
792
1213
|
for (const i7Data of result) {
|
|
793
|
-
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data),
|
|
1214
|
+
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), '_Schlaufe_T']), i7Data.kurzname, i7Data.kommentar);
|
|
794
1215
|
terminal.connected = utils_2.convertToBooleanI7(i7Data.schaltzustand);
|
|
795
1216
|
terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
796
1217
|
this.addIdMapping(i7Data.id, terminal.mrid, integral_sql_1.Integral7TableNames.SCHLAUFE);
|
|
@@ -802,6 +1223,7 @@ class ConverterI7 {
|
|
|
802
1223
|
if (connectivityNode) {
|
|
803
1224
|
connectivityNode.addTerminal(terminal);
|
|
804
1225
|
terminal.setConnectivityNode(connectivityNode);
|
|
1226
|
+
terminal.name = util_create_1.createNotation([connectivityNode.name, "_Schlaufe_T"]);
|
|
805
1227
|
}
|
|
806
1228
|
else {
|
|
807
1229
|
this.logger.debug(`Schlaufe ${i7Data.id} besitzt keinen anschluss.`);
|
|
@@ -818,9 +1240,14 @@ class ConverterI7 {
|
|
|
818
1240
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.BELASTUNG)) {
|
|
819
1241
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.BELASTUNG, knotenSfIDs));
|
|
820
1242
|
for (const i7Data of result) {
|
|
821
|
-
const load = targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad ? new
|
|
1243
|
+
const load = targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad ? new INTEGRALConformLoad_1.INTEGRALConformLoad(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CL"])) : new EnergyConsumer_1.EnergyConsumer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_EC"]));
|
|
822
1244
|
this.setTopologyEnergySourceConsumerObject(cimModel, load, i7Data);
|
|
823
|
-
const
|
|
1245
|
+
const mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1246
|
+
if (mf && targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad) {
|
|
1247
|
+
cimModel.addMultiplierFactor(mf);
|
|
1248
|
+
load.multiplierFactor = mf;
|
|
1249
|
+
}
|
|
1250
|
+
const powerData = utils_2.getActiveReactivePower(i7Data, mf);
|
|
824
1251
|
load.p = powerData[0];
|
|
825
1252
|
load.q = powerData[1];
|
|
826
1253
|
if (targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad) {
|
|
@@ -859,14 +1286,46 @@ class ConverterI7 {
|
|
|
859
1286
|
}
|
|
860
1287
|
});
|
|
861
1288
|
}
|
|
1289
|
+
convertErsatzQuerZweige(cimModel, knotenSfIDs, targetClass) {
|
|
1290
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1291
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG)) {
|
|
1292
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.ERSATZQUERZWEIG, knotenSfIDs));
|
|
1293
|
+
switch (targetClass) {
|
|
1294
|
+
case cim_class_names_1.CIM_CLASS_NAMES.EquivalentInjection: {
|
|
1295
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1296
|
+
break;
|
|
1297
|
+
}
|
|
1298
|
+
case cim_class_names_1.CIM_CLASS_NAMES.ExternalNetworkInjection: {
|
|
1299
|
+
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result);
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
default: {
|
|
1303
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
else {
|
|
1308
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG} ist nicht vorhanden.`);
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
862
1312
|
convertGeneratoren(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
863
1313
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
864
1314
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.GENERATOR)) {
|
|
865
1315
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.GENERATOR, knotenSfIDs));
|
|
866
1316
|
for (const i7Data of result) {
|
|
867
|
-
const
|
|
868
|
-
synchronousMachine
|
|
869
|
-
|
|
1317
|
+
const genType = this.generatorTypen.get(i7Data.nametyp);
|
|
1318
|
+
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SM"]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1319
|
+
const isRotatingPhaseShifter = utils_2.isBooleanI7(i7Data.flag_phasenschieber) ? utils_2.convertToBooleanI7(i7Data.flag_phasenschieber) : false;
|
|
1320
|
+
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1321
|
+
if (isRotatingPhaseShifter) {
|
|
1322
|
+
synchronousMachine.operatingMode = SynchronousMachineOperatingMode_1.SynchronousMachineOperatingMode.condenser;
|
|
1323
|
+
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.condenser;
|
|
1324
|
+
}
|
|
1325
|
+
else {
|
|
1326
|
+
synchronousMachine.operatingMode = SynchronousMachineOperatingMode_1.SynchronousMachineOperatingMode.generator;
|
|
1327
|
+
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generator;
|
|
1328
|
+
}
|
|
870
1329
|
if (utils_2.convertToNumberI7(i7Data.blocktrafo_1)) {
|
|
871
1330
|
this.blocktransformatoren.push(utils_2.convertToNumberI7(i7Data.blocktrafo_1));
|
|
872
1331
|
}
|
|
@@ -882,7 +1341,8 @@ class ConverterI7 {
|
|
|
882
1341
|
if (utils_2.convertToNumberI7(i7Data.blocktrafo_5)) {
|
|
883
1342
|
this.blocktransformatoren.push(utils_2.convertToNumberI7(i7Data.blocktrafo_5));
|
|
884
1343
|
}
|
|
885
|
-
|
|
1344
|
+
const prio = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : undefined;
|
|
1345
|
+
synchronousMachine.referencePriority = prio;
|
|
886
1346
|
const maxP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : 0;
|
|
887
1347
|
const minP = utils_2.isNumericI7(i7Data.p_min) ? utils_2.convertToNumberI7(i7Data.p_min) : 0;
|
|
888
1348
|
const maxQ = utils_2.isNumericI7(i7Data.q_max) ? utils_2.convertToNumberI7(i7Data.q_max) : undefined;
|
|
@@ -891,48 +1351,52 @@ class ConverterI7 {
|
|
|
891
1351
|
const minQvonPmin = utils_2.isNumericI7(i7Data.qmin_von_pmin) ? utils_2.convertToNumberI7(i7Data.qmin_von_pmin) : undefined;
|
|
892
1352
|
synchronousMachine.maxQ = maxQ ? maxQ : maxQvonPmax;
|
|
893
1353
|
synchronousMachine.minQ = minQ ? minQ : minQvonPmin;
|
|
1354
|
+
const pType = (genType === null || genType === void 0 ? void 0 : genType.sr) * (genType === null || genType === void 0 ? void 0 : genType.cosphir);
|
|
1355
|
+
const qType = Math.sqrt(Math.pow(genType === null || genType === void 0 ? void 0 : genType.sr, 2) - Math.pow(pType, 2));
|
|
894
1356
|
const powerData = utils_2.getActiveReactivePower(i7Data);
|
|
895
1357
|
const p = powerData[0];
|
|
896
1358
|
const q = powerData[1];
|
|
897
1359
|
synchronousMachine.setActivePower(p * -1);
|
|
898
1360
|
synchronousMachine.setReactivePower(q * -1);
|
|
899
|
-
const sr = utils_2.isNumericI7(i7Data.sr) ? utils_2.convertToNumberI7(i7Data.sr) :
|
|
1361
|
+
const sr = utils_2.isNumericI7(i7Data.sr) ? utils_2.convertToNumberI7(i7Data.sr) : genType === null || genType === void 0 ? void 0 : genType.sr;
|
|
900
1362
|
if (sr && sr >= 0) {
|
|
901
1363
|
synchronousMachine.ratedS = sr;
|
|
902
1364
|
}
|
|
903
1365
|
else {
|
|
904
1366
|
synchronousMachine.ratedS = Math.sqrt(Math.pow(maxP, 2) + Math.pow(maxQvonPmax, 2));
|
|
905
1367
|
}
|
|
906
|
-
const ur = utils_2.isNumericI7(i7Data.ur) ? utils_2.convertToNumberI7(i7Data.ur) :
|
|
1368
|
+
const ur = utils_2.isNumericI7(i7Data.ur) ? utils_2.convertToNumberI7(i7Data.ur) : genType.ur;
|
|
907
1369
|
const usoll = utils_2.isNumericI7(i7Data.usoll) ? utils_2.convertToNumberI7(i7Data.usoll) : undefined;
|
|
1370
|
+
const cosphir = utils_2.isNumericI7(i7Data.cosphir) ? utils_2.convertToNumberI7(i7Data.cosphir) : genType.cosphir;
|
|
908
1371
|
synchronousMachine.ratedU = usoll ? usoll : ur;
|
|
909
1372
|
synchronousMachine.aggregate = true;
|
|
910
|
-
synchronousMachine.ratedPowerFactor =
|
|
1373
|
+
synchronousMachine.ratedPowerFactor = cosphir ? cosphir : undefined;
|
|
911
1374
|
synchronousMachine.r = utils_2.isNumericI7(i7Data.rg) ? utils_2.convertToNumberI7(i7Data.rg) : undefined;
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1375
|
+
if (!isRotatingPhaseShifter) {
|
|
1376
|
+
const reactiveCapabilityCurve = new ReactiveCapabilityCurve_1.ReactiveCapabilityCurve(utils_1.generateUUID(), util_create_1.createNotation(['CurveData', synchronousMachine.mrid, "_RCC"]));
|
|
1377
|
+
reactiveCapabilityCurve.curveStyle = CurveStyle_1.CurveStyle.straightLineYValues;
|
|
1378
|
+
reactiveCapabilityCurve.xUnit = UnitSymbol_1.UnitSymbol.W;
|
|
1379
|
+
reactiveCapabilityCurve.y1Unit = UnitSymbol_1.UnitSymbol.VAr;
|
|
1380
|
+
reactiveCapabilityCurve.y2Unit = UnitSymbol_1.UnitSymbol.VAr;
|
|
1381
|
+
const curveData1 = new CurveData_1.CurveData(utils_1.generateUUID());
|
|
1382
|
+
curveData1.curve = reactiveCapabilityCurve;
|
|
1383
|
+
curveData1.xvalue = i7Data.p_min;
|
|
1384
|
+
curveData1.y1value = i7Data.qmin_von_pmin;
|
|
1385
|
+
curveData1.y2value = i7Data.qmax_von_pmin;
|
|
1386
|
+
cimModel.addCurveData(curveData1);
|
|
1387
|
+
const curveData2 = new CurveData_1.CurveData(utils_1.generateUUID());
|
|
1388
|
+
curveData2.curve = reactiveCapabilityCurve;
|
|
1389
|
+
curveData2.xvalue = i7Data.p_max;
|
|
1390
|
+
curveData2.y1value = i7Data.qmin_von_pmax;
|
|
1391
|
+
curveData2.y2value = i7Data.qmax_von_pmax;
|
|
1392
|
+
cimModel.addCurveData(curveData2);
|
|
1393
|
+
cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
1394
|
+
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
1395
|
+
}
|
|
932
1396
|
let regulatingControl = undefined;
|
|
933
1397
|
switch (i7Data.spannungsgeregelt) {
|
|
934
1398
|
case 1: {
|
|
935
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_Gen_${
|
|
1399
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_Gen_${synchronousMachine.getUUID().substring(0, 8)}`);
|
|
936
1400
|
regulatingControl.targetValue = usoll;
|
|
937
1401
|
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
938
1402
|
regulatingControl.discrete = false;
|
|
@@ -947,66 +1411,71 @@ class ConverterI7 {
|
|
|
947
1411
|
synchronousMachine.controlEnabled = false;
|
|
948
1412
|
}
|
|
949
1413
|
}
|
|
950
|
-
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
951
1414
|
let generatingUnit;
|
|
952
|
-
if (
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
}
|
|
961
|
-
case 'SolarGeneratingUnit': {
|
|
962
|
-
generatingUnit = new SolarGeneratingUnit_1.SolarGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_SGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
963
|
-
break;
|
|
964
|
-
}
|
|
965
|
-
case 'WindGeneratingUnit': {
|
|
966
|
-
generatingUnit = new WindGeneratingUnit_1.WindGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_WGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
967
|
-
switch (generatingUnitConfig.fuelType) {
|
|
968
|
-
case 'onshore': {
|
|
969
|
-
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.onshore;
|
|
970
|
-
break;
|
|
971
|
-
}
|
|
972
|
-
case 'offshore': {
|
|
973
|
-
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.offshore;
|
|
974
|
-
break;
|
|
1415
|
+
if (!isRotatingPhaseShifter) {
|
|
1416
|
+
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1417
|
+
if (generatingUnitConfig) {
|
|
1418
|
+
switch (generatingUnitConfig.class) {
|
|
1419
|
+
case 'ThermalGeneratingUnit': {
|
|
1420
|
+
generatingUnit = new ThermalGeneratingUnit_1.ThermalGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_TGU"]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1421
|
+
if (generatingUnitConfig.fuelType) {
|
|
1422
|
+
utils_2.generateFuelType(i7Data.nameprimaertyp, generatingUnitConfig.fuelType, generatingUnit, cimModel);
|
|
975
1423
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1424
|
+
break;
|
|
1425
|
+
}
|
|
1426
|
+
case 'SolarGeneratingUnit': {
|
|
1427
|
+
generatingUnit = new SolarGeneratingUnit_1.SolarGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_SGU"]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1428
|
+
break;
|
|
1429
|
+
}
|
|
1430
|
+
case 'WindGeneratingUnit': {
|
|
1431
|
+
generatingUnit = new WindGeneratingUnit_1.WindGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_WGU"]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1432
|
+
switch (generatingUnitConfig.fuelType) {
|
|
1433
|
+
case 'onshore': {
|
|
1434
|
+
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.onshore;
|
|
1435
|
+
break;
|
|
1436
|
+
}
|
|
1437
|
+
case 'offshore': {
|
|
1438
|
+
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.offshore;
|
|
1439
|
+
break;
|
|
1440
|
+
}
|
|
1441
|
+
default: {
|
|
1442
|
+
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.onshore;
|
|
1443
|
+
break;
|
|
1444
|
+
}
|
|
979
1445
|
}
|
|
1446
|
+
break;
|
|
1447
|
+
}
|
|
1448
|
+
case 'NuclearGeneratingUnit': {
|
|
1449
|
+
generatingUnit = new NuclearGeneratingUnit_1.NuclearGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_NGU"]), i7Data.kurzname);
|
|
1450
|
+
break;
|
|
1451
|
+
}
|
|
1452
|
+
case 'HydroGeneratingUnit': {
|
|
1453
|
+
generatingUnit = new HydroGeneratingUnit_1.HydroGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_HGU"]), i7Data.kurzname);
|
|
1454
|
+
generatingUnit.energyConversionCapability = HydroEnergyConversionKind_1.HydroEnergyConversionKind.pumpAndGenerator;
|
|
1455
|
+
break;
|
|
1456
|
+
}
|
|
1457
|
+
default: {
|
|
1458
|
+
generatingUnit = new GeneratingUnit_1.GeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_GU"]), i7Data.kurzname);
|
|
1459
|
+
break;
|
|
980
1460
|
}
|
|
981
|
-
break;
|
|
982
|
-
}
|
|
983
|
-
case 'NuclearGeneratingUnit': {
|
|
984
|
-
generatingUnit = new NuclearGeneratingUnit_1.NuclearGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_NGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
985
|
-
break;
|
|
986
|
-
}
|
|
987
|
-
case 'HydroGeneratingUnit': {
|
|
988
|
-
generatingUnit = new HydroGeneratingUnit_1.HydroGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_HGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
989
|
-
generatingUnit.energyConversionCapability = HydroEnergyConversionKind_1.HydroEnergyConversionKind.pumpAndGenerator;
|
|
990
|
-
break;
|
|
991
1461
|
}
|
|
992
1462
|
}
|
|
1463
|
+
else {
|
|
1464
|
+
generatingUnit = new GeneratingUnit_1.GeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_GU"]), i7Data.kurzname);
|
|
1465
|
+
}
|
|
1466
|
+
generatingUnit.initialP = utils_2.isNumericI7(i7Data.p0) ? utils_2.convertToNumberI7(i7Data.p0) : undefined;
|
|
1467
|
+
generatingUnit.maxOperatingP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : undefined;
|
|
1468
|
+
generatingUnit.minOperatingP = utils_2.isNumericI7(i7Data.p_min) ? utils_2.convertToNumberI7(i7Data.p_min) : undefined;
|
|
1469
|
+
generatingUnit.nominalP = utils_2.isNumericI7(cosphir) && utils_2.isNumericI7(sr) ? cosphir * sr : generatingUnit.maxOperatingP;
|
|
1470
|
+
const kr = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
1471
|
+
const fn = 50;
|
|
1472
|
+
generatingUnit.governorSCD = (utils_2.isNumericI7(kr) && utils_2.isNumericI7(generatingUnit.nominalP)) ? utils_2.calculateSigma(fn, generatingUnit.nominalP, kr) : undefined;
|
|
1473
|
+
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1474
|
+
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
993
1475
|
}
|
|
994
|
-
if (!generatingUnit) {
|
|
995
|
-
generatingUnit = new GeneratingUnit_1.GeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_GU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
996
|
-
}
|
|
997
|
-
generatingUnit.initialP = utils_2.isNumericI7(i7Data.p0) ? utils_2.convertToNumberI7(i7Data.p0) : undefined;
|
|
998
|
-
generatingUnit.maxOperatingP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : undefined;
|
|
999
|
-
generatingUnit.minOperatingP = utils_2.isNumericI7(i7Data.p_min) ? utils_2.convertToNumberI7(i7Data.p_min) : undefined;
|
|
1000
|
-
generatingUnit.nominalP = generatingUnit.maxOperatingP;
|
|
1001
|
-
const kr = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
1002
|
-
const fn = 50;
|
|
1003
|
-
const pn = generatingUnit.maxOperatingP;
|
|
1004
|
-
generatingUnit.governorSCD = (utils_2.isNumericI7(kr) && utils_2.isNumericI7(generatingUnit.nominalP)) ? utils_2.calculateSigma(fn, pn, kr) : undefined;
|
|
1005
|
-
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1006
|
-
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1007
1476
|
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl, generatingUnit);
|
|
1008
1477
|
const smtcr = new SynchronousMachineTimeConstantReactance_1.SynchronousMachineTimeConstantReactance(utils_1.generateUUID(), `smtcr_${synchronousMachine.name}`);
|
|
1009
|
-
smtcr.enabled =
|
|
1478
|
+
smtcr.enabled = inBetrieb;
|
|
1010
1479
|
smtcr.tpdo = utils_2.isNumericI7(i7Data.td1s) ? utils_2.convertToNumberI7(i7Data.td1s) : undefined;
|
|
1011
1480
|
smtcr.tppdo = utils_2.isNumericI7(i7Data.td2s) ? utils_2.convertToNumberI7(i7Data.td2s) : undefined;
|
|
1012
1481
|
smtcr.tpqo = utils_2.isNumericI7(i7Data.tq1s) ? utils_2.convertToNumberI7(i7Data.tq1s) : undefined;
|
|
@@ -1032,25 +1501,36 @@ class ConverterI7 {
|
|
|
1032
1501
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR)) {
|
|
1033
1502
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs));
|
|
1034
1503
|
for (const i7Data of result) {
|
|
1035
|
-
const
|
|
1504
|
+
const assetType = this.asynchronmotorTypen.get(i7Data.nametyp);
|
|
1505
|
+
const asynchronousMachine = new INTEGRALAsynchronousMachine_1.INTEGRALAsynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_AM"]), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1506
|
+
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1507
|
+
if (mf) {
|
|
1508
|
+
cimModel.addMultiplierFactor(mf);
|
|
1509
|
+
asynchronousMachine.multiplierFactorUUID = mf.getUUID();
|
|
1510
|
+
}
|
|
1036
1511
|
asynchronousMachine.efficiency = i7Data.wirkungsgrad * 100;
|
|
1037
|
-
asynchronousMachine.iaIrRatio = i7Data.ilr_ir;
|
|
1038
|
-
asynchronousMachine.polePairNumber = i7Data.polpaarz;
|
|
1039
|
-
asynchronousMachine.ratedMechanicalPower = i7Data.p_mech;
|
|
1040
|
-
asynchronousMachine.ratedPowerFactor = i7Data.cos_phir;
|
|
1041
|
-
asynchronousMachine.ratedS = i7Data.sr;
|
|
1042
|
-
asynchronousMachine.ratedU = i7Data.ur;
|
|
1512
|
+
asynchronousMachine.iaIrRatio = utils_2.isNumericI7(i7Data.ilr_ir) ? i7Data.ilr_ir : assetType === null || assetType === void 0 ? void 0 : assetType.ilr_ir;
|
|
1513
|
+
asynchronousMachine.polePairNumber = utils_2.isNumericI7(i7Data.polpaarz) ? i7Data.polpaarz : assetType === null || assetType === void 0 ? void 0 : assetType.polpaarz;
|
|
1514
|
+
asynchronousMachine.ratedMechanicalPower = utils_2.isNumericI7(i7Data.p_mech) ? i7Data.p_mech : assetType === null || assetType === void 0 ? void 0 : assetType.p_mech;
|
|
1515
|
+
asynchronousMachine.ratedPowerFactor = utils_2.isNumericI7(i7Data.cos_phir) ? i7Data.cos_phir : assetType === null || assetType === void 0 ? void 0 : assetType.cosphir;
|
|
1516
|
+
asynchronousMachine.ratedS = utils_2.isNumericI7(i7Data.sr) ? i7Data.sr : assetType === null || assetType === void 0 ? void 0 : assetType.sr;
|
|
1517
|
+
asynchronousMachine.ratedU = utils_2.isNumericI7(i7Data.ur) ? i7Data.ur : assetType === null || assetType === void 0 ? void 0 : assetType.ur;
|
|
1518
|
+
const s0 = i7Data.s0;
|
|
1519
|
+
const cosPhi = i7Data.cos_phi;
|
|
1520
|
+
const cosPhiR = utils_2.isNumericI7(i7Data.cos_phir) ? i7Data.cos_phir : assetType === null || assetType === void 0 ? void 0 : assetType.cosphir;
|
|
1043
1521
|
asynchronousMachine.setActivePower(i7Data.p0 * -1);
|
|
1044
|
-
|
|
1522
|
+
const fag_ind = utils_2.isNumericI7(i7Data.flag_ind) ? i7Data.flag_ind : assetType === null || assetType === void 0 ? void 0 : assetType.flag_ind;
|
|
1523
|
+
asynchronousMachine.setReactivePower((fag_ind === 1 ? i7Data.q0_ind : i7Data.q0_kap) * -1);
|
|
1045
1524
|
asynchronousMachine.controlEnabled = false;
|
|
1046
|
-
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1047
|
-
|
|
1525
|
+
const inBetrieb = utils_2.isBooleanI7(i7Data.betrieb) ? utils_2.convertToBooleanI7(i7Data.betrieb) : true;
|
|
1526
|
+
asynchronousMachine.normallyInService = inBetrieb;
|
|
1048
1527
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1049
1528
|
if (connectivityNode) {
|
|
1050
1529
|
util_create_1.createConnection(cimModel, asynchronousMachine, connectivityNode, PhaseCode_1.PhaseCode.ABC);
|
|
1051
1530
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()));
|
|
1052
1531
|
if (equipmentContainer) {
|
|
1053
|
-
|
|
1532
|
+
equipmentContainer.addEquipment(asynchronousMachine);
|
|
1533
|
+
asynchronousMachine.equipmentContainer = equipmentContainer;
|
|
1054
1534
|
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1055
1535
|
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1056
1536
|
}
|
|
@@ -1073,7 +1553,12 @@ class ConverterI7 {
|
|
|
1073
1553
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KWBLOCK)) {
|
|
1074
1554
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KWBLOCK, knotenSfIDs));
|
|
1075
1555
|
for (const i7Data of result) {
|
|
1076
|
-
const synchronousMachine = new
|
|
1556
|
+
const synchronousMachine = new INTEGRALSynchronousMachine_1.INTEGRALSynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SM"]), i7Data.kurzname);
|
|
1557
|
+
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1558
|
+
if (mf) {
|
|
1559
|
+
cimModel.addMultiplierFactor(mf);
|
|
1560
|
+
synchronousMachine.multiplierFactorUUID = mf.getUUID();
|
|
1561
|
+
}
|
|
1077
1562
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generator;
|
|
1078
1563
|
synchronousMachine.operatingMode = SynchronousMachineOperatingMode_1.SynchronousMachineOperatingMode.generator;
|
|
1079
1564
|
synchronousMachine.referencePriority = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : undefined;
|
|
@@ -1086,6 +1571,7 @@ class ConverterI7 {
|
|
|
1086
1571
|
synchronousMachine.ratedS = sr;
|
|
1087
1572
|
const ur = utils_2.isNumericI7(i7Data.urg) ? utils_2.convertToNumberI7(i7Data.urg) : undefined;
|
|
1088
1573
|
synchronousMachine.ratedU = ur;
|
|
1574
|
+
const cosphir = utils_2.isNumericI7(i7Data.cosphir) ? utils_2.convertToNumberI7(i7Data.cosphir) : undefined;
|
|
1089
1575
|
synchronousMachine.aggregate = true;
|
|
1090
1576
|
const regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_KWBlock ${i7Data.id}`);
|
|
1091
1577
|
switch (i7Data.spannungsgeregelt) {
|
|
@@ -1144,11 +1630,10 @@ class ConverterI7 {
|
|
|
1144
1630
|
generatingUnit.initialP = utils_2.isNumericI7(i7Data.p0) ? utils_2.convertToNumberI7(i7Data.p0) : undefined;
|
|
1145
1631
|
generatingUnit.maxOperatingP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : undefined;
|
|
1146
1632
|
generatingUnit.minOperatingP = utils_2.isNumericI7(i7Data.p_min) ? utils_2.convertToNumberI7(i7Data.p_min) : undefined;
|
|
1147
|
-
generatingUnit.nominalP = generatingUnit.maxOperatingP;
|
|
1633
|
+
generatingUnit.nominalP = utils_2.isNumericI7(cosphir) && utils_2.isNumericI7(sr) ? cosphir * sr : generatingUnit.maxOperatingP;
|
|
1148
1634
|
const kr = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
1149
1635
|
const fn = 50;
|
|
1150
|
-
|
|
1151
|
-
generatingUnit.governorSCD = (utils_2.isNumericI7(kr) && utils_2.isNumericI7(generatingUnit.nominalP)) ? utils_2.calculateSigma(fn, pn, kr) : undefined;
|
|
1636
|
+
generatingUnit.governorSCD = (utils_2.isNumericI7(kr) && utils_2.isNumericI7(generatingUnit.nominalP)) ? utils_2.calculateSigma(fn, generatingUnit.nominalP, kr) : undefined;
|
|
1152
1637
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1153
1638
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1154
1639
|
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl, generatingUnit);
|
|
@@ -1160,26 +1645,50 @@ class ConverterI7 {
|
|
|
1160
1645
|
}
|
|
1161
1646
|
});
|
|
1162
1647
|
}
|
|
1163
|
-
|
|
1648
|
+
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result) {
|
|
1164
1649
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1178
|
-
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1179
|
-
}
|
|
1650
|
+
for (const i7Data of result) {
|
|
1651
|
+
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ENI"]), i7Data.kurzname);
|
|
1652
|
+
const usoll = utils_2.isNumericI7(i7Data.usoll) ? utils_2.convertToNumberI7(i7Data.usoll) : undefined;
|
|
1653
|
+
const governorscd = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
1654
|
+
externalNetworkInjection.governorSCD = governorscd;
|
|
1655
|
+
const prio = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : undefined;
|
|
1656
|
+
externalNetworkInjection.referencePriority = prio;
|
|
1657
|
+
externalNetworkInjection.aggregate = true;
|
|
1658
|
+
externalNetworkInjection.ikSecond = true;
|
|
1659
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data);
|
|
1660
|
+
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1661
|
+
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1180
1662
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
convertErsatzQuerZweige2EquivalentInjection(cimModel, result) {
|
|
1666
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1667
|
+
for (const i7Data of result) {
|
|
1668
|
+
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1669
|
+
const einspeisePrio = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : 1;
|
|
1670
|
+
const flag_lfl = utils_2.convertToBooleanI7(i7Data.flag_lfl);
|
|
1671
|
+
const flag_ks = utils_2.convertToBooleanI7(i7Data.flag_ks);
|
|
1672
|
+
const usoll = utils_2.isNumericI7(i7Data.usoll) ? utils_2.convertToNumberI7(i7Data.usoll) : undefined;
|
|
1673
|
+
const r_ext = utils_2.isNumericI7(i7Data.r_ext) ? utils_2.convertToNumberI7(i7Data.r_ext) : undefined;
|
|
1674
|
+
const x_ext = utils_2.isNumericI7(i7Data.x_ext) ? utils_2.convertToNumberI7(i7Data.x_ext) : undefined;
|
|
1675
|
+
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_EI"]), i7Data.kurzname);
|
|
1676
|
+
equivalentInjection.normallyInService = inBetrieb;
|
|
1677
|
+
if (flag_lfl && usoll && (r_ext || x_ext)) {
|
|
1678
|
+
equivalentInjection.regulationCapability = true;
|
|
1679
|
+
equivalentInjection.regulationStatus = true;
|
|
1680
|
+
equivalentInjection.regulationTarget = usoll;
|
|
1681
|
+
equivalentInjection.r = r_ext;
|
|
1682
|
+
equivalentInjection.r0 = 0;
|
|
1683
|
+
equivalentInjection.r2 = 0;
|
|
1684
|
+
equivalentInjection.x = x_ext;
|
|
1685
|
+
equivalentInjection.x0 = 0;
|
|
1686
|
+
equivalentInjection.x2 = 0;
|
|
1687
|
+
}
|
|
1688
|
+
equivalentInjection.aggregate = true;
|
|
1689
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1690
|
+
cimModel.addEquivalentInjection(equivalentInjection);
|
|
1691
|
+
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1183
1692
|
}
|
|
1184
1693
|
});
|
|
1185
1694
|
}
|
|
@@ -1226,8 +1735,8 @@ class ConverterI7 {
|
|
|
1226
1735
|
const einspeisePrio = utils_2.convertToNumberI7(i7Data.einspprio);
|
|
1227
1736
|
externalNetworkInjection.p = utils_2.convertToNumberI7(i7Data.p_ersatznetz) + utils_2.convertToNumberI7(i7Data.p_restnetz);
|
|
1228
1737
|
externalNetworkInjection.q = utils_2.convertToNumberI7(i7Data.q_ersatznetz) + utils_2.convertToNumberI7(i7Data.q_restnetz);
|
|
1229
|
-
const
|
|
1230
|
-
externalNetworkInjection.governorSCD =
|
|
1738
|
+
const governorscd = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
1739
|
+
externalNetworkInjection.governorSCD = governorscd;
|
|
1231
1740
|
externalNetworkInjection.referencePriority = einspeisePrio;
|
|
1232
1741
|
externalNetworkInjection.maxZ0ToZ1Ratio = utils_2.convertToNumberI7(i7Data.z0_z1);
|
|
1233
1742
|
const regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_BI_${i7Data.id}`);
|
|
@@ -1242,11 +1751,12 @@ class ConverterI7 {
|
|
|
1242
1751
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
1243
1752
|
}
|
|
1244
1753
|
}
|
|
1245
|
-
convertErsatzLaengszweige(frame,
|
|
1754
|
+
convertErsatzLaengszweige(frame, integral7, defaultValuesConfig) {
|
|
1246
1755
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1247
1756
|
const cimModel = frame.cimModel;
|
|
1248
|
-
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG)) {
|
|
1249
|
-
|
|
1757
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG) && integral7.ersatzZweigAnschlussKnotenIDs.length) {
|
|
1758
|
+
integral_sql_1.I7Objects.ERSATZLAENGSZWEIGDIFF;
|
|
1759
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.ERSATZLAENGSZWEIG, integral7.ersatzZweigAnschlussKnotenIDs));
|
|
1250
1760
|
for (const i7Data of result) {
|
|
1251
1761
|
const i7Schluessel = integral_prefix_1.ERSATZLAENGSZWEIG_PRAEFIX +
|
|
1252
1762
|
utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
@@ -1267,14 +1777,14 @@ class ConverterI7 {
|
|
|
1267
1777
|
else if (baseVoltageUr2) {
|
|
1268
1778
|
equivalentBranch.baseVoltage = baseVoltageUr2;
|
|
1269
1779
|
}
|
|
1270
|
-
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
1271
|
-
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC
|
|
1780
|
+
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
1781
|
+
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
1272
1782
|
cimModel.addEquivalentBranch(equivalentBranch);
|
|
1273
1783
|
this.addIdMapping(i7Data.id, equivalentBranch.mrid, integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG);
|
|
1274
1784
|
}
|
|
1275
1785
|
}
|
|
1276
1786
|
else {
|
|
1277
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG} ist nicht vorhanden.`);
|
|
1787
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG} ist nicht vorhanden, oder keine Ersatzlängszweige für diesen MAS Dataset definiert.`);
|
|
1278
1788
|
}
|
|
1279
1789
|
});
|
|
1280
1790
|
}
|
|
@@ -1283,7 +1793,7 @@ class ConverterI7 {
|
|
|
1283
1793
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL)) {
|
|
1284
1794
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KOMPENSATIONSDROSSEL, knotenSfIDs));
|
|
1285
1795
|
for (const i7Data of result) {
|
|
1286
|
-
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC"
|
|
1796
|
+
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC"]), i7Data.kurzname);
|
|
1287
1797
|
shunt.normalSections = i7Data.aktstufe;
|
|
1288
1798
|
shunt.maximumSections = i7Data.maxstufe;
|
|
1289
1799
|
shunt.nomU = i7Data.ur;
|
|
@@ -1317,7 +1827,7 @@ class ConverterI7 {
|
|
|
1317
1827
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR)) {
|
|
1318
1828
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KOMPENSATIONSKONDENSATOR, knotenSfIDs));
|
|
1319
1829
|
for (const i7Data of result) {
|
|
1320
|
-
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC"
|
|
1830
|
+
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC"]), i7Data.kurzname);
|
|
1321
1831
|
shunt.normalSections = i7Data.aktstufe;
|
|
1322
1832
|
shunt.maximumSections = i7Data.maxstufe;
|
|
1323
1833
|
shunt.nomU = i7Data.ur;
|
|
@@ -1351,7 +1861,7 @@ class ConverterI7 {
|
|
|
1351
1861
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STATCOM)) {
|
|
1352
1862
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.STATCOM, knotenSfIDs));
|
|
1353
1863
|
for (const i7Data of result) {
|
|
1354
|
-
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC"
|
|
1864
|
+
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC"]), i7Data.kurzname);
|
|
1355
1865
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1356
1866
|
const regulatingControl = utils_2.createRegulatingControl(`RC_Statcom_${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
1357
1867
|
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
@@ -1391,7 +1901,7 @@ class ConverterI7 {
|
|
|
1391
1901
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SVC)) {
|
|
1392
1902
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SVC, knotenSfIDs));
|
|
1393
1903
|
for (const i7Data of result) {
|
|
1394
|
-
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC"
|
|
1904
|
+
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC"]), i7Data.kurzname);
|
|
1395
1905
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1396
1906
|
const regulatingControl = utils_2.createRegulatingControl(`RC_SVC ${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
1397
1907
|
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
@@ -1431,7 +1941,7 @@ class ConverterI7 {
|
|
|
1431
1941
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_KLASSISCH)) {
|
|
1432
1942
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_KOPFSTATION_KLASSISCH, knotenSfIDs));
|
|
1433
1943
|
for (const i7Data of result) {
|
|
1434
|
-
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU"
|
|
1944
|
+
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU"]));
|
|
1435
1945
|
const acConnectivityNode = cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1436
1946
|
if (acConnectivityNode) {
|
|
1437
1947
|
const equipmentContainer = this.determineEquipmentContainer('Substation', cimModel, acConnectivityNode.connectivityNodeContainer);
|
|
@@ -1445,7 +1955,7 @@ class ConverterI7 {
|
|
|
1445
1955
|
else {
|
|
1446
1956
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1447
1957
|
}
|
|
1448
|
-
const csConverter = new CsConverter_1.CsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CSC"
|
|
1958
|
+
const csConverter = new CsConverter_1.CsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CSC"]), i7Data.kurzname);
|
|
1449
1959
|
csConverter.equipmentContainer = dcConverterUnit;
|
|
1450
1960
|
csConverter.baseS = i7Data.pr;
|
|
1451
1961
|
csConverter.ratedUdc = i7Data.ur;
|
|
@@ -1467,18 +1977,17 @@ class ConverterI7 {
|
|
|
1467
1977
|
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
1468
1978
|
}
|
|
1469
1979
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1470
|
-
|
|
1980
|
+
csConverter.normallyInService = inBetrieb;
|
|
1471
1981
|
if (acConnectivityNode) {
|
|
1472
|
-
csConverter.pccTerminal = this.createConnection(cimModel, csConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, true
|
|
1982
|
+
csConverter.pccTerminal = this.createConnection(cimModel, csConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
1473
1983
|
}
|
|
1474
1984
|
else {
|
|
1475
1985
|
this.logger.debug(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
1476
1986
|
}
|
|
1477
|
-
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN"
|
|
1987
|
+
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN"]));
|
|
1478
1988
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
1479
1989
|
dcConverterUnit.dCNodes.set(dcNode.getUUID(), dcNode);
|
|
1480
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT"
|
|
1481
|
-
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
1990
|
+
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT"]));
|
|
1482
1991
|
acDCConverterDCTerminal.dCConductingEquipment = csConverter;
|
|
1483
1992
|
csConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
1484
1993
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
@@ -1498,7 +2007,7 @@ class ConverterI7 {
|
|
|
1498
2007
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
1499
2008
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_KOPFSTATION_VSC, knotenSfIDs));
|
|
1500
2009
|
for (const i7Data of result) {
|
|
1501
|
-
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU"
|
|
2010
|
+
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU"]));
|
|
1502
2011
|
const acConnectivityNode = cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1503
2012
|
if (acConnectivityNode) {
|
|
1504
2013
|
const equipmentContainer = this.determineEquipmentContainer('Substation', cimModel, acConnectivityNode.connectivityNodeContainer);
|
|
@@ -1512,7 +2021,7 @@ class ConverterI7 {
|
|
|
1512
2021
|
else {
|
|
1513
2022
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1514
2023
|
}
|
|
1515
|
-
const vsConverter = new VsConverter_1.VsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_VSC"
|
|
2024
|
+
const vsConverter = new VsConverter_1.VsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_VSC"]), i7Data.kurzname);
|
|
1516
2025
|
vsConverter.equipmentContainer = dcConverterUnit;
|
|
1517
2026
|
vsConverter.baseS = i7Data.pr;
|
|
1518
2027
|
utils_2.isNumericI7(i7Data.udc) ? vsConverter.ratedUdc = i7Data.udc : vsConverter.ratedUdc = i7Data.ur;
|
|
@@ -1537,17 +2046,16 @@ class ConverterI7 {
|
|
|
1537
2046
|
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
1538
2047
|
}
|
|
1539
2048
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1540
|
-
|
|
2049
|
+
vsConverter.normallyInService = inBetrieb;
|
|
1541
2050
|
if (acConnectivityNode) {
|
|
1542
2051
|
vsConverter.pccTerminal = util_create_1.createConnection(cimModel, vsConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, 1);
|
|
1543
2052
|
}
|
|
1544
2053
|
else {
|
|
1545
2054
|
this.logger.debug(`VsConverter ${i7Data.id} ${vsConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
1546
2055
|
}
|
|
1547
|
-
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN"
|
|
2056
|
+
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN"]));
|
|
1548
2057
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
1549
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT"
|
|
1550
|
-
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
2058
|
+
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT"]));
|
|
1551
2059
|
acDCConverterDCTerminal.dCConductingEquipmentUUID = vsConverter.mrid;
|
|
1552
2060
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
1553
2061
|
vsConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
@@ -1567,7 +2075,7 @@ class ConverterI7 {
|
|
|
1567
2075
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1568
2076
|
for (const i7Data of result) {
|
|
1569
2077
|
try {
|
|
1570
|
-
const energySource = new EnergySource_1.EnergySource(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ES"
|
|
2078
|
+
const energySource = new EnergySource_1.EnergySource(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ES"]), i7Data.kurzname);
|
|
1571
2079
|
this.setTopologyEnergySourceConsumerObject(cimModel, energySource, i7Data);
|
|
1572
2080
|
energySource.nominalVoltage = (_c = (_b = (_a = energySource.equipmentContainer) === null || _a === void 0 ? void 0 : _a.baseVoltage) === null || _b === void 0 ? void 0 : _b.nominalVoltage) === null || _c === void 0 ? void 0 : _c.value;
|
|
1573
2081
|
const prio = i7Data.einspprio;
|
|
@@ -1609,25 +2117,37 @@ class ConverterI7 {
|
|
|
1609
2117
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1610
2118
|
for (const i7Data of result) {
|
|
1611
2119
|
try {
|
|
1612
|
-
const externalNetworkInjection = new
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
const
|
|
2120
|
+
const externalNetworkInjection = new INTEGRALExternalNetworkInjection_1.INTEGRALExternalNetworkInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ENI"]), i7Data.kurzname);
|
|
2121
|
+
let mf = undefined;
|
|
2122
|
+
mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
2123
|
+
if (mf) {
|
|
2124
|
+
cimModel.addMultiplierFactor(mf);
|
|
2125
|
+
externalNetworkInjection.multiplierFactorUUID = mf.getUUID();
|
|
2126
|
+
}
|
|
2127
|
+
const governorscd = utils_2.isNumericI7(i7Data.kr) ? utils_2.convertToNumberI7(i7Data.kr) : undefined;
|
|
2128
|
+
externalNetworkInjection.governorSCD = governorscd;
|
|
2129
|
+
const maxP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : undefined;
|
|
2130
|
+
externalNetworkInjection.maxP = maxP;
|
|
2131
|
+
const maxQ = utils_2.isNumericI7(i7Data.q_max) ? utils_2.convertToNumberI7(i7Data.q_max) : undefined;
|
|
2132
|
+
externalNetworkInjection.maxQ = maxQ;
|
|
2133
|
+
const minP = utils_2.isNumericI7(i7Data.p_min) ? utils_2.convertToNumberI7(i7Data.p_min) : undefined;
|
|
2134
|
+
externalNetworkInjection.minP = minP;
|
|
2135
|
+
const minQ = utils_2.isNumericI7(i7Data.q_min) ? utils_2.convertToNumberI7(i7Data.q_min) : undefined;
|
|
2136
|
+
externalNetworkInjection.minQ = minQ;
|
|
2137
|
+
const usoll = utils_2.isNumericI7(i7Data.usoll) ? utils_2.convertToNumberI7(i7Data.usoll) : undefined;
|
|
2138
|
+
const inBetrieb = utils_2.isBooleanI7(i7Data.betrieb) ? utils_2.convertToBooleanI7(i7Data.betrieb) : false;
|
|
1620
2139
|
let regulatingControl = undefined;
|
|
1621
2140
|
switch (i7Data.spannungsgeregelt) {
|
|
1622
2141
|
case 1: {
|
|
1623
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_ENI_${
|
|
2142
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_ENI_${externalNetworkInjection.getUUID().substring(0, 8)}`);
|
|
1624
2143
|
regulatingControl.targetValue = usoll;
|
|
1625
2144
|
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1626
2145
|
regulatingControl.discrete = false;
|
|
1627
2146
|
regulatingControl.enabled = inBetrieb;
|
|
1628
2147
|
externalNetworkInjection.controlEnabled = inBetrieb;
|
|
1629
2148
|
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
1630
|
-
externalNetworkInjection.
|
|
2149
|
+
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2150
|
+
this.setTapChangerControl;
|
|
1631
2151
|
cimModel.addRegulatingControl(regulatingControl);
|
|
1632
2152
|
break;
|
|
1633
2153
|
}
|
|
@@ -1636,11 +2156,18 @@ class ConverterI7 {
|
|
|
1636
2156
|
}
|
|
1637
2157
|
}
|
|
1638
2158
|
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2159
|
+
const prio = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : undefined;
|
|
2160
|
+
if ((regulatingControl === null || regulatingControl === void 0 ? void 0 : regulatingControl.mode) === RegulatingControlModeKind_1.RegulatingControlModeKind.voltage) {
|
|
2161
|
+
externalNetworkInjection.referencePriority = prio;
|
|
2162
|
+
}
|
|
2163
|
+
const powerData = utils_2.getActiveReactivePower(i7Data);
|
|
2164
|
+
externalNetworkInjection.p = powerData[0];
|
|
2165
|
+
externalNetworkInjection.q = powerData[1];
|
|
1639
2166
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1640
2167
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
1641
2168
|
}
|
|
1642
2169
|
catch (err) {
|
|
1643
|
-
this.logger.error(`Err
|
|
2170
|
+
this.logger.error(`Err convertEinspeisungen2ExternalNetworkInjection ${i7Data.id} ${err}`);
|
|
1644
2171
|
}
|
|
1645
2172
|
}
|
|
1646
2173
|
});
|
|
@@ -1648,7 +2175,7 @@ class ConverterI7 {
|
|
|
1648
2175
|
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data, regulatingControl, generatingUnit) {
|
|
1649
2176
|
var _a, _b;
|
|
1650
2177
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1651
|
-
|
|
2178
|
+
condEquip.normallyInService = inBetrieb;
|
|
1652
2179
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1653
2180
|
if (connectivityNode) {
|
|
1654
2181
|
const terminal = this.createConnection(cimModel, condEquip, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
@@ -1658,9 +2185,24 @@ class ConverterI7 {
|
|
|
1658
2185
|
if (equipmentContainer) {
|
|
1659
2186
|
condEquip.equipmentContainer = equipmentContainer;
|
|
1660
2187
|
equipmentContainer.addEquipment(condEquip);
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
2188
|
+
let i7Schluessel = '';
|
|
2189
|
+
if (condEquip instanceof EnergyConsumer_1.EnergyConsumer) {
|
|
2190
|
+
i7Schluessel = utils_2.getDescription(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
2191
|
+
integral_prefix_1.BELASTUNG_PRAEFIX + i7Data.bezeichner;
|
|
2192
|
+
}
|
|
2193
|
+
else if (condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2194
|
+
i7Schluessel = utils_2.getDescription(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
2195
|
+
integral_prefix_1.ERSATZQUERZWEIG_PRAEFIX + i7Data.bezeichner;
|
|
2196
|
+
}
|
|
2197
|
+
else if (condEquip instanceof StaticVarCompensator_1.StaticVarCompensator) {
|
|
2198
|
+
i7Schluessel = utils_2.getDescription(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
2199
|
+
integral_prefix_1.STATCOM_PRAEFIX + i7Data.bezeichner;
|
|
2200
|
+
}
|
|
2201
|
+
else if (condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection) {
|
|
2202
|
+
i7Schluessel = utils_2.getDescription(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
2203
|
+
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
2204
|
+
}
|
|
2205
|
+
condEquip.description = i7Schluessel;
|
|
1664
2206
|
if (generatingUnit) {
|
|
1665
2207
|
const substation = this.determineEquipmentContainer('Substation', cimModel, equipmentContainer);
|
|
1666
2208
|
generatingUnit.equipmentContainer = substation;
|
|
@@ -1679,8 +2221,8 @@ class ConverterI7 {
|
|
|
1679
2221
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.QUERKUPPLUNG)) {
|
|
1680
2222
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.QUERKUPPLUNG, schaltanlagenAbschnittIDs));
|
|
1681
2223
|
for (const i7Data of result) {
|
|
1682
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"
|
|
1683
|
-
bay.number = i7Data.feldnummer
|
|
2224
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"]), 'Querkupplung');
|
|
2225
|
+
bay.number = utils_2.isNumericI7(i7Data.feldnummer) ? utils_2.convertToNumberI7(i7Data.feldnummer).toString() : undefined;
|
|
1684
2226
|
bay.locationID = i7Data.ips_folder_id;
|
|
1685
2227
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
1686
2228
|
if (voltageLevel) {
|
|
@@ -1709,9 +2251,9 @@ class ConverterI7 {
|
|
|
1709
2251
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
1710
2252
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKUPPLUNG, schaltanlagenIDs));
|
|
1711
2253
|
for (const i7Data of result) {
|
|
1712
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"
|
|
2254
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"]), i7Data.kurzname, 'Laengskupplung');
|
|
1713
2255
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
1714
|
-
bay.number = i7Data.feldnummer
|
|
2256
|
+
bay.number = utils_2.isNumericI7(i7Data.feldnummer) ? utils_2.convertToNumberI7(i7Data.feldnummer).toString() : undefined;
|
|
1715
2257
|
bay.locationID = i7Data.ips_folder_id;
|
|
1716
2258
|
if (voltageLevel) {
|
|
1717
2259
|
bay.voltageLevel = voltageLevel;
|
|
@@ -1724,6 +2266,8 @@ class ConverterI7 {
|
|
|
1724
2266
|
else {
|
|
1725
2267
|
this.logger.debug(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
1726
2268
|
}
|
|
2269
|
+
const lKupplungImpl = new Laengskupplung_1.LaengskupplungImpl(i7Data);
|
|
2270
|
+
integral7.integralLaengskupplungen.set(i7Data.id, lKupplungImpl);
|
|
1727
2271
|
integral7.laengskupplungIDs.push(i7Data.id);
|
|
1728
2272
|
this.addIdMapping(i7Data.id, bay.mrid, integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG);
|
|
1729
2273
|
cimModel.addBay(bay);
|
|
@@ -1739,7 +2283,7 @@ class ConverterI7 {
|
|
|
1739
2283
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_STARR)) {
|
|
1740
2284
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_STARR, containerIDs));
|
|
1741
2285
|
for (const i7Data of result) {
|
|
1742
|
-
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR"
|
|
2286
|
+
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR"]), 'Breaker', 'starre Verbindung');
|
|
1743
2287
|
yield this.convertSwitch(breaker, cimModel, i7Data);
|
|
1744
2288
|
cimModel.addBreaker(breaker);
|
|
1745
2289
|
this.addIdMapping(i7Data.id, breaker.mrid, integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER);
|
|
@@ -1755,7 +2299,7 @@ class ConverterI7 {
|
|
|
1755
2299
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TRENNERFI_3P)) {
|
|
1756
2300
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TRENNERFI_3P, containerIDs));
|
|
1757
2301
|
for (const i7Data of result) {
|
|
1758
|
-
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D"
|
|
2302
|
+
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D"]));
|
|
1759
2303
|
yield this.convertSwitch(disconnector, cimModel, i7Data);
|
|
1760
2304
|
cimModel.addDisconnector(disconnector);
|
|
1761
2305
|
this.addIdMapping(i7Data.id, disconnector.mrid, integral_sql_1.Integral7TableNames.TRENNERFI_3P);
|
|
@@ -1771,7 +2315,7 @@ class ConverterI7 {
|
|
|
1771
2315
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TRENNER_3P)) {
|
|
1772
2316
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TRENNER_3P, containerIDs));
|
|
1773
2317
|
for (const i7Data of result) {
|
|
1774
|
-
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D"
|
|
2318
|
+
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D"]));
|
|
1775
2319
|
yield this.convertSwitch(disconnector, cimModel, i7Data);
|
|
1776
2320
|
cimModel.addDisconnector(disconnector);
|
|
1777
2321
|
this.addIdMapping(i7Data.id, disconnector.mrid, integral_sql_1.Integral7TableNames.TRENNER_3P);
|
|
@@ -1787,7 +2331,7 @@ class ConverterI7 {
|
|
|
1787
2331
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER)) {
|
|
1788
2332
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LEISTUNGSSCHALTER, containerIDs));
|
|
1789
2333
|
for (const i7Data of result) {
|
|
1790
|
-
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR"
|
|
2334
|
+
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR"]));
|
|
1791
2335
|
yield this.convertSwitch(breaker, cimModel, i7Data);
|
|
1792
2336
|
cimModel.addBreaker(breaker);
|
|
1793
2337
|
this.addIdMapping(i7Data.id, breaker.mrid, integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER);
|
|
@@ -1814,13 +2358,13 @@ class ConverterI7 {
|
|
|
1814
2358
|
this.logger.debug(`Schalter ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1815
2359
|
}
|
|
1816
2360
|
if (cnStart) {
|
|
1817
|
-
this.createConnection(cimModel, swtch, cnStart, PhaseCode_1.PhaseCode.ABC, true
|
|
2361
|
+
this.createConnection(cimModel, swtch, cnStart, PhaseCode_1.PhaseCode.ABC, true);
|
|
1818
2362
|
}
|
|
1819
2363
|
else {
|
|
1820
2364
|
this.logger.debug(`Schalter ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
1821
2365
|
}
|
|
1822
2366
|
if (cnZiel) {
|
|
1823
|
-
this.createConnection(cimModel, swtch, cnZiel, PhaseCode_1.PhaseCode.ABC, true
|
|
2367
|
+
this.createConnection(cimModel, swtch, cnZiel, PhaseCode_1.PhaseCode.ABC, true);
|
|
1824
2368
|
}
|
|
1825
2369
|
else {
|
|
1826
2370
|
this.logger.debug(`Schalter ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
@@ -1840,7 +2384,7 @@ class ConverterI7 {
|
|
|
1840
2384
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSDROSSEL)) {
|
|
1841
2385
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.LAENGSDROSSEL, 0, 0, []));
|
|
1842
2386
|
for (const i7Data of result) {
|
|
1843
|
-
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC",
|
|
2387
|
+
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC"]), i7Data.kurzname, i7Data.kommentar + '; LD-' + i7Data.bezeichner);
|
|
1844
2388
|
const start = cimModel.objects.get(this.integralID2UUID.get(i7Data.aknoten));
|
|
1845
2389
|
let startTerminal;
|
|
1846
2390
|
if (start) {
|
|
@@ -1859,17 +2403,17 @@ class ConverterI7 {
|
|
|
1859
2403
|
}
|
|
1860
2404
|
const ur = utils_2.getU(i7Data.ur, defaultValuesConfig.DefaultVoltage);
|
|
1861
2405
|
const baseVoltage = util_create_1.createBaseVoltageIfNotExists(cimModel, ur, this.exportFramesBoundary);
|
|
1862
|
-
const
|
|
2406
|
+
const ir = utils_2.isNumericI7(i7Data.ir) ? utils_2.convertToNumberI7(i7Data.ir) : defaultValuesConfig.SeriesCompensator.varistorRatedCurrent;
|
|
1863
2407
|
const ukr = utils_2.isNumericI7(i7Data.ukr) ? utils_2.convertToNumberI7(i7Data.ukr) : 0;
|
|
1864
|
-
if (
|
|
2408
|
+
if (ir > 0 && ukr > 0) {
|
|
1865
2409
|
const voltage = baseVoltage.nominalVoltage.value * 1000;
|
|
1866
|
-
const z = (ukr / 100) * Math.pow(voltage, 2) / (voltage *
|
|
2410
|
+
const z = (ukr / 100) * Math.pow(voltage, 2) / (voltage * ir * Math.sqrt(3));
|
|
1867
2411
|
seriesCompensator.x = z;
|
|
1868
2412
|
}
|
|
1869
|
-
seriesCompensator.varistorRatedCurrent =
|
|
2413
|
+
seriesCompensator.varistorRatedCurrent = ir;
|
|
1870
2414
|
const terminal = startTerminal;
|
|
1871
2415
|
if (terminal) {
|
|
1872
|
-
this.setConductingEquipmentCurrentLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal.mrid,
|
|
2416
|
+
this.setConductingEquipmentCurrentLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal.mrid, ir);
|
|
1873
2417
|
}
|
|
1874
2418
|
else {
|
|
1875
2419
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -1915,8 +2459,8 @@ class ConverterI7 {
|
|
|
1915
2459
|
for (const i7DataSchiene of stpSchiene) {
|
|
1916
2460
|
try {
|
|
1917
2461
|
stpSchieneIDs.push(i7DataSchiene.id);
|
|
1918
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_CN"
|
|
1919
|
-
const junction = new Junction_1.Junction(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_J"
|
|
2462
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_CN"]), `StpSchiene_${i7DataSchiene.id}`);
|
|
2463
|
+
const junction = new Junction_1.Junction(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_J"]), `StpSchiene/${i7DataSchiene.id}`);
|
|
1920
2464
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(this.integralID2UUID.get(i7DataSchiene.id)));
|
|
1921
2465
|
if (equipmentContainer) {
|
|
1922
2466
|
equipmentContainer.addEquipment(junction);
|
|
@@ -1959,14 +2503,14 @@ class ConverterI7 {
|
|
|
1959
2503
|
const junctionUUID = integral7.sternPunktImpModel.stpSchieneJunctionUUIDs.get((i7Data.anschluss));
|
|
1960
2504
|
let conductingEquip;
|
|
1961
2505
|
if (imax && imin) {
|
|
1962
|
-
const petersenCoil = new PetersenCoil_1.PetersenCoil(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PC"
|
|
2506
|
+
const petersenCoil = new PetersenCoil_1.PetersenCoil(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PC"]), i7Data.kurzname);
|
|
1963
2507
|
integral7.sternPunktImpModel.petersenCoils.set(petersenCoil.mrid, petersenCoil);
|
|
1964
2508
|
integral7.sternPunktImpModel.junctionUUIDstpImp.set(junctionUUID, petersenCoil);
|
|
1965
2509
|
this.addIdMapping(i7Data.id, petersenCoil.mrid, integral_sql_1.Integral7TableNames.STERNPUNKT_IMPEDANZ);
|
|
1966
2510
|
conductingEquip = petersenCoil;
|
|
1967
2511
|
}
|
|
1968
2512
|
else {
|
|
1969
|
-
const groundingImpedance = new GroundingImpedance_1.GroundingImpedance(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_GI"
|
|
2513
|
+
const groundingImpedance = new GroundingImpedance_1.GroundingImpedance(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_GI"]), i7Data.kurzname);
|
|
1970
2514
|
groundingImpedance.r = utils_2.isNumericI7(i7Data.rne) ? i7Data.rne : (utils_2.isNumericI7(kdType === null || kdType === void 0 ? void 0 : kdType.rne) ? kdType === null || kdType === void 0 ? void 0 : kdType.rne : undefined);
|
|
1971
2515
|
groundingImpedance.x = utils_2.isNumericI7(i7Data.xne) ? i7Data.xne : (utils_2.isNumericI7(kdType === null || kdType === void 0 ? void 0 : kdType.xne) ? kdType === null || kdType === void 0 ? void 0 : kdType.xne : undefined);
|
|
1972
2516
|
integral7.sternPunktImpModel.groundingImpedances.set(groundingImpedance.mrid, groundingImpedance);
|
|
@@ -2034,9 +2578,9 @@ class ConverterI7 {
|
|
|
2034
2578
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
2035
2579
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKUPPLUNG, schaltanlagenIDs));
|
|
2036
2580
|
for (const i7Data of result) {
|
|
2037
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"
|
|
2581
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B"]), i7Data.kurzname, 'Laengskupplung');
|
|
2038
2582
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
2039
|
-
bay.number = i7Data.feldnummer
|
|
2583
|
+
bay.number = utils_2.isNumericI7(i7Data.feldnummer) ? utils_2.convertToNumberI7(i7Data.feldnummer).toString() : undefined;
|
|
2040
2584
|
bay.locationID = i7Data.ips_folder_id;
|
|
2041
2585
|
if (voltageLevel) {
|
|
2042
2586
|
bay.voltageLevel = voltageLevel;
|
|
@@ -2049,6 +2593,8 @@ class ConverterI7 {
|
|
|
2049
2593
|
else {
|
|
2050
2594
|
this.logger.debug(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
2051
2595
|
}
|
|
2596
|
+
const lKupplungImpl = new Laengskupplung_1.LaengskupplungImpl(i7Data);
|
|
2597
|
+
integral7.integralLaengskupplungen.set(i7Data.id, lKupplungImpl);
|
|
2052
2598
|
integral7.laengskupplungIDs.push(i7Data.id);
|
|
2053
2599
|
this.addIdMapping(i7Data.id, bay.mrid, integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG);
|
|
2054
2600
|
cimModel.addBay(bay);
|
|
@@ -2136,7 +2682,7 @@ class ConverterI7 {
|
|
|
2136
2682
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2137
2683
|
'-' +
|
|
2138
2684
|
utils_2.ueberpruefeZeichenkette(i7Data.stkabname);
|
|
2139
|
-
const line = new AMPRIONLine_1.AMPRIONLine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([name, "_L"
|
|
2685
|
+
const line = new AMPRIONLine_1.AMPRIONLine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([name, "_L"]), i7Data.stkabname, i7Schluessel);
|
|
2140
2686
|
line.ukz = i7Data.ukz;
|
|
2141
2687
|
let acLineSegments = [];
|
|
2142
2688
|
for (const stk of stromkreisabschnitte) {
|
|
@@ -2146,18 +2692,21 @@ class ConverterI7 {
|
|
|
2146
2692
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2147
2693
|
'-' +
|
|
2148
2694
|
utils_2.ueberpruefeZeichenkette(stk.bezeichner);
|
|
2149
|
-
const acLineSegment = new
|
|
2695
|
+
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(utils_1.getUUID(stk.custom_guid_0120 + stk.custom_guid_2137), util_create_1.createNotation([name, stk.pos.toString(), "_ACLS"]), i7Data.stkabname, i7Schluessel);
|
|
2696
|
+
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(stk.multfaktor));
|
|
2697
|
+
if (mf) {
|
|
2698
|
+
cimModel.addMultiplierFactor(mf);
|
|
2699
|
+
acLineSegment.multiplierFactorUUID = mf.getUUID();
|
|
2700
|
+
}
|
|
2150
2701
|
acLineSegment.equipmentContainer = line;
|
|
2151
2702
|
line.addEquipment(acLineSegment);
|
|
2152
2703
|
acLineSegments.push(acLineSegment);
|
|
2153
2704
|
this.addIdMapping(stk.id, acLineSegment.mrid, integral_sql_1.Integral7TableNames.LEITUNG);
|
|
2154
2705
|
}
|
|
2155
|
-
let tmp_sequence_number = 1;
|
|
2156
2706
|
const acLineSegmentStart = acLineSegments[0];
|
|
2157
|
-
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
2707
|
+
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2158
2708
|
let equivalentInjection = undefined;
|
|
2159
2709
|
if (startTerminal) {
|
|
2160
|
-
tmp_sequence_number++;
|
|
2161
2710
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten));
|
|
2162
2711
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(startTerminal.getConnectivityNodeUUID());
|
|
2163
2712
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
@@ -2175,31 +2724,29 @@ class ConverterI7 {
|
|
|
2175
2724
|
this.logger.debug(`Leitung ${i7Data.id} ${acLineSegmentStart.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
|
|
2176
2725
|
}
|
|
2177
2726
|
cimModel.addACLineSegment(acLineSegmentStart);
|
|
2178
|
-
this.setACLineSegmentProperties(
|
|
2727
|
+
this.setACLineSegmentProperties(this.cimModelDefault, acLineSegments[0], stromkreisabschnitte[0], defaultValuesConfig);
|
|
2179
2728
|
const anzahl = acLineSegments.length;
|
|
2180
2729
|
let tmp_terminal = undefined;
|
|
2181
2730
|
for (let i = 0; i < anzahl - 1; i++) {
|
|
2182
|
-
const cn = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([name, "_CN"
|
|
2731
|
+
const cn = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([name, "_CN"]));
|
|
2183
2732
|
const acLineSegment1 = acLineSegments[i];
|
|
2184
|
-
tmp_terminal = this.createConnection(cimModel, acLineSegment1, cn, PhaseCode_1.PhaseCode.ABC, true
|
|
2733
|
+
tmp_terminal = this.createConnection(cimModel, acLineSegment1, cn, PhaseCode_1.PhaseCode.ABC, true);
|
|
2185
2734
|
cimModel.addACLineSegment(acLineSegment1);
|
|
2186
2735
|
if (tmp_terminal) {
|
|
2187
|
-
tmp_sequence_number++;
|
|
2188
2736
|
tmp_terminal = undefined;
|
|
2189
2737
|
}
|
|
2190
|
-
this.setACLineSegmentProperties(
|
|
2738
|
+
this.setACLineSegmentProperties(this.cimModelDefault, acLineSegments[i], stromkreisabschnitte[i], defaultValuesConfig);
|
|
2191
2739
|
const acLineSegment2 = acLineSegments[i + 1];
|
|
2192
|
-
tmp_terminal = this.createConnection(cimModel, acLineSegment2, cn, PhaseCode_1.PhaseCode.ABC, true
|
|
2740
|
+
tmp_terminal = this.createConnection(cimModel, acLineSegment2, cn, PhaseCode_1.PhaseCode.ABC, true);
|
|
2193
2741
|
cimModel.addACLineSegment(acLineSegment1);
|
|
2194
2742
|
if (tmp_terminal) {
|
|
2195
|
-
tmp_sequence_number++;
|
|
2196
2743
|
tmp_terminal = undefined;
|
|
2197
2744
|
}
|
|
2198
2745
|
cn.connectivityNodeContainer = acLineSegment1.equipmentContainer;
|
|
2199
2746
|
cimModel.addConnectivityNode(cn);
|
|
2200
2747
|
}
|
|
2201
2748
|
const acLineSegmentZiel = acLineSegments[anzahl - 1];
|
|
2202
|
-
const targetTerminal = this.createBoundaryConnection(frame, acLineSegmentZiel, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC
|
|
2749
|
+
const targetTerminal = this.createBoundaryConnection(frame, acLineSegmentZiel, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2203
2750
|
if (targetTerminal) {
|
|
2204
2751
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.eknoten));
|
|
2205
2752
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(targetTerminal.getConnectivityNodeUUID());
|
|
@@ -2225,9 +2772,6 @@ class ConverterI7 {
|
|
|
2225
2772
|
for (const acLineSegment of acLineSegments) {
|
|
2226
2773
|
acLineSegment.baseVoltage = stkBaseVoltage.baseVoltage;
|
|
2227
2774
|
}
|
|
2228
|
-
if (equivalentInjection) {
|
|
2229
|
-
equivalentInjection.baseVoltage = stkBaseVoltage.baseVoltage;
|
|
2230
|
-
}
|
|
2231
2775
|
}
|
|
2232
2776
|
let idx = 0;
|
|
2233
2777
|
while (idx < acLineSegments.length && !(line.subGeographicalRegion)) {
|
|
@@ -2269,11 +2813,11 @@ class ConverterI7 {
|
|
|
2269
2813
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKONDENSATOR) && integral7.lKondensatorAnschlussKnotenIDs) {
|
|
2270
2814
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKONDENSATOR, integral7.lKondensatorAnschlussKnotenIDs));
|
|
2271
2815
|
for (const i7Data of result) {
|
|
2272
|
-
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC"
|
|
2816
|
+
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC"]), i7Data.kurzname);
|
|
2273
2817
|
const start = cimModel.getObject(this.integralID2UUID.get(i7Data.aknoten));
|
|
2274
2818
|
let startTerminal;
|
|
2275
2819
|
if (start) {
|
|
2276
|
-
startTerminal = this.createConnection(cimModel, seriesCompensator, start, PhaseCode_1.PhaseCode.ABC, true
|
|
2820
|
+
startTerminal = this.createConnection(cimModel, seriesCompensator, start, PhaseCode_1.PhaseCode.ABC, true);
|
|
2277
2821
|
}
|
|
2278
2822
|
else {
|
|
2279
2823
|
this.logger.debug(`Längskondensator ${i7Data.id} ${seriesCompensator.mrid} besitzt keinen Anfangsknoten.`);
|
|
@@ -2281,7 +2825,7 @@ class ConverterI7 {
|
|
|
2281
2825
|
const target = cimModel.getObject(this.integralID2UUID.get(i7Data.eknoten));
|
|
2282
2826
|
let targetTerminal;
|
|
2283
2827
|
if (target) {
|
|
2284
|
-
targetTerminal = this.createConnection(cimModel, seriesCompensator, target, PhaseCode_1.PhaseCode.ABC, true
|
|
2828
|
+
targetTerminal = this.createConnection(cimModel, seriesCompensator, target, PhaseCode_1.PhaseCode.ABC, true);
|
|
2285
2829
|
}
|
|
2286
2830
|
else {
|
|
2287
2831
|
this.logger.debug(`Längskondensator ${i7Data.id} ${seriesCompensator.mrid} besitzt keinen Zielknoten.`);
|
|
@@ -2332,10 +2876,10 @@ class ConverterI7 {
|
|
|
2332
2876
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_LEITUNG) && integral7.hgueAnschlussKnotenIDs.length) {
|
|
2333
2877
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_LEITUNG, integral7.hgueAnschlussKnotenIDs));
|
|
2334
2878
|
for (const i7Data of result) {
|
|
2335
|
-
const dcLine = new DCLine_1.DCLine(utils_1.getUUID(i7Data
|
|
2879
|
+
const dcLine = new DCLine_1.DCLine(utils_1.getUUID(i7Data.guid_dcline), util_create_1.createNotation([utils_2.getName(i7Data), "_DCL"]));
|
|
2336
2880
|
const i7Schluessel = integral_prefix_1.HGUELEITUNG_PRAEFIX +
|
|
2337
2881
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
2338
|
-
const dcLineSegment = new DCLineSegment_1.DCLineSegment(utils_1.
|
|
2882
|
+
const dcLineSegment = new DCLineSegment_1.DCLineSegment(utils_1.getUUID(i7Data.guidp), util_create_1.createNotation([utils_2.getName(i7Data), "_DCLS"]), i7Data.kurzname, i7Schluessel);
|
|
2339
2883
|
dcLineSegment.resistance = i7Data.rdc;
|
|
2340
2884
|
dcLineSegment.equipmentContainer = dcLine;
|
|
2341
2885
|
const bipol = utils_2.convertToBooleanI7(i7Data.bipol);
|
|
@@ -2361,9 +2905,8 @@ class ConverterI7 {
|
|
|
2361
2905
|
}
|
|
2362
2906
|
const startDCNode = getDCNodeFromConverter(acDCConverterStart);
|
|
2363
2907
|
if (startDCNode) {
|
|
2364
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT"
|
|
2908
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT"]));
|
|
2365
2909
|
dcTerminal.connected = true;
|
|
2366
|
-
dcTerminal.sequenceNumber = 1;
|
|
2367
2910
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
2368
2911
|
dcTerminal.dcNode = startDCNode;
|
|
2369
2912
|
startDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
@@ -2374,9 +2917,8 @@ class ConverterI7 {
|
|
|
2374
2917
|
}
|
|
2375
2918
|
const targetDCNode = getDCNodeFromConverter(acDCConverterTarget);
|
|
2376
2919
|
if (targetDCNode) {
|
|
2377
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT"
|
|
2920
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT"]));
|
|
2378
2921
|
dcTerminal.connected = true;
|
|
2379
|
-
dcTerminal.sequenceNumber = 2;
|
|
2380
2922
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
2381
2923
|
dcTerminal.dcNode = targetDCNode;
|
|
2382
2924
|
targetDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
@@ -2461,6 +3003,52 @@ class ConverterI7 {
|
|
|
2461
3003
|
}
|
|
2462
3004
|
});
|
|
2463
3005
|
}
|
|
3006
|
+
convertBetriebsmitteltypenGenerator() {
|
|
3007
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3008
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TYP_GENERATOR)) {
|
|
3009
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TYP_GENERATOR, []));
|
|
3010
|
+
for (const i7Data of result) {
|
|
3011
|
+
this.generatorTypen.set(i7Data.name, i7Data);
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
3014
|
+
else {
|
|
3015
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.TYP_GENERATOR} ist nicht vorhanden.`);
|
|
3016
|
+
}
|
|
3017
|
+
});
|
|
3018
|
+
}
|
|
3019
|
+
convertBetriebsmitteltypenAsynchronmotor() {
|
|
3020
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3021
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TYP_ASYNCHRONMOTOR)) {
|
|
3022
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TYP_ASYNCHRONMOTOR, []));
|
|
3023
|
+
for (const i7Data of result) {
|
|
3024
|
+
this.asynchronmotorTypen.set(i7Data.name, i7Data);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
else {
|
|
3028
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.TYP_ASYNCHRONMOTOR} ist nicht vorhanden.`);
|
|
3029
|
+
}
|
|
3030
|
+
});
|
|
3031
|
+
}
|
|
3032
|
+
convertMultiplikationsfaktoren() {
|
|
3033
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3034
|
+
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.MULTIPLIKATIONSFAKTOR)) {
|
|
3035
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.MULTIPLIKATIONSFAKTOR, []));
|
|
3036
|
+
for (const i7Data of result) {
|
|
3037
|
+
const multFaktor = new INTEGRALMultiplierFactor_1.INTEGRALMultiplierFactor(utils_1.getUUID(undefined), utils_2.getName(i7Data), i7Data.kurzname, i7Data.kommentar);
|
|
3038
|
+
multFaktor.p = utils_2.isNumericI7(i7Data.p) ? utils_2.convertToNumberI7(i7Data.p) : 1;
|
|
3039
|
+
multFaktor.qInd = utils_2.isNumericI7(i7Data.q_ind) ? utils_2.convertToNumberI7(i7Data.q_ind) : 1;
|
|
3040
|
+
multFaktor.qKap = utils_2.isNumericI7(i7Data.q_kap) ? utils_2.convertToNumberI7(i7Data.q_kap) : 1;
|
|
3041
|
+
multFaktor.cosPhiInd = utils_2.isNumericI7(i7Data.cos_phi_ind) ? utils_2.convertToNumberI7(i7Data.cos_phi_ind) : 1;
|
|
3042
|
+
multFaktor.cosPhiKap = utils_2.isNumericI7(i7Data.cos_phi_kap) ? utils_2.convertToNumberI7(i7Data.cos_phi_kap) : 1;
|
|
3043
|
+
this.cimModelDefault.addMultiplierFactor(multFaktor);
|
|
3044
|
+
this.addIdMapping(i7Data.id, multFaktor.mrid, integral_sql_1.Integral7TableNames.MULTIPLIKATIONSFAKTOR);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
else {
|
|
3048
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.MULTIPLIKATIONSFAKTOR} ist nicht vorhanden.`);
|
|
3049
|
+
}
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
2464
3052
|
convertTrafo2W(frame, integral7, defaultValuesConfig, standortIDs) {
|
|
2465
3053
|
var _a;
|
|
2466
3054
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -2479,7 +3067,7 @@ class ConverterI7 {
|
|
|
2479
3067
|
}
|
|
2480
3068
|
}
|
|
2481
3069
|
for (const i7Data of result) {
|
|
2482
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT"
|
|
3070
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT"]), i7Data.kurzname, i7Data.kommentar);
|
|
2483
3071
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
2484
3072
|
if (substation) {
|
|
2485
3073
|
powerTransformer.equipmentContainer = substation;
|
|
@@ -2502,15 +3090,15 @@ class ConverterI7 {
|
|
|
2502
3090
|
const sr = utils_2.getSrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber, false);
|
|
2503
3091
|
const ur = utils_2.getUrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber);
|
|
2504
3092
|
const ir1 = sr * 1000000 / (ur * 1000 * Math.sqrt(3));
|
|
2505
|
-
const
|
|
2506
|
-
const iLeer = utils_2.isNumericI7(i7Data.i_leer) ? utils_2.
|
|
3093
|
+
const pLeer = utils_2.isNumericI7(i7Data.p_leer) ? utils_2.getTrafoPleer(i7Data, powerTransformerInfo) : 0;
|
|
3094
|
+
const iLeer = utils_2.isNumericI7(i7Data.i_leer) ? utils_2.getTrafoIleer(i7Data, powerTransformerInfo) : 0;
|
|
2507
3095
|
powerTransformerEnd1.r = utils_2.calculateR(ur, pkr, sr);
|
|
2508
3096
|
powerTransformerEnd1.x = utils_2.calculateX(ur, ukr, sr, powerTransformerEnd1.r);
|
|
2509
|
-
powerTransformerEnd1.g = utils_2.calculateG(ur,
|
|
2510
|
-
powerTransformerEnd1.b = utils_2.calculateB(ur, sr, iLeer,
|
|
3097
|
+
powerTransformerEnd1.g = utils_2.calculateG(ur, pLeer);
|
|
3098
|
+
powerTransformerEnd1.b = utils_2.calculateB(ur, sr, iLeer, pLeer);
|
|
2511
3099
|
powerTransformerEnd1.ratedU = ur;
|
|
2512
3100
|
powerTransformerEnd1.ratedS = sr;
|
|
2513
|
-
const startTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
3101
|
+
const startTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2514
3102
|
if (!startTerminal)
|
|
2515
3103
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2516
3104
|
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7, ir1, i7Data, defaultValuesConfig);
|
|
@@ -2520,8 +3108,6 @@ class ConverterI7 {
|
|
|
2520
3108
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(startTerminal.getConnectivityNodeUUID());
|
|
2521
3109
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
2522
3110
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
2523
|
-
let baseVoltage = powerTransformerEnd1.getBaseVoltage();
|
|
2524
|
-
equivalentInjection.baseVoltage = baseVoltage;
|
|
2525
3111
|
}
|
|
2526
3112
|
}
|
|
2527
3113
|
const powerTransformerEnd2 = new PowerTransformerEnd_1.PowerTransformerEnd(utils_1.getUUID(i7Data.guid_w2), `W2${powerTransformer.name}`);
|
|
@@ -2533,7 +3119,7 @@ class ConverterI7 {
|
|
|
2533
3119
|
powerTransformerEnd2.ratedS = sr2;
|
|
2534
3120
|
powerTransformerEnd2.ratedU = ur2;
|
|
2535
3121
|
const ir2 = (sr * Math.pow(10, 6) / ur2 * 1000) / Math.sqrt(3);
|
|
2536
|
-
const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC
|
|
3122
|
+
const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2537
3123
|
if (!zielTerminal)
|
|
2538
3124
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Zielknoten.`);
|
|
2539
3125
|
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7, ir2, i7Data, defaultValuesConfig);
|
|
@@ -2542,8 +3128,6 @@ class ConverterI7 {
|
|
|
2542
3128
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(zielTerminal.getConnectivityNodeUUID());
|
|
2543
3129
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
2544
3130
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
2545
|
-
let baseVoltage = powerTransformerEnd2.getBaseVoltage();
|
|
2546
|
-
equivalentInjection.baseVoltage = baseVoltage;
|
|
2547
3131
|
}
|
|
2548
3132
|
}
|
|
2549
3133
|
powerTransformerEnd1.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd1.endNumber, powerTransformerEnd1.grounded);
|
|
@@ -2552,20 +3136,11 @@ class ConverterI7 {
|
|
|
2552
3136
|
powerTransformerEnd2.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2553
3137
|
this.sortTransformerEnd(powerTransformer, 'ratedU', 'desc');
|
|
2554
3138
|
const powerTransformerEnds = [powerTransformerEnd1, powerTransformerEnd2];
|
|
2555
|
-
const terminals = [startTerminal, zielTerminal];
|
|
2556
3139
|
const spRegKnoten = yield this.getSpannungsbandTrafo2W(i7Data);
|
|
2557
3140
|
const spannungsband = integral7.targetVoltages.get(spRegKnoten.id);
|
|
2558
3141
|
const cnUUID = this.integralID2UUID.get(spRegKnoten.id);
|
|
2559
3142
|
const connectivityNode = cimModel.getObject(cnUUID);
|
|
2560
|
-
|
|
2561
|
-
const winkel = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${powerTransformerEnd.endNumber}`]);
|
|
2562
|
-
if (winkel > 0) {
|
|
2563
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband, false);
|
|
2564
|
-
}
|
|
2565
|
-
else {
|
|
2566
|
-
this.createRatioTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
3143
|
+
this.convertTapChangers(i7Data, powerTransformerEnds, cimModel, connectivityNode, spannungsband);
|
|
2569
3144
|
cimModel.addPowerTransformerEnd(powerTransformerEnd1);
|
|
2570
3145
|
cimModel.addPowerTransformerEnd(powerTransformerEnd2);
|
|
2571
3146
|
cimModel.addPowerTransformer(powerTransformer);
|
|
@@ -2607,7 +3182,7 @@ class ConverterI7 {
|
|
|
2607
3182
|
}
|
|
2608
3183
|
}
|
|
2609
3184
|
for (const i7Data of result) {
|
|
2610
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT"
|
|
3185
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT"]), i7Data.kurzname, i7Data.kommentar);
|
|
2611
3186
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
2612
3187
|
if (substation) {
|
|
2613
3188
|
powerTransformer.equipmentContainer = substation;
|
|
@@ -2646,7 +3221,7 @@ class ConverterI7 {
|
|
|
2646
3221
|
const powerTransformerEnd1 = new PowerTransformerEnd_1.PowerTransformerEnd(utils_1.getUUID(i7Data.guid_w1), `W1 ${powerTransformer.name}`);
|
|
2647
3222
|
powerTransformerEnd1.endNumber = 1;
|
|
2648
3223
|
const wicklung1 = trafoWicklungen.get(i7Data.trafowicklung3w1);
|
|
2649
|
-
const terminal1 = this.createBoundaryConnection(frame, powerTransformer, wicklung1.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
3224
|
+
const terminal1 = this.createBoundaryConnection(frame, powerTransformer, wicklung1.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2650
3225
|
if (!terminal1)
|
|
2651
3226
|
this.logger.debug(`PowerTransformer3W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2652
3227
|
powerTransformerEnd1.r = impedanzW1.r;
|
|
@@ -2662,14 +3237,12 @@ class ConverterI7 {
|
|
|
2662
3237
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(terminal1.getConnectivityNodeUUID());
|
|
2663
3238
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
2664
3239
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
2665
|
-
let baseVoltage = powerTransformerEnd1.getBaseVoltage();
|
|
2666
|
-
equivalentInjection.baseVoltage = baseVoltage;
|
|
2667
3240
|
}
|
|
2668
3241
|
}
|
|
2669
3242
|
powerTransformerEnd1.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd1.endNumber, powerTransformerEnd1.grounded);
|
|
2670
3243
|
powerTransformerEnd1.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2671
3244
|
const wicklung2 = trafoWicklungen.get(i7Data.trafowicklung3w2);
|
|
2672
|
-
const terminal2 = this.createBoundaryConnection(frame, powerTransformer, wicklung2.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
3245
|
+
const terminal2 = this.createBoundaryConnection(frame, powerTransformer, wicklung2.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2673
3246
|
if (!terminal2)
|
|
2674
3247
|
this.logger.debug(`PowerTransformer3W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2675
3248
|
const powerTransformerEnd2 = new PowerTransformerEnd_1.PowerTransformerEnd(utils_1.getUUID(i7Data.guid_w2), `W2 ${powerTransformer.name}`);
|
|
@@ -2688,14 +3261,12 @@ class ConverterI7 {
|
|
|
2688
3261
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(terminal2.getConnectivityNodeUUID());
|
|
2689
3262
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
2690
3263
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
2691
|
-
let baseVoltage = powerTransformerEnd2.getBaseVoltage();
|
|
2692
|
-
equivalentInjection.baseVoltage = baseVoltage;
|
|
2693
3264
|
}
|
|
2694
3265
|
}
|
|
2695
3266
|
powerTransformerEnd2.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd2.endNumber, powerTransformerEnd2.grounded);
|
|
2696
3267
|
powerTransformerEnd2.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2697
3268
|
const wicklung3 = trafoWicklungen.get(i7Data.trafowicklung3w3);
|
|
2698
|
-
const terminal3 = this.createBoundaryConnection(frame, powerTransformer, wicklung3.aknoten, PhaseCode_1.PhaseCode.ABC
|
|
3269
|
+
const terminal3 = this.createBoundaryConnection(frame, powerTransformer, wicklung3.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2699
3270
|
if (!terminal3)
|
|
2700
3271
|
this.logger.debug(`PowerTransformer3W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2701
3272
|
const powerTransformerEnd3 = new PowerTransformerEnd_1.PowerTransformerEnd(utils_1.getUUID(i7Data.guid_w3), `Wicklung 3 ${powerTransformer.name}`);
|
|
@@ -2714,8 +3285,6 @@ class ConverterI7 {
|
|
|
2714
3285
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(terminal3.getConnectivityNodeUUID());
|
|
2715
3286
|
if (tmp_cn && tmp_cn.boundaryPoint) {
|
|
2716
3287
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
2717
|
-
let baseVoltage = powerTransformerEnd3.getBaseVoltage();
|
|
2718
|
-
equivalentInjection.baseVoltage = baseVoltage;
|
|
2719
3288
|
}
|
|
2720
3289
|
}
|
|
2721
3290
|
powerTransformerEnd3.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd3.endNumber, powerTransformerEnd3.grounded);
|
|
@@ -2727,15 +3296,7 @@ class ConverterI7 {
|
|
|
2727
3296
|
const spannungsband = integral7.targetVoltages.get(spRegKnoten.id);
|
|
2728
3297
|
const cnUUID = this.integralID2UUID.get(spRegKnoten.id);
|
|
2729
3298
|
const connectivityNode = cimModel.getObject(cnUUID);
|
|
2730
|
-
|
|
2731
|
-
const winkel = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${powerTransformerEnd.endNumber}`]);
|
|
2732
|
-
if (winkel > 0) {
|
|
2733
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband, true);
|
|
2734
|
-
}
|
|
2735
|
-
else {
|
|
2736
|
-
this.createRatioTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
3299
|
+
this.convertTapChangers(i7Data, powerTransformerEnds, cimModel, connectivityNode, spannungsband);
|
|
2739
3300
|
cimModel.addPowerTransformer(powerTransformer);
|
|
2740
3301
|
cimModel.addPowerTransformerEnd(powerTransformerEnd1);
|
|
2741
3302
|
cimModel.addPowerTransformerEnd(powerTransformerEnd2);
|
|
@@ -2748,7 +3309,7 @@ class ConverterI7 {
|
|
|
2748
3309
|
}
|
|
2749
3310
|
});
|
|
2750
3311
|
}
|
|
2751
|
-
setTransformerEndInfoProperties(
|
|
3312
|
+
setTransformerEndInfoProperties(powerTransformerEndInfo, data, endNumber) {
|
|
2752
3313
|
const minstufe = `minstufe_s${endNumber}`;
|
|
2753
3314
|
const neutralstufe = `mittelstufe_s${endNumber}`;
|
|
2754
3315
|
const maxstufe = `maxstufe_s${endNumber}`;
|
|
@@ -2756,15 +3317,17 @@ class ConverterI7 {
|
|
|
2756
3317
|
const umin = `umin_s${endNumber}`;
|
|
2757
3318
|
const gestufte_seite = `gestufte_seite_s${endNumber}`;
|
|
2758
3319
|
const ur = `ur${endNumber}`;
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
const tapChangerInfo = new
|
|
3320
|
+
powerTransformerEndInfo.endNumber = endNumber;
|
|
3321
|
+
powerTransformerEndInfo.ratedU = new Voltage_1.Voltage(data[ur], UnitMultiplier_1.UnitMultiplier.k, UnitSymbol_1.UnitSymbol.V);
|
|
3322
|
+
powerTransformerEndInfo.tapActive = utils_2.convertToBooleanI7(data[gestufte_seite]);
|
|
3323
|
+
const tapChangerInfo = new EVTapChangerInfo_1.EVTapChangerInfo(utils_1.generateUUID(), `TapChangerInfo_${data['id']}`);
|
|
2763
3324
|
tapChangerInfo.highStep = utils_2.convertToNumberI7(data[maxstufe]);
|
|
2764
3325
|
tapChangerInfo.lowStep = utils_2.convertToNumberI7(data[minstufe]);
|
|
2765
3326
|
tapChangerInfo.neutralStep = utils_2.convertToNumberI7(data[neutralstufe]);
|
|
2766
|
-
|
|
2767
|
-
|
|
3327
|
+
powerTransformerEndInfo.uMax = data[umax];
|
|
3328
|
+
powerTransformerEndInfo.uMin = data[umin];
|
|
3329
|
+
tapChangerInfo.setPowerTransfomerEndInfo(powerTransformerEndInfo);
|
|
3330
|
+
powerTransformerEndInfo.setTapChangerInfo(tapChangerInfo);
|
|
2768
3331
|
}
|
|
2769
3332
|
transformBoundaryModel(frame, masFrames) {
|
|
2770
3333
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -2824,7 +3387,7 @@ class ConverterI7 {
|
|
|
2824
3387
|
line.addConnectivityNode(connectivityNode);
|
|
2825
3388
|
const junction = new Junction_1.Junction(utils_1.generateUUID(), `${line.name}_BD-J`, `Junction`, 'Junction for Geo');
|
|
2826
3389
|
junction.equipmentContainer = line;
|
|
2827
|
-
|
|
3390
|
+
let terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([line.name, '_BD-T']), 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
2828
3391
|
junction.terminals.set(terminal.getUUID(), terminal);
|
|
2829
3392
|
terminal.conductingEquipment = junction;
|
|
2830
3393
|
line.addEquipment(junction);
|
|
@@ -2887,7 +3450,7 @@ class ConverterI7 {
|
|
|
2887
3450
|
}
|
|
2888
3451
|
}
|
|
2889
3452
|
}
|
|
2890
|
-
setACLineSegmentProperties(
|
|
3453
|
+
setACLineSegmentProperties(defaultModel, acLineSegment, data, defaultValuesConfig) {
|
|
2891
3454
|
if (utils_2.isNumericI7(data.laenge) && data.laenge <= 0) {
|
|
2892
3455
|
data.flag_impedanzlos = 1;
|
|
2893
3456
|
}
|
|
@@ -2897,7 +3460,7 @@ class ConverterI7 {
|
|
|
2897
3460
|
else {
|
|
2898
3461
|
acLineSegment.length = 1;
|
|
2899
3462
|
}
|
|
2900
|
-
const assetType =
|
|
3463
|
+
const assetType = defaultModel.getWireInfoByName(data.nametyp);
|
|
2901
3464
|
if (utils_2.isNumericI7(data.r0) && data.r0 > 0 && !data.flag_impedanzlos) {
|
|
2902
3465
|
acLineSegment.r0 = data.r0;
|
|
2903
3466
|
}
|
|
@@ -2963,12 +3526,12 @@ class ConverterI7 {
|
|
|
2963
3526
|
}
|
|
2964
3527
|
for (const terminal of acLineSegment.terminals.values()) {
|
|
2965
3528
|
if (utils_2.isNumericI7(data.ir) && data.ir > 0) {
|
|
2966
|
-
this.setConductingEquipmentCurrentLimit(
|
|
3529
|
+
this.setConductingEquipmentCurrentLimit(defaultModel, acLineSegment.name, terminal, data.ir);
|
|
2967
3530
|
}
|
|
2968
3531
|
else if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
2969
|
-
this.setConductingEquipmentCurrentLimit(
|
|
3532
|
+
this.setConductingEquipmentCurrentLimit(defaultModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
2970
3533
|
}
|
|
2971
|
-
const psrType = utils_1.createIfNotExitsPSRType(
|
|
3534
|
+
const psrType = utils_1.createIfNotExitsPSRType(defaultModel, data.typ);
|
|
2972
3535
|
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
2973
3536
|
}
|
|
2974
3537
|
}
|
|
@@ -3014,11 +3577,11 @@ class ConverterI7 {
|
|
|
3014
3577
|
}
|
|
3015
3578
|
return operationalLimitType;
|
|
3016
3579
|
}
|
|
3017
|
-
createConnection(cimModel, conductingEquipment, object, phase, connected
|
|
3580
|
+
createConnection(cimModel, conductingEquipment, object, phase, connected) {
|
|
3018
3581
|
let terminal;
|
|
3019
3582
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
3020
3583
|
const cn = object;
|
|
3021
|
-
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation(['
|
|
3584
|
+
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([cn.name, '_T']));
|
|
3022
3585
|
terminal.setConnectivityNode(cn);
|
|
3023
3586
|
cn.addTerminal(terminal);
|
|
3024
3587
|
cimModel.addTerminal(terminal);
|
|
@@ -3029,18 +3592,19 @@ class ConverterI7 {
|
|
|
3029
3592
|
if (terminal) {
|
|
3030
3593
|
terminal.phases = phase;
|
|
3031
3594
|
terminal.conductingEquipment = conductingEquipment;
|
|
3032
|
-
terminal.sequenceNumber = sequenceNumber ? sequenceNumber : 1;
|
|
3033
3595
|
conductingEquipment.addTerminal(terminal);
|
|
3034
3596
|
terminal.connected = connected;
|
|
3597
|
+
terminal.name = util_create_1.createNotation([conductingEquipment.name, terminal.name], 32, true);
|
|
3035
3598
|
}
|
|
3036
3599
|
return terminal;
|
|
3037
3600
|
}
|
|
3038
|
-
createBoundaryConnection(frame, conductingEquipment, i7ObjectID, phase
|
|
3601
|
+
createBoundaryConnection(frame, conductingEquipment, i7ObjectID, phase) {
|
|
3039
3602
|
const cimModel = frame.cimModel;
|
|
3040
3603
|
const anschlussUUID = this.integralID2UUID.get(i7ObjectID);
|
|
3041
3604
|
let terminal;
|
|
3605
|
+
let cn = undefined;
|
|
3042
3606
|
if (cimModel.objects.has(anschlussUUID)) {
|
|
3043
|
-
terminal = this.createConnection(cimModel, conductingEquipment, cimModel.getObject(anschlussUUID), phase, true
|
|
3607
|
+
terminal = this.createConnection(cimModel, conductingEquipment, cimModel.getObject(anschlussUUID), phase, true);
|
|
3044
3608
|
}
|
|
3045
3609
|
else {
|
|
3046
3610
|
const frameBD = this.getConnectedBoundaryModel(anschlussUUID);
|
|
@@ -3048,21 +3612,19 @@ class ConverterI7 {
|
|
|
3048
3612
|
const cimModelBD = frameBD.cimModel;
|
|
3049
3613
|
frame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_EQ, frameBD.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
3050
3614
|
const object = cimModelBD.getObject(anschlussUUID);
|
|
3051
|
-
let cn;
|
|
3052
3615
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
3053
3616
|
cn = object;
|
|
3054
|
-
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation(['
|
|
3617
|
+
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([cn.name, '_T']));
|
|
3055
3618
|
terminal.connectivityNodeUUID = cn.mrid;
|
|
3056
3619
|
terminal.phases = phase;
|
|
3057
3620
|
terminal.connected = true;
|
|
3058
|
-
terminal.sequenceNumber = sequenceNumber ? sequenceNumber : 1;
|
|
3059
3621
|
cimModel.addTerminal(terminal);
|
|
3060
3622
|
}
|
|
3061
3623
|
else if (object instanceof Terminal_1.Terminal) {
|
|
3062
3624
|
terminal = object;
|
|
3063
3625
|
cn = terminal.getConnectivityNode();
|
|
3064
3626
|
if (cn === undefined) {
|
|
3065
|
-
frameBD.cimModel.getConnectivityNode(terminal.getConnectivityNodeUUID());
|
|
3627
|
+
cn = frameBD.cimModel.getConnectivityNode(terminal.getConnectivityNodeUUID());
|
|
3066
3628
|
}
|
|
3067
3629
|
if (cn !== undefined) {
|
|
3068
3630
|
cn.terminals.delete(terminal.mrid);
|
|
@@ -3107,25 +3669,24 @@ class ConverterI7 {
|
|
|
3107
3669
|
}
|
|
3108
3670
|
});
|
|
3109
3671
|
if (!equivinj_exists) {
|
|
3110
|
-
let tmp_terminal = new Terminal_1.Terminal(utils_1.generateUUID()
|
|
3672
|
+
let tmp_terminal = new Terminal_1.Terminal(utils_1.generateUUID());
|
|
3111
3673
|
tmp_terminal.setConnectivityNodeUUID(cn.mrid);
|
|
3112
3674
|
tmp_terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
3113
3675
|
tmp_terminal.connected = true;
|
|
3114
3676
|
tmp_terminal.sequenceNumber = 1;
|
|
3115
|
-
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.generateUUID(), util_create_1.createNotation([
|
|
3677
|
+
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.generateUUID(), util_create_1.createNotation([frame.tsoName, '_BD-EI', cn.mrid], 32, true));
|
|
3116
3678
|
equivalentInjection.p = 0;
|
|
3117
3679
|
equivalentInjection.q = 0;
|
|
3118
3680
|
equivalentInjection.regulationStatus = false;
|
|
3119
3681
|
equivalentInjection.addTerminal(tmp_terminal);
|
|
3682
|
+
equivalentInjection.baseVoltage = cn.getBaseVoltage();
|
|
3120
3683
|
tmp_terminal.setConductingEquipment(equivalentInjection);
|
|
3684
|
+
tmp_terminal.name = util_create_1.createNotation([cn.name, '_', equivalentInjection.name, '_BD-T'], 32, true);
|
|
3121
3685
|
cn.addTerminal(tmp_terminal);
|
|
3122
3686
|
frame.cimModel.addEquivalentInjection(equivalentInjection);
|
|
3123
3687
|
if (tmp_terminal.getConductingEquipmentUUID() !== undefined) {
|
|
3124
3688
|
frame.cimModel.addTerminal(tmp_terminal);
|
|
3125
3689
|
}
|
|
3126
|
-
else {
|
|
3127
|
-
let stop = true;
|
|
3128
|
-
}
|
|
3129
3690
|
}
|
|
3130
3691
|
return equivalentInjection;
|
|
3131
3692
|
}
|
|
@@ -3186,10 +3747,10 @@ class ConverterI7 {
|
|
|
3186
3747
|
const tabName_NetzSSAB = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.SAMMELSCHIENE];
|
|
3187
3748
|
const tabName_NetzSchaltfeld = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.SCHALTFELD];
|
|
3188
3749
|
const tabName_NetzKnotenSf = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_SF];
|
|
3189
|
-
const sqlStatement = `SELECT ${tabName_NetzSSAB}.id, ${tabName_NetzSSAB}.umin, ${tabName_NetzSSAB}.umax, ${tabName_NetzSSAB}.usoll
|
|
3190
|
-
FROM ${tabName_NetzSSAB}
|
|
3191
|
-
LEFT JOIN ${tabName_NetzSchaltfeld} ON ${tabName_NetzSSAB}.saabschnitt = ${tabName_NetzSchaltfeld}.saabschnitt
|
|
3192
|
-
LEFT JOIN ${tabName_NetzKnotenSf} ON ${tabName_NetzKnotenSf}.schaltfeld = ${tabName_NetzSchaltfeld}.id
|
|
3750
|
+
const sqlStatement = `SELECT ${tabName_NetzSSAB}.id, ${tabName_NetzSSAB}.umin, ${tabName_NetzSSAB}.umax, ${tabName_NetzSSAB}.usoll
|
|
3751
|
+
FROM ${tabName_NetzSSAB}
|
|
3752
|
+
LEFT JOIN ${tabName_NetzSchaltfeld} ON ${tabName_NetzSSAB}.saabschnitt = ${tabName_NetzSchaltfeld}.saabschnitt
|
|
3753
|
+
LEFT JOIN ${tabName_NetzKnotenSf} ON ${tabName_NetzKnotenSf}.schaltfeld = ${tabName_NetzSchaltfeld}.id
|
|
3193
3754
|
WHERE ${tabName_NetzKnotenSf}.id = ${tempKnotenId}`;
|
|
3194
3755
|
minMaxSollResult = yield this.mysqlController.execQuery(sqlStatement);
|
|
3195
3756
|
}
|
|
@@ -3199,12 +3760,12 @@ class ConverterI7 {
|
|
|
3199
3760
|
const tabName_NetzSo = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_SO];
|
|
3200
3761
|
const tabName_NetzSchlaufe = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.SCHLAUFE];
|
|
3201
3762
|
const tabName_NetzKnotenZw = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_ZW];
|
|
3202
|
-
minMaxSollResult = yield this.mysqlController.execQuery(`SELECT ${tabName_NetzSo}.id, ${tabName_NetzSo}.umin, ${tabName_NetzSo}.umax, ${tabName_NetzSo}.usoll
|
|
3203
|
-
FROM ${tabName_NetzKnotenZw}
|
|
3204
|
-
LEFT JOIN ${tabName_NetzSchlaufe} ON
|
|
3205
|
-
${tabName_NetzSchlaufe}.id = ${tabName_NetzKnotenZw}.schlaufe
|
|
3206
|
-
LEFT JOIN ${tabName_NetzSo} ON
|
|
3207
|
-
${tabName_NetzSchlaufe}.eknoten = ${tabName_NetzSo}.id
|
|
3763
|
+
minMaxSollResult = yield this.mysqlController.execQuery(`SELECT ${tabName_NetzSo}.id, ${tabName_NetzSo}.umin, ${tabName_NetzSo}.umax, ${tabName_NetzSo}.usoll
|
|
3764
|
+
FROM ${tabName_NetzKnotenZw}
|
|
3765
|
+
LEFT JOIN ${tabName_NetzSchlaufe} ON
|
|
3766
|
+
${tabName_NetzSchlaufe}.id = ${tabName_NetzKnotenZw}.schlaufe
|
|
3767
|
+
LEFT JOIN ${tabName_NetzSo} ON
|
|
3768
|
+
${tabName_NetzSchlaufe}.eknoten = ${tabName_NetzSo}.id
|
|
3208
3769
|
WHERE ${tabName_NetzKnotenZw}.id = ${tempKnotenId};`);
|
|
3209
3770
|
}
|
|
3210
3771
|
else {
|
|
@@ -3215,10 +3776,10 @@ class ConverterI7 {
|
|
|
3215
3776
|
else if (spgKnotenId !== undefined) {
|
|
3216
3777
|
const tabName_NetzSo = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.KNOTEN_SO];
|
|
3217
3778
|
const tabName_NetzSSAB = integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.SAMMELSCHIENE];
|
|
3218
|
-
const query = ` SELECT Voltage.id, Voltage.umin, Voltage.umax, Voltage.usoll
|
|
3219
|
-
FROM (
|
|
3220
|
-
SELECT id, umin, umax, usoll FROM ${tabName_NetzSo} WHERE ${tabName_NetzSo}.id = ${spgKnotenId}
|
|
3221
|
-
UNION
|
|
3779
|
+
const query = ` SELECT Voltage.id, Voltage.umin, Voltage.umax, Voltage.usoll
|
|
3780
|
+
FROM (
|
|
3781
|
+
SELECT id, umin, umax, usoll FROM ${tabName_NetzSo} WHERE ${tabName_NetzSo}.id = ${spgKnotenId}
|
|
3782
|
+
UNION
|
|
3222
3783
|
SELECT id, umin, umax, usoll FROM ${tabName_NetzSSAB} WHERE ${tabName_NetzSSAB}.id = ${spgKnotenId}) as Voltage`;
|
|
3223
3784
|
minMaxSollResult = yield this.mysqlController.execQuery(query);
|
|
3224
3785
|
}
|
|
@@ -3272,15 +3833,16 @@ class ConverterI7 {
|
|
|
3272
3833
|
for (const frame of boundaryFrames) {
|
|
3273
3834
|
this.addDefaultObjectsLoadModel(frame.cimModel, defaultValuesConfig);
|
|
3274
3835
|
this.addDefaultObjectsGeo(frame.cimModel, defaultValuesConfig);
|
|
3275
|
-
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_EQ_BD], tempDirPath);
|
|
3836
|
+
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_EQ_BD, rdf_xml_1.RDF_XML.PROFILE_DL], tempDirPath);
|
|
3276
3837
|
frame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_GL, frame.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
3838
|
+
frame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_DL, frame.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
3277
3839
|
}
|
|
3278
3840
|
this.exportFramesBoundary = this.associateGeoRegionsToExportFrames(boundaryFrames);
|
|
3279
3841
|
const gridFrames = this.initExportFrames(gridExports, geoRegions, allSubGeoRegions);
|
|
3280
3842
|
for (const frame of gridFrames) {
|
|
3281
3843
|
this.addDefaultObjectsLoadModel(frame.cimModel, defaultValuesConfig);
|
|
3282
3844
|
this.addDefaultObjectsGeo(frame.cimModel, defaultValuesConfig);
|
|
3283
|
-
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_EQ, rdf_xml_1.RDF_XML.PROFILE_SSH, rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_AMPI7, rdf_xml_1.RDF_XML.PROFILE_DY, rdf_xml_1.RDF_XML.PROFILE_SV], tempDirPath);
|
|
3845
|
+
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_DL, rdf_xml_1.RDF_XML.PROFILE_EQ, rdf_xml_1.RDF_XML.PROFILE_SSH, rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_AMPI7, rdf_xml_1.RDF_XML.PROFILE_DY, rdf_xml_1.RDF_XML.PROFILE_SV], tempDirPath);
|
|
3284
3846
|
}
|
|
3285
3847
|
this.exportFrames = this.associateGeoRegionsToExportFrames(gridFrames);
|
|
3286
3848
|
});
|
|
@@ -3295,7 +3857,7 @@ class ConverterI7 {
|
|
|
3295
3857
|
for (const exportObject of exportEntry.objects) {
|
|
3296
3858
|
switch (exportEntry.objectType) {
|
|
3297
3859
|
case data_structures_i7_1.ExportObjectType.georegion: {
|
|
3298
|
-
const geoRegion = geoRegions.find(elem => elem.name.match(exportObject.name));
|
|
3860
|
+
const geoRegion = geoRegions.find(elem => elem.name.substring(0, exportObject.name.length).match(exportObject.name));
|
|
3299
3861
|
if (!geoRegion) {
|
|
3300
3862
|
this.logger.error(`Kein ${exportEntry.objectType} mit dem Namen ${exportObject.name} gefunden.`);
|
|
3301
3863
|
continue;
|
|
@@ -3480,205 +4042,165 @@ class ConverterI7 {
|
|
|
3480
4042
|
powerTransformerEnd.powerTransformer = powerTransformer;
|
|
3481
4043
|
powerTransformer.addPowerTransformerEnd(powerTransformerEnd);
|
|
3482
4044
|
}
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
const
|
|
3492
|
-
const
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
const lowerVoltageStepIncrement = Math.abs(i7Data[`umin_s${transformerEnd.endNumber}`]) / lowerVoltageStepCount * -1;
|
|
3497
|
-
let increaseVoltageStepIncrement = Math.abs(i7Data[`umax_s${transformerEnd.endNumber}`]) / lowerVoltageStepCount;
|
|
3498
|
-
increaseVoltageStepIncrement = isNaN(increaseVoltageStepIncrement) ? 1 : increaseVoltageStepIncrement;
|
|
3499
|
-
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(utils_1.generateUUID(), `${transformerEnd.name} W${transformerEnd.endNumber}`);
|
|
3500
|
-
for (let i = 0; i < lowerVoltageStepCount; i++) {
|
|
3501
|
-
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, i + 1, 1 + (lowerVoltageStepIncrement * (lowerVoltageStepCount - i)));
|
|
3502
|
-
}
|
|
3503
|
-
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, lowerVoltageStepCount + 1, 1);
|
|
3504
|
-
for (let i = 0; i < increaseVoltageStepCount; i++) {
|
|
3505
|
-
const step = (lowerVoltageStepCount + 1) + (i + 1);
|
|
3506
|
-
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, step, 1 + (increaseVoltageStepIncrement * (i + 1)));
|
|
3507
|
-
}
|
|
3508
|
-
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger(utils_1.generateUUID(), `${transformerEnd.name} W${transformerEnd.endNumber}`);
|
|
3509
|
-
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
3510
|
-
ratioTapChanger.tculControlMode = TransformerControlMode_1.TransformerControlMode.volt;
|
|
3511
|
-
ratioTapChanger.ltcFlag = false;
|
|
3512
|
-
ratioTapChanger.lowStep = 1;
|
|
3513
|
-
ratioTapChanger.highStep = ratioTapChangerTable.ratioTapChangerTablePoints.length;
|
|
3514
|
-
ratioTapChanger.neutralStep = i7TapArray.indexOf(neutralStep) + 1;
|
|
3515
|
-
ratioTapChanger.normalStep = ratioTapChanger.neutralStep;
|
|
3516
|
-
ratioTapChanger.step = mappedCurrentStep;
|
|
3517
|
-
ratioTapChanger.transformerEnd = transformerEnd;
|
|
3518
|
-
transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
3519
|
-
ratioTapChanger.neutralU = neutralU;
|
|
3520
|
-
ratioTapChanger.ratioTapChangerTableUUID = ratioTapChangerTable.mrid;
|
|
3521
|
-
ratioTapChangerTable.ratioTapChanger = ratioTapChanger;
|
|
3522
|
-
const regelung = +i7Data[`regelung_s${transformerEnd.endNumber}`];
|
|
3523
|
-
if (regelung > 0) {
|
|
3524
|
-
const tapChangerControl = new TapChangerControl_1.TapChangerControl(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
3525
|
-
tapChangerControl.discrete = true;
|
|
3526
|
-
const umax = utils_2.getSpannungsband('umax', spannungsband, neutralU);
|
|
3527
|
-
const umin = utils_2.getSpannungsband('umin', spannungsband, neutralU);
|
|
3528
|
-
const usoll = utils_2.getSpannungsband('usoll', spannungsband, (umax + umin) / 2);
|
|
3529
|
-
const pVorgabe = utils_2.isNumericI7(i7Data[`p_vorgabe`]) ? +i7Data[`p_vorgabe`] : undefined;
|
|
3530
|
-
switch (regelung) {
|
|
3531
|
-
case 1: {
|
|
3532
|
-
ratioTapChanger.controlEnabled = true;
|
|
3533
|
-
tapChangerControl.enabled = true;
|
|
3534
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
3535
|
-
tapChangerControl.targetValue = usoll;
|
|
3536
|
-
tapChangerControl.targetDeadband = umax - usoll;
|
|
3537
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
3538
|
-
break;
|
|
3539
|
-
}
|
|
3540
|
-
case 2: {
|
|
3541
|
-
ratioTapChanger.controlEnabled = true;
|
|
3542
|
-
tapChangerControl.enabled = true;
|
|
3543
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.activePower;
|
|
3544
|
-
tapChangerControl.targetValue = pVorgabe;
|
|
3545
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3546
|
-
break;
|
|
3547
|
-
}
|
|
3548
|
-
case 3: {
|
|
3549
|
-
ratioTapChanger.controlEnabled = true;
|
|
3550
|
-
tapChangerControl.enabled = true;
|
|
3551
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.currentFlow;
|
|
3552
|
-
break;
|
|
3553
|
-
}
|
|
3554
|
-
case 4: {
|
|
3555
|
-
ratioTapChanger.controlEnabled = true;
|
|
3556
|
-
tapChangerControl.enabled = true;
|
|
3557
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.reactivePower;
|
|
3558
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3559
|
-
break;
|
|
3560
|
-
}
|
|
3561
|
-
}
|
|
3562
|
-
ratioTapChanger.tapChangerControl = tapChangerControl;
|
|
3563
|
-
tapChangerControl.addTapChanger(ratioTapChanger);
|
|
3564
|
-
cimModel.addTapChangerControl(tapChangerControl);
|
|
4045
|
+
convertTapChangers(i7Data, transformerEnds, cimModel, connectivityNode, spannungsband) {
|
|
4046
|
+
for (let tapChangerNumber = 1; tapChangerNumber <= 2; tapChangerNumber++) {
|
|
4047
|
+
const gestufteSeite = i7Data[`gestufte_seite_s${tapChangerNumber}`] === 0 ? 1 : i7Data[`gestufte_seite_s${tapChangerNumber}`];
|
|
4048
|
+
const transformerEnd = transformerEnds.find(elem => elem.endNumber === gestufteSeite);
|
|
4049
|
+
if (!transformerEnd) {
|
|
4050
|
+
this.logger.error(`Trafo ${i7Data.id}: Zum Stufenschalter ${gestufteSeite} keine Wicklung gefunden.`);
|
|
4051
|
+
continue;
|
|
4052
|
+
}
|
|
4053
|
+
const angle = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${tapChangerNumber}`]);
|
|
4054
|
+
const neutralU = transformerEnd.ratedU;
|
|
4055
|
+
let tapChanger;
|
|
4056
|
+
if (isFinite(angle) && angle !== 0) {
|
|
4057
|
+
tapChanger = this.createPhaseTapChanger(i7Data, transformerEnds, cimModel, tapChangerNumber);
|
|
3565
4058
|
}
|
|
3566
4059
|
else {
|
|
3567
|
-
|
|
4060
|
+
tapChanger = this.createRatioTapChanger(i7Data, transformerEnd, cimModel, connectivityNode, tapChangerNumber, spannungsband);
|
|
3568
4061
|
}
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
4062
|
+
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber);
|
|
4063
|
+
tapChanger.transformerEnd = transformerEnd;
|
|
4064
|
+
tapChanger.neutralU = neutralU;
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber) {
|
|
4068
|
+
let lowStep = i7Data[`minstufe_s${tapChangerNumber}`];
|
|
4069
|
+
let highStep = i7Data[`maxstufe_s${tapChangerNumber}`];
|
|
4070
|
+
let neutralStep = i7Data[`mittelstufe_s${tapChangerNumber}`];
|
|
4071
|
+
let currentStep = i7Data[`aktstufe_s${tapChangerNumber}`];
|
|
4072
|
+
const i7TapArray = utils_2.getTapChangerStepArray(lowStep, highStep);
|
|
4073
|
+
const tapStepCount = i7TapArray.length;
|
|
4074
|
+
const neutralStepIndex = i7TapArray.indexOf(neutralStep);
|
|
4075
|
+
const lowerVoltageStepCount = utils_2.getTapChangerStepCount(lowStep, neutralStep);
|
|
4076
|
+
const increaseVoltageStepCount = utils_2.getTapChangerStepCount(neutralStep, highStep);
|
|
4077
|
+
const lowerVoltageStepIncrement = Math.abs(i7Data[`umin_s${tapChangerNumber}`]) / lowerVoltageStepCount * -1;
|
|
4078
|
+
let increaseVoltageStepIncrement = Math.abs(i7Data[`umax_s${tapChangerNumber}`]) / increaseVoltageStepCount;
|
|
4079
|
+
increaseVoltageStepIncrement = isNaN(increaseVoltageStepIncrement) ? 1 : increaseVoltageStepIncrement;
|
|
4080
|
+
if (tapChanger instanceof RatioTapChanger_1.RatioTapChanger) {
|
|
4081
|
+
const ratioTapChanger = tapChanger;
|
|
4082
|
+
if (Math.abs(lowerVoltageStepIncrement) !== Math.abs(increaseVoltageStepIncrement)) {
|
|
4083
|
+
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(utils_1.generateUUID(), `${i7Data.bezeichner} W_${tapChangerNumber}`);
|
|
4084
|
+
for (let i = 0; i < lowerVoltageStepCount; i++) {
|
|
4085
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, i + 1, (lowerVoltageStepIncrement * (lowerVoltageStepCount - i)));
|
|
3579
4086
|
}
|
|
4087
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, lowerVoltageStepCount + 1, 1);
|
|
4088
|
+
for (let i = 0; i < increaseVoltageStepCount; i++) {
|
|
4089
|
+
const step = (lowerVoltageStepCount + 1) + (i + 1);
|
|
4090
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, step, (increaseVoltageStepIncrement * (i + 1)));
|
|
4091
|
+
}
|
|
4092
|
+
lowStep = 1;
|
|
4093
|
+
highStep = ratioTapChangerTable.ratioTapChangerTablePoints.length;
|
|
4094
|
+
neutralStep = i7TapArray.indexOf(neutralStep) + 1;
|
|
4095
|
+
currentStep = neutralStep;
|
|
4096
|
+
tapChanger.ratioTapChangerTable = ratioTapChangerTable;
|
|
4097
|
+
ratioTapChangerTable.ratioTapChanger = tapChanger;
|
|
4098
|
+
ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(lowerVoltageStepIncrement)) + Math.abs(Math.round(increaseVoltageStepIncrement)) / 2;
|
|
4099
|
+
cimModel.addRatioTapChangerTable(ratioTapChangerTable);
|
|
3580
4100
|
}
|
|
3581
|
-
|
|
3582
|
-
|
|
4101
|
+
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
4102
|
+
}
|
|
4103
|
+
if (tapChanger instanceof PhaseTapChangerNonLinear_1.PhaseTapChangerNonLinear)
|
|
4104
|
+
tapChanger.voltageStepIncrement = increaseVoltageStepIncrement;
|
|
4105
|
+
tapChanger.lowStep = lowStep;
|
|
4106
|
+
tapChanger.highStep = highStep;
|
|
4107
|
+
tapChanger.neutralStep = neutralStep;
|
|
4108
|
+
tapChanger.normalStep = neutralStep;
|
|
4109
|
+
tapChanger.step = currentStep;
|
|
4110
|
+
if (Math.abs(lowerVoltageStepIncrement) !== Math.abs(increaseVoltageStepIncrement)) {
|
|
4111
|
+
this.logger.error(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${lowerVoltageStepIncrement} MAX ${increaseVoltageStepIncrement}. Das Attribut voltageStepIncrement i.H.v ${increaseVoltageStepIncrement} könnte inkorrekt sein.`);
|
|
3583
4112
|
}
|
|
3584
4113
|
}
|
|
3585
|
-
|
|
4114
|
+
createRatioTapChanger(i7Data, transformerEnd, cimModel, regulatingConnectivityNode, tapChangerNumber, spannungsband) {
|
|
3586
4115
|
var _a, _b;
|
|
3587
|
-
const
|
|
3588
|
-
const
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
const pVorgabe = utils_2.isNumericI7(i7Data[`p_vorgabe`]) ? +i7Data[`p_vorgabe`] : undefined;
|
|
3630
|
-
switch (regelung) {
|
|
3631
|
-
case 1: {
|
|
3632
|
-
phaseTapChanger.controlEnabled = true;
|
|
3633
|
-
tapChangerControl.enabled = true;
|
|
3634
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
3635
|
-
tapChangerControl.targetValue = usoll;
|
|
3636
|
-
tapChangerControl.targetDeadband = umax - usoll;
|
|
3637
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
3638
|
-
break;
|
|
3639
|
-
}
|
|
3640
|
-
case 2: {
|
|
3641
|
-
phaseTapChanger.controlEnabled = true;
|
|
3642
|
-
tapChangerControl.enabled = true;
|
|
3643
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.activePower;
|
|
3644
|
-
tapChangerControl.targetValue = pVorgabe;
|
|
3645
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3646
|
-
break;
|
|
3647
|
-
}
|
|
3648
|
-
case 3: {
|
|
3649
|
-
phaseTapChanger.controlEnabled = true;
|
|
3650
|
-
tapChangerControl.enabled = true;
|
|
3651
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.currentFlow;
|
|
3652
|
-
break;
|
|
3653
|
-
}
|
|
3654
|
-
case 4: {
|
|
3655
|
-
phaseTapChanger.controlEnabled = true;
|
|
3656
|
-
tapChangerControl.enabled = true;
|
|
3657
|
-
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.reactivePower;
|
|
3658
|
-
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3659
|
-
break;
|
|
3660
|
-
}
|
|
3661
|
-
}
|
|
3662
|
-
phaseTapChanger.tapChangerControl = tapChangerControl;
|
|
3663
|
-
tapChangerControl.addTapChanger(phaseTapChanger);
|
|
3664
|
-
cimModel.addTapChangerControl(tapChangerControl);
|
|
3665
|
-
}
|
|
3666
|
-
else {
|
|
3667
|
-
phaseTapChanger.controlEnabled = false;
|
|
4116
|
+
const gestufteSeite = i7Data[`gestufte_seite_s${tapChangerNumber}`] === 0 ? 1 : i7Data[`gestufte_seite_s${tapChangerNumber}`];
|
|
4117
|
+
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4118
|
+
ratioTapChanger.ltcFlag = false;
|
|
4119
|
+
ratioTapChanger.transformerEnd = transformerEnd;
|
|
4120
|
+
transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
4121
|
+
ratioTapChanger.neutralU = transformerEnd.ratedU;
|
|
4122
|
+
ratioTapChanger.tculControlMode = TransformerControlMode_1.TransformerControlMode.volt;
|
|
4123
|
+
const regelung = +i7Data[`regelung_s${gestufteSeite}`];
|
|
4124
|
+
const regulatingTerminal = ((_a = regulatingConnectivityNode === null || regulatingConnectivityNode === void 0 ? void 0 : regulatingConnectivityNode.terminals) === null || _a === void 0 ? void 0 : _a.size) ? [...(_b = regulatingConnectivityNode === null || regulatingConnectivityNode === void 0 ? void 0 : regulatingConnectivityNode.terminals) === null || _b === void 0 ? void 0 : _b.values()].find(elem => elem.connected) : undefined;
|
|
4125
|
+
if (isFinite(spannungsband === null || spannungsband === void 0 ? void 0 : spannungsband.usoll) && regulatingTerminal) {
|
|
4126
|
+
const tapChangerControl = new TapChangerControl_1.TapChangerControl(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4127
|
+
tapChangerControl.discrete = true;
|
|
4128
|
+
const regulatingControlEnabled = regelung === 0 ? false : true;
|
|
4129
|
+
tapChangerControl.enabled = regulatingControlEnabled;
|
|
4130
|
+
ratioTapChanger.controlEnabled = regulatingControlEnabled;
|
|
4131
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
4132
|
+
tapChangerControl.targetValue = spannungsband.usoll;
|
|
4133
|
+
tapChangerControl.targetDeadband = spannungsband.umax - spannungsband.usoll;
|
|
4134
|
+
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
4135
|
+
ratioTapChanger.tapChangerControl = tapChangerControl;
|
|
4136
|
+
this.setTapChangerControl(ratioTapChanger, regulatingTerminal);
|
|
4137
|
+
tapChangerControl.addTapChanger(ratioTapChanger);
|
|
4138
|
+
cimModel.addTapChangerControl(tapChangerControl);
|
|
4139
|
+
}
|
|
4140
|
+
else {
|
|
4141
|
+
this.logger.error(`Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
4142
|
+
}
|
|
4143
|
+
cimModel.addRatioTapChanger(ratioTapChanger);
|
|
4144
|
+
return ratioTapChanger;
|
|
4145
|
+
}
|
|
4146
|
+
createPhaseTapChanger(i7Data, transformerEnds, cimModel, tapChangerNumber) {
|
|
4147
|
+
const gestufteSeite = i7Data[`gestufte_seite_s${tapChangerNumber}`] === 0 ? 1 : i7Data[`gestufte_seite_s${tapChangerNumber}`];
|
|
4148
|
+
const transformerEnd = transformerEnds.find(elem => elem.endNumber === gestufteSeite);
|
|
4149
|
+
const is3WTransformer = transformerEnds.length > 2 ? true : false;
|
|
4150
|
+
let phaseTapChanger;
|
|
4151
|
+
const spezialregelung = i7Data.trafo_spezial ? i7Data.trafo_spezial : (is3WTransformer ? 2 : undefined);
|
|
4152
|
+
switch (spezialregelung) {
|
|
4153
|
+
case (1): {
|
|
4154
|
+
const phaseTapChangerSync = new PhaseTapChangerSymmetrical_1.PhaseTapChangerSymmetrical(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4155
|
+
phaseTapChanger = phaseTapChangerSync;
|
|
4156
|
+
cimModel.addPhaseTapChangerSymmetrical(phaseTapChangerSync);
|
|
4157
|
+
break;
|
|
3668
4158
|
}
|
|
3669
|
-
|
|
3670
|
-
const
|
|
3671
|
-
|
|
3672
|
-
|
|
4159
|
+
case (2): {
|
|
4160
|
+
const phaseTapChangerAsync = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4161
|
+
phaseTapChangerAsync.windingConnectionAngle = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${tapChangerNumber}`]);
|
|
4162
|
+
phaseTapChanger = phaseTapChangerAsync;
|
|
4163
|
+
cimModel.addPhaseTapChangerAsymmetrical(phaseTapChangerAsync);
|
|
4164
|
+
break;
|
|
3673
4165
|
}
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
4166
|
+
default: {
|
|
4167
|
+
const phaseTapChangerAsync = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4168
|
+
phaseTapChangerAsync.windingConnectionAngle = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${tapChangerNumber}`]);
|
|
4169
|
+
phaseTapChanger = phaseTapChangerAsync;
|
|
4170
|
+
cimModel.addPhaseTapChangerAsymmetrical(phaseTapChangerAsync);
|
|
4171
|
+
break;
|
|
3680
4172
|
}
|
|
3681
4173
|
}
|
|
4174
|
+
phaseTapChanger.ltcFlag = false;
|
|
4175
|
+
transformerEnd.phaseTapChanger = phaseTapChanger;
|
|
4176
|
+
const pRegulationFromNode = i7Data.von_a_nr;
|
|
4177
|
+
const pRegulationToNode = i7Data.nach_a_nr;
|
|
4178
|
+
const regulatingTransformerEnd = transformerEnds.find(elem => elem.endNumber === pRegulationToNode);
|
|
4179
|
+
let pVorgabe = utils_2.isNumericI7(i7Data[`p_vorgabe`]) ? +i7Data[`p_vorgabe`] : undefined;
|
|
4180
|
+
if (is3WTransformer && tapChangerNumber > 1) {
|
|
4181
|
+
pVorgabe = utils_2.isNumericI7(i7Data[`p_vorgabe_2`]) ? +i7Data[`p_vorgabe_2`] : undefined;
|
|
4182
|
+
}
|
|
4183
|
+
if (isFinite(pVorgabe) && regulatingTransformerEnd) {
|
|
4184
|
+
const regulatingTerminal = regulatingTransformerEnd === null || regulatingTransformerEnd === void 0 ? void 0 : regulatingTransformerEnd.terminal;
|
|
4185
|
+
const regelung = +i7Data[`regelung_s${tapChangerNumber}`];
|
|
4186
|
+
const tapChangerControl = new TapChangerControl_1.TapChangerControl(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
4187
|
+
tapChangerControl.discrete = true;
|
|
4188
|
+
const regulatingControlEnabled = regelung === 0 ? false : true;
|
|
4189
|
+
tapChangerControl.enabled = regulatingControlEnabled;
|
|
4190
|
+
phaseTapChanger.controlEnabled = regulatingControlEnabled;
|
|
4191
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.activePower;
|
|
4192
|
+
tapChangerControl.targetValue = pVorgabe;
|
|
4193
|
+
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
4194
|
+
phaseTapChanger.tapChangerControl = tapChangerControl;
|
|
4195
|
+
phaseTapChanger.transformerEnd = transformerEnd;
|
|
4196
|
+
this.setTapChangerControl(phaseTapChanger, regulatingTerminal);
|
|
4197
|
+
tapChangerControl.addTapChanger(phaseTapChanger);
|
|
4198
|
+
cimModel.addTapChangerControl(tapChangerControl);
|
|
4199
|
+
}
|
|
4200
|
+
else {
|
|
4201
|
+
this.logger.error(`Trafo ${i7Data.id}: Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
4202
|
+
}
|
|
4203
|
+
return phaseTapChanger;
|
|
3682
4204
|
}
|
|
3683
4205
|
setTapChangerControl(tapChanger, terminal) {
|
|
3684
4206
|
if ((tapChanger === null || tapChanger === void 0 ? void 0 : tapChanger.tapChangerControl) && terminal) {
|
|
@@ -3700,10 +4222,10 @@ class ConverterI7 {
|
|
|
3700
4222
|
let terminal;
|
|
3701
4223
|
if (!((_a = powerTransformerEnd.terminal) === null || _a === void 0 ? void 0 : _a.connectivityNode) && this.UUID2Integral7ID.has((_b = powerTransformerEnd.terminal) === null || _b === void 0 ? void 0 : _b.connectivityNodeUUID)) {
|
|
3702
4224
|
const i7ObjectID = (_d = this.UUID2Integral7ID.get((_c = powerTransformerEnd.terminal) === null || _c === void 0 ? void 0 : _c.connectivityNodeUUID)) === null || _d === void 0 ? void 0 : _d.find(elem => elem);
|
|
3703
|
-
terminal = this.createBoundaryConnection(frame, junction, i7ObjectID, PhaseCode_1.PhaseCode.ABC
|
|
4225
|
+
terminal = this.createBoundaryConnection(frame, junction, i7ObjectID, PhaseCode_1.PhaseCode.ABC);
|
|
3704
4226
|
}
|
|
3705
4227
|
else {
|
|
3706
|
-
terminal = this.createConnection(cimModel, junction, (_e = powerTransformerEnd.terminal) === null || _e === void 0 ? void 0 : _e.connectivityNode, PhaseCode_1.PhaseCode.ABC, true
|
|
4228
|
+
terminal = this.createConnection(cimModel, junction, (_e = powerTransformerEnd.terminal) === null || _e === void 0 ? void 0 : _e.connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
3707
4229
|
}
|
|
3708
4230
|
if (terminal) {
|
|
3709
4231
|
terminal.name = 't_stp_trafo';
|
|
@@ -3748,13 +4270,13 @@ class ConverterI7 {
|
|
|
3748
4270
|
}
|
|
3749
4271
|
queryTrafosAnschlussIDs() {
|
|
3750
4272
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3751
|
-
let results = this.isTableAvailable(integral_sql_1.Integral7TableNames.TRAFO2W) ? yield this.mysqlController.execQuery(`SELECT DISTINCT aknoten, eknoten
|
|
4273
|
+
let results = this.isTableAvailable(integral_sql_1.Integral7TableNames.TRAFO2W) ? yield this.mysqlController.execQuery(`SELECT DISTINCT aknoten, eknoten
|
|
3752
4274
|
FROM ${integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRAFO2W]}`) : [];
|
|
3753
4275
|
for (const result of results) {
|
|
3754
4276
|
this.trafo2wAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
3755
4277
|
this.trafo2wAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
3756
4278
|
}
|
|
3757
|
-
results = this.isTableAvailable(integral_sql_1.Integral7TableNames.TRAFO3_WICKLUNG) ? yield this.mysqlController.execQuery(`SELECT DISTINCT aknoten, eknoten
|
|
4279
|
+
results = this.isTableAvailable(integral_sql_1.Integral7TableNames.TRAFO3_WICKLUNG) ? yield this.mysqlController.execQuery(`SELECT DISTINCT aknoten, eknoten
|
|
3758
4280
|
FROM ${integral_sql_1.Integral7TableNames[integral_sql_1.I7Objects.TRAFO3_WICKLUNG]}`) : [];
|
|
3759
4281
|
for (const result of results) {
|
|
3760
4282
|
this.trafo3wAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
@@ -3853,6 +4375,15 @@ class ConverterI7 {
|
|
|
3853
4375
|
integral7.lKondensatorAnschlussKnotenIDs.push(i7ID);
|
|
3854
4376
|
}
|
|
3855
4377
|
}
|
|
4378
|
+
filterTablesByAvailability(relevantTables) {
|
|
4379
|
+
let filteredRelevantTables = [];
|
|
4380
|
+
for (const relevantTable of relevantTables) {
|
|
4381
|
+
if (this.isTableAvailable(relevantTable)) {
|
|
4382
|
+
filteredRelevantTables.push(relevantTable);
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
return filteredRelevantTables;
|
|
4386
|
+
}
|
|
3856
4387
|
isTableAvailable(tableName) {
|
|
3857
4388
|
return this.availableTableNames.indexOf(tableName) > -1 ? true : false;
|
|
3858
4389
|
}
|
|
@@ -3885,15 +4416,15 @@ class ConverterI7 {
|
|
|
3885
4416
|
connectivityNode.toEndNameTso = tsoName;
|
|
3886
4417
|
}
|
|
3887
4418
|
else {
|
|
3888
|
-
this.logger.error(`Grenzknoten ${connectivityNode.name} mit der UUID ${connectivityNode.mrid} ist bereits belegt:
|
|
3889
|
-
fromEndName ${connectivityNode.fromEndName}
|
|
3890
|
-
fromEndIsoCode ${connectivityNode.fromEndIsoCode}
|
|
3891
|
-
fromEndNameTso ${connectivityNode.fromEndNameTso}
|
|
3892
|
-
toEndName ${connectivityNode.toEndName}
|
|
3893
|
-
toEndIsoCode ${connectivityNode.toEndIsoCode}
|
|
3894
|
-
toEndNameTso ${connectivityNode.toEndNameTso}
|
|
3895
|
-
name ${name}
|
|
3896
|
-
isoCode ${isoCode}
|
|
4419
|
+
this.logger.error(`Grenzknoten ${connectivityNode.name} mit der UUID ${connectivityNode.mrid} ist bereits belegt:
|
|
4420
|
+
fromEndName ${connectivityNode.fromEndName}
|
|
4421
|
+
fromEndIsoCode ${connectivityNode.fromEndIsoCode}
|
|
4422
|
+
fromEndNameTso ${connectivityNode.fromEndNameTso}
|
|
4423
|
+
toEndName ${connectivityNode.toEndName}
|
|
4424
|
+
toEndIsoCode ${connectivityNode.toEndIsoCode}
|
|
4425
|
+
toEndNameTso ${connectivityNode.toEndNameTso}
|
|
4426
|
+
name ${name}
|
|
4427
|
+
isoCode ${isoCode}
|
|
3897
4428
|
tsoName ${tsoName}`);
|
|
3898
4429
|
}
|
|
3899
4430
|
}
|