@enervance/insight-cim-model 0.0.159 → 0.0.161
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/converter/PSDM/ConverterPowerSystemDataModel.js +3 -3
- package/dist/converter/PSDM/ConverterPowerSystemDataModel.js.map +1 -1
- package/dist/converter/cgmes-validator.d.ts +3 -3
- package/dist/converter/cgmes-validator.js.map +1 -1
- package/dist/converter/integral7/config/integral-prefix.d.ts +2 -0
- package/dist/converter/integral7/config/integral-prefix.js +3 -1
- package/dist/converter/integral7/config/integral-prefix.js.map +1 -1
- package/dist/converter/integral7/converter.integral7.d.ts +36 -41
- package/dist/converter/integral7/converter.integral7.js +1015 -792
- package/dist/converter/integral7/converter.integral7.js.map +1 -1
- package/dist/converter/integral7/dl-convert/data-manager.js +7 -2
- package/dist/converter/integral7/dl-convert/data-manager.js.map +1 -1
- package/dist/converter/integral7/dl-convert/db/database.interface.types.d.ts +229 -0
- package/dist/converter/integral7/dl-convert/dl-converter-i7-2.d.ts +103 -2
- package/dist/converter/integral7/dl-convert/dl-converter-i7-2.js +1603 -121
- package/dist/converter/integral7/dl-convert/dl-converter-i7-2.js.map +1 -1
- package/dist/converter/integral7/dl-convert/dl-converter-i7.d.ts +1 -1
- package/dist/converter/integral7/dl-convert/dl-converter-i7.js.map +1 -1
- package/dist/converter/integral7/dl-convert/dl-graphs/cim-model-graph.d.ts +9 -2
- package/dist/converter/integral7/dl-convert/dl-graphs/cim-model-graph.js +19 -7
- package/dist/converter/integral7/dl-convert/dl-graphs/cim-model-graph.js.map +1 -1
- package/dist/converter/integral7/dl-convert/dl-graphs/convert-graph-keys.d.ts +105 -5
- package/dist/converter/integral7/dl-convert/dl-graphs/convert-graph-keys.js +68 -2
- package/dist/converter/integral7/dl-convert/dl-graphs/convert-graph-keys.js.map +1 -1
- package/dist/converter/integral7/dl-convert/dl-graphs/db-object-graph.d.ts +1 -1
- package/dist/converter/integral7/dl-convert/dl-graphs/db-object-graph.js +45 -25
- package/dist/converter/integral7/dl-convert/dl-graphs/db-object-graph.js.map +1 -1
- package/dist/converter/integral7/dl-convert/executor.d.ts +1 -0
- package/dist/converter/integral7/dl-convert/executor.js +230 -112
- package/dist/converter/integral7/dl-convert/executor.js.map +1 -1
- package/dist/converter/integral7/interface-i7/data-structures-i7.d.ts +3 -3
- package/dist/converter/integral7/interface-i7/{IDefaultValuesConfig.d.ts → default-values-config.interface.d.ts} +4 -1
- package/dist/converter/integral7/interface-i7/{IIntegral7ConverterConfig.js → default-values-config.interface.js} +1 -1
- package/dist/converter/integral7/interface-i7/default-values-config.interface.js.map +1 -0
- package/dist/converter/integral7/interface-i7/export-frame-i7.d.ts +5 -5
- package/dist/converter/integral7/interface-i7/export-frame-i7.js +7 -1
- package/dist/converter/integral7/interface-i7/export-frame-i7.js.map +1 -1
- package/dist/converter/integral7/interface-i7/integral7-converter-config.interface.d.ts +3 -0
- package/dist/converter/integral7/{model/integral/Hgueleitung.js → interface-i7/integral7-converter-config.interface.js} +1 -1
- package/dist/converter/integral7/interface-i7/integral7-converter-config.interface.js.map +1 -0
- package/dist/converter/integral7/interface-i7/{IObjectMappingConfig.d.ts → object-mapping-config.interface.d.ts} +1 -1
- package/dist/converter/integral7/interface-i7/{IObjectMappingConfig.js → object-mapping-config.interface.js} +1 -1
- package/dist/converter/integral7/interface-i7/object-mapping-config.interface.js.map +1 -0
- package/dist/converter/integral7/interface-i7/uuid-config.interface.d.ts +5 -0
- package/dist/converter/integral7/interface-i7/{IDefaultValuesConfig.js → uuid-config.interface.js} +1 -1
- package/dist/converter/integral7/interface-i7/uuid-config.interface.js.map +1 -0
- package/dist/converter/integral7/model/dl-utils/util-functions.d.ts +0 -6
- package/dist/converter/integral7/model/dl-utils/util-functions.js +4 -40
- package/dist/converter/integral7/model/dl-utils/util-functions.js.map +1 -1
- package/dist/converter/integral7/model/integral/HgueleitungImpl.d.ts +24 -0
- package/dist/converter/integral7/model/integral/HgueleitungImpl.js +7 -0
- package/dist/converter/integral7/model/integral/HgueleitungImpl.js.map +1 -0
- package/dist/converter/integral7/model/integral/Leitung.d.ts +1 -0
- package/dist/converter/integral7/model/integral/Leitung.js +1 -0
- package/dist/converter/integral7/model/integral/Leitung.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +94 -31
- package/dist/converter/integral7/model/interfaces.js.map +1 -1
- package/dist/converter/integral7/sql/integral.sql.d.ts +4 -1
- package/dist/converter/integral7/sql/integral.sql.js +21 -15
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/util-asset.model.d.ts +2 -1
- package/dist/converter/integral7/util-asset.model.js +3 -2
- package/dist/converter/integral7/util-asset.model.js.map +1 -1
- package/dist/converter/integral7/utils-cgmes-export.d.ts +10 -10
- package/dist/converter/integral7/utils-cgmes-export.js +3 -0
- package/dist/converter/integral7/utils-cgmes-export.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +17 -3
- package/dist/converter/integral7/utils.js +189 -18
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl/etl-neplan/etl-neplan.js +15 -8
- package/dist/etl/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -3
- package/dist/model/assetinfo/WireInfo.d.ts +1 -0
- package/dist/model/assetinfo/WireInfo.js.map +1 -1
- package/dist/model/common/PositionPoint.js +3 -18
- package/dist/model/common/PositionPoint.js.map +1 -1
- package/dist/model/core/ACDCTerminal.d.ts +2 -2
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/BaseVoltage.d.ts +2 -2
- package/dist/model/core/BaseVoltage.js.map +1 -1
- package/dist/model/core/ConnectivityNode.d.ts +2 -2
- package/dist/model/core/ConnectivityNode.js.map +1 -1
- package/dist/model/core/Equipment.d.ts +2 -2
- package/dist/model/core/Equipment.js.map +1 -1
- package/dist/model/core/IdentifiedObject.d.ts +3 -3
- package/dist/model/core/IdentifiedObject.js +9 -3
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +2 -2
- package/dist/model/core/Terminal.js +2 -2
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +2 -2
- package/dist/model/dc/ACDCConverter.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js +1 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.d.ts +2 -2
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCConverterUnit.d.ts +3 -2
- package/dist/model/dc/DCConverterUnit.js +3 -0
- package/dist/model/dc/DCConverterUnit.js.map +1 -1
- package/dist/model/dc/DCLine.js +17 -17
- package/dist/model/dc/DCLineSegment.js +25 -25
- package/dist/model/dc/DCTerminal.js +1 -0
- package/dist/model/dc/DCTerminal.js.map +1 -1
- package/dist/model/dc/VsConverter.d.ts +2 -2
- package/dist/model/dc/VsConverter.js.map +1 -1
- package/dist/model/diagram/Diagram.js +2 -0
- package/dist/model/diagram/Diagram.js.map +1 -1
- package/dist/model/dynamics/standard-models/synchronous-machine-dynamics/DynamicsFunctionBlock.d.ts +2 -2
- package/dist/model/dynamics/standard-models/synchronous-machine-dynamics/DynamicsFunctionBlock.js.map +1 -1
- package/dist/model/dynamics/standard-models/synchronous-machine-dynamics/SynchronousMachineTimeConstantReactance.d.ts +2 -2
- package/dist/model/dynamics/standard-models/synchronous-machine-dynamics/SynchronousMachineTimeConstantReactance.js.map +1 -1
- package/dist/model/equivalents/EquivalentBranch.d.ts +2 -2
- package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
- package/dist/model/equivalents/EquivalentInjection.d.ts +2 -2
- package/dist/model/equivalents/EquivalentInjection.js.map +1 -1
- package/dist/model/extensions/amprion/core/AMPRIONLine.d.ts +2 -2
- package/dist/model/extensions/amprion/core/AMPRIONLine.js.map +1 -1
- package/dist/model/extensions/amprion/equivalents/INTEGRALEquivalentBranch.js +2 -9
- package/dist/model/extensions/amprion/equivalents/INTEGRALEquivalentBranch.js.map +1 -1
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.d.ts +1 -0
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js +3 -0
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.d.ts +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js +6 -3
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.d.ts +1 -0
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js +7 -1
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js.map +1 -1
- package/dist/model/generation/GeneratingUnit.d.ts +2 -2
- package/dist/model/generation/GeneratingUnit.js.map +1 -1
- package/dist/model/loadmodel/ConformLoad.d.ts +2 -2
- package/dist/model/loadmodel/ConformLoad.js +33 -33
- package/dist/model/loadmodel/ConformLoad.js.map +1 -1
- package/dist/model/loadmodel/ConformLoadGroup.js +22 -22
- package/dist/model/loadmodel/LoadArea.js +21 -21
- package/dist/model/loadmodel/SubLoadArea.js +22 -22
- package/dist/model/operationallimits/ApparentPowerLimit.d.ts +15 -0
- package/dist/model/operationallimits/ApparentPowerLimit.js +56 -0
- package/dist/model/operationallimits/ApparentPowerLimit.js.map +1 -0
- package/dist/model/operationallimits/CurrentLimit.d.ts +2 -2
- package/dist/model/operationallimits/CurrentLimit.js.map +1 -1
- package/dist/model/operations/ControlArea.d.ts +1 -0
- package/dist/model/operations/ControlArea.js +6 -2
- package/dist/model/operations/ControlArea.js.map +1 -1
- package/dist/model/statevariables/SvPowerFlow.d.ts +2 -2
- package/dist/model/statevariables/SvPowerFlow.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +2 -2
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +2 -2
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/Breaker.js +1 -1
- package/dist/model/wires/Breaker.js.map +1 -1
- package/dist/model/wires/Conductor.d.ts +2 -2
- package/dist/model/wires/Conductor.js.map +1 -1
- package/dist/model/wires/Disconnector.js +1 -1
- package/dist/model/wires/Disconnector.js.map +1 -1
- package/dist/model/wires/EnergyConsumer.d.ts +2 -2
- package/dist/model/wires/EnergyConsumer.js.map +1 -1
- package/dist/model/wires/EnergySource.d.ts +2 -2
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.d.ts +2 -2
- package/dist/model/wires/ExternalNetworkInjection.js +4 -4
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/GroundingImpedance.d.ts +2 -2
- package/dist/model/wires/GroundingImpedance.js.map +1 -1
- package/dist/model/wires/LinearShuntCompensator.d.ts +2 -2
- package/dist/model/wires/LinearShuntCompensator.js.map +1 -1
- package/dist/model/wires/PetersenCoil.d.ts +2 -2
- package/dist/model/wires/PetersenCoil.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerAsymmetrical.d.ts +2 -2
- package/dist/model/wires/PhaseTapChangerAsymmetrical.js +1 -1
- package/dist/model/wires/PhaseTapChangerAsymmetrical.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerLinear.d.ts +2 -2
- package/dist/model/wires/PhaseTapChangerLinear.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerNonLinear.d.ts +2 -2
- package/dist/model/wires/PhaseTapChangerNonLinear.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerSymmetrical.js +1 -1
- package/dist/model/wires/PhaseTapChangerSymmetrical.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerTable.d.ts +3 -3
- package/dist/model/wires/PhaseTapChangerTable.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerTablePoint.d.ts +3 -3
- package/dist/model/wires/PhaseTapChangerTablePoint.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.d.ts +2 -2
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.d.ts +2 -2
- package/dist/model/wires/RatioTapChanger.js.map +1 -1
- package/dist/model/wires/RatioTapChangerTable.d.ts +3 -3
- package/dist/model/wires/RatioTapChangerTable.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.d.ts +2 -2
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/model/wires/RegulatingControl.d.ts +2 -2
- package/dist/model/wires/RegulatingControl.js.map +1 -1
- package/dist/model/wires/RotatingMachine.d.ts +3 -3
- package/dist/model/wires/RotatingMachine.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +2 -2
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/model/wires/ShuntCompensator.d.ts +2 -2
- package/dist/model/wires/ShuntCompensator.js.map +1 -1
- package/dist/model/wires/StaticVarCompensator.d.ts +2 -2
- package/dist/model/wires/StaticVarCompensator.js.map +1 -1
- package/dist/model/wires/SynchronousMachine.d.ts +2 -2
- package/dist/model/wires/SynchronousMachine.js.map +1 -1
- package/dist/model/wires/TapChanger.d.ts +2 -2
- package/dist/model/wires/TapChanger.js.map +1 -1
- package/dist/model/wires/TapChangerTablePoint.d.ts +3 -3
- package/dist/model/wires/TapChangerTablePoint.js +6 -18
- package/dist/model/wires/TapChangerTablePoint.js.map +1 -1
- package/dist/model/wires/TransformerEnd.d.ts +2 -2
- package/dist/model/wires/TransformerEnd.js.map +1 -1
- package/dist/model-container/model/ModelContainer.d.ts +7 -3
- package/dist/model-container/model/ModelContainer.js +13 -1
- package/dist/model-container/model/ModelContainer.js.map +1 -1
- package/dist/util/collection/util-graph2tree.d.ts +1 -0
- package/dist/util/collection/util-graph2tree.js +65 -2
- package/dist/util/collection/util-graph2tree.js.map +1 -1
- package/dist/util/util-create.d.ts +3 -2
- package/dist/util/util-create.js +34 -21
- package/dist/util/util-create.js.map +1 -1
- package/dist/util/util-test.js +0 -109
- package/dist/util/util-test.js.map +1 -1
- package/dist/util/utils.d.ts +3 -2
- package/dist/util/utils.js +5 -4
- package/dist/util/utils.js.map +1 -1
- package/dist/util/xml/xml.serializer.d.ts +2 -2
- package/dist/util/xml/xml.serializer.js.map +1 -1
- package/dist/utils2/common.utils.d.ts +2 -0
- package/dist/utils2/common.utils.js +7 -0
- package/dist/utils2/common.utils.js.map +1 -1
- package/dist/utils2/parser.utils.d.ts +1 -1
- package/dist/utils2/parser.utils.js +41 -20
- package/dist/utils2/parser.utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/converter/integral7/ConverterIntegral7.d.ts +0 -0
- package/dist/converter/integral7/ConverterIntegral7.js +0 -1
- package/dist/converter/integral7/ConverterIntegral7.js.map +0 -1
- package/dist/converter/integral7/interface-i7/IDefaultValuesConfig.js.map +0 -1
- package/dist/converter/integral7/interface-i7/IIntegral7ConverterConfig.d.ts +0 -3
- package/dist/converter/integral7/interface-i7/IIntegral7ConverterConfig.js.map +0 -1
- package/dist/converter/integral7/interface-i7/IObjectMappingConfig.js.map +0 -1
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +0 -12
- package/dist/converter/integral7/model/integral/Hgueleitung.js.map +0 -1
- package/dist/converter/integral7/model/integral/Kopfstation.d.ts +0 -44
- package/dist/converter/integral7/model/integral/Kopfstation.js +0 -10
- package/dist/converter/integral7/model/integral/Kopfstation.js.map +0 -1
- package/dist/model/model/Model.d.ts +0 -0
- package/dist/model/model/Model.js +0 -1
- package/dist/model/model/Model.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getGeoCoordinates = exports.ConverterIntegral7 = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const JSZip = require("jszip");
|
|
@@ -21,6 +21,7 @@ const SubGeographicalRegion_1 = require("../../model/core/SubGeographicalRegion.
|
|
|
21
21
|
const Substation_1 = require("../../model/core/Substation.js");
|
|
22
22
|
const Terminal_1 = require("../../model/core/Terminal.js");
|
|
23
23
|
const VoltageLevel_1 = require("../../model/core/VoltageLevel.js");
|
|
24
|
+
const ACDCConverter_1 = require("../../model/dc/ACDCConverter.js");
|
|
24
25
|
const ACDCConverterDCTerminal_1 = require("../../model/dc/ACDCConverterDCTerminal.js");
|
|
25
26
|
const CsConverter_1 = require("../../model/dc/CsConverter.js");
|
|
26
27
|
const CsOperatingModeKind_1 = require("../../model/dc/CsOperatingModeKind.js");
|
|
@@ -65,7 +66,6 @@ const LimitTypeKind_1 = require("../../model/operationallimits/LimitTypeKind.js"
|
|
|
65
66
|
const OperationalLimitDirectionKind_1 = require("../../model/operationallimits/OperationalLimitDirectionKind.js");
|
|
66
67
|
const OperationalLimitSet_1 = require("../../model/operationallimits/OperationalLimitSet.js");
|
|
67
68
|
const OperationalLimitType_1 = require("../../model/operationallimits/OperationalLimitType.js");
|
|
68
|
-
const VoltageLimit_1 = require("../../model/operationallimits/VoltageLimit.js");
|
|
69
69
|
const ControlArea_1 = require("../../model/operations/ControlArea.js");
|
|
70
70
|
const Breaker_1 = require("../../model/wires/Breaker.js");
|
|
71
71
|
const BusbarSection_1 = require("../../model/wires/BusbarSection.js");
|
|
@@ -86,7 +86,6 @@ const PowerTransformerEnd_1 = require("../../model/wires/PowerTransformerEnd.js"
|
|
|
86
86
|
const RatioTapChanger_1 = require("../../model/wires/RatioTapChanger.js");
|
|
87
87
|
const RatioTapChangerTable_1 = require("../../model/wires/RatioTapChangerTable.js");
|
|
88
88
|
const ReactiveCapabilityCurve_1 = require("../../model/wires/ReactiveCapabilityCurve.js");
|
|
89
|
-
const RegulatingControl_1 = require("../../model/wires/RegulatingControl.js");
|
|
90
89
|
const RegulatingControlModeKind_1 = require("../../model/wires/RegulatingControlModeKind.js");
|
|
91
90
|
const StaticVarCompensator_1 = require("../../model/wires/StaticVarCompensator.js");
|
|
92
91
|
const SynchronousMachineKind_1 = require("../../model/wires/SynchronousMachineKind.js");
|
|
@@ -128,13 +127,18 @@ const INTEGRALEquivalentBranch_1 = require("../../model/extensions/amprion/equiv
|
|
|
128
127
|
const PhaseTapChangerLinear_1 = require("../../model/wires/PhaseTapChangerLinear.js");
|
|
129
128
|
const DCConverterUnit_1 = require("../../model/extensions/integral/dc/DCConverterUnit.js");
|
|
130
129
|
const DCPolarityKind_1 = require("../../model/dc/DCPolarityKind.js");
|
|
130
|
+
const RotatingMachine_1 = require("../../model/wires/RotatingMachine.js");
|
|
131
|
+
const SynchronousMachine_1 = require("../../model/wires/SynchronousMachine.js");
|
|
132
|
+
const AsynchronousMachine_1 = require("../../model/wires/AsynchronousMachine.js");
|
|
133
|
+
const ControlAreaTypeKind_1 = require("../../model/operations/ControlAreaTypeKind.js");
|
|
134
|
+
const CsPpccControlKind_1 = require("../../model/dc/CsPpccControlKind.js");
|
|
135
|
+
const ApparentPowerLimit_1 = require("../../model/operationallimits/ApparentPowerLimit.js");
|
|
131
136
|
const executor_1 = require("./dl-convert/executor.js");
|
|
132
137
|
const Diagram_1 = require("../../model/diagram/Diagram.js");
|
|
133
138
|
const DiagramObject_1 = require("../../model/diagram/DiagramObject.js");
|
|
134
139
|
const util_asset_model_1 = require("./util-asset.model.js");
|
|
135
140
|
const cim_constants_1 = require("../../constants/cim-constants.js");
|
|
136
141
|
const EVWireObject_1 = require("../../model/extensions/enervance/assets/EVWireObject.js");
|
|
137
|
-
const SynchronousMachine_1 = require("../../model/wires/SynchronousMachine.js");
|
|
138
142
|
class ConverterIntegral7 {
|
|
139
143
|
constructor() {
|
|
140
144
|
/** Exportnetze gemäß Konfiguration */
|
|
@@ -176,10 +180,11 @@ class ConverterIntegral7 {
|
|
|
176
180
|
* @param energyTypesConfig Mapping von I7-Multiplikationsfaktoren auf CIM Klassen
|
|
177
181
|
* @param tempDirPath temporäres Verzeichnis zum Speichern der Zwischenergebnisse
|
|
178
182
|
* @return ein Promise mit Statusangabe */
|
|
179
|
-
convert(objectMappingConfig, defaultValuesConfig, energyTypesConfig, exportConfig, energySourceTypeMappingConfig, tempDirPath) {
|
|
183
|
+
convert(objectMappingConfig, defaultValuesConfig, energyTypesConfig, exportConfig, energySourceTypeMappingConfig, configUuid, tempDirPath) {
|
|
180
184
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
181
185
|
this.objectMappingConfig = objectMappingConfig;
|
|
182
186
|
this.defaultValuesConfig = defaultValuesConfig;
|
|
187
|
+
this.configUuid = configUuid;
|
|
183
188
|
try {
|
|
184
189
|
yield this.createColumnIndex();
|
|
185
190
|
yield this.configExportFrames(exportConfig, defaultValuesConfig, tempDirPath);
|
|
@@ -289,18 +294,22 @@ class ConverterIntegral7 {
|
|
|
289
294
|
startTime = perf_hooks.performance.now();
|
|
290
295
|
/** Standort -> Substation */
|
|
291
296
|
yield this.convertStandorte(cimModel, integral7Modell, subGeoRegionsI7IDs, defaultValuesConfig);
|
|
292
|
-
logExecutionTime(this.logger, startTime, `convertStandorte(${
|
|
297
|
+
logExecutionTime(this.logger, startTime, `convertStandorte(${integral7Modell.integralStandorte.size})`);
|
|
293
298
|
startTime = perf_hooks.performance.now();
|
|
294
299
|
const standortIDs = [...integral7Modell.integralStandorte.keys()];
|
|
300
|
+
/** Regelzone -> ControlArea */
|
|
301
|
+
/**if (standortIDs.length) await this.convertRegelzone(cimModel, defaultValuesConfig, standortIDs);
|
|
302
|
+
logExecutionTime(this.logger, startTime, `convertRegelzone(${cimModel.controlArea.size})`);*/
|
|
303
|
+
/** Schaltanlagen -> VoltageLevel */
|
|
295
304
|
if (standortIDs.length)
|
|
296
305
|
yield this.convertSchaltanlagen(cimModel, integral7Modell, standortIDs, defaultValuesConfig);
|
|
297
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${
|
|
306
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${integral7Modell.integralSchaltanlagen.size})`);
|
|
298
307
|
startTime = perf_hooks.performance.now();
|
|
299
308
|
const schaltanlagenIDs = [...integral7Modell.integralSchaltanlagen.keys()];
|
|
300
309
|
/** Schaltanlagenabschnitte -> mappen auf bereits erstelltes VoltageLevel-Objekt (Schaltanlage) */
|
|
301
310
|
if (schaltanlagenIDs.length)
|
|
302
311
|
yield this.convertSchaltanlagenAbschnitte(cimModel, integral7Modell, schaltanlagenIDs);
|
|
303
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${
|
|
312
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${integral7Modell.integralSchaltanlagenAbschnitte.size})`);
|
|
304
313
|
/** Schaltfelder -> Bay */
|
|
305
314
|
startTime = perf_hooks.performance.now();
|
|
306
315
|
const schaltanlagenAbschnittIDs = [...integral7Modell.integralSchaltanlagenAbschnitte.keys()];
|
|
@@ -417,34 +426,34 @@ class ConverterIntegral7 {
|
|
|
417
426
|
yield this.convertAsynchronmotor(cimModel, soSfKnoten, defaultValuesConfig);
|
|
418
427
|
logExecutionTime(this.logger, startTime, `convertAsynchronmotor`);
|
|
419
428
|
}
|
|
420
|
-
/** Einspeisungen -> EnergySources */
|
|
429
|
+
/** Einspeisungen -> EnergySources or EquivalentInjection or ExternalNetworkInjection */
|
|
421
430
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
422
|
-
startTime =
|
|
423
|
-
yield this.convertEinspeisungen(cimModel, soSfKnoten, objectMappingConfig
|
|
431
|
+
startTime = performance.now();
|
|
432
|
+
yield this.convertEinspeisungen(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig);
|
|
424
433
|
logExecutionTime(this.logger, startTime, `convertEinspeisungen`);
|
|
425
434
|
}
|
|
426
435
|
/** Generatoren -> SynchronousMachine */
|
|
427
436
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
428
|
-
startTime =
|
|
429
|
-
|
|
437
|
+
startTime = performance.now();
|
|
438
|
+
yield this.convertGeneratoren(cimModel, integral7Modell.targetVoltages, soSfKnoten, energyTypesConfig);
|
|
430
439
|
logExecutionTime(this.logger, startTime, `convertGeneratoren`);
|
|
431
440
|
}
|
|
432
441
|
/** KWBlöcke -> SynchronousMachine */
|
|
433
442
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
434
443
|
startTime = perf_hooks.performance.now();
|
|
435
|
-
|
|
444
|
+
yield this.convertKraftwerksbloecke(cimModel, integral7Modell.targetVoltages, soSfKnoten, energyTypesConfig);
|
|
436
445
|
logExecutionTime(this.logger, startTime, `convertKraftwerksbloecke`);
|
|
437
446
|
}
|
|
438
447
|
/** Ersatzquerzweige -> ExternalNetworkInjection */
|
|
439
448
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
440
|
-
startTime =
|
|
441
|
-
yield this.convertErsatzQuerZweige(cimModel, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
449
|
+
startTime = performance.now();
|
|
450
|
+
yield this.convertErsatzQuerZweige(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
442
451
|
logExecutionTime(this.logger, startTime, `convertErsatzQuerZweige`);
|
|
443
452
|
}
|
|
444
453
|
/** Randnetzeinspeisungen -> ExternalNetworkInjection */
|
|
445
454
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
446
|
-
startTime =
|
|
447
|
-
yield this.convertBoundaryInjections(cimModel, soSfKnoten, objectMappingConfig.Randnetzeinspeisung.class);
|
|
455
|
+
startTime = performance.now();
|
|
456
|
+
yield this.convertBoundaryInjections(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig.Randnetzeinspeisung.class);
|
|
448
457
|
logExecutionTime(this.logger, startTime, `convertBoundaryInjections`);
|
|
449
458
|
}
|
|
450
459
|
/** Kompensationsdrossel -> LinearShuntCompensator */
|
|
@@ -477,16 +486,16 @@ class ConverterIntegral7 {
|
|
|
477
486
|
/** Sonderfall mit Trafo
|
|
478
487
|
* Trafos müssen zuertst konvertiert werden. */
|
|
479
488
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
480
|
-
startTime =
|
|
481
|
-
yield this.convertStatcom(cimModel, soSfKnoten);
|
|
489
|
+
startTime = performance.now();
|
|
490
|
+
yield this.convertStatcom(cimModel, integral7Modell.targetVoltages, soSfKnoten);
|
|
482
491
|
logExecutionTime(this.logger, startTime, `convertStatcom`);
|
|
483
492
|
}
|
|
484
493
|
/** SVC -> StaticVarCompensator */
|
|
485
494
|
/** Sonderfall mit Trafo
|
|
486
495
|
* Trafos müssen zuertst konvertiert werden.*/
|
|
487
496
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
488
|
-
startTime =
|
|
489
|
-
yield this.convertSVC(cimModel, soSfKnoten);
|
|
497
|
+
startTime = performance.now();
|
|
498
|
+
yield this.convertSVC(cimModel, integral7Modell.targetVoltages, soSfKnoten);
|
|
490
499
|
logExecutionTime(this.logger, startTime, `convertSVC`);
|
|
491
500
|
}
|
|
492
501
|
/** HGÜ Knoten */
|
|
@@ -497,13 +506,13 @@ class ConverterIntegral7 {
|
|
|
497
506
|
/** HGÜ Kopfklassisch */
|
|
498
507
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
499
508
|
startTime = perf_hooks.performance.now();
|
|
500
|
-
|
|
509
|
+
yield this.convertCsConverterDC(cimModel, integral7Modell, soSfKnoten);
|
|
501
510
|
logExecutionTime(this.logger, startTime, `convertCsConverterDC`);
|
|
502
511
|
}
|
|
503
512
|
/** netz_hguekopfvsc */
|
|
504
513
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
505
514
|
startTime = perf_hooks.performance.now();
|
|
506
|
-
|
|
515
|
+
yield this.convertVsConverterDC(cimModel, integral7Modell.targetVoltages, integral7Modell, soSfKnoten);
|
|
507
516
|
logExecutionTime(this.logger, startTime, `convertVsConverterDC`);
|
|
508
517
|
}
|
|
509
518
|
/** HGÜ-Leitungen -> (DCLine, DCLineSegment)*/
|
|
@@ -532,15 +541,29 @@ class ConverterIntegral7 {
|
|
|
532
541
|
// netzSchaltanlageIDs.forEach(netzSchaltanlageID => frame.integral7Modell.integralStandorte.set(netzSchaltanlageID, undefined));
|
|
533
542
|
// netzSaabschnittIDs.forEach(netzSaabschnittID => frame.integral7Modell.integralSchaltanlagenAbschnitte.set(netzSaabschnittID, undefined));
|
|
534
543
|
// netzSchaltfeldIDs.forEach(netzSchaltfeldID => frame.integral7Modell.integralSchaltfelder.set(netzSchaltfeldID, undefined));
|
|
535
|
-
const
|
|
544
|
+
const netz_standortIds = standortIDs.map(standortId => {
|
|
545
|
+
return { id: standortId };
|
|
546
|
+
});
|
|
547
|
+
const netz_knotensoIds = knotenSoIDs.map(knotenSoId => {
|
|
548
|
+
return { id: knotenSoId };
|
|
549
|
+
});
|
|
550
|
+
for (const entry of this.exportFramesBoundary.entries()) {
|
|
551
|
+
entry[1].integral7Modell.integralStandorte.forEach((_, key) => {
|
|
552
|
+
netz_standortIds.push({ id: key });
|
|
553
|
+
});
|
|
554
|
+
entry[1].integral7Modell.integralKnotenSo.forEach((_, key) => {
|
|
555
|
+
netz_knotensoIds.push({ id: key });
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
const netzLeitungIds = [...integral7Modell.integralLeitungen.keys()];
|
|
559
|
+
const netzHgueLeitungIds = [...integral7Modell.integralHgueLeitungIds.values()];
|
|
560
|
+
const netzErsatzlaengszweigIds = [...integral7Modell.integalErsatzLaengszweigIds.values()];
|
|
561
|
+
const netzStreckenlastIds = [...integral7Modell.integralLeitungen.values()].map(leitung => leitung.streckenlastId).filter(id => id !== undefined && id !== null);
|
|
562
|
+
const allLeitungIds = [...new Set([...netzLeitungIds, ...netzHgueLeitungIds, ...netzErsatzlaengszweigIds, ...netzStreckenlastIds]).values()];
|
|
536
563
|
const convertOptions = {
|
|
537
564
|
only: {
|
|
538
|
-
netz_standortIds
|
|
539
|
-
|
|
540
|
-
}),
|
|
541
|
-
netz_knotensoIds: knotenSoIDs.map(knotenSoId => {
|
|
542
|
-
return { id: knotenSoId };
|
|
543
|
-
}),
|
|
565
|
+
netz_standortIds,
|
|
566
|
+
netz_knotensoIds,
|
|
544
567
|
netz_schaltanlagenIds: schaltanlagenIDs.map(schaltanlagenId => {
|
|
545
568
|
return { id: schaltanlagenId };
|
|
546
569
|
}),
|
|
@@ -550,7 +573,7 @@ class ConverterIntegral7 {
|
|
|
550
573
|
netz_schaltfeldIds: schaltfeldIDs.map(schaltfeldId => {
|
|
551
574
|
return { id: schaltfeldId };
|
|
552
575
|
}),
|
|
553
|
-
netz_leitungIds:
|
|
576
|
+
netz_leitungIds: allLeitungIds.map(leitungId => {
|
|
554
577
|
return { id: leitungId };
|
|
555
578
|
})
|
|
556
579
|
}
|
|
@@ -564,7 +587,8 @@ class ConverterIntegral7 {
|
|
|
564
587
|
frame.cimModel.addDiagramObject(resultingObject);
|
|
565
588
|
}
|
|
566
589
|
}
|
|
567
|
-
console.log('
|
|
590
|
+
console.log('c7666206-429d-478d-bd9e-9f1440598d99');
|
|
591
|
+
console.log('752bcf18-68fc-4df0-9913-e843a982b997');
|
|
568
592
|
// this.dlConverterI7.prepare(this.mysqlController, this.logger);
|
|
569
593
|
//
|
|
570
594
|
// const powerTransformers = cimModel.powerTransformer;
|
|
@@ -615,7 +639,7 @@ class ConverterIntegral7 {
|
|
|
615
639
|
}
|
|
616
640
|
}
|
|
617
641
|
else {
|
|
618
|
-
|
|
642
|
+
this.logger.debug(`debug --- DCTerminal ${terminalUUID} hat kein angeschlossenes DCConductingEquipment`);
|
|
619
643
|
}
|
|
620
644
|
}
|
|
621
645
|
}
|
|
@@ -635,7 +659,7 @@ class ConverterIntegral7 {
|
|
|
635
659
|
}
|
|
636
660
|
}
|
|
637
661
|
else {
|
|
638
|
-
|
|
662
|
+
this.logger.debug(`debug --- Terminal ${terminalUUID} hat kein angeschlossenes ConductingEquipment`);
|
|
639
663
|
}
|
|
640
664
|
}
|
|
641
665
|
}
|
|
@@ -655,7 +679,7 @@ class ConverterIntegral7 {
|
|
|
655
679
|
}
|
|
656
680
|
}
|
|
657
681
|
else {
|
|
658
|
-
|
|
682
|
+
this.logger.debug(`debug --- ACDCConverterDCTerminal ${terminalUUID} hat kein angeschlossenes DCConductingEquipment`);
|
|
659
683
|
}
|
|
660
684
|
}
|
|
661
685
|
}
|
|
@@ -689,19 +713,22 @@ class ConverterIntegral7 {
|
|
|
689
713
|
}));
|
|
690
714
|
});
|
|
691
715
|
}
|
|
692
|
-
convertRegelzone(cimModel, defaultValuesConfig) {
|
|
716
|
+
convertRegelzone(cimModel, defaultValuesConfig, standortIDs) {
|
|
693
717
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
694
718
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.REGELZONE)) {
|
|
695
|
-
const
|
|
696
|
-
|
|
719
|
+
//const resultNg: Regelzone[] = await this.mysqlController.execQuery(getNetzQuery(I7Objects.NETZGRUPPE, 0, 0, standortIDs));
|
|
720
|
+
const resultRz = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.REGELZONE, 0, 0, []));
|
|
721
|
+
for (const i7Data of resultRz) {
|
|
697
722
|
const i7Schluessel = integral_prefix_1.REGELZONE_PRAEFIX + (0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
698
|
-
const ctrlarea = new ControlArea_1.ControlArea((0, parser_utils_1.getUUID)(i7Data.guid
|
|
723
|
+
const ctrlarea = new ControlArea_1.ControlArea((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner), '_RZ']), (0, utils_2.ueberpruefeZeichenkette)(i7Data.kurzname), i7Schluessel);
|
|
724
|
+
ctrlarea.type = ControlAreaTypeKind_1.ControlAreaTypeKind.agc;
|
|
725
|
+
ctrlarea.netInterchange = 0;
|
|
699
726
|
cimModel.addControlArea(ctrlarea);
|
|
700
727
|
this.addIdMapping(i7Data.id, ctrlarea.mrid, integral_sql_1.Integral7TableNames.REGELZONE);
|
|
701
728
|
}
|
|
702
729
|
}
|
|
703
730
|
else {
|
|
704
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.REGELZONE} ist nicht vorhanden.`);
|
|
731
|
+
this.logger.debug(`debug --- Tabelle ${integral_sql_1.Integral7TableNames.REGELZONE} ist nicht vorhanden.`);
|
|
705
732
|
}
|
|
706
733
|
});
|
|
707
734
|
}
|
|
@@ -718,7 +745,7 @@ class ConverterIntegral7 {
|
|
|
718
745
|
const regionUUID = this.integralID2UUID.get(i7Data.georegion);
|
|
719
746
|
let region = regions.find(elem => elem.mrid === regionUUID);
|
|
720
747
|
if (!region) {
|
|
721
|
-
region = (0, utils_1.createIfNotExitsGeoregionByName)(this.cimModelDefault, (0, util_create_1.createNotation)([defaultValuesConfig.GeographicalRegion.name, '_GR']));
|
|
748
|
+
region = (0, utils_1.createIfNotExitsGeoregionByName)(this.cimModelDefault, (0, util_create_1.createNotation)([defaultValuesConfig.GeographicalRegion.name, '_GR']), this.configUuid);
|
|
722
749
|
this.logger.debug(`SubGeographicalRegion UUID ${subregion.mrid} I7-ID ${i7Data.id} Name ${i7Data.bezeichner} hat keine Region.`);
|
|
723
750
|
}
|
|
724
751
|
subregion.region = region;
|
|
@@ -748,10 +775,14 @@ class ConverterIntegral7 {
|
|
|
748
775
|
for (const i7Data of result) {
|
|
749
776
|
const i7name = (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', (0, utils_2.ueberpruefeZeichenkette)(i7Data.ukz), '_S'], 32);
|
|
750
777
|
const substation = new AMPRIONSubstation_1.AMPRIONSubstation((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), i7name, i7Data.kurzname, i7Data.kommentar, i7Data.stationsnummer, i7Data.ukz);
|
|
778
|
+
const i7Schluessel = integral_prefix_1.STANDORT_PRAEFIX +
|
|
779
|
+
i7Data.ukz +
|
|
780
|
+
integral_prefix_1.MITTIGER_PUNKT +
|
|
781
|
+
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
751
782
|
let subregion = cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
752
783
|
if (!subregion) {
|
|
753
|
-
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
754
|
-
subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region);
|
|
784
|
+
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name, this.configUuid);
|
|
785
|
+
subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region, this.configUuid);
|
|
755
786
|
}
|
|
756
787
|
substation.subGeographicalRegion = subregion;
|
|
757
788
|
subregion.addSubstation(substation);
|
|
@@ -760,11 +791,11 @@ class ConverterIntegral7 {
|
|
|
760
791
|
if ((coor === null || coor === void 0 ? void 0 : coor.length) === 2) {
|
|
761
792
|
const coordinateSystem = cimModel.getCoordinateSystemByName(this.coordinateSystem);
|
|
762
793
|
// Location
|
|
763
|
-
const location = new Location_1.Location(common_utils_1.CommonUtils.
|
|
794
|
+
const location = new Location_1.Location(common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Location, this.configUuid, substation.getUUID()), `Location of ${substation.name}`);
|
|
764
795
|
location.addPowerSystemResource(substation);
|
|
765
796
|
substation.location = location;
|
|
766
797
|
location.coordinateSystem = coordinateSystem;
|
|
767
|
-
const positionPoint = new PositionPoint_1.PositionPoint(common_utils_1.CommonUtils.
|
|
798
|
+
const positionPoint = new PositionPoint_1.PositionPoint(common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.PositionPoint, this.configUuid, location.getUUID()));
|
|
768
799
|
/** Lan Länge */
|
|
769
800
|
positionPoint.xPosition = coor[0];
|
|
770
801
|
/** Lat Breite */
|
|
@@ -804,12 +835,12 @@ class ConverterIntegral7 {
|
|
|
804
835
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
805
836
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
806
837
|
const vl = new VoltageLevel_1.VoltageLevel((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', i7Data.un.toString(), '_VL']), i7Data.kurzname, i7Schluessel);
|
|
807
|
-
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, vl, cim_constants_1.CimAssetAliasNames.VoltageLevel);
|
|
838
|
+
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, vl, cim_constants_1.CimAssetAliasNames.VoltageLevel, this.configUuid);
|
|
808
839
|
if (i7Data.baujahr) {
|
|
809
840
|
util_asset_model_1.UtilAssetModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
810
841
|
}
|
|
811
842
|
const un = (0, utils_2.getU)(i7Data.un);
|
|
812
|
-
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.exportFramesBoundary);
|
|
843
|
+
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.configUuid, this.exportFramesBoundary);
|
|
813
844
|
vl.baseVoltage = baseVoltage;
|
|
814
845
|
cimModel.addVoltageLevel(vl);
|
|
815
846
|
this.addIdMapping(i7Data.id, vl.mrid, integral_sql_1.Integral7TableNames.SCHALTANLAGE);
|
|
@@ -893,8 +924,10 @@ class ConverterIntegral7 {
|
|
|
893
924
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KNOTEN_SO, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KNOTEN_SO), standortIDs));
|
|
894
925
|
for (const i7Data of result) {
|
|
895
926
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
896
|
-
const
|
|
897
|
-
const
|
|
927
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
928
|
+
// const vl = new VoltageLevel(getUUID(i7Data.guid_v, this.objectMappingConfig.standardiseUuid), createNotation([getName(i7Data), i7Data.un.toString(), '_VL']), i7Data.kurzname);
|
|
929
|
+
const vl = new VoltageLevel_1.VoltageLevel(common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.VoltageLevel, this.configUuid, rdfid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), i7Data.un.toString(), '_VL']), i7Data.kurzname);
|
|
930
|
+
//const rdfid = getUUID(i7Data.guid); /**This is the mrid for TopologicalNode */
|
|
898
931
|
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', rdfid.substring(0, 8), '_CN']), i7Data.kurzname, i7Data.kommentar);
|
|
899
932
|
connectivityNode.setConnectivityNodeContainer(vl);
|
|
900
933
|
vl.addConnectivityNode(connectivityNode);
|
|
@@ -903,7 +936,7 @@ class ConverterIntegral7 {
|
|
|
903
936
|
connectivityNode.boundaryPoint = true;
|
|
904
937
|
}
|
|
905
938
|
const un = (0, utils_2.getU)(i7Data.un);
|
|
906
|
-
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.exportFramesBoundary);
|
|
939
|
+
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.configUuid, this.exportFramesBoundary);
|
|
907
940
|
/** Spannungsband */
|
|
908
941
|
integral7.targetVoltages.set(i7Data.id, { usoll: i7Data.usoll, umin: i7Data.umin, umax: i7Data.umax });
|
|
909
942
|
// TODO VoltageLimits?
|
|
@@ -923,7 +956,7 @@ class ConverterIntegral7 {
|
|
|
923
956
|
this.logger.debug(`KnotenSo ${i7Data.id} ${vl.mrid} besitzt keine Substation.`);
|
|
924
957
|
}
|
|
925
958
|
//PSRType
|
|
926
|
-
const psrType = (0, utils_2.getPSRType)(cimModel, 'Abzweigmast');
|
|
959
|
+
const psrType = (0, utils_2.getPSRType)(cimModel, 'Abzweigmast', this.configUuid);
|
|
927
960
|
vl.psrTypeUUID = psrType === null || psrType === void 0 ? void 0 : psrType.mrid;
|
|
928
961
|
// psrType.addPowerSystemResource(vl);
|
|
929
962
|
const object = new KnotenSo_1.KnotenSoImpl(i7Data);
|
|
@@ -946,8 +979,8 @@ class ConverterIntegral7 {
|
|
|
946
979
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KNOTEN)) {
|
|
947
980
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KNOTEN, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KNOTEN), standortIDs));
|
|
948
981
|
for (const i7Data of result) {
|
|
949
|
-
const
|
|
950
|
-
const dcNode = new DCNode_1.DCNode(
|
|
982
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
983
|
+
const dcNode = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), i7Data.kurzname);
|
|
951
984
|
cimModel.addDCNode(dcNode);
|
|
952
985
|
this.addIdMapping(i7Data.id, dcNode.mrid, integral_sql_1.Integral7TableNames.HGUE_KNOTEN);
|
|
953
986
|
}
|
|
@@ -967,7 +1000,8 @@ class ConverterIntegral7 {
|
|
|
967
1000
|
busbarSection.ipMax = i7Data.limit_ip;
|
|
968
1001
|
// die Sammelschienen sind nicht aggregiert.
|
|
969
1002
|
busbarSection.aggregate = false;
|
|
970
|
-
const rdfid =
|
|
1003
|
+
//const rdfid: string = getUUID(i7Data.guid); /** this is the mrid for TopologicalNode*/
|
|
1004
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
971
1005
|
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_' + i7Data.pos.toString(), '_' + rdfid.substring(0, 8), '_CN'], 32, true), i7Data.kurzname);
|
|
972
1006
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Schaltanlagenabschnitt.id));
|
|
973
1007
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
@@ -977,14 +1011,14 @@ class ConverterIntegral7 {
|
|
|
977
1011
|
connectivityNode.connectivityNodeContainer = voltageLevel;
|
|
978
1012
|
voltageLevel.addConnectivityNode(connectivityNode);
|
|
979
1013
|
// umax
|
|
980
|
-
voltageLevel.highVoltageLimit = i7Data.umax;
|
|
1014
|
+
voltageLevel.highVoltageLimit = (0, parser_utils_1.isNumericI7)(i7Data.umax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.umax) : voltageLevel.highVoltageLimit;
|
|
981
1015
|
// umin
|
|
982
|
-
voltageLevel.lowVoltageLimit = i7Data.umin;
|
|
983
|
-
const i7Schluessel = voltageLevel.
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1016
|
+
voltageLevel.lowVoltageLimit = (0, parser_utils_1.isNumericI7)(i7Data.umin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.umin) : voltageLevel.lowVoltageLimit;
|
|
1017
|
+
/**const i7Schluessel = voltageLevel.substation.name +
|
|
1018
|
+
SAMMELSCHIENENABSCHNITT_PRAEFIX +
|
|
1019
|
+
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1020
|
+
busbarSection.description = i7Schluessel;
|
|
1021
|
+
connectivityNode.description = i7Schluessel;*/
|
|
988
1022
|
/** Spannungsband */
|
|
989
1023
|
integral7.targetVoltages.set(i7Data.id, { usoll: i7Data.usoll, umin: i7Data.umin, umax: i7Data.umax });
|
|
990
1024
|
// TODO VoltageLimits?
|
|
@@ -1014,6 +1048,8 @@ class ConverterIntegral7 {
|
|
|
1014
1048
|
const result = yield this.queryDataInChuncks(integral_sql_1.I7Objects.KNOTEN_SF, schaltfeldIDs);
|
|
1015
1049
|
for (const i7Data of result) {
|
|
1016
1050
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.schaltfeld));
|
|
1051
|
+
/* const key = I7Objects.KNOTEN_SF + (bay?.getUUID() ?? '') + String(i7Data.id) + String(i7Data.schaltfeld);
|
|
1052
|
+
const uuid = CommonUtils.generateUUIDv5(ClassNames.ConnectivityNode, this.configUuid, key);*/
|
|
1017
1053
|
const connectivityNode = new ConnectivityNode_1.ConnectivityNode((0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'knotensf', `${bay.description}/${i7Data.bezeichner}`);
|
|
1018
1054
|
if (bay) {
|
|
1019
1055
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -1034,12 +1070,16 @@ class ConverterIntegral7 {
|
|
|
1034
1070
|
});
|
|
1035
1071
|
}
|
|
1036
1072
|
convertKnotenKf(cimModel, querkupplungIDs) {
|
|
1073
|
+
var _a;
|
|
1037
1074
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1038
1075
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_KF)) {
|
|
1039
1076
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KNOTEN_KF, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KNOTEN_KF), querkupplungIDs));
|
|
1040
1077
|
for (const i7Data of result) {
|
|
1041
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'knotenkf');
|
|
1042
1078
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.kpfeld));
|
|
1079
|
+
const key = integral_sql_1.I7Objects.KNOTEN_KF + ((_a = bay === null || bay === void 0 ? void 0 : bay.getUUID()) !== null && _a !== void 0 ? _a : '') + String(i7Data.id) + String(i7Data.kpfeld);
|
|
1080
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, key);
|
|
1081
|
+
// const connectivityNode = new ConnectivityNode(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid), createNotation([getName(i7Data), '_CN']), 'knotenkf');
|
|
1082
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'knotenkf');
|
|
1043
1083
|
if (bay) {
|
|
1044
1084
|
connectivityNode.connectivityNodeContainer = bay;
|
|
1045
1085
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -1057,12 +1097,16 @@ class ConverterIntegral7 {
|
|
|
1057
1097
|
});
|
|
1058
1098
|
}
|
|
1059
1099
|
convertKnotenLk(cimModel, laengskupplungIDs) {
|
|
1100
|
+
var _a;
|
|
1060
1101
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1061
1102
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_LK)) {
|
|
1062
1103
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KNOTEN_LK, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KNOTEN_LK), laengskupplungIDs));
|
|
1063
1104
|
for (const i7Data of result) {
|
|
1064
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'KnotenLk');
|
|
1065
1105
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.lkupplung));
|
|
1106
|
+
const key = integral_sql_1.I7Objects.KNOTEN_LK + ((_a = bay === null || bay === void 0 ? void 0 : bay.getUUID()) !== null && _a !== void 0 ? _a : '') + String(i7Data.id) + String(i7Data.lkupplung);
|
|
1107
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, key);
|
|
1108
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'KnotenLk');
|
|
1109
|
+
// const connectivityNode = new ConnectivityNode(CommonUtils.generateUUID(), createNotation([getName(i7Data), '_CN']), 'KnotenLk');
|
|
1066
1110
|
if (bay) {
|
|
1067
1111
|
connectivityNode.connectivityNodeContainer = bay;
|
|
1068
1112
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -1085,7 +1129,9 @@ class ConverterIntegral7 {
|
|
|
1085
1129
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SCHLAUFE)) {
|
|
1086
1130
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.SCHLAUFE, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.SCHLAUFE), knotenSoIDs));
|
|
1087
1131
|
for (const i7Data of result) {
|
|
1088
|
-
const
|
|
1132
|
+
const key = integral_sql_1.I7Objects.SCHLAUFE + String(i7Data.id);
|
|
1133
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Terminal, this.configUuid, key);
|
|
1134
|
+
const terminal = new Terminal_1.Terminal(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_Schlaufe_T']), i7Data.kurzname, i7Data.kommentar);
|
|
1089
1135
|
terminal.connected = (0, parser_utils_1.convertToBooleanI7)(i7Data.schaltzustand);
|
|
1090
1136
|
terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
1091
1137
|
this.addIdMapping(i7Data.id, terminal.mrid, integral_sql_1.Integral7TableNames.SCHLAUFE);
|
|
@@ -1125,13 +1171,19 @@ class ConverterIntegral7 {
|
|
|
1125
1171
|
cimModel.addMultiplierFactor(mf);
|
|
1126
1172
|
load.multiplierFactorUUID = mf.getUUID();
|
|
1127
1173
|
}
|
|
1174
|
+
if (load.getUUID() === '7c1d4120-fdaf-4bc1-aba1-9e8e76aa7a3b') {
|
|
1175
|
+
const stop = true;
|
|
1176
|
+
}
|
|
1128
1177
|
/** SSH */
|
|
1129
|
-
const powerData = (0, utils_2.
|
|
1178
|
+
const powerData = (0, utils_2.getActiveReactivePower2)(i7Data, mf);
|
|
1179
|
+
// const powerDatav2 = getActiveReactivePower2(i7Data, mf);
|
|
1130
1180
|
load.p = powerData[0];
|
|
1131
1181
|
load.q = powerData[1];
|
|
1132
|
-
/**
|
|
1182
|
+
/** AMPI7 profile */
|
|
1133
1183
|
load.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1134
1184
|
load.q_mf = powerData[3] ? powerData[3] : undefined;
|
|
1185
|
+
load.cos_phi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1186
|
+
load.normallyInService = inBetrieb;
|
|
1135
1187
|
//TODO
|
|
1136
1188
|
/* conformLoad.pFixed = conformLoad.p;
|
|
1137
1189
|
conformLoad.qFixed = conformLoad.q; */
|
|
@@ -1149,9 +1201,8 @@ class ConverterIntegral7 {
|
|
|
1149
1201
|
}
|
|
1150
1202
|
});
|
|
1151
1203
|
}
|
|
1152
|
-
convertEinspeisungen(cimModel, knotenSfIDs, objectMappingConfig, energySourceTypeMappingConfig) {
|
|
1204
|
+
convertEinspeisungen(cimModel, targetVoltages, knotenSfIDs, objectMappingConfig, energySourceTypeMappingConfig) {
|
|
1153
1205
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1154
|
-
const targetConfig = objectMappingConfig.Einspeisung;
|
|
1155
1206
|
const targetClass = objectMappingConfig.Einspeisung.class;
|
|
1156
1207
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.EINSPEISUNG)) {
|
|
1157
1208
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.EINSPEISUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.EINSPEISUNG), knotenSfIDs));
|
|
@@ -1161,7 +1212,7 @@ class ConverterIntegral7 {
|
|
|
1161
1212
|
break;
|
|
1162
1213
|
}
|
|
1163
1214
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1164
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1215
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1165
1216
|
break;
|
|
1166
1217
|
}
|
|
1167
1218
|
case cim_class_names_1.ClassNames.EnergySource: {
|
|
@@ -1169,17 +1220,17 @@ class ConverterIntegral7 {
|
|
|
1169
1220
|
const filtered = result.filter(it => it.spannungsgeregelt && it.einspprio === config.prio);
|
|
1170
1221
|
switch (config.class) {
|
|
1171
1222
|
case 'ExternalNetworkInjection': {
|
|
1172
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, filtered);
|
|
1223
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, filtered);
|
|
1173
1224
|
break;
|
|
1174
1225
|
}
|
|
1175
1226
|
case 'SynchronousMachine': {
|
|
1176
|
-
yield this.convertEnergySourceToSynchronousMachine(cimModel, filtered);
|
|
1227
|
+
yield this.convertEnergySourceToSynchronousMachine(cimModel, targetVoltages, filtered);
|
|
1177
1228
|
break;
|
|
1178
1229
|
}
|
|
1179
1230
|
}
|
|
1180
1231
|
}
|
|
1181
1232
|
const i7EnergySourceResults = result.filter(it => !it.spannungsgeregelt);
|
|
1182
|
-
yield this.convertEinspeisungen2EnergySource(cimModel, i7EnergySourceResults, energySourceTypeMappingConfig);
|
|
1233
|
+
yield this.convertEinspeisungen2EnergySource(cimModel, targetVoltages, i7EnergySourceResults, energySourceTypeMappingConfig);
|
|
1183
1234
|
const others = result.filter(it => !it.spannungsgeregelt && !it.einspprio);
|
|
1184
1235
|
console.log(`convertEinspeisungen nicht konvertierte Objekte ${others.length}`);
|
|
1185
1236
|
break;
|
|
@@ -1191,21 +1242,21 @@ class ConverterIntegral7 {
|
|
|
1191
1242
|
}
|
|
1192
1243
|
});
|
|
1193
1244
|
}
|
|
1194
|
-
convertErsatzQuerZweige(cimModel, knotenSfIDs, targetClass) {
|
|
1245
|
+
convertErsatzQuerZweige(cimModel, targetVoltages, knotenSfIDs, targetClass) {
|
|
1195
1246
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1196
1247
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG)) {
|
|
1197
1248
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.ERSATZQUERZWEIG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG), knotenSfIDs));
|
|
1198
1249
|
switch (targetClass) {
|
|
1199
1250
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1200
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1251
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1201
1252
|
break;
|
|
1202
1253
|
}
|
|
1203
1254
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1204
|
-
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result);
|
|
1255
|
+
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1205
1256
|
break;
|
|
1206
1257
|
}
|
|
1207
1258
|
default: {
|
|
1208
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1259
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1209
1260
|
}
|
|
1210
1261
|
}
|
|
1211
1262
|
}
|
|
@@ -1214,7 +1265,7 @@ class ConverterIntegral7 {
|
|
|
1214
1265
|
}
|
|
1215
1266
|
});
|
|
1216
1267
|
}
|
|
1217
|
-
convertGeneratoren(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1268
|
+
convertGeneratoren(cimModel, targetVoltages, knotenSfIDs, energyTypesConfig) {
|
|
1218
1269
|
var _a;
|
|
1219
1270
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1220
1271
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
@@ -1224,6 +1275,7 @@ class ConverterIntegral7 {
|
|
|
1224
1275
|
const genType = this.generatorTypen.get(i7Data.nametyp);
|
|
1225
1276
|
const synchronousMachine = new INTEGRALSynchronousMachine_1.INTEGRALSynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SM'], 32, true), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1226
1277
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1278
|
+
const cosPhi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1227
1279
|
const maxP = (0, parser_utils_1.isNumericI7)(i7Data.p_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_max) : undefined;
|
|
1228
1280
|
const minP = (0, parser_utils_1.isNumericI7)(i7Data.p_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_min) : undefined;
|
|
1229
1281
|
const mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
@@ -1234,7 +1286,9 @@ class ConverterIntegral7 {
|
|
|
1234
1286
|
const isRotatingPhaseShifter = (mf !== undefined && maxP === 0 && minP === 0) || flagCondenserOperationMode;
|
|
1235
1287
|
const isGenerator = (maxP > 0 || maxP === undefined);
|
|
1236
1288
|
const isMotor = (minP < 0 || minP === undefined);
|
|
1289
|
+
/**AMPI7 profile */
|
|
1237
1290
|
synchronousMachine.nameprimaertyp = i7Data.nameprimaertyp !== undefined ? i7Data.nameprimaertyp : (genType !== undefined ? genType.nameprimaertyp : undefined);
|
|
1291
|
+
synchronousMachine.cos_phi = cosPhi;
|
|
1238
1292
|
/** Set machine type */
|
|
1239
1293
|
if (isRotatingPhaseShifter && isGenerator && isMotor) {
|
|
1240
1294
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generatorOrCondenserOrMotor;
|
|
@@ -1303,16 +1357,24 @@ class ConverterIntegral7 {
|
|
|
1303
1357
|
}
|
|
1304
1358
|
const prio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
1305
1359
|
synchronousMachine.referencePriority = prio;
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1360
|
+
let maxQ = (0, parser_utils_1.isNumericI7)(i7Data.q_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_max) : undefined;
|
|
1361
|
+
let minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
1362
|
+
let maxQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmax) : undefined;
|
|
1363
|
+
let minQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmax) : undefined;
|
|
1364
|
+
let maxQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmin) : undefined;
|
|
1365
|
+
let minQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmin) : undefined;
|
|
1366
|
+
maxQ = maxQ ? maxQ : minQ;
|
|
1367
|
+
minQ = minQ ? minQ : maxQ;
|
|
1368
|
+
maxQvonPmax = maxQvonPmax ? maxQvonPmax : maxQvonPmin;
|
|
1369
|
+
minQvonPmax = minQvonPmax ? minQvonPmax : minQvonPmin;
|
|
1370
|
+
maxQvonPmin = maxQvonPmin ? maxQvonPmin : maxQvonPmax;
|
|
1371
|
+
minQvonPmin = minQvonPmin ? minQvonPmin : minQvonPmax;
|
|
1312
1372
|
synchronousMachine.maxQ = maxQ ? maxQ : maxQvonPmax;
|
|
1313
1373
|
synchronousMachine.minQ = minQ ? minQ : minQvonPmin;
|
|
1314
1374
|
const pType = (genType === null || genType === void 0 ? void 0 : genType.sr) * (genType === null || genType === void 0 ? void 0 : genType.cosphir);
|
|
1315
1375
|
const qType = Math.sqrt(Math.pow(genType === null || genType === void 0 ? void 0 : genType.sr, 2) - Math.pow(pType, 2));
|
|
1376
|
+
// AMP I7 Profil
|
|
1377
|
+
synchronousMachine.cos_phi = i7Data.cos_phi;
|
|
1316
1378
|
// SSH Profil
|
|
1317
1379
|
synchronousMachine.setActivePower(p * -1); //convert to load sign system
|
|
1318
1380
|
synchronousMachine.setReactivePower(q * -1); //convert to load sign system
|
|
@@ -1339,21 +1401,21 @@ class ConverterIntegral7 {
|
|
|
1339
1401
|
/** EQ-SC */
|
|
1340
1402
|
synchronousMachine.earthing = ((_a = i7Data.erdung) === null || _a === void 0 ? void 0 : _a.length) > 0 && i7Data.erdung != 'isoliert' ? true : false;
|
|
1341
1403
|
synchronousMachine.r = (0, parser_utils_1.isNumericI7)(i7Data.rg) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rg) : ((0, parser_utils_1.isNumericI7)(genType === null || genType === void 0 ? void 0 : genType.rg) ? (0, parser_utils_1.convertToNumberI7)(genType.rg) : undefined);
|
|
1342
|
-
synchronousMachine.r0 =
|
|
1404
|
+
synchronousMachine.r0 = 0;
|
|
1343
1405
|
synchronousMachine.r2 = 0;
|
|
1344
|
-
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1406
|
+
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0g) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0g) : undefined;
|
|
1345
1407
|
synchronousMachine.x2 = 0;
|
|
1346
1408
|
synchronousMachine.satDirectSubtransX = (0, parser_utils_1.isNumericI7)(i7Data.xd2s) ? (0, parser_utils_1.convertToNumberI7)(i7Data.xd2s) : ((0, parser_utils_1.isNumericI7)(genType === null || genType === void 0 ? void 0 : genType.xd2s) ? (0, parser_utils_1.convertToNumberI7)(genType.xd2s) : undefined);
|
|
1347
1409
|
// synchronousMachine.earthingStarPointR
|
|
1348
1410
|
// synchronousMachine.earthingStarPointX
|
|
1349
|
-
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1411
|
+
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.ikd) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ikd) : undefined;
|
|
1350
1412
|
// synchronousMachine.mu: number;
|
|
1351
1413
|
// synchronousMachine.satDirectSyncX: number;
|
|
1352
1414
|
// synchronousMachine.satDirectTransX: number;
|
|
1353
1415
|
// synchronousMachine.shortCircuitRotorType: ShortCircuitRotorKind;
|
|
1354
1416
|
// synchronousMachine.voltageRegulationRange: number;
|
|
1355
1417
|
/** Create ReactiveCapabilityCurves */
|
|
1356
|
-
if (minP && maxP && minQvonPmin && maxQvonPmax) {
|
|
1418
|
+
if (minP !== undefined && maxP !== undefined && minQvonPmin != undefined && maxQvonPmax !== undefined) {
|
|
1357
1419
|
const reactiveCapabilityCurve = new ReactiveCapabilityCurve_1.ReactiveCapabilityCurve((0, parser_utils_1.getUUID)(i7Data.guid_rcc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)(['CurveData', synchronousMachine.mrid, '_RCC']));
|
|
1358
1420
|
reactiveCapabilityCurve.curveStyle = CurveStyle_1.CurveStyle.straightLineYValues;
|
|
1359
1421
|
reactiveCapabilityCurve.xUnit = UnitSymbol_1.UnitSymbol.W;
|
|
@@ -1376,26 +1438,6 @@ class ConverterIntegral7 {
|
|
|
1376
1438
|
cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
1377
1439
|
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
1378
1440
|
}
|
|
1379
|
-
/** RegulatingControl */
|
|
1380
|
-
let regulatingControl = undefined;
|
|
1381
|
-
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
1382
|
-
switch (i7Data.spannungsgeregelt) {
|
|
1383
|
-
case 1: {
|
|
1384
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl((0, parser_utils_1.getUUID)(i7Data.guid_rc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)(['GEN'], 32, true));
|
|
1385
|
-
regulatingControl.targetValue = usoll !== undefined ? usoll : synchronousMachine.ratedU;
|
|
1386
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1387
|
-
regulatingControl.discrete = false;
|
|
1388
|
-
regulatingControl.enabled = true;
|
|
1389
|
-
synchronousMachine.controlEnabled = true;
|
|
1390
|
-
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
1391
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.getUUID();
|
|
1392
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
1393
|
-
break;
|
|
1394
|
-
}
|
|
1395
|
-
default: {
|
|
1396
|
-
synchronousMachine.controlEnabled = false;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
1441
|
/** GeneratingUnit section*/
|
|
1400
1442
|
let generatingUnit;
|
|
1401
1443
|
if (synchronousMachine.type !== SynchronousMachineKind_1.SynchronousMachineKind.condenser) {
|
|
@@ -1486,7 +1528,7 @@ class ConverterIntegral7 {
|
|
|
1486
1528
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1487
1529
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1488
1530
|
}
|
|
1489
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data,
|
|
1531
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages, generatingUnit);
|
|
1490
1532
|
const smtcr = new SynchronousMachineTimeConstantReactance_1.SynchronousMachineTimeConstantReactance(common_utils_1.CommonUtils.generateUUID(), `smtcr_${synchronousMachine.name}`);
|
|
1491
1533
|
smtcr.enabled = inBetrieb;
|
|
1492
1534
|
// TODO: default value?
|
|
@@ -1530,12 +1572,9 @@ class ConverterIntegral7 {
|
|
|
1530
1572
|
}
|
|
1531
1573
|
});
|
|
1532
1574
|
}
|
|
1533
|
-
convertEnergySourceToSynchronousMachine(cimModel, result) {
|
|
1575
|
+
convertEnergySourceToSynchronousMachine(cimModel, targetVoltages, result) {
|
|
1534
1576
|
for (const i7Data of result) {
|
|
1535
1577
|
try {
|
|
1536
|
-
if (i7Data.guid.toLowerCase().includes('_e11f3fe9-0b7a-4ff1-a0dc-214c4c3fd8cc')) {
|
|
1537
|
-
console.log();
|
|
1538
|
-
}
|
|
1539
1578
|
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SM'], 32, true), i7Data.kurzname);
|
|
1540
1579
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1541
1580
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
@@ -1558,28 +1597,7 @@ class ConverterIntegral7 {
|
|
|
1558
1597
|
const usoll = +i7Data.usoll;
|
|
1559
1598
|
synchronousMachine.ratedU = usoll;
|
|
1560
1599
|
synchronousMachine.aggregate = true;
|
|
1561
|
-
|
|
1562
|
-
let regulatingControl = undefined;
|
|
1563
|
-
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
1564
|
-
switch (i7Data.spannungsgeregelt) {
|
|
1565
|
-
case 1: {
|
|
1566
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)(['GEN'], 32, true));
|
|
1567
|
-
regulatingControl.targetValue = usoll !== undefined ? usoll : synchronousMachine.ratedU;
|
|
1568
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1569
|
-
regulatingControl.discrete = false;
|
|
1570
|
-
regulatingControl.enabled = true;
|
|
1571
|
-
synchronousMachine.controlEnabled = true;
|
|
1572
|
-
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
1573
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.getUUID();
|
|
1574
|
-
synchronousMachine.regulatingControl = regulatingControl;
|
|
1575
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
1576
|
-
break;
|
|
1577
|
-
}
|
|
1578
|
-
default: {
|
|
1579
|
-
synchronousMachine.controlEnabled = false;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl);
|
|
1600
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages);
|
|
1583
1601
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1584
1602
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.GENERATOR);
|
|
1585
1603
|
}
|
|
@@ -1595,41 +1613,48 @@ class ConverterIntegral7 {
|
|
|
1595
1613
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs));
|
|
1596
1614
|
for (const i7Data of result) {
|
|
1597
1615
|
const assetType = this.asynchronmotorTypen.get(i7Data.nametyp);
|
|
1598
|
-
const
|
|
1616
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : true;
|
|
1617
|
+
const sr = (0, parser_utils_1.isNumericI7)(i7Data.sr) ? i7Data.sr : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.sr) ? assetType === null || assetType === void 0 ? void 0 : assetType.sr : undefined);
|
|
1618
|
+
const wirkungsgrad = (0, parser_utils_1.isNumericI7)(i7Data.wirkungsgrad) ? i7Data.wirkungsgrad : undefined;
|
|
1619
|
+
const cosphir = (0, parser_utils_1.isNumericI7)(i7Data.cosphir) ? i7Data.cosphir : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.cosphir) ? assetType === null || assetType === void 0 ? void 0 : assetType.cosphir : undefined);
|
|
1620
|
+
//AMPI7 profile content
|
|
1621
|
+
const asynchronousMachine = new INTEGRALAsynchronousMachine_1.INTEGRALAsynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_AM']), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1599
1622
|
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1600
1623
|
if (mf) {
|
|
1601
1624
|
cimModel.addMultiplierFactor(mf);
|
|
1602
1625
|
asynchronousMachine.multiplierFactorUUID = mf.getUUID();
|
|
1603
1626
|
}
|
|
1604
|
-
asynchronousMachine.
|
|
1605
|
-
|
|
1606
|
-
asynchronousMachine.
|
|
1607
|
-
//asynchronousMachine.rxLockedRotorRatio = 0;
|
|
1608
|
-
asynchronousMachine.polePairNumber = (0, parser_utils_1.isNumericI7)(i7Data.polpaarz) ? i7Data.polpaarz : assetType === null || assetType === void 0 ? void 0 : assetType.polpaarz;
|
|
1609
|
-
asynchronousMachine.ratedMechanicalPower = (0, parser_utils_1.isNumericI7)(i7Data.p_mech) ? i7Data.p_mech : assetType === null || assetType === void 0 ? void 0 : assetType.p_mech;
|
|
1610
|
-
asynchronousMachine.ratedPowerFactor = (0, parser_utils_1.isNumericI7)(i7Data.cos_phir) ? i7Data.cos_phir : assetType === null || assetType === void 0 ? void 0 : assetType.cosphir;
|
|
1627
|
+
asynchronousMachine.normallyInService = inBetrieb;
|
|
1628
|
+
//EQ core profile content
|
|
1629
|
+
asynchronousMachine.ratedPowerFactor = cosphir;
|
|
1611
1630
|
asynchronousMachine.ratedS = (0, parser_utils_1.isNumericI7)(i7Data.sr) ? i7Data.sr : assetType === null || assetType === void 0 ? void 0 : assetType.sr;
|
|
1612
1631
|
asynchronousMachine.ratedU = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? i7Data.ur : assetType === null || assetType === void 0 ? void 0 : assetType.ur;
|
|
1632
|
+
//EQ short circuit profile content
|
|
1633
|
+
asynchronousMachine.converterFedDrive = false;
|
|
1634
|
+
asynchronousMachine.efficiency = wirkungsgrad * 100;
|
|
1635
|
+
asynchronousMachine.iaIrRatio = (0, parser_utils_1.isNumericI7)(i7Data.ilr_ir) ? i7Data.ilr_ir : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.ilr_ir) ? assetType.ilr_ir : undefined);
|
|
1636
|
+
asynchronousMachine.polePairNumber = (0, parser_utils_1.isNumericI7)(i7Data.polpaarz) ? i7Data.polpaarz : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.polpaarz) ? assetType.polpaarz : undefined);
|
|
1637
|
+
asynchronousMachine.ratedMechanicalPower = (0, parser_utils_1.isNumericI7)(i7Data.p_mech) ? i7Data.p_mech : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.p_mech) ? i7Data.p_mech : (0, utils_2.getPMech)(sr, wirkungsgrad, cosphir));
|
|
1638
|
+
asynchronousMachine.reversible = false;
|
|
1639
|
+
//SSH profile content
|
|
1613
1640
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
1614
1641
|
const p = powerData[0];
|
|
1615
1642
|
const q = powerData[1];
|
|
1616
1643
|
asynchronousMachine.setActivePower(p);
|
|
1617
1644
|
asynchronousMachine.setReactivePower(q);
|
|
1645
|
+
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind_1.AsynchronousMachineKind.motor;
|
|
1646
|
+
asynchronousMachine.controlEnabled = false;
|
|
1647
|
+
//AMPI7 profile content
|
|
1618
1648
|
asynchronousMachine.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1619
1649
|
asynchronousMachine.q_mf = powerData[3] ? powerData[3] : undefined;
|
|
1620
|
-
|
|
1621
|
-
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : true;
|
|
1622
|
-
asynchronousMachine.normallyInService = inBetrieb;
|
|
1650
|
+
//EQ core profile content
|
|
1623
1651
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1624
1652
|
if (connectivityNode) {
|
|
1625
1653
|
(0, util_create_1.createConnection)(cimModel, asynchronousMachine, connectivityNode, PhaseCode_1.PhaseCode.ABC);
|
|
1626
|
-
//const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
1627
1654
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()));
|
|
1628
1655
|
if (equipmentContainer) {
|
|
1629
1656
|
equipmentContainer.addEquipment(asynchronousMachine);
|
|
1630
1657
|
asynchronousMachine.equipmentContainer = equipmentContainer;
|
|
1631
|
-
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1632
|
-
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1633
1658
|
}
|
|
1634
1659
|
else {
|
|
1635
1660
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
@@ -1638,6 +1663,8 @@ class ConverterIntegral7 {
|
|
|
1638
1663
|
else {
|
|
1639
1664
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1640
1665
|
}
|
|
1666
|
+
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1667
|
+
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1641
1668
|
}
|
|
1642
1669
|
}
|
|
1643
1670
|
else {
|
|
@@ -1645,7 +1672,7 @@ class ConverterIntegral7 {
|
|
|
1645
1672
|
}
|
|
1646
1673
|
});
|
|
1647
1674
|
}
|
|
1648
|
-
convertKraftwerksbloecke(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1675
|
+
convertKraftwerksbloecke(cimModel, targetVoltages, knotenSfIDs, energyTypesConfig) {
|
|
1649
1676
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1650
1677
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
1651
1678
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KWBLOCK)) {
|
|
@@ -1702,19 +1729,6 @@ class ConverterIntegral7 {
|
|
|
1702
1729
|
// synchronousMachine.x0 = i7Data.x0k;
|
|
1703
1730
|
// synchronousMachine.x2 = 0;
|
|
1704
1731
|
// synchronousMachine.satDirectSubtransX = i7Data.xd2s;
|
|
1705
|
-
// RegulatingControl
|
|
1706
|
-
const regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), `RC_KWBlock ${i7Data.id}`);
|
|
1707
|
-
switch (i7Data.spannungsgeregelt) {
|
|
1708
|
-
// TODO Welche Modi sind möglich?
|
|
1709
|
-
case 1: {
|
|
1710
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1711
|
-
break;
|
|
1712
|
-
}
|
|
1713
|
-
default: {
|
|
1714
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.timeScheduled;
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1718
1732
|
// GeneratingUnit
|
|
1719
1733
|
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1720
1734
|
/** Wenn ein Config für den Primärenergietyp vorhanden*/
|
|
@@ -1785,8 +1799,18 @@ class ConverterIntegral7 {
|
|
|
1785
1799
|
// generatingUnit.totalEfficiency
|
|
1786
1800
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1787
1801
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1788
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data,
|
|
1789
|
-
|
|
1802
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages, generatingUnit);
|
|
1803
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1804
|
+
// TODO Welche Modi sind möglich?
|
|
1805
|
+
case 1: {
|
|
1806
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1807
|
+
break;
|
|
1808
|
+
}
|
|
1809
|
+
default: {
|
|
1810
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.timeScheduled;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1790
1814
|
cimModel.addGeneratingUnit(generatingUnit);
|
|
1791
1815
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1792
1816
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.KWBLOCK);
|
|
@@ -1794,7 +1818,7 @@ class ConverterIntegral7 {
|
|
|
1794
1818
|
}
|
|
1795
1819
|
});
|
|
1796
1820
|
}
|
|
1797
|
-
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result) {
|
|
1821
|
+
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
1798
1822
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1799
1823
|
for (const i7Data of result) {
|
|
1800
1824
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_ENI']), i7Data.kurzname);
|
|
@@ -1822,14 +1846,14 @@ class ConverterIntegral7 {
|
|
|
1822
1846
|
externalNetworkInjection.minZ0ToZ1Ratio
|
|
1823
1847
|
externalNetworkInjection.p
|
|
1824
1848
|
externalNetworkInjection.q*/
|
|
1825
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data);
|
|
1849
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
1826
1850
|
// ToDo PSRType
|
|
1827
1851
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1828
1852
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1829
1853
|
}
|
|
1830
1854
|
});
|
|
1831
1855
|
}
|
|
1832
|
-
convertErsatzQuerZweige2EquivalentInjection(cimModel, result) {
|
|
1856
|
+
convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result) {
|
|
1833
1857
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1834
1858
|
for (const i7Data of result) {
|
|
1835
1859
|
const einspeisePrio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : 1;
|
|
@@ -1842,10 +1866,10 @@ class ConverterIntegral7 {
|
|
|
1842
1866
|
const p_ein = (0, parser_utils_1.isNumericI7)(i7Data.p_ein) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_ein) * -1 : undefined; //Einspeisung: Erzeugerzählpfeilsystem, d.h. eine Übersetzung ins Verbraucherzählpfeilsystem wird durchgeführt
|
|
1843
1867
|
const q_ein = (0, parser_utils_1.isNumericI7)(i7Data.q_ein) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_ein) * -1 : undefined; //Einspeisung: Erzeugerzählpfeilsystem, d.h. eine Übersetzung ins Verbraucherzählpfeilsystem wird durchgeführt
|
|
1844
1868
|
const kr = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
1845
|
-
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.
|
|
1869
|
+
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r0) : undefined;
|
|
1846
1870
|
const r1 = (0, parser_utils_1.isNumericI7)(i7Data.r1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r1) : undefined;
|
|
1847
|
-
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1848
|
-
const x1 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1871
|
+
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : undefined;
|
|
1872
|
+
const x1 = (0, parser_utils_1.isNumericI7)(i7Data.x1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x1) : undefined;
|
|
1849
1873
|
const equivalentInjection = new INTEGRALEquivalentInjection_1.INTEGRALEquivalentInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_EI']), i7Data.kurzname);
|
|
1850
1874
|
/** Export Extended Ward equivalent with voltage regulation */
|
|
1851
1875
|
if (flag_lfl && !flag_ks && usoll && (r_ext !== 0 || x_ext !== 0)) {
|
|
@@ -1862,6 +1886,19 @@ class ConverterIntegral7 {
|
|
|
1862
1886
|
equivalentInjection.x0 = 1e9;
|
|
1863
1887
|
equivalentInjection.x2 = 1e9;
|
|
1864
1888
|
}
|
|
1889
|
+
/** Export Extended Ward equivalent with no voltage regulation */
|
|
1890
|
+
else if ((r_ext !== 0 || x_ext !== 0)) {
|
|
1891
|
+
equivalentInjection.regulationCapability = false;
|
|
1892
|
+
equivalentInjection.rExt = r_ext;
|
|
1893
|
+
equivalentInjection.r = 1e9;
|
|
1894
|
+
equivalentInjection.r0 = 1e9;
|
|
1895
|
+
equivalentInjection.r2 = 1e9;
|
|
1896
|
+
equivalentInjection.xExt = x_ext;
|
|
1897
|
+
equivalentInjection.x = 1e9;
|
|
1898
|
+
equivalentInjection.x0 = 1e9;
|
|
1899
|
+
equivalentInjection.x2 = 1e9;
|
|
1900
|
+
}
|
|
1901
|
+
/** Export equivalent with only short circuit computation capability */
|
|
1865
1902
|
else if (!flag_lfl && flag_ks) {
|
|
1866
1903
|
equivalentInjection.regulationCapability = false;
|
|
1867
1904
|
equivalentInjection.r = r1;
|
|
@@ -1882,17 +1919,6 @@ class ConverterIntegral7 {
|
|
|
1882
1919
|
equivalentInjection.x0 = x0;
|
|
1883
1920
|
equivalentInjection.x2 = x1;
|
|
1884
1921
|
}
|
|
1885
|
-
else if ((r_ext !== 0 || x_ext !== 0)) {
|
|
1886
|
-
equivalentInjection.regulationCapability = false;
|
|
1887
|
-
equivalentInjection.rExt = r_ext;
|
|
1888
|
-
equivalentInjection.r = 1e9;
|
|
1889
|
-
equivalentInjection.r0 = 1e9;
|
|
1890
|
-
equivalentInjection.r2 = 1e9;
|
|
1891
|
-
equivalentInjection.xExt = x_ext;
|
|
1892
|
-
equivalentInjection.x = 1e9;
|
|
1893
|
-
equivalentInjection.x0 = 1e9;
|
|
1894
|
-
equivalentInjection.x2 = 1e9;
|
|
1895
|
-
}
|
|
1896
1922
|
else {
|
|
1897
1923
|
equivalentInjection.regulationCapability = false;
|
|
1898
1924
|
equivalentInjection.r = 1e9;
|
|
@@ -1908,30 +1934,30 @@ class ConverterIntegral7 {
|
|
|
1908
1934
|
equivalentInjection.einspeisePrio = einspeisePrio;
|
|
1909
1935
|
equivalentInjection.kr = kr;
|
|
1910
1936
|
equivalentInjection.aggregate = true; // default Wert im I7 Export. Not needed for EquivalentInjection, BusbarSection, PowerTransformerEnd, EquivalentShunt, EquivalentBranch
|
|
1911
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1937
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data, targetVoltages);
|
|
1912
1938
|
// ToDo PSRType
|
|
1913
1939
|
cimModel.addEquivalentInjection(equivalentInjection);
|
|
1914
1940
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1915
1941
|
}
|
|
1916
1942
|
});
|
|
1917
1943
|
}
|
|
1918
|
-
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine
|
|
1919
|
-
convertBoundaryInjections(cimModel, knotenSfIDs, targetClass) {
|
|
1944
|
+
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine equivalentInjection, d.h. die Fallunterscheidung kann ausbleiben?...Diskussion mit Andreas
|
|
1945
|
+
convertBoundaryInjections(cimModel, targetVoltages, knotenSfIDs, targetClass) {
|
|
1920
1946
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1921
1947
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.BOUNDARYINJECTION)) {
|
|
1922
1948
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.BOUNDARYINJECTION, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.BOUNDARYINJECTION), knotenSfIDs));
|
|
1923
1949
|
switch (targetClass) {
|
|
1924
1950
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1925
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1951
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1926
1952
|
break;
|
|
1927
1953
|
}
|
|
1928
1954
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1929
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1955
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1930
1956
|
break;
|
|
1931
1957
|
}
|
|
1932
1958
|
default: {
|
|
1933
1959
|
//BoundaryInjections are always exported to EquivalentInjection objects for Boundary profile
|
|
1934
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1960
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1935
1961
|
}
|
|
1936
1962
|
}
|
|
1937
1963
|
}
|
|
@@ -1940,7 +1966,7 @@ class ConverterIntegral7 {
|
|
|
1940
1966
|
}
|
|
1941
1967
|
});
|
|
1942
1968
|
}
|
|
1943
|
-
convertBoundaryInjections2EquivalentInjection(cimModel, result) {
|
|
1969
|
+
convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result) {
|
|
1944
1970
|
for (const i7Data of result) {
|
|
1945
1971
|
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), 'BD_EI']), i7Data.kurzname);
|
|
1946
1972
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -1967,7 +1993,7 @@ class ConverterIntegral7 {
|
|
|
1967
1993
|
/** Spannung in kilo*/
|
|
1968
1994
|
// regulatingControl.targetValueUnitMultiplier = UnitMultiplier.k;
|
|
1969
1995
|
// equivalentInjection.regulatingControl = regulatingControl;
|
|
1970
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1996
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data, targetVoltages);
|
|
1971
1997
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1972
1998
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
1973
1999
|
// ToDo PSRType
|
|
@@ -1992,7 +2018,7 @@ class ConverterIntegral7 {
|
|
|
1992
2018
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
1993
2019
|
}
|
|
1994
2020
|
}
|
|
1995
|
-
convertBoundaryInjections2ExternalNetworkInjection(cimModel, result) {
|
|
2021
|
+
convertBoundaryInjections2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
1996
2022
|
for (const i7Data of result) {
|
|
1997
2023
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, utils_2.getName)(i7Data), i7Data.kurzname);
|
|
1998
2024
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -2008,18 +2034,7 @@ class ConverterIntegral7 {
|
|
|
2008
2034
|
/** externalNetworkInjection.maxR0ToX0Ratio = 1/(/x0/r0)
|
|
2009
2035
|
externalNetworkInjection.maxR1ToX1Ratio = (1/x1/r1) */
|
|
2010
2036
|
externalNetworkInjection.maxZ0ToZ1Ratio = (0, parser_utils_1.convertToNumberI7)(i7Data.z0_z1);
|
|
2011
|
-
|
|
2012
|
-
const regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), `RC_BI_${i7Data.id}`);
|
|
2013
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2014
|
-
regulatingControl.discrete = true;
|
|
2015
|
-
regulatingControl.enabled = inBetrieb;
|
|
2016
|
-
/** zulässges Spannungsband um die Knoten-Sollspannung
|
|
2017
|
-
* Diff umin, umax */
|
|
2018
|
-
//regulatingControl.targetDeadband = i7Data.uband;
|
|
2019
|
-
/** Spannung in kilo*/
|
|
2020
|
-
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2021
|
-
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2022
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2037
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2023
2038
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
2024
2039
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
2025
2040
|
// ToDo PSRType
|
|
@@ -2040,7 +2055,6 @@ class ConverterIntegral7 {
|
|
|
2040
2055
|
}*/
|
|
2041
2056
|
// ToDo PSRType
|
|
2042
2057
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2043
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2044
2058
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
2045
2059
|
}
|
|
2046
2060
|
}
|
|
@@ -2052,6 +2066,7 @@ class ConverterIntegral7 {
|
|
|
2052
2066
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.ERSATZLAENGSZWEIG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG), integral7.ersatzZweigAnschlussKnotenIDs));
|
|
2053
2067
|
//const result2: LeitungErsatzLaengszweig[] = await this.mysqlController.execQuery(getI7Query(I7Objects.ERSATZLAENGSZWEIGDIFF, integral7.ersatzZweigAnschlussKnotenIDs));
|
|
2054
2068
|
for (const i7Data of result) {
|
|
2069
|
+
integral7.integalErsatzLaengszweigIds.add(i7Data.id);
|
|
2055
2070
|
// Topologie
|
|
2056
2071
|
/* Anfang
|
|
2057
2072
|
* 3 moegliche Anschluesse
|
|
@@ -2079,26 +2094,31 @@ class ConverterIntegral7 {
|
|
|
2079
2094
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2080
2095
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2081
2096
|
/**EQ */
|
|
2082
|
-
if (flag_lfl
|
|
2097
|
+
if (flag_lfl && !flag_ks) {
|
|
2083
2098
|
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2084
2099
|
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2085
|
-
equivalentBranch.r21 =
|
|
2086
|
-
equivalentBranch.x21 =
|
|
2087
|
-
|
|
2100
|
+
/*equivalentBranch.r21 = isNumericI7(i7Data.r21_lfl) ? convertToNumberI7(i7Data.r21_lfl) : equivalentBranch.r;
|
|
2101
|
+
equivalentBranch.x21 = isNumericI7(i7Data.x21_lfl) ? convertToNumberI7(i7Data.x21_lfl) : equivalentBranch.x;
|
|
2102
|
+
|
|
2103
|
+
equivalentBranch.positiveR12 = isNumericI7(i7Data.r12_ks) ? convertToNumberI7(i7Data.r12_ks) : 10e9;
|
|
2088
2104
|
equivalentBranch.positiveR21 = equivalentBranch.positiveR12;
|
|
2089
|
-
equivalentBranch.positiveX12 =
|
|
2105
|
+
equivalentBranch.positiveX12 = isNumericI7(i7Data.x12_ks) ? convertToNumberI7(i7Data.x12_ks) : 10e9;
|
|
2090
2106
|
equivalentBranch.positiveX21 = equivalentBranch.positiveX12;
|
|
2107
|
+
|
|
2091
2108
|
equivalentBranch.negativeR12 = equivalentBranch.positiveR12;
|
|
2092
2109
|
equivalentBranch.negativeR21 = equivalentBranch.positiveR21;
|
|
2093
2110
|
equivalentBranch.negativeX12 = equivalentBranch.positiveX12;
|
|
2094
2111
|
equivalentBranch.negativeX21 = equivalentBranch.positiveX21;
|
|
2095
|
-
|
|
2112
|
+
|
|
2113
|
+
equivalentBranch.zeroR12 = isNumericI7(i7Data.r0) ? convertToNumberI7(i7Data.r0) : 10e9;
|
|
2096
2114
|
equivalentBranch.zeroR21 = equivalentBranch.zeroR12;
|
|
2097
|
-
equivalentBranch.zeroX12 =
|
|
2098
|
-
equivalentBranch.zeroX21 = equivalentBranch.zeroX12
|
|
2115
|
+
equivalentBranch.zeroX12 = isNumericI7(i7Data.x0) ? convertToNumberI7(i7Data.x0) : 10e9
|
|
2116
|
+
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;*/
|
|
2099
2117
|
}
|
|
2100
2118
|
else if (!flag_lfl && flag_ks) {
|
|
2101
2119
|
/**EQ-SC */
|
|
2120
|
+
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2121
|
+
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2102
2122
|
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
2103
2123
|
equivalentBranch.positiveR21 = equivalentBranch.positiveR12;
|
|
2104
2124
|
equivalentBranch.positiveX12 = (0, parser_utils_1.isNumericI7)(i7Data.x12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_ks) : 10e9;
|
|
@@ -2112,7 +2132,7 @@ class ConverterIntegral7 {
|
|
|
2112
2132
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2113
2133
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2114
2134
|
}
|
|
2115
|
-
else { //If neither flag_lfl nor flag_ks are specified, any impedance value that is specified will be exported.
|
|
2135
|
+
else { //If flag_lfl and flag_ks are specified or neither flag_lfl nor flag_ks are specified, any impedance value that is specified will be exported.
|
|
2116
2136
|
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2117
2137
|
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2118
2138
|
equivalentBranch.r21 = (0, parser_utils_1.isNumericI7)(i7Data.r21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r21_lfl) : equivalentBranch.r;
|
|
@@ -2129,7 +2149,9 @@ class ConverterIntegral7 {
|
|
|
2129
2149
|
equivalentBranch.zeroR21 = equivalentBranch.zeroR12;
|
|
2130
2150
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2131
2151
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2132
|
-
|
|
2152
|
+
if (!flag_lfl && !flag_ks) {
|
|
2153
|
+
this.logger.warn(`Ersatzlängszweig mit GUID ${equivalentBranch.getUUID()} sind die Flags flag_lfl sowie flag_ks nicht definiert.`);
|
|
2154
|
+
}
|
|
2133
2155
|
}
|
|
2134
2156
|
const bdf = [];
|
|
2135
2157
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten)));
|
|
@@ -2159,7 +2181,6 @@ class ConverterIntegral7 {
|
|
|
2159
2181
|
}
|
|
2160
2182
|
/** Kompensationsdrossel*/
|
|
2161
2183
|
convertKompensationsdrossel(cimModel, targetVoltages, knotenSfIDs) {
|
|
2162
|
-
var _a, _b;
|
|
2163
2184
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2164
2185
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL)) {
|
|
2165
2186
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KOMPENSATIONSDROSSEL, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL), knotenSfIDs));
|
|
@@ -2216,60 +2237,13 @@ class ConverterIntegral7 {
|
|
|
2216
2237
|
}
|
|
2217
2238
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr * -1, shunt.nomU, shunt.maximumSections);
|
|
2218
2239
|
shunt.gPerSection = (0, utils_2.calculateGPerSection)(pr, shunt.nomU, shunt.maximumSections);
|
|
2219
|
-
// RegulatingControl
|
|
2220
|
-
const spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7Data.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_lf) : false;
|
|
2221
|
-
const spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7Data.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.rpv_geregelt) : (cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg)) !== undefined ? true : false);
|
|
2222
|
-
let knotenSpgGeregelt = undefined;
|
|
2223
|
-
if (spannungsregelungRemote) {
|
|
2224
|
-
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg));
|
|
2225
|
-
}
|
|
2226
|
-
let regulatingControl = undefined;
|
|
2227
|
-
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2228
|
-
//Create and define regulating control for voltage control
|
|
2229
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl((0, parser_utils_1.getUUID)(i7Data.guid_rc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([shunt.getUUID().substring(0, 8), '_LSC']));
|
|
2230
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2231
|
-
regulatingControl.discrete = true; //default für ShuntCompensator ist true. s. CGMES Doku
|
|
2232
|
-
regulatingControl.targetDeadband = (0, parser_utils_1.isNumericI7)(i7Data.uband) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uband) : undefined; //zulässiges Spannungsband
|
|
2233
|
-
/** Spannung in kilo*/
|
|
2234
|
-
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2235
|
-
regulatingControl.enabled = true;
|
|
2236
|
-
if (knotenSpgGeregelt) {
|
|
2237
|
-
const cn_point = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2238
|
-
const terminal = (0, util_graph2tree_1.getControlledNode)(cn_point, knotenSpgGeregelt);
|
|
2239
|
-
if (terminal) {
|
|
2240
|
-
const cn = terminal.getConnectivityNode();
|
|
2241
|
-
if (regulatingControl.targetDeadband === undefined) {
|
|
2242
|
-
regulatingControl.targetDeadband = cn.getBaseVoltageAsNumber() * 0.1;
|
|
2243
|
-
}
|
|
2244
|
-
regulatingControl.terminalUUID = terminal.getUUID();
|
|
2245
|
-
regulatingControl.name = (0, util_create_1.createNotation)([regulatingControl.name, '_', (_a = cn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8), '_RC'], 32, true);
|
|
2246
|
-
const tV = targetVoltages.get(this.UUID2Integral7ID.get(cn.getUUID()).find(elem => elem));
|
|
2247
|
-
if (tV && regulatingControl.targetValue === undefined) {
|
|
2248
|
-
regulatingControl.targetValue = tV['usoll'];
|
|
2249
|
-
}
|
|
2250
|
-
regulatingControl.targetValue = targetVoltages.get((_b = this.UUID2Integral7ID.get(cn.getUUID())) === null || _b === void 0 ? void 0 : _b.find(elem => elem))['usoll'];
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
regulatingControl.addRegulatingCondEq(shunt);
|
|
2254
|
-
shunt.regulatingControlUUID = regulatingControl.mrid;
|
|
2255
|
-
shunt.controlEnabled = regulatingControl === undefined ? false : regulatingControl.enabled;
|
|
2256
|
-
shunt.regulatingControl = regulatingControl;
|
|
2257
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2258
|
-
const term = cimModel.terminals.get(regulatingControl.terminalUUID);
|
|
2259
|
-
if (term) {
|
|
2260
|
-
term.addRegulatingControl(regulatingControl);
|
|
2261
|
-
}
|
|
2262
|
-
else {
|
|
2263
|
-
let stop = true;
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
2240
|
//SHC section
|
|
2267
2241
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2268
2242
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2269
2243
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0)) * -1;
|
|
2270
2244
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2271
2245
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2272
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data,
|
|
2246
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2273
2247
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2274
2248
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL);
|
|
2275
2249
|
}
|
|
@@ -2281,7 +2255,6 @@ class ConverterIntegral7 {
|
|
|
2281
2255
|
}
|
|
2282
2256
|
/** Kompensationskondensator*/
|
|
2283
2257
|
convertKompensationskondensatoren(cimModel, targetVoltages, knotenSfIDs) {
|
|
2284
|
-
var _a, _b;
|
|
2285
2258
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2286
2259
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR)) {
|
|
2287
2260
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KOMPENSATIONSKONDENSATOR, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR), knotenSfIDs));
|
|
@@ -2338,60 +2311,13 @@ class ConverterIntegral7 {
|
|
|
2338
2311
|
}
|
|
2339
2312
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr, shunt.nomU, shunt.maximumSections);
|
|
2340
2313
|
shunt.gPerSection = (0, utils_2.calculateGPerSection)(pr, shunt.nomU, shunt.maximumSections);
|
|
2341
|
-
// RegulatingControl
|
|
2342
|
-
const spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7Data.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_lf) : false;
|
|
2343
|
-
const spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7Data.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.rpv_geregelt) : false;
|
|
2344
|
-
let knotenSpgGeregelt = undefined;
|
|
2345
|
-
if (spannungsregelungRemote) {
|
|
2346
|
-
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg));
|
|
2347
|
-
}
|
|
2348
|
-
let regulatingControl = undefined;
|
|
2349
|
-
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2350
|
-
//Create and define regulating control for voltage control
|
|
2351
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([shunt.getUUID().substring(0, 8), '_LSC']));
|
|
2352
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2353
|
-
regulatingControl.discrete = true; //default für ShuntCompensator ist true. s. CGMES Doku
|
|
2354
|
-
regulatingControl.targetDeadband = (0, parser_utils_1.isNumericI7)(i7Data.uband) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uband) : undefined; //zulässiges Spannungsband
|
|
2355
|
-
/** Spannung in kilo*/
|
|
2356
|
-
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2357
|
-
regulatingControl.enabled = true;
|
|
2358
|
-
if (knotenSpgGeregelt) {
|
|
2359
|
-
const cn_point = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2360
|
-
const terminal = (0, util_graph2tree_1.getControlledNode)(cn_point, knotenSpgGeregelt);
|
|
2361
|
-
if (terminal) {
|
|
2362
|
-
const cn = terminal.getConnectivityNode();
|
|
2363
|
-
if (regulatingControl.targetDeadband === undefined) {
|
|
2364
|
-
regulatingControl.targetDeadband = cn.getBaseVoltageAsNumber() * 0.1;
|
|
2365
|
-
}
|
|
2366
|
-
regulatingControl.terminalUUID = terminal.getUUID();
|
|
2367
|
-
regulatingControl.name = (0, util_create_1.createNotation)([regulatingControl.name, '_', (_a = cn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8), '_RC'], 32, true);
|
|
2368
|
-
const tV = targetVoltages.get(this.UUID2Integral7ID.get(cn.getUUID()).find(elem => elem));
|
|
2369
|
-
if (tV && regulatingControl.targetValue === undefined) {
|
|
2370
|
-
regulatingControl.targetValue = tV['usoll'];
|
|
2371
|
-
}
|
|
2372
|
-
regulatingControl.targetValue = targetVoltages.get((_b = this.UUID2Integral7ID.get(cn.getUUID())) === null || _b === void 0 ? void 0 : _b.find(elem => elem))['usoll'];
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
regulatingControl.addRegulatingCondEq(shunt);
|
|
2376
|
-
shunt.regulatingControlUUID = regulatingControl.mrid;
|
|
2377
|
-
shunt.controlEnabled = regulatingControl === undefined ? false : regulatingControl.enabled;
|
|
2378
|
-
shunt.regulatingControl = regulatingControl;
|
|
2379
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2380
|
-
const term = cimModel.terminals.get(regulatingControl.terminalUUID);
|
|
2381
|
-
if (term) {
|
|
2382
|
-
term.addRegulatingControl(regulatingControl);
|
|
2383
|
-
}
|
|
2384
|
-
else {
|
|
2385
|
-
let stop = true;
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
2314
|
//SHC section
|
|
2389
2315
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2390
2316
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2391
2317
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0));
|
|
2392
2318
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2393
2319
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2394
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data,
|
|
2320
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2395
2321
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2396
2322
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR);
|
|
2397
2323
|
}
|
|
@@ -2401,13 +2327,12 @@ class ConverterIntegral7 {
|
|
|
2401
2327
|
}
|
|
2402
2328
|
});
|
|
2403
2329
|
}
|
|
2404
|
-
convertStatcom(cimModel, knotenSfIDs) {
|
|
2330
|
+
convertStatcom(cimModel, targetVoltages, knotenSfIDs) {
|
|
2405
2331
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2406
2332
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STATCOM)) {
|
|
2407
2333
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.STATCOM, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.STATCOM), knotenSfIDs));
|
|
2408
2334
|
for (const i7Data of result) {
|
|
2409
2335
|
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SVC']), i7Data.kurzname);
|
|
2410
|
-
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2411
2336
|
const ur = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined;
|
|
2412
2337
|
const uref = (0, parser_utils_1.isNumericI7)(i7Data.uref) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uref) : undefined;
|
|
2413
2338
|
const mrez = (0, parser_utils_1.isNumericI7)(i7Data.mrez) ? (0, parser_utils_1.convertToNumberI7)(i7Data.mrez) : undefined;
|
|
@@ -2425,34 +2350,12 @@ class ConverterIntegral7 {
|
|
|
2425
2350
|
/** SV */
|
|
2426
2351
|
//statVarCom.svpowerflow
|
|
2427
2352
|
/** Regelung */
|
|
2428
|
-
const
|
|
2429
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data,
|
|
2430
|
-
regulatingControl.enabled = true;
|
|
2431
|
-
statVarCom.controlEnabled = true;
|
|
2432
|
-
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_os);
|
|
2433
|
-
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2434
|
-
if (flagOS && i7Data.trafo) {
|
|
2435
|
-
const trafoUUID = this.integralID2UUID.get(i7Data.trafo);
|
|
2436
|
-
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2437
|
-
if (powerTransformer) {
|
|
2438
|
-
try {
|
|
2439
|
-
const bvNumbers = powerTransformer.powerTransformerEnd.map(elem => { var _a, _b; return (_b = (_a = elem.baseVoltage) === null || _a === void 0 ? void 0 : _a.nominalVoltage) === null || _b === void 0 ? void 0 : _b.value; });
|
|
2440
|
-
const maxBv = Math.max(...bvNumbers);
|
|
2441
|
-
const powerTransformerEnd = powerTransformer.powerTransformerEnd[bvNumbers.indexOf(maxBv)];
|
|
2442
|
-
regulatingControl.terminal = powerTransformerEnd.terminal;
|
|
2443
|
-
powerTransformerEnd.terminal.addRegulatingControl(regulatingControl);
|
|
2444
|
-
regulatingControl.targetValue = maxBv;
|
|
2445
|
-
}
|
|
2446
|
-
catch (e) {
|
|
2447
|
-
this.logger.debug(`Statcom Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
else {
|
|
2451
|
-
this.logger.debug(`Statcom RegulatingControl ${i7Data.id} konnte dem Trafo ${i7Data.trafo} nicht zugeordnet werden.`);
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2353
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_rc);
|
|
2354
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, targetVoltages, undefined, true);
|
|
2454
2355
|
/** EQ */
|
|
2455
|
-
|
|
2356
|
+
if (regulatingControl) {
|
|
2357
|
+
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2358
|
+
}
|
|
2456
2359
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
2457
2360
|
this.addIdMapping(i7Data.id, statVarCom.mrid, integral_sql_1.Integral7TableNames.STATCOM);
|
|
2458
2361
|
}
|
|
@@ -2462,7 +2365,7 @@ class ConverterIntegral7 {
|
|
|
2462
2365
|
}
|
|
2463
2366
|
});
|
|
2464
2367
|
}
|
|
2465
|
-
convertSVC(cimModel, knotenSfIDs) {
|
|
2368
|
+
convertSVC(cimModel, targetVoltages, knotenSfIDs) {
|
|
2466
2369
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2467
2370
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SVC)) {
|
|
2468
2371
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.SVC, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.SVC), knotenSfIDs));
|
|
@@ -2485,33 +2388,7 @@ class ConverterIntegral7 {
|
|
|
2485
2388
|
statVarCom.q = (0, parser_utils_1.isNumericI7)(i7Data.q0svc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q0svc) : undefined;
|
|
2486
2389
|
/** SV */
|
|
2487
2390
|
//statVarCom.svpowerflow
|
|
2488
|
-
|
|
2489
|
-
const regulatingControl = (0, utils_2.createRegulatingControl)(`RC_Statcom_${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
2490
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
2491
|
-
regulatingControl.enabled = true;
|
|
2492
|
-
statVarCom.controlEnabled = true;
|
|
2493
|
-
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_os);
|
|
2494
|
-
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2495
|
-
if (flagOS && i7Data.trafo) {
|
|
2496
|
-
const trafoUUID = this.integralID2UUID.get(i7Data.trafo);
|
|
2497
|
-
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2498
|
-
if (powerTransformer) {
|
|
2499
|
-
try {
|
|
2500
|
-
const bvNumbers = powerTransformer.powerTransformerEnd.map(elem => { var _a, _b; return (_b = (_a = elem.baseVoltage) === null || _a === void 0 ? void 0 : _a.nominalVoltage) === null || _b === void 0 ? void 0 : _b.value; });
|
|
2501
|
-
const maxBv = Math.max(...bvNumbers);
|
|
2502
|
-
const powerTransformerEnd = powerTransformer.powerTransformerEnd[bvNumbers.indexOf(maxBv)];
|
|
2503
|
-
regulatingControl.terminal = powerTransformerEnd.terminal;
|
|
2504
|
-
powerTransformerEnd.terminal.addRegulatingControl(regulatingControl);
|
|
2505
|
-
regulatingControl.targetValue = maxBv;
|
|
2506
|
-
}
|
|
2507
|
-
catch (e) {
|
|
2508
|
-
this.logger.debug(`Statcom Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
else {
|
|
2512
|
-
this.logger.debug(`Statcom RegulatingControl ${i7Data.id} konnte dem Trafo ${i7Data.trafo} nicht zugeordnet werden.`);
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2391
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, targetVoltages, undefined, false);
|
|
2515
2392
|
/** EQ */
|
|
2516
2393
|
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2517
2394
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
@@ -2529,10 +2406,9 @@ class ConverterIntegral7 {
|
|
|
2529
2406
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KOPFSTATION_KLASSISCH, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_KLASSISCH), knotenSfIDs));
|
|
2530
2407
|
for (const i7Data of result) {
|
|
2531
2408
|
/** Containment DC DCConverterUnit */
|
|
2532
|
-
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp
|
|
2533
|
-
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2409
|
+
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2534
2410
|
dcConverterUnit.governorSCDAc = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2535
|
-
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2411
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.krdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.krdc) : undefined;
|
|
2536
2412
|
// Topologie
|
|
2537
2413
|
/* Anfang
|
|
2538
2414
|
* 3 moegliche Anschluesse
|
|
@@ -2558,54 +2434,46 @@ class ConverterIntegral7 {
|
|
|
2558
2434
|
else {
|
|
2559
2435
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
2560
2436
|
}
|
|
2561
|
-
const csConverter = new CsConverter_1.CsConverter((0, parser_utils_1.getUUID)(i7Data.guid
|
|
2437
|
+
const csConverter = new CsConverter_1.CsConverter((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CSC']), i7Data.kurzname);
|
|
2438
|
+
const pr = (0, parser_utils_1.isNumericI7)(i7Data.pr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pr) : undefined;
|
|
2439
|
+
const pges = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pges) : undefined;
|
|
2562
2440
|
/** Wenn Leitungen konvertiert werden, wird das Attribut operationMode gesetzt. */
|
|
2563
2441
|
csConverter.equipmentContainer = dcConverterUnit;
|
|
2564
2442
|
/** Bemessungsleistung (Gleichstromseite) in MW
|
|
2565
2443
|
* im CS-Fall S = P?
|
|
2566
2444
|
* Abhängig vom */
|
|
2567
|
-
csConverter.baseS =
|
|
2445
|
+
csConverter.baseS = pr;
|
|
2568
2446
|
/** Bemessungsspannung (Gleichstromseite) in kV*/
|
|
2569
|
-
csConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2447
|
+
csConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : ((0, parser_utils_1.isNumericI7)(i7Data.udc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.udc) : undefined);
|
|
2448
|
+
csConverter.ratedIdc = (0, utils_2.calculateRatedIdc)(csConverter.ratedUdc, pr);
|
|
2570
2449
|
/** spannungsabhängige Wirk-Verluste in kW bei Leerlauf mit Bemessungsspannung in kV*/
|
|
2571
2450
|
csConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) * Math.pow(10, -3) : undefined;
|
|
2572
2451
|
csConverter.maxUdc = csConverter.ratedUdc * 1.05; // +5% * ratedUdc
|
|
2573
2452
|
csConverter.minUdc = csConverter.ratedUdc * 0.95; // -5% * ratedUdc
|
|
2574
|
-
csConverter.resistiveLoss = 0;
|
|
2453
|
+
csConverter.resistiveLoss = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) * Math.pow(10, -3) : undefined;
|
|
2575
2454
|
csConverter.switchingLoss = 0;
|
|
2576
2455
|
/* csConverter.numberOfValves
|
|
2577
2456
|
csConverter.valveU0*/
|
|
2578
2457
|
/** Stromrichter */
|
|
2579
2458
|
/** Zündwinkel bei Gleichrichterbetrieb (ins Drehstromnetz eingespeiste Wirkleistung < 0) - etwa 15 Grad */
|
|
2580
|
-
|
|
2581
|
-
|
|
2459
|
+
csConverter.maxAlpha = 180;
|
|
2460
|
+
csConverter.minAlpha = (0, parser_utils_1.isNumericI7)(i7Data.alpha) ? (0, parser_utils_1.convertToNumberI7)(i7Data.alpha) : 15;
|
|
2582
2461
|
/** Löschwinkel bei Wechselrichterbetrieb (ins Drehstromnetz Wirkleistung > 0) - etwa 21,5 Grad */
|
|
2583
|
-
|
|
2584
|
-
|
|
2462
|
+
csConverter.maxGamma = undefined;
|
|
2463
|
+
csConverter.minGamma = (0, parser_utils_1.isNumericI7)(i7Data.gamma) ? (0, parser_utils_1.convertToNumberI7)(i7Data.gamma) : 21.5;
|
|
2585
2464
|
/** SSH profile export*/
|
|
2586
|
-
csConverter.p =
|
|
2465
|
+
csConverter.p = pges ? pges * -1 : 0;
|
|
2587
2466
|
csConverter.q = (0, parser_utils_1.isNumericI7)(i7Data.qges) ? i7Data.qges * -1 : 0;
|
|
2588
|
-
|
|
2589
|
-
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7Data.p_geregelt);
|
|
2590
|
-
if (regelungU) {
|
|
2591
|
-
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.inverter;
|
|
2592
|
-
}
|
|
2593
|
-
else if (regelungP) {
|
|
2594
|
-
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
2595
|
-
}
|
|
2596
|
-
else {
|
|
2597
|
-
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
2598
|
-
}
|
|
2467
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, csConverter, i7Data);
|
|
2599
2468
|
/** Status */
|
|
2600
2469
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2601
2470
|
csConverter.normallyInService = inBetrieb;
|
|
2602
2471
|
/** Topologie AC Seite*/
|
|
2603
|
-
if (acConnectivityNode) {
|
|
2604
|
-
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
}
|
|
2472
|
+
/**if (acConnectivityNode) {
|
|
2473
|
+
csConverter.pccTerminal = this.reateConnection(cimModel, csConverter, acConnectivityNode, PhaseCode.ABC, true);
|
|
2474
|
+
} else {
|
|
2475
|
+
this.logger.debug(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
2476
|
+
}**/
|
|
2609
2477
|
/** Topologie DC Seite*/
|
|
2610
2478
|
const dcNode = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodep, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCN']));
|
|
2611
2479
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2631,17 +2499,27 @@ class ConverterIntegral7 {
|
|
|
2631
2499
|
}
|
|
2632
2500
|
});
|
|
2633
2501
|
}
|
|
2634
|
-
convertVsConverterDC(cimModel, integral7, knotenSfIDs) {
|
|
2635
|
-
var _a, _b;
|
|
2502
|
+
convertVsConverterDC(cimModel, targetVoltages, integral7, knotenSfIDs) {
|
|
2636
2503
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2637
2504
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
2638
2505
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KOPFSTATION_VSC, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC), knotenSfIDs));
|
|
2639
2506
|
for (const i7Data of result) {
|
|
2640
2507
|
/** Containment DC DCConverterUnit */
|
|
2641
|
-
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp
|
|
2642
|
-
|
|
2508
|
+
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2509
|
+
/** target voltage local*/
|
|
2510
|
+
const localTargetVoltage = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
2511
|
+
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
2643
2512
|
dcConverterUnit.governorSCDAc = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2644
|
-
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2513
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.krdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.krdc) : undefined;
|
|
2514
|
+
if (dcConverterUnit.governorSCDAc !== undefined) {
|
|
2515
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDAc.`);
|
|
2516
|
+
}
|
|
2517
|
+
if (dcConverterUnit.governorSCDDc !== undefined) {
|
|
2518
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDDc.`);
|
|
2519
|
+
}
|
|
2520
|
+
if (dcConverterUnit.referencePriority !== undefined) {
|
|
2521
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no referencePriority.`);
|
|
2522
|
+
}
|
|
2645
2523
|
// Topologie
|
|
2646
2524
|
/** Anfang
|
|
2647
2525
|
* 3 moegliche Anschluesse
|
|
@@ -2676,44 +2554,23 @@ class ConverterIntegral7 {
|
|
|
2676
2554
|
//If udc is set in Integral data model set converter.ratedUdc as i7Data.udc else take the data value for i7Data.ur (Bemessungsspannung)
|
|
2677
2555
|
vsConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.udc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.udc) : ((0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined);
|
|
2678
2556
|
/** spannungsabhängige Wirk-Verluste bei Leerlauf mit Bemessungsspannung in kV*/
|
|
2679
|
-
vsConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer)
|
|
2680
|
-
vsConverter.maxUdc = vsConverter.ratedUdc * 1.
|
|
2681
|
-
vsConverter.minUdc = vsConverter.ratedUdc * 0.
|
|
2682
|
-
vsConverter.resistiveLoss = undefined;
|
|
2557
|
+
vsConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) * Math.pow(10, -3) : undefined;
|
|
2558
|
+
vsConverter.maxUdc = vsConverter.ratedUdc * 1.08; // +5% * ratedUdc
|
|
2559
|
+
vsConverter.minUdc = vsConverter.ratedUdc * 0.98; // -5% * ratedUdc
|
|
2560
|
+
vsConverter.resistiveLoss = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) * Math.pow(10, -3) : undefined;
|
|
2683
2561
|
vsConverter.switchingLoss = undefined;
|
|
2684
2562
|
/* csConverter.maxModulationIndex = ;
|
|
2685
2563
|
csConverter.maxValveCurrent = */
|
|
2686
2564
|
/** SSH export values */
|
|
2687
2565
|
vsConverter.p = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? i7Data.pges * -1 : 0;
|
|
2688
2566
|
vsConverter.q = (0, parser_utils_1.isNumericI7)(i7Data.qges) ? i7Data.qges * -1 : 0;
|
|
2689
|
-
|
|
2690
|
-
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7Data.p_geregelt);
|
|
2691
|
-
if (regelungU) {
|
|
2692
|
-
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
2693
|
-
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
2694
|
-
vsConverter.targetUpcc = (_a = acConnectivityNode === null || acConnectivityNode === void 0 ? void 0 : acConnectivityNode.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getBaseVoltageAsNumber(); //Voltage
|
|
2695
|
-
vsConverter.targetUdc = vsConverter.ratedUdc;
|
|
2696
|
-
}
|
|
2697
|
-
else {
|
|
2698
|
-
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
2699
|
-
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
2700
|
-
vsConverter.targetPpcc = vsConverter.baseS * -1; //ActivePower
|
|
2701
|
-
vsConverter.targetUpcc = (_b = acConnectivityNode === null || acConnectivityNode === void 0 ? void 0 : acConnectivityNode.getVoltageLevel()) === null || _b === void 0 ? void 0 : _b.getBaseVoltageAsNumber();
|
|
2702
|
-
vsConverter.targetQpcc = 0; //ReactivePower
|
|
2703
|
-
}
|
|
2567
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, vsConverter, i7Data, targetVoltages);
|
|
2704
2568
|
vsConverter.droop = 0; //pu
|
|
2705
2569
|
vsConverter.droopCompensation = 0; //Resistance
|
|
2706
2570
|
vsConverter.qShare = 0; //PerCent
|
|
2707
2571
|
/** Status */
|
|
2708
2572
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2709
2573
|
vsConverter.normallyInService = inBetrieb;
|
|
2710
|
-
/** Topologie AC Seite*/
|
|
2711
|
-
if (acConnectivityNode) {
|
|
2712
|
-
vsConverter.pccTerminal = (0, util_create_1.createConnection)(cimModel, vsConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, 1);
|
|
2713
|
-
}
|
|
2714
|
-
else {
|
|
2715
|
-
this.logger.debug(`VsConverter ${i7Data.id} ${vsConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
2716
|
-
}
|
|
2717
2574
|
/** Topologie DC Seite mit DCGround*/
|
|
2718
2575
|
const dcNode = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodep, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCN']));
|
|
2719
2576
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2724,32 +2581,11 @@ class ConverterIntegral7 {
|
|
|
2724
2581
|
vsConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
2725
2582
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
2726
2583
|
dcNode.dcTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
2727
|
-
const dcGround = new DCGround_1.DCGround((0, parser_utils_1.getUUID)(i7Data.guid_dcground, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG'], 32, true));
|
|
2728
|
-
const dcTerminalG = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalg, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
2729
|
-
const dcTerminalM1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
2730
|
-
const dcNodeG = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1, this.objectMappingConfig.standardiseUuid));
|
|
2731
|
-
dcTerminalG.dCConductingEquipment = dcGround;
|
|
2732
|
-
dcTerminalM1.dCConductingEquipment = vsConverter;
|
|
2733
|
-
dcTerminalM1.polarity = DCPolarityKind_1.DCPolarityKind.middle;
|
|
2734
|
-
dcTerminalG.dcNode = dcNodeG;
|
|
2735
|
-
dcTerminalM1.dcNode = dcNodeG;
|
|
2736
|
-
dcGround.equipmentContainer = dcConverterUnit;
|
|
2737
|
-
dcNodeG.dcEquipmentContainer = dcConverterUnit;
|
|
2738
|
-
dcNodeG.dcTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
2739
|
-
dcNodeG.dcTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
2740
|
-
vsConverter.dCTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
2741
|
-
/** EQ-SC */
|
|
2742
|
-
dcGround.r = undefined;
|
|
2743
|
-
dcGround.inductance = undefined;
|
|
2744
2584
|
/** DCNode speichern, um später DCLines anschließen zu können*/
|
|
2745
2585
|
cimModel.addDCConverterUnit(dcConverterUnit);
|
|
2746
2586
|
cimModel.addVSConverter(vsConverter);
|
|
2747
2587
|
cimModel.addDCNode(dcNode);
|
|
2748
|
-
cimModel.addDCNode(dcNodeG);
|
|
2749
2588
|
cimModel.addACDCConverterDCTerminal(acDCConverterDCTerminal);
|
|
2750
|
-
cimModel.addDCTerminal(dcTerminalG);
|
|
2751
|
-
cimModel.addDCGround(dcGround);
|
|
2752
|
-
cimModel.addACDCConverterDCTerminal(dcTerminalM1);
|
|
2753
2589
|
integral7.integralHgueKopf.set(i7Data.id, i7Data);
|
|
2754
2590
|
this.checkAnschlussIDs(i7Data.id, integral7);
|
|
2755
2591
|
this.addIdMapping(i7Data.id, vsConverter.mrid, integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC);
|
|
@@ -2757,7 +2593,7 @@ class ConverterIntegral7 {
|
|
|
2757
2593
|
}
|
|
2758
2594
|
});
|
|
2759
2595
|
}
|
|
2760
|
-
convertEinspeisungen2EnergySource(cimModel, result, energySourceTypeMappingConfig) {
|
|
2596
|
+
convertEinspeisungen2EnergySource(cimModel, targetVoltages, result, energySourceTypeMappingConfig) {
|
|
2761
2597
|
var _a, _b, _c, _d;
|
|
2762
2598
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2763
2599
|
for (const i7Data of result) {
|
|
@@ -2802,37 +2638,15 @@ class ConverterIntegral7 {
|
|
|
2802
2638
|
}
|
|
2803
2639
|
});
|
|
2804
2640
|
}
|
|
2805
|
-
convertEnergySourceToExternalNetworkInjection(cimModel, i7Data, prio, inBetrieb) {
|
|
2641
|
+
convertEnergySourceToExternalNetworkInjection(cimModel, targetVoltages, i7Data, prio, inBetrieb) {
|
|
2806
2642
|
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2807
2643
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', rdfid.substring(0, 8), '_EI'], 32, true), i7Data.kurzname);
|
|
2808
2644
|
externalNetworkInjection.referencePriority = prio;
|
|
2809
2645
|
const usoll = i7Data.usoll;
|
|
2810
|
-
// RegulatingControl
|
|
2811
|
-
let regulatingControl = undefined;
|
|
2812
|
-
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
2813
|
-
switch (i7Data.spannungsgeregelt) {
|
|
2814
|
-
// TODO Welche Modi sind möglich?
|
|
2815
|
-
case 1: {
|
|
2816
|
-
const cimrdfid = (0, parser_utils_1.getUUID)(externalNetworkInjection.getUUID(), this.objectMappingConfig.standardiseUuid);
|
|
2817
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([cimrdfid.substring(0, 8), '_RC_ENI'], 32, true));
|
|
2818
|
-
regulatingControl.targetValue = usoll;
|
|
2819
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2820
|
-
regulatingControl.discrete = false;
|
|
2821
|
-
regulatingControl.enabled = true;
|
|
2822
|
-
externalNetworkInjection.controlEnabled = true;
|
|
2823
|
-
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
2824
|
-
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2825
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2826
|
-
break;
|
|
2827
|
-
}
|
|
2828
|
-
default: {
|
|
2829
|
-
externalNetworkInjection.controlEnabled = false;
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
2646
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
2833
2647
|
externalNetworkInjection.p = powerData[0];
|
|
2834
2648
|
externalNetworkInjection.q = powerData[1];
|
|
2835
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data,
|
|
2649
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2836
2650
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2837
2651
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2838
2652
|
}
|
|
@@ -2858,20 +2672,19 @@ class ConverterIntegral7 {
|
|
|
2858
2672
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.EINSPEISUNG);
|
|
2859
2673
|
}
|
|
2860
2674
|
catch (err) {
|
|
2861
|
-
this.logger.error(`
|
|
2675
|
+
this.logger.error(`error --- convertEinspeisungen2EquivalentInjection ${i7Data.id} ${err}`);
|
|
2862
2676
|
}
|
|
2863
2677
|
}
|
|
2864
2678
|
});
|
|
2865
2679
|
}
|
|
2866
|
-
convertEinspeisungen2ExternalNetworkInjection(cimModel, result) {
|
|
2680
|
+
convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
2681
|
+
var _a;
|
|
2867
2682
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2868
2683
|
for (const i7Data of result) {
|
|
2869
2684
|
try {
|
|
2870
|
-
const
|
|
2871
|
-
const
|
|
2872
|
-
|
|
2873
|
-
// const un = cn.getVoltageLevel().getBaseVoltageAsNumber();
|
|
2874
|
-
externalNetworkInjection.nameprimaertyp = i7Data.nameprimaertyp;
|
|
2685
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2686
|
+
const externalNetworkInjection = new INTEGRALExternalNetworkInjection_1.INTEGRALExternalNetworkInjection(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_ENI'], 32, true), i7Data.kurzname);
|
|
2687
|
+
externalNetworkInjection.nameprimaertyp = i7Data.nameprimaertyp !== undefined ? i7Data.nameprimaertyp : undefined;
|
|
2875
2688
|
let mf = undefined;
|
|
2876
2689
|
mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
2877
2690
|
if (mf) {
|
|
@@ -2890,15 +2703,8 @@ class ConverterIntegral7 {
|
|
|
2890
2703
|
externalNetworkInjection.minP = minP;
|
|
2891
2704
|
const minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
2892
2705
|
externalNetworkInjection.minQ = minQ;
|
|
2893
|
-
/**
|
|
2894
|
-
|
|
2895
|
-
if (this.objectMappingConfig.Target === 'Westnetz' && !einspeisePrioritaet) {
|
|
2896
|
-
externalNetworkInjection.maxP = 0;
|
|
2897
|
-
externalNetworkInjection.minP = 0;
|
|
2898
|
-
}
|
|
2899
|
-
const usoll = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
2900
|
-
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : false;
|
|
2901
|
-
//TODO: get data from database
|
|
2706
|
+
/** Convert EQ-profile dataset. */
|
|
2707
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2902
2708
|
/**Convert short circuit constants */
|
|
2903
2709
|
const r0X0 = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0) : undefined;
|
|
2904
2710
|
const r1X1 = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1) : undefined;
|
|
@@ -2907,7 +2713,7 @@ class ConverterIntegral7 {
|
|
|
2907
2713
|
externalNetworkInjection.maxR0ToX0Ratio = maxR0X0Ratio;
|
|
2908
2714
|
const maxR1X1Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1_max) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1_max) : r1X1;
|
|
2909
2715
|
externalNetworkInjection.maxR1ToX1Ratio = maxR1X1Ratio;
|
|
2910
|
-
const maxZ0Z1Ratio =
|
|
2716
|
+
const maxZ0Z1Ratio = z0Z1;
|
|
2911
2717
|
externalNetworkInjection.maxZ0ToZ1Ratio = maxZ0Z1Ratio;
|
|
2912
2718
|
const minR0X0Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0_min) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0_min) : r0X0;
|
|
2913
2719
|
externalNetworkInjection.minR0ToX0Ratio = minR0X0Ratio;
|
|
@@ -2922,41 +2728,22 @@ class ConverterIntegral7 {
|
|
|
2922
2728
|
externalNetworkInjection.minInitialSymShCCurrent = minIkSecond;
|
|
2923
2729
|
const maxIkSecond = (0, parser_utils_1.isNumericI7)(i7Data.sk_max) ? (0, parser_utils_1.convertToNumberI7)(skMax) / Math.sqrt(3) * skMax : undefined;
|
|
2924
2730
|
externalNetworkInjection.maxInitialSymShCCurrent = maxIkSecond;
|
|
2925
|
-
|
|
2926
|
-
let regulatingControl = undefined;
|
|
2927
|
-
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
2928
|
-
switch (i7Data.spannungsgeregelt) {
|
|
2929
|
-
// TODO Welche Modi sind möglich?
|
|
2930
|
-
case 1: {
|
|
2931
|
-
const cimrdfid = (0, parser_utils_1.getUUID)(externalNetworkInjection.getUUID(), this.objectMappingConfig.standardiseUuid);
|
|
2932
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([cimrdfid.substring(0, 8), '_RC_ENI'], 32, true));
|
|
2933
|
-
regulatingControl.targetValue = usoll;
|
|
2934
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2935
|
-
regulatingControl.discrete = false;
|
|
2936
|
-
regulatingControl.enabled = true;
|
|
2937
|
-
externalNetworkInjection.controlEnabled = true;
|
|
2938
|
-
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
2939
|
-
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2940
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2941
|
-
break;
|
|
2942
|
-
}
|
|
2943
|
-
default: {
|
|
2944
|
-
externalNetworkInjection.controlEnabled = false;
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2948
|
-
// ToDo PSRType
|
|
2731
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : false;
|
|
2949
2732
|
/** Convert SSH-profile dataset. */
|
|
2950
2733
|
/**
|
|
2951
|
-
* @description Set einspprio as referencePriority. PowerFactory sets external network injections with referencePriority to
|
|
2734
|
+
* @description Set einspprio as referencePriority. PowerFactory sets external network injections with referencePriority == 1, to slack control mode. In regular case referencePriority for externalnetworkextensions is set to value '0'.
|
|
2952
2735
|
* einspprio having no effect in loadflow calculation if voltage control does not exists.
|
|
2953
2736
|
* */
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2737
|
+
let prio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
2738
|
+
if (((_a = externalNetworkInjection.regulatingControl) === null || _a === void 0 ? void 0 : _a.mode) === RegulatingControlModeKind_1.RegulatingControlModeKind.voltage) {
|
|
2739
|
+
if (prio !== undefined && prio > 0) {
|
|
2740
|
+
externalNetworkInjection.referencePriority = prio + 1; //TODO: SLACK is a injection with maximum prio in the network section and active voltage control.
|
|
2741
|
+
}
|
|
2742
|
+
else if (prio !== undefined && prio === 0) {
|
|
2743
|
+
externalNetworkInjection.referencePriority = prio;
|
|
2957
2744
|
}
|
|
2958
2745
|
else {
|
|
2959
|
-
|
|
2746
|
+
externalNetworkInjection.referencePriority = undefined;
|
|
2960
2747
|
}
|
|
2961
2748
|
}
|
|
2962
2749
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
@@ -2964,43 +2751,352 @@ class ConverterIntegral7 {
|
|
|
2964
2751
|
const q = powerData[1];
|
|
2965
2752
|
externalNetworkInjection.setActivePower(p * -1); //convert to load sign system
|
|
2966
2753
|
externalNetworkInjection.setReactivePower(q * -1); //convert to load sign system
|
|
2967
|
-
|
|
2968
|
-
|
|
2754
|
+
// AMPI7 profile
|
|
2755
|
+
const cosPhi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? ((0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) !== 0 ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : 1) : undefined;
|
|
2756
|
+
externalNetworkInjection.cos_phi = cosPhi;
|
|
2757
|
+
externalNetworkInjection.p_mf = (mf && powerData[2]) ? powerData[2] * -1 : undefined;
|
|
2758
|
+
externalNetworkInjection.q_mf = (mf && powerData[3]) ? powerData[3] * -1 : undefined;
|
|
2759
|
+
externalNetworkInjection.normallyInService = inBetrieb;
|
|
2969
2760
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2970
2761
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2971
2762
|
}
|
|
2972
2763
|
catch (err) {
|
|
2973
|
-
this.logger.error(`
|
|
2764
|
+
this.logger.error(`error --- convertEinspeisungen2ExternalNetworkInjection ${i7Data.id} ${err}`);
|
|
2974
2765
|
}
|
|
2975
2766
|
}
|
|
2976
2767
|
});
|
|
2977
2768
|
}
|
|
2978
|
-
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data,
|
|
2979
|
-
var _a, _b, _c;
|
|
2769
|
+
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data, targetVoltages, generatingUnit, isStatcom) {
|
|
2770
|
+
var _a, _b, _c, _d;
|
|
2980
2771
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2981
2772
|
condEquip.normallyInService = inBetrieb;
|
|
2982
2773
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2983
|
-
let
|
|
2774
|
+
let usoll = undefined;
|
|
2775
|
+
let rControl = undefined;
|
|
2776
|
+
let i7DataEinsp = undefined;
|
|
2777
|
+
let i7DataSVC = undefined;
|
|
2778
|
+
let i7DataKomp = undefined;
|
|
2779
|
+
let i7DataRQ = undefined;
|
|
2780
|
+
let i7DataHgue = undefined;
|
|
2781
|
+
let suffix = undefined;
|
|
2782
|
+
let uband = undefined;
|
|
2783
|
+
let tCn = undefined; //controlled node of this device
|
|
2784
|
+
let spannungsregelungLokal = undefined;
|
|
2785
|
+
let spannungsregelungRemote = undefined;
|
|
2786
|
+
let knotenSpgGeregelt = undefined;
|
|
2787
|
+
let isRegulatingControl = undefined;
|
|
2788
|
+
let hasGeneratingUnit = undefined;
|
|
2789
|
+
if (condEquip instanceof RotatingMachine_1.RotatingMachine || condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection || condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2790
|
+
i7DataEinsp = i7Data;
|
|
2791
|
+
i7DataRQ = i7Data;
|
|
2792
|
+
}
|
|
2793
|
+
if (condEquip instanceof SynchronousMachine_1.SynchronousMachine) {
|
|
2794
|
+
suffix = '_SM';
|
|
2795
|
+
if (generatingUnit !== undefined) {
|
|
2796
|
+
hasGeneratingUnit = true;
|
|
2797
|
+
}
|
|
2798
|
+
else {
|
|
2799
|
+
hasGeneratingUnit = false;
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
else if (condEquip instanceof AsynchronousMachine_1.AsynchronousMachine) {
|
|
2803
|
+
suffix = '_ASM';
|
|
2804
|
+
}
|
|
2805
|
+
else if (condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection) {
|
|
2806
|
+
suffix = '_ENI';
|
|
2807
|
+
}
|
|
2808
|
+
else if (condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2809
|
+
suffix = '_EI';
|
|
2810
|
+
}
|
|
2811
|
+
else if (condEquip instanceof StaticVarCompensator_1.StaticVarCompensator) {
|
|
2812
|
+
i7DataSVC = i7Data;
|
|
2813
|
+
i7DataRQ = i7Data;
|
|
2814
|
+
suffix = '_SVC';
|
|
2815
|
+
}
|
|
2816
|
+
else if (condEquip instanceof LinearShuntCompensator_1.LinearShuntCompensator) {
|
|
2817
|
+
i7DataKomp = i7Data;
|
|
2818
|
+
i7DataRQ = i7Data;
|
|
2819
|
+
suffix = '_LSC';
|
|
2820
|
+
}
|
|
2821
|
+
else if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
2822
|
+
i7DataHgue = i7Data;
|
|
2823
|
+
suffix = '_ACDCC';
|
|
2824
|
+
}
|
|
2825
|
+
// RegulatingControl: Test if this is a regulating control.
|
|
2826
|
+
if (i7DataEinsp) {
|
|
2827
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.spannungsgeregelt) : false;
|
|
2828
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.rpv_geregelt) : false;
|
|
2829
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataEinsp.knotenspgreg));
|
|
2830
|
+
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2831
|
+
}
|
|
2832
|
+
else if (i7DataKomp) {
|
|
2833
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataKomp.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.flag_lf) : false;
|
|
2834
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataKomp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.rpv_geregelt) : false;
|
|
2835
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataKomp.knotenspgreg));
|
|
2836
|
+
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2837
|
+
}
|
|
2838
|
+
else if (i7DataHgue) {
|
|
2839
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataHgue.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.spannungsgeregelt) : false;
|
|
2840
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataHgue.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.rpv_geregelt) : false;
|
|
2841
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataHgue.knotenspgreg));
|
|
2842
|
+
isRegulatingControl = false;
|
|
2843
|
+
}
|
|
2844
|
+
else if (i7DataSVC) {
|
|
2845
|
+
isRegulatingControl = true;
|
|
2846
|
+
}
|
|
2847
|
+
else {
|
|
2848
|
+
isRegulatingControl = false;
|
|
2849
|
+
}
|
|
2984
2850
|
if (connectivityNode) {
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2987
|
-
if (
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
if (
|
|
2995
|
-
|
|
2996
|
-
if (
|
|
2997
|
-
|
|
2851
|
+
const cpTerminal = this.createConnection(cimModel, condEquip, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
2852
|
+
//create regulating control
|
|
2853
|
+
if (isRegulatingControl && (i7DataEinsp || i7DataKomp)) {
|
|
2854
|
+
let cterminal = undefined; //connection point terminal of this device
|
|
2855
|
+
let tVMax = undefined; //maximum target voltage
|
|
2856
|
+
let tVMin = undefined; //minimum target voltage
|
|
2857
|
+
const regCondEquip = condEquip;
|
|
2858
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2859
|
+
//get rated voltage of controlled node.
|
|
2860
|
+
if (knotenSpgGeregelt && spannungsregelungRemote) {
|
|
2861
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
2862
|
+
if (cterminal === undefined) {
|
|
2863
|
+
let stop = true;
|
|
2864
|
+
}
|
|
2865
|
+
if (cterminal) {
|
|
2866
|
+
tCn = cterminal.getConnectivityNode();
|
|
2867
|
+
if (tCn) {
|
|
2868
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2869
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2870
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2871
|
+
}
|
|
2872
|
+
else {
|
|
2873
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
else {
|
|
2877
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2998
2878
|
}
|
|
2999
2879
|
}
|
|
2880
|
+
if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal) {
|
|
2881
|
+
switch (knotenSpgGeregelt) {
|
|
2882
|
+
case undefined: {
|
|
2883
|
+
cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2884
|
+
if (cterminal === undefined) {
|
|
2885
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
2886
|
+
}
|
|
2887
|
+
break;
|
|
2888
|
+
}
|
|
2889
|
+
default: {
|
|
2890
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
if (cterminal) {
|
|
2894
|
+
tCn = cterminal.getConnectivityNode();
|
|
2895
|
+
if (tCn) {
|
|
2896
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2897
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2898
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2899
|
+
}
|
|
2900
|
+
else {
|
|
2901
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
uband = (0, parser_utils_1.isNumericI7)(tVMax) && (0, parser_utils_1.isNumericI7)(tVMin) ? (0, parser_utils_1.convertToNumberI7)(tVMax) - (0, parser_utils_1.convertToNumberI7)(tVMin) : undefined;
|
|
2906
|
+
if (uband === undefined) {
|
|
2907
|
+
if (tCn) {
|
|
2908
|
+
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
//Create and define regulating control for voltage control
|
|
2913
|
+
if (cterminal !== undefined) {
|
|
2914
|
+
const uuid = (0, parser_utils_1.getUUID)(i7DataRQ.guid_rc);
|
|
2915
|
+
rControl = (0, utils_2.createRegulatingControl)((0, parser_utils_1.getUUID)(i7DataRQ.guid_rc), (0, util_create_1.createNotation)([regCondEquip.getUUID().substring(0, 8), suffix]), true, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage);
|
|
2916
|
+
if (i7DataEinsp) {
|
|
2917
|
+
rControl.discrete = false; //default for ExternalNetworkInjection is false. s. CGMES Doku
|
|
2918
|
+
}
|
|
2919
|
+
else {
|
|
2920
|
+
rControl.discrete = true; //default for LinearShuntCompensator is true because of stepping mode.
|
|
2921
|
+
}
|
|
2922
|
+
rControl.targetDeadband = (0, parser_utils_1.isNumericI7)(uband) ? uband : undefined; //zulässiges Spannungsband
|
|
2923
|
+
/** Spannung in kilo*/
|
|
2924
|
+
rControl.targetValue = usoll;
|
|
2925
|
+
const guidSuffix = (_a = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8);
|
|
2926
|
+
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
2927
|
+
rControl.terminalUUID = cterminal.getUUID();
|
|
2928
|
+
rControl.addRegulatingCondEq(regCondEquip);
|
|
2929
|
+
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
2930
|
+
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
2931
|
+
regCondEquip.regulatingControl = rControl;
|
|
2932
|
+
cimModel.addRegulatingControl(rControl);
|
|
2933
|
+
const term = cimModel.terminals.get(rControl.terminalUUID);
|
|
2934
|
+
if (term) {
|
|
2935
|
+
term.addRegulatingControl(rControl);
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
else {
|
|
2939
|
+
const stop = true;
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
else if (isRegulatingControl && i7DataSVC) {
|
|
2943
|
+
/** Regelung */
|
|
2944
|
+
const regCondEquip = condEquip;
|
|
2945
|
+
const cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2946
|
+
let tVMax = undefined;
|
|
2947
|
+
let tVMin = undefined;
|
|
2948
|
+
if (cterminal) {
|
|
2949
|
+
tCn = cterminal.getConnectivityNode();
|
|
2950
|
+
if (tCn) {
|
|
2951
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2952
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2953
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2954
|
+
}
|
|
2955
|
+
else {
|
|
2956
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
uband = (0, parser_utils_1.isNumericI7)(tVMax) && (0, parser_utils_1.isNumericI7)(tVMin) ? (0, parser_utils_1.convertToNumberI7)(tVMax) - (0, parser_utils_1.convertToNumberI7)(tVMin) : undefined;
|
|
2960
|
+
if (uband === undefined) {
|
|
2961
|
+
if (tCn) {
|
|
2962
|
+
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
if (cterminal !== undefined) {
|
|
2966
|
+
const uuid = (0, parser_utils_1.getUUID)(i7DataSVC.guid_rc);
|
|
2967
|
+
rControl = (0, utils_2.createRegulatingControl)(uuid, (0, util_create_1.createNotation)([condEquip.getUUID().substring(0, 8), suffix]), inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage);
|
|
2968
|
+
rControl.enabled = true;
|
|
2969
|
+
if (isStatcom) {
|
|
2970
|
+
rControl.discrete = true;
|
|
2971
|
+
}
|
|
2972
|
+
else {
|
|
2973
|
+
rControl.discrete = false;
|
|
2974
|
+
}
|
|
2975
|
+
condEquip.controlEnabled = true;
|
|
2976
|
+
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7DataSVC.flag_os);
|
|
2977
|
+
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2978
|
+
if (flagOS && i7DataSVC.trafo) {
|
|
2979
|
+
const trafoUUID = this.integralID2UUID.get(i7DataSVC.trafo);
|
|
2980
|
+
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2981
|
+
if (powerTransformer) {
|
|
2982
|
+
try {
|
|
2983
|
+
for (const end of powerTransformer.powerTransformerEnd) {
|
|
2984
|
+
if (end.phaseTapChanger) {
|
|
2985
|
+
end.phaseTapChanger.controlEnabled = false;
|
|
2986
|
+
}
|
|
2987
|
+
if (end.ratioTapChanger) {
|
|
2988
|
+
end.ratioTapChanger.controlEnabled = false;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
catch (e) {
|
|
2993
|
+
this.logger.debug(`debug --- ${i7DataSVC.constructor.name} Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
rControl.targetValue = usoll;
|
|
2998
|
+
rControl.targetDeadband = uband;
|
|
2999
|
+
rControl.terminal = cterminal;
|
|
3000
|
+
const guidSuffix = (_b = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _b === void 0 ? void 0 : _b.getUUID().substring(0, 8);
|
|
3001
|
+
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
3002
|
+
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
3003
|
+
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
3004
|
+
regCondEquip.regulatingControl = rControl;
|
|
3005
|
+
cterminal.addRegulatingControl(rControl);
|
|
3006
|
+
cimModel.addRegulatingControl(rControl);
|
|
3007
|
+
}
|
|
3008
|
+
else {
|
|
3009
|
+
const stop = true;
|
|
3000
3010
|
}
|
|
3001
3011
|
}
|
|
3002
|
-
|
|
3012
|
+
else if (i7DataHgue) {
|
|
3013
|
+
let cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
3014
|
+
const regelungU = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.u_geregelt);
|
|
3015
|
+
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.p_geregelt);
|
|
3016
|
+
condEquip.pccTerminal = cpTerminal;
|
|
3017
|
+
if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3018
|
+
if (regelungU) {
|
|
3019
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.inverter;
|
|
3020
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.dcVoltage;
|
|
3021
|
+
condEquip.targetUdc = (0, parser_utils_1.isNumericI7)(i7DataHgue.udc) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.udc) : condEquip.ratedUdc;
|
|
3022
|
+
}
|
|
3023
|
+
else if (regelungP) {
|
|
3024
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
3025
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
3026
|
+
condEquip.targetPpcc = (0, parser_utils_1.isNumericI7)(i7DataHgue.pges) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pges) : ((0, parser_utils_1.isNumericI7)(i7DataHgue.pr) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pr) : undefined);
|
|
3027
|
+
}
|
|
3028
|
+
else {
|
|
3029
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
3030
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
3031
|
+
condEquip.targetPpcc = (0, parser_utils_1.isNumericI7)(i7DataHgue.pges) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pges) : ((0, parser_utils_1.isNumericI7)(i7DataHgue.pr) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pr) : undefined);
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3035
|
+
usoll = (0, parser_utils_1.isNumericI7)(i7DataHgue.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.usoll) : undefined;
|
|
3036
|
+
if (regelungU) {
|
|
3037
|
+
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
3038
|
+
condEquip.targetUdc = condEquip.ratedUdc;
|
|
3039
|
+
}
|
|
3040
|
+
else if (regelungP) {
|
|
3041
|
+
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
3042
|
+
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
3043
|
+
condEquip.targetPpcc = condEquip.baseS * -1; //ActivePower
|
|
3044
|
+
condEquip.targetQpcc = 0; //ReactivePower, TODO: define ReactivePowerCapabilityCurve
|
|
3045
|
+
}
|
|
3046
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
3047
|
+
//get rated voltage of controlled node.
|
|
3048
|
+
if (knotenSpgGeregelt && spannungsregelungRemote) {
|
|
3049
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3050
|
+
if (cterminal === undefined) {
|
|
3051
|
+
let stop = true;
|
|
3052
|
+
}
|
|
3053
|
+
if (cterminal) {
|
|
3054
|
+
tCn = cterminal.getConnectivityNode();
|
|
3055
|
+
if (tCn) {
|
|
3056
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3057
|
+
}
|
|
3058
|
+
else {
|
|
3059
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
else {
|
|
3063
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
else if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal && usoll === undefined) {
|
|
3067
|
+
switch (knotenSpgGeregelt) {
|
|
3068
|
+
case undefined: {
|
|
3069
|
+
if (cterminal === undefined) {
|
|
3070
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
3071
|
+
}
|
|
3072
|
+
break;
|
|
3073
|
+
}
|
|
3074
|
+
default: {
|
|
3075
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
if (cterminal) {
|
|
3079
|
+
tCn = cterminal.getConnectivityNode();
|
|
3080
|
+
if (tCn) {
|
|
3081
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
3086
|
+
if (usoll !== undefined) {
|
|
3087
|
+
condEquip.targetUpcc = usoll;
|
|
3088
|
+
}
|
|
3089
|
+
else {
|
|
3090
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Sollspannung konnte nicht ermittelt werden.`);
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
let equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, connectivityNode.connectivityNodeContainer);
|
|
3003
3096
|
if (equipmentContainer) {
|
|
3097
|
+
if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
3098
|
+
equipmentContainer = condEquip.equipmentContainer;
|
|
3099
|
+
}
|
|
3004
3100
|
condEquip.equipmentContainer = equipmentContainer;
|
|
3005
3101
|
equipmentContainer.addEquipment(condEquip);
|
|
3006
3102
|
//TODO: Überarbeitung notwendig, da hier der Präfix nicht eindeutig für Einspeisungen ermittelt werden kann.
|
|
@@ -3021,27 +3117,36 @@ class ConverterIntegral7 {
|
|
|
3021
3117
|
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3022
3118
|
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3023
3119
|
}
|
|
3120
|
+
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3121
|
+
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3122
|
+
integral_prefix_1.HGUEKOPFVSC_PRAEFIX + i7Data.bezeichner;
|
|
3123
|
+
}
|
|
3124
|
+
else if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3125
|
+
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3126
|
+
integral_prefix_1.HGUEKOPFKLASSISCH_PRAEFIX + i7Data.bezeichner;
|
|
3127
|
+
}
|
|
3024
3128
|
condEquip.description = i7Schluessel;
|
|
3025
|
-
if (
|
|
3129
|
+
if (hasGeneratingUnit) {
|
|
3026
3130
|
const substation = this.determineEquipmentContainer('Substation', cimModel, equipmentContainer);
|
|
3027
3131
|
generatingUnit.equipmentContainer = substation;
|
|
3028
3132
|
}
|
|
3029
3133
|
}
|
|
3030
3134
|
else {
|
|
3031
|
-
this.logger.error(
|
|
3135
|
+
this.logger.error(`error --- ${(_c = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _c === void 0 ? void 0 : _c.name} ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3032
3136
|
}
|
|
3033
3137
|
}
|
|
3034
3138
|
else {
|
|
3035
|
-
this.logger.error(
|
|
3139
|
+
this.logger.error(`error --- ${(_d = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _d === void 0 ? void 0 : _d.name} ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3036
3140
|
}
|
|
3141
|
+
return rControl;
|
|
3037
3142
|
}
|
|
3038
3143
|
convertQuerkupplungen(cimModel, integral7, schaltanlagenAbschnittIDs) {
|
|
3039
3144
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3040
3145
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.QUERKUPPLUNG)) {
|
|
3041
3146
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.QUERKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.QUERKUPPLUNG), schaltanlagenAbschnittIDs));
|
|
3042
3147
|
for (const i7Data of result) {
|
|
3043
|
-
const
|
|
3044
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3148
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3149
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_B']), 'Querkupplung');
|
|
3045
3150
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3046
3151
|
bay.locationID = i7Data.ips_folder_id;
|
|
3047
3152
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
@@ -3049,12 +3154,12 @@ class ConverterIntegral7 {
|
|
|
3049
3154
|
bay.voltageLevel = voltageLevel;
|
|
3050
3155
|
voltageLevel.addBay(bay);
|
|
3051
3156
|
const i7Schluessel = voltageLevel.description +
|
|
3052
|
-
|
|
3157
|
+
integral_prefix_1.QUERKUPPLUNG_PRAEFIX +
|
|
3053
3158
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
3054
3159
|
bay.description = i7Schluessel;
|
|
3055
3160
|
}
|
|
3056
3161
|
else {
|
|
3057
|
-
this.logger.debug(`Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3162
|
+
this.logger.debug(`debug --- Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3058
3163
|
}
|
|
3059
3164
|
integral7.querkupplungIDs.push(i7Data.id);
|
|
3060
3165
|
cimModel.addBay(bay);
|
|
@@ -3062,7 +3167,7 @@ class ConverterIntegral7 {
|
|
|
3062
3167
|
}
|
|
3063
3168
|
}
|
|
3064
3169
|
else {
|
|
3065
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
3170
|
+
this.logger.debug(`debug --- Tabelle ${integral_sql_1.Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
3066
3171
|
}
|
|
3067
3172
|
});
|
|
3068
3173
|
}
|
|
@@ -3071,8 +3176,8 @@ class ConverterIntegral7 {
|
|
|
3071
3176
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3072
3177
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LAENGSKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG), schaltanlagenIDs));
|
|
3073
3178
|
for (const i7Data of result) {
|
|
3074
|
-
const
|
|
3075
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3179
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3180
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_B']), i7Data.kurzname, 'Laengskupplung');
|
|
3076
3181
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3077
3182
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3078
3183
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -3085,7 +3190,7 @@ class ConverterIntegral7 {
|
|
|
3085
3190
|
bay.description = i7Schluessel;
|
|
3086
3191
|
}
|
|
3087
3192
|
else {
|
|
3088
|
-
this.logger.debug(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3193
|
+
this.logger.debug(`debug --- Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3089
3194
|
}
|
|
3090
3195
|
const lKupplungImpl = new Laengskupplung_1.LaengskupplungImpl(i7Data);
|
|
3091
3196
|
integral7.integralLaengskupplungen.set(i7Data.id, lKupplungImpl);
|
|
@@ -3095,7 +3200,7 @@ class ConverterIntegral7 {
|
|
|
3095
3200
|
}
|
|
3096
3201
|
}
|
|
3097
3202
|
else {
|
|
3098
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG} ist nicht vorhanden.`);
|
|
3203
|
+
this.logger.debug(`debug --- Tabelle ${integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG} ist nicht vorhanden.`);
|
|
3099
3204
|
}
|
|
3100
3205
|
});
|
|
3101
3206
|
}
|
|
@@ -3273,11 +3378,8 @@ class ConverterIntegral7 {
|
|
|
3273
3378
|
/** Spannungsebene */
|
|
3274
3379
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3275
3380
|
seriesCompensator.baseVoltage = baseVoltages[0] ? baseVoltages[0] : baseVoltages[1];
|
|
3276
|
-
if (seriesCompensator.baseVoltage === undefined) {
|
|
3277
|
-
let stop = true;
|
|
3278
|
-
}
|
|
3279
3381
|
/** EQ */
|
|
3280
|
-
const ur =
|
|
3382
|
+
const ur = seriesCompensator.baseVoltage.nominalVoltage.value; //getU(i7Data.ur);
|
|
3281
3383
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3282
3384
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3283
3385
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3290,7 +3392,7 @@ class ConverterIntegral7 {
|
|
|
3290
3392
|
/** CurrentLimit */
|
|
3291
3393
|
const terminal = startTerminal;
|
|
3292
3394
|
if (terminal) {
|
|
3293
|
-
this.
|
|
3395
|
+
this.setConductingEquipmentOperationalLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, ir, new CurrentLimit_1.CurrentLimit());
|
|
3294
3396
|
}
|
|
3295
3397
|
else {
|
|
3296
3398
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3361,9 +3463,9 @@ class ConverterIntegral7 {
|
|
|
3361
3463
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.eknoten)));
|
|
3362
3464
|
/** Spannungsebene */
|
|
3363
3465
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3364
|
-
seriesCompensator.baseVoltage = baseVoltages[0];
|
|
3466
|
+
seriesCompensator.baseVoltage = baseVoltages[0] ? baseVoltages[0] : baseVoltages[1];
|
|
3365
3467
|
/** EQ */
|
|
3366
|
-
const ur =
|
|
3468
|
+
const ur = seriesCompensator.baseVoltage.nominalVoltage.value; //getU(i7Data.ur);
|
|
3367
3469
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3368
3470
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3369
3471
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3376,7 +3478,7 @@ class ConverterIntegral7 {
|
|
|
3376
3478
|
/** CurrentLimit */
|
|
3377
3479
|
const terminal = startTerminal;
|
|
3378
3480
|
if (terminal) {
|
|
3379
|
-
this.
|
|
3481
|
+
this.setConductingEquipmentOperationalLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, ir, new CurrentLimit_1.CurrentLimit());
|
|
3380
3482
|
}
|
|
3381
3483
|
else {
|
|
3382
3484
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3447,6 +3549,7 @@ class ConverterIntegral7 {
|
|
|
3447
3549
|
}
|
|
3448
3550
|
// Verbindung herstellen
|
|
3449
3551
|
const terminal = this.createConnection(cimModel, junction, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3552
|
+
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3450
3553
|
integral7.sternPunktImpModel.connectivityNodes.set(connectivityNode.mrid, connectivityNode);
|
|
3451
3554
|
integral7.sternPunktImpModel.junctions.set(junction.mrid, junction);
|
|
3452
3555
|
integral7.sternPunktImpModel.stpSchieneJunctionUUIDs.set(i7DataSchiene.id, junction.mrid);
|
|
@@ -3499,6 +3602,7 @@ class ConverterIntegral7 {
|
|
|
3499
3602
|
// Verbindung herstellen
|
|
3500
3603
|
if (connectivityNode) {
|
|
3501
3604
|
const terminal = this.createConnection(cimModel, conductingEquip, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3605
|
+
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3502
3606
|
}
|
|
3503
3607
|
}
|
|
3504
3608
|
}
|
|
@@ -3557,8 +3661,8 @@ class ConverterIntegral7 {
|
|
|
3557
3661
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3558
3662
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LAENGSKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG), schaltanlagenIDs));
|
|
3559
3663
|
for (const i7Data of result) {
|
|
3560
|
-
const
|
|
3561
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3664
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3665
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_B']), i7Data.kurzname, 'Laengskupplung');
|
|
3562
3666
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3563
3667
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3564
3668
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -3624,6 +3728,7 @@ class ConverterIntegral7 {
|
|
|
3624
3728
|
object.x0 = +data.x0; // new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3625
3729
|
object.c0 = +data.c0; // new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3626
3730
|
object.ratedCurrent = +data.ir;
|
|
3731
|
+
object.limitingCurrent = +data.igrenz;
|
|
3627
3732
|
}
|
|
3628
3733
|
convertLeitungen(frame, integral7, defaultValuesConfig) {
|
|
3629
3734
|
var _a, _b, _c;
|
|
@@ -3632,9 +3737,6 @@ class ConverterIntegral7 {
|
|
|
3632
3737
|
const cimModel = frame.cimModel;
|
|
3633
3738
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LEITUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LEITUNG), integral7.leitungsAnschlussIDs));
|
|
3634
3739
|
const leitungIDs = result.map(elem => elem.id);
|
|
3635
|
-
const lt1 = leitungIDs.find(it => it === 105031594);
|
|
3636
|
-
/* const lt2 = leitungIDs.find(it => it === 105031293);
|
|
3637
|
-
const lt2 = leitungIDs.find(it => it === 105031293);*/
|
|
3638
3740
|
const cableAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.KABEL);
|
|
3639
3741
|
const overheadAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.FREILEITUNG);
|
|
3640
3742
|
let type = integral_sql_1.I7Objects.STROMKREISABSCHNITT;
|
|
@@ -3687,8 +3789,8 @@ class ConverterIntegral7 {
|
|
|
3687
3789
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner) +
|
|
3688
3790
|
'-' +
|
|
3689
3791
|
(0, utils_2.ueberpruefeZeichenkette)(stk.bezeichner);
|
|
3690
|
-
const
|
|
3691
|
-
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(
|
|
3792
|
+
const uuid = (0, parser_utils_1.getUUID)(stk.custom_guid_0120 + stk.custom_guid_2137, this.objectMappingConfig.standardiseUuid);
|
|
3793
|
+
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(uuid, (0, util_create_1.createNotation)([name, '_' + stk.pos.toString(), '_' + uuid.substring(0, 8), '_ACLS'], 32, true), i7Data.stkabname, i7Schluessel);
|
|
3692
3794
|
if (stk.baujahr) {
|
|
3693
3795
|
const wire = new EVWireObject_1.EVWireObject(common_utils_1.CommonUtils.generateUUID(), stk.name);
|
|
3694
3796
|
wire.type = 'Stromkreisabschnitt';
|
|
@@ -3715,6 +3817,9 @@ class ConverterIntegral7 {
|
|
|
3715
3817
|
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt
|
|
3716
3818
|
*/
|
|
3717
3819
|
const acLineSegmentStart = acLineSegments[0];
|
|
3820
|
+
if (line.getUUID() === "4637c6dc-fad5-45f1-91e0-091d00717a3b" || line.getUUID() === "a992f3c9-f2e1-4cd6-8cc6-fd3d5d167871") {
|
|
3821
|
+
const stop = true;
|
|
3822
|
+
}
|
|
3718
3823
|
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
3719
3824
|
if (startTerminal) {
|
|
3720
3825
|
//this.setACLineSegmentCurrentLimt(cimModel, acLineSegmentStart, acLineSegmentStart.description, startTerminal);
|
|
@@ -3816,7 +3921,7 @@ class ConverterIntegral7 {
|
|
|
3816
3921
|
}
|
|
3817
3922
|
}
|
|
3818
3923
|
else {
|
|
3819
|
-
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}:
|
|
3924
|
+
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}: SubGeographicalRegion konnte nicht bestimmt werden.`);
|
|
3820
3925
|
}
|
|
3821
3926
|
tmp_terminal = values.next();
|
|
3822
3927
|
}
|
|
@@ -3838,7 +3943,7 @@ class ConverterIntegral7 {
|
|
|
3838
3943
|
});
|
|
3839
3944
|
}
|
|
3840
3945
|
convertDCLines(cimModel, integral7, defaultValuesConfig) {
|
|
3841
|
-
var _a;
|
|
3946
|
+
var _a, _b;
|
|
3842
3947
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3843
3948
|
//Workaround: Prefill Integral 7 model hgueAnschlussKnotenIDs because of missing bays and schlaufen for dc objects this data structure keeps empty.
|
|
3844
3949
|
//for(let dc_node of this.hgueAnschlussKnotenIDs){
|
|
@@ -3849,7 +3954,7 @@ class ConverterIntegral7 {
|
|
|
3849
3954
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_LEITUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_LEITUNG), integral7.hgueAnschlussKnotenIDs));
|
|
3850
3955
|
for (const i7Data of result) {
|
|
3851
3956
|
//console.log(getUUID(i7Data.guid_dcline));
|
|
3852
|
-
integral7.
|
|
3957
|
+
integral7.integralHgueLeitungIds.add(i7Data.id);
|
|
3853
3958
|
const dcLine = new DCLine_1.DCLine((0, parser_utils_1.getUUID)(i7Data.guid_dcline, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCL']));
|
|
3854
3959
|
let dcLineNeg = undefined;
|
|
3855
3960
|
const i7Schluessel = integral_prefix_1.HGUELEITUNG_PRAEFIX +
|
|
@@ -3862,7 +3967,10 @@ class ConverterIntegral7 {
|
|
|
3862
3967
|
let converterTargetNeg = false;
|
|
3863
3968
|
let converterUnitTargetSide = false;
|
|
3864
3969
|
let bipol = (0, parser_utils_1.convertToBooleanI7)(i7Data.bipol);
|
|
3865
|
-
bipol
|
|
3970
|
+
if (bipol === undefined) {
|
|
3971
|
+
bipol = false;
|
|
3972
|
+
}
|
|
3973
|
+
let dcNode = undefined;
|
|
3866
3974
|
//Parameter "guidp" is available for monopolar and bipolar dc systems. Thus create DCLineSegment with positive sign property in any case.
|
|
3867
3975
|
const dcLineSegment = new DCLineSegment_1.DCLineSegment((0, parser_utils_1.getUUID)(i7Data.guidp, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCLS']), i7Data.kurzname, i7Schluessel);
|
|
3868
3976
|
let dcLineSegmentNeg = undefined;
|
|
@@ -3874,7 +3982,7 @@ class ConverterIntegral7 {
|
|
|
3874
3982
|
dcLineSegment.capacitance = undefined;
|
|
3875
3983
|
dcLineSegment.inductance = undefined;
|
|
3876
3984
|
/**EQ: given directly by the INTEGRAL system model */
|
|
3877
|
-
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (
|
|
3985
|
+
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3878
3986
|
dcLineSegment.equipmentContainer = dcLine;
|
|
3879
3987
|
//create second dcLineSegment in case this dcLine is a bipol.
|
|
3880
3988
|
if (bipol) {
|
|
@@ -3883,34 +3991,42 @@ class ConverterIntegral7 {
|
|
|
3883
3991
|
dcLineSegmentNeg.length = dcLineSegment.length;
|
|
3884
3992
|
dcLineSegmentNeg.capacitance = undefined;
|
|
3885
3993
|
dcLineSegmentNeg.inductance = undefined;
|
|
3886
|
-
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (
|
|
3994
|
+
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3887
3995
|
dcLineSegmentNeg.equipmentContainer = dcLineNeg;
|
|
3888
3996
|
}
|
|
3889
3997
|
const acDCConverterStart = cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) : undefined;
|
|
3890
3998
|
converterStart = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStart !== undefined);
|
|
3891
3999
|
let acDCConverterStartNeg = undefined;
|
|
3892
4000
|
const acDCConverterTarget = cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) : undefined;
|
|
3893
|
-
|
|
4001
|
+
converterTarget = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTarget !== undefined);
|
|
3894
4002
|
let acDCConverterTargetNeg = undefined;
|
|
4003
|
+
if (acDCConverterTarget === undefined) {
|
|
4004
|
+
const stop = true;
|
|
4005
|
+
}
|
|
4006
|
+
else if (acDCConverterStart === undefined) {
|
|
4007
|
+
const stop = true;
|
|
4008
|
+
}
|
|
4009
|
+
const int7hguekopfStart = converterStart ? (_a = integral7.integralHgueKopf) === null || _a === void 0 ? void 0 : _a.get(this.UUID2Integral7ID.get(acDCConverterStart.getUUID()).find(elem => elem)) : undefined;
|
|
4010
|
+
const int7hguekopfTarget = converterTarget ? (_b = integral7.integralHgueKopf) === null || _b === void 0 ? void 0 : _b.get(this.UUID2Integral7ID.get(acDCConverterTarget.getUUID()).find(elem => elem)) : undefined;
|
|
3895
4011
|
//Setting acDCConverterStartNeg and acDCConverterTargetNeg in case this DCLine is a bipol
|
|
3896
4012
|
if (bipol) {
|
|
3897
|
-
|
|
3898
|
-
acDCConverterStartNeg = converterStart && int7hguekopf !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopf, acDCConverterStart.constructor.name, acDCConverterStart) : undefined;
|
|
4013
|
+
acDCConverterStartNeg = converterStart && int7hguekopfStart !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopfStart, acDCConverterStart.constructor.name, acDCConverterStart) : undefined;
|
|
3899
4014
|
converterStartNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStartNeg !== undefined);
|
|
3900
|
-
acDCConverterTargetNeg = converterTarget &&
|
|
4015
|
+
acDCConverterTargetNeg = converterTarget && int7hguekopfTarget !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopfTarget, acDCConverterTarget.constructor.name, acDCConverterTarget) : undefined;
|
|
3901
4016
|
converterTargetNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTargetNeg !== undefined);
|
|
3902
4017
|
}
|
|
4018
|
+
//Set grounding for dcConverterUnit
|
|
4019
|
+
const converterUnitStart = (acDCConverterStart === null || acDCConverterStart === void 0 ? void 0 : acDCConverterStart.equipmentContainer) ? acDCConverterStart.equipmentContainer : undefined;
|
|
4020
|
+
converterUnitStartSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitStart !== undefined);
|
|
4021
|
+
const converterUnitTarget = (acDCConverterTarget === null || acDCConverterTarget === void 0 ? void 0 : acDCConverterTarget.equipmentContainer) ? acDCConverterTarget.equipmentContainer : undefined;
|
|
4022
|
+
converterUnitTargetSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitTarget !== undefined);
|
|
3903
4023
|
if (converterStart && !converterStartNeg) {
|
|
3904
|
-
createDCGround(acDCConverterStart);
|
|
4024
|
+
dcNode = createDCGround(cimModel, acDCConverterStart, int7hguekopfStart);
|
|
3905
4025
|
}
|
|
3906
4026
|
else if (converterStart && converterStartNeg) {
|
|
3907
|
-
createDCGround(acDCConverterStart);
|
|
3908
|
-
connectDCGround(acDCConverterStartNeg);
|
|
4027
|
+
dcNode = createDCGround(cimModel, acDCConverterStart, int7hguekopfStart);
|
|
4028
|
+
connectDCGround(cimModel, acDCConverterStartNeg, int7hguekopfStart, dcNode, DCPolarityKind_1.DCPolarityKind.middle);
|
|
3909
4029
|
}
|
|
3910
|
-
const converterUnitStart = acDCConverterStart.equipmentContainer ? acDCConverterStart.equipmentContainer : undefined;
|
|
3911
|
-
converterUnitStartSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitStart !== undefined);
|
|
3912
|
-
const converterUnitTarget = acDCConverterTarget.equipmentContainer ? acDCConverterTarget.equipmentContainer : undefined;
|
|
3913
|
-
converterUnitTargetSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitTarget !== undefined);
|
|
3914
4030
|
switch (bipol) {
|
|
3915
4031
|
case true: {
|
|
3916
4032
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
@@ -3921,11 +4037,11 @@ class ConverterIntegral7 {
|
|
|
3921
4037
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
3922
4038
|
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
3923
4039
|
if (converterTarget && !converterTargetNeg) {
|
|
3924
|
-
createDCGround(acDCConverterTarget);
|
|
4040
|
+
dcNode = createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
3925
4041
|
}
|
|
3926
4042
|
else if (converterTarget && converterTargetNeg) {
|
|
3927
|
-
createDCGround(acDCConverterTarget);
|
|
3928
|
-
connectDCGround(acDCConverterTargetNeg);
|
|
4043
|
+
dcNode = createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
4044
|
+
connectDCGround(cimModel, acDCConverterTargetNeg, int7hguekopfTarget, dcNode, DCPolarityKind_1.DCPolarityKind.middle);
|
|
3929
4045
|
}
|
|
3930
4046
|
else {
|
|
3931
4047
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r ACDCConverter konnte nicht ermittelt werden.`);
|
|
@@ -3939,27 +4055,29 @@ class ConverterIntegral7 {
|
|
|
3939
4055
|
case false: {
|
|
3940
4056
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
3941
4057
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3942
|
-
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3943
|
-
createNeutralGroundReturn(converterUnitStart, converterUnitTarget);
|
|
3944
4058
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r DCConverterUnit am Leitungsende konnte nicht ermittelt werden.`);
|
|
3945
4059
|
}
|
|
3946
4060
|
else if (converterUnitStartSide && converterUnitTargetSide) {
|
|
3947
4061
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4062
|
+
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4063
|
+
createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
3948
4064
|
}
|
|
4065
|
+
break;
|
|
3949
4066
|
}
|
|
3950
4067
|
default: {
|
|
3951
|
-
this.logger.
|
|
4068
|
+
this.logger.info(`info --- HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: die bipol-Eigenschaft ist nicht gesetzt.`);
|
|
3952
4069
|
}
|
|
3953
4070
|
}
|
|
3954
4071
|
// Topologie DC
|
|
3955
4072
|
/* Anfang / Ende DCNodes*/
|
|
3956
|
-
|
|
3957
|
-
const startDCNodeNeg =
|
|
4073
|
+
let startDCNode = converterStart ? getDCNodeFromConverter(acDCConverterStart, DCPolarityKind_1.DCPolarityKind.positive) : undefined;
|
|
4074
|
+
const startDCNodeNeg = converterStartNeg ? getDCNodeFromConverter(acDCConverterStartNeg, DCPolarityKind_1.DCPolarityKind.negative) : undefined;
|
|
3958
4075
|
if (startDCNode) {
|
|
3959
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.
|
|
3960
|
-
dcTerminal.connected = true;
|
|
4076
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(eval('i7Data.guid_dcterminalp1'), this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT'], 32, true));
|
|
3961
4077
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
4078
|
+
dcTerminal.connected = true;
|
|
3962
4079
|
dcTerminal.dcNode = startDCNode;
|
|
4080
|
+
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3963
4081
|
startDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3964
4082
|
cimModel.addDCTerminal(dcTerminal);
|
|
3965
4083
|
}
|
|
@@ -3967,23 +4085,23 @@ class ConverterIntegral7 {
|
|
|
3967
4085
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
3968
4086
|
}
|
|
3969
4087
|
if (startDCNodeNeg) {
|
|
3970
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.
|
|
3971
|
-
dcTerminal.connected = true;
|
|
4088
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(eval('i7Data.guid_dcterminaln1')), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCT'], 32, true));
|
|
3972
4089
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
3973
4090
|
dcTerminal.dcNode = startDCNodeNeg;
|
|
4091
|
+
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3974
4092
|
startDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3975
4093
|
cimModel.addDCTerminal(dcTerminal);
|
|
3976
4094
|
}
|
|
3977
4095
|
else {
|
|
3978
4096
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten NEG. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
3979
4097
|
}
|
|
3980
|
-
const targetDCNode =
|
|
3981
|
-
const targetDCNodeNeg =
|
|
4098
|
+
const targetDCNode = converterTarget ? getDCNodeFromConverter(acDCConverterTarget, DCPolarityKind_1.DCPolarityKind.positive) : undefined;
|
|
4099
|
+
const targetDCNodeNeg = converterTargetNeg ? getDCNodeFromConverter(acDCConverterTargetNeg, DCPolarityKind_1.DCPolarityKind.negative) : undefined;
|
|
3982
4100
|
if (targetDCNode) {
|
|
3983
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3984
|
-
dcTerminal.connected = true;
|
|
4101
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(eval('i7Data.guid_dcterminalp2')), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT'], 32, true));
|
|
3985
4102
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
3986
4103
|
dcTerminal.dcNode = targetDCNode;
|
|
4104
|
+
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3987
4105
|
targetDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3988
4106
|
cimModel.addDCTerminal(dcTerminal);
|
|
3989
4107
|
}
|
|
@@ -3991,10 +4109,10 @@ class ConverterIntegral7 {
|
|
|
3991
4109
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Zielknoten. ${i7Data.enetzobjekt} ${this.integralID2UUID.get(i7Data.enetzobjekt)}`);
|
|
3992
4110
|
}
|
|
3993
4111
|
if (targetDCNodeNeg) {
|
|
3994
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3995
|
-
dcTerminal.connected = true;
|
|
4112
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(eval('i7Data.guid_dcterminaln2')), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCT'], 32, true));
|
|
3996
4113
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
3997
4114
|
dcTerminal.dcNode = targetDCNodeNeg;
|
|
4115
|
+
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3998
4116
|
targetDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3999
4117
|
cimModel.addDCTerminal(dcTerminal);
|
|
4000
4118
|
}
|
|
@@ -4003,7 +4121,7 @@ class ConverterIntegral7 {
|
|
|
4003
4121
|
}
|
|
4004
4122
|
cimModel.addDCLine(dcLine);
|
|
4005
4123
|
cimModel.addDCLineSegment(dcLineSegment);
|
|
4006
|
-
if (bipol) {
|
|
4124
|
+
if (bipol && dcLineNeg && dcLineSegmentNeg) {
|
|
4007
4125
|
cimModel.addDCLine(dcLineNeg);
|
|
4008
4126
|
cimModel.addDCLineSegment(dcLineSegmentNeg);
|
|
4009
4127
|
}
|
|
@@ -4179,9 +4297,12 @@ class ConverterIntegral7 {
|
|
|
4179
4297
|
}
|
|
4180
4298
|
}
|
|
4181
4299
|
for (const i7Data of result) {
|
|
4182
|
-
const
|
|
4183
|
-
|
|
4184
|
-
|
|
4300
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4301
|
+
if (uuid === "02b17e6c-eeed-451e-a822-c54e6d6c4db1") {
|
|
4302
|
+
const stop = true;
|
|
4303
|
+
}
|
|
4304
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_PT']), i7Data.kurzname, i7Data.kommentar);
|
|
4305
|
+
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer, this.configUuid);
|
|
4185
4306
|
/** AssetInfos */
|
|
4186
4307
|
if (i7Data.baujahr) {
|
|
4187
4308
|
util_asset_model_1.UtilAssetModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
@@ -4238,9 +4359,7 @@ class ConverterIntegral7 {
|
|
|
4238
4359
|
const ukr = (0, utils_2.getUkrTrafo)(i7Data, powerTransformerInfo, '');
|
|
4239
4360
|
const sr = (0, utils_2.getSrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber, false);
|
|
4240
4361
|
const ur = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber);
|
|
4241
|
-
|
|
4242
|
-
// I rated
|
|
4243
|
-
const ir1 = (0, utils_2.getTrafoIr)(ur, sr);
|
|
4362
|
+
const sdauer = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer) : sr;
|
|
4244
4363
|
// P0 Lastverluste im I7 Modell p_leer
|
|
4245
4364
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4246
4365
|
// Leerlaufverluste
|
|
@@ -4269,7 +4388,7 @@ class ConverterIntegral7 {
|
|
|
4269
4388
|
const startTerminal = start ? this.createConnection(cimModel, powerTransformer, start, PhaseCode.ABC, true, 1) : undefined;*/
|
|
4270
4389
|
if (!startTerminal)
|
|
4271
4390
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
4272
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7,
|
|
4391
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7, sdauer, i7Data, defaultValuesConfig);
|
|
4273
4392
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4274
4393
|
let equivalentInjection = undefined;
|
|
4275
4394
|
if (startTerminal) {
|
|
@@ -4295,14 +4414,12 @@ class ConverterIntegral7 {
|
|
|
4295
4414
|
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4296
4415
|
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4297
4416
|
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4298
|
-
// I rated
|
|
4299
|
-
const ir2 = (sr * Math.pow(10, 6) / ur2 * 1000) / Math.sqrt(3);
|
|
4300
4417
|
/* const ziel = cimModel.getObject(this.integralID2UUID.get(i7Data.eknoten));
|
|
4301
4418
|
const zielTerminal = ziel ? this.createConnection(cimModel, powerTransformer, ziel, PhaseCode.ABC, true, 2) : undefined;*/
|
|
4302
4419
|
const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
4303
4420
|
if (!zielTerminal)
|
|
4304
4421
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Zielknoten.`);
|
|
4305
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7,
|
|
4422
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7, undefined, i7Data, defaultValuesConfig);
|
|
4306
4423
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4307
4424
|
if (zielTerminal) {
|
|
4308
4425
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten));
|
|
@@ -4391,9 +4508,16 @@ class ConverterIntegral7 {
|
|
|
4391
4508
|
}
|
|
4392
4509
|
for (const i7Data of result) {
|
|
4393
4510
|
const sternpunktKnotenMap = new Map();
|
|
4394
|
-
const
|
|
4395
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(
|
|
4396
|
-
const
|
|
4511
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4512
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_PT']), i7Data.kurzname, i7Data.kommentar);
|
|
4513
|
+
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4514
|
+
if (substation) {
|
|
4515
|
+
powerTransformer.equipmentContainer = substation;
|
|
4516
|
+
}
|
|
4517
|
+
else {
|
|
4518
|
+
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4519
|
+
}
|
|
4520
|
+
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer, this.configUuid);
|
|
4397
4521
|
/** AssetInfos */
|
|
4398
4522
|
if (i7Data.baujahr) {
|
|
4399
4523
|
util_asset_model_1.UtilAssetModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
@@ -4403,13 +4527,6 @@ class ConverterIntegral7 {
|
|
|
4403
4527
|
facility.setAssetInfo(powerTransformerInfo);
|
|
4404
4528
|
powerTransformerInfo.addAsset(facility);
|
|
4405
4529
|
}
|
|
4406
|
-
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4407
|
-
if (substation) {
|
|
4408
|
-
powerTransformer.equipmentContainer = substation;
|
|
4409
|
-
}
|
|
4410
|
-
else {
|
|
4411
|
-
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4412
|
-
}
|
|
4413
4530
|
const schaltgruppe = i7Data.schaltgr;
|
|
4414
4531
|
//Set property 'isPartOfGeneratorUnit' to 'true' if property 'Blocktransformator' is set in Integral data.
|
|
4415
4532
|
if (this.blocktransformatoren.includes((0, parser_utils_1.convertToNumberI7)(i7Data.id))) {
|
|
@@ -4439,10 +4556,9 @@ class ConverterIntegral7 {
|
|
|
4439
4556
|
const ur1 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 1);
|
|
4440
4557
|
const ur2 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 2);
|
|
4441
4558
|
const ur3 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 3);
|
|
4442
|
-
|
|
4443
|
-
const
|
|
4444
|
-
const
|
|
4445
|
-
const ir3 = sr3 * Math.pow(10, 6) / ((ur3 * Math.pow(10, 3)) * Math.sqrt(3));
|
|
4559
|
+
const sdauer1 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_1) : sr1;
|
|
4560
|
+
const sdauer2 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_2) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_2) : sr2;
|
|
4561
|
+
const sdauer3 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_3) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_3) : sr3;
|
|
4446
4562
|
//Leerlaufverluste in kW
|
|
4447
4563
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4448
4564
|
// Leerlaufstrom bezogen auf Wicklung mit dem grössten Sr in %
|
|
@@ -4495,7 +4611,7 @@ class ConverterIntegral7 {
|
|
|
4495
4611
|
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4496
4612
|
powerTransformerEnd1.ratedU = ur1;
|
|
4497
4613
|
powerTransformerEnd1.ratedS = sr1;
|
|
4498
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7,
|
|
4614
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7, sdauer1, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4499
4615
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4500
4616
|
let equivalentInjection = undefined;
|
|
4501
4617
|
if (terminal1) {
|
|
@@ -4505,6 +4621,9 @@ class ConverterIntegral7 {
|
|
|
4505
4621
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
4506
4622
|
}
|
|
4507
4623
|
}
|
|
4624
|
+
if (powerTransformer.mrid === "49afe40b-89cc-419f-afc5-f330c6589f82") {
|
|
4625
|
+
const stop = true;
|
|
4626
|
+
}
|
|
4508
4627
|
//set transformer end winding connection
|
|
4509
4628
|
powerTransformerEnd1.connectionKind = (0, utils_2.getSchaltgruppe)(schaltgruppe, powerTransformerEnd1.endNumber, powerTransformerEnd1.grounded);
|
|
4510
4629
|
powerTransformerEnd1.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
@@ -4545,7 +4664,7 @@ class ConverterIntegral7 {
|
|
|
4545
4664
|
powerTransformerEnd2.ratedS = sr2;
|
|
4546
4665
|
powerTransformerEnd2.ratedU = ur2;
|
|
4547
4666
|
powerTransformerEnd2.powerTransformer = powerTransformer;
|
|
4548
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7,
|
|
4667
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7, sdauer2, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4549
4668
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4550
4669
|
equivalentInjection = undefined;
|
|
4551
4670
|
if (terminal2) {
|
|
@@ -4595,7 +4714,7 @@ class ConverterIntegral7 {
|
|
|
4595
4714
|
powerTransformerEnd3.ratedS = sr3;
|
|
4596
4715
|
powerTransformerEnd3.ratedU = ur3;
|
|
4597
4716
|
powerTransformerEnd3.powerTransformer = powerTransformer;
|
|
4598
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7,
|
|
4717
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7, sdauer3, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4599
4718
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4600
4719
|
equivalentInjection = undefined;
|
|
4601
4720
|
if (terminal3) {
|
|
@@ -4748,60 +4867,6 @@ class ConverterIntegral7 {
|
|
|
4748
4867
|
equipment.equipmentContainer = undefined;
|
|
4749
4868
|
cimModel.removeObject(equipment);
|
|
4750
4869
|
}
|
|
4751
|
-
/** ConnectivityNodes */
|
|
4752
|
-
/** Change EquipmentContainer from Substation/VoltageLevel to Line */
|
|
4753
|
-
/* const location = substation.location;
|
|
4754
|
-
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
4755
|
-
const connectivityNode = connectivityNodes[i];
|
|
4756
|
-
connectivityNode.connectivityNodeContainer = line;
|
|
4757
|
-
line.addConnectivityNode(connectivityNode);
|
|
4758
|
-
/!** Junction *!/
|
|
4759
|
-
//TODO ggfs. mit Grenzknoten verbinden
|
|
4760
|
-
const junction = new Junction(generateUUID(), `${line.name} BD_Junc`, `Junction`, 'Junction for Geo');
|
|
4761
|
-
junction.equipmentContainer = line;
|
|
4762
|
-
|
|
4763
|
-
/!**
|
|
4764
|
-
* Junction class is included in the boundary for the purpose of GeographicalLocation profile and
|
|
4765
|
-
* for special representation of the boundary points (Xnodes).
|
|
4766
|
-
* The Terminal of the Junction is included in the EQ instance file.
|
|
4767
|
-
* The Junction is contained in the same Line as the ConnectivityNode is contained.
|
|
4768
|
-
* *!/
|
|
4769
|
-
const terminal = new Terminal(generateUUID(),'boundary_junction_label', 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
4770
|
-
terminal.conductingEquipment = junction;
|
|
4771
|
-
terminal.connectivityNode = connectivityNode;
|
|
4772
|
-
junction.terminals.set(terminal.getUUID(), terminal);
|
|
4773
|
-
masFrame.cimModel.addTerminal(terminal);
|
|
4774
|
-
// MAS GL Profil BD Modell Abhängigkeit hinzufügen
|
|
4775
|
-
masFrame.addDependentModel(RDF_XML.PROFILE_EQ_BD, frame.getModelUUID(RDF_XML.PROFILE_EQ_BD));
|
|
4776
|
-
/!** Geokoordinaten *!/
|
|
4777
|
-
/!** Die Geokoordinaten der UA wird auf die Junction des ConnectivityNodes übertragen*!/
|
|
4778
|
-
if (location) {
|
|
4779
|
-
const clonedLocation = new Location(generateUUID(), `Location ${i + 1}`);
|
|
4780
|
-
clonedLocation.addPowerSystemResource(junction);
|
|
4781
|
-
clonedLocation.coordinateSystem = location.coordinateSystem;
|
|
4782
|
-
const clonedPositionPoint = new PositionPoint(generateUUID(), `PositionPoint ${i + 1}`);
|
|
4783
|
-
/!** Lan Länge *!/ //Take first position point found for this location.
|
|
4784
|
-
clonedPositionPoint.xPosition = location.positionPoints[0].xPosition;
|
|
4785
|
-
/!** Lat Breite *!/
|
|
4786
|
-
clonedPositionPoint.yPosition = location.positionPoints[0].yPosition;
|
|
4787
|
-
|
|
4788
|
-
clonedPositionPoint.location = clonedLocation;
|
|
4789
|
-
clonedLocation.addPositionPoint(clonedPositionPoint);
|
|
4790
|
-
masFrame.cimModel.addLocation(clonedLocation);
|
|
4791
|
-
}
|
|
4792
|
-
|
|
4793
|
-
line.addEquipment(junction);
|
|
4794
|
-
cimModel.addJunction(junction);
|
|
4795
|
-
}
|
|
4796
|
-
// Location bereinigen
|
|
4797
|
-
cimModel.locations.delete(location.mrid);
|
|
4798
|
-
cimModel.removeObject(location);
|
|
4799
|
-
for (const positionPoint of location.positionPoints) {
|
|
4800
|
-
const idx = cimModel.positionPoints.indexOf(positionPoint);
|
|
4801
|
-
if (idx > -1) {
|
|
4802
|
-
cimModel.positionPoints.splice(idx, 1);
|
|
4803
|
-
}
|
|
4804
|
-
}*/
|
|
4805
4870
|
/** Geokoordinaten */
|
|
4806
4871
|
const location = substation.location;
|
|
4807
4872
|
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
@@ -4821,8 +4886,7 @@ class ConverterIntegral7 {
|
|
|
4821
4886
|
let terminal = new Terminal_1.Terminal(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([line.getUUID().substring(0, 8), '_BD-JCT-T']), 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
4822
4887
|
junction.terminals.set(terminal.getUUID(), terminal);
|
|
4823
4888
|
terminal.conductingEquipment = junction;
|
|
4824
|
-
|
|
4825
|
-
// terminal.connectivityNode = connectivityNode;
|
|
4889
|
+
terminal.connectivityNode = connectivityNode;
|
|
4826
4890
|
line.addEquipment(junction);
|
|
4827
4891
|
/** Die Geokoordinaten der UA wird auf die Junction des ConnectivityNodes übertragen */
|
|
4828
4892
|
if (location && location.positionPoints.length) {
|
|
@@ -4899,11 +4963,12 @@ class ConverterIntegral7 {
|
|
|
4899
4963
|
data.laenge = 1;
|
|
4900
4964
|
}
|
|
4901
4965
|
// Laenge: If valid data.laenge is given then assign it to parameter length, else set parameter length to zero. REMARK: CGMES Standard 2.x.y defines that a cim:ACLineSegment with no impedance has length of zero and arbitrary r, x, b, g etc.
|
|
4902
|
-
if ((0, parser_utils_1.isNumericI7)(data.laenge) && data.laenge > 0
|
|
4966
|
+
if ((0, parser_utils_1.isNumericI7)(data.laenge) && data.laenge > 0 && !data.flag_impedanzlos) {
|
|
4903
4967
|
acLineSegment.length = data.laenge;
|
|
4904
|
-
}
|
|
4905
|
-
|
|
4906
|
-
|
|
4968
|
+
}
|
|
4969
|
+
else {
|
|
4970
|
+
acLineSegment.length = 1;
|
|
4971
|
+
}
|
|
4907
4972
|
const assetType = defaultModel.getWireInfoByName(data.nametyp);
|
|
4908
4973
|
// r0
|
|
4909
4974
|
if ((0, parser_utils_1.isNumericI7)(data.r0) && data.r0 > 0 && !data.flag_impedanzlos) {
|
|
@@ -4977,48 +5042,89 @@ class ConverterIntegral7 {
|
|
|
4977
5042
|
}
|
|
4978
5043
|
// ir
|
|
4979
5044
|
for (const terminal of acLineSegment.terminals.values()) {
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
else if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
4984
|
-
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
4985
|
-
}
|
|
5045
|
+
const ir = (0, parser_utils_1.isNumericI7)(data.ir) ? (0, parser_utils_1.convertToNumberI7)(data.ir) : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.ratedCurrent) ? (0, parser_utils_1.convertToNumberI7)(assetType.ratedCurrent) : undefined);
|
|
5046
|
+
const igrenz = (0, parser_utils_1.isNumericI7)(data.igrenz) ? (0, parser_utils_1.convertToNumberI7)(data.igrenz) : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.limitingCurrent) ? (0, parser_utils_1.convertToNumberI7)(assetType.limitingCurrent) : undefined);
|
|
5047
|
+
this.setConductingEquipmentOperationalLimit(cimModel, acLineSegment.name, terminal, ir, new CurrentLimit_1.CurrentLimit(common_utils_1.CommonUtils.generateUUID(), acLineSegment.name), igrenz);
|
|
4986
5048
|
//PSRType
|
|
4987
5049
|
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, data.typ);
|
|
4988
5050
|
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
4989
|
-
// psrType.addPowerSystemResource(acLineSegment);
|
|
4990
5051
|
}
|
|
4991
5052
|
}
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5053
|
+
setConductingEquipmentOperationalLimit(cimModel, name, terminal, physLimit, limit, igrenz) {
|
|
5054
|
+
let operationalLimitSet = undefined;
|
|
5055
|
+
let operationalLimitTypePatl = undefined;
|
|
5056
|
+
if (limit instanceof CurrentLimit_1.CurrentLimit) {
|
|
5057
|
+
//mandatory for aclinesegments and powertransformers
|
|
5058
|
+
const ir = physLimit;
|
|
5059
|
+
let currentLimitTatl = undefined;
|
|
5060
|
+
let currentLimitPatl = undefined;
|
|
5061
|
+
let operationalLimitTypeTatl = undefined;
|
|
5062
|
+
if (ir) {
|
|
5063
|
+
currentLimitPatl = limit;
|
|
5064
|
+
currentLimitPatl.value = new CurrentFlow_1.CurrentFlow(ir, UnitMultiplier_1.UnitMultiplier.none, UnitSymbol_1.UnitSymbol.A);
|
|
5065
|
+
cimModel.addCurrentLimit(currentLimitPatl);
|
|
5066
|
+
}
|
|
5067
|
+
//optional
|
|
5068
|
+
if (igrenz) {
|
|
5069
|
+
currentLimitTatl = new CurrentLimit_1.CurrentLimit(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5070
|
+
currentLimitTatl.value = new CurrentFlow_1.CurrentFlow(igrenz, UnitMultiplier_1.UnitMultiplier.none, UnitSymbol_1.UnitSymbol.A);
|
|
5071
|
+
cimModel.addCurrentLimit(currentLimitTatl);
|
|
5072
|
+
}
|
|
5073
|
+
if (currentLimitPatl && currentLimitTatl) {
|
|
5074
|
+
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5075
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5076
|
+
operationalLimitSet.addOperationalLimit(currentLimitPatl);
|
|
5077
|
+
currentLimitPatl.operationalLimitSet = operationalLimitSet;
|
|
5078
|
+
operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5079
|
+
operationalLimitTypePatl.addOperationalLimit(currentLimitPatl);
|
|
5080
|
+
currentLimitPatl.operationalLimitType = operationalLimitTypePatl;
|
|
5081
|
+
operationalLimitSet.terminal = terminal;
|
|
5082
|
+
operationalLimitSet.addOperationalLimit(currentLimitTatl);
|
|
5083
|
+
currentLimitTatl.operationalLimitSet = operationalLimitSet;
|
|
5084
|
+
operationalLimitTypeTatl = this.createIfNotExistOperationalLimitType(cimModel, 'tatl', LimitTypeKind_1.LimitTypeKind.tatl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5085
|
+
operationalLimitTypeTatl.addOperationalLimit(currentLimitTatl);
|
|
5086
|
+
currentLimitTatl.operationalLimitType = operationalLimitTypeTatl;
|
|
5087
|
+
}
|
|
5088
|
+
else if (currentLimitPatl) {
|
|
5089
|
+
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5090
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5091
|
+
operationalLimitSet.addOperationalLimit(currentLimitPatl);
|
|
5092
|
+
currentLimitPatl.operationalLimitSet = operationalLimitSet;
|
|
5093
|
+
operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5094
|
+
operationalLimitTypePatl.addOperationalLimit(currentLimitPatl);
|
|
5095
|
+
currentLimitPatl.operationalLimitType = operationalLimitTypePatl;
|
|
5096
|
+
operationalLimitSet.terminal = terminal;
|
|
5097
|
+
}
|
|
5098
|
+
else if (currentLimitTatl) {
|
|
5099
|
+
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5100
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5101
|
+
operationalLimitSet.addOperationalLimit(currentLimitTatl);
|
|
5102
|
+
currentLimitTatl.operationalLimitSet = operationalLimitSet;
|
|
5103
|
+
operationalLimitTypeTatl = this.createIfNotExistOperationalLimitType(cimModel, 'tatl', LimitTypeKind_1.LimitTypeKind.tatl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5104
|
+
operationalLimitTypeTatl.addOperationalLimit(currentLimitTatl);
|
|
5105
|
+
currentLimitTatl.operationalLimitType = operationalLimitTypeTatl;
|
|
5106
|
+
operationalLimitSet.terminal = terminal;
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5109
|
+
else if (limit instanceof ApparentPowerLimit_1.ApparentPowerLimit) {
|
|
5110
|
+
let apparentPowerLimit = undefined;
|
|
5111
|
+
if (physLimit != undefined) {
|
|
5112
|
+
apparentPowerLimit = limit;
|
|
5113
|
+
apparentPowerLimit.uuid = common_utils_1.CommonUtils.generateUUID();
|
|
5114
|
+
apparentPowerLimit.name = `${name}`;
|
|
5115
|
+
cimModel.addCurrentLimit(apparentPowerLimit);
|
|
5116
|
+
apparentPowerLimit.value = new ApparentPower_1.ApparentPower(physLimit, UnitMultiplier_1.UnitMultiplier.M, UnitSymbol_1.UnitSymbol.VA);
|
|
5117
|
+
if (apparentPowerLimit) {
|
|
5118
|
+
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5119
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5120
|
+
operationalLimitSet.addOperationalLimit(apparentPowerLimit);
|
|
5121
|
+
apparentPowerLimit.operationalLimitSet = operationalLimitSet;
|
|
5122
|
+
operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5123
|
+
operationalLimitTypePatl.addOperationalLimit(apparentPowerLimit);
|
|
5124
|
+
apparentPowerLimit.operationalLimitType = operationalLimitTypePatl;
|
|
5125
|
+
operationalLimitSet.terminal = terminal;
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5022
5128
|
}
|
|
5023
5129
|
}
|
|
5024
5130
|
createIfNotExistOperationalLimitType(cimModel, name, type, direction) {
|
|
@@ -5050,7 +5156,10 @@ class ConverterIntegral7 {
|
|
|
5050
5156
|
terminal.phases = phase;
|
|
5051
5157
|
terminal.conductingEquipment = conductingEquipment;
|
|
5052
5158
|
conductingEquipment.addTerminal(terminal);
|
|
5053
|
-
terminal.connected = connected;
|
|
5159
|
+
terminal.connected = (terminal.connected !== undefined) ? terminal.connected : connected;
|
|
5160
|
+
if (terminal.connected === false) {
|
|
5161
|
+
const stop = true;
|
|
5162
|
+
}
|
|
5054
5163
|
if (!isNameSet) {
|
|
5055
5164
|
terminal.name = (0, util_create_1.createNotation)([conductingEquipment.getUUID().substring(0, 8), '_' + terminal.name], 32, true);
|
|
5056
5165
|
}
|
|
@@ -5060,7 +5169,7 @@ class ConverterIntegral7 {
|
|
|
5060
5169
|
createBoundaryConnection(frame, conductingEquipment, i7ObjectID, phase) {
|
|
5061
5170
|
const cimModel = frame.cimModel;
|
|
5062
5171
|
const anschlussUUID = this.integralID2UUID.get(i7ObjectID);
|
|
5063
|
-
let terminal;
|
|
5172
|
+
let terminal = undefined;
|
|
5064
5173
|
let cn = undefined;
|
|
5065
5174
|
if (cimModel.objects.has(anschlussUUID)) {
|
|
5066
5175
|
// Anschluss befindet sich im selben Modell
|
|
@@ -5114,7 +5223,7 @@ class ConverterIntegral7 {
|
|
|
5114
5223
|
this.annotateBoundaryNode(frame.name, frame.isoCode, frame.tsoName, cn);
|
|
5115
5224
|
}
|
|
5116
5225
|
else {
|
|
5117
|
-
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein
|
|
5226
|
+
this.logger.error(`error --- Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} / ${conductingEquipment.equipmentContainer.constructor.name} ${conductingEquipment.equipmentContainer.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein Grenzknoten bestimmt werden`);
|
|
5118
5227
|
}
|
|
5119
5228
|
if (terminal) {
|
|
5120
5229
|
terminal.conductingEquipment = conductingEquipment;
|
|
@@ -5122,7 +5231,7 @@ class ConverterIntegral7 {
|
|
|
5122
5231
|
}
|
|
5123
5232
|
}
|
|
5124
5233
|
else {
|
|
5125
|
-
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein
|
|
5234
|
+
this.logger.error(`error --- Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} / ${conductingEquipment.equipmentContainer.constructor.name} ${conductingEquipment.equipmentContainer.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein Anschlusspunkt bestimmt werden`);
|
|
5126
5235
|
}
|
|
5127
5236
|
}
|
|
5128
5237
|
return terminal;
|
|
@@ -5221,6 +5330,7 @@ class ConverterIntegral7 {
|
|
|
5221
5330
|
getSpannungsbandTrafo(i7Data, powerTransformerEnds) {
|
|
5222
5331
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5223
5332
|
return new Promise((resolve) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5333
|
+
var _a, _b, _c;
|
|
5224
5334
|
let minMaxSollResult;
|
|
5225
5335
|
// Spannungsgeregelter Anschluss
|
|
5226
5336
|
/**
|
|
@@ -5229,9 +5339,18 @@ class ConverterIntegral7 {
|
|
|
5229
5339
|
* 2 - Niederspannungsseite (Anschluss 3)
|
|
5230
5340
|
* 3 - Externer Knoten
|
|
5231
5341
|
* */
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5342
|
+
if (powerTransformerEnds[0] && powerTransformerEnds[0].getTerminal() === undefined) {
|
|
5343
|
+
const stop = true;
|
|
5344
|
+
}
|
|
5345
|
+
if (powerTransformerEnds[1] && powerTransformerEnds[1].getTerminal() === undefined) {
|
|
5346
|
+
const stop = true;
|
|
5347
|
+
}
|
|
5348
|
+
if (powerTransformerEnds[2] && powerTransformerEnds[2].getTerminal() === undefined) {
|
|
5349
|
+
const stop = true;
|
|
5350
|
+
}
|
|
5351
|
+
let tempKnotenId = i7Data.spgreg_anschluss === 0 ? this.UUID2Integral7ID.get((_a = powerTransformerEnds[0].getTerminal()) === null || _a === void 0 ? void 0 : _a.getConnectivityNodeUUID())[0] : undefined;
|
|
5352
|
+
tempKnotenId = i7Data.spgreg_anschluss === 1 ? this.UUID2Integral7ID.get((_b = powerTransformerEnds[1].getTerminal()) === null || _b === void 0 ? void 0 : _b.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5353
|
+
tempKnotenId = i7Data.spgreg_anschluss === 2 ? this.UUID2Integral7ID.get((_c = powerTransformerEnds[2].getTerminal()) === null || _c === void 0 ? void 0 : _c.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5235
5354
|
tempKnotenId = i7Data.spgreg_anschluss === 3 ? (i7Data.spgreg_knoten !== undefined ? i7Data.spgreg_knoten : undefined) : tempKnotenId;
|
|
5236
5355
|
if (i7Data.spgreg_anschluss >= 0 && i7Data.spgreg_anschluss <= 2 && tempKnotenId !== undefined) { // Lokale Regelung
|
|
5237
5356
|
// Falls tempKnotenId ausgeprägt ist, bestimme in welcher Tabelle der aKnoten bzw. eKnoten enthalten ist.
|
|
@@ -5528,9 +5647,9 @@ class ConverterIntegral7 {
|
|
|
5528
5647
|
}
|
|
5529
5648
|
addDefaultObjectsRegion(cimModel, defaultValuesConfig) {
|
|
5530
5649
|
/** GeographicalRegion */
|
|
5531
|
-
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
5650
|
+
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name, this.configUuid);
|
|
5532
5651
|
region.description = defaultValuesConfig.GeographicalRegion.description;
|
|
5533
|
-
const subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region);
|
|
5652
|
+
const subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region, this.configUuid);
|
|
5534
5653
|
subregion.shortName = defaultValuesConfig.SubGeographicalRegion.shortName;
|
|
5535
5654
|
subregion.description = defaultValuesConfig.SubGeographicalRegion.description;
|
|
5536
5655
|
}
|
|
@@ -5551,14 +5670,14 @@ class ConverterIntegral7 {
|
|
|
5551
5670
|
coordinateSystem.crsUrn = crsUrn;
|
|
5552
5671
|
cimModel.addCoordinateSystem(coordinateSystem);
|
|
5553
5672
|
}
|
|
5554
|
-
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7,
|
|
5673
|
+
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7, sdauer, i7Data, defaultValuesConfig, windings) {
|
|
5555
5674
|
var _a, _b;
|
|
5556
5675
|
const cimModel = frame.cimModel;
|
|
5557
5676
|
if (terminal) {
|
|
5558
5677
|
// Topologie
|
|
5559
5678
|
powerTransformerEnd.terminal = terminal;
|
|
5560
|
-
//
|
|
5561
|
-
this.
|
|
5679
|
+
// ApparentPowerLimit
|
|
5680
|
+
this.setConductingEquipmentOperationalLimit(cimModel, `W${powerTransformerEnd.endNumber}` + (powerTransformer === null || powerTransformer === void 0 ? void 0 : powerTransformer.name), terminal, sdauer, new ApparentPowerLimit_1.ApparentPowerLimit());
|
|
5562
5681
|
let isTrafo2w = i7Data.trafowicklung3w3 === undefined ? true : false;
|
|
5563
5682
|
// Erdung / Sternpunkt
|
|
5564
5683
|
if (sternpunktKnotenMap.has(i7Data.id) && isTrafo2w) {
|
|
@@ -5602,7 +5721,7 @@ class ConverterIntegral7 {
|
|
|
5602
5721
|
powerTransformerEnd.baseVoltage = powerTransformerEnd.terminal.connectivityNode.getBaseVoltage();
|
|
5603
5722
|
}
|
|
5604
5723
|
else if (powerTransformerEnd.ratedU) {
|
|
5605
|
-
powerTransformerEnd.baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, powerTransformerEnd.ratedU, this.exportFramesBoundary);
|
|
5724
|
+
powerTransformerEnd.baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, powerTransformerEnd.ratedU, this.configUuid, this.exportFramesBoundary);
|
|
5606
5725
|
}
|
|
5607
5726
|
else {
|
|
5608
5727
|
this.logger.debug(`Wicklung ${powerTransformerEnd.mrid} Nr. ${powerTransformerEnd.endNumber} keine Spannungsangabe.`);
|
|
@@ -5612,25 +5731,25 @@ class ConverterIntegral7 {
|
|
|
5612
5731
|
}
|
|
5613
5732
|
convertTapChangers(i7Data, transformerEnds, cimModel, transformerinfo, connectivityNode, spannungsband) {
|
|
5614
5733
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5615
|
-
/*if(getUUID(i7Data.guid
|
|
5734
|
+
/*if(getUUID(i7Data.guid) === '11e7be86-8bb7-41ba-898a-74cd5e8efbb9'){ //Zeile50
|
|
5616
5735
|
let stop = true; DONE
|
|
5617
5736
|
}
|
|
5618
|
-
if(getUUID(i7Data.guid
|
|
5737
|
+
if(getUUID(i7Data.guid) === '1239F03C-ED5B-4FDF-9453-D97E611FCC36'){ //Zeile52 - Datenfehler: Transformatoren mit definierter Zusatzspannung und Stufungsbereich, jedoch 'Stufensteller nicht vorhanden'
|
|
5619
5738
|
let stop = true; DONE
|
|
5620
5739
|
}*/
|
|
5621
|
-
/*if(getUUID(i7Data.guid
|
|
5740
|
+
/*if(getUUID(i7Data.guid)=== 'CFDAA56A-A0DA-4C5B-92CC-21138B6D6D07'){ //Standard LR
|
|
5622
5741
|
let stop = true;
|
|
5623
5742
|
}*/
|
|
5624
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid
|
|
5743
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '00ebe00e-50fa-4fc0-9ed6-557528a9b460') { //Zeile53 - Typ Meeden'
|
|
5625
5744
|
let stop = true;
|
|
5626
5745
|
}
|
|
5627
|
-
/*if(getUUID(i7Data.guid
|
|
5746
|
+
/*if(getUUID(i7Data.guid) === '012416f2d9584971baa93360fcf40be2'){ //Zeile55 - SR statt LR'
|
|
5628
5747
|
let stop = true;
|
|
5629
5748
|
}*/
|
|
5630
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid
|
|
5749
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '515508dc-5982-4686-ad26-08d39db91421') { //Zeile81 - SR statt LR'
|
|
5631
5750
|
let stop = true;
|
|
5632
5751
|
}
|
|
5633
|
-
/*if(getUUID(i7Data.guid
|
|
5752
|
+
/*if(getUUID(i7Data.guid) === '5ec82d14-ee64-43b6-86ff-c7615d96f7ad'){ //Zeile58
|
|
5634
5753
|
let stop = true;
|
|
5635
5754
|
}*/
|
|
5636
5755
|
let ratioPhaseTapChangerPresent = false;
|
|
@@ -5708,21 +5827,23 @@ class ConverterIntegral7 {
|
|
|
5708
5827
|
const spezialRegelung = (0, parser_utils_1.isNumericI7)(i7Data.trafo_spezial) ? i7Data.trafo_spezial : transformerinfo === null || transformerinfo === void 0 ? void 0 : transformerinfo.spezialRegelung;
|
|
5709
5828
|
//const neutralU = transformerEnd.ratedU;
|
|
5710
5829
|
let tapChanger = undefined;
|
|
5711
|
-
|
|
5712
|
-
|
|
5830
|
+
let invert = undefined;
|
|
5831
|
+
if ((0, parser_utils_1.isNumericI7)(angle) && (0, parser_utils_1.convertToNumberI7)(angle) % 180 !== 0 || spezialRegelung === 1 || spezialRegelung === 2) {
|
|
5832
|
+
//angle is given and angle%180===0 or angle is not given but spezialRegelung, thus => PhaseTapChanger ("Querregler" oder "Schrägregler")
|
|
5713
5833
|
tapChanger = this.createPhaseTapChanger(i7Data, transformerEnds, cimModel, gestufteSeite, entryI7, transformerinfo);
|
|
5714
5834
|
}
|
|
5715
5835
|
else {
|
|
5716
|
-
//
|
|
5836
|
+
//invert sign if tapChanger angle%180===0 && angle%360!==0
|
|
5837
|
+
invert = Math.trunc((0, parser_utils_1.convertToNumberI7)(angle) / 180) % 2 === 0 ? 1 : -1;
|
|
5717
5838
|
tapChanger = this.createRatioTapChanger(i7Data, transformerEnds, cimModel, connectivityNode, gestufteSeite, entryI7, spannungsband, transformerinfo);
|
|
5718
5839
|
}
|
|
5719
5840
|
// Stufen
|
|
5720
|
-
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent, tapChangerInfo);
|
|
5841
|
+
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent, invert, tapChangerInfo);
|
|
5721
5842
|
let stop = true;
|
|
5722
5843
|
}
|
|
5723
5844
|
let stop = true;
|
|
5724
5845
|
}
|
|
5725
|
-
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent, tapChangerInfo) {
|
|
5846
|
+
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent, invert, tapChangerInfo) {
|
|
5726
5847
|
var _a;
|
|
5727
5848
|
let lowStep = (0, parser_utils_1.isNumericI7)(i7Data[`minstufe_s${tapChangerNumber}`])
|
|
5728
5849
|
? i7Data[`minstufe_s${tapChangerNumber}`]
|
|
@@ -5744,43 +5865,66 @@ class ConverterIntegral7 {
|
|
|
5744
5865
|
const neutralStepIndex = i7TapArray.indexOf(neutralStep);*/
|
|
5745
5866
|
const lowerVoltageStepCount = (0, utils_2.getTapChangerStepCount)(lowStep, neutralStep);
|
|
5746
5867
|
const upperVoltageStepCount = (0, utils_2.getTapChangerStepCount)(neutralStep, highStep);
|
|
5747
|
-
|
|
5868
|
+
let uMin = (0, parser_utils_1.isNumericI7)(i7Data[`umin_s${tapChangerNumber}`])
|
|
5748
5869
|
? i7Data[`umin_s${tapChangerNumber}`]
|
|
5749
5870
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMin;
|
|
5750
|
-
|
|
5871
|
+
let uMax = (0, parser_utils_1.isNumericI7)(i7Data[`umax_s${tapChangerNumber}`])
|
|
5751
5872
|
? i7Data[`umax_s${tapChangerNumber}`]
|
|
5752
5873
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMax;
|
|
5753
|
-
let
|
|
5874
|
+
let lowerVoltageStepDecrement = Math.abs(uMin / lowerVoltageStepCount);
|
|
5754
5875
|
let upperVoltageStepIncrement = Math.abs(uMax / upperVoltageStepCount);
|
|
5755
5876
|
let increaseVoltageStepIncrement = (0, parser_utils_1.isNumericI7)(upperVoltageStepIncrement) ? upperVoltageStepIncrement : 0;
|
|
5756
5877
|
if (tapChanger instanceof RatioTapChanger_1.RatioTapChanger) {
|
|
5757
5878
|
const ratioTapChanger = tapChanger;
|
|
5758
|
-
|
|
5759
|
-
|
|
5879
|
+
uMin = uMin * invert;
|
|
5880
|
+
uMax = uMax * invert;
|
|
5881
|
+
//test for uMin and uMax voltage add are not symmetrical...
|
|
5882
|
+
if (Math.abs(lowerVoltageStepDecrement) !== Math.abs(upperVoltageStepIncrement) || uMax < uMin || uMax === uMin || ratioPhaseTapChangerPresent) {
|
|
5883
|
+
if (uMax === uMin) {
|
|
5884
|
+
const stop = true;
|
|
5885
|
+
}
|
|
5760
5886
|
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(common_utils_1.CommonUtils.generateUUID(), `${i7Data.bezeichner} W_${tapChangerNumber}`);
|
|
5761
5887
|
let step_tmp = 0;
|
|
5762
5888
|
let start_step_tmp = step_tmp;
|
|
5763
|
-
//
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5889
|
+
//voltage decrement
|
|
5890
|
+
if (uMin < 0) {
|
|
5891
|
+
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5892
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((Math.abs(lowerVoltageStepDecrement) * Math.abs(lowerVoltageStepCount - i)) / 100)));
|
|
5893
|
+
step_tmp = i;
|
|
5894
|
+
}
|
|
5767
5895
|
}
|
|
5768
|
-
|
|
5896
|
+
else {
|
|
5897
|
+
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5898
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((lowerVoltageStepDecrement * Math.abs(lowerVoltageStepCount - i)) / 100)));
|
|
5899
|
+
step_tmp = i;
|
|
5900
|
+
}
|
|
5901
|
+
}
|
|
5902
|
+
//neutral step
|
|
5769
5903
|
step_tmp++;
|
|
5770
5904
|
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[step_tmp], 1);
|
|
5771
5905
|
step_tmp++;
|
|
5772
5906
|
start_step_tmp = step_tmp;
|
|
5773
|
-
//
|
|
5774
|
-
|
|
5775
|
-
|
|
5907
|
+
//voltage increment
|
|
5908
|
+
if (uMax > 0) {
|
|
5909
|
+
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5910
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)));
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
else {
|
|
5914
|
+
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5915
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)));
|
|
5916
|
+
}
|
|
5776
5917
|
}
|
|
5777
5918
|
tapChanger.ratioTapChangerTable = ratioTapChangerTable;
|
|
5778
5919
|
ratioTapChangerTable.ratioTapChanger = tapChanger;
|
|
5779
|
-
//
|
|
5780
|
-
ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(
|
|
5920
|
+
//average
|
|
5921
|
+
//ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(lowerVoltageStepDecrement)) + Math.abs(Math.round(increaseVoltageStepIncrement)) / 2;
|
|
5781
5922
|
cimModel.addRatioTapChangerTable(ratioTapChangerTable);
|
|
5782
5923
|
}
|
|
5783
|
-
|
|
5924
|
+
else {
|
|
5925
|
+
//uMin and uMax are symmetrical
|
|
5926
|
+
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
5927
|
+
}
|
|
5784
5928
|
}
|
|
5785
5929
|
if (tapChanger instanceof PhaseTapChangerNonLinear_1.PhaseTapChangerNonLinear) {
|
|
5786
5930
|
tapChanger.voltageStepIncrement = increaseVoltageStepIncrement;
|
|
@@ -5793,8 +5937,8 @@ class ConverterIntegral7 {
|
|
|
5793
5937
|
tapChanger.neutralStep = neutralStep;
|
|
5794
5938
|
tapChanger.normalStep = currentStep;
|
|
5795
5939
|
tapChanger.step = currentStep;
|
|
5796
|
-
if (Math.abs(
|
|
5797
|
-
this.logger.info(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${
|
|
5940
|
+
if (Math.abs(lowerVoltageStepDecrement) !== Math.abs(increaseVoltageStepIncrement)) {
|
|
5941
|
+
this.logger.info(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${lowerVoltageStepDecrement} MAX ${increaseVoltageStepIncrement}. Das Attribut voltageStepIncrement i.H.v ${increaseVoltageStepIncrement} könnte inkorrekt sein.`);
|
|
5798
5942
|
}
|
|
5799
5943
|
}
|
|
5800
5944
|
createRatioTapChanger(i7Data, transformerEnds, cimModel, regulatingConnectivityNode, gestufteSeite, tapChangerNumber, spannungsband, transformerinfo) {
|
|
@@ -5811,6 +5955,9 @@ class ConverterIntegral7 {
|
|
|
5811
5955
|
* */
|
|
5812
5956
|
/** Regelung */
|
|
5813
5957
|
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`), this.objectMappingConfig.standardiseUuid), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
5958
|
+
if (ratioTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
5959
|
+
const stop = true;
|
|
5960
|
+
}
|
|
5814
5961
|
ratioTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(`i7Data.unter_last_nicht_verstellbar_s${gestufteSeite}`) ? !(0, parser_utils_1.convertToBooleanI7)(`i7Data.unter_last_nicht_verstellbar_s${gestufteSeite}`) : false;
|
|
5815
5962
|
ratioTapChanger.transformerEnd = transformerEnd;
|
|
5816
5963
|
//transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
@@ -5852,7 +5999,7 @@ class ConverterIntegral7 {
|
|
|
5852
5999
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
5853
6000
|
}
|
|
5854
6001
|
else {
|
|
5855
|
-
this.logger.
|
|
6002
|
+
this.logger.debug(`debug --- Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
5856
6003
|
}
|
|
5857
6004
|
cimModel.addRatioTapChanger(ratioTapChanger);
|
|
5858
6005
|
return ratioTapChanger;
|
|
@@ -5900,14 +6047,24 @@ class ConverterIntegral7 {
|
|
|
5900
6047
|
}
|
|
5901
6048
|
default: {
|
|
5902
6049
|
// There is no information given about special tapchanger control, thus create PhaseTapChangerLinear
|
|
5903
|
-
const phaseTapChangerLin = new
|
|
5904
|
-
|
|
5905
|
-
|
|
6050
|
+
/**const phaseTapChangerLin = new PhaseTapChangerLinear(getUUID(eval(`i7Data.guid_tch${tapChangerNumber}`)), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
6051
|
+
phaseTapChanger = phaseTapChangerLin;
|
|
6052
|
+
cimModel.addPhaseTapChangerLinear(phaseTapChangerLin);*/
|
|
6053
|
+
const phaseTapChangerAsym = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`)), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
6054
|
+
phaseTapChangerAsym.windingConnectionAngle = winkel;
|
|
6055
|
+
phaseTapChanger = phaseTapChangerAsym;
|
|
6056
|
+
cimModel.addPhaseTapChangerAsymmetrical(phaseTapChangerAsym);
|
|
5906
6057
|
break;
|
|
5907
6058
|
}
|
|
5908
6059
|
}
|
|
6060
|
+
if (phaseTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
6061
|
+
const stop = true;
|
|
6062
|
+
}
|
|
6063
|
+
if (phaseTapChanger.mrid === "3d0bdc23-fe46-408d-99b3-369a02d28a28") {
|
|
6064
|
+
const stop = true;
|
|
6065
|
+
}
|
|
5909
6066
|
// Attribute
|
|
5910
|
-
phaseTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`) ? (0, parser_utils_1.convertToBooleanI7)(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`) : false;
|
|
6067
|
+
phaseTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(eval(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`)) ? (0, parser_utils_1.convertToBooleanI7)(eval(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`)) : false;
|
|
5911
6068
|
phaseTapChanger.transformerEnd = transformerEnd;
|
|
5912
6069
|
//transformerEnd.phaseTapChanger = phaseTapChanger;
|
|
5913
6070
|
// Wirkleistungsregelung Anschluss
|
|
@@ -5946,7 +6103,7 @@ class ConverterIntegral7 {
|
|
|
5946
6103
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
5947
6104
|
}
|
|
5948
6105
|
else {
|
|
5949
|
-
this.logger.
|
|
6106
|
+
this.logger.debug(`debug --- Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
5950
6107
|
}
|
|
5951
6108
|
return phaseTapChanger;
|
|
5952
6109
|
}
|
|
@@ -6268,32 +6425,98 @@ function getGeoCoordinates(i7Data) {
|
|
|
6268
6425
|
return undefined;
|
|
6269
6426
|
}
|
|
6270
6427
|
exports.getGeoCoordinates = getGeoCoordinates;
|
|
6271
|
-
function getDCNodeFromConverter(acDcConverter) {
|
|
6428
|
+
function getDCNodeFromConverter(acDcConverter, polarity) {
|
|
6272
6429
|
let ret_val = undefined;
|
|
6273
6430
|
if (acDcConverter.dCTerminals) {
|
|
6274
6431
|
for (const terminal of acDcConverter.dCTerminals.values()) {
|
|
6275
|
-
if (terminal.dcNode) {
|
|
6432
|
+
if (terminal.dcNode && terminal.polarity === polarity) {
|
|
6276
6433
|
ret_val = terminal.dcNode;
|
|
6277
6434
|
}
|
|
6278
6435
|
}
|
|
6279
6436
|
}
|
|
6280
6437
|
return ret_val;
|
|
6281
6438
|
}
|
|
6282
|
-
function
|
|
6283
|
-
|
|
6284
|
-
|
|
6439
|
+
function createDCGround(cimModel, acDCConverter, i7Data) {
|
|
6440
|
+
const dcConverterUnit = acDCConverter.equipmentContainer;
|
|
6441
|
+
const dcGround = new DCGround_1.DCGround((0, parser_utils_1.getUUID)(i7Data.guid_dcground), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG'], 32, true));
|
|
6442
|
+
const dcTerminalG = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalg), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG_DCT']));
|
|
6443
|
+
const dcTerminalM1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
6444
|
+
const dcNodeG = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1));
|
|
6445
|
+
dcTerminalG.dCConductingEquipment = dcGround;
|
|
6446
|
+
dcTerminalM1.dCConductingEquipment = acDCConverter;
|
|
6447
|
+
dcTerminalM1.polarity = DCPolarityKind_1.DCPolarityKind.middle;
|
|
6448
|
+
dcTerminalG.dcNode = dcNodeG;
|
|
6449
|
+
dcTerminalM1.dcNode = dcNodeG;
|
|
6450
|
+
dcGround.equipmentContainer = dcConverterUnit;
|
|
6451
|
+
dcGround.dCTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6452
|
+
dcNodeG.dcEquipmentContainer = dcConverterUnit;
|
|
6453
|
+
dcNodeG.dcTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6454
|
+
dcNodeG.dcTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6455
|
+
acDCConverter.dCTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6456
|
+
cimModel.addDCTerminal(dcTerminalG);
|
|
6457
|
+
cimModel.addDCGround(dcGround);
|
|
6458
|
+
cimModel.addDCGroundTerminal(dcTerminalM1);
|
|
6459
|
+
cimModel.addDCNode(dcNodeG);
|
|
6460
|
+
/** EQ-SC */
|
|
6461
|
+
dcGround.r = undefined;
|
|
6462
|
+
dcGround.inductance = undefined;
|
|
6463
|
+
return dcNodeG;
|
|
6285
6464
|
}
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6465
|
+
/**
|
|
6466
|
+
*
|
|
6467
|
+
* @param acDCConverter
|
|
6468
|
+
* @param i7Data
|
|
6469
|
+
* @param endNumber Start means a value of '1'. Target means a value of '2'.
|
|
6470
|
+
*/
|
|
6471
|
+
function connectDCGround(cimModel, acdcConverter, i7Data, dcNode, polarity) {
|
|
6472
|
+
let dcTerminalMx = undefined;
|
|
6473
|
+
let dcNodeG = dcNode;
|
|
6474
|
+
const dcTerminalM1UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1);
|
|
6475
|
+
const dcTerminalM2UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm2);
|
|
6476
|
+
if (dcNodeG.dcTerminals.get(dcTerminalM1UUID)) {
|
|
6477
|
+
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM2UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_NEG', '_DCT']));
|
|
6478
|
+
}
|
|
6479
|
+
else {
|
|
6480
|
+
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM1UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
6481
|
+
}
|
|
6482
|
+
dcTerminalMx.polarity = polarity;
|
|
6483
|
+
dcNodeG.dcTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6484
|
+
acdcConverter.dCTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6485
|
+
dcTerminalMx.dCConductingEquipment = acdcConverter;
|
|
6486
|
+
dcTerminalMx.dcNode = dcNodeG;
|
|
6487
|
+
cimModel.addDCGroundTerminal(dcTerminalMx);
|
|
6289
6488
|
}
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6489
|
+
function createNeutralGroundReturn(cimModel, i7Data, acdcConverterStart, acdcConverterTarget) {
|
|
6490
|
+
let dcNodeM1 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterStart.getUUID());
|
|
6491
|
+
let dcNodeM2 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterTarget.getUUID());
|
|
6492
|
+
let dcTerminalN1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineStart_DCT']));
|
|
6493
|
+
let dcTerminalN2 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineTarget_DCT']));
|
|
6494
|
+
//let dcNeutralLine:DCLineSegment = new DCLineSegment(getUUID(undefined), createNotation([getName(i7Data), '_neutral','_DCLS'],32,true), createNotation([i7Data.kurzname,'_neg'],12,true), 'neutral line not contained in INT7 data model');
|
|
6495
|
+
if (dcNodeM1 !== undefined) {
|
|
6496
|
+
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6497
|
+
acdcConverterStart.dCTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6498
|
+
}
|
|
6499
|
+
else {
|
|
6500
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1);
|
|
6501
|
+
dcNodeM1 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M1');
|
|
6502
|
+
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6503
|
+
dcTerminalN1.dCConductingEquipment = undefined;
|
|
6504
|
+
}
|
|
6505
|
+
if (dcNodeM2 !== undefined) {
|
|
6506
|
+
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6507
|
+
}
|
|
6508
|
+
else {
|
|
6509
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem2);
|
|
6510
|
+
dcNodeM2 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M2');
|
|
6511
|
+
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6512
|
+
}
|
|
6513
|
+
cimModel.addACDCConverterDCTerminal(dcTerminalN1);
|
|
6514
|
+
cimModel.addACDCConverterDCTerminal(dcTerminalN2);
|
|
6515
|
+
//cimModel.addDCLineSegment(dcNeutralLineSegment);
|
|
6516
|
+
//cimModel.addDCLine(dcNeutralLine);
|
|
6293
6517
|
}
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6518
|
+
function logExecutionTime(logger, startTime, text) {
|
|
6519
|
+
logger.debug(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6520
|
+
console.log(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6297
6521
|
}
|
|
6298
|
-
exports.connectDCGround = connectDCGround;
|
|
6299
6522
|
//# sourceMappingURL=converter.integral7.js.map
|