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