@enervance/insight-cim-model 0.0.159 → 0.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/cim-class-names.d.ts +10 -0
- package/dist/constants/cim-class-names.js +11 -1
- package/dist/constants/cim-class-names.js.map +1 -1
- 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 +39 -42
- package/dist/converter/integral7/converter.integral7.js +1098 -899
- package/dist/converter/integral7/converter.integral7.js.map +1 -1
- package/dist/converter/integral7/dl-convert/data-manager.d.ts +1 -10
- package/dist/converter/integral7/dl-convert/data-manager.js +7 -36
- package/dist/converter/integral7/dl-convert/data-manager.js.map +1 -1
- package/dist/converter/integral7/dl-convert/db/data-types.d.ts +0 -9
- package/dist/converter/integral7/dl-convert/db/data-types.js +0 -11
- package/dist/converter/integral7/dl-convert/db/data-types.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.d.ts +153 -99
- package/dist/converter/integral7/dl-convert/dl-converter-i7.js +3401 -1315
- 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 +4 -1
- package/dist/converter/integral7/dl-convert/executor.js +233 -114
- 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/{IDefaultValuesConfig.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/interface-i7/{IObjectMappingConfig.js → 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/{IIntegral7ConverterConfig.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/{dl-convert/dl-converter-i7.types.js → interface-i7/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 +7 -41
- package/dist/converter/integral7/model/dl-utils/util-functions.js +11 -699
- 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-cim.model.d.ts +14 -0
- package/dist/converter/integral7/util-cim.model.js +27 -0
- package/dist/converter/integral7/util-cim.model.js.map +1 -0
- package/dist/converter/integral7/utils-cgmes-export.d.ts +10 -10
- package/dist/converter/integral7/utils-cgmes-export.js +5 -0
- package/dist/converter/integral7/utils-cgmes-export.js.map +1 -1
- package/dist/converter/integral7/utils-trafo3w.d.ts +2 -2
- package/dist/converter/integral7/utils-trafo3w.js +21 -4
- package/dist/converter/integral7/utils-trafo3w.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +27 -25
- package/dist/converter/integral7/utils.js +373 -342
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl/etl-dppower/etl-dppower.d.ts +15 -0
- package/dist/etl/etl-dppower/etl-dppower.js +204 -0
- package/dist/etl/etl-dppower/etl-dppower.js.map +1 -0
- 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 +3 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -3
- package/dist/interfaces/model/wires/IRegulatingCondEq.d.ts +3 -0
- package/dist/model/assetinfo/CableInfo.d.ts +7 -0
- package/dist/model/assetinfo/CableInfo.js +49 -0
- package/dist/model/assetinfo/CableInfo.js.map +1 -1
- package/dist/model/assetinfo/OverheadWireInfo.d.ts +7 -0
- package/dist/model/assetinfo/OverheadWireInfo.js +49 -0
- package/dist/model/assetinfo/OverheadWireInfo.js.map +1 -1
- package/dist/model/assetinfo/WireInfo.d.ts +1 -0
- package/dist/model/assetinfo/WireInfo.js.map +1 -1
- package/dist/model/assets/Facility.js +17 -3
- package/dist/model/assets/Facility.js.map +1 -1
- package/dist/model/assets/LifecycleDate.d.ts +1 -0
- package/dist/model/assets/LifecycleDate.js +3 -0
- package/dist/model/assets/LifecycleDate.js.map +1 -1
- package/dist/model/common/Location.js +1 -1
- package/dist/model/common/Location.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 +2 -1
- 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 +6 -1
- 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/Substation.js +7 -7
- package/dist/model/core/Substation.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/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/diagram/DiagramObject.js +2 -2
- package/dist/model/diagram/DiagramObject.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 +12 -2
- package/dist/model/equivalents/EquivalentInjection.js +111 -0
- package/dist/model/equivalents/EquivalentInjection.js.map +1 -1
- package/dist/model/extensions/amprion/core/AMPRIONBay.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/enervance/assets/EVWireObject.js +7 -1
- package/dist/model/extensions/enervance/assets/EVWireObject.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.d.ts +0 -1
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js +1 -4
- 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/extensions/neplan-westnetz/core/WNConnectivityNode.js +8 -1
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.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/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 +5 -2
- package/dist/model/wires/ACLineSegment.js +7 -1
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +2 -2
- package/dist/model/wires/AsynchronousMachine.js +0 -1
- 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/PowerTransformer.js +2 -0
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.d.ts +2 -2
- package/dist/model/wires/PowerTransformerEnd.js +1 -0
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.d.ts +2 -2
- package/dist/model/wires/RatioTapChanger.js +1 -1
- 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/enum/EVSourceSystemKind.d.ts +1 -0
- package/dist/model-container/enum/EVSourceSystemKind.js +1 -0
- package/dist/model-container/enum/EVSourceSystemKind.js.map +1 -1
- package/dist/model-container/model/ModelContainer.d.ts +12 -3
- package/dist/model-container/model/ModelContainer.js +22 -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 +4 -3
- package/dist/util/util-create.js +38 -23
- 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 +4 -3
- package/dist/util/utils.js +9 -6
- 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/cim.model.utils.js +6 -0
- package/dist/utils2/cim.model.utils.js.map +1 -1
- package/dist/utils2/common.utils.d.ts +3 -0
- package/dist/utils2/common.utils.js +11 -0
- package/dist/utils2/common.utils.js.map +1 -1
- package/dist/utils2/fuseki.utils.js +7 -1
- package/dist/utils2/fuseki.utils.js.map +1 -1
- package/dist/utils2/import.utils.d.ts +2 -1
- package/dist/utils2/import.utils.js +9 -3
- package/dist/utils2/import.utils.js.map +1 -1
- package/dist/utils2/parser.utils.d.ts +1 -1
- package/dist/utils2/parser.utils.js +44 -23
- package/dist/utils2/parser.utils.js.map +1 -1
- package/package.json +5 -2
- 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/dl-convert/dl-converter-i7-2.d.ts +0 -56
- package/dist/converter/integral7/dl-convert/dl-converter-i7-2.js +0 -2039
- package/dist/converter/integral7/dl-convert/dl-converter-i7-2.js.map +0 -1
- package/dist/converter/integral7/dl-convert/dl-converter-i7.types.d.ts +0 -3
- package/dist/converter/integral7/dl-convert/dl-converter-i7.types.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 +0 -3
- 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/converter/integral7/util-asset.model.d.ts +0 -9
- package/dist/converter/integral7/util-asset.model.js +0 -20
- package/dist/converter/integral7/util-asset.model.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
|
-
const
|
|
139
|
+
const util_cim_model_1 = require("./util-cim.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);
|
|
@@ -274,6 +279,7 @@ class ConverterIntegral7 {
|
|
|
274
279
|
});
|
|
275
280
|
}
|
|
276
281
|
convertFrame(frame, geoRegion, objectMappingConfig, energyTypesConfig, defaultValuesConfig, energySourceTypeMappingConfig) {
|
|
282
|
+
var _a;
|
|
277
283
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
278
284
|
const integral7Modell = frame.getI7Model();
|
|
279
285
|
const cimModel = frame.cimModel;
|
|
@@ -289,18 +295,22 @@ class ConverterIntegral7 {
|
|
|
289
295
|
startTime = perf_hooks.performance.now();
|
|
290
296
|
/** Standort -> Substation */
|
|
291
297
|
yield this.convertStandorte(cimModel, integral7Modell, subGeoRegionsI7IDs, defaultValuesConfig);
|
|
292
|
-
logExecutionTime(this.logger, startTime, `convertStandorte(${
|
|
298
|
+
logExecutionTime(this.logger, startTime, `convertStandorte(${integral7Modell.integralStandorte.size})`);
|
|
293
299
|
startTime = perf_hooks.performance.now();
|
|
294
300
|
const standortIDs = [...integral7Modell.integralStandorte.keys()];
|
|
301
|
+
/** Regelzone -> ControlArea */
|
|
302
|
+
/**if (standortIDs.length) await this.convertRegelzone(cimModel, defaultValuesConfig, standortIDs);
|
|
303
|
+
logExecutionTime(this.logger, startTime, `convertRegelzone(${cimModel.controlArea.size})`);*/
|
|
304
|
+
/** Schaltanlagen -> VoltageLevel */
|
|
295
305
|
if (standortIDs.length)
|
|
296
306
|
yield this.convertSchaltanlagen(cimModel, integral7Modell, standortIDs, defaultValuesConfig);
|
|
297
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${
|
|
307
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${integral7Modell.integralSchaltanlagen.size})`);
|
|
298
308
|
startTime = perf_hooks.performance.now();
|
|
299
309
|
const schaltanlagenIDs = [...integral7Modell.integralSchaltanlagen.keys()];
|
|
300
310
|
/** Schaltanlagenabschnitte -> mappen auf bereits erstelltes VoltageLevel-Objekt (Schaltanlage) */
|
|
301
311
|
if (schaltanlagenIDs.length)
|
|
302
312
|
yield this.convertSchaltanlagenAbschnitte(cimModel, integral7Modell, schaltanlagenIDs);
|
|
303
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${
|
|
313
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${integral7Modell.integralSchaltanlagenAbschnitte.size})`);
|
|
304
314
|
/** Schaltfelder -> Bay */
|
|
305
315
|
startTime = perf_hooks.performance.now();
|
|
306
316
|
const schaltanlagenAbschnittIDs = [...integral7Modell.integralSchaltanlagenAbschnitte.keys()];
|
|
@@ -320,7 +330,7 @@ class ConverterIntegral7 {
|
|
|
320
330
|
logExecutionTime(this.logger, startTime, `convertLaengskupplungen()`);
|
|
321
331
|
}
|
|
322
332
|
/** START Integral 7 Knoten */
|
|
323
|
-
/** Abzweigpunkte KnotenSo -> ConnectivityNode*/
|
|
333
|
+
/** Abzweigpunkte KnotenSo -> ConnectivityNode */
|
|
324
334
|
startTime = perf_hooks.performance.now();
|
|
325
335
|
if (standortIDs.length)
|
|
326
336
|
yield this.convertKnotenSo(frame, integral7Modell, standortIDs, defaultValuesConfig);
|
|
@@ -417,34 +427,34 @@ class ConverterIntegral7 {
|
|
|
417
427
|
yield this.convertAsynchronmotor(cimModel, soSfKnoten, defaultValuesConfig);
|
|
418
428
|
logExecutionTime(this.logger, startTime, `convertAsynchronmotor`);
|
|
419
429
|
}
|
|
420
|
-
/** Einspeisungen -> EnergySources */
|
|
430
|
+
/** Einspeisungen -> EnergySources or EquivalentInjection or ExternalNetworkInjection */
|
|
421
431
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
422
|
-
startTime =
|
|
423
|
-
yield this.convertEinspeisungen(cimModel, soSfKnoten, objectMappingConfig
|
|
432
|
+
startTime = performance.now();
|
|
433
|
+
yield this.convertEinspeisungen(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig);
|
|
424
434
|
logExecutionTime(this.logger, startTime, `convertEinspeisungen`);
|
|
425
435
|
}
|
|
426
436
|
/** Generatoren -> SynchronousMachine */
|
|
427
437
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
428
|
-
startTime =
|
|
429
|
-
|
|
438
|
+
startTime = performance.now();
|
|
439
|
+
yield this.convertGeneratoren(cimModel, integral7Modell.targetVoltages, soSfKnoten, energyTypesConfig);
|
|
430
440
|
logExecutionTime(this.logger, startTime, `convertGeneratoren`);
|
|
431
441
|
}
|
|
432
442
|
/** KWBlöcke -> SynchronousMachine */
|
|
433
443
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
434
444
|
startTime = perf_hooks.performance.now();
|
|
435
|
-
|
|
445
|
+
yield this.convertKraftwerksbloecke(cimModel, integral7Modell.targetVoltages, soSfKnoten, energyTypesConfig);
|
|
436
446
|
logExecutionTime(this.logger, startTime, `convertKraftwerksbloecke`);
|
|
437
447
|
}
|
|
438
448
|
/** Ersatzquerzweige -> ExternalNetworkInjection */
|
|
439
449
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
440
|
-
startTime =
|
|
441
|
-
yield this.convertErsatzQuerZweige(cimModel, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
450
|
+
startTime = performance.now();
|
|
451
|
+
yield this.convertErsatzQuerZweige(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
442
452
|
logExecutionTime(this.logger, startTime, `convertErsatzQuerZweige`);
|
|
443
453
|
}
|
|
444
454
|
/** Randnetzeinspeisungen -> ExternalNetworkInjection */
|
|
445
455
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
446
|
-
startTime =
|
|
447
|
-
yield this.convertBoundaryInjections(cimModel, soSfKnoten, objectMappingConfig.Randnetzeinspeisung.class);
|
|
456
|
+
startTime = performance.now();
|
|
457
|
+
yield this.convertBoundaryInjections(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig.Randnetzeinspeisung.class);
|
|
448
458
|
logExecutionTime(this.logger, startTime, `convertBoundaryInjections`);
|
|
449
459
|
}
|
|
450
460
|
/** Kompensationsdrossel -> LinearShuntCompensator */
|
|
@@ -477,16 +487,16 @@ class ConverterIntegral7 {
|
|
|
477
487
|
/** Sonderfall mit Trafo
|
|
478
488
|
* Trafos müssen zuertst konvertiert werden. */
|
|
479
489
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
480
|
-
startTime =
|
|
481
|
-
yield this.convertStatcom(cimModel, soSfKnoten);
|
|
490
|
+
startTime = performance.now();
|
|
491
|
+
yield this.convertStatcom(cimModel, integral7Modell.targetVoltages, soSfKnoten);
|
|
482
492
|
logExecutionTime(this.logger, startTime, `convertStatcom`);
|
|
483
493
|
}
|
|
484
494
|
/** SVC -> StaticVarCompensator */
|
|
485
495
|
/** Sonderfall mit Trafo
|
|
486
496
|
* Trafos müssen zuertst konvertiert werden.*/
|
|
487
497
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
488
|
-
startTime =
|
|
489
|
-
yield this.convertSVC(cimModel, soSfKnoten);
|
|
498
|
+
startTime = performance.now();
|
|
499
|
+
yield this.convertSVC(cimModel, integral7Modell.targetVoltages, soSfKnoten);
|
|
490
500
|
logExecutionTime(this.logger, startTime, `convertSVC`);
|
|
491
501
|
}
|
|
492
502
|
/** HGÜ Knoten */
|
|
@@ -497,13 +507,13 @@ class ConverterIntegral7 {
|
|
|
497
507
|
/** HGÜ Kopfklassisch */
|
|
498
508
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
499
509
|
startTime = perf_hooks.performance.now();
|
|
500
|
-
|
|
510
|
+
yield this.convertCsConverterDC(cimModel, integral7Modell, soSfKnoten);
|
|
501
511
|
logExecutionTime(this.logger, startTime, `convertCsConverterDC`);
|
|
502
512
|
}
|
|
503
513
|
/** netz_hguekopfvsc */
|
|
504
514
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
505
515
|
startTime = perf_hooks.performance.now();
|
|
506
|
-
|
|
516
|
+
yield this.convertVsConverterDC(cimModel, integral7Modell.targetVoltages, integral7Modell, soSfKnoten);
|
|
507
517
|
logExecutionTime(this.logger, startTime, `convertVsConverterDC`);
|
|
508
518
|
}
|
|
509
519
|
/** HGÜ-Leitungen -> (DCLine, DCLineSegment)*/
|
|
@@ -522,7 +532,7 @@ class ConverterIntegral7 {
|
|
|
522
532
|
logExecutionTime(this.logger, startTime, `assignment of sequence number`);
|
|
523
533
|
/** DC Model */
|
|
524
534
|
/** DL Profile */
|
|
525
|
-
this.executor = new executor_1.Executor(this.mysqlController);
|
|
535
|
+
this.executor = new executor_1.Executor(this.mysqlController, this.configUuid);
|
|
526
536
|
yield this.executor.mergeDataFromIntegralID2UUID(this.integralID2UUID);
|
|
527
537
|
yield this.executor.mergeDataFromFrame(frame);
|
|
528
538
|
yield this.executor.loadAllSchemaVariants();
|
|
@@ -532,15 +542,29 @@ class ConverterIntegral7 {
|
|
|
532
542
|
// netzSchaltanlageIDs.forEach(netzSchaltanlageID => frame.integral7Modell.integralStandorte.set(netzSchaltanlageID, undefined));
|
|
533
543
|
// netzSaabschnittIDs.forEach(netzSaabschnittID => frame.integral7Modell.integralSchaltanlagenAbschnitte.set(netzSaabschnittID, undefined));
|
|
534
544
|
// netzSchaltfeldIDs.forEach(netzSchaltfeldID => frame.integral7Modell.integralSchaltfelder.set(netzSchaltfeldID, undefined));
|
|
535
|
-
const
|
|
545
|
+
const netz_standortIds = standortIDs.map(standortId => {
|
|
546
|
+
return { id: standortId };
|
|
547
|
+
});
|
|
548
|
+
const netz_knotensoIds = knotenSoIDs.map(knotenSoId => {
|
|
549
|
+
return { id: knotenSoId };
|
|
550
|
+
});
|
|
551
|
+
for (const entry of this.exportFramesBoundary.entries()) {
|
|
552
|
+
entry[1].integral7Modell.integralStandorte.forEach((_, key) => {
|
|
553
|
+
netz_standortIds.push({ id: key });
|
|
554
|
+
});
|
|
555
|
+
entry[1].integral7Modell.integralKnotenSo.forEach((_, key) => {
|
|
556
|
+
netz_knotensoIds.push({ id: key });
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
const netzLeitungIds = [...integral7Modell.integralLeitungen.keys()];
|
|
560
|
+
const netzHgueLeitungIds = [...integral7Modell.integralHgueLeitungIds.values()];
|
|
561
|
+
const netzErsatzlaengszweigIds = [...integral7Modell.integalErsatzLaengszweigIds.values()];
|
|
562
|
+
const netzStreckenlastIds = [...integral7Modell.integralLeitungen.values()].map(leitung => leitung.streckenlastId).filter(id => id !== undefined && id !== null);
|
|
563
|
+
const allLeitungIds = [...new Set([...netzLeitungIds, ...netzHgueLeitungIds, ...netzErsatzlaengszweigIds, ...netzStreckenlastIds]).values()];
|
|
536
564
|
const convertOptions = {
|
|
537
565
|
only: {
|
|
538
|
-
netz_standortIds
|
|
539
|
-
|
|
540
|
-
}),
|
|
541
|
-
netz_knotensoIds: knotenSoIDs.map(knotenSoId => {
|
|
542
|
-
return { id: knotenSoId };
|
|
543
|
-
}),
|
|
566
|
+
netz_standortIds,
|
|
567
|
+
netz_knotensoIds,
|
|
544
568
|
netz_schaltanlagenIds: schaltanlagenIDs.map(schaltanlagenId => {
|
|
545
569
|
return { id: schaltanlagenId };
|
|
546
570
|
}),
|
|
@@ -550,7 +574,7 @@ class ConverterIntegral7 {
|
|
|
550
574
|
netz_schaltfeldIds: schaltfeldIDs.map(schaltfeldId => {
|
|
551
575
|
return { id: schaltfeldId };
|
|
552
576
|
}),
|
|
553
|
-
netz_leitungIds:
|
|
577
|
+
netz_leitungIds: allLeitungIds.map(leitungId => {
|
|
554
578
|
return { id: leitungId };
|
|
555
579
|
})
|
|
556
580
|
}
|
|
@@ -558,42 +582,23 @@ class ConverterIntegral7 {
|
|
|
558
582
|
const resultingObjects = yield this.executor.convert(convertOptions);
|
|
559
583
|
for (const resultingObject of resultingObjects) {
|
|
560
584
|
if (resultingObject instanceof Diagram_1.Diagram) {
|
|
585
|
+
// UUIDs von Diagram-Objekten werden aus I7 übernommen
|
|
561
586
|
frame.cimModel.addDiagram(resultingObject);
|
|
562
587
|
}
|
|
563
588
|
else if (resultingObject instanceof DiagramObject_1.DiagramObject) {
|
|
589
|
+
// UUIDs gemäß UUID v5 generieren
|
|
590
|
+
const diagramObject = resultingObject;
|
|
591
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.DiagramObject, this.configUuid, diagramObject.getIdentifiedObjectUUID());
|
|
592
|
+
diagramObject.mrid = uuid;
|
|
593
|
+
for (const diagramObjectPoint of diagramObject.diagramObjectPoints) {
|
|
594
|
+
const key = uuid + String((_a = diagramObjectPoint.sequenceNumber) !== null && _a !== void 0 ? _a : 1);
|
|
595
|
+
const pointUuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.DiagramObjectPoint, this.configUuid, key);
|
|
596
|
+
diagramObjectPoint.mrid = pointUuid;
|
|
597
|
+
}
|
|
564
598
|
frame.cimModel.addDiagramObject(resultingObject);
|
|
565
599
|
}
|
|
566
600
|
}
|
|
567
601
|
console.log('over');
|
|
568
|
-
// this.dlConverterI7.prepare(this.mysqlController, this.logger);
|
|
569
|
-
//
|
|
570
|
-
// const powerTransformers = cimModel.powerTransformer;
|
|
571
|
-
// const powerTransformerEnds = cimModel.powerTransformerEnds;
|
|
572
|
-
// const lines = cimModel.lines;
|
|
573
|
-
// const objects = cimModel.objects;
|
|
574
|
-
//
|
|
575
|
-
// await this.dlConverterI7.convert(this.availableTableNames, true, {
|
|
576
|
-
// standortIDs,
|
|
577
|
-
// schaltanlagenIDs,
|
|
578
|
-
// schaltanlagenAbschnittIDs,
|
|
579
|
-
// knotenSoIDs,
|
|
580
|
-
// schaltfeldIDs,
|
|
581
|
-
// laengskupplungIDs: integral7Modell.laengskupplungIDs,
|
|
582
|
-
// querkupplungIDs: integral7Modell.querkupplungIDs,
|
|
583
|
-
// integralID2UUID: this.integralID2UUID,
|
|
584
|
-
// integralSchaltfelder: integral7Modell.integralSchaltfelder,
|
|
585
|
-
// integralLaengskupplungen: integral7Modell.integralLaengskupplungen,
|
|
586
|
-
// powerTransformers,
|
|
587
|
-
// powerTransformerEnds,
|
|
588
|
-
// integralLeitungen: integral7Modell.integralLeitungen,
|
|
589
|
-
// integralHgueLeitungen: integral7Modell.integralHgueLeitungen,
|
|
590
|
-
// lines,
|
|
591
|
-
// objects
|
|
592
|
-
// }
|
|
593
|
-
// );
|
|
594
|
-
//
|
|
595
|
-
// this.dlConverterI7.addCimObjects2Model(cimModel);
|
|
596
|
-
// this.dlConverterI7.cleanUp();
|
|
597
602
|
});
|
|
598
603
|
}
|
|
599
604
|
assignTerminalSequenceNumber(cimModel) {
|
|
@@ -615,7 +620,7 @@ class ConverterIntegral7 {
|
|
|
615
620
|
}
|
|
616
621
|
}
|
|
617
622
|
else {
|
|
618
|
-
|
|
623
|
+
this.logger.debug(`debug --- DCTerminal ${terminalUUID} hat kein angeschlossenes DCConductingEquipment`);
|
|
619
624
|
}
|
|
620
625
|
}
|
|
621
626
|
}
|
|
@@ -635,7 +640,7 @@ class ConverterIntegral7 {
|
|
|
635
640
|
}
|
|
636
641
|
}
|
|
637
642
|
else {
|
|
638
|
-
|
|
643
|
+
this.logger.debug(`debug --- Terminal ${terminalUUID} hat kein angeschlossenes ConductingEquipment`);
|
|
639
644
|
}
|
|
640
645
|
}
|
|
641
646
|
}
|
|
@@ -655,7 +660,7 @@ class ConverterIntegral7 {
|
|
|
655
660
|
}
|
|
656
661
|
}
|
|
657
662
|
else {
|
|
658
|
-
|
|
663
|
+
this.logger.debug(`debug --- ACDCConverterDCTerminal ${terminalUUID} hat kein angeschlossenes DCConductingEquipment`);
|
|
659
664
|
}
|
|
660
665
|
}
|
|
661
666
|
}
|
|
@@ -671,6 +676,7 @@ class ConverterIntegral7 {
|
|
|
671
676
|
for (const i7Data of result) {
|
|
672
677
|
const i7Schluessel = integral_prefix_1.GEOREGION_PRAEFIX + (0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
673
678
|
const region = new GeographicalRegion_1.GeographicalRegion((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner), '_GR']), (0, utils_2.ueberpruefeZeichenkette)(i7Data.kurzname), i7Schluessel);
|
|
679
|
+
//region.i7key = i7Schluessel;
|
|
674
680
|
this.addIdMapping(i7Data.id, region.mrid, integral_sql_1.Integral7TableNames.REGION);
|
|
675
681
|
regions.push(region);
|
|
676
682
|
}
|
|
@@ -689,19 +695,22 @@ class ConverterIntegral7 {
|
|
|
689
695
|
}));
|
|
690
696
|
});
|
|
691
697
|
}
|
|
692
|
-
convertRegelzone(cimModel, defaultValuesConfig) {
|
|
698
|
+
convertRegelzone(cimModel, defaultValuesConfig, standortIDs) {
|
|
693
699
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
694
700
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.REGELZONE)) {
|
|
695
|
-
const
|
|
696
|
-
|
|
701
|
+
//const resultNg: Regelzone[] = await this.mysqlController.execQuery(getNetzQuery(I7Objects.NETZGRUPPE, 0, 0, standortIDs));
|
|
702
|
+
const resultRz = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.REGELZONE, 0, 0, []));
|
|
703
|
+
for (const i7Data of resultRz) {
|
|
697
704
|
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
|
|
705
|
+
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);
|
|
706
|
+
ctrlarea.type = ControlAreaTypeKind_1.ControlAreaTypeKind.agc;
|
|
707
|
+
ctrlarea.netInterchange = 0;
|
|
699
708
|
cimModel.addControlArea(ctrlarea);
|
|
700
709
|
this.addIdMapping(i7Data.id, ctrlarea.mrid, integral_sql_1.Integral7TableNames.REGELZONE);
|
|
701
710
|
}
|
|
702
711
|
}
|
|
703
712
|
else {
|
|
704
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.REGELZONE} ist nicht vorhanden.`);
|
|
713
|
+
this.logger.debug(`debug --- Tabelle ${integral_sql_1.Integral7TableNames.REGELZONE} ist nicht vorhanden.`);
|
|
705
714
|
}
|
|
706
715
|
});
|
|
707
716
|
}
|
|
@@ -718,7 +727,7 @@ class ConverterIntegral7 {
|
|
|
718
727
|
const regionUUID = this.integralID2UUID.get(i7Data.georegion);
|
|
719
728
|
let region = regions.find(elem => elem.mrid === regionUUID);
|
|
720
729
|
if (!region) {
|
|
721
|
-
region = (0, utils_1.createIfNotExitsGeoregionByName)(this.cimModelDefault, (0, util_create_1.createNotation)([defaultValuesConfig.GeographicalRegion.name, '_GR']));
|
|
730
|
+
region = (0, utils_1.createIfNotExitsGeoregionByName)(this.cimModelDefault, (0, util_create_1.createNotation)([defaultValuesConfig.GeographicalRegion.name, '_GR']), this.configUuid);
|
|
722
731
|
this.logger.debug(`SubGeographicalRegion UUID ${subregion.mrid} I7-ID ${i7Data.id} Name ${i7Data.bezeichner} hat keine Region.`);
|
|
723
732
|
}
|
|
724
733
|
subregion.region = region;
|
|
@@ -748,10 +757,14 @@ class ConverterIntegral7 {
|
|
|
748
757
|
for (const i7Data of result) {
|
|
749
758
|
const i7name = (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', (0, utils_2.ueberpruefeZeichenkette)(i7Data.ukz), '_S'], 32);
|
|
750
759
|
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);
|
|
760
|
+
const i7Schluessel = integral_prefix_1.STANDORT_PRAEFIX +
|
|
761
|
+
i7Data.ukz +
|
|
762
|
+
integral_prefix_1.MITTIGER_PUNKT +
|
|
763
|
+
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
751
764
|
let subregion = cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
752
765
|
if (!subregion) {
|
|
753
|
-
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
754
|
-
subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region);
|
|
766
|
+
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name, this.configUuid);
|
|
767
|
+
subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region, this.configUuid);
|
|
755
768
|
}
|
|
756
769
|
substation.subGeographicalRegion = subregion;
|
|
757
770
|
subregion.addSubstation(substation);
|
|
@@ -760,11 +773,11 @@ class ConverterIntegral7 {
|
|
|
760
773
|
if ((coor === null || coor === void 0 ? void 0 : coor.length) === 2) {
|
|
761
774
|
const coordinateSystem = cimModel.getCoordinateSystemByName(this.coordinateSystem);
|
|
762
775
|
// Location
|
|
763
|
-
const location = new Location_1.Location(common_utils_1.CommonUtils.
|
|
776
|
+
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
777
|
location.addPowerSystemResource(substation);
|
|
765
778
|
substation.location = location;
|
|
766
779
|
location.coordinateSystem = coordinateSystem;
|
|
767
|
-
const positionPoint = new PositionPoint_1.PositionPoint(common_utils_1.CommonUtils.
|
|
780
|
+
const positionPoint = new PositionPoint_1.PositionPoint(common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.PositionPoint, this.configUuid, location.getUUID()));
|
|
768
781
|
/** Lan Länge */
|
|
769
782
|
positionPoint.xPosition = coor[0];
|
|
770
783
|
/** Lat Breite */
|
|
@@ -804,12 +817,12 @@ class ConverterIntegral7 {
|
|
|
804
817
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
805
818
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
806
819
|
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 =
|
|
820
|
+
const facility = util_cim_model_1.UtilCimModel.createFacilityInstanceForPsr(cimModel, vl, cim_constants_1.CimAssetAliasNames.VoltageLevel, this.configUuid);
|
|
808
821
|
if (i7Data.baujahr) {
|
|
809
|
-
|
|
822
|
+
util_cim_model_1.UtilCimModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
810
823
|
}
|
|
811
824
|
const un = (0, utils_2.getU)(i7Data.un);
|
|
812
|
-
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.exportFramesBoundary);
|
|
825
|
+
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.configUuid, this.exportFramesBoundary);
|
|
813
826
|
vl.baseVoltage = baseVoltage;
|
|
814
827
|
cimModel.addVoltageLevel(vl);
|
|
815
828
|
this.addIdMapping(i7Data.id, vl.mrid, integral_sql_1.Integral7TableNames.SCHALTANLAGE);
|
|
@@ -867,6 +880,9 @@ class ConverterIntegral7 {
|
|
|
867
880
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
868
881
|
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
869
882
|
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_B'], 32, true), i7Data.kurzname, i7Schluessel);
|
|
883
|
+
if (i7Data.feldnummer > 0) {
|
|
884
|
+
const stop = true;
|
|
885
|
+
}
|
|
870
886
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
871
887
|
bay.locationID = i7Data.ips_folder_id;
|
|
872
888
|
bay.voltageLevel = voltageLevel;
|
|
@@ -893,8 +909,10 @@ class ConverterIntegral7 {
|
|
|
893
909
|
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
910
|
for (const i7Data of result) {
|
|
895
911
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
896
|
-
const
|
|
897
|
-
const
|
|
912
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
913
|
+
// const vl = new VoltageLevel(getUUID(i7Data.guid_v, this.objectMappingConfig.standardiseUuid), createNotation([getName(i7Data), i7Data.un.toString(), '_VL']), i7Data.kurzname);
|
|
914
|
+
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);
|
|
915
|
+
//const rdfid = getUUID(i7Data.guid); /**This is the mrid for TopologicalNode */
|
|
898
916
|
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
917
|
connectivityNode.setConnectivityNodeContainer(vl);
|
|
900
918
|
vl.addConnectivityNode(connectivityNode);
|
|
@@ -903,7 +921,7 @@ class ConverterIntegral7 {
|
|
|
903
921
|
connectivityNode.boundaryPoint = true;
|
|
904
922
|
}
|
|
905
923
|
const un = (0, utils_2.getU)(i7Data.un);
|
|
906
|
-
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.exportFramesBoundary);
|
|
924
|
+
const baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, un, this.configUuid, this.exportFramesBoundary);
|
|
907
925
|
/** Spannungsband */
|
|
908
926
|
integral7.targetVoltages.set(i7Data.id, { usoll: i7Data.usoll, umin: i7Data.umin, umax: i7Data.umax });
|
|
909
927
|
// TODO VoltageLimits?
|
|
@@ -923,7 +941,7 @@ class ConverterIntegral7 {
|
|
|
923
941
|
this.logger.debug(`KnotenSo ${i7Data.id} ${vl.mrid} besitzt keine Substation.`);
|
|
924
942
|
}
|
|
925
943
|
//PSRType
|
|
926
|
-
const psrType = (0, utils_2.getPSRType)(cimModel, 'Abzweigmast');
|
|
944
|
+
const psrType = (0, utils_2.getPSRType)(cimModel, 'Abzweigmast', this.configUuid);
|
|
927
945
|
vl.psrTypeUUID = psrType === null || psrType === void 0 ? void 0 : psrType.mrid;
|
|
928
946
|
// psrType.addPowerSystemResource(vl);
|
|
929
947
|
const object = new KnotenSo_1.KnotenSoImpl(i7Data);
|
|
@@ -946,8 +964,8 @@ class ConverterIntegral7 {
|
|
|
946
964
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KNOTEN)) {
|
|
947
965
|
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
966
|
for (const i7Data of result) {
|
|
949
|
-
const
|
|
950
|
-
const dcNode = new DCNode_1.DCNode(
|
|
967
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
968
|
+
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
969
|
cimModel.addDCNode(dcNode);
|
|
952
970
|
this.addIdMapping(i7Data.id, dcNode.mrid, integral_sql_1.Integral7TableNames.HGUE_KNOTEN);
|
|
953
971
|
}
|
|
@@ -958,33 +976,37 @@ class ConverterIntegral7 {
|
|
|
958
976
|
});
|
|
959
977
|
}
|
|
960
978
|
convertSammelschienenAbschnitte(cimModel, integral7, schaltanlagenAbschnittIDs) {
|
|
979
|
+
var _a;
|
|
961
980
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
962
981
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SAMMELSCHIENE)) {
|
|
963
982
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.SAMMELSCHIENE, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.SAMMELSCHIENE), schaltanlagenAbschnittIDs));
|
|
964
983
|
for (const i7Data of result) {
|
|
965
984
|
const i7Schaltanlagenabschnitt = integral7.integralSchaltanlagenAbschnitte.get(i7Data.saabschnitt);
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
// die Sammelschienen sind nicht aggregiert.
|
|
969
|
-
busbarSection.aggregate = false;
|
|
970
|
-
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
985
|
+
//const rdfid: string = getUUID(i7Data.guid); /** this is the mrid for TopologicalNode*/
|
|
986
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
971
987
|
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
988
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Schaltanlagenabschnitt.id));
|
|
973
989
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
990
|
+
const keyBusbarSection = (_a = integral_sql_1.I7Objects.SAMMELSCHIENE + (voltageLevel === null || voltageLevel === void 0 ? void 0 : voltageLevel.getUUID())) !== null && _a !== void 0 ? _a : '' + (connectivityNode === null || connectivityNode === void 0 ? void 0 : connectivityNode.getUUID());
|
|
991
|
+
const uuidBusbarSection = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.BusbarSection, this.configUuid, keyBusbarSection);
|
|
992
|
+
const busbarSection = new BusbarSection_1.BusbarSection(uuidBusbarSection, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Schaltanlagenabschnitt), '_BBS']), i7Schaltanlagenabschnitt.kurzname);
|
|
993
|
+
busbarSection.ipMax = i7Data.limit_ip;
|
|
994
|
+
// die Sammelschienen sind nicht aggregiert.
|
|
995
|
+
busbarSection.aggregate = false;
|
|
974
996
|
if (voltageLevel) {
|
|
975
997
|
busbarSection.equipmentContainer = voltageLevel;
|
|
976
998
|
voltageLevel.addEquipment(busbarSection);
|
|
977
999
|
connectivityNode.connectivityNodeContainer = voltageLevel;
|
|
978
1000
|
voltageLevel.addConnectivityNode(connectivityNode);
|
|
979
1001
|
// umax
|
|
980
|
-
voltageLevel.highVoltageLimit = i7Data.umax;
|
|
1002
|
+
voltageLevel.highVoltageLimit = (0, parser_utils_1.isNumericI7)(i7Data.umax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.umax) : voltageLevel.highVoltageLimit;
|
|
981
1003
|
// umin
|
|
982
|
-
voltageLevel.lowVoltageLimit = i7Data.umin;
|
|
983
|
-
const i7Schluessel = voltageLevel.
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1004
|
+
voltageLevel.lowVoltageLimit = (0, parser_utils_1.isNumericI7)(i7Data.umin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.umin) : voltageLevel.lowVoltageLimit;
|
|
1005
|
+
/**const i7Schluessel = voltageLevel.substation.name +
|
|
1006
|
+
SAMMELSCHIENENABSCHNITT_PRAEFIX +
|
|
1007
|
+
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1008
|
+
busbarSection.description = i7Schluessel;
|
|
1009
|
+
connectivityNode.description = i7Schluessel;*/
|
|
988
1010
|
/** Spannungsband */
|
|
989
1011
|
integral7.targetVoltages.set(i7Data.id, { usoll: i7Data.usoll, umin: i7Data.umin, umax: i7Data.umax });
|
|
990
1012
|
// TODO VoltageLimits?
|
|
@@ -1014,6 +1036,8 @@ class ConverterIntegral7 {
|
|
|
1014
1036
|
const result = yield this.queryDataInChuncks(integral_sql_1.I7Objects.KNOTEN_SF, schaltfeldIDs);
|
|
1015
1037
|
for (const i7Data of result) {
|
|
1016
1038
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.schaltfeld));
|
|
1039
|
+
/* const key = I7Objects.KNOTEN_SF + (bay?.getUUID() ?? '') + String(i7Data.id) + String(i7Data.schaltfeld);
|
|
1040
|
+
const uuid = CommonUtils.generateUUIDv5(ClassNames.ConnectivityNode, this.configUuid, key);*/
|
|
1017
1041
|
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
1042
|
if (bay) {
|
|
1019
1043
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -1034,12 +1058,16 @@ class ConverterIntegral7 {
|
|
|
1034
1058
|
});
|
|
1035
1059
|
}
|
|
1036
1060
|
convertKnotenKf(cimModel, querkupplungIDs) {
|
|
1061
|
+
var _a;
|
|
1037
1062
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1038
1063
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_KF)) {
|
|
1039
1064
|
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
1065
|
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
1066
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.kpfeld));
|
|
1067
|
+
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);
|
|
1068
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, key);
|
|
1069
|
+
// const connectivityNode = new ConnectivityNode(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid), createNotation([getName(i7Data), '_CN']), 'knotenkf');
|
|
1070
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'knotenkf');
|
|
1043
1071
|
if (bay) {
|
|
1044
1072
|
connectivityNode.connectivityNodeContainer = bay;
|
|
1045
1073
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -1057,12 +1085,16 @@ class ConverterIntegral7 {
|
|
|
1057
1085
|
});
|
|
1058
1086
|
}
|
|
1059
1087
|
convertKnotenLk(cimModel, laengskupplungIDs) {
|
|
1088
|
+
var _a;
|
|
1060
1089
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1061
1090
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_LK)) {
|
|
1062
1091
|
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
1092
|
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
1093
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.lkupplung));
|
|
1094
|
+
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);
|
|
1095
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, key);
|
|
1096
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CN']), 'KnotenLk');
|
|
1097
|
+
// const connectivityNode = new ConnectivityNode(CommonUtils.generateUUID(), createNotation([getName(i7Data), '_CN']), 'KnotenLk');
|
|
1066
1098
|
if (bay) {
|
|
1067
1099
|
connectivityNode.connectivityNodeContainer = bay;
|
|
1068
1100
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -1085,7 +1117,9 @@ class ConverterIntegral7 {
|
|
|
1085
1117
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SCHLAUFE)) {
|
|
1086
1118
|
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
1119
|
for (const i7Data of result) {
|
|
1088
|
-
const
|
|
1120
|
+
const key = integral_sql_1.I7Objects.SCHLAUFE + String(i7Data.id);
|
|
1121
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Terminal, this.configUuid, key);
|
|
1122
|
+
const terminal = new Terminal_1.Terminal(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_Schlaufe_T']), i7Data.kurzname, i7Data.kommentar);
|
|
1089
1123
|
terminal.connected = (0, parser_utils_1.convertToBooleanI7)(i7Data.schaltzustand);
|
|
1090
1124
|
terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
1091
1125
|
this.addIdMapping(i7Data.id, terminal.mrid, integral_sql_1.Integral7TableNames.SCHLAUFE);
|
|
@@ -1125,13 +1159,19 @@ class ConverterIntegral7 {
|
|
|
1125
1159
|
cimModel.addMultiplierFactor(mf);
|
|
1126
1160
|
load.multiplierFactorUUID = mf.getUUID();
|
|
1127
1161
|
}
|
|
1162
|
+
if (load.getUUID() === '7c1d4120-fdaf-4bc1-aba1-9e8e76aa7a3b') {
|
|
1163
|
+
const stop = true;
|
|
1164
|
+
}
|
|
1128
1165
|
/** SSH */
|
|
1129
|
-
const powerData = (0, utils_2.
|
|
1166
|
+
const powerData = (0, utils_2.getActiveReactivePower2)(i7Data, mf);
|
|
1167
|
+
// const powerDatav2 = getActiveReactivePower2(i7Data, mf);
|
|
1130
1168
|
load.p = powerData[0];
|
|
1131
1169
|
load.q = powerData[1];
|
|
1132
|
-
/**
|
|
1170
|
+
/** AMPI7 profile */
|
|
1133
1171
|
load.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1134
1172
|
load.q_mf = powerData[3] ? powerData[3] : undefined;
|
|
1173
|
+
load.cos_phi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1174
|
+
load.normallyInService = inBetrieb;
|
|
1135
1175
|
//TODO
|
|
1136
1176
|
/* conformLoad.pFixed = conformLoad.p;
|
|
1137
1177
|
conformLoad.qFixed = conformLoad.q; */
|
|
@@ -1149,9 +1189,8 @@ class ConverterIntegral7 {
|
|
|
1149
1189
|
}
|
|
1150
1190
|
});
|
|
1151
1191
|
}
|
|
1152
|
-
convertEinspeisungen(cimModel, knotenSfIDs, objectMappingConfig, energySourceTypeMappingConfig) {
|
|
1192
|
+
convertEinspeisungen(cimModel, targetVoltages, knotenSfIDs, objectMappingConfig, energySourceTypeMappingConfig) {
|
|
1153
1193
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1154
|
-
const targetConfig = objectMappingConfig.Einspeisung;
|
|
1155
1194
|
const targetClass = objectMappingConfig.Einspeisung.class;
|
|
1156
1195
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.EINSPEISUNG)) {
|
|
1157
1196
|
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 +1200,7 @@ class ConverterIntegral7 {
|
|
|
1161
1200
|
break;
|
|
1162
1201
|
}
|
|
1163
1202
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1164
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1203
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1165
1204
|
break;
|
|
1166
1205
|
}
|
|
1167
1206
|
case cim_class_names_1.ClassNames.EnergySource: {
|
|
@@ -1169,17 +1208,17 @@ class ConverterIntegral7 {
|
|
|
1169
1208
|
const filtered = result.filter(it => it.spannungsgeregelt && it.einspprio === config.prio);
|
|
1170
1209
|
switch (config.class) {
|
|
1171
1210
|
case 'ExternalNetworkInjection': {
|
|
1172
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, filtered);
|
|
1211
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, filtered);
|
|
1173
1212
|
break;
|
|
1174
1213
|
}
|
|
1175
1214
|
case 'SynchronousMachine': {
|
|
1176
|
-
yield this.convertEnergySourceToSynchronousMachine(cimModel, filtered);
|
|
1215
|
+
yield this.convertEnergySourceToSynchronousMachine(cimModel, targetVoltages, filtered);
|
|
1177
1216
|
break;
|
|
1178
1217
|
}
|
|
1179
1218
|
}
|
|
1180
1219
|
}
|
|
1181
1220
|
const i7EnergySourceResults = result.filter(it => !it.spannungsgeregelt);
|
|
1182
|
-
yield this.convertEinspeisungen2EnergySource(cimModel, i7EnergySourceResults, energySourceTypeMappingConfig);
|
|
1221
|
+
yield this.convertEinspeisungen2EnergySource(cimModel, targetVoltages, i7EnergySourceResults, energySourceTypeMappingConfig);
|
|
1183
1222
|
const others = result.filter(it => !it.spannungsgeregelt && !it.einspprio);
|
|
1184
1223
|
console.log(`convertEinspeisungen nicht konvertierte Objekte ${others.length}`);
|
|
1185
1224
|
break;
|
|
@@ -1191,21 +1230,21 @@ class ConverterIntegral7 {
|
|
|
1191
1230
|
}
|
|
1192
1231
|
});
|
|
1193
1232
|
}
|
|
1194
|
-
convertErsatzQuerZweige(cimModel, knotenSfIDs, targetClass) {
|
|
1233
|
+
convertErsatzQuerZweige(cimModel, targetVoltages, knotenSfIDs, targetClass) {
|
|
1195
1234
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1196
1235
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG)) {
|
|
1197
1236
|
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
1237
|
switch (targetClass) {
|
|
1199
1238
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1200
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1239
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1201
1240
|
break;
|
|
1202
1241
|
}
|
|
1203
1242
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1204
|
-
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result);
|
|
1243
|
+
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1205
1244
|
break;
|
|
1206
1245
|
}
|
|
1207
1246
|
default: {
|
|
1208
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1247
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1209
1248
|
}
|
|
1210
1249
|
}
|
|
1211
1250
|
}
|
|
@@ -1214,7 +1253,7 @@ class ConverterIntegral7 {
|
|
|
1214
1253
|
}
|
|
1215
1254
|
});
|
|
1216
1255
|
}
|
|
1217
|
-
convertGeneratoren(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1256
|
+
convertGeneratoren(cimModel, targetVoltages, knotenSfIDs, energyTypesConfig) {
|
|
1218
1257
|
var _a;
|
|
1219
1258
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1220
1259
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
@@ -1224,6 +1263,7 @@ class ConverterIntegral7 {
|
|
|
1224
1263
|
const genType = this.generatorTypen.get(i7Data.nametyp);
|
|
1225
1264
|
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
1265
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1266
|
+
const cosPhi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1227
1267
|
const maxP = (0, parser_utils_1.isNumericI7)(i7Data.p_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_max) : undefined;
|
|
1228
1268
|
const minP = (0, parser_utils_1.isNumericI7)(i7Data.p_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_min) : undefined;
|
|
1229
1269
|
const mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
@@ -1234,7 +1274,9 @@ class ConverterIntegral7 {
|
|
|
1234
1274
|
const isRotatingPhaseShifter = (mf !== undefined && maxP === 0 && minP === 0) || flagCondenserOperationMode;
|
|
1235
1275
|
const isGenerator = (maxP > 0 || maxP === undefined);
|
|
1236
1276
|
const isMotor = (minP < 0 || minP === undefined);
|
|
1277
|
+
/**AMPI7 profile */
|
|
1237
1278
|
synchronousMachine.nameprimaertyp = i7Data.nameprimaertyp !== undefined ? i7Data.nameprimaertyp : (genType !== undefined ? genType.nameprimaertyp : undefined);
|
|
1279
|
+
synchronousMachine.cos_phi = cosPhi;
|
|
1238
1280
|
/** Set machine type */
|
|
1239
1281
|
if (isRotatingPhaseShifter && isGenerator && isMotor) {
|
|
1240
1282
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generatorOrCondenserOrMotor;
|
|
@@ -1303,16 +1345,24 @@ class ConverterIntegral7 {
|
|
|
1303
1345
|
}
|
|
1304
1346
|
const prio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
1305
1347
|
synchronousMachine.referencePriority = prio;
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1348
|
+
let maxQ = (0, parser_utils_1.isNumericI7)(i7Data.q_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_max) : undefined;
|
|
1349
|
+
let minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
1350
|
+
let maxQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmax) : undefined;
|
|
1351
|
+
let minQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmax) : undefined;
|
|
1352
|
+
let maxQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmin) : undefined;
|
|
1353
|
+
let minQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmin) : undefined;
|
|
1354
|
+
maxQ = maxQ ? maxQ : minQ;
|
|
1355
|
+
minQ = minQ ? minQ : maxQ;
|
|
1356
|
+
maxQvonPmax = maxQvonPmax ? maxQvonPmax : maxQvonPmin;
|
|
1357
|
+
minQvonPmax = minQvonPmax ? minQvonPmax : minQvonPmin;
|
|
1358
|
+
maxQvonPmin = maxQvonPmin ? maxQvonPmin : maxQvonPmax;
|
|
1359
|
+
minQvonPmin = minQvonPmin ? minQvonPmin : minQvonPmax;
|
|
1312
1360
|
synchronousMachine.maxQ = maxQ ? maxQ : maxQvonPmax;
|
|
1313
1361
|
synchronousMachine.minQ = minQ ? minQ : minQvonPmin;
|
|
1314
1362
|
const pType = (genType === null || genType === void 0 ? void 0 : genType.sr) * (genType === null || genType === void 0 ? void 0 : genType.cosphir);
|
|
1315
1363
|
const qType = Math.sqrt(Math.pow(genType === null || genType === void 0 ? void 0 : genType.sr, 2) - Math.pow(pType, 2));
|
|
1364
|
+
// AMP I7 Profil
|
|
1365
|
+
synchronousMachine.cos_phi = i7Data.cos_phi;
|
|
1316
1366
|
// SSH Profil
|
|
1317
1367
|
synchronousMachine.setActivePower(p * -1); //convert to load sign system
|
|
1318
1368
|
synchronousMachine.setReactivePower(q * -1); //convert to load sign system
|
|
@@ -1339,21 +1389,21 @@ class ConverterIntegral7 {
|
|
|
1339
1389
|
/** EQ-SC */
|
|
1340
1390
|
synchronousMachine.earthing = ((_a = i7Data.erdung) === null || _a === void 0 ? void 0 : _a.length) > 0 && i7Data.erdung != 'isoliert' ? true : false;
|
|
1341
1391
|
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 =
|
|
1392
|
+
synchronousMachine.r0 = 0;
|
|
1343
1393
|
synchronousMachine.r2 = 0;
|
|
1344
|
-
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1394
|
+
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0g) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0g) : undefined;
|
|
1345
1395
|
synchronousMachine.x2 = 0;
|
|
1346
1396
|
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
1397
|
// synchronousMachine.earthingStarPointR
|
|
1348
1398
|
// synchronousMachine.earthingStarPointX
|
|
1349
|
-
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1399
|
+
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.ikd) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ikd) : undefined;
|
|
1350
1400
|
// synchronousMachine.mu: number;
|
|
1351
1401
|
// synchronousMachine.satDirectSyncX: number;
|
|
1352
1402
|
// synchronousMachine.satDirectTransX: number;
|
|
1353
1403
|
// synchronousMachine.shortCircuitRotorType: ShortCircuitRotorKind;
|
|
1354
1404
|
// synchronousMachine.voltageRegulationRange: number;
|
|
1355
1405
|
/** Create ReactiveCapabilityCurves */
|
|
1356
|
-
if (minP && maxP && minQvonPmin && maxQvonPmax) {
|
|
1406
|
+
if (minP !== undefined && maxP !== undefined && minQvonPmin != undefined && maxQvonPmax !== undefined) {
|
|
1357
1407
|
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
1408
|
reactiveCapabilityCurve.curveStyle = CurveStyle_1.CurveStyle.straightLineYValues;
|
|
1359
1409
|
reactiveCapabilityCurve.xUnit = UnitSymbol_1.UnitSymbol.W;
|
|
@@ -1376,26 +1426,6 @@ class ConverterIntegral7 {
|
|
|
1376
1426
|
cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
1377
1427
|
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
1378
1428
|
}
|
|
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
1429
|
/** GeneratingUnit section*/
|
|
1400
1430
|
let generatingUnit;
|
|
1401
1431
|
if (synchronousMachine.type !== SynchronousMachineKind_1.SynchronousMachineKind.condenser) {
|
|
@@ -1486,7 +1516,7 @@ class ConverterIntegral7 {
|
|
|
1486
1516
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1487
1517
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1488
1518
|
}
|
|
1489
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data,
|
|
1519
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages, generatingUnit);
|
|
1490
1520
|
const smtcr = new SynchronousMachineTimeConstantReactance_1.SynchronousMachineTimeConstantReactance(common_utils_1.CommonUtils.generateUUID(), `smtcr_${synchronousMachine.name}`);
|
|
1491
1521
|
smtcr.enabled = inBetrieb;
|
|
1492
1522
|
// TODO: default value?
|
|
@@ -1530,12 +1560,9 @@ class ConverterIntegral7 {
|
|
|
1530
1560
|
}
|
|
1531
1561
|
});
|
|
1532
1562
|
}
|
|
1533
|
-
convertEnergySourceToSynchronousMachine(cimModel, result) {
|
|
1563
|
+
convertEnergySourceToSynchronousMachine(cimModel, targetVoltages, result) {
|
|
1534
1564
|
for (const i7Data of result) {
|
|
1535
1565
|
try {
|
|
1536
|
-
if (i7Data.guid.toLowerCase().includes('_e11f3fe9-0b7a-4ff1-a0dc-214c4c3fd8cc')) {
|
|
1537
|
-
console.log();
|
|
1538
|
-
}
|
|
1539
1566
|
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
1567
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1541
1568
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
@@ -1558,28 +1585,7 @@ class ConverterIntegral7 {
|
|
|
1558
1585
|
const usoll = +i7Data.usoll;
|
|
1559
1586
|
synchronousMachine.ratedU = usoll;
|
|
1560
1587
|
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);
|
|
1588
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages);
|
|
1583
1589
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1584
1590
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.GENERATOR);
|
|
1585
1591
|
}
|
|
@@ -1595,41 +1601,48 @@ class ConverterIntegral7 {
|
|
|
1595
1601
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs));
|
|
1596
1602
|
for (const i7Data of result) {
|
|
1597
1603
|
const assetType = this.asynchronmotorTypen.get(i7Data.nametyp);
|
|
1598
|
-
const
|
|
1604
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : true;
|
|
1605
|
+
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);
|
|
1606
|
+
const wirkungsgrad = (0, parser_utils_1.isNumericI7)(i7Data.wirkungsgrad) ? i7Data.wirkungsgrad : undefined;
|
|
1607
|
+
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);
|
|
1608
|
+
//AMPI7 profile content
|
|
1609
|
+
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
1610
|
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1600
1611
|
if (mf) {
|
|
1601
1612
|
cimModel.addMultiplierFactor(mf);
|
|
1602
1613
|
asynchronousMachine.multiplierFactorUUID = mf.getUUID();
|
|
1603
1614
|
}
|
|
1604
|
-
asynchronousMachine.
|
|
1605
|
-
|
|
1606
|
-
asynchronousMachine.iaIrRatio = (0, parser_utils_1.isNumericI7)(i7Data.ilr_ir) ? i7Data.ilr_ir : assetType === null || assetType === void 0 ? void 0 : assetType.ilr_ir;
|
|
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;
|
|
1615
|
+
asynchronousMachine.normallyInService = inBetrieb;
|
|
1616
|
+
//EQ core profile content
|
|
1611
1617
|
asynchronousMachine.ratedS = (0, parser_utils_1.isNumericI7)(i7Data.sr) ? i7Data.sr : assetType === null || assetType === void 0 ? void 0 : assetType.sr;
|
|
1618
|
+
//EQ short circuit profile content
|
|
1619
|
+
asynchronousMachine.ratedPowerFactor = cosphir;
|
|
1612
1620
|
asynchronousMachine.ratedU = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? i7Data.ur : assetType === null || assetType === void 0 ? void 0 : assetType.ur;
|
|
1621
|
+
asynchronousMachine.converterFedDrive = false;
|
|
1622
|
+
asynchronousMachine.efficiency = wirkungsgrad * 100;
|
|
1623
|
+
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);
|
|
1624
|
+
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);
|
|
1625
|
+
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));
|
|
1626
|
+
asynchronousMachine.reversible = false;
|
|
1627
|
+
//SSH profile content
|
|
1613
1628
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
1614
1629
|
const p = powerData[0];
|
|
1615
1630
|
const q = powerData[1];
|
|
1616
1631
|
asynchronousMachine.setActivePower(p);
|
|
1617
1632
|
asynchronousMachine.setReactivePower(q);
|
|
1633
|
+
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind_1.AsynchronousMachineKind.motor;
|
|
1634
|
+
asynchronousMachine.controlEnabled = false;
|
|
1635
|
+
//AMPI7 profile content
|
|
1618
1636
|
asynchronousMachine.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1619
1637
|
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;
|
|
1638
|
+
//EQ core profile content
|
|
1623
1639
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1624
1640
|
if (connectivityNode) {
|
|
1625
1641
|
(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
1642
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()));
|
|
1628
1643
|
if (equipmentContainer) {
|
|
1629
1644
|
equipmentContainer.addEquipment(asynchronousMachine);
|
|
1630
1645
|
asynchronousMachine.equipmentContainer = equipmentContainer;
|
|
1631
|
-
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1632
|
-
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1633
1646
|
}
|
|
1634
1647
|
else {
|
|
1635
1648
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
@@ -1638,6 +1651,8 @@ class ConverterIntegral7 {
|
|
|
1638
1651
|
else {
|
|
1639
1652
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1640
1653
|
}
|
|
1654
|
+
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1655
|
+
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1641
1656
|
}
|
|
1642
1657
|
}
|
|
1643
1658
|
else {
|
|
@@ -1645,7 +1660,7 @@ class ConverterIntegral7 {
|
|
|
1645
1660
|
}
|
|
1646
1661
|
});
|
|
1647
1662
|
}
|
|
1648
|
-
convertKraftwerksbloecke(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1663
|
+
convertKraftwerksbloecke(cimModel, targetVoltages, knotenSfIDs, energyTypesConfig) {
|
|
1649
1664
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1650
1665
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
1651
1666
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KWBLOCK)) {
|
|
@@ -1702,38 +1717,29 @@ class ConverterIntegral7 {
|
|
|
1702
1717
|
// synchronousMachine.x0 = i7Data.x0k;
|
|
1703
1718
|
// synchronousMachine.x2 = 0;
|
|
1704
1719
|
// 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
1720
|
// GeneratingUnit
|
|
1719
1721
|
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1720
1722
|
/** Wenn ein Config für den Primärenergietyp vorhanden*/
|
|
1721
1723
|
let generatingUnit;
|
|
1724
|
+
const generatingUnitKey = synchronousMachine.getUUID();
|
|
1722
1725
|
if (generatingUnitConfig) {
|
|
1723
1726
|
switch (generatingUnitConfig.class) {
|
|
1724
1727
|
case 'ThermalGeneratingUnit': {
|
|
1725
|
-
|
|
1728
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ThermalGeneratingUnit, this.configUuid, generatingUnitKey);
|
|
1729
|
+
generatingUnit = new ThermalGeneratingUnit_1.ThermalGeneratingUnit(uuid, 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1726
1730
|
if (generatingUnitConfig.fuelType) {
|
|
1727
1731
|
(0, utils_2.generateFuelType)(i7Data.nameprimaertyp, generatingUnitConfig.fuelType, generatingUnit, cimModel);
|
|
1728
1732
|
}
|
|
1729
1733
|
break;
|
|
1730
1734
|
}
|
|
1731
1735
|
case 'SolarGeneratingUnit': {
|
|
1732
|
-
|
|
1736
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.SolarGeneratingUnit, this.configUuid, generatingUnitKey);
|
|
1737
|
+
generatingUnit = new SolarGeneratingUnit_1.SolarGeneratingUnit(uuid, 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1733
1738
|
break;
|
|
1734
1739
|
}
|
|
1735
1740
|
case 'WindGeneratingUnit': {
|
|
1736
|
-
|
|
1741
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.WindGeneratingUnit, this.configUuid, generatingUnitKey);
|
|
1742
|
+
generatingUnit = new WindGeneratingUnit_1.WindGeneratingUnit(uuid, 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1737
1743
|
switch (generatingUnitConfig.fuelType) {
|
|
1738
1744
|
case 'onshore': {
|
|
1739
1745
|
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.onshore;
|
|
@@ -1751,13 +1757,15 @@ class ConverterIntegral7 {
|
|
|
1751
1757
|
break;
|
|
1752
1758
|
}
|
|
1753
1759
|
case 'NuclearGeneratingUnit': {
|
|
1754
|
-
|
|
1760
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.NuclearGeneratingUnit, this.configUuid, generatingUnitKey);
|
|
1761
|
+
generatingUnit = new NuclearGeneratingUnit_1.NuclearGeneratingUnit(uuid, 'Generator_' + i7Data.bezeichner, i7Data.kurzname);
|
|
1755
1762
|
break;
|
|
1756
1763
|
}
|
|
1757
1764
|
}
|
|
1758
1765
|
}
|
|
1759
1766
|
if (!generatingUnit) {
|
|
1760
|
-
|
|
1767
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.GeneratingUnit, this.configUuid, generatingUnitKey);
|
|
1768
|
+
generatingUnit = new GeneratingUnit_1.GeneratingUnit(uuid, 'KWBlock' + i7Data.bezeichner, i7Data.kurzname);
|
|
1761
1769
|
}
|
|
1762
1770
|
generatingUnit.genControlSource = GeneratorControlSource_1.GeneratorControlSource.unavailable;
|
|
1763
1771
|
generatingUnit.initialP = (0, parser_utils_1.isNumericI7)(i7Data.p0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p0) : undefined;
|
|
@@ -1785,8 +1793,18 @@ class ConverterIntegral7 {
|
|
|
1785
1793
|
// generatingUnit.totalEfficiency
|
|
1786
1794
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1787
1795
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1788
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data,
|
|
1789
|
-
|
|
1796
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, targetVoltages, generatingUnit);
|
|
1797
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1798
|
+
// TODO Welche Modi sind möglich?
|
|
1799
|
+
case 1: {
|
|
1800
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
default: {
|
|
1804
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.timeScheduled;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1790
1808
|
cimModel.addGeneratingUnit(generatingUnit);
|
|
1791
1809
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1792
1810
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.KWBLOCK);
|
|
@@ -1794,7 +1812,7 @@ class ConverterIntegral7 {
|
|
|
1794
1812
|
}
|
|
1795
1813
|
});
|
|
1796
1814
|
}
|
|
1797
|
-
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result) {
|
|
1815
|
+
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
1798
1816
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1799
1817
|
for (const i7Data of result) {
|
|
1800
1818
|
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 +1840,14 @@ class ConverterIntegral7 {
|
|
|
1822
1840
|
externalNetworkInjection.minZ0ToZ1Ratio
|
|
1823
1841
|
externalNetworkInjection.p
|
|
1824
1842
|
externalNetworkInjection.q*/
|
|
1825
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data);
|
|
1843
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
1826
1844
|
// ToDo PSRType
|
|
1827
1845
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1828
1846
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1829
1847
|
}
|
|
1830
1848
|
});
|
|
1831
1849
|
}
|
|
1832
|
-
convertErsatzQuerZweige2EquivalentInjection(cimModel, result) {
|
|
1850
|
+
convertErsatzQuerZweige2EquivalentInjection(cimModel, targetVoltages, result) {
|
|
1833
1851
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1834
1852
|
for (const i7Data of result) {
|
|
1835
1853
|
const einspeisePrio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : 1;
|
|
@@ -1842,11 +1860,14 @@ class ConverterIntegral7 {
|
|
|
1842
1860
|
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
1861
|
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
1862
|
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.
|
|
1863
|
+
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r0) : undefined;
|
|
1846
1864
|
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.
|
|
1865
|
+
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : undefined;
|
|
1866
|
+
const x1 = (0, parser_utils_1.isNumericI7)(i7Data.x1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x1) : undefined;
|
|
1849
1867
|
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);
|
|
1868
|
+
/*if(equivalentInjection.getUUID() === '41b1d0bf-2c36-4e34-aa2a-a283b8c32e7f'){
|
|
1869
|
+
let stop = true;
|
|
1870
|
+
}*/
|
|
1850
1871
|
/** Export Extended Ward equivalent with voltage regulation */
|
|
1851
1872
|
if (flag_lfl && !flag_ks && usoll && (r_ext !== 0 || x_ext !== 0)) {
|
|
1852
1873
|
//is regulating equivalent equipment
|
|
@@ -1862,8 +1883,12 @@ class ConverterIntegral7 {
|
|
|
1862
1883
|
equivalentInjection.x0 = 1e9;
|
|
1863
1884
|
equivalentInjection.x2 = 1e9;
|
|
1864
1885
|
}
|
|
1865
|
-
else if (
|
|
1866
|
-
equivalentInjection.regulationCapability =
|
|
1886
|
+
else if (flag_lfl && usoll && einspeisePrio) {
|
|
1887
|
+
equivalentInjection.regulationCapability = true;
|
|
1888
|
+
equivalentInjection.regulationStatus = true;
|
|
1889
|
+
equivalentInjection.regulationTarget = usoll;
|
|
1890
|
+
equivalentInjection.rExt = r_ext;
|
|
1891
|
+
equivalentInjection.xExt = x_ext;
|
|
1867
1892
|
equivalentInjection.r = r1;
|
|
1868
1893
|
equivalentInjection.r0 = r0;
|
|
1869
1894
|
equivalentInjection.r2 = r1;
|
|
@@ -1871,10 +1896,8 @@ class ConverterIntegral7 {
|
|
|
1871
1896
|
equivalentInjection.x0 = x0;
|
|
1872
1897
|
equivalentInjection.x2 = x1;
|
|
1873
1898
|
}
|
|
1874
|
-
else if (flag_lfl
|
|
1875
|
-
equivalentInjection.regulationCapability =
|
|
1876
|
-
equivalentInjection.regulationStatus = true;
|
|
1877
|
-
equivalentInjection.regulationTarget = usoll;
|
|
1899
|
+
else if (flag_lfl || flag_ks) {
|
|
1900
|
+
equivalentInjection.regulationCapability = false;
|
|
1878
1901
|
equivalentInjection.r = r1;
|
|
1879
1902
|
equivalentInjection.r0 = r0;
|
|
1880
1903
|
equivalentInjection.r2 = r1;
|
|
@@ -1882,7 +1905,8 @@ class ConverterIntegral7 {
|
|
|
1882
1905
|
equivalentInjection.x0 = x0;
|
|
1883
1906
|
equivalentInjection.x2 = x1;
|
|
1884
1907
|
}
|
|
1885
|
-
|
|
1908
|
+
/** Export Extended Ward equivalent with no voltage regulation */
|
|
1909
|
+
else if (((r_ext !== undefined && r_ext !== 0) || (x_ext !== undefined && x_ext !== 0))) {
|
|
1886
1910
|
equivalentInjection.regulationCapability = false;
|
|
1887
1911
|
equivalentInjection.rExt = r_ext;
|
|
1888
1912
|
equivalentInjection.r = 1e9;
|
|
@@ -1908,30 +1932,30 @@ class ConverterIntegral7 {
|
|
|
1908
1932
|
equivalentInjection.einspeisePrio = einspeisePrio;
|
|
1909
1933
|
equivalentInjection.kr = kr;
|
|
1910
1934
|
equivalentInjection.aggregate = true; // default Wert im I7 Export. Not needed for EquivalentInjection, BusbarSection, PowerTransformerEnd, EquivalentShunt, EquivalentBranch
|
|
1911
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1935
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data, targetVoltages);
|
|
1912
1936
|
// ToDo PSRType
|
|
1913
1937
|
cimModel.addEquivalentInjection(equivalentInjection);
|
|
1914
1938
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1915
1939
|
}
|
|
1916
1940
|
});
|
|
1917
1941
|
}
|
|
1918
|
-
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine
|
|
1919
|
-
convertBoundaryInjections(cimModel, knotenSfIDs, targetClass) {
|
|
1942
|
+
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine equivalentInjection, d.h. die Fallunterscheidung kann ausbleiben?...Diskussion mit Andreas
|
|
1943
|
+
convertBoundaryInjections(cimModel, targetVoltages, knotenSfIDs, targetClass) {
|
|
1920
1944
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1921
1945
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.BOUNDARYINJECTION)) {
|
|
1922
1946
|
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
1947
|
switch (targetClass) {
|
|
1924
1948
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1925
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1949
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1926
1950
|
break;
|
|
1927
1951
|
}
|
|
1928
1952
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1929
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1953
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result);
|
|
1930
1954
|
break;
|
|
1931
1955
|
}
|
|
1932
1956
|
default: {
|
|
1933
1957
|
//BoundaryInjections are always exported to EquivalentInjection objects for Boundary profile
|
|
1934
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1958
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result);
|
|
1935
1959
|
}
|
|
1936
1960
|
}
|
|
1937
1961
|
}
|
|
@@ -1940,7 +1964,7 @@ class ConverterIntegral7 {
|
|
|
1940
1964
|
}
|
|
1941
1965
|
});
|
|
1942
1966
|
}
|
|
1943
|
-
convertBoundaryInjections2EquivalentInjection(cimModel, result) {
|
|
1967
|
+
convertBoundaryInjections2EquivalentInjection(cimModel, targetVoltages, result) {
|
|
1944
1968
|
for (const i7Data of result) {
|
|
1945
1969
|
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
1970
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -1967,7 +1991,7 @@ class ConverterIntegral7 {
|
|
|
1967
1991
|
/** Spannung in kilo*/
|
|
1968
1992
|
// regulatingControl.targetValueUnitMultiplier = UnitMultiplier.k;
|
|
1969
1993
|
// equivalentInjection.regulatingControl = regulatingControl;
|
|
1970
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1994
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data, targetVoltages);
|
|
1971
1995
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1972
1996
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
1973
1997
|
// ToDo PSRType
|
|
@@ -1992,7 +2016,7 @@ class ConverterIntegral7 {
|
|
|
1992
2016
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
1993
2017
|
}
|
|
1994
2018
|
}
|
|
1995
|
-
convertBoundaryInjections2ExternalNetworkInjection(cimModel, result) {
|
|
2019
|
+
convertBoundaryInjections2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
1996
2020
|
for (const i7Data of result) {
|
|
1997
2021
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, utils_2.getName)(i7Data), i7Data.kurzname);
|
|
1998
2022
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -2008,18 +2032,7 @@ class ConverterIntegral7 {
|
|
|
2008
2032
|
/** externalNetworkInjection.maxR0ToX0Ratio = 1/(/x0/r0)
|
|
2009
2033
|
externalNetworkInjection.maxR1ToX1Ratio = (1/x1/r1) */
|
|
2010
2034
|
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);
|
|
2035
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2023
2036
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
2024
2037
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
2025
2038
|
// ToDo PSRType
|
|
@@ -2040,7 +2053,6 @@ class ConverterIntegral7 {
|
|
|
2040
2053
|
}*/
|
|
2041
2054
|
// ToDo PSRType
|
|
2042
2055
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2043
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
2044
2056
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
2045
2057
|
}
|
|
2046
2058
|
}
|
|
@@ -2052,6 +2064,7 @@ class ConverterIntegral7 {
|
|
|
2052
2064
|
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
2065
|
//const result2: LeitungErsatzLaengszweig[] = await this.mysqlController.execQuery(getI7Query(I7Objects.ERSATZLAENGSZWEIGDIFF, integral7.ersatzZweigAnschlussKnotenIDs));
|
|
2054
2066
|
for (const i7Data of result) {
|
|
2067
|
+
integral7.integalErsatzLaengszweigIds.add(i7Data.id);
|
|
2055
2068
|
// Topologie
|
|
2056
2069
|
/* Anfang
|
|
2057
2070
|
* 3 moegliche Anschluesse
|
|
@@ -2078,10 +2091,13 @@ class ConverterIntegral7 {
|
|
|
2078
2091
|
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2079
2092
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2080
2093
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2094
|
+
if (equivalentBranch.getUUID() === '67528dfe-be93-4c44-81db-5708ecd9377e') {
|
|
2095
|
+
let stop = true;
|
|
2096
|
+
}
|
|
2081
2097
|
/**EQ */
|
|
2082
|
-
if (flag_lfl
|
|
2083
|
-
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) :
|
|
2084
|
-
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) :
|
|
2098
|
+
if (flag_lfl && !flag_ks) {
|
|
2099
|
+
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 10e9;
|
|
2100
|
+
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 10e9;
|
|
2085
2101
|
equivalentBranch.r21 = (0, parser_utils_1.isNumericI7)(i7Data.r21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r21_lfl) : equivalentBranch.r;
|
|
2086
2102
|
equivalentBranch.x21 = (0, parser_utils_1.isNumericI7)(i7Data.x21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x21_lfl) : equivalentBranch.x;
|
|
2087
2103
|
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
@@ -2099,6 +2115,8 @@ class ConverterIntegral7 {
|
|
|
2099
2115
|
}
|
|
2100
2116
|
else if (!flag_lfl && flag_ks) {
|
|
2101
2117
|
/**EQ-SC */
|
|
2118
|
+
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 10e9;
|
|
2119
|
+
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 10e9;
|
|
2102
2120
|
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
2103
2121
|
equivalentBranch.positiveR21 = equivalentBranch.positiveR12;
|
|
2104
2122
|
equivalentBranch.positiveX12 = (0, parser_utils_1.isNumericI7)(i7Data.x12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_ks) : 10e9;
|
|
@@ -2112,9 +2130,9 @@ class ConverterIntegral7 {
|
|
|
2112
2130
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2113
2131
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2114
2132
|
}
|
|
2115
|
-
else { //If neither flag_lfl nor flag_ks are specified, any impedance value that is specified will be exported.
|
|
2116
|
-
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) :
|
|
2117
|
-
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) :
|
|
2133
|
+
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.
|
|
2134
|
+
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 10e9;
|
|
2135
|
+
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 10e9;
|
|
2118
2136
|
equivalentBranch.r21 = (0, parser_utils_1.isNumericI7)(i7Data.r21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r21_lfl) : equivalentBranch.r;
|
|
2119
2137
|
equivalentBranch.x21 = (0, parser_utils_1.isNumericI7)(i7Data.x21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x21_lfl) : equivalentBranch.x;
|
|
2120
2138
|
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
@@ -2129,7 +2147,9 @@ class ConverterIntegral7 {
|
|
|
2129
2147
|
equivalentBranch.zeroR21 = equivalentBranch.zeroR12;
|
|
2130
2148
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2131
2149
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2132
|
-
|
|
2150
|
+
if (!flag_lfl && !flag_ks) {
|
|
2151
|
+
this.logger.warn(`Ersatzlängszweig mit GUID ${equivalentBranch.getUUID()} sind die Flags flag_lfl sowie flag_ks nicht definiert.`);
|
|
2152
|
+
}
|
|
2133
2153
|
}
|
|
2134
2154
|
const bdf = [];
|
|
2135
2155
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten)));
|
|
@@ -2159,7 +2179,6 @@ class ConverterIntegral7 {
|
|
|
2159
2179
|
}
|
|
2160
2180
|
/** Kompensationsdrossel*/
|
|
2161
2181
|
convertKompensationsdrossel(cimModel, targetVoltages, knotenSfIDs) {
|
|
2162
|
-
var _a, _b;
|
|
2163
2182
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2164
2183
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL)) {
|
|
2165
2184
|
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 +2235,13 @@ class ConverterIntegral7 {
|
|
|
2216
2235
|
}
|
|
2217
2236
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr * -1, shunt.nomU, shunt.maximumSections);
|
|
2218
2237
|
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
2238
|
//SHC section
|
|
2267
2239
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2268
2240
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2269
2241
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0)) * -1;
|
|
2270
2242
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2271
2243
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2272
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data,
|
|
2244
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2273
2245
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2274
2246
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL);
|
|
2275
2247
|
}
|
|
@@ -2281,7 +2253,6 @@ class ConverterIntegral7 {
|
|
|
2281
2253
|
}
|
|
2282
2254
|
/** Kompensationskondensator*/
|
|
2283
2255
|
convertKompensationskondensatoren(cimModel, targetVoltages, knotenSfIDs) {
|
|
2284
|
-
var _a, _b;
|
|
2285
2256
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2286
2257
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR)) {
|
|
2287
2258
|
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 +2309,13 @@ class ConverterIntegral7 {
|
|
|
2338
2309
|
}
|
|
2339
2310
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr, shunt.nomU, shunt.maximumSections);
|
|
2340
2311
|
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
2312
|
//SHC section
|
|
2389
2313
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2390
2314
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2391
2315
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0));
|
|
2392
2316
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2393
2317
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2394
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data,
|
|
2318
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2395
2319
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2396
2320
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR);
|
|
2397
2321
|
}
|
|
@@ -2401,13 +2325,12 @@ class ConverterIntegral7 {
|
|
|
2401
2325
|
}
|
|
2402
2326
|
});
|
|
2403
2327
|
}
|
|
2404
|
-
convertStatcom(cimModel, knotenSfIDs) {
|
|
2328
|
+
convertStatcom(cimModel, targetVoltages, knotenSfIDs) {
|
|
2405
2329
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2406
2330
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STATCOM)) {
|
|
2407
2331
|
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
2332
|
for (const i7Data of result) {
|
|
2409
2333
|
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
2334
|
const ur = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined;
|
|
2412
2335
|
const uref = (0, parser_utils_1.isNumericI7)(i7Data.uref) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uref) : undefined;
|
|
2413
2336
|
const mrez = (0, parser_utils_1.isNumericI7)(i7Data.mrez) ? (0, parser_utils_1.convertToNumberI7)(i7Data.mrez) : undefined;
|
|
@@ -2425,34 +2348,12 @@ class ConverterIntegral7 {
|
|
|
2425
2348
|
/** SV */
|
|
2426
2349
|
//statVarCom.svpowerflow
|
|
2427
2350
|
/** 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
|
-
}
|
|
2351
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_rc);
|
|
2352
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, targetVoltages, undefined, true);
|
|
2454
2353
|
/** EQ */
|
|
2455
|
-
|
|
2354
|
+
if (regulatingControl) {
|
|
2355
|
+
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2356
|
+
}
|
|
2456
2357
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
2457
2358
|
this.addIdMapping(i7Data.id, statVarCom.mrid, integral_sql_1.Integral7TableNames.STATCOM);
|
|
2458
2359
|
}
|
|
@@ -2462,7 +2363,7 @@ class ConverterIntegral7 {
|
|
|
2462
2363
|
}
|
|
2463
2364
|
});
|
|
2464
2365
|
}
|
|
2465
|
-
convertSVC(cimModel, knotenSfIDs) {
|
|
2366
|
+
convertSVC(cimModel, targetVoltages, knotenSfIDs) {
|
|
2466
2367
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2467
2368
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SVC)) {
|
|
2468
2369
|
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 +2386,7 @@ class ConverterIntegral7 {
|
|
|
2485
2386
|
statVarCom.q = (0, parser_utils_1.isNumericI7)(i7Data.q0svc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q0svc) : undefined;
|
|
2486
2387
|
/** SV */
|
|
2487
2388
|
//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
|
-
}
|
|
2389
|
+
const regulatingControl = this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, targetVoltages, undefined, false);
|
|
2515
2390
|
/** EQ */
|
|
2516
2391
|
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2517
2392
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
@@ -2529,10 +2404,9 @@ class ConverterIntegral7 {
|
|
|
2529
2404
|
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
2405
|
for (const i7Data of result) {
|
|
2531
2406
|
/** 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;
|
|
2407
|
+
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
2408
|
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.
|
|
2409
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.krdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.krdc) : undefined;
|
|
2536
2410
|
// Topologie
|
|
2537
2411
|
/* Anfang
|
|
2538
2412
|
* 3 moegliche Anschluesse
|
|
@@ -2558,54 +2432,46 @@ class ConverterIntegral7 {
|
|
|
2558
2432
|
else {
|
|
2559
2433
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
2560
2434
|
}
|
|
2561
|
-
const csConverter = new CsConverter_1.CsConverter((0, parser_utils_1.getUUID)(i7Data.guid
|
|
2435
|
+
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);
|
|
2436
|
+
const pr = (0, parser_utils_1.isNumericI7)(i7Data.pr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pr) : undefined;
|
|
2437
|
+
const pges = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pges) : undefined;
|
|
2562
2438
|
/** Wenn Leitungen konvertiert werden, wird das Attribut operationMode gesetzt. */
|
|
2563
2439
|
csConverter.equipmentContainer = dcConverterUnit;
|
|
2564
2440
|
/** Bemessungsleistung (Gleichstromseite) in MW
|
|
2565
2441
|
* im CS-Fall S = P?
|
|
2566
2442
|
* Abhängig vom */
|
|
2567
|
-
csConverter.baseS =
|
|
2443
|
+
csConverter.baseS = pr;
|
|
2568
2444
|
/** Bemessungsspannung (Gleichstromseite) in kV*/
|
|
2569
|
-
csConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2445
|
+
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);
|
|
2446
|
+
csConverter.ratedIdc = (0, utils_2.calculateRatedIdc)(csConverter.ratedUdc, pr);
|
|
2570
2447
|
/** spannungsabhängige Wirk-Verluste in kW bei Leerlauf mit Bemessungsspannung in kV*/
|
|
2571
2448
|
csConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) * Math.pow(10, -3) : undefined;
|
|
2572
2449
|
csConverter.maxUdc = csConverter.ratedUdc * 1.05; // +5% * ratedUdc
|
|
2573
2450
|
csConverter.minUdc = csConverter.ratedUdc * 0.95; // -5% * ratedUdc
|
|
2574
|
-
csConverter.resistiveLoss = 0;
|
|
2451
|
+
csConverter.resistiveLoss = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) * Math.pow(10, -3) : undefined;
|
|
2575
2452
|
csConverter.switchingLoss = 0;
|
|
2576
2453
|
/* csConverter.numberOfValves
|
|
2577
2454
|
csConverter.valveU0*/
|
|
2578
2455
|
/** Stromrichter */
|
|
2579
2456
|
/** Zündwinkel bei Gleichrichterbetrieb (ins Drehstromnetz eingespeiste Wirkleistung < 0) - etwa 15 Grad */
|
|
2580
|
-
|
|
2581
|
-
|
|
2457
|
+
csConverter.maxAlpha = 180;
|
|
2458
|
+
csConverter.minAlpha = (0, parser_utils_1.isNumericI7)(i7Data.alpha) ? (0, parser_utils_1.convertToNumberI7)(i7Data.alpha) : 15;
|
|
2582
2459
|
/** Löschwinkel bei Wechselrichterbetrieb (ins Drehstromnetz Wirkleistung > 0) - etwa 21,5 Grad */
|
|
2583
|
-
|
|
2584
|
-
|
|
2460
|
+
csConverter.maxGamma = undefined;
|
|
2461
|
+
csConverter.minGamma = (0, parser_utils_1.isNumericI7)(i7Data.gamma) ? (0, parser_utils_1.convertToNumberI7)(i7Data.gamma) : 21.5;
|
|
2585
2462
|
/** SSH profile export*/
|
|
2586
|
-
csConverter.p =
|
|
2463
|
+
csConverter.p = pges ? pges * -1 : 0;
|
|
2587
2464
|
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
|
-
}
|
|
2465
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, csConverter, i7Data);
|
|
2599
2466
|
/** Status */
|
|
2600
2467
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2601
2468
|
csConverter.normallyInService = inBetrieb;
|
|
2602
2469
|
/** Topologie AC Seite*/
|
|
2603
|
-
if (acConnectivityNode) {
|
|
2604
|
-
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
}
|
|
2470
|
+
/**if (acConnectivityNode) {
|
|
2471
|
+
csConverter.pccTerminal = this.reateConnection(cimModel, csConverter, acConnectivityNode, PhaseCode.ABC, true);
|
|
2472
|
+
} else {
|
|
2473
|
+
this.logger.debug(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
2474
|
+
}**/
|
|
2609
2475
|
/** Topologie DC Seite*/
|
|
2610
2476
|
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
2477
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2631,17 +2497,27 @@ class ConverterIntegral7 {
|
|
|
2631
2497
|
}
|
|
2632
2498
|
});
|
|
2633
2499
|
}
|
|
2634
|
-
convertVsConverterDC(cimModel, integral7, knotenSfIDs) {
|
|
2635
|
-
var _a, _b;
|
|
2500
|
+
convertVsConverterDC(cimModel, targetVoltages, integral7, knotenSfIDs) {
|
|
2636
2501
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2637
2502
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
2638
2503
|
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
2504
|
for (const i7Data of result) {
|
|
2640
2505
|
/** Containment DC DCConverterUnit */
|
|
2641
|
-
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp
|
|
2642
|
-
|
|
2506
|
+
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']));
|
|
2507
|
+
/** target voltage local*/
|
|
2508
|
+
const localTargetVoltage = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
2509
|
+
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
2643
2510
|
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.
|
|
2511
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.krdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.krdc) : undefined;
|
|
2512
|
+
if (dcConverterUnit.governorSCDAc !== undefined) {
|
|
2513
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDAc.`);
|
|
2514
|
+
}
|
|
2515
|
+
if (dcConverterUnit.governorSCDDc !== undefined) {
|
|
2516
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDDc.`);
|
|
2517
|
+
}
|
|
2518
|
+
if (dcConverterUnit.referencePriority !== undefined) {
|
|
2519
|
+
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no referencePriority.`);
|
|
2520
|
+
}
|
|
2645
2521
|
// Topologie
|
|
2646
2522
|
/** Anfang
|
|
2647
2523
|
* 3 moegliche Anschluesse
|
|
@@ -2676,44 +2552,23 @@ class ConverterIntegral7 {
|
|
|
2676
2552
|
//If udc is set in Integral data model set converter.ratedUdc as i7Data.udc else take the data value for i7Data.ur (Bemessungsspannung)
|
|
2677
2553
|
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
2554
|
/** 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;
|
|
2555
|
+
vsConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) * Math.pow(10, -3) : undefined;
|
|
2556
|
+
vsConverter.maxUdc = vsConverter.ratedUdc * 1.08; // +5% * ratedUdc
|
|
2557
|
+
vsConverter.minUdc = vsConverter.ratedUdc * 0.98; // -5% * ratedUdc
|
|
2558
|
+
vsConverter.resistiveLoss = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) * Math.pow(10, -3) : undefined;
|
|
2683
2559
|
vsConverter.switchingLoss = undefined;
|
|
2684
2560
|
/* csConverter.maxModulationIndex = ;
|
|
2685
2561
|
csConverter.maxValveCurrent = */
|
|
2686
2562
|
/** SSH export values */
|
|
2687
2563
|
vsConverter.p = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? i7Data.pges * -1 : 0;
|
|
2688
2564
|
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
|
-
}
|
|
2565
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, vsConverter, i7Data, targetVoltages);
|
|
2704
2566
|
vsConverter.droop = 0; //pu
|
|
2705
2567
|
vsConverter.droopCompensation = 0; //Resistance
|
|
2706
2568
|
vsConverter.qShare = 0; //PerCent
|
|
2707
2569
|
/** Status */
|
|
2708
2570
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2709
2571
|
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
2572
|
/** Topologie DC Seite mit DCGround*/
|
|
2718
2573
|
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
2574
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2724,32 +2579,11 @@ class ConverterIntegral7 {
|
|
|
2724
2579
|
vsConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
2725
2580
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
2726
2581
|
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
2582
|
/** DCNode speichern, um später DCLines anschließen zu können*/
|
|
2745
2583
|
cimModel.addDCConverterUnit(dcConverterUnit);
|
|
2746
2584
|
cimModel.addVSConverter(vsConverter);
|
|
2747
2585
|
cimModel.addDCNode(dcNode);
|
|
2748
|
-
cimModel.addDCNode(dcNodeG);
|
|
2749
2586
|
cimModel.addACDCConverterDCTerminal(acDCConverterDCTerminal);
|
|
2750
|
-
cimModel.addDCTerminal(dcTerminalG);
|
|
2751
|
-
cimModel.addDCGround(dcGround);
|
|
2752
|
-
cimModel.addACDCConverterDCTerminal(dcTerminalM1);
|
|
2753
2587
|
integral7.integralHgueKopf.set(i7Data.id, i7Data);
|
|
2754
2588
|
this.checkAnschlussIDs(i7Data.id, integral7);
|
|
2755
2589
|
this.addIdMapping(i7Data.id, vsConverter.mrid, integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC);
|
|
@@ -2757,7 +2591,7 @@ class ConverterIntegral7 {
|
|
|
2757
2591
|
}
|
|
2758
2592
|
});
|
|
2759
2593
|
}
|
|
2760
|
-
convertEinspeisungen2EnergySource(cimModel, result, energySourceTypeMappingConfig) {
|
|
2594
|
+
convertEinspeisungen2EnergySource(cimModel, targetVoltages, result, energySourceTypeMappingConfig) {
|
|
2761
2595
|
var _a, _b, _c, _d;
|
|
2762
2596
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2763
2597
|
for (const i7Data of result) {
|
|
@@ -2786,7 +2620,7 @@ class ConverterIntegral7 {
|
|
|
2786
2620
|
typeName = (0, utils_1.getTypeNameFromStringByRegEx)(mf.name, energySourceTypeMappingConfig);
|
|
2787
2621
|
}
|
|
2788
2622
|
if (typeName) {
|
|
2789
|
-
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, typeName);
|
|
2623
|
+
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, typeName, this.configUuid);
|
|
2790
2624
|
energySource.psrTypeUUID = psrType.mrid;
|
|
2791
2625
|
}
|
|
2792
2626
|
if (typeName === 'Wasserkraft') {
|
|
@@ -2802,37 +2636,15 @@ class ConverterIntegral7 {
|
|
|
2802
2636
|
}
|
|
2803
2637
|
});
|
|
2804
2638
|
}
|
|
2805
|
-
convertEnergySourceToExternalNetworkInjection(cimModel, i7Data, prio, inBetrieb) {
|
|
2639
|
+
convertEnergySourceToExternalNetworkInjection(cimModel, targetVoltages, i7Data, prio, inBetrieb) {
|
|
2806
2640
|
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2807
2641
|
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
2642
|
externalNetworkInjection.referencePriority = prio;
|
|
2809
2643
|
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
2644
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
2833
2645
|
externalNetworkInjection.p = powerData[0];
|
|
2834
2646
|
externalNetworkInjection.q = powerData[1];
|
|
2835
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data,
|
|
2647
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2836
2648
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2837
2649
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2838
2650
|
}
|
|
@@ -2858,20 +2670,19 @@ class ConverterIntegral7 {
|
|
|
2858
2670
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.EINSPEISUNG);
|
|
2859
2671
|
}
|
|
2860
2672
|
catch (err) {
|
|
2861
|
-
this.logger.error(`
|
|
2673
|
+
this.logger.error(`error --- convertEinspeisungen2EquivalentInjection ${i7Data.id} ${err}`);
|
|
2862
2674
|
}
|
|
2863
2675
|
}
|
|
2864
2676
|
});
|
|
2865
2677
|
}
|
|
2866
|
-
convertEinspeisungen2ExternalNetworkInjection(cimModel, result) {
|
|
2678
|
+
convertEinspeisungen2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
2679
|
+
var _a;
|
|
2867
2680
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2868
2681
|
for (const i7Data of result) {
|
|
2869
2682
|
try {
|
|
2870
|
-
const
|
|
2871
|
-
const
|
|
2872
|
-
|
|
2873
|
-
// const un = cn.getVoltageLevel().getBaseVoltageAsNumber();
|
|
2874
|
-
externalNetworkInjection.nameprimaertyp = i7Data.nameprimaertyp;
|
|
2683
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2684
|
+
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);
|
|
2685
|
+
externalNetworkInjection.nameprimaertyp = i7Data.nameprimaertyp !== undefined ? i7Data.nameprimaertyp : undefined;
|
|
2875
2686
|
let mf = undefined;
|
|
2876
2687
|
mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
2877
2688
|
if (mf) {
|
|
@@ -2890,15 +2701,8 @@ class ConverterIntegral7 {
|
|
|
2890
2701
|
externalNetworkInjection.minP = minP;
|
|
2891
2702
|
const minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
2892
2703
|
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
|
|
2704
|
+
/** Convert EQ-profile dataset. */
|
|
2705
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, targetVoltages);
|
|
2902
2706
|
/**Convert short circuit constants */
|
|
2903
2707
|
const r0X0 = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0) : undefined;
|
|
2904
2708
|
const r1X1 = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1) : undefined;
|
|
@@ -2907,7 +2711,7 @@ class ConverterIntegral7 {
|
|
|
2907
2711
|
externalNetworkInjection.maxR0ToX0Ratio = maxR0X0Ratio;
|
|
2908
2712
|
const maxR1X1Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1_max) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1_max) : r1X1;
|
|
2909
2713
|
externalNetworkInjection.maxR1ToX1Ratio = maxR1X1Ratio;
|
|
2910
|
-
const maxZ0Z1Ratio =
|
|
2714
|
+
const maxZ0Z1Ratio = z0Z1;
|
|
2911
2715
|
externalNetworkInjection.maxZ0ToZ1Ratio = maxZ0Z1Ratio;
|
|
2912
2716
|
const minR0X0Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0_min) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0_min) : r0X0;
|
|
2913
2717
|
externalNetworkInjection.minR0ToX0Ratio = minR0X0Ratio;
|
|
@@ -2922,41 +2726,22 @@ class ConverterIntegral7 {
|
|
|
2922
2726
|
externalNetworkInjection.minInitialSymShCCurrent = minIkSecond;
|
|
2923
2727
|
const maxIkSecond = (0, parser_utils_1.isNumericI7)(i7Data.sk_max) ? (0, parser_utils_1.convertToNumberI7)(skMax) / Math.sqrt(3) * skMax : undefined;
|
|
2924
2728
|
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
|
|
2729
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : false;
|
|
2949
2730
|
/** Convert SSH-profile dataset. */
|
|
2950
2731
|
/**
|
|
2951
|
-
* @description Set einspprio as referencePriority. PowerFactory sets external network injections with referencePriority to
|
|
2732
|
+
* @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
2733
|
* einspprio having no effect in loadflow calculation if voltage control does not exists.
|
|
2953
2734
|
* */
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2735
|
+
let prio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
2736
|
+
if (((_a = externalNetworkInjection.regulatingControl) === null || _a === void 0 ? void 0 : _a.mode) === RegulatingControlModeKind_1.RegulatingControlModeKind.voltage) {
|
|
2737
|
+
if (prio !== undefined && prio > 0) {
|
|
2738
|
+
externalNetworkInjection.referencePriority = prio + 1; //TODO: SLACK is a injection with maximum prio in the network section and active voltage control.
|
|
2739
|
+
}
|
|
2740
|
+
else if (prio !== undefined && prio === 0) {
|
|
2741
|
+
externalNetworkInjection.referencePriority = prio;
|
|
2957
2742
|
}
|
|
2958
2743
|
else {
|
|
2959
|
-
|
|
2744
|
+
externalNetworkInjection.referencePriority = undefined;
|
|
2960
2745
|
}
|
|
2961
2746
|
}
|
|
2962
2747
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
@@ -2964,43 +2749,351 @@ class ConverterIntegral7 {
|
|
|
2964
2749
|
const q = powerData[1];
|
|
2965
2750
|
externalNetworkInjection.setActivePower(p * -1); //convert to load sign system
|
|
2966
2751
|
externalNetworkInjection.setReactivePower(q * -1); //convert to load sign system
|
|
2967
|
-
|
|
2968
|
-
|
|
2752
|
+
// AMPI7 profile
|
|
2753
|
+
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;
|
|
2754
|
+
externalNetworkInjection.cos_phi = cosPhi;
|
|
2755
|
+
externalNetworkInjection.p_mf = (mf && powerData[2]) ? powerData[2] * -1 : undefined;
|
|
2756
|
+
externalNetworkInjection.q_mf = (mf && powerData[3]) ? powerData[3] * -1 : undefined;
|
|
2757
|
+
externalNetworkInjection.normallyInService = inBetrieb;
|
|
2969
2758
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2970
2759
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2971
2760
|
}
|
|
2972
2761
|
catch (err) {
|
|
2973
|
-
this.logger.error(`
|
|
2762
|
+
this.logger.error(`error --- convertEinspeisungen2ExternalNetworkInjection ${i7Data.id} ${err}`);
|
|
2974
2763
|
}
|
|
2975
2764
|
}
|
|
2976
2765
|
});
|
|
2977
2766
|
}
|
|
2978
|
-
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data,
|
|
2979
|
-
var _a, _b, _c;
|
|
2767
|
+
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data, targetVoltages, generatingUnit, isStatcom) {
|
|
2768
|
+
var _a, _b, _c, _d;
|
|
2980
2769
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2981
2770
|
condEquip.normallyInService = inBetrieb;
|
|
2982
2771
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2983
|
-
let
|
|
2772
|
+
let usoll = undefined;
|
|
2773
|
+
let rControl = undefined;
|
|
2774
|
+
let i7DataEinsp = undefined;
|
|
2775
|
+
let i7DataSVC = undefined;
|
|
2776
|
+
let i7DataKomp = undefined;
|
|
2777
|
+
let i7DataRQ = undefined;
|
|
2778
|
+
let i7DataHgue = undefined;
|
|
2779
|
+
let suffix = undefined;
|
|
2780
|
+
let uband = undefined;
|
|
2781
|
+
let tCn = undefined; //controlled node of this device
|
|
2782
|
+
let spannungsregelungLokal = undefined;
|
|
2783
|
+
let spannungsregelungRemote = undefined;
|
|
2784
|
+
let knotenSpgGeregelt = undefined;
|
|
2785
|
+
let isRegulatingControl = undefined;
|
|
2786
|
+
let hasGeneratingUnit = undefined;
|
|
2787
|
+
if (condEquip instanceof RotatingMachine_1.RotatingMachine || condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection || condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2788
|
+
i7DataEinsp = i7Data;
|
|
2789
|
+
i7DataRQ = i7Data;
|
|
2790
|
+
}
|
|
2791
|
+
if (condEquip instanceof SynchronousMachine_1.SynchronousMachine) {
|
|
2792
|
+
suffix = '_SM';
|
|
2793
|
+
if (generatingUnit !== undefined) {
|
|
2794
|
+
hasGeneratingUnit = true;
|
|
2795
|
+
}
|
|
2796
|
+
else {
|
|
2797
|
+
hasGeneratingUnit = false;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
else if (condEquip instanceof AsynchronousMachine_1.AsynchronousMachine) {
|
|
2801
|
+
suffix = '_ASM';
|
|
2802
|
+
}
|
|
2803
|
+
else if (condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection) {
|
|
2804
|
+
suffix = '_ENI';
|
|
2805
|
+
}
|
|
2806
|
+
else if (condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2807
|
+
suffix = '_EI';
|
|
2808
|
+
}
|
|
2809
|
+
else if (condEquip instanceof StaticVarCompensator_1.StaticVarCompensator) {
|
|
2810
|
+
i7DataSVC = i7Data;
|
|
2811
|
+
i7DataRQ = i7Data;
|
|
2812
|
+
suffix = '_SVC';
|
|
2813
|
+
}
|
|
2814
|
+
else if (condEquip instanceof LinearShuntCompensator_1.LinearShuntCompensator) {
|
|
2815
|
+
i7DataKomp = i7Data;
|
|
2816
|
+
i7DataRQ = i7Data;
|
|
2817
|
+
suffix = '_LSC';
|
|
2818
|
+
}
|
|
2819
|
+
else if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
2820
|
+
i7DataHgue = i7Data;
|
|
2821
|
+
suffix = '_ACDCC';
|
|
2822
|
+
}
|
|
2823
|
+
// RegulatingControl: Test if this is a regulating control.
|
|
2824
|
+
if (i7DataEinsp) {
|
|
2825
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.spannungsgeregelt) : false;
|
|
2826
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.rpv_geregelt) : false;
|
|
2827
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataEinsp.knotenspgreg));
|
|
2828
|
+
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2829
|
+
}
|
|
2830
|
+
else if (i7DataKomp) {
|
|
2831
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataKomp.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.flag_lf) : false;
|
|
2832
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataKomp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.rpv_geregelt) : false;
|
|
2833
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataKomp.knotenspgreg));
|
|
2834
|
+
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2835
|
+
}
|
|
2836
|
+
else if (i7DataHgue) {
|
|
2837
|
+
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataHgue.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.spannungsgeregelt) : false;
|
|
2838
|
+
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataHgue.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.rpv_geregelt) : false;
|
|
2839
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataHgue.knotenspgreg));
|
|
2840
|
+
isRegulatingControl = false;
|
|
2841
|
+
}
|
|
2842
|
+
else if (i7DataSVC) {
|
|
2843
|
+
isRegulatingControl = true;
|
|
2844
|
+
}
|
|
2845
|
+
else {
|
|
2846
|
+
isRegulatingControl = false;
|
|
2847
|
+
}
|
|
2984
2848
|
if (connectivityNode) {
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2987
|
-
if (
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
if (
|
|
2995
|
-
|
|
2996
|
-
if (
|
|
2997
|
-
|
|
2849
|
+
const cpTerminal = this.createConnection(cimModel, condEquip, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
2850
|
+
//create regulating control
|
|
2851
|
+
if (isRegulatingControl && (i7DataEinsp || i7DataKomp)) {
|
|
2852
|
+
let cterminal = undefined; //connection point terminal of this device
|
|
2853
|
+
let tVMax = undefined; //maximum target voltage
|
|
2854
|
+
let tVMin = undefined; //minimum target voltage
|
|
2855
|
+
const regCondEquip = condEquip;
|
|
2856
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2857
|
+
//get rated voltage of controlled node.
|
|
2858
|
+
if (knotenSpgGeregelt && spannungsregelungRemote) {
|
|
2859
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
2860
|
+
if (cterminal === undefined) {
|
|
2861
|
+
let stop = true;
|
|
2862
|
+
}
|
|
2863
|
+
if (cterminal) {
|
|
2864
|
+
tCn = cterminal.getConnectivityNode();
|
|
2865
|
+
if (tCn) {
|
|
2866
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2867
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2868
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2869
|
+
}
|
|
2870
|
+
else {
|
|
2871
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
else {
|
|
2875
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal) {
|
|
2879
|
+
switch (knotenSpgGeregelt) {
|
|
2880
|
+
case undefined: {
|
|
2881
|
+
cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2882
|
+
if (cterminal === undefined) {
|
|
2883
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
2884
|
+
}
|
|
2885
|
+
break;
|
|
2886
|
+
}
|
|
2887
|
+
default: {
|
|
2888
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
if (cterminal) {
|
|
2892
|
+
tCn = cterminal.getConnectivityNode();
|
|
2893
|
+
if (tCn) {
|
|
2894
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2895
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2896
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2897
|
+
}
|
|
2898
|
+
else {
|
|
2899
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2900
|
+
}
|
|
2998
2901
|
}
|
|
2999
2902
|
}
|
|
2903
|
+
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;
|
|
2904
|
+
if (uband === undefined) {
|
|
2905
|
+
if (tCn) {
|
|
2906
|
+
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
//Create and define regulating control for voltage control
|
|
2911
|
+
if (cterminal !== undefined) {
|
|
2912
|
+
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);
|
|
2913
|
+
if (i7DataEinsp) {
|
|
2914
|
+
rControl.discrete = false; //default for ExternalNetworkInjection is false. s. CGMES Doku
|
|
2915
|
+
}
|
|
2916
|
+
else {
|
|
2917
|
+
rControl.discrete = true; //default for LinearShuntCompensator is true because of stepping mode.
|
|
2918
|
+
}
|
|
2919
|
+
rControl.targetDeadband = (0, parser_utils_1.isNumericI7)(uband) ? uband : undefined; //zulässiges Spannungsband
|
|
2920
|
+
/** Spannung in kilo*/
|
|
2921
|
+
rControl.targetValue = usoll;
|
|
2922
|
+
const guidSuffix = (_a = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8);
|
|
2923
|
+
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
2924
|
+
rControl.terminalUUID = cterminal.getUUID();
|
|
2925
|
+
rControl.addRegulatingCondEq(regCondEquip);
|
|
2926
|
+
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
2927
|
+
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
2928
|
+
regCondEquip.regulatingControl = rControl;
|
|
2929
|
+
cimModel.addRegulatingControl(rControl);
|
|
2930
|
+
const term = cimModel.terminals.get(rControl.terminalUUID);
|
|
2931
|
+
if (term) {
|
|
2932
|
+
term.addRegulatingControl(rControl);
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
else {
|
|
2936
|
+
const stop = true;
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
else if (isRegulatingControl && i7DataSVC) {
|
|
2940
|
+
/** Regelung */
|
|
2941
|
+
const regCondEquip = condEquip;
|
|
2942
|
+
const cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2943
|
+
let tVMax = undefined;
|
|
2944
|
+
let tVMin = undefined;
|
|
2945
|
+
if (cterminal) {
|
|
2946
|
+
tCn = cterminal.getConnectivityNode();
|
|
2947
|
+
if (tCn) {
|
|
2948
|
+
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2949
|
+
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2950
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2951
|
+
}
|
|
2952
|
+
else {
|
|
2953
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
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;
|
|
2957
|
+
if (uband === undefined) {
|
|
2958
|
+
if (tCn) {
|
|
2959
|
+
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
if (cterminal !== undefined) {
|
|
2963
|
+
const uuid = (0, parser_utils_1.getUUID)(i7DataSVC.guid_rc);
|
|
2964
|
+
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);
|
|
2965
|
+
rControl.enabled = true;
|
|
2966
|
+
if (isStatcom) {
|
|
2967
|
+
rControl.discrete = true;
|
|
2968
|
+
}
|
|
2969
|
+
else {
|
|
2970
|
+
rControl.discrete = false;
|
|
2971
|
+
}
|
|
2972
|
+
condEquip.controlEnabled = true;
|
|
2973
|
+
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7DataSVC.flag_os);
|
|
2974
|
+
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2975
|
+
if (flagOS && i7DataSVC.trafo) {
|
|
2976
|
+
const trafoUUID = this.integralID2UUID.get(i7DataSVC.trafo);
|
|
2977
|
+
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2978
|
+
if (powerTransformer) {
|
|
2979
|
+
try {
|
|
2980
|
+
for (const end of powerTransformer.powerTransformerEnd) {
|
|
2981
|
+
if (end.phaseTapChanger) {
|
|
2982
|
+
end.phaseTapChanger.controlEnabled = false;
|
|
2983
|
+
}
|
|
2984
|
+
if (end.ratioTapChanger) {
|
|
2985
|
+
end.ratioTapChanger.controlEnabled = false;
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
catch (e) {
|
|
2990
|
+
this.logger.debug(`debug --- ${i7DataSVC.constructor.name} Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
rControl.targetValue = usoll;
|
|
2995
|
+
rControl.targetDeadband = uband;
|
|
2996
|
+
rControl.terminal = cterminal;
|
|
2997
|
+
const guidSuffix = (_b = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _b === void 0 ? void 0 : _b.getUUID().substring(0, 8);
|
|
2998
|
+
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
2999
|
+
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
3000
|
+
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
3001
|
+
regCondEquip.regulatingControl = rControl;
|
|
3002
|
+
cterminal.addRegulatingControl(rControl);
|
|
3003
|
+
cimModel.addRegulatingControl(rControl);
|
|
3004
|
+
}
|
|
3005
|
+
else {
|
|
3006
|
+
const stop = true;
|
|
3000
3007
|
}
|
|
3001
3008
|
}
|
|
3002
|
-
|
|
3009
|
+
else if (i7DataHgue) {
|
|
3010
|
+
let cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
3011
|
+
const regelungU = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.u_geregelt);
|
|
3012
|
+
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.p_geregelt);
|
|
3013
|
+
condEquip.pccTerminal = cpTerminal;
|
|
3014
|
+
if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3015
|
+
if (regelungU) {
|
|
3016
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.inverter;
|
|
3017
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.dcVoltage;
|
|
3018
|
+
condEquip.targetUdc = (0, parser_utils_1.isNumericI7)(i7DataHgue.udc) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.udc) : condEquip.ratedUdc;
|
|
3019
|
+
}
|
|
3020
|
+
else if (regelungP) {
|
|
3021
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
3022
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
3023
|
+
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);
|
|
3024
|
+
}
|
|
3025
|
+
else {
|
|
3026
|
+
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
3027
|
+
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
3028
|
+
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);
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3032
|
+
usoll = (0, parser_utils_1.isNumericI7)(i7DataHgue.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.usoll) : undefined;
|
|
3033
|
+
if (regelungU) {
|
|
3034
|
+
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
3035
|
+
condEquip.targetUdc = condEquip.ratedUdc;
|
|
3036
|
+
}
|
|
3037
|
+
else if (regelungP) {
|
|
3038
|
+
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
3039
|
+
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
3040
|
+
condEquip.targetPpcc = condEquip.baseS * -1; //ActivePower
|
|
3041
|
+
condEquip.targetQpcc = 0; //ReactivePower, TODO: define ReactivePowerCapabilityCurve
|
|
3042
|
+
}
|
|
3043
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
3044
|
+
//get rated voltage of controlled node.
|
|
3045
|
+
if (knotenSpgGeregelt && spannungsregelungRemote) {
|
|
3046
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3047
|
+
if (cterminal === undefined) {
|
|
3048
|
+
let stop = true;
|
|
3049
|
+
}
|
|
3050
|
+
if (cterminal) {
|
|
3051
|
+
tCn = cterminal.getConnectivityNode();
|
|
3052
|
+
if (tCn) {
|
|
3053
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3054
|
+
}
|
|
3055
|
+
else {
|
|
3056
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
else {
|
|
3060
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
else if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal && usoll === undefined) {
|
|
3064
|
+
switch (knotenSpgGeregelt) {
|
|
3065
|
+
case undefined: {
|
|
3066
|
+
if (cterminal === undefined) {
|
|
3067
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
3068
|
+
}
|
|
3069
|
+
break;
|
|
3070
|
+
}
|
|
3071
|
+
default: {
|
|
3072
|
+
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
if (cterminal) {
|
|
3076
|
+
tCn = cterminal.getConnectivityNode();
|
|
3077
|
+
if (tCn) {
|
|
3078
|
+
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
3083
|
+
if (usoll !== undefined) {
|
|
3084
|
+
condEquip.targetUpcc = usoll;
|
|
3085
|
+
}
|
|
3086
|
+
else {
|
|
3087
|
+
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Sollspannung konnte nicht ermittelt werden.`);
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
let equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, connectivityNode.connectivityNodeContainer);
|
|
3003
3093
|
if (equipmentContainer) {
|
|
3094
|
+
if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
3095
|
+
equipmentContainer = condEquip.equipmentContainer;
|
|
3096
|
+
}
|
|
3004
3097
|
condEquip.equipmentContainer = equipmentContainer;
|
|
3005
3098
|
equipmentContainer.addEquipment(condEquip);
|
|
3006
3099
|
//TODO: Überarbeitung notwendig, da hier der Präfix nicht eindeutig für Einspeisungen ermittelt werden kann.
|
|
@@ -3021,27 +3114,36 @@ class ConverterIntegral7 {
|
|
|
3021
3114
|
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3022
3115
|
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3023
3116
|
}
|
|
3117
|
+
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3118
|
+
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3119
|
+
integral_prefix_1.HGUEKOPFVSC_PRAEFIX + i7Data.bezeichner;
|
|
3120
|
+
}
|
|
3121
|
+
else if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3122
|
+
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3123
|
+
integral_prefix_1.HGUEKOPFKLASSISCH_PRAEFIX + i7Data.bezeichner;
|
|
3124
|
+
}
|
|
3024
3125
|
condEquip.description = i7Schluessel;
|
|
3025
|
-
if (
|
|
3126
|
+
if (hasGeneratingUnit) {
|
|
3026
3127
|
const substation = this.determineEquipmentContainer('Substation', cimModel, equipmentContainer);
|
|
3027
3128
|
generatingUnit.equipmentContainer = substation;
|
|
3028
3129
|
}
|
|
3029
3130
|
}
|
|
3030
3131
|
else {
|
|
3031
|
-
this.logger.error(
|
|
3132
|
+
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
3133
|
}
|
|
3033
3134
|
}
|
|
3034
3135
|
else {
|
|
3035
|
-
this.logger.error(
|
|
3136
|
+
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
3137
|
}
|
|
3138
|
+
return rControl;
|
|
3037
3139
|
}
|
|
3038
3140
|
convertQuerkupplungen(cimModel, integral7, schaltanlagenAbschnittIDs) {
|
|
3039
3141
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3040
3142
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.QUERKUPPLUNG)) {
|
|
3041
3143
|
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
3144
|
for (const i7Data of result) {
|
|
3043
|
-
const
|
|
3044
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3145
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3146
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_B']), 'Querkupplung');
|
|
3045
3147
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3046
3148
|
bay.locationID = i7Data.ips_folder_id;
|
|
3047
3149
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
@@ -3049,12 +3151,12 @@ class ConverterIntegral7 {
|
|
|
3049
3151
|
bay.voltageLevel = voltageLevel;
|
|
3050
3152
|
voltageLevel.addBay(bay);
|
|
3051
3153
|
const i7Schluessel = voltageLevel.description +
|
|
3052
|
-
|
|
3154
|
+
integral_prefix_1.QUERKUPPLUNG_PRAEFIX +
|
|
3053
3155
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
3054
3156
|
bay.description = i7Schluessel;
|
|
3055
3157
|
}
|
|
3056
3158
|
else {
|
|
3057
|
-
this.logger.debug(`Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3159
|
+
this.logger.debug(`debug --- Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3058
3160
|
}
|
|
3059
3161
|
integral7.querkupplungIDs.push(i7Data.id);
|
|
3060
3162
|
cimModel.addBay(bay);
|
|
@@ -3062,40 +3164,7 @@ class ConverterIntegral7 {
|
|
|
3062
3164
|
}
|
|
3063
3165
|
}
|
|
3064
3166
|
else {
|
|
3065
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
3066
|
-
}
|
|
3067
|
-
});
|
|
3068
|
-
}
|
|
3069
|
-
convertLaegskupplungen(cimModel, integral7, schaltanlagenIDs) {
|
|
3070
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3071
|
-
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3072
|
-
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
|
-
for (const i7Data of result) {
|
|
3074
|
-
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3075
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_B']), i7Data.kurzname, 'Laengskupplung');
|
|
3076
|
-
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3077
|
-
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3078
|
-
bay.locationID = i7Data.ips_folder_id;
|
|
3079
|
-
if (voltageLevel) {
|
|
3080
|
-
bay.voltageLevel = voltageLevel;
|
|
3081
|
-
voltageLevel.addBay(bay);
|
|
3082
|
-
const i7Schluessel = voltageLevel.description +
|
|
3083
|
-
'/LK-' +
|
|
3084
|
-
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
3085
|
-
bay.description = i7Schluessel;
|
|
3086
|
-
}
|
|
3087
|
-
else {
|
|
3088
|
-
this.logger.debug(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3089
|
-
}
|
|
3090
|
-
const lKupplungImpl = new Laengskupplung_1.LaengskupplungImpl(i7Data);
|
|
3091
|
-
integral7.integralLaengskupplungen.set(i7Data.id, lKupplungImpl);
|
|
3092
|
-
integral7.laengskupplungIDs.push(i7Data.id);
|
|
3093
|
-
this.addIdMapping(i7Data.id, bay.mrid, integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG);
|
|
3094
|
-
cimModel.addBay(bay);
|
|
3095
|
-
}
|
|
3096
|
-
}
|
|
3097
|
-
else {
|
|
3098
|
-
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG} ist nicht vorhanden.`);
|
|
3167
|
+
this.logger.debug(`debug --- Tabelle ${integral_sql_1.Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
3099
3168
|
}
|
|
3100
3169
|
});
|
|
3101
3170
|
}
|
|
@@ -3273,11 +3342,8 @@ class ConverterIntegral7 {
|
|
|
3273
3342
|
/** Spannungsebene */
|
|
3274
3343
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3275
3344
|
seriesCompensator.baseVoltage = baseVoltages[0] ? baseVoltages[0] : baseVoltages[1];
|
|
3276
|
-
if (seriesCompensator.baseVoltage === undefined) {
|
|
3277
|
-
let stop = true;
|
|
3278
|
-
}
|
|
3279
3345
|
/** EQ */
|
|
3280
|
-
const ur =
|
|
3346
|
+
const ur = seriesCompensator.baseVoltage.nominalVoltage.value; //getU(i7Data.ur);
|
|
3281
3347
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3282
3348
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3283
3349
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3290,7 +3356,7 @@ class ConverterIntegral7 {
|
|
|
3290
3356
|
/** CurrentLimit */
|
|
3291
3357
|
const terminal = startTerminal;
|
|
3292
3358
|
if (terminal) {
|
|
3293
|
-
this.
|
|
3359
|
+
this.setConductingEquipmentOperationalLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, seriesCompensator.getUUID(), ir, cim_class_names_1.ClassNames.CurrentLimit);
|
|
3294
3360
|
}
|
|
3295
3361
|
else {
|
|
3296
3362
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3313,7 +3379,7 @@ class ConverterIntegral7 {
|
|
|
3313
3379
|
this.logger.debug(`Längsdrossel ${i7Data.id} besitzt kein VoltageLevel Ur ${i7Data.ur}.`);
|
|
3314
3380
|
}
|
|
3315
3381
|
/** PSR Types */
|
|
3316
|
-
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, 'Längsdrossel');
|
|
3382
|
+
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, 'Längsdrossel', this.configUuid);
|
|
3317
3383
|
seriesCompensator.psrTypeUUID = psrType.mrid;
|
|
3318
3384
|
cimModel.addSeriesCompensator(seriesCompensator);
|
|
3319
3385
|
this.addIdMapping(i7Data.id, seriesCompensator.mrid, integral_sql_1.Integral7TableNames.LAENGSDROSSEL);
|
|
@@ -3361,9 +3427,9 @@ class ConverterIntegral7 {
|
|
|
3361
3427
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.eknoten)));
|
|
3362
3428
|
/** Spannungsebene */
|
|
3363
3429
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3364
|
-
seriesCompensator.baseVoltage = baseVoltages[0];
|
|
3430
|
+
seriesCompensator.baseVoltage = baseVoltages[0] ? baseVoltages[0] : baseVoltages[1];
|
|
3365
3431
|
/** EQ */
|
|
3366
|
-
const ur =
|
|
3432
|
+
const ur = seriesCompensator.baseVoltage.nominalVoltage.value; //getU(i7Data.ur);
|
|
3367
3433
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3368
3434
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3369
3435
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3376,7 +3442,7 @@ class ConverterIntegral7 {
|
|
|
3376
3442
|
/** CurrentLimit */
|
|
3377
3443
|
const terminal = startTerminal;
|
|
3378
3444
|
if (terminal) {
|
|
3379
|
-
this.
|
|
3445
|
+
this.setConductingEquipmentOperationalLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, seriesCompensator.getUUID(), ir, cim_class_names_1.ClassNames.CurrentLimit);
|
|
3380
3446
|
}
|
|
3381
3447
|
else {
|
|
3382
3448
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3396,7 +3462,7 @@ class ConverterIntegral7 {
|
|
|
3396
3462
|
this.logger.debug(`Längskondensator ${i7Data.id} besitzt kein VoltageLevel Ur ${i7Data.ur}.`);
|
|
3397
3463
|
}
|
|
3398
3464
|
/** PSR Types */
|
|
3399
|
-
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, 'Längskondensator');
|
|
3465
|
+
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, 'Längskondensator', this.configUuid);
|
|
3400
3466
|
seriesCompensator.psrType = psrType;
|
|
3401
3467
|
cimModel.addSeriesCompensator(seriesCompensator);
|
|
3402
3468
|
this.addIdMapping(i7Data.id, seriesCompensator.mrid, integral_sql_1.Integral7TableNames.LAENGSKONDENSATOR);
|
|
@@ -3434,9 +3500,13 @@ class ConverterIntegral7 {
|
|
|
3434
3500
|
for (const i7DataSchiene of stpSchiene) {
|
|
3435
3501
|
try {
|
|
3436
3502
|
stpSchieneIDs.push(i7DataSchiene.id);
|
|
3437
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7DataSchiene), '_CN']));
|
|
3438
|
-
const junction = new Junction_1.Junction(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7DataSchiene), '_J']));
|
|
3439
3503
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(this.integralID2UUID.get(i7DataSchiene.id)));
|
|
3504
|
+
const keyConnectivityNode = cim_class_names_1.ClassNames.ConnectivityNode + i7DataSchiene.id + (equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getUUID()) || '';
|
|
3505
|
+
const uuidConnectivityNode = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, keyConnectivityNode);
|
|
3506
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(uuidConnectivityNode, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7DataSchiene), '_CN']));
|
|
3507
|
+
const keyJunction = cim_class_names_1.ClassNames.Junction + i7DataSchiene.id + (equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getUUID()) || '';
|
|
3508
|
+
const uuidJunction = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Junction, this.configUuid, keyJunction);
|
|
3509
|
+
const junction = new Junction_1.Junction(uuidJunction, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7DataSchiene), '_J']));
|
|
3440
3510
|
connectivityNode.setConnectivityNodeContainer(equipmentContainer);
|
|
3441
3511
|
if (equipmentContainer) {
|
|
3442
3512
|
equipmentContainer.addEquipment(junction);
|
|
@@ -3447,6 +3517,7 @@ class ConverterIntegral7 {
|
|
|
3447
3517
|
}
|
|
3448
3518
|
// Verbindung herstellen
|
|
3449
3519
|
const terminal = this.createConnection(cimModel, junction, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3520
|
+
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3450
3521
|
integral7.sternPunktImpModel.connectivityNodes.set(connectivityNode.mrid, connectivityNode);
|
|
3451
3522
|
integral7.sternPunktImpModel.junctions.set(junction.mrid, junction);
|
|
3452
3523
|
integral7.sternPunktImpModel.stpSchieneJunctionUUIDs.set(i7DataSchiene.id, junction.mrid);
|
|
@@ -3499,6 +3570,7 @@ class ConverterIntegral7 {
|
|
|
3499
3570
|
// Verbindung herstellen
|
|
3500
3571
|
if (connectivityNode) {
|
|
3501
3572
|
const terminal = this.createConnection(cimModel, conductingEquip, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3573
|
+
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3502
3574
|
}
|
|
3503
3575
|
}
|
|
3504
3576
|
}
|
|
@@ -3557,8 +3629,8 @@ class ConverterIntegral7 {
|
|
|
3557
3629
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3558
3630
|
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
3631
|
for (const i7Data of result) {
|
|
3560
|
-
const
|
|
3561
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3632
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3633
|
+
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
3634
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3563
3635
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3564
3636
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -3624,6 +3696,7 @@ class ConverterIntegral7 {
|
|
|
3624
3696
|
object.x0 = +data.x0; // new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3625
3697
|
object.c0 = +data.c0; // new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3626
3698
|
object.ratedCurrent = +data.ir;
|
|
3699
|
+
object.limitingCurrent = +data.igrenz;
|
|
3627
3700
|
}
|
|
3628
3701
|
convertLeitungen(frame, integral7, defaultValuesConfig) {
|
|
3629
3702
|
var _a, _b, _c;
|
|
@@ -3632,9 +3705,6 @@ class ConverterIntegral7 {
|
|
|
3632
3705
|
const cimModel = frame.cimModel;
|
|
3633
3706
|
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
3707
|
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
3708
|
const cableAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.KABEL);
|
|
3639
3709
|
const overheadAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.FREILEITUNG);
|
|
3640
3710
|
let type = integral_sql_1.I7Objects.STROMKREISABSCHNITT;
|
|
@@ -3687,15 +3757,17 @@ class ConverterIntegral7 {
|
|
|
3687
3757
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner) +
|
|
3688
3758
|
'-' +
|
|
3689
3759
|
(0, utils_2.ueberpruefeZeichenkette)(stk.bezeichner);
|
|
3690
|
-
const
|
|
3691
|
-
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(
|
|
3760
|
+
const uuid = (0, parser_utils_1.getUUID)(stk.custom_guid_0120 + stk.custom_guid_2137, this.objectMappingConfig.standardiseUuid);
|
|
3761
|
+
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
3762
|
if (stk.baujahr) {
|
|
3693
|
-
const
|
|
3763
|
+
const key = acLineSegment.getUUID();
|
|
3764
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.EVWireObject, this.configUuid, key);
|
|
3765
|
+
const wire = new EVWireObject_1.EVWireObject(uuid, stk.name);
|
|
3694
3766
|
wire.type = 'Stromkreisabschnitt';
|
|
3695
3767
|
wire.addPowerSystemResource(acLineSegment);
|
|
3696
3768
|
acLineSegment.addAsset(wire);
|
|
3697
3769
|
cimModel.addWireObject(wire);
|
|
3698
|
-
|
|
3770
|
+
util_cim_model_1.UtilCimModel.setLifecycleDate(wire, stk.baujahr);
|
|
3699
3771
|
}
|
|
3700
3772
|
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(stk.multfaktor));
|
|
3701
3773
|
if (mf) {
|
|
@@ -3715,6 +3787,9 @@ class ConverterIntegral7 {
|
|
|
3715
3787
|
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt
|
|
3716
3788
|
*/
|
|
3717
3789
|
const acLineSegmentStart = acLineSegments[0];
|
|
3790
|
+
if (line.getUUID() === "4637c6dc-fad5-45f1-91e0-091d00717a3b" || line.getUUID() === "a992f3c9-f2e1-4cd6-8cc6-fd3d5d167871") {
|
|
3791
|
+
const stop = true;
|
|
3792
|
+
}
|
|
3718
3793
|
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
3719
3794
|
if (startTerminal) {
|
|
3720
3795
|
//this.setACLineSegmentCurrentLimt(cimModel, acLineSegmentStart, acLineSegmentStart.description, startTerminal);
|
|
@@ -3742,8 +3817,11 @@ class ConverterIntegral7 {
|
|
|
3742
3817
|
let tmp_terminal = undefined;
|
|
3743
3818
|
for (let i = 0; i < anzahl - 1; i++) {
|
|
3744
3819
|
const acLineSegment1 = acLineSegments[i];
|
|
3820
|
+
const acLineSegment2 = acLineSegments[i + 1];
|
|
3745
3821
|
/**Connectivity Node to connect end of line and start of neighbouring line.*/
|
|
3746
|
-
const
|
|
3822
|
+
const key = acLineSegment1.getUUID() + acLineSegment2.getUUID();
|
|
3823
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ConnectivityNode, this.configUuid, key);
|
|
3824
|
+
const cn = new ConnectivityNode_1.ConnectivityNode(uuid, (0, util_create_1.createNotation)([acLineSegment1.name, '_', acLineSegment1.getUUID().substring(0, 8), '_CN'], 32, true));
|
|
3747
3825
|
/**Connect end of aclinesegment i*/
|
|
3748
3826
|
cn.connectivityNodeContainer = acLineSegment1.equipmentContainer;
|
|
3749
3827
|
tmp_terminal = this.createConnection(cimModel, acLineSegment1, cn, PhaseCode_1.PhaseCode.ABC, true);
|
|
@@ -3754,7 +3832,6 @@ class ConverterIntegral7 {
|
|
|
3754
3832
|
}
|
|
3755
3833
|
this.setACLineSegmentProperties(this.cimModelDefault, cimModel, acLineSegments[i], stromkreisabschnitte[i], defaultValuesConfig);
|
|
3756
3834
|
/**Connect end of aclinesegment i+1*/
|
|
3757
|
-
const acLineSegment2 = acLineSegments[i + 1];
|
|
3758
3835
|
tmp_terminal = this.createConnection(cimModel, acLineSegment2, cn, PhaseCode_1.PhaseCode.ABC, true);
|
|
3759
3836
|
//this.setACLineSegmentCurrentLimt(cimModel, acLineSegment2, acLineSegment2.description, tmp_terminal);
|
|
3760
3837
|
cimModel.addACLineSegment(acLineSegment1);
|
|
@@ -3816,7 +3893,7 @@ class ConverterIntegral7 {
|
|
|
3816
3893
|
}
|
|
3817
3894
|
}
|
|
3818
3895
|
else {
|
|
3819
|
-
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}:
|
|
3896
|
+
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}: SubGeographicalRegion konnte nicht bestimmt werden.`);
|
|
3820
3897
|
}
|
|
3821
3898
|
tmp_terminal = values.next();
|
|
3822
3899
|
}
|
|
@@ -3838,7 +3915,7 @@ class ConverterIntegral7 {
|
|
|
3838
3915
|
});
|
|
3839
3916
|
}
|
|
3840
3917
|
convertDCLines(cimModel, integral7, defaultValuesConfig) {
|
|
3841
|
-
var _a;
|
|
3918
|
+
var _a, _b;
|
|
3842
3919
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3843
3920
|
//Workaround: Prefill Integral 7 model hgueAnschlussKnotenIDs because of missing bays and schlaufen for dc objects this data structure keeps empty.
|
|
3844
3921
|
//for(let dc_node of this.hgueAnschlussKnotenIDs){
|
|
@@ -3849,7 +3926,7 @@ class ConverterIntegral7 {
|
|
|
3849
3926
|
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
3927
|
for (const i7Data of result) {
|
|
3851
3928
|
//console.log(getUUID(i7Data.guid_dcline));
|
|
3852
|
-
integral7.
|
|
3929
|
+
integral7.integralHgueLeitungIds.add(i7Data.id);
|
|
3853
3930
|
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
3931
|
let dcLineNeg = undefined;
|
|
3855
3932
|
const i7Schluessel = integral_prefix_1.HGUELEITUNG_PRAEFIX +
|
|
@@ -3862,7 +3939,10 @@ class ConverterIntegral7 {
|
|
|
3862
3939
|
let converterTargetNeg = false;
|
|
3863
3940
|
let converterUnitTargetSide = false;
|
|
3864
3941
|
let bipol = (0, parser_utils_1.convertToBooleanI7)(i7Data.bipol);
|
|
3865
|
-
bipol
|
|
3942
|
+
if (bipol === undefined) {
|
|
3943
|
+
bipol = false;
|
|
3944
|
+
}
|
|
3945
|
+
let dcNode = undefined;
|
|
3866
3946
|
//Parameter "guidp" is available for monopolar and bipolar dc systems. Thus create DCLineSegment with positive sign property in any case.
|
|
3867
3947
|
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
3948
|
let dcLineSegmentNeg = undefined;
|
|
@@ -3874,43 +3954,53 @@ class ConverterIntegral7 {
|
|
|
3874
3954
|
dcLineSegment.capacitance = undefined;
|
|
3875
3955
|
dcLineSegment.inductance = undefined;
|
|
3876
3956
|
/**EQ: given directly by the INTEGRAL system model */
|
|
3877
|
-
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (
|
|
3957
|
+
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3878
3958
|
dcLineSegment.equipmentContainer = dcLine;
|
|
3879
3959
|
//create second dcLineSegment in case this dcLine is a bipol.
|
|
3880
3960
|
if (bipol) {
|
|
3881
|
-
|
|
3961
|
+
const dcLineKey = dcLine.getUUID();
|
|
3962
|
+
const dcLineUuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.DCLine, this.configUuid, dcLineKey);
|
|
3963
|
+
dcLineNeg = new DCLine_1.DCLine(dcLineUuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCL']));
|
|
3882
3964
|
dcLineSegmentNeg = new DCLineSegment_1.DCLineSegment((0, parser_utils_1.getUUID)(i7Data.guidn, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCLS'], 32, true), (0, util_create_1.createNotation)([i7Data.kurzname, '_neg'], 12, true), i7Schluessel);
|
|
3883
3965
|
dcLineSegmentNeg.length = dcLineSegment.length;
|
|
3884
3966
|
dcLineSegmentNeg.capacitance = undefined;
|
|
3885
3967
|
dcLineSegmentNeg.inductance = undefined;
|
|
3886
|
-
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (
|
|
3968
|
+
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3887
3969
|
dcLineSegmentNeg.equipmentContainer = dcLineNeg;
|
|
3888
3970
|
}
|
|
3889
3971
|
const acDCConverterStart = cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) : undefined;
|
|
3890
3972
|
converterStart = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStart !== undefined);
|
|
3891
3973
|
let acDCConverterStartNeg = undefined;
|
|
3892
3974
|
const acDCConverterTarget = cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) : undefined;
|
|
3893
|
-
|
|
3975
|
+
converterTarget = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTarget !== undefined);
|
|
3894
3976
|
let acDCConverterTargetNeg = undefined;
|
|
3977
|
+
if (acDCConverterTarget === undefined) {
|
|
3978
|
+
const stop = true;
|
|
3979
|
+
}
|
|
3980
|
+
else if (acDCConverterStart === undefined) {
|
|
3981
|
+
const stop = true;
|
|
3982
|
+
}
|
|
3983
|
+
const int7hguekopfStart = converterStart ? (_a = integral7.integralHgueKopf) === null || _a === void 0 ? void 0 : _a.get(this.UUID2Integral7ID.get(acDCConverterStart.getUUID()).find(elem => elem)) : undefined;
|
|
3984
|
+
const int7hguekopfTarget = converterTarget ? (_b = integral7.integralHgueKopf) === null || _b === void 0 ? void 0 : _b.get(this.UUID2Integral7ID.get(acDCConverterTarget.getUUID()).find(elem => elem)) : undefined;
|
|
3895
3985
|
//Setting acDCConverterStartNeg and acDCConverterTargetNeg in case this DCLine is a bipol
|
|
3896
3986
|
if (bipol) {
|
|
3897
|
-
|
|
3898
|
-
acDCConverterStartNeg = converterStart && int7hguekopf !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopf, acDCConverterStart.constructor.name, acDCConverterStart) : undefined;
|
|
3987
|
+
acDCConverterStartNeg = converterStart && int7hguekopfStart !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopfStart, acDCConverterStart.constructor.name, acDCConverterStart) : undefined;
|
|
3899
3988
|
converterStartNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStartNeg !== undefined);
|
|
3900
|
-
acDCConverterTargetNeg = converterTarget &&
|
|
3989
|
+
acDCConverterTargetNeg = converterTarget && int7hguekopfTarget !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopfTarget, acDCConverterTarget.constructor.name, acDCConverterTarget) : undefined;
|
|
3901
3990
|
converterTargetNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTargetNeg !== undefined);
|
|
3902
3991
|
}
|
|
3992
|
+
//Set grounding for dcConverterUnit
|
|
3993
|
+
const converterUnitStart = (acDCConverterStart === null || acDCConverterStart === void 0 ? void 0 : acDCConverterStart.equipmentContainer) ? acDCConverterStart.equipmentContainer : undefined;
|
|
3994
|
+
converterUnitStartSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitStart !== undefined);
|
|
3995
|
+
const converterUnitTarget = (acDCConverterTarget === null || acDCConverterTarget === void 0 ? void 0 : acDCConverterTarget.equipmentContainer) ? acDCConverterTarget.equipmentContainer : undefined;
|
|
3996
|
+
converterUnitTargetSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitTarget !== undefined);
|
|
3903
3997
|
if (converterStart && !converterStartNeg) {
|
|
3904
|
-
createDCGround(acDCConverterStart);
|
|
3998
|
+
dcNode = createDCGround(cimModel, acDCConverterStart, int7hguekopfStart);
|
|
3905
3999
|
}
|
|
3906
4000
|
else if (converterStart && converterStartNeg) {
|
|
3907
|
-
createDCGround(acDCConverterStart);
|
|
3908
|
-
connectDCGround(acDCConverterStartNeg);
|
|
4001
|
+
dcNode = createDCGround(cimModel, acDCConverterStart, int7hguekopfStart);
|
|
4002
|
+
connectDCGround(cimModel, acDCConverterStartNeg, int7hguekopfStart, dcNode, DCPolarityKind_1.DCPolarityKind.middle);
|
|
3909
4003
|
}
|
|
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
4004
|
switch (bipol) {
|
|
3915
4005
|
case true: {
|
|
3916
4006
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
@@ -3921,11 +4011,11 @@ class ConverterIntegral7 {
|
|
|
3921
4011
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
3922
4012
|
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
3923
4013
|
if (converterTarget && !converterTargetNeg) {
|
|
3924
|
-
createDCGround(acDCConverterTarget);
|
|
4014
|
+
dcNode = createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
3925
4015
|
}
|
|
3926
4016
|
else if (converterTarget && converterTargetNeg) {
|
|
3927
|
-
createDCGround(acDCConverterTarget);
|
|
3928
|
-
connectDCGround(acDCConverterTargetNeg);
|
|
4017
|
+
dcNode = createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
4018
|
+
connectDCGround(cimModel, acDCConverterTargetNeg, int7hguekopfTarget, dcNode, DCPolarityKind_1.DCPolarityKind.middle);
|
|
3929
4019
|
}
|
|
3930
4020
|
else {
|
|
3931
4021
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r ACDCConverter konnte nicht ermittelt werden.`);
|
|
@@ -3939,27 +4029,29 @@ class ConverterIntegral7 {
|
|
|
3939
4029
|
case false: {
|
|
3940
4030
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
3941
4031
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3942
|
-
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3943
|
-
createNeutralGroundReturn(converterUnitStart, converterUnitTarget);
|
|
3944
4032
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r DCConverterUnit am Leitungsende konnte nicht ermittelt werden.`);
|
|
3945
4033
|
}
|
|
3946
4034
|
else if (converterUnitStartSide && converterUnitTargetSide) {
|
|
3947
4035
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4036
|
+
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4037
|
+
createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
3948
4038
|
}
|
|
4039
|
+
break;
|
|
3949
4040
|
}
|
|
3950
4041
|
default: {
|
|
3951
|
-
this.logger.
|
|
4042
|
+
this.logger.info(`info --- HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: die bipol-Eigenschaft ist nicht gesetzt.`);
|
|
3952
4043
|
}
|
|
3953
4044
|
}
|
|
3954
4045
|
// Topologie DC
|
|
3955
4046
|
/* Anfang / Ende DCNodes*/
|
|
3956
|
-
|
|
3957
|
-
const startDCNodeNeg =
|
|
4047
|
+
let startDCNode = converterStart ? getDCNodeFromConverter(acDCConverterStart, DCPolarityKind_1.DCPolarityKind.positive) : undefined;
|
|
4048
|
+
const startDCNodeNeg = converterStartNeg ? getDCNodeFromConverter(acDCConverterStartNeg, DCPolarityKind_1.DCPolarityKind.negative) : undefined;
|
|
3958
4049
|
if (startDCNode) {
|
|
3959
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.
|
|
3960
|
-
dcTerminal.connected = true;
|
|
4050
|
+
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
4051
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
4052
|
+
dcTerminal.connected = true;
|
|
3962
4053
|
dcTerminal.dcNode = startDCNode;
|
|
4054
|
+
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3963
4055
|
startDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3964
4056
|
cimModel.addDCTerminal(dcTerminal);
|
|
3965
4057
|
}
|
|
@@ -3967,23 +4059,23 @@ class ConverterIntegral7 {
|
|
|
3967
4059
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
3968
4060
|
}
|
|
3969
4061
|
if (startDCNodeNeg) {
|
|
3970
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.
|
|
3971
|
-
dcTerminal.connected = true;
|
|
4062
|
+
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
4063
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
3973
4064
|
dcTerminal.dcNode = startDCNodeNeg;
|
|
4065
|
+
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3974
4066
|
startDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3975
4067
|
cimModel.addDCTerminal(dcTerminal);
|
|
3976
4068
|
}
|
|
3977
4069
|
else {
|
|
3978
4070
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten NEG. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
3979
4071
|
}
|
|
3980
|
-
const targetDCNode =
|
|
3981
|
-
const targetDCNodeNeg =
|
|
4072
|
+
const targetDCNode = converterTarget ? getDCNodeFromConverter(acDCConverterTarget, DCPolarityKind_1.DCPolarityKind.positive) : undefined;
|
|
4073
|
+
const targetDCNodeNeg = converterTargetNeg ? getDCNodeFromConverter(acDCConverterTargetNeg, DCPolarityKind_1.DCPolarityKind.negative) : undefined;
|
|
3982
4074
|
if (targetDCNode) {
|
|
3983
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3984
|
-
dcTerminal.connected = true;
|
|
4075
|
+
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
4076
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
3986
4077
|
dcTerminal.dcNode = targetDCNode;
|
|
4078
|
+
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3987
4079
|
targetDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3988
4080
|
cimModel.addDCTerminal(dcTerminal);
|
|
3989
4081
|
}
|
|
@@ -3991,10 +4083,10 @@ class ConverterIntegral7 {
|
|
|
3991
4083
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Zielknoten. ${i7Data.enetzobjekt} ${this.integralID2UUID.get(i7Data.enetzobjekt)}`);
|
|
3992
4084
|
}
|
|
3993
4085
|
if (targetDCNodeNeg) {
|
|
3994
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3995
|
-
dcTerminal.connected = true;
|
|
4086
|
+
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
4087
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
3997
4088
|
dcTerminal.dcNode = targetDCNodeNeg;
|
|
4089
|
+
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3998
4090
|
targetDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
3999
4091
|
cimModel.addDCTerminal(dcTerminal);
|
|
4000
4092
|
}
|
|
@@ -4003,7 +4095,7 @@ class ConverterIntegral7 {
|
|
|
4003
4095
|
}
|
|
4004
4096
|
cimModel.addDCLine(dcLine);
|
|
4005
4097
|
cimModel.addDCLineSegment(dcLineSegment);
|
|
4006
|
-
if (bipol) {
|
|
4098
|
+
if (bipol && dcLineNeg && dcLineSegmentNeg) {
|
|
4007
4099
|
cimModel.addDCLine(dcLineNeg);
|
|
4008
4100
|
cimModel.addDCLineSegment(dcLineSegmentNeg);
|
|
4009
4101
|
}
|
|
@@ -4179,12 +4271,15 @@ class ConverterIntegral7 {
|
|
|
4179
4271
|
}
|
|
4180
4272
|
}
|
|
4181
4273
|
for (const i7Data of result) {
|
|
4182
|
-
const
|
|
4183
|
-
|
|
4184
|
-
|
|
4274
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4275
|
+
if (uuid === "02b17e6c-eeed-451e-a822-c54e6d6c4db1") {
|
|
4276
|
+
const stop = true;
|
|
4277
|
+
}
|
|
4278
|
+
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);
|
|
4279
|
+
const facility = util_cim_model_1.UtilCimModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer, this.configUuid);
|
|
4185
4280
|
/** AssetInfos */
|
|
4186
4281
|
if (i7Data.baujahr) {
|
|
4187
|
-
|
|
4282
|
+
util_cim_model_1.UtilCimModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
4188
4283
|
}
|
|
4189
4284
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4190
4285
|
if (substation) {
|
|
@@ -4238,9 +4333,7 @@ class ConverterIntegral7 {
|
|
|
4238
4333
|
const ukr = (0, utils_2.getUkrTrafo)(i7Data, powerTransformerInfo, '');
|
|
4239
4334
|
const sr = (0, utils_2.getSrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber, false);
|
|
4240
4335
|
const ur = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber);
|
|
4241
|
-
|
|
4242
|
-
// I rated
|
|
4243
|
-
const ir1 = (0, utils_2.getTrafoIr)(ur, sr);
|
|
4336
|
+
const sdauer = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer) : sr;
|
|
4244
4337
|
// P0 Lastverluste im I7 Modell p_leer
|
|
4245
4338
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4246
4339
|
// Leerlaufverluste
|
|
@@ -4255,10 +4348,14 @@ class ConverterIntegral7 {
|
|
|
4255
4348
|
powerTransformerEnd1.ratedU = ur;
|
|
4256
4349
|
powerTransformerEnd1.ratedS = sr;
|
|
4257
4350
|
//Short-Circuit data export EQ-SC profile //TODO: Read data for enervancetransformertype object.
|
|
4258
|
-
const
|
|
4259
|
-
const x0kr1 = (0,
|
|
4260
|
-
const
|
|
4261
|
-
const
|
|
4351
|
+
const r0kr1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r0kr1');
|
|
4352
|
+
const x0kr1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x0kr1');
|
|
4353
|
+
const r00r1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r00r1');
|
|
4354
|
+
const x00r1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x00r1');
|
|
4355
|
+
const r0kr2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r0kr2');
|
|
4356
|
+
const x0kr2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x0kr2');
|
|
4357
|
+
const r00r2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r00r2');
|
|
4358
|
+
const x00r2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x00r2');
|
|
4262
4359
|
/** Topologie 3 moegliche Anschluesse
|
|
4263
4360
|
* KontenSo -> Anschluesspunkt
|
|
4264
4361
|
* KnotenSf -> Schaltfeldpunkt
|
|
@@ -4269,7 +4366,7 @@ class ConverterIntegral7 {
|
|
|
4269
4366
|
const startTerminal = start ? this.createConnection(cimModel, powerTransformer, start, PhaseCode.ABC, true, 1) : undefined;*/
|
|
4270
4367
|
if (!startTerminal)
|
|
4271
4368
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
4272
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7,
|
|
4369
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7, sdauer, i7Data, defaultValuesConfig);
|
|
4273
4370
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4274
4371
|
let equivalentInjection = undefined;
|
|
4275
4372
|
if (startTerminal) {
|
|
@@ -4285,24 +4382,16 @@ class ConverterIntegral7 {
|
|
|
4285
4382
|
const sr2 = (0, utils_2.getSrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd2.endNumber, false);
|
|
4286
4383
|
const ur2 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd2.endNumber);
|
|
4287
4384
|
// Berechnung
|
|
4288
|
-
// NullSystem Impedanzen (nur Reaktanzen)
|
|
4289
|
-
const zeroSequImpedanzWx = (0, utils_trafo3w_1.calculateZeroSequImpedanzenTrafo2W)(r00r1, x00r1, x0kr1, x00r2, ur, ur2);
|
|
4290
4385
|
powerTransformerEnd2.r = 0;
|
|
4291
4386
|
powerTransformerEnd2.x = 0;
|
|
4292
4387
|
powerTransformerEnd2.ratedS = sr2;
|
|
4293
4388
|
powerTransformerEnd2.ratedU = ur2;
|
|
4294
|
-
powerTransformerEnd1.x0 = zeroSequImpedanzWx.x01;
|
|
4295
|
-
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4296
|
-
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4297
|
-
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4298
|
-
// I rated
|
|
4299
|
-
const ir2 = (sr * Math.pow(10, 6) / ur2 * 1000) / Math.sqrt(3);
|
|
4300
4389
|
/* const ziel = cimModel.getObject(this.integralID2UUID.get(i7Data.eknoten));
|
|
4301
4390
|
const zielTerminal = ziel ? this.createConnection(cimModel, powerTransformer, ziel, PhaseCode.ABC, true, 2) : undefined;*/
|
|
4302
4391
|
const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
4303
4392
|
if (!zielTerminal)
|
|
4304
4393
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Zielknoten.`);
|
|
4305
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7,
|
|
4394
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7, undefined, i7Data, defaultValuesConfig);
|
|
4306
4395
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4307
4396
|
if (zielTerminal) {
|
|
4308
4397
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten));
|
|
@@ -4317,6 +4406,14 @@ class ConverterIntegral7 {
|
|
|
4317
4406
|
powerTransformerEnd1.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
4318
4407
|
powerTransformerEnd2.connectionKind = (0, utils_2.getSchaltgruppe)(schaltgruppe, powerTransformerEnd2.endNumber, powerTransformerEnd2.grounded);
|
|
4319
4408
|
powerTransformerEnd2.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
4409
|
+
// NullSystem Impedanzen (nur Reaktanzen)
|
|
4410
|
+
let starconnectionCount = (0, utils_2.getGroundingCountFromWindingConnection)(powerTransformer);
|
|
4411
|
+
//const zeroSequImpedanzWx = calculateZeroSequImpedanzenTrafo2W([r0kr1, x0kr1, r0kr2, x0kr2], [r00r1, x00r1, r00r2, x00r2], [ur, ur2]);
|
|
4412
|
+
const zeroSequImpedanzWx = (0, utils_2.calculateComplexZeroSequImpedanzenTrafo)([r0kr1, x0kr1, r0kr2, x0kr2], [r00r1, x00r1, r00r2, x00r2], [ur, ur2], starconnectionCount)[0];
|
|
4413
|
+
powerTransformerEnd1.x0 = zeroSequImpedanzWx.x01;
|
|
4414
|
+
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4415
|
+
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4416
|
+
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4320
4417
|
/** Transormator Anschlusspunkte nach Spannungsebene sortieren */
|
|
4321
4418
|
this.sortTransformerEnd(powerTransformer, 'ratedU', 'desc');
|
|
4322
4419
|
// TODO
|
|
@@ -4391,25 +4488,25 @@ class ConverterIntegral7 {
|
|
|
4391
4488
|
}
|
|
4392
4489
|
for (const i7Data of result) {
|
|
4393
4490
|
const sternpunktKnotenMap = new Map();
|
|
4394
|
-
const
|
|
4395
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(
|
|
4396
|
-
const
|
|
4491
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4492
|
+
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);
|
|
4493
|
+
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4494
|
+
if (substation) {
|
|
4495
|
+
powerTransformer.equipmentContainer = substation;
|
|
4496
|
+
}
|
|
4497
|
+
else {
|
|
4498
|
+
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4499
|
+
}
|
|
4500
|
+
const facility = util_cim_model_1.UtilCimModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer, this.configUuid);
|
|
4397
4501
|
/** AssetInfos */
|
|
4398
4502
|
if (i7Data.baujahr) {
|
|
4399
|
-
|
|
4503
|
+
util_cim_model_1.UtilCimModel.setLifecycleDate(facility, i7Data.baujahr);
|
|
4400
4504
|
}
|
|
4401
4505
|
const powerTransformerInfo = this.cimModelDefault.getPowerTransformerInfoByName(i7Data.nametyp);
|
|
4402
4506
|
if (powerTransformerInfo) {
|
|
4403
4507
|
facility.setAssetInfo(powerTransformerInfo);
|
|
4404
4508
|
powerTransformerInfo.addAsset(facility);
|
|
4405
4509
|
}
|
|
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
4510
|
const schaltgruppe = i7Data.schaltgr;
|
|
4414
4511
|
//Set property 'isPartOfGeneratorUnit' to 'true' if property 'Blocktransformator' is set in Integral data.
|
|
4415
4512
|
if (this.blocktransformatoren.includes((0, parser_utils_1.convertToNumberI7)(i7Data.id))) {
|
|
@@ -4421,12 +4518,14 @@ class ConverterIntegral7 {
|
|
|
4421
4518
|
if (i7Data.nametyp) {
|
|
4422
4519
|
const stop = true;
|
|
4423
4520
|
}
|
|
4424
|
-
const x00r1 = (0,
|
|
4425
|
-
const x0kr1 = (0,
|
|
4426
|
-
const x00r2 = (0,
|
|
4427
|
-
const
|
|
4428
|
-
const
|
|
4429
|
-
const
|
|
4521
|
+
const x00r1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x00r1');
|
|
4522
|
+
const x0kr1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x0kr1');
|
|
4523
|
+
const x00r2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x00r2');
|
|
4524
|
+
const x0kr2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'x0kr2');
|
|
4525
|
+
const r00r1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r00r1');
|
|
4526
|
+
const r0kr1 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r0kr1');
|
|
4527
|
+
const r00r2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r00r2');
|
|
4528
|
+
const r0kr2 = (0, utils_2.getX0R0Transformer)(i7Data, powerTransformerInfo, 'r0kr2');
|
|
4430
4529
|
const pkr12 = (0, utils_2.getPkrTrafo)(i7Data, powerTransformerInfo, '12');
|
|
4431
4530
|
const pkr13 = (0, utils_2.getPkrTrafo)(i7Data, powerTransformerInfo, '13');
|
|
4432
4531
|
const pkr23 = (0, utils_2.getPkrTrafo)(i7Data, powerTransformerInfo, '23');
|
|
@@ -4439,10 +4538,9 @@ class ConverterIntegral7 {
|
|
|
4439
4538
|
const ur1 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 1);
|
|
4440
4539
|
const ur2 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 2);
|
|
4441
4540
|
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));
|
|
4541
|
+
const sdauer1 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_1) : sr1;
|
|
4542
|
+
const sdauer2 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_2) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_2) : sr2;
|
|
4543
|
+
const sdauer3 = (0, parser_utils_1.isNumericI7)(i7Data.s_dauer_3) ? (0, parser_utils_1.convertToNumberI7)(i7Data.s_dauer_3) : sr3;
|
|
4446
4544
|
//Leerlaufverluste in kW
|
|
4447
4545
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4448
4546
|
// Leerlaufstrom bezogen auf Wicklung mit dem grössten Sr in %
|
|
@@ -4451,8 +4549,9 @@ class ConverterIntegral7 {
|
|
|
4451
4549
|
const impedanzW1 = (0, utils_trafo3w_1.calculateImpedanzenTrafo3W)(1, ur1, ur2, ur3, sr1, sr2, sr3, pkr12, pkr13, pkr23, ukr12, ukr13, ukr23, pLeer, iLeer);
|
|
4452
4550
|
const impedanzW2 = (0, utils_trafo3w_1.calculateImpedanzenTrafo3W)(2, ur1, ur2, ur3, sr1, sr2, sr3, pkr12, pkr13, pkr23, ukr12, ukr13, ukr23, 0, 0);
|
|
4453
4551
|
const impedanzW3 = (0, utils_trafo3w_1.calculateImpedanzenTrafo3W)(3, ur1, ur2, ur3, sr1, sr2, sr3, pkr12, pkr13, pkr23, ukr12, ukr13, ukr23, 0, 0);
|
|
4454
|
-
|
|
4455
|
-
|
|
4552
|
+
if (powerTransformer.getUUID() === '120a9c2c93ff4a81b494ff63d356c266') {
|
|
4553
|
+
let stop = true;
|
|
4554
|
+
}
|
|
4456
4555
|
const powerTransformerEnd1 = new PowerTransformerEnd_1.PowerTransformerEnd((0, parser_utils_1.getUUID)(i7Data.guid_w1, this.objectMappingConfig.standardiseUuid), `W1-${powerTransformer === null || powerTransformer === void 0 ? void 0 : powerTransformer.name}`);
|
|
4457
4556
|
powerTransformerEnd1.endNumber = 1;
|
|
4458
4557
|
// Topologie
|
|
@@ -4491,11 +4590,9 @@ class ConverterIntegral7 {
|
|
|
4491
4590
|
powerTransformerEnd1.x = impedanzW1.x;
|
|
4492
4591
|
powerTransformerEnd1.g = impedanzW1.g;
|
|
4493
4592
|
powerTransformerEnd1.b = impedanzW1.b;
|
|
4494
|
-
powerTransformerEnd1.x0 = zeroSequImpedanzWx.x01;
|
|
4495
|
-
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4496
4593
|
powerTransformerEnd1.ratedU = ur1;
|
|
4497
4594
|
powerTransformerEnd1.ratedS = sr1;
|
|
4498
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7,
|
|
4595
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7, sdauer1, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4499
4596
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4500
4597
|
let equivalentInjection = undefined;
|
|
4501
4598
|
if (terminal1) {
|
|
@@ -4505,6 +4602,9 @@ class ConverterIntegral7 {
|
|
|
4505
4602
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
4506
4603
|
}
|
|
4507
4604
|
}
|
|
4605
|
+
if (powerTransformer.mrid === "49afe40b-89cc-419f-afc5-f330c6589f82") {
|
|
4606
|
+
const stop = true;
|
|
4607
|
+
}
|
|
4508
4608
|
//set transformer end winding connection
|
|
4509
4609
|
powerTransformerEnd1.connectionKind = (0, utils_2.getSchaltgruppe)(schaltgruppe, powerTransformerEnd1.endNumber, powerTransformerEnd1.grounded);
|
|
4510
4610
|
powerTransformerEnd1.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
@@ -4540,12 +4640,10 @@ class ConverterIntegral7 {
|
|
|
4540
4640
|
powerTransformerEnd2.x = impedanzW2.x;
|
|
4541
4641
|
powerTransformerEnd2.g = impedanzW2.g;
|
|
4542
4642
|
powerTransformerEnd2.b = impedanzW2.b;
|
|
4543
|
-
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4544
|
-
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4545
4643
|
powerTransformerEnd2.ratedS = sr2;
|
|
4546
4644
|
powerTransformerEnd2.ratedU = ur2;
|
|
4547
4645
|
powerTransformerEnd2.powerTransformer = powerTransformer;
|
|
4548
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7,
|
|
4646
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7, sdauer2, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4549
4647
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4550
4648
|
equivalentInjection = undefined;
|
|
4551
4649
|
if (terminal2) {
|
|
@@ -4590,12 +4688,10 @@ class ConverterIntegral7 {
|
|
|
4590
4688
|
powerTransformerEnd3.x = impedanzW3.x;
|
|
4591
4689
|
powerTransformerEnd3.g = impedanzW3.g;
|
|
4592
4690
|
powerTransformerEnd3.b = impedanzW3.b;
|
|
4593
|
-
powerTransformerEnd3.x0 = zeroSequImpedanzWx.x03;
|
|
4594
|
-
powerTransformerEnd3.r0 = zeroSequImpedanzWx.r03;
|
|
4595
4691
|
powerTransformerEnd3.ratedS = sr3;
|
|
4596
4692
|
powerTransformerEnd3.ratedU = ur3;
|
|
4597
4693
|
powerTransformerEnd3.powerTransformer = powerTransformer;
|
|
4598
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7,
|
|
4694
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7, sdauer3, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4599
4695
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4600
4696
|
equivalentInjection = undefined;
|
|
4601
4697
|
if (terminal3) {
|
|
@@ -4608,6 +4704,19 @@ class ConverterIntegral7 {
|
|
|
4608
4704
|
//set transformer end winding connection
|
|
4609
4705
|
powerTransformerEnd3.connectionKind = (0, utils_2.getSchaltgruppe)(schaltgruppe, powerTransformerEnd3.endNumber, powerTransformerEnd3.grounded);
|
|
4610
4706
|
powerTransformerEnd3.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd3.endNumber);
|
|
4707
|
+
// NullSystem Impedanzen (nur Reaktanzen)
|
|
4708
|
+
let groundingCount = (0, utils_2.getGroundingCountFromWindingConnection)(powerTransformer);
|
|
4709
|
+
const retVal = (0, utils_2.calculateComplexZeroSequImpedanzenTrafo)([r0kr1, x0kr1, r0kr2, x0kr2], [r00r1, x00r1, r00r2, x00r2], [ur1, ur2, ur3], groundingCount, powerTransformer);
|
|
4710
|
+
if (retVal[1] == false) { //return value is false, thus there was an error in computation
|
|
4711
|
+
this.logger.warn(`PowerTransformer3W ${i7Data.id} ${powerTransformer.mrid} hat unterbestimmte Definitionen in den Nullsystemdaten.`);
|
|
4712
|
+
}
|
|
4713
|
+
const zeroSequImpedanzWx = retVal[0];
|
|
4714
|
+
powerTransformerEnd1.x0 = zeroSequImpedanzWx.x01;
|
|
4715
|
+
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4716
|
+
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4717
|
+
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4718
|
+
powerTransformerEnd3.x0 = zeroSequImpedanzWx.x03;
|
|
4719
|
+
powerTransformerEnd3.r0 = zeroSequImpedanzWx.r03;
|
|
4611
4720
|
// Transormator Anschlusspunkte nach Spannungsebene sortieren
|
|
4612
4721
|
this.sortTransformerEnd(powerTransformer, 'ratedU', 'desc');
|
|
4613
4722
|
//TODO
|
|
@@ -4748,60 +4857,6 @@ class ConverterIntegral7 {
|
|
|
4748
4857
|
equipment.equipmentContainer = undefined;
|
|
4749
4858
|
cimModel.removeObject(equipment);
|
|
4750
4859
|
}
|
|
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
4860
|
/** Geokoordinaten */
|
|
4806
4861
|
const location = substation.location;
|
|
4807
4862
|
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
@@ -4821,8 +4876,7 @@ class ConverterIntegral7 {
|
|
|
4821
4876
|
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
4877
|
junction.terminals.set(terminal.getUUID(), terminal);
|
|
4823
4878
|
terminal.conductingEquipment = junction;
|
|
4824
|
-
|
|
4825
|
-
// terminal.connectivityNode = connectivityNode;
|
|
4879
|
+
terminal.connectivityNode = connectivityNode;
|
|
4826
4880
|
line.addEquipment(junction);
|
|
4827
4881
|
/** Die Geokoordinaten der UA wird auf die Junction des ConnectivityNodes übertragen */
|
|
4828
4882
|
if (location && location.positionPoints.length) {
|
|
@@ -4899,11 +4953,12 @@ class ConverterIntegral7 {
|
|
|
4899
4953
|
data.laenge = 1;
|
|
4900
4954
|
}
|
|
4901
4955
|
// 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
|
|
4956
|
+
if ((0, parser_utils_1.isNumericI7)(data.laenge) && data.laenge > 0 && !data.flag_impedanzlos) {
|
|
4903
4957
|
acLineSegment.length = data.laenge;
|
|
4904
|
-
}
|
|
4905
|
-
|
|
4906
|
-
|
|
4958
|
+
}
|
|
4959
|
+
else {
|
|
4960
|
+
acLineSegment.length = 1;
|
|
4961
|
+
}
|
|
4907
4962
|
const assetType = defaultModel.getWireInfoByName(data.nametyp);
|
|
4908
4963
|
// r0
|
|
4909
4964
|
if ((0, parser_utils_1.isNumericI7)(data.r0) && data.r0 > 0 && !data.flag_impedanzlos) {
|
|
@@ -4977,54 +5032,72 @@ class ConverterIntegral7 {
|
|
|
4977
5032
|
}
|
|
4978
5033
|
// ir
|
|
4979
5034
|
for (const terminal of acLineSegment.terminals.values()) {
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
4985
|
-
}
|
|
5035
|
+
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);
|
|
5036
|
+
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);
|
|
5037
|
+
const equipmentKey = acLineSegment.getUUID();
|
|
5038
|
+
this.setConductingEquipmentOperationalLimit(cimModel, acLineSegment.name, terminal, equipmentKey, ir, cim_class_names_1.ClassNames.CurrentLimit, igrenz);
|
|
4986
5039
|
//PSRType
|
|
4987
|
-
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, data.typ);
|
|
5040
|
+
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, data.typ, this.configUuid);
|
|
4988
5041
|
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
4989
|
-
// psrType.addPowerSystemResource(acLineSegment);
|
|
4990
5042
|
}
|
|
4991
5043
|
}
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
const
|
|
5001
|
-
|
|
5002
|
-
currentLimit.operationalLimitType = operationalLimitType;
|
|
5044
|
+
/**
|
|
5045
|
+
* @param equipmentKey Generierung einer persistenter UUID v5. Für PowerTransformer wird UUID des PowerTransformerEnds verwendet. Andernfalls die UUID des ConductingEquipments
|
|
5046
|
+
* */
|
|
5047
|
+
setConductingEquipmentOperationalLimit(cimModel, name, terminal, equipmentKey, limit, limitType, igrenz) {
|
|
5048
|
+
if ((limit !== undefined && limit > 0) && (igrenz !== undefined && igrenz > 0))
|
|
5049
|
+
return;
|
|
5050
|
+
/** OperationalLimitSet erstellen */
|
|
5051
|
+
const operationalLimitSetKey = terminal.getUUID() + equipmentKey;
|
|
5052
|
+
const operationalLimitSetUUID = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.OperationalLimitSet, this.configUuid, operationalLimitSetKey);
|
|
5053
|
+
const operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(operationalLimitSetUUID, `${name}`);
|
|
5003
5054
|
operationalLimitSet.terminal = terminal;
|
|
5004
|
-
}
|
|
5005
|
-
setVoltageLimit(cimModel, name, terminal, voltage, type, direction) {
|
|
5006
|
-
const voltageLimit = new VoltageLimit_1.VoltageLimit(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5007
|
-
cimModel.addVoltageLimit(voltageLimit);
|
|
5008
|
-
voltageLimit.value = voltage;
|
|
5009
|
-
const operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5010
5055
|
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5056
|
+
switch (limitType) {
|
|
5057
|
+
case cim_class_names_1.ClassNames.CurrentLimit: {
|
|
5058
|
+
if (limit !== undefined && limit > 0) {
|
|
5059
|
+
const operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5060
|
+
const currentLimitPatlKey = operationalLimitTypePatl.getUUID() + operationalLimitSet.getUUID();
|
|
5061
|
+
const currentLimitPatlUuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.CurrentLimit, this.configUuid, currentLimitPatlKey);
|
|
5062
|
+
const currentLimitPatl = new CurrentLimit_1.CurrentLimit(currentLimitPatlUuid, `${name}`);
|
|
5063
|
+
currentLimitPatl.value = new CurrentFlow_1.CurrentFlow(limit, UnitMultiplier_1.UnitMultiplier.none, UnitSymbol_1.UnitSymbol.A);
|
|
5064
|
+
util_cim_model_1.UtilCimModel.associateOperationalLimitWithSetType(currentLimitPatl, operationalLimitSet, operationalLimitTypePatl);
|
|
5065
|
+
cimModel.addCurrentLimit(currentLimitPatl);
|
|
5066
|
+
}
|
|
5067
|
+
if (igrenz !== undefined && igrenz > 0) {
|
|
5068
|
+
const operationalLimitTypeTatl = this.createIfNotExistOperationalLimitType(cimModel, 'tatl', LimitTypeKind_1.LimitTypeKind.tatl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5069
|
+
const currentLimitTatlKey = operationalLimitTypeTatl.getUUID() + operationalLimitSet.getUUID();
|
|
5070
|
+
const currentLimitTatlUuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.CurrentLimit, this.configUuid, currentLimitTatlKey);
|
|
5071
|
+
const currentLimitTatl = new CurrentLimit_1.CurrentLimit(currentLimitTatlUuid, `${name}`);
|
|
5072
|
+
currentLimitTatl.value = new CurrentFlow_1.CurrentFlow(igrenz, UnitMultiplier_1.UnitMultiplier.none, UnitSymbol_1.UnitSymbol.A);
|
|
5073
|
+
util_cim_model_1.UtilCimModel.associateOperationalLimitWithSetType(currentLimitTatl, operationalLimitSet, operationalLimitTypeTatl);
|
|
5074
|
+
cimModel.addCurrentLimit(currentLimitTatl);
|
|
5075
|
+
}
|
|
5076
|
+
break;
|
|
5077
|
+
}
|
|
5078
|
+
case cim_class_names_1.ClassNames.ApparentPowerLimit: {
|
|
5079
|
+
if (limit !== undefined && limit > 0) {
|
|
5080
|
+
const operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5081
|
+
const apparentLimitPatlKey = operationalLimitTypePatl.getUUID() + operationalLimitSet.getUUID();
|
|
5082
|
+
const apparentLimitPatlUuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.ApparentPowerLimit, this.configUuid, apparentLimitPatlKey);
|
|
5083
|
+
const apparentLimitPatl = new ApparentPowerLimit_1.ApparentPowerLimit(apparentLimitPatlUuid, `${name}`);
|
|
5084
|
+
apparentLimitPatl.value = new ApparentPower_1.ApparentPower(limit, UnitMultiplier_1.UnitMultiplier.M, UnitSymbol_1.UnitSymbol.VA);
|
|
5085
|
+
util_cim_model_1.UtilCimModel.associateOperationalLimitWithSetType(apparentLimitPatl, operationalLimitSet, operationalLimitTypePatl);
|
|
5086
|
+
cimModel.addApparentPowerLimit(apparentLimitPatl);
|
|
5087
|
+
}
|
|
5088
|
+
break;
|
|
5089
|
+
}
|
|
5090
|
+
default: {
|
|
5091
|
+
console.log(`setConductingEquipmentOperationalLimit: unknown limit type ${limitType}`);
|
|
5092
|
+
}
|
|
5022
5093
|
}
|
|
5023
5094
|
}
|
|
5024
5095
|
createIfNotExistOperationalLimitType(cimModel, name, type, direction) {
|
|
5025
5096
|
let operationalLimitType = cimModel.getOperationalLimitTypeByName(name);
|
|
5026
5097
|
if (!operationalLimitType) {
|
|
5027
|
-
|
|
5098
|
+
const key = type + direction;
|
|
5099
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.OperationalLimitType, this.configUuid, key);
|
|
5100
|
+
operationalLimitType = new OperationalLimitType_1.OperationalLimitType(uuid, name);
|
|
5028
5101
|
operationalLimitType.direction = direction;
|
|
5029
5102
|
operationalLimitType.limitType = type;
|
|
5030
5103
|
cimModel.addOperationalLimitType(operationalLimitType);
|
|
@@ -5036,7 +5109,9 @@ class ConverterIntegral7 {
|
|
|
5036
5109
|
let terminal;
|
|
5037
5110
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
5038
5111
|
const cn = object;
|
|
5039
|
-
|
|
5112
|
+
const key = cn.getUUID() + (conductingEquipment === null || conductingEquipment === void 0 ? void 0 : conductingEquipment.getUUID());
|
|
5113
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Terminal, this.configUuid, key);
|
|
5114
|
+
terminal = new Terminal_1.Terminal(uuid, (0, util_create_1.createNotation)([conductingEquipment.getUUID().substring(0, 8), '_T']));
|
|
5040
5115
|
isNameSet = true;
|
|
5041
5116
|
terminal.setConnectivityNode(cn);
|
|
5042
5117
|
//terminal.setConnectivityNodeUUID(cn.getUUID());
|
|
@@ -5050,7 +5125,10 @@ class ConverterIntegral7 {
|
|
|
5050
5125
|
terminal.phases = phase;
|
|
5051
5126
|
terminal.conductingEquipment = conductingEquipment;
|
|
5052
5127
|
conductingEquipment.addTerminal(terminal);
|
|
5053
|
-
terminal.connected = connected;
|
|
5128
|
+
terminal.connected = (terminal.connected !== undefined) ? terminal.connected : connected;
|
|
5129
|
+
if (terminal.connected === false) {
|
|
5130
|
+
const stop = true;
|
|
5131
|
+
}
|
|
5054
5132
|
if (!isNameSet) {
|
|
5055
5133
|
terminal.name = (0, util_create_1.createNotation)([conductingEquipment.getUUID().substring(0, 8), '_' + terminal.name], 32, true);
|
|
5056
5134
|
}
|
|
@@ -5060,7 +5138,7 @@ class ConverterIntegral7 {
|
|
|
5060
5138
|
createBoundaryConnection(frame, conductingEquipment, i7ObjectID, phase) {
|
|
5061
5139
|
const cimModel = frame.cimModel;
|
|
5062
5140
|
const anschlussUUID = this.integralID2UUID.get(i7ObjectID);
|
|
5063
|
-
let terminal;
|
|
5141
|
+
let terminal = undefined;
|
|
5064
5142
|
let cn = undefined;
|
|
5065
5143
|
if (cimModel.objects.has(anschlussUUID)) {
|
|
5066
5144
|
// Anschluss befindet sich im selben Modell
|
|
@@ -5085,7 +5163,9 @@ class ConverterIntegral7 {
|
|
|
5085
5163
|
const object = cimModelBD.getObject(anschlussUUID);
|
|
5086
5164
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
5087
5165
|
cn = object;
|
|
5088
|
-
|
|
5166
|
+
const key = cn.getUUID() + (conductingEquipment === null || conductingEquipment === void 0 ? void 0 : conductingEquipment.getUUID());
|
|
5167
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Terminal, this.configUuid, key);
|
|
5168
|
+
terminal = new Terminal_1.Terminal(uuid, (0, util_create_1.createNotation)([conductingEquipment.getUUID().substring(0, 8), '_', cn.getUUID().substring(0, 8), '_BD_T']));
|
|
5089
5169
|
/** wchtig uuid zu setzen, da sonst ein memory leak entsteht */
|
|
5090
5170
|
terminal.connectivityNodeUUID = cn.mrid;
|
|
5091
5171
|
terminal.phases = phase;
|
|
@@ -5114,7 +5194,7 @@ class ConverterIntegral7 {
|
|
|
5114
5194
|
this.annotateBoundaryNode(frame.name, frame.isoCode, frame.tsoName, cn);
|
|
5115
5195
|
}
|
|
5116
5196
|
else {
|
|
5117
|
-
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein
|
|
5197
|
+
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
5198
|
}
|
|
5119
5199
|
if (terminal) {
|
|
5120
5200
|
terminal.conductingEquipment = conductingEquipment;
|
|
@@ -5122,7 +5202,7 @@ class ConverterIntegral7 {
|
|
|
5122
5202
|
}
|
|
5123
5203
|
}
|
|
5124
5204
|
else {
|
|
5125
|
-
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein
|
|
5205
|
+
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
5206
|
}
|
|
5127
5207
|
}
|
|
5128
5208
|
return terminal;
|
|
@@ -5139,7 +5219,7 @@ class ConverterIntegral7 {
|
|
|
5139
5219
|
createBoundaryEquivalentInjection(frame, cn) {
|
|
5140
5220
|
let equivalentInjection = undefined;
|
|
5141
5221
|
//Test if frame is boundary.
|
|
5142
|
-
if (
|
|
5222
|
+
if (false /*!frame.boundary*/) {
|
|
5143
5223
|
//Test if boundary Injection for this mas already exists
|
|
5144
5224
|
let equivinj_exists = false;
|
|
5145
5225
|
frame.cimModel.equivalentInjections.forEach((equivinj, uuid) => {
|
|
@@ -5149,14 +5229,18 @@ class ConverterIntegral7 {
|
|
|
5149
5229
|
}
|
|
5150
5230
|
});
|
|
5151
5231
|
if (!equivinj_exists) {
|
|
5232
|
+
const keyEquivalentInjection = frame.tsoName + cn.getUUID();
|
|
5233
|
+
const uuidEquivalentInjection = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.EquivalentInjection, this.configUuid, keyEquivalentInjection);
|
|
5234
|
+
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(uuidEquivalentInjection, (0, util_create_1.createNotation)([frame.tsoName, '_BD-EI', '_' + cn.mrid.substring(0, 8)], 32, true));
|
|
5152
5235
|
//create terminal
|
|
5153
|
-
|
|
5236
|
+
const key = cn.getUUID() + equivalentInjection.getUUID();
|
|
5237
|
+
const uuid = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.Terminal, this.configUuid, key);
|
|
5238
|
+
let tmp_terminal = new Terminal_1.Terminal(uuid);
|
|
5154
5239
|
tmp_terminal.setConnectivityNodeUUID(cn.mrid);
|
|
5155
5240
|
tmp_terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
5156
5241
|
tmp_terminal.connected = true;
|
|
5157
5242
|
tmp_terminal.sequenceNumber = 1;
|
|
5158
5243
|
//create equivalent injection as boundary injection
|
|
5159
|
-
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([frame.tsoName, '_BD-EI', '_' + cn.mrid.substring(0, 8)], 32, true));
|
|
5160
5244
|
equivalentInjection.p = 0;
|
|
5161
5245
|
equivalentInjection.q = 0;
|
|
5162
5246
|
equivalentInjection.regulationStatus = false;
|
|
@@ -5221,6 +5305,7 @@ class ConverterIntegral7 {
|
|
|
5221
5305
|
getSpannungsbandTrafo(i7Data, powerTransformerEnds) {
|
|
5222
5306
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5223
5307
|
return new Promise((resolve) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5308
|
+
var _a, _b, _c;
|
|
5224
5309
|
let minMaxSollResult;
|
|
5225
5310
|
// Spannungsgeregelter Anschluss
|
|
5226
5311
|
/**
|
|
@@ -5229,9 +5314,18 @@ class ConverterIntegral7 {
|
|
|
5229
5314
|
* 2 - Niederspannungsseite (Anschluss 3)
|
|
5230
5315
|
* 3 - Externer Knoten
|
|
5231
5316
|
* */
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5317
|
+
if (powerTransformerEnds[0] && powerTransformerEnds[0].getTerminal() === undefined) {
|
|
5318
|
+
const stop = true;
|
|
5319
|
+
}
|
|
5320
|
+
if (powerTransformerEnds[1] && powerTransformerEnds[1].getTerminal() === undefined) {
|
|
5321
|
+
const stop = true;
|
|
5322
|
+
}
|
|
5323
|
+
if (powerTransformerEnds[2] && powerTransformerEnds[2].getTerminal() === undefined) {
|
|
5324
|
+
const stop = true;
|
|
5325
|
+
}
|
|
5326
|
+
let tempKnotenId = i7Data.spgreg_anschluss === 0 ? this.UUID2Integral7ID.get((_a = powerTransformerEnds[0].getTerminal()) === null || _a === void 0 ? void 0 : _a.getConnectivityNodeUUID())[0] : undefined;
|
|
5327
|
+
tempKnotenId = i7Data.spgreg_anschluss === 1 ? this.UUID2Integral7ID.get((_b = powerTransformerEnds[1].getTerminal()) === null || _b === void 0 ? void 0 : _b.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5328
|
+
tempKnotenId = i7Data.spgreg_anschluss === 2 ? this.UUID2Integral7ID.get((_c = powerTransformerEnds[2].getTerminal()) === null || _c === void 0 ? void 0 : _c.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5235
5329
|
tempKnotenId = i7Data.spgreg_anschluss === 3 ? (i7Data.spgreg_knoten !== undefined ? i7Data.spgreg_knoten : undefined) : tempKnotenId;
|
|
5236
5330
|
if (i7Data.spgreg_anschluss >= 0 && i7Data.spgreg_anschluss <= 2 && tempKnotenId !== undefined) { // Lokale Regelung
|
|
5237
5331
|
// Falls tempKnotenId ausgeprägt ist, bestimme in welcher Tabelle der aKnoten bzw. eKnoten enthalten ist.
|
|
@@ -5528,9 +5622,9 @@ class ConverterIntegral7 {
|
|
|
5528
5622
|
}
|
|
5529
5623
|
addDefaultObjectsRegion(cimModel, defaultValuesConfig) {
|
|
5530
5624
|
/** GeographicalRegion */
|
|
5531
|
-
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
5625
|
+
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name, this.configUuid);
|
|
5532
5626
|
region.description = defaultValuesConfig.GeographicalRegion.description;
|
|
5533
|
-
const subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region);
|
|
5627
|
+
const subregion = (0, utils_1.createIfNotExitsSubGeoregionByName)(cimModel, defaultValuesConfig.SubGeographicalRegion.name, region, this.configUuid);
|
|
5534
5628
|
subregion.shortName = defaultValuesConfig.SubGeographicalRegion.shortName;
|
|
5535
5629
|
subregion.description = defaultValuesConfig.SubGeographicalRegion.description;
|
|
5536
5630
|
}
|
|
@@ -5551,14 +5645,13 @@ class ConverterIntegral7 {
|
|
|
5551
5645
|
coordinateSystem.crsUrn = crsUrn;
|
|
5552
5646
|
cimModel.addCoordinateSystem(coordinateSystem);
|
|
5553
5647
|
}
|
|
5554
|
-
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7,
|
|
5648
|
+
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7, sdauer, i7Data, defaultValuesConfig, windings) {
|
|
5555
5649
|
var _a, _b;
|
|
5556
5650
|
const cimModel = frame.cimModel;
|
|
5557
5651
|
if (terminal) {
|
|
5558
5652
|
// Topologie
|
|
5559
5653
|
powerTransformerEnd.terminal = terminal;
|
|
5560
|
-
|
|
5561
|
-
this.setConductingEquipmentCurrentLimit(cimModel, `W${powerTransformerEnd.endNumber}` + (powerTransformer === null || powerTransformer === void 0 ? void 0 : powerTransformer.name), terminal, ir);
|
|
5654
|
+
this.setConductingEquipmentOperationalLimit(cimModel, `W${powerTransformerEnd.endNumber}${powerTransformer === null || powerTransformer === void 0 ? void 0 : powerTransformer.name}`, terminal, powerTransformer.getUUID(), sdauer, cim_class_names_1.ClassNames.ApparentPowerLimit);
|
|
5562
5655
|
let isTrafo2w = i7Data.trafowicklung3w3 === undefined ? true : false;
|
|
5563
5656
|
// Erdung / Sternpunkt
|
|
5564
5657
|
if (sternpunktKnotenMap.has(i7Data.id) && isTrafo2w) {
|
|
@@ -5602,7 +5695,7 @@ class ConverterIntegral7 {
|
|
|
5602
5695
|
powerTransformerEnd.baseVoltage = powerTransformerEnd.terminal.connectivityNode.getBaseVoltage();
|
|
5603
5696
|
}
|
|
5604
5697
|
else if (powerTransformerEnd.ratedU) {
|
|
5605
|
-
powerTransformerEnd.baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, powerTransformerEnd.ratedU, this.exportFramesBoundary);
|
|
5698
|
+
powerTransformerEnd.baseVoltage = (0, util_create_1.createBaseVoltageIfNotExists)(cimModel, powerTransformerEnd.ratedU, this.configUuid, this.exportFramesBoundary);
|
|
5606
5699
|
}
|
|
5607
5700
|
else {
|
|
5608
5701
|
this.logger.debug(`Wicklung ${powerTransformerEnd.mrid} Nr. ${powerTransformerEnd.endNumber} keine Spannungsangabe.`);
|
|
@@ -5612,25 +5705,25 @@ class ConverterIntegral7 {
|
|
|
5612
5705
|
}
|
|
5613
5706
|
convertTapChangers(i7Data, transformerEnds, cimModel, transformerinfo, connectivityNode, spannungsband) {
|
|
5614
5707
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5615
|
-
/*if(getUUID(i7Data.guid
|
|
5708
|
+
/*if(getUUID(i7Data.guid) === '11e7be86-8bb7-41ba-898a-74cd5e8efbb9'){ //Zeile50
|
|
5616
5709
|
let stop = true; DONE
|
|
5617
5710
|
}
|
|
5618
|
-
if(getUUID(i7Data.guid
|
|
5711
|
+
if(getUUID(i7Data.guid) === '1239F03C-ED5B-4FDF-9453-D97E611FCC36'){ //Zeile52 - Datenfehler: Transformatoren mit definierter Zusatzspannung und Stufungsbereich, jedoch 'Stufensteller nicht vorhanden'
|
|
5619
5712
|
let stop = true; DONE
|
|
5620
5713
|
}*/
|
|
5621
|
-
/*if(getUUID(i7Data.guid
|
|
5714
|
+
/*if(getUUID(i7Data.guid)=== 'CFDAA56A-A0DA-4C5B-92CC-21138B6D6D07'){ //Standard LR
|
|
5622
5715
|
let stop = true;
|
|
5623
5716
|
}*/
|
|
5624
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid
|
|
5717
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '00ebe00e-50fa-4fc0-9ed6-557528a9b460') { //Zeile53 - Typ Meeden'
|
|
5625
5718
|
let stop = true;
|
|
5626
5719
|
}
|
|
5627
|
-
/*if(getUUID(i7Data.guid
|
|
5720
|
+
/*if(getUUID(i7Data.guid) === '012416f2d9584971baa93360fcf40be2'){ //Zeile55 - SR statt LR'
|
|
5628
5721
|
let stop = true;
|
|
5629
5722
|
}*/
|
|
5630
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid
|
|
5723
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '515508dc-5982-4686-ad26-08d39db91421') { //Zeile81 - SR statt LR'
|
|
5631
5724
|
let stop = true;
|
|
5632
5725
|
}
|
|
5633
|
-
/*if(getUUID(i7Data.guid
|
|
5726
|
+
/*if(getUUID(i7Data.guid) === '5ec82d14-ee64-43b6-86ff-c7615d96f7ad'){ //Zeile58
|
|
5634
5727
|
let stop = true;
|
|
5635
5728
|
}*/
|
|
5636
5729
|
let ratioPhaseTapChangerPresent = false;
|
|
@@ -5708,21 +5801,23 @@ class ConverterIntegral7 {
|
|
|
5708
5801
|
const spezialRegelung = (0, parser_utils_1.isNumericI7)(i7Data.trafo_spezial) ? i7Data.trafo_spezial : transformerinfo === null || transformerinfo === void 0 ? void 0 : transformerinfo.spezialRegelung;
|
|
5709
5802
|
//const neutralU = transformerEnd.ratedU;
|
|
5710
5803
|
let tapChanger = undefined;
|
|
5711
|
-
|
|
5712
|
-
|
|
5804
|
+
let invert = undefined;
|
|
5805
|
+
if ((0, parser_utils_1.isNumericI7)(angle) && (0, parser_utils_1.convertToNumberI7)(angle) % 180 !== 0 || spezialRegelung === 1 || spezialRegelung === 2) {
|
|
5806
|
+
//angle is given and angle%180===0 or angle is not given but spezialRegelung, thus => PhaseTapChanger ("Querregler" oder "Schrägregler")
|
|
5713
5807
|
tapChanger = this.createPhaseTapChanger(i7Data, transformerEnds, cimModel, gestufteSeite, entryI7, transformerinfo);
|
|
5714
5808
|
}
|
|
5715
5809
|
else {
|
|
5716
|
-
//
|
|
5810
|
+
//invert sign if tapChanger angle%180===0 && angle%360!==0
|
|
5811
|
+
invert = Math.trunc((0, parser_utils_1.convertToNumberI7)(angle) / 180) % 2 === 0 ? 1 : -1;
|
|
5717
5812
|
tapChanger = this.createRatioTapChanger(i7Data, transformerEnds, cimModel, connectivityNode, gestufteSeite, entryI7, spannungsband, transformerinfo);
|
|
5718
5813
|
}
|
|
5719
5814
|
// Stufen
|
|
5720
|
-
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent, tapChangerInfo);
|
|
5815
|
+
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent, invert, tapChangerInfo);
|
|
5721
5816
|
let stop = true;
|
|
5722
5817
|
}
|
|
5723
5818
|
let stop = true;
|
|
5724
5819
|
}
|
|
5725
|
-
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent, tapChangerInfo) {
|
|
5820
|
+
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent, invert, tapChangerInfo) {
|
|
5726
5821
|
var _a;
|
|
5727
5822
|
let lowStep = (0, parser_utils_1.isNumericI7)(i7Data[`minstufe_s${tapChangerNumber}`])
|
|
5728
5823
|
? i7Data[`minstufe_s${tapChangerNumber}`]
|
|
@@ -5744,43 +5839,68 @@ class ConverterIntegral7 {
|
|
|
5744
5839
|
const neutralStepIndex = i7TapArray.indexOf(neutralStep);*/
|
|
5745
5840
|
const lowerVoltageStepCount = (0, utils_2.getTapChangerStepCount)(lowStep, neutralStep);
|
|
5746
5841
|
const upperVoltageStepCount = (0, utils_2.getTapChangerStepCount)(neutralStep, highStep);
|
|
5747
|
-
|
|
5842
|
+
let uMin = (0, parser_utils_1.isNumericI7)(i7Data[`umin_s${tapChangerNumber}`])
|
|
5748
5843
|
? i7Data[`umin_s${tapChangerNumber}`]
|
|
5749
5844
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMin;
|
|
5750
|
-
|
|
5845
|
+
let uMax = (0, parser_utils_1.isNumericI7)(i7Data[`umax_s${tapChangerNumber}`])
|
|
5751
5846
|
? i7Data[`umax_s${tapChangerNumber}`]
|
|
5752
5847
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMax;
|
|
5753
|
-
let
|
|
5848
|
+
let lowerVoltageStepDecrement = Math.abs(uMin / lowerVoltageStepCount);
|
|
5754
5849
|
let upperVoltageStepIncrement = Math.abs(uMax / upperVoltageStepCount);
|
|
5755
5850
|
let increaseVoltageStepIncrement = (0, parser_utils_1.isNumericI7)(upperVoltageStepIncrement) ? upperVoltageStepIncrement : 0;
|
|
5756
5851
|
if (tapChanger instanceof RatioTapChanger_1.RatioTapChanger) {
|
|
5757
5852
|
const ratioTapChanger = tapChanger;
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5853
|
+
uMin = uMin * invert;
|
|
5854
|
+
uMax = uMax * invert;
|
|
5855
|
+
//test for uMin and uMax voltage add are not symmetrical...
|
|
5856
|
+
if (Math.abs(lowerVoltageStepDecrement) !== Math.abs(upperVoltageStepIncrement) || uMax < uMin || uMax === uMin || ratioPhaseTapChangerPresent) {
|
|
5857
|
+
if (uMax === uMin) {
|
|
5858
|
+
const stop = true;
|
|
5859
|
+
}
|
|
5860
|
+
const keyTable = ratioTapChanger === null || ratioTapChanger === void 0 ? void 0 : ratioTapChanger.getUUID();
|
|
5861
|
+
const uuidTable = common_utils_1.CommonUtils.generateUUIDv5(cim_class_names_1.ClassNames.RatioTapChangerTable, this.configUuid, keyTable);
|
|
5862
|
+
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(uuidTable, `${i7Data.bezeichner} W_${tapChangerNumber}`);
|
|
5761
5863
|
let step_tmp = 0;
|
|
5762
5864
|
let start_step_tmp = step_tmp;
|
|
5763
|
-
//
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5865
|
+
//voltage decrement
|
|
5866
|
+
if (uMin < 0) {
|
|
5867
|
+
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5868
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((Math.abs(lowerVoltageStepDecrement) * Math.abs(lowerVoltageStepCount - i)) / 100)), this.configUuid);
|
|
5869
|
+
step_tmp = i;
|
|
5870
|
+
}
|
|
5871
|
+
}
|
|
5872
|
+
else {
|
|
5873
|
+
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5874
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((lowerVoltageStepDecrement * Math.abs(lowerVoltageStepCount - i)) / 100)), this.configUuid);
|
|
5875
|
+
step_tmp = i;
|
|
5876
|
+
}
|
|
5767
5877
|
}
|
|
5768
|
-
//
|
|
5878
|
+
//neutral step
|
|
5769
5879
|
step_tmp++;
|
|
5770
|
-
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[step_tmp], 1);
|
|
5880
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[step_tmp], 1, this.configUuid);
|
|
5771
5881
|
step_tmp++;
|
|
5772
5882
|
start_step_tmp = step_tmp;
|
|
5773
|
-
//
|
|
5774
|
-
|
|
5775
|
-
|
|
5883
|
+
//voltage increment
|
|
5884
|
+
if (uMax > 0) {
|
|
5885
|
+
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5886
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)), this.configUuid);
|
|
5887
|
+
}
|
|
5888
|
+
}
|
|
5889
|
+
else {
|
|
5890
|
+
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5891
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)), this.configUuid);
|
|
5892
|
+
}
|
|
5776
5893
|
}
|
|
5777
5894
|
tapChanger.ratioTapChangerTable = ratioTapChangerTable;
|
|
5778
5895
|
ratioTapChangerTable.ratioTapChanger = tapChanger;
|
|
5779
|
-
//
|
|
5780
|
-
ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(
|
|
5896
|
+
//average
|
|
5897
|
+
//ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(lowerVoltageStepDecrement)) + Math.abs(Math.round(increaseVoltageStepIncrement)) / 2;
|
|
5781
5898
|
cimModel.addRatioTapChangerTable(ratioTapChangerTable);
|
|
5782
5899
|
}
|
|
5783
|
-
|
|
5900
|
+
else {
|
|
5901
|
+
//uMin and uMax are symmetrical
|
|
5902
|
+
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
5903
|
+
}
|
|
5784
5904
|
}
|
|
5785
5905
|
if (tapChanger instanceof PhaseTapChangerNonLinear_1.PhaseTapChangerNonLinear) {
|
|
5786
5906
|
tapChanger.voltageStepIncrement = increaseVoltageStepIncrement;
|
|
@@ -5793,8 +5913,8 @@ class ConverterIntegral7 {
|
|
|
5793
5913
|
tapChanger.neutralStep = neutralStep;
|
|
5794
5914
|
tapChanger.normalStep = currentStep;
|
|
5795
5915
|
tapChanger.step = currentStep;
|
|
5796
|
-
if (Math.abs(
|
|
5797
|
-
this.logger.info(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${
|
|
5916
|
+
if (Math.abs(lowerVoltageStepDecrement) !== Math.abs(increaseVoltageStepIncrement)) {
|
|
5917
|
+
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
5918
|
}
|
|
5799
5919
|
}
|
|
5800
5920
|
createRatioTapChanger(i7Data, transformerEnds, cimModel, regulatingConnectivityNode, gestufteSeite, tapChangerNumber, spannungsband, transformerinfo) {
|
|
@@ -5811,6 +5931,9 @@ class ConverterIntegral7 {
|
|
|
5811
5931
|
* */
|
|
5812
5932
|
/** Regelung */
|
|
5813
5933
|
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`), this.objectMappingConfig.standardiseUuid), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
5934
|
+
if (ratioTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
5935
|
+
const stop = true;
|
|
5936
|
+
}
|
|
5814
5937
|
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
5938
|
ratioTapChanger.transformerEnd = transformerEnd;
|
|
5816
5939
|
//transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
@@ -5852,7 +5975,7 @@ class ConverterIntegral7 {
|
|
|
5852
5975
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
5853
5976
|
}
|
|
5854
5977
|
else {
|
|
5855
|
-
this.logger.
|
|
5978
|
+
this.logger.debug(`debug --- Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
5856
5979
|
}
|
|
5857
5980
|
cimModel.addRatioTapChanger(ratioTapChanger);
|
|
5858
5981
|
return ratioTapChanger;
|
|
@@ -5900,14 +6023,24 @@ class ConverterIntegral7 {
|
|
|
5900
6023
|
}
|
|
5901
6024
|
default: {
|
|
5902
6025
|
// There is no information given about special tapchanger control, thus create PhaseTapChangerLinear
|
|
5903
|
-
const phaseTapChangerLin = new
|
|
5904
|
-
|
|
5905
|
-
|
|
6026
|
+
/**const phaseTapChangerLin = new PhaseTapChangerLinear(getUUID(eval(`i7Data.guid_tch${tapChangerNumber}`)), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
6027
|
+
phaseTapChanger = phaseTapChangerLin;
|
|
6028
|
+
cimModel.addPhaseTapChangerLinear(phaseTapChangerLin);*/
|
|
6029
|
+
const phaseTapChangerAsym = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`)), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
6030
|
+
phaseTapChangerAsym.windingConnectionAngle = winkel;
|
|
6031
|
+
phaseTapChanger = phaseTapChangerAsym;
|
|
6032
|
+
cimModel.addPhaseTapChangerAsymmetrical(phaseTapChangerAsym);
|
|
5906
6033
|
break;
|
|
5907
6034
|
}
|
|
5908
6035
|
}
|
|
6036
|
+
if (phaseTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
6037
|
+
const stop = true;
|
|
6038
|
+
}
|
|
6039
|
+
if (phaseTapChanger.mrid === "3d0bdc23-fe46-408d-99b3-369a02d28a28") {
|
|
6040
|
+
const stop = true;
|
|
6041
|
+
}
|
|
5909
6042
|
// 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;
|
|
6043
|
+
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
6044
|
phaseTapChanger.transformerEnd = transformerEnd;
|
|
5912
6045
|
//transformerEnd.phaseTapChanger = phaseTapChanger;
|
|
5913
6046
|
// Wirkleistungsregelung Anschluss
|
|
@@ -5946,7 +6079,7 @@ class ConverterIntegral7 {
|
|
|
5946
6079
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
5947
6080
|
}
|
|
5948
6081
|
else {
|
|
5949
|
-
this.logger.
|
|
6082
|
+
this.logger.debug(`debug --- Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
5950
6083
|
}
|
|
5951
6084
|
return phaseTapChanger;
|
|
5952
6085
|
}
|
|
@@ -5972,7 +6105,7 @@ class ConverterIntegral7 {
|
|
|
5972
6105
|
// TODO
|
|
5973
6106
|
powerTransformerEnd.rground = defaultValuesConfig.TransformerEnd.rground;
|
|
5974
6107
|
if (!junctionUUID) {
|
|
5975
|
-
/** Fall 1 Wenn der Knoten
|
|
6108
|
+
/** Fall 1 Wenn der Knoten kein Schaltelement hat, dann direkte Erdung */
|
|
5976
6109
|
//TODO
|
|
5977
6110
|
// rground und xground aus der default-config verwenden?
|
|
5978
6111
|
powerTransformerEnd.xground = defaultValuesConfig.TransformerEnd.xground;
|
|
@@ -6268,32 +6401,98 @@ function getGeoCoordinates(i7Data) {
|
|
|
6268
6401
|
return undefined;
|
|
6269
6402
|
}
|
|
6270
6403
|
exports.getGeoCoordinates = getGeoCoordinates;
|
|
6271
|
-
function getDCNodeFromConverter(acDcConverter) {
|
|
6404
|
+
function getDCNodeFromConverter(acDcConverter, polarity) {
|
|
6272
6405
|
let ret_val = undefined;
|
|
6273
6406
|
if (acDcConverter.dCTerminals) {
|
|
6274
6407
|
for (const terminal of acDcConverter.dCTerminals.values()) {
|
|
6275
|
-
if (terminal.dcNode) {
|
|
6408
|
+
if (terminal.dcNode && terminal.polarity === polarity) {
|
|
6276
6409
|
ret_val = terminal.dcNode;
|
|
6277
6410
|
}
|
|
6278
6411
|
}
|
|
6279
6412
|
}
|
|
6280
6413
|
return ret_val;
|
|
6281
6414
|
}
|
|
6282
|
-
function
|
|
6283
|
-
|
|
6284
|
-
|
|
6415
|
+
function createDCGround(cimModel, acDCConverter, i7Data) {
|
|
6416
|
+
const dcConverterUnit = acDCConverter.equipmentContainer;
|
|
6417
|
+
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));
|
|
6418
|
+
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']));
|
|
6419
|
+
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']));
|
|
6420
|
+
const dcNodeG = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1));
|
|
6421
|
+
dcTerminalG.dCConductingEquipment = dcGround;
|
|
6422
|
+
dcTerminalM1.dCConductingEquipment = acDCConverter;
|
|
6423
|
+
dcTerminalM1.polarity = DCPolarityKind_1.DCPolarityKind.middle;
|
|
6424
|
+
dcTerminalG.dcNode = dcNodeG;
|
|
6425
|
+
dcTerminalM1.dcNode = dcNodeG;
|
|
6426
|
+
dcGround.equipmentContainer = dcConverterUnit;
|
|
6427
|
+
dcGround.dCTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6428
|
+
dcNodeG.dcEquipmentContainer = dcConverterUnit;
|
|
6429
|
+
dcNodeG.dcTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6430
|
+
dcNodeG.dcTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6431
|
+
acDCConverter.dCTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6432
|
+
cimModel.addDCTerminal(dcTerminalG);
|
|
6433
|
+
cimModel.addDCGround(dcGround);
|
|
6434
|
+
cimModel.addDCGroundTerminal(dcTerminalM1);
|
|
6435
|
+
cimModel.addDCNode(dcNodeG);
|
|
6436
|
+
/** EQ-SC */
|
|
6437
|
+
dcGround.r = undefined;
|
|
6438
|
+
dcGround.inductance = undefined;
|
|
6439
|
+
return dcNodeG;
|
|
6285
6440
|
}
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6441
|
+
/**
|
|
6442
|
+
*
|
|
6443
|
+
* @param acDCConverter
|
|
6444
|
+
* @param i7Data
|
|
6445
|
+
* @param endNumber Start means a value of '1'. Target means a value of '2'.
|
|
6446
|
+
*/
|
|
6447
|
+
function connectDCGround(cimModel, acdcConverter, i7Data, dcNode, polarity) {
|
|
6448
|
+
let dcTerminalMx = undefined;
|
|
6449
|
+
let dcNodeG = dcNode;
|
|
6450
|
+
const dcTerminalM1UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1);
|
|
6451
|
+
const dcTerminalM2UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm2);
|
|
6452
|
+
if (dcNodeG.dcTerminals.get(dcTerminalM1UUID)) {
|
|
6453
|
+
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM2UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_NEG', '_DCT']));
|
|
6454
|
+
}
|
|
6455
|
+
else {
|
|
6456
|
+
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM1UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
6457
|
+
}
|
|
6458
|
+
dcTerminalMx.polarity = polarity;
|
|
6459
|
+
dcNodeG.dcTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6460
|
+
acdcConverter.dCTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6461
|
+
dcTerminalMx.dCConductingEquipment = acdcConverter;
|
|
6462
|
+
dcTerminalMx.dcNode = dcNodeG;
|
|
6463
|
+
cimModel.addDCGroundTerminal(dcTerminalMx);
|
|
6289
6464
|
}
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6465
|
+
function createNeutralGroundReturn(cimModel, i7Data, acdcConverterStart, acdcConverterTarget) {
|
|
6466
|
+
let dcNodeM1 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterStart.getUUID());
|
|
6467
|
+
let dcNodeM2 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterTarget.getUUID());
|
|
6468
|
+
let dcTerminalN1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineStart_DCT']));
|
|
6469
|
+
let dcTerminalN2 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineTarget_DCT']));
|
|
6470
|
+
//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');
|
|
6471
|
+
if (dcNodeM1 !== undefined) {
|
|
6472
|
+
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6473
|
+
acdcConverterStart.dCTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6474
|
+
}
|
|
6475
|
+
else {
|
|
6476
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1);
|
|
6477
|
+
dcNodeM1 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M1');
|
|
6478
|
+
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6479
|
+
dcTerminalN1.dCConductingEquipment = undefined;
|
|
6480
|
+
}
|
|
6481
|
+
if (dcNodeM2 !== undefined) {
|
|
6482
|
+
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6483
|
+
}
|
|
6484
|
+
else {
|
|
6485
|
+
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem2);
|
|
6486
|
+
dcNodeM2 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M2');
|
|
6487
|
+
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6488
|
+
}
|
|
6489
|
+
cimModel.addACDCConverterDCTerminal(dcTerminalN1);
|
|
6490
|
+
cimModel.addACDCConverterDCTerminal(dcTerminalN2);
|
|
6491
|
+
//cimModel.addDCLineSegment(dcNeutralLineSegment);
|
|
6492
|
+
//cimModel.addDCLine(dcNeutralLine);
|
|
6293
6493
|
}
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6494
|
+
function logExecutionTime(logger, startTime, text) {
|
|
6495
|
+
logger.debug(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6496
|
+
console.log(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6297
6497
|
}
|
|
6298
|
-
exports.connectDCGround = connectDCGround;
|
|
6299
6498
|
//# sourceMappingURL=converter.integral7.js.map
|