@enervance/insight-cim-model 0.0.12 → 0.0.14
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/config/westnetz-integral7/integral7-load.config.js.map +1 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js +6 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +19 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +10 -0
- package/dist/constants/cim-class-names.js +10 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js +10 -0
- package/dist/constants/init-data/ASSET_HEALTH_EVENTS.js.map +1 -1
- package/dist/constants/init-data/PSR_TYPES.js +17 -0
- package/dist/constants/init-data/PSR_TYPES.js.map +1 -1
- package/dist/converter/cgmes-validator.d.ts +5 -0
- package/dist/converter/cgmes-validator.js +23 -0
- package/dist/converter/cgmes-validator.js.map +1 -0
- package/dist/converter/integral7/ConverterIntegral7.d.ts +26 -19
- package/dist/converter/integral7/ConverterIntegral7.js +595 -272
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/model/integral/BaseClass.d.ts +1 -0
- package/dist/converter/integral7/model/integral/BaseClass.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +36 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +10 -0
- package/dist/converter/integral7/sql/integral.sql.js +25 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +3 -0
- package/dist/converter/integral7/utils.js +81 -17
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-csv.d.ts +37 -0
- package/dist/etl-neplan/etl-neplan-csv.js +243 -0
- package/dist/etl-neplan/etl-neplan-csv.js.map +1 -0
- package/dist/etl-neplan/etl-neplan-geo.d.ts +12 -0
- package/dist/etl-neplan/etl-neplan-geo.js +74 -0
- package/dist/etl-neplan/etl-neplan-geo.js.map +1 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +0 -20
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/default-values-config.d.ts +171 -0
- package/dist/interfaces/default-values-config.js +3 -0
- package/dist/interfaces/default-values-config.js.map +1 -0
- package/dist/interfaces/model/common/ILocation.d.ts +15 -0
- package/dist/interfaces/model/common/ILocation.js +3 -0
- package/dist/interfaces/model/common/ILocation.js.map +1 -0
- package/dist/interfaces/model/core/IIdentifiedObject.d.ts +3 -0
- package/dist/interfaces/model/wires/IACLineSegment.d.ts +10 -0
- package/dist/interfaces/model/wires/IConductor.d.ts +2 -1
- package/dist/model/assets/Asset.d.ts +12 -5
- package/dist/model/assets/Asset.js +86 -21
- package/dist/model/assets/Asset.js.map +1 -1
- package/dist/model/assets/LifecycleDate.d.ts +1 -0
- package/dist/model/assets/LifecycleDate.js +9 -1
- package/dist/model/assets/LifecycleDate.js.map +1 -1
- package/dist/model/common/CoordinateSystem.d.ts +3 -1
- package/dist/model/common/CoordinateSystem.js +13 -1
- package/dist/model/common/CoordinateSystem.js.map +1 -1
- package/dist/model/common/Location.d.ts +5 -3
- package/dist/model/common/Location.js +17 -11
- package/dist/model/common/Location.js.map +1 -1
- package/dist/model/common/PositionPoint.d.ts +9 -3
- package/dist/model/common/PositionPoint.js +23 -1
- package/dist/model/common/PositionPoint.js.map +1 -1
- package/dist/model/common/Status.d.ts +2 -1
- package/dist/model/common/Status.js +9 -1
- package/dist/model/common/Status.js.map +1 -1
- package/dist/model/core/ACDCTerminal.d.ts +2 -0
- package/dist/model/core/ACDCTerminal.js +9 -1
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/BaseVoltage.js.map +1 -1
- package/dist/model/core/Bay.js.map +1 -1
- package/dist/model/core/GeographicalRegion.js.map +1 -1
- package/dist/model/core/IdentifiedObject.d.ts +3 -1
- package/dist/model/core/IdentifiedObject.js +42 -21
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/SubGeographicalRegion.js.map +1 -1
- package/dist/model/core/Substation.d.ts +1 -0
- package/dist/model/core/Substation.js +3 -2
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +3 -1
- package/dist/model/core/Terminal.js +14 -14
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +4 -2
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +3 -0
- package/dist/model/dc/ACDCConverter.js +56 -14
- package/dist/model/dc/ACDCConverter.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js +2 -6
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.d.ts +2 -0
- package/dist/model/dc/CsConverter.js +45 -17
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCConverterUnit.d.ts +2 -0
- package/dist/model/dc/DCConverterUnit.js +13 -7
- package/dist/model/dc/DCConverterUnit.js.map +1 -1
- package/dist/model/dc/DCLine.js.map +1 -1
- package/dist/model/dc/DCLineSegment.js +4 -8
- package/dist/model/dc/DCLineSegment.js.map +1 -1
- package/dist/model/dc/VsConverter.d.ts +2 -0
- package/dist/model/dc/VsConverter.js +53 -5
- package/dist/model/dc/VsConverter.js.map +1 -1
- package/dist/model/equivalents/EquivalentBranch.d.ts +2 -0
- package/dist/model/equivalents/EquivalentBranch.js +63 -0
- package/dist/model/equivalents/EquivalentBranch.js.map +1 -1
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +0 -3
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -1
- package/dist/model/extensions/enervance/wires/EVACLineSegment.d.ts +16 -0
- package/{src/model/wires/PetersenCoil.ts → dist/model/extensions/enervance/wires/EVACLineSegment.js} +43 -47
- package/dist/model/extensions/enervance/wires/EVACLineSegment.js.map +1 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.d.ts +25 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js +126 -0
- package/dist/model/extensions/enervance/wires/EVACLineSubSegment.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js +4 -12
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.d.ts +18 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js +82 -0
- package/dist/model/extensions/neplan-westnetz/common/WNLocation.js.map +1 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.d.ts +5 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js +23 -0
- package/dist/model/extensions/neplan-westnetz/core/WNConnectivityNode.js.map +1 -1
- package/dist/model/generation/GeneratingUnit.d.ts +2 -0
- package/dist/model/generation/GeneratingUnit.js +23 -0
- package/dist/model/generation/GeneratingUnit.js.map +1 -1
- package/dist/model/generation/ThermalGeneratingUnit.js.map +1 -1
- package/dist/model/loadmodel/ConformLoad.d.ts +6 -1
- package/dist/model/loadmodel/ConformLoad.js +48 -3
- package/dist/model/loadmodel/ConformLoad.js.map +1 -1
- package/dist/model/loadmodel/ConformLoadGroup.d.ts +7 -0
- package/dist/model/loadmodel/ConformLoadGroup.js +48 -0
- package/dist/model/loadmodel/ConformLoadGroup.js.map +1 -0
- package/dist/model/loadmodel/EnergyArea.d.ts +3 -0
- package/dist/model/loadmodel/EnergyArea.js +8 -0
- package/dist/model/loadmodel/EnergyArea.js.map +1 -0
- package/dist/model/loadmodel/LoadArea.d.ts +10 -0
- package/dist/model/loadmodel/LoadArea.js +51 -0
- package/dist/model/loadmodel/LoadArea.js.map +1 -0
- package/dist/model/loadmodel/LoadGroup.d.ts +8 -0
- package/dist/model/loadmodel/LoadGroup.js +21 -0
- package/dist/model/loadmodel/LoadGroup.js.map +1 -0
- package/dist/model/loadmodel/SubLoadArea.d.ts +14 -0
- package/dist/model/loadmodel/SubLoadArea.js +63 -0
- package/dist/model/loadmodel/SubLoadArea.js.map +1 -0
- package/dist/model/model/Model.d.ts +40 -11
- package/dist/model/model/Model.js +100 -6
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/operationallimits/CurrentLimit.js.map +1 -1
- package/dist/model/operationallimits/OperationalLimitSet.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +6 -2
- package/dist/model/wires/ACLineSegment.js +51 -44
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +2 -1
- package/dist/model/wires/AsynchronousMachine.js +34 -34
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/BusbarSection.d.ts +2 -0
- package/dist/model/wires/BusbarSection.js +6 -0
- package/dist/model/wires/BusbarSection.js.map +1 -1
- package/dist/model/wires/Conductor.d.ts +4 -1
- package/dist/model/wires/Conductor.js +15 -6
- package/dist/model/wires/Conductor.js.map +1 -1
- package/dist/model/wires/EnergyConsumer.d.ts +6 -2
- package/dist/model/wires/EnergyConsumer.js +24 -3
- package/dist/model/wires/EnergyConsumer.js.map +1 -1
- package/dist/model/wires/EnergySource.d.ts +8 -4
- package/dist/model/wires/EnergySource.js +37 -21
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.d.ts +2 -0
- package/dist/model/wires/ExternalNetworkInjection.js +81 -1
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/Line.js.map +1 -1
- package/dist/model/wires/LinearShuntCompensator.d.ts +15 -0
- package/dist/model/wires/LinearShuntCompensator.js +96 -0
- package/dist/model/wires/LinearShuntCompensator.js.map +1 -0
- package/dist/model/wires/PowerTransformer.js +0 -3
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/PowerTransformerEnd.js.map +1 -1
- package/dist/model/wires/RatioTapChanger.js.map +1 -1
- package/dist/model/wires/RatioTapChangerTable.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.d.ts +3 -0
- package/dist/model/wires/RegulatingCondEq.js +17 -6
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/model/wires/RegulatingControl.d.ts +2 -0
- package/dist/model/wires/RegulatingControl.js +43 -7
- package/dist/model/wires/RegulatingControl.js.map +1 -1
- package/dist/model/wires/RotatingMachine.d.ts +2 -0
- package/dist/model/wires/RotatingMachine.js +17 -0
- package/dist/model/wires/RotatingMachine.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +2 -1
- package/dist/model/wires/SeriesCompensator.js +42 -42
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/model/wires/ShuntCompensator.d.ts +17 -0
- package/dist/model/wires/ShuntCompensator.js +50 -0
- package/dist/model/wires/ShuntCompensator.js.map +1 -0
- package/dist/model/wires/SynchronousMachine.d.ts +2 -0
- package/dist/model/wires/SynchronousMachine.js +70 -5
- package/dist/model/wires/SynchronousMachine.js.map +1 -1
- package/dist/model/wires/TapChangerControl.js.map +1 -1
- package/dist/util/utils.d.ts +8 -1
- package/dist/util/utils.js +13 -38
- package/dist/util/utils.js.map +1 -1
- package/dist/util/xml/xml.serializer.d.ts +3 -1
- package/dist/util/xml/xml.serializer.js +46 -45
- package/dist/util/xml/xml.serializer.js.map +1 -1
- package/package.json +4 -1
- package/.nycrc +0 -28
- package/jasmine/jasmine_all.json +0 -13
- package/jasmine/jasmine_fuseki_interface.json +0 -13
- package/jasmine/jasmine_fuseki_psdm.json +0 -13
- package/jasmine/jasmine_integral_7.json +0 -13
- package/jasmine/jasmine_psdm.json +0 -13
- package/src/config/lew-sincal/lew-sincal-load.config.ts +0 -58
- package/src/config/power-system-datamodel/psdm-load.config.ts +0 -57
- package/src/config/westnetz-integral7/integral7-load.config.ts +0 -53
- package/src/config/westnetz-neplan/callbacks/cb-connectivitynode.ts +0 -159
- package/src/config/westnetz-neplan/callbacks/cb-psr.ts +0 -30
- package/src/config/westnetz-neplan/callbacks/cb-wnenergyconsumer.ts +0 -70
- package/src/config/westnetz-neplan/neplan-load.config.ts +0 -131
- package/src/config/westnetz-neplan/property-handler-westenergy.config.ts +0 -52
- package/src/constants/cim-class-definition.ts +0 -169
- package/src/constants/cim-class-names.ts +0 -118
- package/src/constants/cim-constants.ts +0 -5
- package/src/constants/init-data/ASSET_HEALTH_EVENTS.ts +0 -45
- package/src/constants/init-data/ASSSET_OWNER.ts +0 -11
- package/src/constants/init-data/JENA_SPARQL.ts +0 -328
- package/src/constants/init-data/PSR_TYPES.ts +0 -75
- package/src/constants/init-data/xml/AssetHealtEvent.xml +0 -45
- package/src/constants/init-data/xml/AssetOwner.xml +0 -11
- package/src/constants/init-data/xml/PsrType.xml +0 -80
- package/src/constants/rdf-xml.ts +0 -52
- package/src/converter/PSDM/ConverterPowerSystemDataModel.ts +0 -546
- package/src/converter/PSDM/model/FixedFeedIn.ts +0 -28
- package/src/converter/PSDM/model/Line.ts +0 -39
- package/src/converter/PSDM/model/LineType.ts +0 -29
- package/src/converter/PSDM/model/Load.ts +0 -38
- package/src/converter/PSDM/model/Node.ts +0 -16
- package/src/converter/PSDM/model/TimeSeriesMapping.ts +0 -13
- package/src/converter/PSDM/model/Transformer.ts +0 -34
- package/src/converter/PSDM/model/TransformerType.ts +0 -49
- package/src/converter/PSDM/model/geo/Crs.ts +0 -4
- package/src/converter/PSDM/model/geo/GeoPosition.ts +0 -7
- package/src/converter/integral7/ConverterIntegral7.ts +0 -3916
- package/src/converter/integral7/config/db-config.ts +0 -13
- package/src/converter/integral7/config/generation-unit-fuel-types.ts +0 -51
- package/src/converter/integral7/config/integral-prefix.ts +0 -20
- package/src/converter/integral7/model/integral/BaseClass.ts +0 -28
- package/src/converter/integral7/model/integral/BaseClassNsg.ts +0 -21
- package/src/converter/integral7/model/integral/Hgueleitung.ts +0 -12
- package/src/converter/integral7/model/integral/KnotenSo.ts +0 -41
- package/src/converter/integral7/model/integral/KnotenSoNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Kopfstation.ts +0 -46
- package/src/converter/integral7/model/integral/Leitung.ts +0 -73
- package/src/converter/integral7/model/integral/LeitungNsg.ts +0 -46
- package/src/converter/integral7/model/integral/Point.ts +0 -14
- package/src/converter/integral7/model/integral/Schaltanlage.ts +0 -151
- package/src/converter/integral7/model/integral/SchaltanlageNSG.ts +0 -30
- package/src/converter/integral7/model/integral/Schaltanlagenabschnitt.ts +0 -44
- package/src/converter/integral7/model/integral/SchaltanlagenabschnittNsg.ts +0 -27
- package/src/converter/integral7/model/integral/Schaltfeld.ts +0 -116
- package/src/converter/integral7/model/integral/SchaltfeldNsg.ts +0 -35
- package/src/converter/integral7/model/integral/Standort.ts +0 -53
- package/src/converter/integral7/model/integral/StandortNsg.ts +0 -24
- package/src/converter/integral7/model/integral/Trafo2w.ts +0 -22
- package/src/converter/integral7/model/integral/Trafo2wNsg.ts +0 -13
- package/src/converter/integral7/model/interfaces.ts +0 -450
- package/src/converter/integral7/sql/integral.sql.ts +0 -345
- package/src/converter/integral7/utils-schema.ts +0 -50
- package/src/converter/integral7/utils-trafo3w.ts +0 -321
- package/src/converter/integral7/utils.ts +0 -693
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +0 -188
- package/src/etl-neplan/etl-neplan-feederline.ts +0 -229
- package/src/etl-neplan/etl-neplan.ts +0 -344
- package/src/etl-neplan/neplan-contingency-analysis.ts +0 -571
- package/src/graph/Types.ts +0 -7
- package/src/graph/connections/connection.ts +0 -29
- package/src/graph/edges/edge.ts +0 -27
- package/src/graph/graph-interfaces.ts +0 -21
- package/src/graph/graph-util.ts +0 -158
- package/src/graph/graph.ts +0 -84
- package/src/graph/nodes/node.ts +0 -43
- package/src/index.ts +0 -307
- package/src/interfaces/model/assets/IAsset.ts +0 -5
- package/src/interfaces/model/assets/IAssetContainer.ts +0 -5
- package/src/interfaces/model/assets/IFacility.ts +0 -5
- package/src/interfaces/model/common/IDocument.ts +0 -5
- package/src/interfaces/model/core/IACDCTerminal.ts +0 -8
- package/src/interfaces/model/core/IBaseVoltage.ts +0 -7
- package/src/interfaces/model/core/IConductingEquipment.ts +0 -16
- package/src/interfaces/model/core/IConnectivityNode.ts +0 -27
- package/src/interfaces/model/core/IConnectivityNodeContainer.ts +0 -11
- package/src/interfaces/model/core/IEquipment.ts +0 -11
- package/src/interfaces/model/core/IEquipmentContainer.ts +0 -12
- package/src/interfaces/model/core/IFeeder.ts +0 -21
- package/src/interfaces/model/core/IIdentifiedObject.ts +0 -108
- package/src/interfaces/model/core/IPowerSystemResource.ts +0 -3
- package/src/interfaces/model/core/ISubstation.ts +0 -8
- package/src/interfaces/model/core/ITerminal.ts +0 -57
- package/src/interfaces/model/core/IVoltageLevel.ts +0 -14
- package/src/interfaces/model/diagram/IDiagram.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObject.ts +0 -21
- package/src/interfaces/model/diagram/IDiagramObjectPoint.ts +0 -16
- package/src/interfaces/model/domain/IActivePower.ts +0 -3
- package/src/interfaces/model/domain/IAngleDegrees.ts +0 -3
- package/src/interfaces/model/domain/IApparentPower.ts +0 -3
- package/src/interfaces/model/domain/ICurrentFlow.ts +0 -3
- package/src/interfaces/model/domain/IDataType.ts +0 -9
- package/src/interfaces/model/domain/IReactivePower.ts +0 -3
- package/src/interfaces/model/domain/IVoltage.ts +0 -3
- package/src/interfaces/model/domain/UnitMultiplier.ts +0 -13
- package/src/interfaces/model/domain/UnitSymbol.ts +0 -30
- package/src/interfaces/model/enums/EnumShapeInfo.ts +0 -5
- package/src/interfaces/model/faults/IFault.ts +0 -11
- package/src/interfaces/model/model/IModel.ts +0 -91
- package/src/interfaces/model/operations/IOutage.ts +0 -23
- package/src/interfaces/model/operations/ISwitchingAction.ts +0 -9
- package/src/interfaces/model/operations/ISwitchingPlan.ts +0 -26
- package/src/interfaces/model/statevariables/ISvPowerFlow.ts +0 -20
- package/src/interfaces/model/statevariables/ISvVoltage.ts +0 -16
- package/src/interfaces/model/topology/ITopologicalIsland.ts +0 -11
- package/src/interfaces/model/topology/ITopologicalNode.ts +0 -24
- package/src/interfaces/model/wires/IACLineSegment.ts +0 -4
- package/src/interfaces/model/wires/IBusbarSection.ts +0 -4
- package/src/interfaces/model/wires/ICompositeSwitch.ts +0 -6
- package/src/interfaces/model/wires/IConductor.ts +0 -6
- package/src/interfaces/model/wires/IConnector.ts +0 -5
- package/src/interfaces/model/wires/IDisconnector.ts +0 -4
- package/src/interfaces/model/wires/IEnergyConsumer.ts +0 -7
- package/src/interfaces/model/wires/IEnergySource.ts +0 -20
- package/src/interfaces/model/wires/IExternalNetworkInjection.ts +0 -34
- package/src/interfaces/model/wires/ILoadBreakSwitch.ts +0 -4
- package/src/interfaces/model/wires/IPowerTransformer.ts +0 -7
- package/src/interfaces/model/wires/IPowerTransformerEnd.ts +0 -10
- package/src/interfaces/model/wires/IProtectedSwitch.ts +0 -4
- package/src/interfaces/model/wires/IRegulatingCondEq.ts +0 -4
- package/src/interfaces/model/wires/ISwitch.ts +0 -11
- package/src/interfaces/model/wires/ITransformerEnd.ts +0 -14
- package/src/interfaces/observable/IObservable.ts +0 -6
- package/src/interfaces/observable/IObserver.ts +0 -3
- package/src/interfaces/persistence-interfaces.ts +0 -12
- package/src/interfaces/schema-settings/ShapeInfos.ts +0 -28
- package/src/model/assetinfo/AssetInfo.ts +0 -13
- package/src/model/assetinfo/CableInfo.ts +0 -8
- package/src/model/assetinfo/OverheadWireInfo.ts +0 -8
- package/src/model/assetinfo/PowerTransformer2WInfo.ts +0 -13
- package/src/model/assetinfo/PowerTransformer3WInfo.ts +0 -18
- package/src/model/assetinfo/PowerTransformerInfo.ts +0 -14
- package/src/model/assetinfo/TapChangerInfo.ts +0 -60
- package/src/model/assetinfo/TransformerEndInfo.ts +0 -38
- package/src/model/assetinfo/WireInfo.ts +0 -22
- package/src/model/assets/AggregateScore.ts +0 -9
- package/src/model/assets/AnalyticScore.ts +0 -41
- package/src/model/assets/Asset.ts +0 -164
- package/src/model/assets/AssetContainer.ts +0 -11
- package/src/model/assets/AssetDeployment.ts +0 -122
- package/src/model/assets/AssetHealthEvent.ts +0 -73
- package/src/model/assets/AssetOrganisationRole.ts +0 -51
- package/src/model/assets/AssetOwner.ts +0 -54
- package/src/model/assets/DeploymentDate.ts +0 -20
- package/src/model/assets/DeploymentStateKind.ts +0 -7
- package/src/model/assets/Facility.ts +0 -107
- package/src/model/assets/FacilityKind.ts +0 -9
- package/src/model/assets/HealthScore.ts +0 -59
- package/src/model/assets/LifecycleDate.ts +0 -17
- package/src/model/assets/RiskScore.ts +0 -7
- package/src/model/assets/TransformerApplicationKind.ts +0 -6
- package/src/model/common/ActivityRecord.ts +0 -93
- package/src/model/common/CoordinateSystem.ts +0 -81
- package/src/model/common/Document.ts +0 -9
- package/src/model/common/Location.ts +0 -237
- package/src/model/common/OrganisationRole.ts +0 -7
- package/src/model/common/PositionPoint.ts +0 -121
- package/src/model/common/Status.ts +0 -11
- package/src/model/core/ACDCTerminal.ts +0 -63
- package/src/model/core/BaseVoltage.ts +0 -129
- package/src/model/core/Bay.ts +0 -178
- package/src/model/core/ConductingEquipment.ts +0 -182
- package/src/model/core/ConnectivityNode.ts +0 -417
- package/src/model/core/ConnectivityNodeContainer.ts +0 -26
- package/src/model/core/Curve.ts +0 -55
- package/src/model/core/CurveData.ts +0 -74
- package/src/model/core/CurveStyle.ts +0 -4
- package/src/model/core/Equipment.ts +0 -184
- package/src/model/core/EquipmentContainer.ts +0 -40
- package/src/model/core/Feeder.ts +0 -186
- package/src/model/core/GeographicalRegion.ts +0 -34
- package/src/model/core/IdentifiedObject.ts +0 -393
- package/src/model/core/PSRType.ts +0 -164
- package/src/model/core/PhaseCode.ts +0 -23
- package/src/model/core/PowerSystemResource.ts +0 -109
- package/src/model/core/SubGeographicalRegion.ts +0 -58
- package/src/model/core/Substation.ts +0 -290
- package/src/model/core/Terminal.ts +0 -422
- package/src/model/core/VoltageLevel.ts +0 -192
- package/src/model/dc/ACDCConverter.ts +0 -66
- package/src/model/dc/ACDCConverterDCTerminal.ts +0 -64
- package/src/model/dc/CsConverter.ts +0 -68
- package/src/model/dc/CsOperatingModeKind.ts +0 -4
- package/src/model/dc/CsPpccControlKind.ts +0 -5
- package/src/model/dc/DCBaseTerminal.ts +0 -30
- package/src/model/dc/DCConductingEquipment.ts +0 -8
- package/src/model/dc/DCConverterOperatingModeKind.ts +0 -6
- package/src/model/dc/DCConverterUnit.ts +0 -60
- package/src/model/dc/DCEquipmentContainer.ts +0 -8
- package/src/model/dc/DCLine.ts +0 -56
- package/src/model/dc/DCLineSegment.ts +0 -81
- package/src/model/dc/DCNode.ts +0 -49
- package/src/model/dc/DCPolarityKind.ts +0 -5
- package/src/model/dc/DCTerminal.ts +0 -45
- package/src/model/dc/VsConverter.ts +0 -48
- package/src/model/dc/VsPpccControlKind.ts +0 -7
- package/src/model/dc/VsQpccControlKind.ts +0 -5
- package/src/model/diagram/Diagram.ts +0 -136
- package/src/model/diagram/DiagramObject.ts +0 -338
- package/src/model/diagram/DiagramObjectPoint.ts +0 -196
- package/src/model/diagram/DiagramStyle.ts +0 -32
- package/src/model/diagram/OrientationKind.ts +0 -4
- package/src/model/domain/ActivePower.ts +0 -14
- package/src/model/domain/AngleDegrees.ts +0 -14
- package/src/model/domain/ApparentPower.ts +0 -14
- package/src/model/domain/Capacitance.ts +0 -15
- package/src/model/domain/CapacitancePerLength.ts +0 -15
- package/src/model/domain/ConductancePerLength.ts +0 -14
- package/src/model/domain/CurrentFlow.ts +0 -14
- package/src/model/domain/Reactance.ts +0 -15
- package/src/model/domain/ReactancePerLength.ts +0 -14
- package/src/model/domain/ReactivePower.ts +0 -14
- package/src/model/domain/Resistance.ts +0 -14
- package/src/model/domain/ResistancePerLength.ts +0 -14
- package/src/model/domain/UnitMultiplier.ts +0 -13
- package/src/model/domain/UnitSymbol.ts +0 -30
- package/src/model/domain/Voltage.ts +0 -14
- package/src/model/equivalents/EquivalentBranch.ts +0 -203
- package/src/model/equivalents/EquivalentEquipment.ts +0 -8
- package/src/model/extensions/amprion/core/AMPRIONBay.ts +0 -106
- package/src/model/extensions/amprion/core/AMPRIONConnectivityNode.ts +0 -51
- package/src/model/extensions/amprion/model/AmprionModel.ts +0 -92
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +0 -174
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +0 -64
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +0 -21
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +0 -89
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +0 -36
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +0 -5
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +0 -53
- package/src/model/extensions/enervance/assets/EVImportanceScore.ts +0 -58
- package/src/model/extensions/enervance/core/EVTerminal.ts +0 -63
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -144
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -121
- package/src/model/extensions/neplan-westnetz/core/WNConnectivityNode.ts +0 -344
- package/src/model/extensions/neplan-westnetz/core/WNFeeder.ts +0 -133
- package/src/model/extensions/neplan-westnetz/faults/WNFaultConnectivityNode.ts +0 -113
- package/src/model/extensions/neplan-westnetz/operations/WNOutage.ts +0 -111
- package/src/model/extensions/neplan-westnetz/wires/WNEnergyConsumer.ts +0 -451
- package/src/model/faults/EquipmentFault.ts +0 -9
- package/src/model/faults/Fault.ts +0 -41
- package/src/model/faults/LineFault.ts +0 -10
- package/src/model/generation/FossilFuel.ts +0 -53
- package/src/model/generation/FuelType.ts +0 -8
- package/src/model/generation/GeneratingUnit.ts +0 -157
- package/src/model/generation/GeneratorControlSource.ts +0 -6
- package/src/model/generation/HydroEnergyConversionKind.ts +0 -4
- package/src/model/generation/HydroGeneratingUnit.ts +0 -14
- package/src/model/generation/HydroPlantStorageKind.ts +0 -5
- package/src/model/generation/HydroPowerPlant.ts +0 -13
- package/src/model/generation/HydroPump.ts +0 -13
- package/src/model/generation/NuclearGeneratingUnit.ts +0 -8
- package/src/model/generation/SolarGeneratingUnit.ts +0 -8
- package/src/model/generation/ThermalGeneratingUnit.ts +0 -42
- package/src/model/generation/WindGenUnitKind.ts +0 -4
- package/src/model/generation/WindGeneratingUnit.ts +0 -84
- package/src/model/loadmodel/ConformLoad.ts +0 -34
- package/src/model/model/Model.ts +0 -1253
- package/src/model/operationallimits/CurrentLimit.ts +0 -92
- package/src/model/operationallimits/ENTSOEOperationalLimitType.ts +0 -5
- package/src/model/operationallimits/LimitTypeKind.ts +0 -9
- package/src/model/operationallimits/OperationalLimit.ts +0 -68
- package/src/model/operationallimits/OperationalLimitDirectionKind.ts +0 -5
- package/src/model/operationallimits/OperationalLimitSet.ts +0 -124
- package/src/model/operationallimits/OperationalLimitType.ts +0 -94
- package/src/model/operations/Outage.ts +0 -68
- package/src/model/operations/SwitchAction.ts +0 -121
- package/src/model/operations/SwitchActionKind.ts +0 -6
- package/src/model/operations/SwitchingAction.ts +0 -43
- package/src/model/operations/SwitchingPlan.ts +0 -141
- package/src/model/operations/UnplannedOutage.ts +0 -9
- package/src/model/statevariables/StateVariable.ts +0 -28
- package/src/model/statevariables/SvPowerFlow.ts +0 -75
- package/src/model/statevariables/SvStatus.ts +0 -51
- package/src/model/statevariables/SvTapStep.ts +0 -54
- package/src/model/statevariables/SvVoltage.ts +0 -74
- package/src/model/topology/TopologicalIsland.ts +0 -57
- package/src/model/topology/TopologicalNode.ts +0 -203
- package/src/model/wires/ACLineSegment.ts +0 -309
- package/src/model/wires/AsynchronousMachine.ts +0 -93
- package/src/model/wires/AsynchronousMachineKind.ts +0 -5
- package/src/model/wires/Breaker.ts +0 -82
- package/src/model/wires/BusbarSection.ts +0 -70
- package/src/model/wires/Clamp.ts +0 -33
- package/src/model/wires/CompositeSwitch.ts +0 -13
- package/src/model/wires/Conductor.ts +0 -55
- package/src/model/wires/Connector.ts +0 -16
- package/src/model/wires/Cut.ts +0 -7
- package/src/model/wires/Disconnector.ts +0 -120
- package/src/model/wires/EarthFaultCompensator.ts +0 -20
- package/src/model/wires/EnergyConsumer.ts +0 -255
- package/src/model/wires/EnergySource.ts +0 -337
- package/src/model/wires/ExternalNetworkInjection.ts +0 -276
- package/src/model/wires/Ground.ts +0 -40
- package/src/model/wires/GroundDisconnector.ts +0 -39
- package/src/model/wires/Jumper.ts +0 -8
- package/src/model/wires/Junction.ts +0 -57
- package/src/model/wires/Line.ts +0 -117
- package/src/model/wires/LoadBreakSwitch.ts +0 -107
- package/src/model/wires/PetersenCoilModeKind.ts +0 -5
- package/src/model/wires/Plant.ts +0 -12
- package/src/model/wires/PowerTransformer.ts +0 -231
- package/src/model/wires/PowerTransformerEnd.ts +0 -168
- package/src/model/wires/ProtectedSwitch.ts +0 -9
- package/src/model/wires/RatioTapChanger.ts +0 -96
- package/src/model/wires/RatioTapChangerTable.ts +0 -35
- package/src/model/wires/RatioTapChangerTablePoint.ts +0 -45
- package/src/model/wires/ReactiveCapabilityCurve.ts +0 -35
- package/src/model/wires/Recloser.ts +0 -32
- package/src/model/wires/RegulatingCondEq.ts +0 -67
- package/src/model/wires/RegulatingControl.ts +0 -217
- package/src/model/wires/RegulatingControlModeKind.ts +0 -11
- package/src/model/wires/RotatingMachine.ts +0 -172
- package/src/model/wires/SeriesCompensator.ts +0 -166
- package/src/model/wires/ShortCircuitRotorKind.ts +0 -6
- package/src/model/wires/Switch.ts +0 -230
- package/src/model/wires/SynchronousMachine.ts +0 -267
- package/src/model/wires/SynchronousMachineKind.ts +0 -9
- package/src/model/wires/SynchronousMachineOperatingMode.ts +0 -5
- package/src/model/wires/TapChanger.ts +0 -55
- package/src/model/wires/TapChangerControl.ts +0 -32
- package/src/model/wires/TapChangerTablePoint.ts +0 -41
- package/src/model/wires/TransformerControlMode.ts +0 -4
- package/src/model/wires/TransformerEnd.ts +0 -143
- package/src/model/wires/WindingConnection.ts +0 -9
- package/src/package.json +0 -16
- package/src/util/datatype-converter.ts +0 -48
- package/src/util/sparql/sparql-building-block.ts +0 -43
- package/src/util/sparql/sparql-utils.ts +0 -150
- package/src/util/util-create.ts +0 -148
- package/src/util/util-search.ts +0 -40
- package/src/util/util-topology.ts +0 -175
- package/src/util/utils.ts +0 -255
- package/src/util/xml/utils.parser.ts +0 -29
- package/src/util/xml/xml.parser.ts +0 -107
- package/src/util/xml/xml.serializer.ts +0 -245
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-1.tests.sp-ec.ts +0 -838
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.sp-ec.ts +0 -216
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-katarina-ruhrau.tests.spec.ts +0 -223
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/LICENSE +0 -617
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/NOTICE +0 -216
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/README +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-delete +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-get +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-head +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-post +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-put +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-query +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/s-update-form +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/bin/soh +0 -725
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki +0 -512
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-backup +0 -34
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server +0 -95
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.bat +0 -28
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki-server.jar +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.service +0 -59
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/fuseki.war +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/config.ttl +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/configuration/test.ttl +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/shiro.ini +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GOSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GPOS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/GSPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSP.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/OSPG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POS.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/POSG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPO.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/SPOG.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/journal.jrnl +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/node2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/nodes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefix2id.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixIdx.idn +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/prefixes.dat +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.cfg +0 -32
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-mem +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-service +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2 +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-dir +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/templates/config-tdb2-mem +0 -30
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/WEB-INF/web.xml +0 -332
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/admin-logs.html +0 -73
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-select.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap-theme.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.css.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/bootstrap.min.css +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.css +0 -301
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/codemirror.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/font-awesome.min.css +0 -4
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/fui.css +0 -191
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.dataTables.css +0 -220
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-noscript.css +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui-noscript.css +0 -17
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload-ui.css +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/jquery.fileupload.css +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/pivot.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/qonsole.css +0 -172
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasqe.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/css/yasr.min.css +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/dataset.html +0 -247
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/documentation.html +0 -83
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/FontAwesome.otf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.svg +0 -504
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/fontawesome-webfont.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.eot +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.svg +0 -229
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/fonts/glyphicons-halflings-regular.woff +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/back_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/favicon.ico +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/forward_enabled_hover.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/jena-logo-notext-small.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_asc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_both.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/sort_desc_disabled.png +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/images/wait30.gif +0 -0
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/index.html +0 -101
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/dataset-controller.js +0 -69
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/index-controller.js +0 -50
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/manage-controller.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/query-controller.js +0 -72
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/upload-controller.js +0 -42
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/controllers/validation-controller.js +0 -38
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/fui.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.dataset.js +0 -31
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.index.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.manage.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/main.validation.js +0 -24
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset-stats.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/dataset.js +0 -262
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/fuseki-server.js +0 -180
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/task.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/models/validation-options.js +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/qonsole-config.js +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/ping-service.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/services/validation-service.js +0 -98
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-edit.tpl +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-info.tpl +0 -40
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-management.tpl +0 -62
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selection-list.tpl +0 -22
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-selector.tpl +0 -15
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-simple-create.tpl +0 -85
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/dataset-stats.tpl +0 -14
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/file-upload.tpl +0 -46
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/templates/uploadable-file.tpl +0 -23
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/util/page-utils.js +0 -33
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-edit.js +0 -205
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-info.js +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-management.js +0 -173
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selection-list.js +0 -58
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-selector.js +0 -84
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-simple-create.js +0 -102
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/dataset-stats.js +0 -41
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/datasets-dropdown-list.js +0 -43
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/file-upload.js +0 -225
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/tabbed-view-manager.js +0 -63
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/uploadable-file.js +0 -39
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/app/views/validation-options.js +0 -54
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/common-config.js +0 -94
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/brace-fold.js +0 -105
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/comment-fold.js +0 -57
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldcode.js +0 -145
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/foldgutter.js +0 -134
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/addon/fold/xml-fold.js +0 -181
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone-min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.js +0 -1581
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/backbone.marionette.js +0 -2385
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap-select.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/bootstrap.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/html5shiv.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.js +0 -9789
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-1.10.2.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery-ui.min.js +0 -7
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.dataTables.min.js +0 -157
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.js +0 -1426
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.fileupload.local.js +0 -1428
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.form.js +0 -1278
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.iframe-transport.js +0 -214
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.ui.widget.js +0 -530
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/jquery.xdomainrequest.js +0 -90
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/lib/codemirror.js +0 -7638
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/javascript/javascript.js +0 -683
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/sparql/sparql.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/turtle/turtle.js +0 -160
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/mode/xml/xml.js +0 -384
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.js +0 -1363
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js +0 -2
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/pivot.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/plugins/text.js +0 -386
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/qonsole.js +0 -577
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/refresh.sh +0 -21
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.js +0 -2076
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/require.min.js +0 -36
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/respond.min.js +0 -6
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/sprintf-0.7-beta1.js +0 -183
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/underscore.js +0 -1276
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js +0 -9
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasqe.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js +0 -8
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/js/lib/yasr.min.js.map +0 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/manage.html +0 -110
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/services.html +0 -76
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/test/test-fuseki-config.ttl +0 -27
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/webapp/validate.html +0 -147
- package/test/apache-jena-fuseki-interface/data/json/PersistData.json +0 -111
- package/test/apache-jena-fuseki-interface/data/xml/AssetHealthEvent.xml +0 -45
- package/test/apache-jena-fuseki-interface/data/xml/AssetOwner.xml +0 -11
- package/test/apache-jena-fuseki-interface/data/xml/Outages.xml +0 -69
- package/test/apache-jena-fuseki-interface/data/xml/PsrType.xml +0 -80
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +0 -20867
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +0 -3784
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1.xml +0 -15755
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_EQ_V1_feeder_ext.xml +0 -54
- package/test/apache-jena-fuseki-interface/data/xml/neplan-eslohe/Eslohe_Rootnet_Area_1_SSH_V1.xml +0 -2796
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +0 -42569
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +0 -10108
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +0 -6234
- package/test/apache-jena-fuseki-interface/data/xml-rdf-data.xml +0 -84
- package/test/cim-xml-rdf-parser/cim-xml-rdf-parser.tests.spec.ts +0 -23
- package/test/cim-xml-rdf-parser/data/rdfxml_serialisation.xml +0 -192
- package/test/integral7-converter/integral7-converter.tests.spec.ts +0 -195
- package/test/power-system-data-model-converter/data/fixed_feed_in_input.csv +0 -72
- package/test/power-system-data-model-converter/data/line_input.csv +0 -1910
- package/test/power-system-data-model-converter/data/line_type_input.csv +0 -5
- package/test/power-system-data-model-converter/data/load_input.csv +0 -1829
- package/test/power-system-data-model-converter/data/node_input.csv +0 -2835
- package/test/power-system-data-model-converter/data/time_series_mapping.csv +0 -878
- package/test/power-system-data-model-converter/data/transformer_2_w_input.csv +0 -1047
- package/test/power-system-data-model-converter/data/transformer_2_w_type_input.csv +0 -5
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +0 -310
- package/tsconfig.json +0 -24
- package/webpack.config.js +0 -24
|
@@ -1,3916 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ACLineSegment,
|
|
3
|
-
ApparentPower, AsynchronousMachine, AsynchronousMachineKind, BaseVoltage,
|
|
4
|
-
Bay,
|
|
5
|
-
Breaker,
|
|
6
|
-
BusbarSection,
|
|
7
|
-
CableInfo,
|
|
8
|
-
CapacitancePerLength,
|
|
9
|
-
ConnectivityNode,
|
|
10
|
-
createBaseVoltageIfNotExists,
|
|
11
|
-
createConnection,
|
|
12
|
-
createGeoregion,
|
|
13
|
-
createSvStatus,
|
|
14
|
-
CurrentFlow,
|
|
15
|
-
CurrentLimit,
|
|
16
|
-
CurveData,
|
|
17
|
-
CurveStyle,
|
|
18
|
-
Diagram,
|
|
19
|
-
DIAGRAM_LAYOUT_TYPES,
|
|
20
|
-
DiagramObject,
|
|
21
|
-
DiagramObjectPoint,
|
|
22
|
-
Disconnector,
|
|
23
|
-
EnergyConsumer,
|
|
24
|
-
EnergySource,
|
|
25
|
-
EquipmentContainer, EquivalentBranch,
|
|
26
|
-
generateUUID,
|
|
27
|
-
GeneratingUnit,
|
|
28
|
-
GeneratorControlSource,
|
|
29
|
-
GeographicalRegion,
|
|
30
|
-
getUUID,
|
|
31
|
-
IConnectivityNode,
|
|
32
|
-
IdentifiedObject,
|
|
33
|
-
IIdentifiedObject,
|
|
34
|
-
Junction,
|
|
35
|
-
LimitTypeKind,
|
|
36
|
-
Line,
|
|
37
|
-
Model,
|
|
38
|
-
NuclearGeneratingUnit,
|
|
39
|
-
OperationalLimitDirectionKind,
|
|
40
|
-
OperationalLimitSet,
|
|
41
|
-
OperationalLimitType,
|
|
42
|
-
OrientationKind,
|
|
43
|
-
OverheadWireInfo,
|
|
44
|
-
PhaseCode,
|
|
45
|
-
PowerTransformer,
|
|
46
|
-
PowerTransformer2WInfo,
|
|
47
|
-
PowerTransformer3WInfo,
|
|
48
|
-
PowerTransformerEnd,
|
|
49
|
-
RDF_XML,
|
|
50
|
-
ReactancePerLength,
|
|
51
|
-
ReactiveCapabilityCurve,
|
|
52
|
-
RegulatingControl,
|
|
53
|
-
RegulatingControlModeKind,
|
|
54
|
-
ResistancePerLength, SeriesCompensator,
|
|
55
|
-
SolarGeneratingUnit,
|
|
56
|
-
SubGeographicalRegion,
|
|
57
|
-
Substation,
|
|
58
|
-
SynchronousMachine,
|
|
59
|
-
SynchronousMachineKind,
|
|
60
|
-
Terminal,
|
|
61
|
-
ThermalGeneratingUnit,
|
|
62
|
-
TransformerEndInfo,
|
|
63
|
-
UnitMultiplier,
|
|
64
|
-
UnitSymbol,
|
|
65
|
-
Voltage,
|
|
66
|
-
VoltageLevel,
|
|
67
|
-
WindGeneratingUnit,
|
|
68
|
-
WindGenUnitKind,
|
|
69
|
-
WireInfo
|
|
70
|
-
} from '../..';
|
|
71
|
-
import * as mysql from 'mysql';
|
|
72
|
-
import {
|
|
73
|
-
Abzweig,
|
|
74
|
-
Anlage,
|
|
75
|
-
AnlagenAbschnitt, Asynchronmotor,
|
|
76
|
-
Belastung,
|
|
77
|
-
Einspeisung,
|
|
78
|
-
Generator,
|
|
79
|
-
Georegion,
|
|
80
|
-
KnotenKf,
|
|
81
|
-
KnotenLk,
|
|
82
|
-
Laengskupplung, Ldrossel,
|
|
83
|
-
Leistungsschalter, LeitungErsatzLaengszweig,
|
|
84
|
-
LeitungStk,
|
|
85
|
-
Netzvarianten,
|
|
86
|
-
NsgKnotenSo,
|
|
87
|
-
NsgSA,
|
|
88
|
-
NsgSAAB,
|
|
89
|
-
NsgSchaltfeld,
|
|
90
|
-
NsgStandort,
|
|
91
|
-
Querkupplung,
|
|
92
|
-
Schaltfeld,
|
|
93
|
-
SchaltfeldKnoten,
|
|
94
|
-
Schlaufe,
|
|
95
|
-
Ssab,
|
|
96
|
-
Standort,
|
|
97
|
-
StarrerKnoten,
|
|
98
|
-
Stk,
|
|
99
|
-
StkTyp,
|
|
100
|
-
Subgeoregion,
|
|
101
|
-
Trafo2w,
|
|
102
|
-
Trafo3w,
|
|
103
|
-
Trafo3wWicklung,
|
|
104
|
-
Trenner3p
|
|
105
|
-
} from './model/interfaces';
|
|
106
|
-
import {
|
|
107
|
-
createIfNotExitsGeoregionByName,
|
|
108
|
-
createIfNotExitsPSRType,
|
|
109
|
-
createIfNotExitsSubGeoregionByName,
|
|
110
|
-
writeElementAttribute,
|
|
111
|
-
} from '../../util/utils';
|
|
112
|
-
import {
|
|
113
|
-
BELASTUNG_PRAEFIX,
|
|
114
|
-
EINSPEISUNG_PRAEFIX, ERSATZLAENGSZWEIG_PRAEFIX,
|
|
115
|
-
GENERATOR_PRAEFIX,
|
|
116
|
-
KNOTEN_STANDORT_PRAEFIX,
|
|
117
|
-
LEITUNG_PRAEFIX,
|
|
118
|
-
MITTIGER_PUNKT,
|
|
119
|
-
SAMMELSCHIENENABSCHNITT_PRAEFIX,
|
|
120
|
-
SCHALTFELD_PRAEFIX,
|
|
121
|
-
STANDORT_PRAEFIX,
|
|
122
|
-
TRAFO2WPRAEFIX_PRAEFIX,
|
|
123
|
-
TRAFO3WPRAEFIX_PRAEFIX
|
|
124
|
-
} from './config/integral-prefix';
|
|
125
|
-
import {
|
|
126
|
-
calculateB,
|
|
127
|
-
calculateG,
|
|
128
|
-
calculateR,
|
|
129
|
-
calculateX,
|
|
130
|
-
convertToBooleanI7,
|
|
131
|
-
createTapChanger,
|
|
132
|
-
createWriteStreamPromise,
|
|
133
|
-
determineEquipmentContainer,
|
|
134
|
-
generateFuelType, generateNodeStream,
|
|
135
|
-
getActiveReactivePower,
|
|
136
|
-
getDescription,
|
|
137
|
-
getLine,
|
|
138
|
-
getLineByAttribute,
|
|
139
|
-
getName,
|
|
140
|
-
getNumber,
|
|
141
|
-
getPkrTrafo,
|
|
142
|
-
getPSRType,
|
|
143
|
-
getSchaltgruppe,
|
|
144
|
-
getSchaltgruppeAngleClock,
|
|
145
|
-
getSrTrafo,
|
|
146
|
-
getTerminalUn,
|
|
147
|
-
getTrafoIleer,
|
|
148
|
-
getTrafoPleer, getU,
|
|
149
|
-
getUkrTrafo,
|
|
150
|
-
getUrTrafo,
|
|
151
|
-
putUUIDtoI7Ids,
|
|
152
|
-
ueberpruefeZeichenkette,
|
|
153
|
-
writeZipFile
|
|
154
|
-
} from './utils';
|
|
155
|
-
import { calculateImpedanzenTrafo3W } from './utils-trafo3w';
|
|
156
|
-
// import { FUEL_TYPE_CONFIG } from './config/generation-unit-fuel-types';
|
|
157
|
-
import { getNetzQuery, I7Objects, Integral7TableNames } from './sql/integral.sql';
|
|
158
|
-
import { MySQL, ConverterStatus } from './config/db-config';
|
|
159
|
-
import path from "path";
|
|
160
|
-
import fs from "fs";
|
|
161
|
-
|
|
162
|
-
import XMLWriter from 'xml-writer';
|
|
163
|
-
import JSZip from 'jszip';
|
|
164
|
-
import { StandortImpl } from './model/integral/Standort';
|
|
165
|
-
import { SchaltanlageImpl } from './model/integral/Schaltanlage';
|
|
166
|
-
import { SchaltanlagenabschnittImpl } from './model/integral/Schaltanlagenabschnitt';
|
|
167
|
-
import { StandortNsgImpl } from './model/integral/StandortNsg';
|
|
168
|
-
import { SchaltanlageNsgImpl } from './model/integral/SchaltanlageNSG';
|
|
169
|
-
import { SchaltanlagenabschnittNsg } from './model/integral/SchaltanlagenabschnittNsg';
|
|
170
|
-
import { Point } from './model/integral/Point';
|
|
171
|
-
import { createDiagramObjectPoints, getDiagramObjectBelonginToDiagram, isConnectedTo } from './utils-schema';
|
|
172
|
-
import { SchaltfeldImpl } from './model/integral/Schaltfeld';
|
|
173
|
-
import { SchaltfeldNsgImpl } from './model/integral/SchaltfeldNsg';
|
|
174
|
-
import { KnotenSoImpl } from './model/integral/KnotenSo';
|
|
175
|
-
import { KnotenSoNsg } from './model/integral/KnotenSoNsg';
|
|
176
|
-
import { LeitungImpl } from './model/integral/Leitung';
|
|
177
|
-
import { TapChangerInfo } from '../../model/assetinfo/TapChangerInfo';
|
|
178
|
-
import { AMPRIONBay } from '../../model/extensions/amprion/core/AMPRIONBay';
|
|
179
|
-
import { AMPRIONConnectivityNode } from '../../model/extensions/amprion/core/AMPRIONConnectivityNode';
|
|
180
|
-
import { AMPRIONSeriesCompensator } from '../../model/extensions/amprion/wires/AMPRIONSeriesCompensator';
|
|
181
|
-
import { Kopfstation } from './model/integral/Kopfstation';
|
|
182
|
-
import { Hgueleitung } from './model/integral/Hgueleitung';
|
|
183
|
-
import { CsConverter } from '../../model/dc/CsConverter';
|
|
184
|
-
import { DCConverterUnit } from '../../model/dc/DCConverterUnit';
|
|
185
|
-
import { DCNode } from '../../model/dc/DCNode';
|
|
186
|
-
import { DCLine } from '../../model/dc/DCLine';
|
|
187
|
-
import { ACDCConverterDCTerminal } from '../../model/dc/ACDCConverterDCTerminal';
|
|
188
|
-
import { DCTerminal } from '../../model/dc/DCTerminal';
|
|
189
|
-
import { DCLineSegment } from '../../model/dc/DCLineSegment';
|
|
190
|
-
import { ACDCConverter } from '../../model/dc/ACDCConverter';
|
|
191
|
-
import { DCConverterOperatingModeKind } from '../../model/dc/DCConverterOperatingModeKind';
|
|
192
|
-
import { VsConverter } from '../../model/dc/VsConverter';
|
|
193
|
-
import { CsOperatingModeKind } from '../../model/dc/CsOperatingModeKind';
|
|
194
|
-
import { VsPpccControlKind } from '../../model/dc/VsPpccControlKind';
|
|
195
|
-
import { VsQpccControlKind } from '../../model/dc/VsQpccControlKind';
|
|
196
|
-
|
|
197
|
-
export class ConverterIntegral7 {
|
|
198
|
-
mysqlConnection: mysql.Connection;
|
|
199
|
-
cimModel: Model;
|
|
200
|
-
|
|
201
|
-
/** Standardspannungsebene: falls im I7-Modell keine Spannung angegeben ist */
|
|
202
|
-
deafultUn = 110;
|
|
203
|
-
/** Das Array hält die verfügbaren Tabellennamen in der Projektdatenbank.
|
|
204
|
-
* Integral 7 legt die Tabellen keine leeren Tabellen an.
|
|
205
|
-
* Das heißt: wenn es keine Typinformation für Kabel gepflegt sind, dann existiert keine Tabelle in der Datenbank*/
|
|
206
|
-
availableTableNames: string[];
|
|
207
|
-
|
|
208
|
-
/** Speichert die Zuordnung der Integral7 ID zu CIM UUID */
|
|
209
|
-
private readonly integralID2UUID = new Map<number, string>();
|
|
210
|
-
/** Speichert die Zuordnung der CIM UUID zu Integral7 ID */
|
|
211
|
-
private readonly UUID2IntegralID = new Map<string, number[]>();
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
standortAnzahl: number;
|
|
215
|
-
leitungsAnzahl: number;
|
|
216
|
-
hgueLeitungsAnzahl: number;
|
|
217
|
-
ersatzlaengszweigAnzahl: number;
|
|
218
|
-
laengsdrosselAnzahl: number;
|
|
219
|
-
trafo2WAnzahl: number;
|
|
220
|
-
trafo3WAnzahl: number;
|
|
221
|
-
/** Begrenzt die Anzahl der abgefragten Daten aus der DB
|
|
222
|
-
* Limit wird anhand der Stationenanzahl berechent
|
|
223
|
-
* default Wert: x */
|
|
224
|
-
limit: number = 100;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
/** Integral 7 Datenmodell für die Schemakonvertierung */
|
|
228
|
-
integralStandorte = new Map<number, StandortImpl>();
|
|
229
|
-
integralSchaltanlagen = new Map<number, SchaltanlageImpl>();
|
|
230
|
-
integralSchaltanlagenAbschnitte = new Map<number, SchaltanlagenabschnittImpl>();
|
|
231
|
-
integralSchaltfelder = new Map<number, SchaltfeldImpl>();
|
|
232
|
-
|
|
233
|
-
integralKnotenSo = new Map<number, KnotenSoImpl>();
|
|
234
|
-
|
|
235
|
-
integralNsgStandort: Map<number, StandortNsgImpl> = new Map();
|
|
236
|
-
integralNsgSchaltanlage: Map<number, SchaltanlageNsgImpl> = new Map();
|
|
237
|
-
integralNsgSchaltanlagenabschnitt: Map<number, SchaltanlagenabschnittNsg> = new Map();
|
|
238
|
-
integralNsgSchaltfelder = new Map<number, SchaltfeldNsgImpl>();
|
|
239
|
-
|
|
240
|
-
integralNsgKnotenSo = new Map<number, KnotenSoNsg>();
|
|
241
|
-
|
|
242
|
-
integralLeitungen: Map<number, LeitungImpl> = new Map();
|
|
243
|
-
|
|
244
|
-
/** Integral 7 IDs für blockweise Verarbeitung SQLs */
|
|
245
|
-
schaltfeldIDs = [];
|
|
246
|
-
querkupplungIDs = [];
|
|
247
|
-
laengskupplungIDs = [];
|
|
248
|
-
knotenSoIDs = [];
|
|
249
|
-
knotenSfIDs = [];
|
|
250
|
-
leitungsIDs = [];
|
|
251
|
-
|
|
252
|
-
/** CIM Objekte, die zur Laufzeit im Speicher bleiben.
|
|
253
|
-
* Sie werden zur Erstellung der Topologie verwendet. */
|
|
254
|
-
/** Schlaufen werden als Terminals mit Schaltzustand abgebildet. */
|
|
255
|
-
memoryObjects: Map<number, IdentifiedObject> = new Map();
|
|
256
|
-
/** IDs von Leitungsanlussknoten
|
|
257
|
-
* Die IDs werden zur Bestimmung der im Speicher zu haltenden Objekte (ConnectivityNodes, Terminals) herangezogen. */
|
|
258
|
-
leitungAnschlussKnotenIDs = new Set();
|
|
259
|
-
|
|
260
|
-
/** Für Leitungen sind nicht immer Spannungen gepflegt.
|
|
261
|
-
* Diese Map speichert die Zuordnung von Knoten (CN) zu der jeweiligen Spannung
|
|
262
|
-
* Key -> CN UUID -> Basevoltage */
|
|
263
|
-
knotenSpannung = new Map<string, BaseVoltage>();
|
|
264
|
-
|
|
265
|
-
/** Längsdrossel sind im I7 Modell einer Station zugeordnet.
|
|
266
|
-
* Im CIM Modell sind sie einer Anlage zugeornet.
|
|
267
|
-
* Da Längsdrossel erst nach Stationen konvertiert werden,
|
|
268
|
-
* müssen die konvertierten Sbustation- und VoltageLevelObjekte im Speicher gehalten werden,
|
|
269
|
-
* um LDs eine EquipmentContainer-Instanz zuordnen zuu können.
|
|
270
|
-
* key I7 SubstationID -> {spannungsebene, uuid des VL-Instanz} */
|
|
271
|
-
substationVoltagelevels: Map<number, { un: number; vlUUID: string }[]> = new Map();
|
|
272
|
-
|
|
273
|
-
constructor() {
|
|
274
|
-
this.cimModel = new Model();
|
|
275
|
-
this.availableTableNames = [];
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
async init(mySqlConfig: MySQL): Promise<ConverterStatus> {
|
|
279
|
-
|
|
280
|
-
return new Promise(async (resolve, reject) => {
|
|
281
|
-
try {
|
|
282
|
-
this.initDbConnection(mySqlConfig);
|
|
283
|
-
this.openConnection();
|
|
284
|
-
await this.getAvailableTableNames(mySqlConfig.database);
|
|
285
|
-
this.standortAnzahl = await this.queryObjectCount(Integral7TableNames.STANDORT);
|
|
286
|
-
this.leitungsAnzahl = await this.queryObjectCount(Integral7TableNames.LEITUNG);
|
|
287
|
-
this.hgueLeitungsAnzahl = await this.queryObjectCount(Integral7TableNames.HGUE_LEITUNG);
|
|
288
|
-
this.ersatzlaengszweigAnzahl = await this.queryObjectCount(Integral7TableNames.ERSATZLAENGSZWEIG);
|
|
289
|
-
this.laengsdrosselAnzahl = await this.queryObjectCount(Integral7TableNames.LAENGSDROSSEL);
|
|
290
|
-
this.trafo2WAnzahl = await this.queryObjectCount(Integral7TableNames.TRAFO2W);
|
|
291
|
-
this.trafo3WAnzahl = await this.queryObjectCount(Integral7TableNames.TRAFO3W);
|
|
292
|
-
await this.queryAnschlussIDs();
|
|
293
|
-
resolve({status: 'successful', message: 'ok'});
|
|
294
|
-
} catch (e) {
|
|
295
|
-
reject({status: 'error', message: e.toString()});
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
async convert(energyTypesConfig: any, tempDirPath: string): Promise<ConverterStatus> {
|
|
301
|
-
|
|
302
|
-
return new Promise(async (resolve, reject) => {
|
|
303
|
-
try {
|
|
304
|
-
|
|
305
|
-
/*const tempDirPath = exportPath ? exportPath : await createTempDirPath() as string;*/
|
|
306
|
-
|
|
307
|
-
/** EQ Profile */
|
|
308
|
-
const filePathEQ = path.join(tempDirPath, 'eq.xml');
|
|
309
|
-
const writeStreamEQ = fs.createWriteStream(filePathEQ);
|
|
310
|
-
const xmlWriterEQ = new XMLWriter(true, (string, encoding) => {
|
|
311
|
-
writeStreamEQ.write(string, encoding);
|
|
312
|
-
});
|
|
313
|
-
this.writeHeaderStart(xmlWriterEQ);
|
|
314
|
-
const modelEQUUID = generateUUID();
|
|
315
|
-
const profiles = [RDF_XML.EQ_CORE_PROFILE_URI, RDF_XML.EQ_SC_PROFILE_URI, RDF_XML.EQ_OPER_PROFILE_URI];
|
|
316
|
-
this.cimModel.toCIMXML(xmlWriterEQ, modelEQUUID, profiles, undefined, RDF_XML.AMP_MAS);
|
|
317
|
-
|
|
318
|
-
/** DL Profile */
|
|
319
|
-
const filePathDL = path.join(tempDirPath, 'dl.xml');
|
|
320
|
-
const writeStreamDL = fs.createWriteStream(filePathDL);
|
|
321
|
-
const xmlWriterDL = new XMLWriter(true, (string, encoding) => {
|
|
322
|
-
writeStreamDL.write(string, encoding);
|
|
323
|
-
});
|
|
324
|
-
this.writeHeaderStart(xmlWriterDL);
|
|
325
|
-
const modelDLUUID = generateUUID();
|
|
326
|
-
const profilesDl = [RDF_XML.DL_OPER_PROFILE_URI];
|
|
327
|
-
this.cimModel.toCIMXML(xmlWriterDL, modelDLUUID, profilesDl, [modelEQUUID], RDF_XML.AMP_MAS);
|
|
328
|
-
|
|
329
|
-
/** SSH Profile */
|
|
330
|
-
const filePathSSH = path.join(tempDirPath, 'ssh.xml');
|
|
331
|
-
const writeStreamSSH = fs.createWriteStream(filePathSSH);
|
|
332
|
-
const xmlWriterSSH = new XMLWriter(true, (string, encoding) => {
|
|
333
|
-
writeStreamSSH.write(string, encoding);
|
|
334
|
-
});
|
|
335
|
-
this.writeHeaderStart(xmlWriterSSH);
|
|
336
|
-
const modelSSHUUID = generateUUID();
|
|
337
|
-
const profilesSSH = [RDF_XML.SSH_OPER_PROFILE_URI];
|
|
338
|
-
this.cimModel.toCIMXML(xmlWriterSSH, modelSSHUUID, profilesSSH, [modelEQUUID], RDF_XML.AMP_MAS);
|
|
339
|
-
|
|
340
|
-
/** SV Profile */
|
|
341
|
-
const filePathSV = path.join(tempDirPath, 'sv.xml');
|
|
342
|
-
const writeStreamSV = fs.createWriteStream(filePathSV);
|
|
343
|
-
const xmlWriterSV = new XMLWriter(true, (string, encoding) => {
|
|
344
|
-
writeStreamSV.write(string, encoding);
|
|
345
|
-
});
|
|
346
|
-
this.writeHeaderStart(xmlWriterSV);
|
|
347
|
-
const modelSVUUID = generateUUID();
|
|
348
|
-
const profilesSV = [RDF_XML.SV_OPER_PROFILE_URI];
|
|
349
|
-
this.cimModel.toCIMXML(xmlWriterSV, modelSVUUID, profilesSV, [modelEQUUID, modelSSHUUID], RDF_XML.AMP_MAS);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
/** Amprion I7 Profile */
|
|
353
|
-
const filePathAmpI7 = path.join(tempDirPath, 'amp_i7.xml');
|
|
354
|
-
const writeStreamAmpI7 = fs.createWriteStream(filePathAmpI7);
|
|
355
|
-
const xmlWriterAmpI7 = new XMLWriter(true, (string, encoding) => {
|
|
356
|
-
writeStreamAmpI7.write(string, encoding);
|
|
357
|
-
});
|
|
358
|
-
this.writeHeaderStart(xmlWriterAmpI7, RDF_XML.AMP_I7_PROFILE_URI);
|
|
359
|
-
const modelAmpI7UUID = generateUUID();
|
|
360
|
-
const profilesAmpI7UUID = [RDF_XML.AMP_I7_PROFILE_URI];
|
|
361
|
-
this.cimModel.toCIMXML(xmlWriterAmpI7, modelAmpI7UUID, profilesAmpI7UUID, [modelEQUUID], RDF_XML.AMP_MAS);
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
/**------------------------------------------------------------------------------*/
|
|
365
|
-
const restCount = this.standortAnzahl < this.limit ? this.standortAnzahl : (this.standortAnzahl % this.limit);
|
|
366
|
-
const intervalCount = (this.standortAnzahl - restCount) / this.limit;
|
|
367
|
-
const numberOfIntervals = restCount > 0 ? intervalCount + 1 : intervalCount;
|
|
368
|
-
/** Frage die IDs von Leitungsabschnitten*/
|
|
369
|
-
|
|
370
|
-
await this.convertGeoRegionen();
|
|
371
|
-
await this.convertSubGeoRegionen();
|
|
372
|
-
await this.convertStromkreise();
|
|
373
|
-
await this.convertBetriebsmitteltypenLeitung();
|
|
374
|
-
await this.convertBetriebsmitteltypenTrafo();
|
|
375
|
-
|
|
376
|
-
await this.convertNetzvarianten();
|
|
377
|
-
|
|
378
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.geographicalRegions, RDF_XML.PROFILE_EQ);
|
|
379
|
-
|
|
380
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.subgeographicalRegions, RDF_XML.PROFILE_EQ);
|
|
381
|
-
|
|
382
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.lines, RDF_XML.PROFILE_EQ);
|
|
383
|
-
|
|
384
|
-
this.objectToCIMXML(xmlWriterDL, this.cimModel.diagrams, RDF_XML.PROFILE_DL);
|
|
385
|
-
this.objectArrayToCIMXML(xmlWriterDL, this.cimModel.diagramStyles, RDF_XML.PROFILE_DL);
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
for (let i = 0; i < numberOfIntervals; i++) {
|
|
389
|
-
const offset = i * this.limit;
|
|
390
|
-
const currentLimit = (i + 1 === numberOfIntervals && restCount > 0) ? restCount : this.limit;
|
|
391
|
-
|
|
392
|
-
/** Start EQUIPMENT CONTAINER */
|
|
393
|
-
|
|
394
|
-
/** Standort -> Substation */
|
|
395
|
-
//console.log(`Standorte currentLimit = ${currentLimit} offset = ${offset}`);
|
|
396
|
-
await this.convertStandorte(currentLimit, offset);
|
|
397
|
-
const standortIDs = [...this.integralStandorte.keys()];
|
|
398
|
-
|
|
399
|
-
// if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} convertStandorte offset = ${offset}`);
|
|
400
|
-
|
|
401
|
-
/** Schaltanlagen -> VoltageLevels */
|
|
402
|
-
//console.log(`Schaltanlagen currentLimit = ${currentLimit} offset = ${offset}`);
|
|
403
|
-
await this.covertSchaltanlagen(standortIDs);
|
|
404
|
-
const schaltanlagenIDs = [...this.integralSchaltanlagen.keys()];
|
|
405
|
-
|
|
406
|
-
//if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} covertSchaltanlagen offset = ${offset}`);
|
|
407
|
-
|
|
408
|
-
/** Schaltanlagenabschnitte -> Mappen auf bereits erstelltes VoltageLevel-Objekt (Schaltanlage) */
|
|
409
|
-
//console.log(`SAAB currentLimit = ${currentLimit} offset = ${offset}`);
|
|
410
|
-
if (schaltanlagenIDs.length > 0) {
|
|
411
|
-
await this.convertSchaltanlagenAbschnitte(schaltanlagenIDs);
|
|
412
|
-
}
|
|
413
|
-
const schaltanlagenAbschnittIDs = [...this.integralSchaltanlagenAbschnitte.keys()];
|
|
414
|
-
|
|
415
|
-
// if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} convertSchaltanlagenAbschnitte offset = ${offset}`);
|
|
416
|
-
/** Schaltfelder -> Bay */
|
|
417
|
-
//console.log(`Bay currentLimit = ${currentLimit} offset = ${offset}`);
|
|
418
|
-
if (schaltanlagenAbschnittIDs.length > 0) {
|
|
419
|
-
await this.convertSchaltfelder(schaltanlagenAbschnittIDs);
|
|
420
|
-
}
|
|
421
|
-
this.schaltfeldIDs = [...this.integralSchaltfelder.keys()];
|
|
422
|
-
//if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} convertSchaltfelder offset = ${offset}`);
|
|
423
|
-
|
|
424
|
-
/** Querkupplungen -> Bay */
|
|
425
|
-
//console.log(`QK currentLimit = ${currentLimit} offset = ${offset}`);
|
|
426
|
-
if (schaltanlagenAbschnittIDs.length > 0) {
|
|
427
|
-
await this.convertQuerkupplungen(schaltanlagenAbschnittIDs);
|
|
428
|
-
}
|
|
429
|
-
//if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} Querkupplungen offset = ${offset}`);
|
|
430
|
-
|
|
431
|
-
/** Laegskupplungen -> Bay */
|
|
432
|
-
//console.log(`LK currentLimit = ${currentLimit} offset = ${offset}`);
|
|
433
|
-
if (schaltanlagenIDs.length > 0) {
|
|
434
|
-
await this.convertLaegskupplungen(schaltanlagenIDs);
|
|
435
|
-
}
|
|
436
|
-
//if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} Laegskupplungen offset = ${offset}`);
|
|
437
|
-
/** Stromkreise s.o.*/
|
|
438
|
-
/** Ende EQUIPMENT CONTAINER */
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
/** START Integral 7 Knoten */
|
|
442
|
-
/** Abzweigpunkte KnotenSo -> */
|
|
443
|
-
//console.log(`KnotenSo currentLimit = ${currentLimit} offset = ${offset}`);
|
|
444
|
-
await this.convertKnotenSo(standortIDs);
|
|
445
|
-
const knotenSoIDs = [...this.integralKnotenSo.keys()];
|
|
446
|
-
//if (offset >=0) console.log(`9082->${this.integralID2UUID.get(9082)} convertKnotenSo offset = ${offset}`);
|
|
447
|
-
/** KnotenSf */
|
|
448
|
-
//console.log(`KnotenSf currentLimit = ${currentLimit} offset = ${offset}`);
|
|
449
|
-
if (this.schaltfeldIDs.length > 0) {
|
|
450
|
-
await this.convertKnotenSf(this.schaltfeldIDs);
|
|
451
|
-
}
|
|
452
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} KnotenSf offset = ${offset}`);
|
|
453
|
-
/** Querkupplungen Knoten */
|
|
454
|
-
//console.log(`Kf currentLimit = ${currentLimit} offset = ${offset}`);
|
|
455
|
-
if (this.querkupplungIDs.length > 0) {
|
|
456
|
-
await this.convertKnotenKf(this.querkupplungIDs);
|
|
457
|
-
}
|
|
458
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Querkupplungen Knoten offset = ${offset}`);
|
|
459
|
-
/** Laegskupplungen Knoten */
|
|
460
|
-
//console.log(`Lk currentLimit = ${currentLimit} offset = ${offset}`);
|
|
461
|
-
if (this.laengskupplungIDs.length > 0) {
|
|
462
|
-
await this.convertKnotenLk(this.laengskupplungIDs);
|
|
463
|
-
}
|
|
464
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Laegskupplungen Knoten offset = ${offset}`);
|
|
465
|
-
/** Schlaufen */
|
|
466
|
-
//console.log(`Schlaufe currentLimit = ${currentLimit} offset = ${offset}`);
|
|
467
|
-
if (knotenSoIDs.length > 0) {
|
|
468
|
-
await this.convertSchlaufen(knotenSoIDs);
|
|
469
|
-
}
|
|
470
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Schlaufen offset = ${offset}`);
|
|
471
|
-
/** Ende Integral 7 Knoten */
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
/** START CONDUCTING EQUIPMENT */
|
|
475
|
-
|
|
476
|
-
/** Sammelschienenabschnitte -> BusbarSections */
|
|
477
|
-
//console.log(`SSAB currentLimit = ${currentLimit} offset = ${offset}`);
|
|
478
|
-
if (schaltanlagenAbschnittIDs.length > 0) {
|
|
479
|
-
await this.convertSammelschienenAbschnitte(schaltanlagenAbschnittIDs);
|
|
480
|
-
}
|
|
481
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Sammelschienenabschnitte offset = ${offset}`);
|
|
482
|
-
/** Belastungen -> EnergyConsumer */
|
|
483
|
-
//console.log(`Last currentLimit = ${currentLimit} offset = ${offset}`);
|
|
484
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
485
|
-
await this.convertBelastungen([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
486
|
-
}
|
|
487
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} convertBelastungen offset = ${offset}`);
|
|
488
|
-
|
|
489
|
-
/** Einspeisungen -> EnergySources */
|
|
490
|
-
//console.log(`EEG currentLimit = ${currentLimit} offset = ${offset}`);
|
|
491
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
492
|
-
await this.convertEinspeisungen([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
493
|
-
}
|
|
494
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Einspeisungen offset = ${offset}`);
|
|
495
|
-
|
|
496
|
-
/** Generatoren -> SynchronousMachine */
|
|
497
|
-
//console.log(`Gen currentLimit = ${currentLimit} offset = ${offset}`);
|
|
498
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
499
|
-
await this.convertGeneratoren([...knotenSoIDs, ...this.knotenSfIDs], energyTypesConfig);
|
|
500
|
-
}
|
|
501
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
502
|
-
await this.convertAsynchronmotor([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
503
|
-
}
|
|
504
|
-
// if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Generatoren offset = ${offset}`);
|
|
505
|
-
|
|
506
|
-
/** starre Anschluesse als Junction. Sammelschienen müssen zuertst konvertiert werden*/
|
|
507
|
-
//console.log(`Starr currentLimit = ${currentLimit} offset = ${offset}`);
|
|
508
|
-
const containerStarreVerbindungen = [...this.schaltfeldIDs, ...this.querkupplungIDs, ...this.laengskupplungIDs];
|
|
509
|
-
if (containerStarreVerbindungen.length > 0) {
|
|
510
|
-
await this.convertStarreVerbindungen(containerStarreVerbindungen);
|
|
511
|
-
}
|
|
512
|
-
// if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} containerStarreVerbindungen offset = ${offset}`);
|
|
513
|
-
|
|
514
|
-
//console.log(`Trennschalter 3f`);
|
|
515
|
-
if (containerStarreVerbindungen.length > 0) {
|
|
516
|
-
await this.convertTrenner3f(containerStarreVerbindungen);
|
|
517
|
-
}
|
|
518
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} convertTrenner3f offset = ${offset}`);
|
|
519
|
-
|
|
520
|
-
//console.log(`Trennschalter Fi 3f`);
|
|
521
|
-
if (containerStarreVerbindungen.length > 0) {
|
|
522
|
-
await this.convertTrennerFi3f(containerStarreVerbindungen);
|
|
523
|
-
}
|
|
524
|
-
//if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} convertTrennerFi3f offset = ${offset}`);
|
|
525
|
-
|
|
526
|
-
//console.log(`Leistungsschalter`);
|
|
527
|
-
if (containerStarreVerbindungen.length > 0) {
|
|
528
|
-
await this.convertLeistungsschalter(containerStarreVerbindungen);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/** hguekopfklassisch */
|
|
532
|
-
//console.log(`Last currentLimit = ${currentLimit} offset = ${offset}`);
|
|
533
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
534
|
-
await this.convertCsConverterDC([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/** netz_hguekopfvsc */
|
|
538
|
-
//console.log(`Last currentLimit = ${currentLimit} offset = ${offset}`);
|
|
539
|
-
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
540
|
-
await this.convertVsConverterDC([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/** Ende CONDUCTING EQUIPMENT */
|
|
545
|
-
/** Schema konvertieren */
|
|
546
|
-
//console.log(`Schema currentLimit = ${currentLimit} offset = ${offset}`);
|
|
547
|
-
await this.convertSchemaStandorte(standortIDs);
|
|
548
|
-
//if (offset === 1800 || offset === 1900) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaStandorte offset = ${offset}`);
|
|
549
|
-
if (knotenSoIDs.length > 0) {
|
|
550
|
-
await this.convertSchemaKnotenSo(knotenSoIDs);
|
|
551
|
-
}
|
|
552
|
-
//if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaKnotenSo offset = ${offset}`);
|
|
553
|
-
|
|
554
|
-
if (schaltanlagenIDs.length > 0) {
|
|
555
|
-
await this.convertSchemaSchaltanlage(schaltanlagenIDs);
|
|
556
|
-
}
|
|
557
|
-
// if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaSchaltanlage offset = ${offset}`);
|
|
558
|
-
|
|
559
|
-
if (schaltanlagenAbschnittIDs.length > 0) {
|
|
560
|
-
await this.convertSchemaSchaltanlagenAbschnitte(schaltanlagenAbschnittIDs);
|
|
561
|
-
}
|
|
562
|
-
// if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaSchaltanlagenAbschnitte offset = ${offset}`);
|
|
563
|
-
|
|
564
|
-
await this.convertSchemaSammelschienenAbschnitte();
|
|
565
|
-
// if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaSammelschienenAbschnitte offset = ${offset}`);
|
|
566
|
-
|
|
567
|
-
if (this.schaltfeldIDs.length > 0) {
|
|
568
|
-
await this.convertSchemaSchaltfelder(this.schaltfeldIDs);
|
|
569
|
-
}
|
|
570
|
-
// if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaSchaltfelder offset = ${offset}`);
|
|
571
|
-
|
|
572
|
-
/** Export EQ */
|
|
573
|
-
/** DC Modell wird nach den HGÜ-Leitungen exportiert */
|
|
574
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.substations, RDF_XML.PROFILE_EQ);
|
|
575
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.voltageLevels, RDF_XML.PROFILE_EQ);
|
|
576
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.bays, RDF_XML.PROFILE_EQ);
|
|
577
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.busbarSections, RDF_XML.PROFILE_EQ);
|
|
578
|
-
|
|
579
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.powerTransformer, RDF_XML.PROFILE_EQ);
|
|
580
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.junctions, RDF_XML.PROFILE_EQ);
|
|
581
|
-
|
|
582
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.energyConsumers, RDF_XML.PROFILE_EQ);
|
|
583
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.energySources, RDF_XML.PROFILE_EQ);
|
|
584
|
-
|
|
585
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.disconnectors, RDF_XML.PROFILE_EQ);
|
|
586
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.breakers, RDF_XML.PROFILE_EQ);
|
|
587
|
-
|
|
588
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.synchronousMachine, RDF_XML.PROFILE_EQ);
|
|
589
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.asynchronousMachine, RDF_XML.PROFILE_EQ);
|
|
590
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.generatingUnit, RDF_XML.PROFILE_EQ);
|
|
591
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.thermalGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
592
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.nuclearGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
593
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.hydroGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
594
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.windGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
595
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.solarGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
596
|
-
|
|
597
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.regulatingControl, RDF_XML.PROFILE_EQ);
|
|
598
|
-
this.objectArrayToCIMXML(xmlWriterEQ, this.cimModel.fossilFuel, RDF_XML.PROFILE_EQ);
|
|
599
|
-
|
|
600
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.reactiveCapabilityCurve, RDF_XML.PROFILE_EQ);
|
|
601
|
-
this.objectArrayToCIMXML(xmlWriterEQ, this.cimModel.curveData, RDF_XML.PROFILE_EQ);
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
// this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitTypes, RDF_XML.PROFILE_EQ);
|
|
605
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitSets, RDF_XML.PROFILE_EQ);
|
|
606
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.currentLimits, RDF_XML.PROFILE_EQ);
|
|
607
|
-
|
|
608
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.connectivityNodes, RDF_XML.PROFILE_EQ);
|
|
609
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
/** Export DL */
|
|
613
|
-
this.objectToCIMXML(xmlWriterDL, this.cimModel.diagramObjects, RDF_XML.PROFILE_DL);
|
|
614
|
-
|
|
615
|
-
/** Export SV */
|
|
616
|
-
this.objectToCIMXML(xmlWriterSSH, this.cimModel.energyConsumers, RDF_XML.PROFILE_SSH);
|
|
617
|
-
// this.objectToCIMXML(xmlWriterSSH, this.cimModel.energyConsumers, RDF_XML.PROFILE_SSH);
|
|
618
|
-
this.objectToCIMXML(xmlWriterSSH, this.cimModel.energySources, RDF_XML.PROFILE_SSH);
|
|
619
|
-
this.objectToCIMXML(xmlWriterSSH, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
620
|
-
|
|
621
|
-
this.objectToCIMXML(xmlWriterSSH, this.cimModel.disconnectors, RDF_XML.PROFILE_SSH);
|
|
622
|
-
this.objectToCIMXML(xmlWriterSSH, this.cimModel.breakers, RDF_XML.PROFILE_SSH);
|
|
623
|
-
|
|
624
|
-
this.objectArrayToCIMXML(xmlWriterSV, this.cimModel.svStatus, RDF_XML.PROFILE_SV);
|
|
625
|
-
this.objectArrayToCIMXML(xmlWriterSV, this.cimModel.svTapSteps, RDF_XML.PROFILE_SV);
|
|
626
|
-
|
|
627
|
-
/** Export AMP I7 */
|
|
628
|
-
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.bays, RDF_XML.PROFILE_AMPI7);
|
|
629
|
-
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.connectivityNodes, RDF_XML.PROFILE_AMPI7);
|
|
630
|
-
|
|
631
|
-
this.cimModel.substations.clear();
|
|
632
|
-
this.cimModel.voltageLevels.clear();
|
|
633
|
-
this.cimModel.bays.clear();
|
|
634
|
-
this.cimModel.busbarSections.clear();
|
|
635
|
-
|
|
636
|
-
this.cimModel.disconnectors.clear();
|
|
637
|
-
this.cimModel.breakers.clear();
|
|
638
|
-
|
|
639
|
-
this.cimModel.energyConsumers.clear();
|
|
640
|
-
this.cimModel.energySources.clear();
|
|
641
|
-
|
|
642
|
-
this.cimModel.synchronousMachine.clear();
|
|
643
|
-
this.cimModel.asynchronousMachine.clear();
|
|
644
|
-
this.cimModel.generatingUnit.clear();
|
|
645
|
-
this.cimModel.thermalGeneratingUnit.clear();
|
|
646
|
-
this.cimModel.nuclearGeneratingUnit.clear();
|
|
647
|
-
this.cimModel.hydroGeneratingUnit.clear();
|
|
648
|
-
this.cimModel.windGeneratingUnit.clear();
|
|
649
|
-
this.cimModel.solarGeneratingUnit.clear();
|
|
650
|
-
|
|
651
|
-
this.cimModel.regulatingControl.clear();
|
|
652
|
-
this.cimModel.reactiveCapabilityCurve.clear();
|
|
653
|
-
|
|
654
|
-
this.cimModel.junctions.clear();
|
|
655
|
-
|
|
656
|
-
this.cimModel.curveData.length = 0;
|
|
657
|
-
this.cimModel.fossilFuel.length = 0;
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
this.cimModel.connectivityNodes.clear();
|
|
661
|
-
this.cimModel.terminals.clear();
|
|
662
|
-
this.cimModel.diagramObjects.clear();
|
|
663
|
-
this.cimModel.objects.clear();
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
this.cimModel.svStatus.length = 0;
|
|
667
|
-
this.cimModel.svTapSteps.length = 0;
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
this.querkupplungIDs.length = 0;
|
|
671
|
-
this.laengskupplungIDs.length = 0;
|
|
672
|
-
this.knotenSoIDs.length = 0;
|
|
673
|
-
this.knotenSfIDs.length = 0;
|
|
674
|
-
this.knotenSfIDs.length = 0;
|
|
675
|
-
|
|
676
|
-
/** Integral 7 Modell leeren*/
|
|
677
|
-
this.integralStandorte.clear();
|
|
678
|
-
this.integralSchaltanlagen.clear();
|
|
679
|
-
this.integralSchaltanlagenAbschnitte.clear();
|
|
680
|
-
this.integralSchaltfelder.clear();
|
|
681
|
-
this.integralKnotenSo.clear();
|
|
682
|
-
|
|
683
|
-
this.integralNsgStandort.clear();
|
|
684
|
-
this.integralNsgSchaltanlage.clear();
|
|
685
|
-
this.integralNsgSchaltanlagenabschnitt.clear();
|
|
686
|
-
this.integralNsgSchaltfelder.clear();
|
|
687
|
-
this.integralNsgKnotenSo.clear();
|
|
688
|
-
console.log(`Offset ${offset} done`);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
/** Ersatzlaengszweige */
|
|
692
|
-
const restCountELZ = this.ersatzlaengszweigAnzahl < this.limit ? this.ersatzlaengszweigAnzahl : (this.ersatzlaengszweigAnzahl % this.limit);
|
|
693
|
-
const intervalCountELZ = (this.ersatzlaengszweigAnzahl - restCountELZ) / this.limit;
|
|
694
|
-
const numberOfIntervalsELZ = restCountELZ > 0 ? intervalCountELZ + 1 : intervalCountELZ;
|
|
695
|
-
console.log('Convert Ersatzlaengszweige ' + this.ersatzlaengszweigAnzahl);
|
|
696
|
-
for (let i = 0; i < numberOfIntervalsELZ; i++) {
|
|
697
|
-
const offset = i * this.limit;
|
|
698
|
-
const currentLimit = (i + 1 === numberOfIntervalsELZ && restCountELZ > 0) ? restCountELZ : this.limit;
|
|
699
|
-
|
|
700
|
-
await this.convertErsatzLaengszweige(currentLimit, offset);
|
|
701
|
-
|
|
702
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.equivalentBranches, RDF_XML.PROFILE_EQ);
|
|
703
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
704
|
-
|
|
705
|
-
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
706
|
-
|
|
707
|
-
/** Collections leeren */
|
|
708
|
-
this.cimModel.equivalentBranches.clear();
|
|
709
|
-
this.cimModel.connectivityNodes.clear();
|
|
710
|
-
this.cimModel.terminals.clear();
|
|
711
|
-
|
|
712
|
-
this.cimModel.objects.clear();
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
/** Leitungen werden aufgrund besonderer Struktur separat implementiert. */
|
|
717
|
-
const restCountLeitung = this.leitungsAnzahl < this.limit ? this.leitungsAnzahl : (this.leitungsAnzahl % this.limit);
|
|
718
|
-
const intervalCountLeitung = (this.leitungsAnzahl - restCountLeitung) / this.limit;
|
|
719
|
-
const numberOfIntervalsLeitung = restCountLeitung > 0 ? intervalCountLeitung + 1 : intervalCountLeitung;
|
|
720
|
-
console.log('Convert ACLineSegments ' + this.leitungsAnzahl);
|
|
721
|
-
/** Stromkreisabschnitte */
|
|
722
|
-
for (let i = 0; i < numberOfIntervalsLeitung; i++) {
|
|
723
|
-
const offset = i * this.limit;
|
|
724
|
-
const currentLimit = (i + 1 === numberOfIntervalsLeitung && restCountLeitung > 0) ? restCountLeitung : this.limit;
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
await this.convertLeitungen(currentLimit, offset);
|
|
728
|
-
this.leitungsIDs = [...this.integralLeitungen.keys()];
|
|
729
|
-
|
|
730
|
-
if (this.leitungsIDs.length > 0)
|
|
731
|
-
await this.determineLeitungsTypen(this.leitungsIDs);
|
|
732
|
-
|
|
733
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.acLineSegments, RDF_XML.PROFILE_EQ);
|
|
734
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
735
|
-
|
|
736
|
-
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
737
|
-
|
|
738
|
-
// AMP
|
|
739
|
-
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.acLineSegments, RDF_XML.PROFILE_AMPI7);
|
|
740
|
-
|
|
741
|
-
/** Collections leeren */
|
|
742
|
-
this.cimModel.acLineSegments.clear();
|
|
743
|
-
this.cimModel.connectivityNodes.clear();
|
|
744
|
-
this.cimModel.terminals.clear();
|
|
745
|
-
this.cimModel.diagramObjects.clear();
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
this.cimModel.objects.clear();
|
|
749
|
-
this.integralLeitungen.clear();
|
|
750
|
-
this.leitungsIDs.length = 0;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
/** HGÜ-Leitungen . */
|
|
754
|
-
const restCountHgueLeitung = this.hgueLeitungsAnzahl < this.limit ? this.hgueLeitungsAnzahl : (this.hgueLeitungsAnzahl % this.limit);
|
|
755
|
-
const intervalCountHgueLeitung = (this.hgueLeitungsAnzahl - restCountHgueLeitung) / this.limit;
|
|
756
|
-
const numberOfIntervalsHgueLeitung = restCountHgueLeitung > 0 ? intervalCountHgueLeitung + 1 : intervalCountHgueLeitung;
|
|
757
|
-
console.log('Convert ACLineSegments ' + this.hgueLeitungsAnzahl);
|
|
758
|
-
/** HGÜ Stromkreisabschnitte */
|
|
759
|
-
for (let i = 0; i < numberOfIntervalsHgueLeitung; i++) {
|
|
760
|
-
const offset = i * this.limit;
|
|
761
|
-
const currentLimit = (i + 1 === numberOfIntervalsHgueLeitung && restCountHgueLeitung > 0) ? restCountHgueLeitung : this.limit;
|
|
762
|
-
await this.convertDCLines(currentLimit, offset);
|
|
763
|
-
|
|
764
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.dcLines, RDF_XML.PROFILE_EQ);
|
|
765
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.dcLineSegment, RDF_XML.PROFILE_EQ);
|
|
766
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.dcTerminals, RDF_XML.PROFILE_EQ);
|
|
767
|
-
|
|
768
|
-
/** Collections leeren */
|
|
769
|
-
this.cimModel.dcLines.clear();
|
|
770
|
-
this.cimModel.dcLineSegment.clear();
|
|
771
|
-
this.cimModel.dcTerminals.clear();
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
/** Längsdrossel */
|
|
775
|
-
const restCountLD = this.laengsdrosselAnzahl < this.limit ? this.laengsdrosselAnzahl : (this.laengsdrosselAnzahl % this.limit);
|
|
776
|
-
const intervalCountLD = (this.laengsdrosselAnzahl - restCountLD) / this.limit;
|
|
777
|
-
const numberOfIntervalsLD = restCountLD > 0 ? intervalCountLD + 1 : intervalCountLD;
|
|
778
|
-
console.log('Convert Längsdrossel ' + this.laengsdrosselAnzahl);
|
|
779
|
-
for (let i = 0; i < numberOfIntervalsLD; i++) {
|
|
780
|
-
const offset = i * this.limit;
|
|
781
|
-
const currentLimit = (i + 1 === numberOfIntervalsLD && restCountLD > 0) ? restCountLD : this.limit;
|
|
782
|
-
await this.convertLaengsdrosseln(currentLimit, offset);
|
|
783
|
-
|
|
784
|
-
// EQ
|
|
785
|
-
console.log('Export Längsdrossel ' + this.cimModel.seriesCompensators.size);
|
|
786
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.seriesCompensators, RDF_XML.PROFILE_EQ);
|
|
787
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitSets, RDF_XML.PROFILE_EQ);
|
|
788
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.currentLimits, RDF_XML.PROFILE_EQ);
|
|
789
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
790
|
-
|
|
791
|
-
// SSH
|
|
792
|
-
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
793
|
-
|
|
794
|
-
// AMP
|
|
795
|
-
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.seriesCompensators, RDF_XML.PROFILE_AMPI7);
|
|
796
|
-
|
|
797
|
-
/** Collections leeren */
|
|
798
|
-
this.cimModel.seriesCompensators.clear();
|
|
799
|
-
this.cimModel.operationalLimitSets.clear();
|
|
800
|
-
this.cimModel.currentLimits.clear();
|
|
801
|
-
|
|
802
|
-
this.cimModel.terminals.clear();
|
|
803
|
-
|
|
804
|
-
this.cimModel.objects.clear();
|
|
805
|
-
|
|
806
|
-
}
|
|
807
|
-
/** Transformatoren 2W */
|
|
808
|
-
const restCountTrafo2W = this.trafo2WAnzahl < this.limit ? this.trafo2WAnzahl : (this.trafo2WAnzahl % this.limit);
|
|
809
|
-
const intervalCountTrafo2W = (this.trafo2WAnzahl - restCountTrafo2W) / this.limit;
|
|
810
|
-
const numberOfIntervalsTrafo2W = restCountTrafo2W > 0 ? intervalCountTrafo2W + 1 : intervalCountTrafo2W;
|
|
811
|
-
console.log('Convert Transformers');
|
|
812
|
-
for (let i = 0; i < numberOfIntervalsTrafo2W; i++) {
|
|
813
|
-
const offset = i * this.limit;
|
|
814
|
-
const currentLimit = (i + 1 === numberOfIntervalsTrafo2W && restCountTrafo2W > 0) ? restCountTrafo2W : this.limit;
|
|
815
|
-
|
|
816
|
-
await this.convertTrafo2W(currentLimit, offset);
|
|
817
|
-
|
|
818
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.powerTransformer, RDF_XML.PROFILE_EQ);
|
|
819
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
820
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.tapChangerControls, RDF_XML.PROFILE_EQ);
|
|
821
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.ratioTapChangers, RDF_XML.PROFILE_EQ);
|
|
822
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.ratioTapChangerTables, RDF_XML.PROFILE_EQ);
|
|
823
|
-
|
|
824
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitSets, RDF_XML.PROFILE_EQ);
|
|
825
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.currentLimits, RDF_XML.PROFILE_EQ);
|
|
826
|
-
|
|
827
|
-
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
828
|
-
|
|
829
|
-
/** Collections leeren */
|
|
830
|
-
this.cimModel.powerTransformer.clear();
|
|
831
|
-
|
|
832
|
-
this.cimModel.currentLimits.clear();
|
|
833
|
-
this.cimModel.operationalLimitSets.clear();
|
|
834
|
-
// this.cimModel.operationalLimitTypes.clear()
|
|
835
|
-
|
|
836
|
-
this.cimModel.tapChangerControls.clear();
|
|
837
|
-
this.cimModel.ratioTapChangers.clear();
|
|
838
|
-
|
|
839
|
-
for (const table of this.cimModel.ratioTapChangerTables.values()) {
|
|
840
|
-
table.ratioTapChangerTablePoints = [];
|
|
841
|
-
}
|
|
842
|
-
this.cimModel.ratioTapChangerTables.clear();
|
|
843
|
-
this.cimModel.svTapSteps.length = 0;
|
|
844
|
-
this.cimModel.terminals.clear();
|
|
845
|
-
|
|
846
|
-
this.cimModel.objects.clear();
|
|
847
|
-
|
|
848
|
-
//
|
|
849
|
-
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
/** Transformatoren 3W */
|
|
853
|
-
const restCountTrafo3W = this.trafo2WAnzahl < this.limit ? this.trafo3WAnzahl : (this.trafo3WAnzahl % this.limit);
|
|
854
|
-
const intervalCountTrafo3W = (this.trafo3WAnzahl - restCountTrafo3W) / this.limit;
|
|
855
|
-
const numberOfIntervalsTrafo3W = restCountTrafo3W > 0 ? intervalCountTrafo3W + 1 : intervalCountTrafo3W;
|
|
856
|
-
console.log('Convert Transformers3W');
|
|
857
|
-
for (let i = 0; i < numberOfIntervalsTrafo3W; i++) {
|
|
858
|
-
const offset = i * this.limit;
|
|
859
|
-
const currentLimit = (i + 1 === numberOfIntervalsTrafo3W && restCountTrafo3W > 0) ? restCountTrafo3W : this.limit;
|
|
860
|
-
|
|
861
|
-
await this.convertTrafo3W(currentLimit, offset);
|
|
862
|
-
|
|
863
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.powerTransformer, RDF_XML.PROFILE_EQ);
|
|
864
|
-
this.cimModel.powerTransformer.clear();
|
|
865
|
-
|
|
866
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.currentLimits, RDF_XML.PROFILE_EQ);
|
|
867
|
-
this.cimModel.currentLimits.clear();
|
|
868
|
-
|
|
869
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.terminals, RDF_XML.PROFILE_EQ);
|
|
870
|
-
this.cimModel.terminals.clear();
|
|
871
|
-
|
|
872
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.tapChangerControls, RDF_XML.PROFILE_EQ);
|
|
873
|
-
this.cimModel.tapChangerControls.clear();
|
|
874
|
-
|
|
875
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.ratioTapChangers, RDF_XML.PROFILE_EQ);
|
|
876
|
-
this.cimModel.ratioTapChangers.clear();
|
|
877
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.ratioTapChangerTables, RDF_XML.PROFILE_EQ);
|
|
878
|
-
|
|
879
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitSets, RDF_XML.PROFILE_EQ);
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
883
|
-
|
|
884
|
-
/** Collections leeren */
|
|
885
|
-
|
|
886
|
-
this.cimModel.operationalLimitSets.clear();
|
|
887
|
-
// this.cimModel.operationalLimitTypes.clear()
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
for (const table of this.cimModel.ratioTapChangerTables.values()) {
|
|
891
|
-
table.ratioTapChangerTablePoints = [];
|
|
892
|
-
}
|
|
893
|
-
this.cimModel.ratioTapChangerTables.clear();
|
|
894
|
-
this.cimModel.svTapSteps.length = 0;
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
this.cimModel.objects.clear();
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
const memoryTerminals = new Map();
|
|
901
|
-
for (const entry of this.memoryObjects.entries()) {
|
|
902
|
-
const value = entry[1];
|
|
903
|
-
if (value instanceof Terminal) {
|
|
904
|
-
const terminal = value as Terminal;
|
|
905
|
-
if (terminal.conductingEquipment || terminal.conductingEquipmentUUID) {
|
|
906
|
-
memoryTerminals.set(value.mrid, value);
|
|
907
|
-
} else {
|
|
908
|
-
console.log(`Terminal ohne conductingEquipment UUID ${terminal.mrid} shortName ${terminal.shortName} ID | ${entry[0]}`);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
/** EQ */
|
|
913
|
-
// this.objectToCIMXML(xmlWriterEQ, this.cimModel.connectivityNodes, RDF_XML.PROFILE_EQ);
|
|
914
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.operationalLimitTypes, RDF_XML.PROFILE_EQ);
|
|
915
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.baseVoltages, RDF_XML.PROFILE_EQ);
|
|
916
|
-
this.objectToCIMXML(xmlWriterEQ, memoryTerminals, RDF_XML.PROFILE_EQ);
|
|
917
|
-
this.objectToCIMXML(xmlWriterSSH, memoryTerminals, RDF_XML.PROFILE_SSH);
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
/** HGÜ Kopfstationen */
|
|
921
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.dcConverterUnit, RDF_XML.PROFILE_EQ);
|
|
922
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.vsConverter, RDF_XML.PROFILE_EQ);
|
|
923
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.csConverter, RDF_XML.PROFILE_EQ);
|
|
924
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.acDCConverterDCTerminals, RDF_XML.PROFILE_EQ);
|
|
925
|
-
this.objectToCIMXML(xmlWriterEQ, this.cimModel.dcNodes, RDF_XML.PROFILE_EQ);
|
|
926
|
-
|
|
927
|
-
this.cimModel.dcConverterUnit.clear();
|
|
928
|
-
this.cimModel.vsConverter.clear();
|
|
929
|
-
this.cimModel.csConverter.clear();
|
|
930
|
-
this.cimModel.acDCConverterDCTerminals.clear();
|
|
931
|
-
this.cimModel.dcNodes.clear();
|
|
932
|
-
|
|
933
|
-
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.psrTypes, RDF_XML.PROFILE_AMPI7);
|
|
934
|
-
|
|
935
|
-
/* this.objectToCIMXML(xmlWriterEQ, memoryTerminals, RDF_XML.PROFILE_EQ);
|
|
936
|
-
/!** SV *!/
|
|
937
|
-
this.objectToCIMXML(xmlWriterSSH, memoryTerminals, RDF_XML.PROFILE_SSH); // Schaltzustände*/
|
|
938
|
-
|
|
939
|
-
this.cimModel.operationalLimitTypes.clear();
|
|
940
|
-
this.cimModel.baseVoltages.clear();
|
|
941
|
-
memoryTerminals.clear();
|
|
942
|
-
|
|
943
|
-
this.writeHeaderEnd(xmlWriterEQ);
|
|
944
|
-
writeStreamEQ.end();
|
|
945
|
-
writeStreamEQ.close();
|
|
946
|
-
|
|
947
|
-
/** DL */
|
|
948
|
-
this.writeHeaderEnd(xmlWriterDL);
|
|
949
|
-
writeStreamDL.end();
|
|
950
|
-
writeStreamDL.close();
|
|
951
|
-
|
|
952
|
-
/** SSH */
|
|
953
|
-
this.writeHeaderEnd(xmlWriterSSH);
|
|
954
|
-
writeStreamSSH.end();
|
|
955
|
-
writeStreamSSH.close();
|
|
956
|
-
|
|
957
|
-
/** SV */
|
|
958
|
-
this.writeHeaderEnd(xmlWriterSV);
|
|
959
|
-
writeStreamSV.end();
|
|
960
|
-
writeStreamSV.close();
|
|
961
|
-
|
|
962
|
-
/** Amprion I7 */
|
|
963
|
-
this.writeHeaderEnd(xmlWriterAmpI7);
|
|
964
|
-
writeStreamAmpI7.end();
|
|
965
|
-
writeStreamAmpI7.close();
|
|
966
|
-
|
|
967
|
-
await Promise.all([
|
|
968
|
-
createWriteStreamPromise(writeStreamEQ),
|
|
969
|
-
createWriteStreamPromise(writeStreamDL),
|
|
970
|
-
createWriteStreamPromise(writeStreamSSH),
|
|
971
|
-
createWriteStreamPromise(writeStreamSV),
|
|
972
|
-
createWriteStreamPromise(writeStreamAmpI7),
|
|
973
|
-
]);
|
|
974
|
-
|
|
975
|
-
const zip = new JSZip();
|
|
976
|
-
// const filePathZip = path.join(tempDirPath, 'cgmes.zip');
|
|
977
|
-
const readStreamEq = fs.createReadStream(filePathEQ);
|
|
978
|
-
zip.file('EQ.xml', readStreamEq);
|
|
979
|
-
|
|
980
|
-
const readStreamDl = fs.createReadStream(filePathDL);
|
|
981
|
-
zip.file('DL.xml', readStreamDl);
|
|
982
|
-
|
|
983
|
-
const readStreamSSH = fs.createReadStream(filePathSSH);
|
|
984
|
-
zip.file('SSH.xml', readStreamSSH);
|
|
985
|
-
|
|
986
|
-
const readStreamSV = fs.createReadStream(filePathSV);
|
|
987
|
-
zip.file('SV.xml', readStreamSV);
|
|
988
|
-
|
|
989
|
-
const readStreamAmpI7 = fs.createReadStream(filePathAmpI7);
|
|
990
|
-
zip.file('AMP_I7.xml', readStreamAmpI7);
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
resolve(await generateNodeStream(zip));
|
|
994
|
-
|
|
995
|
-
/* if (exportPath) {
|
|
996
|
-
console.log('Path ' + filePathZip);
|
|
997
|
-
resolve(await writeZipFile(zip, filePathZip));
|
|
998
|
-
} else {
|
|
999
|
-
resolve({status: 'successful', message: 'ok', data: zip.generateAsync({type:'nodebuffer', streamFiles: true})});
|
|
1000
|
-
}*/
|
|
1001
|
-
reject({status: 'error', message: 'GenerateNodeStream failed.'});
|
|
1002
|
-
} catch (e) {
|
|
1003
|
-
reject({status: 'error', message: e.toString()});
|
|
1004
|
-
}
|
|
1005
|
-
});
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
async release(tempDirPath?: string): Promise<ConverterStatus> {
|
|
1009
|
-
return new Promise(async (resolve, reject) => {
|
|
1010
|
-
try {
|
|
1011
|
-
this.closeConnection();
|
|
1012
|
-
this.cimModel.purgeData();
|
|
1013
|
-
|
|
1014
|
-
if (tempDirPath) {
|
|
1015
|
-
try {
|
|
1016
|
-
fs.rmdirSync(tempDirPath, { recursive: true });
|
|
1017
|
-
console.log(`${path} is deleted!`);
|
|
1018
|
-
} catch (err) {
|
|
1019
|
-
console.error(`Error while deleting ${path}.`);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
resolve({status: 'successful', message: 'ok'});
|
|
1023
|
-
} catch (e) {
|
|
1024
|
-
reject({status: 'error', message: JSON.stringify(e)});
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
/** Fragt die verfügbaren Tabellennamen. */
|
|
1030
|
-
private async getAvailableTableNames(database: string) {
|
|
1031
|
-
try {
|
|
1032
|
-
const results = await this.queryFunctionWrapper(`SHOW TABLES FROM ${database}`);
|
|
1033
|
-
for (const table of results) {
|
|
1034
|
-
this.availableTableNames.push(table[`Tables_in_${database}`]);
|
|
1035
|
-
}
|
|
1036
|
-
} catch (e) {
|
|
1037
|
-
console.error("ERROR:" + e);
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
private async queryObjectCount(tableName: string): Promise<number> {
|
|
1042
|
-
return new Promise((resolve, reject) => {
|
|
1043
|
-
if (this.isTableAvailable(tableName)) {
|
|
1044
|
-
this.queryFunctionWrapper(`SELECT COUNT(id) FROM ${tableName}`).then(results => {
|
|
1045
|
-
try {
|
|
1046
|
-
for (const result of results) {
|
|
1047
|
-
return resolve(Number(result[`COUNT(id)`]));
|
|
1048
|
-
}
|
|
1049
|
-
} catch (e) {
|
|
1050
|
-
return reject(0);
|
|
1051
|
-
}
|
|
1052
|
-
});
|
|
1053
|
-
} else {
|
|
1054
|
-
return resolve(0);
|
|
1055
|
-
}
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/** Topologie von Leitungen und Trafos */
|
|
1060
|
-
private async queryAnschlussIDs() {
|
|
1061
|
-
try {
|
|
1062
|
-
let results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.LEITUNG]}`);
|
|
1063
|
-
for (const result of results) {
|
|
1064
|
-
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
1065
|
-
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
1066
|
-
}
|
|
1067
|
-
results = await this.queryFunctionWrapper(`SELECT DISTINCT anetzobjekt, enetzobjekt FROM ${Integral7TableNames[I7Objects.HGUE_LEITUNG]}`);
|
|
1068
|
-
for (const result of results) {
|
|
1069
|
-
this.leitungAnschlussKnotenIDs.add(result[`anetzobjekt`]);
|
|
1070
|
-
this.leitungAnschlussKnotenIDs.add(result[`enetzobjekt`]);
|
|
1071
|
-
}
|
|
1072
|
-
results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.TRAFO2W]}`);
|
|
1073
|
-
for (const result of results) {
|
|
1074
|
-
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
1075
|
-
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
1076
|
-
}
|
|
1077
|
-
results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.TRAFO3_WICKLUNG]}`);
|
|
1078
|
-
for (const result of results) {
|
|
1079
|
-
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
1080
|
-
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
1081
|
-
}
|
|
1082
|
-
results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.LAENGSDROSSEL]}`);
|
|
1083
|
-
for (const result of results) {
|
|
1084
|
-
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
1085
|
-
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
1086
|
-
}
|
|
1087
|
-
results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.ERSATZLAENGSZWEIG]}`);
|
|
1088
|
-
for (const result of results) {
|
|
1089
|
-
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
1090
|
-
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
1091
|
-
}
|
|
1092
|
-
} catch (e) {
|
|
1093
|
-
console.error("ERROR:" + e);
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
async convertGeoRegionen() {
|
|
1098
|
-
if (this.isTableAvailable(Integral7TableNames.REGION)) {
|
|
1099
|
-
const result: Georegion[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.REGION, 0, 0, []));
|
|
1100
|
-
|
|
1101
|
-
for (const i7Data of result) {
|
|
1102
|
-
const region = new GeographicalRegion(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname);
|
|
1103
|
-
this.cimModel.addGeographicalRegion(region);
|
|
1104
|
-
this.integralID2UUID.set(i7Data.id, region.mrid);
|
|
1105
|
-
}
|
|
1106
|
-
} else {
|
|
1107
|
-
console.log(`Tabelle ${Integral7TableNames.REGION} ist nicht vorhanden.`);
|
|
1108
|
-
console.log(`Erstelle Standard Region ENTSO-E.`);
|
|
1109
|
-
createGeoregion(generateUUID(), 'ENTSO-E', 'default', 'Default GeographicalRegion', this.cimModel);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
async convertSubGeoRegionen() {
|
|
1114
|
-
if (this.isTableAvailable(Integral7TableNames.SUBREGION)) {
|
|
1115
|
-
|
|
1116
|
-
const result: Subgeoregion[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SUBREGION, 0, 0, []));
|
|
1117
|
-
|
|
1118
|
-
for (const i7Data of result) {
|
|
1119
|
-
const subregion = new SubGeographicalRegion(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname);
|
|
1120
|
-
|
|
1121
|
-
let region = this.cimModel.getGeographicalRegion(this.integralID2UUID.get(i7Data.georegion));
|
|
1122
|
-
if (!region) {
|
|
1123
|
-
region = createIfNotExitsGeoregionByName(this.cimModel, 'ENTSO-E');
|
|
1124
|
-
}
|
|
1125
|
-
subregion.region = region;
|
|
1126
|
-
region.addSubGeographicalRegion(subregion);
|
|
1127
|
-
|
|
1128
|
-
this.cimModel.addSubGeographicalRegion(subregion);
|
|
1129
|
-
this.integralID2UUID.set(i7Data.id, subregion.mrid);
|
|
1130
|
-
}
|
|
1131
|
-
} else {
|
|
1132
|
-
console.log(`Tabelle ${Integral7TableNames.SUBREGION} ist nicht vorhanden.`);
|
|
1133
|
-
console.log(`Erstelle Standard Subregion Deutschland.`);
|
|
1134
|
-
const region = createIfNotExitsGeoregionByName(this.cimModel, 'ENTSO-E');
|
|
1135
|
-
createIfNotExitsSubGeoregionByName(this.cimModel, 'Detschland', region);
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
async convertStandorte(limit: number, offset: number) {
|
|
1140
|
-
if (this.isTableAvailable(Integral7TableNames.STANDORT)) {
|
|
1141
|
-
const result: Standort[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.STANDORT, limit, offset, []));
|
|
1142
|
-
|
|
1143
|
-
for (const i7Data of result) {
|
|
1144
|
-
|
|
1145
|
-
const i7Schluessel = STANDORT_PRAEFIX +
|
|
1146
|
-
ueberpruefeZeichenkette(i7Data.ukz) +
|
|
1147
|
-
MITTIGER_PUNKT +
|
|
1148
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1149
|
-
const substation = new Substation(getUUID(i7Data.guid), getName(i7Data), i7Data.id + '', i7Schluessel);
|
|
1150
|
-
|
|
1151
|
-
let subregion = this.cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
1152
|
-
if (!subregion) {
|
|
1153
|
-
const region = createIfNotExitsGeoregionByName(this.cimModel, 'ENTSO-E');
|
|
1154
|
-
subregion = createIfNotExitsSubGeoregionByName(this.cimModel, 'Deutschland', region);
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
substation.subGeographicalRegion = subregion;
|
|
1158
|
-
// subregion.addSubstation(substation);
|
|
1159
|
-
|
|
1160
|
-
/** Speichern, um später Längsdrossel die VoltageLevelInstanz bestimmen zu können. */
|
|
1161
|
-
this.substationVoltagelevels.set(i7Data.id, []);
|
|
1162
|
-
this.cimModel.addSubstation(substation);
|
|
1163
|
-
this.integralID2UUID.set(i7Data.id, substation.mrid);
|
|
1164
|
-
putUUIDtoI7Ids(substation.mrid, i7Data.id, this.UUID2IntegralID);
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
/** Integral 7 Modell erstellen zur Berechnung der Netzschema */
|
|
1168
|
-
const standort = new StandortImpl(i7Data);
|
|
1169
|
-
this.integralStandorte.set(i7Data.id, standort);
|
|
1170
|
-
}
|
|
1171
|
-
} else {
|
|
1172
|
-
console.log(`Tabelle ${Integral7TableNames.STANDORT} ist nicht vorhanden.`);
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
async convertKnotenSo(standortIDs: number[]) {
|
|
1177
|
-
if (this.isTableAvailable(Integral7TableNames.KNOTEN_SO)) {
|
|
1178
|
-
const result: Abzweig[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KNOTEN_SO, 0, 0, standortIDs));
|
|
1179
|
-
for (const i7Data of result) {
|
|
1180
|
-
|
|
1181
|
-
const object = new KnotenSoImpl(i7Data);
|
|
1182
|
-
this.integralKnotenSo.set(i7Data.id, object);
|
|
1183
|
-
object.standort = this.integralStandorte.get(object.standortid);
|
|
1184
|
-
|
|
1185
|
-
const vl = new VoltageLevel(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
1186
|
-
const connectivityNode = new AMPRIONConnectivityNode(generateUUID(), 'Abzweig', 'knotenso');
|
|
1187
|
-
|
|
1188
|
-
connectivityNode.connectivityNodeContainer = vl;
|
|
1189
|
-
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
1190
|
-
|
|
1191
|
-
vl.addConnectivityNode(connectivityNode);
|
|
1192
|
-
|
|
1193
|
-
const un = getU(i7Data.un, this.deafultUn);
|
|
1194
|
-
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
1195
|
-
vl.baseVoltage = baseVoltage;
|
|
1196
|
-
|
|
1197
|
-
const substation = this.cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
1198
|
-
if (substation) {
|
|
1199
|
-
vl.substation = substation;
|
|
1200
|
-
substation.addVoltageLevel(vl);
|
|
1201
|
-
|
|
1202
|
-
const i7Schluessel = substation.description +
|
|
1203
|
-
KNOTEN_STANDORT_PRAEFIX +
|
|
1204
|
-
i7Data.un +
|
|
1205
|
-
MITTIGER_PUNKT +
|
|
1206
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1207
|
-
vl.description = i7Schluessel;
|
|
1208
|
-
connectivityNode.description = i7Schluessel;
|
|
1209
|
-
} else {
|
|
1210
|
-
console.log(`KnotenSo ${i7Data.id} ${vl.mrid} besitzt keine Substation.`);
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
//PSRType
|
|
1214
|
-
const psrType = getPSRType(this.cimModel, 'Abzweigmast');
|
|
1215
|
-
vl.psrTypeUUID = psrType?.mrid;
|
|
1216
|
-
// psrType.addPowerSystemResource(vl);
|
|
1217
|
-
|
|
1218
|
-
this.integralID2UUID.set(i7Data.id, connectivityNode.mrid);
|
|
1219
|
-
this.knotenSoIDs.push(i7Data.id);
|
|
1220
|
-
this.cimModel.addVoltageLevel(vl);
|
|
1221
|
-
this.cimModel.addConnectivityNode(connectivityNode);
|
|
1222
|
-
//Spannung speichern
|
|
1223
|
-
this.knotenSpannung.set(connectivityNode.mrid, baseVoltage);
|
|
1224
|
-
this.checkMemoryObject(i7Data.id, connectivityNode);
|
|
1225
|
-
}
|
|
1226
|
-
} else {
|
|
1227
|
-
console.log(`Tabelle ${Integral7TableNames.KNOTEN_SO} ist nicht vorhanden.`);
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
async covertSchaltanlagen(standortIDs: number[]) {
|
|
1232
|
-
if (this.isTableAvailable(Integral7TableNames.SCHALTANLAGE)) {
|
|
1233
|
-
const result: Anlage[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SCHALTANLAGE, 0, 0, standortIDs));
|
|
1234
|
-
// this.tableName2tableData.set(Integral7TableNames.SCHALTANLAGE, result);
|
|
1235
|
-
for (const i7Data of result) {
|
|
1236
|
-
const vl = new VoltageLevel(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
1237
|
-
|
|
1238
|
-
const un = getU(i7Data.un, this.deafultUn);
|
|
1239
|
-
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
1240
|
-
vl.baseVoltageUUID = baseVoltage.mrid;
|
|
1241
|
-
|
|
1242
|
-
this.cimModel.addVoltageLevel(vl);
|
|
1243
|
-
this.integralID2UUID.set(i7Data.id, vl.mrid);
|
|
1244
|
-
putUUIDtoI7Ids(vl.mrid, i7Data.id, this.UUID2IntegralID);
|
|
1245
|
-
|
|
1246
|
-
const substation = this.cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
1247
|
-
if (substation) {
|
|
1248
|
-
vl.substationUUID = substation.mrid;
|
|
1249
|
-
// substation.addVoltageLevel(vl);
|
|
1250
|
-
|
|
1251
|
-
const i7Schluessel = substation.description +
|
|
1252
|
-
KNOTEN_STANDORT_PRAEFIX +
|
|
1253
|
-
i7Data.un +
|
|
1254
|
-
MITTIGER_PUNKT +
|
|
1255
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1256
|
-
vl.description = i7Schluessel;
|
|
1257
|
-
|
|
1258
|
-
/** Integral 7 Modell erstellen zur Berechnung der Netzschema */
|
|
1259
|
-
const schaltanlage = new SchaltanlageImpl(i7Data);
|
|
1260
|
-
schaltanlage.addStandort(this.integralStandorte.get(schaltanlage.standortid));
|
|
1261
|
-
this.integralSchaltanlagen.set(i7Data.id, schaltanlage);
|
|
1262
|
-
|
|
1263
|
-
/** Speichern, um später Längsdrossel die VoltageLevelInstanz bestimmen zu können. */
|
|
1264
|
-
const subVlData: { un: number; vlUUID: string }[] = this.substationVoltagelevels.get(i7Data.standort);
|
|
1265
|
-
subVlData.push({
|
|
1266
|
-
un: i7Data.un,
|
|
1267
|
-
vlUUID: vl.mrid,
|
|
1268
|
-
});
|
|
1269
|
-
} else {
|
|
1270
|
-
console.log(`VoltageLevel ${i7Data.id} ${vl.mrid} besitzt keine Umspannanlage.`);
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
} else {
|
|
1274
|
-
console.log(`Tabelle ${Integral7TableNames.SCHALTANLAGE} ist nicht vorhanden.`);
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
async convertSchaltanlagenAbschnitte(schaltanlagenIDs: number[]) {
|
|
1279
|
-
if (this.isTableAvailable(Integral7TableNames.SCHALTANLAGENABSCHNITT)) {
|
|
1280
|
-
const result: AnlagenAbschnitt[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SCHALTANLAGENABSCHNITT, 0, 0, schaltanlagenIDs));
|
|
1281
|
-
for (const i7Data of result) {
|
|
1282
|
-
const voltageLevel = this.cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
1283
|
-
this.integralID2UUID.set(i7Data.id, voltageLevel.mrid);
|
|
1284
|
-
putUUIDtoI7Ids(voltageLevel.mrid, i7Data.id, this.UUID2IntegralID);
|
|
1285
|
-
|
|
1286
|
-
// this.schaltanlagenAbschnitteIDs.push(i7Data.id);
|
|
1287
|
-
|
|
1288
|
-
/** Integral 7 Modell erstellen zur Berechnung der Netzschema */
|
|
1289
|
-
const schaltanlagenabschnitt = new SchaltanlagenabschnittImpl(i7Data);
|
|
1290
|
-
schaltanlagenabschnitt.addSchaltanlage(this.integralSchaltanlagen.get(schaltanlagenabschnitt.schaltanlageid));
|
|
1291
|
-
this.integralSchaltanlagenAbschnitte.set(i7Data.id, schaltanlagenabschnitt);
|
|
1292
|
-
}
|
|
1293
|
-
} else {
|
|
1294
|
-
console.log(`Tabelle ${Integral7TableNames.SCHALTANLAGENABSCHNITT} ist nicht vorhanden.`);
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
async convertSammelschienenAbschnitte(schaltanlagenAbschnittIDs: number[]) {
|
|
1299
|
-
if (this.isTableAvailable(Integral7TableNames.SAMMELSCHIENE)) {
|
|
1300
|
-
const result: Ssab[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SAMMELSCHIENE, 0, 0, schaltanlagenAbschnittIDs));
|
|
1301
|
-
for (const i7Data of result) {
|
|
1302
|
-
|
|
1303
|
-
const busbarSection = new BusbarSection(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
1304
|
-
const connectivityNode = new AMPRIONConnectivityNode(generateUUID(), 'ssab cn',);
|
|
1305
|
-
createConnection(this.cimModel, busbarSection, connectivityNode, PhaseCode.ABC, 1);
|
|
1306
|
-
const voltageLevel = this.cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
1307
|
-
|
|
1308
|
-
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
1309
|
-
if (voltageLevel) {
|
|
1310
|
-
busbarSection.equipmentContainerUUID = voltageLevel.mrid;
|
|
1311
|
-
// voltageLevel.addEquipment(busbarSection);
|
|
1312
|
-
connectivityNode.connectivityNodeContainerUUID = voltageLevel.mrid;
|
|
1313
|
-
// voltageLevel.addConnectivityNode(connectivityNode);
|
|
1314
|
-
// umin
|
|
1315
|
-
voltageLevel.highVoltageLimit = i7Data.umax;
|
|
1316
|
-
voltageLevel.lowVoltageLimit = i7Data.umin;
|
|
1317
|
-
|
|
1318
|
-
const i7Schluessel = voltageLevel.description +
|
|
1319
|
-
SAMMELSCHIENENABSCHNITT_PRAEFIX +
|
|
1320
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1321
|
-
busbarSection.description = i7Schluessel;
|
|
1322
|
-
connectivityNode.description = i7Schluessel;
|
|
1323
|
-
} else {
|
|
1324
|
-
console.log('Sammelschiene ' + i7Data.id + ' besitzt keine Schaltanlage.');
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
this.integralID2UUID.set(i7Data.id, connectivityNode.mrid);
|
|
1328
|
-
putUUIDtoI7Ids(busbarSection.mrid, i7Data.id, this.UUID2IntegralID);
|
|
1329
|
-
|
|
1330
|
-
this.cimModel.addConnectivityNode(connectivityNode);
|
|
1331
|
-
this.cimModel.addBusbarSection(busbarSection);
|
|
1332
|
-
|
|
1333
|
-
/** Integral 7 Modell erstellen zur Berechnung der Netzschema */
|
|
1334
|
-
if (this.integralSchaltanlagenAbschnitte.has(i7Data.saabschnitt)) {
|
|
1335
|
-
this.integralSchaltanlagenAbschnitte.get(i7Data.saabschnitt).ssab.push(i7Data);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
} else {
|
|
1339
|
-
console.log(`Tabelle ${Integral7TableNames.SAMMELSCHIENE} ist nicht vorhanden.`);
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
async convertSchaltfelder(schaltanlagenAbschnittIDs: number[]) {
|
|
1344
|
-
if (this.isTableAvailable(Integral7TableNames.SCHALTFELD)) {
|
|
1345
|
-
const result: Schaltfeld[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SCHALTFELD, 0, 0, schaltanlagenAbschnittIDs));
|
|
1346
|
-
// this.tableName2tableData.set(Integral7TableNames.SCHALTFELD, result);
|
|
1347
|
-
for (const i7Data of result) {
|
|
1348
|
-
const bay = new AMPRIONBay(getUUID(i7Data.guid), getName(i7Data));
|
|
1349
|
-
|
|
1350
|
-
bay.number = i7Data.feldnummer;
|
|
1351
|
-
bay.locationID = i7Data.ips_folder_id;
|
|
1352
|
-
|
|
1353
|
-
const sfImpl = new SchaltfeldImpl(i7Data);
|
|
1354
|
-
this.integralSchaltfelder.set(i7Data.id, sfImpl);
|
|
1355
|
-
|
|
1356
|
-
if (this.integralSchaltanlagenAbschnitte.has(sfImpl.saabschnittid)) {
|
|
1357
|
-
sfImpl.saabschnitt = this.integralSchaltanlagenAbschnitte.get(sfImpl.saabschnittid);
|
|
1358
|
-
sfImpl.saabschnitt.schaltfelder.push(sfImpl);
|
|
1359
|
-
} else {
|
|
1360
|
-
console.log(`Schaltfeld ${i7Data.id} besitzt keine Anlage.`);
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
const voltageLevel = this.cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
1364
|
-
if (voltageLevel) {
|
|
1365
|
-
bay.voltageLevelUUID = voltageLevel.mrid;
|
|
1366
|
-
// voltageLevel.addBay(bay);
|
|
1367
|
-
|
|
1368
|
-
const i7Schluessel = voltageLevel.description +
|
|
1369
|
-
SCHALTFELD_PRAEFIX +
|
|
1370
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1371
|
-
bay.description = i7Schluessel;
|
|
1372
|
-
} else {
|
|
1373
|
-
console.log(`Schaltfeld ${i7Data.id} besitzt keine Anlage.`);
|
|
1374
|
-
}
|
|
1375
|
-
this.cimModel.addBay(bay);
|
|
1376
|
-
this.integralID2UUID.set(i7Data.id, bay.mrid);
|
|
1377
|
-
}
|
|
1378
|
-
} else {
|
|
1379
|
-
console.log(`Tabelle ${Integral7TableNames.SCHALTFELD} ist nicht vorhanden.`);
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
async convertQuerkupplungen(schaltanlagenAbschnittIDs: number[]) {
|
|
1384
|
-
if (this.isTableAvailable(Integral7TableNames.QUERKUPPLUNG)) {
|
|
1385
|
-
const result: Querkupplung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.QUERKUPPLUNG, 0, 0, schaltanlagenAbschnittIDs));
|
|
1386
|
-
// this.tableName2tableData.set(Integral7TableNames.QUERKUPPLUNG, result);
|
|
1387
|
-
for (const i7Data of result) {
|
|
1388
|
-
const bay = new AMPRIONBay(getUUID(i7Data.guid), getName(i7Data), 'Querkupplung');
|
|
1389
|
-
|
|
1390
|
-
bay.number = i7Data.feldnummer;
|
|
1391
|
-
bay.locationID = i7Data.ips_folder_id;
|
|
1392
|
-
|
|
1393
|
-
const voltageLevel = this.cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
1394
|
-
if (voltageLevel) {
|
|
1395
|
-
bay.voltageLevelUUID = voltageLevel.mrid;
|
|
1396
|
-
// voltageLevel.addBay(bay);
|
|
1397
|
-
|
|
1398
|
-
const i7Schluessel = voltageLevel.description +
|
|
1399
|
-
'/QK-' +
|
|
1400
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1401
|
-
bay.description = i7Schluessel;
|
|
1402
|
-
} else {
|
|
1403
|
-
console.log(`Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
1404
|
-
}
|
|
1405
|
-
this.querkupplungIDs.push(i7Data.id);
|
|
1406
|
-
this.cimModel.addBay(bay);
|
|
1407
|
-
this.integralID2UUID.set(i7Data.id, bay.mrid);
|
|
1408
|
-
}
|
|
1409
|
-
} else {
|
|
1410
|
-
console.log(`Tabelle ${Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
async convertLaegskupplungen(schaltanlagenIDs: number[]) {
|
|
1415
|
-
if (this.isTableAvailable(Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
1416
|
-
const result: Laengskupplung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.LAENGSKUPPLUNG, 0, 0, schaltanlagenIDs));
|
|
1417
|
-
|
|
1418
|
-
for (const i7Data of result) {
|
|
1419
|
-
|
|
1420
|
-
const bay = new AMPRIONBay(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname, 'Laengskupplung');
|
|
1421
|
-
const voltageLevel = this.cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
1422
|
-
|
|
1423
|
-
bay.number = i7Data.feldnummer;
|
|
1424
|
-
bay.locationID = i7Data.ips_folder_id;
|
|
1425
|
-
|
|
1426
|
-
if (voltageLevel) {
|
|
1427
|
-
bay.voltageLevelUUID = voltageLevel.mrid;
|
|
1428
|
-
// voltageLevel.addBay(bay);
|
|
1429
|
-
|
|
1430
|
-
const i7Schluessel = voltageLevel.description +
|
|
1431
|
-
'/LK-' +
|
|
1432
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
1433
|
-
bay.description = i7Schluessel;
|
|
1434
|
-
} else {
|
|
1435
|
-
console.log(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
1436
|
-
}
|
|
1437
|
-
this.laengskupplungIDs.push(i7Data.id);
|
|
1438
|
-
this.integralID2UUID.set(i7Data.id, bay.mrid);
|
|
1439
|
-
this.cimModel.addBay(bay);
|
|
1440
|
-
}
|
|
1441
|
-
} else {
|
|
1442
|
-
console.log(`Tabelle ${Integral7TableNames.LAENGSKUPPLUNG} ist nicht vorhanden.`);
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
async convertBelastungen(knotenSfIDs: number[]) {
|
|
1447
|
-
if (this.isTableAvailable(Integral7TableNames.BELASTUNG)) {
|
|
1448
|
-
const result: Belastung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.BELASTUNG, 0, 0, knotenSfIDs));
|
|
1449
|
-
for (const i7Data of result) {
|
|
1450
|
-
const energyConsumer = new EnergyConsumer(getUUID(i7Data.guid), getName(i7Data));
|
|
1451
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
1452
|
-
const powerData = getActiveReactivePower(i7Data);
|
|
1453
|
-
|
|
1454
|
-
createSvStatus(this.cimModel, inBetrieb, energyConsumer);
|
|
1455
|
-
|
|
1456
|
-
energyConsumer.p = powerData[0] ? powerData[0] : 0;
|
|
1457
|
-
energyConsumer.q = powerData[1] ? powerData[1] : 0;
|
|
1458
|
-
energyConsumer.pFixed = energyConsumer.p;
|
|
1459
|
-
energyConsumer.qFixed = energyConsumer.q;
|
|
1460
|
-
|
|
1461
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1462
|
-
|
|
1463
|
-
if (connectivityNode) {
|
|
1464
|
-
createConnection(this.cimModel, energyConsumer, connectivityNode, PhaseCode.ABC);
|
|
1465
|
-
|
|
1466
|
-
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
1467
|
-
if (equipmentContainer) {
|
|
1468
|
-
// equipmentContainer.addEquipment(energyConsumer);
|
|
1469
|
-
energyConsumer.equipmentContainerUUID = equipmentContainer.mrid;
|
|
1470
|
-
|
|
1471
|
-
const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
1472
|
-
BELASTUNG_PRAEFIX + i7Data.bezeichner;
|
|
1473
|
-
energyConsumer.description = i7Schluesel;
|
|
1474
|
-
} else {
|
|
1475
|
-
console.log(`EnergyConsumer ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
} else {
|
|
1479
|
-
console.log(`EnergyConsumer ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
this.cimModel.addEnergyConsumer(energyConsumer);
|
|
1483
|
-
this.integralID2UUID.set(i7Data.id, energyConsumer.mrid);
|
|
1484
|
-
}
|
|
1485
|
-
} else {
|
|
1486
|
-
console.log(`Tabelle ${Integral7TableNames.BELASTUNG} ist nicht vorhanden.`);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
async convertEinspeisungen(knotenSfIDs: number[]) {
|
|
1491
|
-
if (this.isTableAvailable(Integral7TableNames.EINSPEISUNG)) {
|
|
1492
|
-
const result: Einspeisung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.EINSPEISUNG, 0, 0, knotenSfIDs));
|
|
1493
|
-
for (const i7Data of result) {
|
|
1494
|
-
const energySource = new EnergySource(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
1495
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
1496
|
-
|
|
1497
|
-
const prio = i7Data.einspprio;
|
|
1498
|
-
const usoll = i7Data.usoll;
|
|
1499
|
-
|
|
1500
|
-
createSvStatus(this.cimModel, inBetrieb, energySource);
|
|
1501
|
-
// TODO Eispeisungen mit Spannungsregelung als ExternalNetworkInjection?
|
|
1502
|
-
const spannungsgeregelt = convertToBooleanI7(i7Data.spannungsgeregelt);
|
|
1503
|
-
|
|
1504
|
-
const powerData = getActiveReactivePower(i7Data);
|
|
1505
|
-
energySource.activePower = powerData[0];
|
|
1506
|
-
energySource.reactivePower = powerData[1];
|
|
1507
|
-
|
|
1508
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1509
|
-
|
|
1510
|
-
if (connectivityNode) {
|
|
1511
|
-
createConnection(this.cimModel, energySource, connectivityNode, PhaseCode.ABC);
|
|
1512
|
-
|
|
1513
|
-
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
1514
|
-
if (equipmentContainer) {
|
|
1515
|
-
// equipmentContainer.addEquipment(energySource);
|
|
1516
|
-
energySource.equipmentContainerUUID = equipmentContainer.mrid;
|
|
1517
|
-
|
|
1518
|
-
const i7Schluesel = /*getDescription(this.cimModel.getObject(equipmentContainerUUID)?.getSubstation()) +*/
|
|
1519
|
-
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
1520
|
-
energySource.description = i7Schluesel;
|
|
1521
|
-
|
|
1522
|
-
} else {
|
|
1523
|
-
console.log(`EnergySource ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1524
|
-
}
|
|
1525
|
-
} else {
|
|
1526
|
-
console.log(`EnergySource ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
// ToDo PSRType
|
|
1530
|
-
|
|
1531
|
-
this.cimModel.addEnergySource(energySource);
|
|
1532
|
-
this.integralID2UUID.set(i7Data.id, energySource.mrid);
|
|
1533
|
-
}
|
|
1534
|
-
} else {
|
|
1535
|
-
console.log(`Tabelle ${Integral7TableNames.EINSPEISUNG} ist nicht vorhanden.`);
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
async convertGeneratoren(knotenSfIDs: number[], energyTypesConfig: any) {
|
|
1540
|
-
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
1541
|
-
if (this.isTableAvailable(Integral7TableNames.GENERATOR)) {
|
|
1542
|
-
const result: Generator[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.GENERATOR, 0, 0, knotenSfIDs))
|
|
1543
|
-
for (const i7Data of result) {
|
|
1544
|
-
const synchronousMachine = new SynchronousMachine(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname);
|
|
1545
|
-
|
|
1546
|
-
const s = getActiveReactivePower(i7Data);
|
|
1547
|
-
const s0 = getNumber(i7Data.sr);
|
|
1548
|
-
synchronousMachine.ratedS = s0 === 0 ? s[0] : s0;
|
|
1549
|
-
synchronousMachine.ratedU = i7Data.ur;
|
|
1550
|
-
|
|
1551
|
-
synchronousMachine.type = SynchronousMachineKind.generator;
|
|
1552
|
-
synchronousMachine.referencePriority = i7Data.einspprio;
|
|
1553
|
-
|
|
1554
|
-
const maxQ = getNumber(i7Data.q_max);
|
|
1555
|
-
synchronousMachine.maxQ = maxQ !== 0 ? maxQ : getNumber(i7Data.qmax_von_pmax);
|
|
1556
|
-
const minQ = getNumber(i7Data.q_min);
|
|
1557
|
-
synchronousMachine.minQ = minQ !== 0 ? minQ : getNumber(i7Data.qmin_von_pmin);
|
|
1558
|
-
|
|
1559
|
-
const reactiveCapabilityCurve = new ReactiveCapabilityCurve(generateUUID(), 'CurveData');
|
|
1560
|
-
reactiveCapabilityCurve.curveStyle = CurveStyle.straightLineYValues;
|
|
1561
|
-
reactiveCapabilityCurve.xUnit = UnitSymbol.W;
|
|
1562
|
-
reactiveCapabilityCurve.y1Unit = UnitSymbol.VAr;
|
|
1563
|
-
reactiveCapabilityCurve.y2Unit = UnitSymbol.VAr;
|
|
1564
|
-
|
|
1565
|
-
const curveData1 = new CurveData(generateUUID());
|
|
1566
|
-
curveData1.curve = reactiveCapabilityCurve;
|
|
1567
|
-
curveData1.xvalue = i7Data.p_min; //pMin
|
|
1568
|
-
curveData1.y1value = i7Data.qmin_von_pmin;//qMin pMin
|
|
1569
|
-
curveData1.y2value = i7Data.qmax_von_pmin;//qMay pMin
|
|
1570
|
-
this.cimModel.addCurveData(curveData1);
|
|
1571
|
-
|
|
1572
|
-
const curveData2 = new CurveData(generateUUID());
|
|
1573
|
-
curveData2.curve = reactiveCapabilityCurve;
|
|
1574
|
-
curveData2.xvalue = i7Data.p_max; //pMin
|
|
1575
|
-
curveData2.y1value = i7Data.qmin_von_pmax//qMin pMin
|
|
1576
|
-
curveData2.y2value = i7Data.qmax_von_pmax;//qMay pMin
|
|
1577
|
-
this.cimModel.addCurveData(curveData2);
|
|
1578
|
-
|
|
1579
|
-
this.cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
1580
|
-
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
1584
|
-
createSvStatus(this.cimModel, inBetrieb, synchronousMachine);
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
synchronousMachine.ratedPowerFactor = i7Data.cosphir ? i7Data.cosphir : 0;
|
|
1588
|
-
synchronousMachine.qPercent = i7Data.cos_phi ? (1 - i7Data.cosphir) : 0;
|
|
1589
|
-
|
|
1590
|
-
synchronousMachine.earthing = false;
|
|
1591
|
-
synchronousMachine.r = 0;
|
|
1592
|
-
synchronousMachine.r0 = 0;
|
|
1593
|
-
synchronousMachine.r2 = 0;
|
|
1594
|
-
synchronousMachine.x0 = 0;
|
|
1595
|
-
synchronousMachine.x2 = 0;
|
|
1596
|
-
synchronousMachine.satDirectSubtransX = i7Data.xd2s ? i7Data.xd2s : 0;
|
|
1597
|
-
|
|
1598
|
-
// synchronousMachine.earthingStarPointR
|
|
1599
|
-
// synchronousMachine.earthingStarPointX
|
|
1600
|
-
// ynchronousMachine.ikk: number;
|
|
1601
|
-
// synchronousMachine.mu: number;
|
|
1602
|
-
|
|
1603
|
-
// synchronousMachine.satDirectSyncX: number;
|
|
1604
|
-
// synchronousMachine.satDirectTransX: number;
|
|
1605
|
-
// synchronousMachine.shortCircuitRotorType: ShortCircuitRotorKind;
|
|
1606
|
-
// synchronousMachine.voltageRegulationRange: number;
|
|
1607
|
-
|
|
1608
|
-
// RegulatingControl
|
|
1609
|
-
const regulatingControl = new RegulatingControl(generateUUID(), `RegulatingControl_${synchronousMachine.name}`);
|
|
1610
|
-
switch (i7Data.spannungsgeregelt) {
|
|
1611
|
-
case 1: {
|
|
1612
|
-
regulatingControl.mode = RegulatingControlModeKind.voltage;
|
|
1613
|
-
}
|
|
1614
|
-
default: {
|
|
1615
|
-
regulatingControl.mode = RegulatingControlModeKind.voltage;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1619
|
-
// regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
// GeneratingUnit
|
|
1623
|
-
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1624
|
-
|
|
1625
|
-
/** Wenn ein Config für den Primärenergietyp vorhanden*/
|
|
1626
|
-
let generatingUnit;
|
|
1627
|
-
|
|
1628
|
-
if (generatingUnitConfig) {
|
|
1629
|
-
switch (generatingUnitConfig.class) {
|
|
1630
|
-
case 'ThermalGeneratingUnit': {
|
|
1631
|
-
generatingUnit = new ThermalGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1632
|
-
if (generatingUnitConfig.fuelType) {
|
|
1633
|
-
generateFuelType(i7Data.nameprimaertyp, generatingUnitConfig.fuelType, generatingUnit, this.cimModel);
|
|
1634
|
-
}
|
|
1635
|
-
break;
|
|
1636
|
-
}
|
|
1637
|
-
case 'SolarGeneratingUnit': {
|
|
1638
|
-
generatingUnit = new SolarGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1639
|
-
break;
|
|
1640
|
-
}
|
|
1641
|
-
case 'WindGeneratingUnit': {
|
|
1642
|
-
generatingUnit = new WindGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1643
|
-
switch (generatingUnitConfig.fuelType) {
|
|
1644
|
-
case 'onshore': {
|
|
1645
|
-
generatingUnit.windGenUnitType = WindGenUnitKind.onshore;
|
|
1646
|
-
break;
|
|
1647
|
-
}
|
|
1648
|
-
case 'offshore': {
|
|
1649
|
-
generatingUnit.windGenUnitType = WindGenUnitKind.offshore;
|
|
1650
|
-
break;
|
|
1651
|
-
}
|
|
1652
|
-
default : {
|
|
1653
|
-
generatingUnit.windGenUnitType = WindGenUnitKind.onshore;
|
|
1654
|
-
break;
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
break;
|
|
1658
|
-
}
|
|
1659
|
-
case 'NuclearGeneratingUnit': {
|
|
1660
|
-
generatingUnit = new NuclearGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname);
|
|
1661
|
-
break;
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
if (!generatingUnit) {
|
|
1666
|
-
generatingUnit = new GeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname);
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
generatingUnit.maxOperatingP = getNumber(i7Data.p_max);
|
|
1670
|
-
generatingUnit.minOperatingP = getNumber(i7Data.p_min);
|
|
1671
|
-
|
|
1672
|
-
generatingUnit.maxOperatingQ = getNumber(i7Data.q_max);
|
|
1673
|
-
generatingUnit.minOperatingQ = getNumber(i7Data.q_min);
|
|
1674
|
-
|
|
1675
|
-
generatingUnit.initialP = getNumber(i7Data.p0);
|
|
1676
|
-
generatingUnit.nominalP = getNumber(generatingUnit.maxOperatingP);
|
|
1677
|
-
|
|
1678
|
-
generatingUnit.genControlSource = GeneratorControlSource.unavailable;
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1682
|
-
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1683
|
-
|
|
1684
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1685
|
-
|
|
1686
|
-
if (connectivityNode) {
|
|
1687
|
-
const terminal = createConnection(this.cimModel, synchronousMachine, connectivityNode, PhaseCode.ABC);
|
|
1688
|
-
regulatingControl.terminalUUID = terminal.mrid;
|
|
1689
|
-
const equipmentContainerEquip = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
1690
|
-
if (equipmentContainerEquip) {
|
|
1691
|
-
// equipmentContainer.addEquipment(synchronousMachine);
|
|
1692
|
-
synchronousMachine.equipmentContainerUUID = equipmentContainerEquip.mrid;
|
|
1693
|
-
|
|
1694
|
-
// equipmentContainer.addEquipment(generatingUnit);
|
|
1695
|
-
const i7Schluesel = /*getDescription(equipmentContainer.getSubstation()) +*/
|
|
1696
|
-
GENERATOR_PRAEFIX + i7Data.bezeichner;
|
|
1697
|
-
synchronousMachine.description = i7Schluesel;
|
|
1698
|
-
|
|
1699
|
-
// GeneratingUnits EquipContainer is Substation
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
const vlEqipContainer = (equipmentContainerEquip as VoltageLevel);
|
|
1703
|
-
const equipmentContainergenUnitUUID = vlEqipContainer?.getSubstationUUID();
|
|
1704
|
-
if (equipmentContainergenUnitUUID) {
|
|
1705
|
-
generatingUnit.equipmentContainerUUID = equipmentContainergenUnitUUID;
|
|
1706
|
-
} else {
|
|
1707
|
-
console.log(`GeneratingUnit ${i7Data.id} besitzt keinen EquipmentContainer/Substation.`);
|
|
1708
|
-
}
|
|
1709
|
-
} else {
|
|
1710
|
-
console.log(`SynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1711
|
-
console.log(`SynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1712
|
-
}
|
|
1713
|
-
} else {
|
|
1714
|
-
console.log(`SynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
this.cimModel.addRegulatingControl(regulatingControl);
|
|
1718
|
-
this.cimModel.addGeneratingUnit(generatingUnit);
|
|
1719
|
-
this.cimModel.addSynchronousMachine(synchronousMachine);
|
|
1720
|
-
this.integralID2UUID.set(i7Data.id, synchronousMachine.mrid);
|
|
1721
|
-
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
async convertKnotenSf(schaltfeldIDs: number[]) {
|
|
1727
|
-
if (this.isTableAvailable(Integral7TableNames.KNOTEN_SF)) {
|
|
1728
|
-
const result: SchaltfeldKnoten[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KNOTEN_SF, 0, 0, schaltfeldIDs));
|
|
1729
|
-
|
|
1730
|
-
for (const i7Data of result) {
|
|
1731
|
-
const connectivityNode = new ConnectivityNode(getUUID(i7Data.guid), 'knotensf cn', 'knotensf');
|
|
1732
|
-
const bay = this.cimModel.getBay(this.integralID2UUID.get(i7Data.schaltfeld))
|
|
1733
|
-
if (bay) {
|
|
1734
|
-
connectivityNode.connectivityNodeContainerUUID = bay.mrid;
|
|
1735
|
-
// bay.addConnectivityNode(connectivityNode);
|
|
1736
|
-
} else {
|
|
1737
|
-
console.log(`KnotenSf ${i7Data.id} besitzt kein Schaltfeld.`);
|
|
1738
|
-
}
|
|
1739
|
-
this.knotenSfIDs.push(i7Data.id);
|
|
1740
|
-
this.cimModel.addConnectivityNode(connectivityNode);
|
|
1741
|
-
this.integralID2UUID.set(i7Data.id, connectivityNode.mrid);
|
|
1742
|
-
this.knotenSpannung.set(connectivityNode.mrid, connectivityNode.getBaseVoltage());
|
|
1743
|
-
this.checkMemoryObject(i7Data.id, connectivityNode);
|
|
1744
|
-
}
|
|
1745
|
-
} else {
|
|
1746
|
-
console.log(`Tabelle ${Integral7TableNames.KNOTEN_SF} ist nicht vorhanden.`);
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
async convertKnotenKf(querkupplungIDs: number[]) {
|
|
1751
|
-
if (this.isTableAvailable(Integral7TableNames.KNOTEN_KF)) {
|
|
1752
|
-
const result: KnotenKf[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KNOTEN_KF, 0, 0, querkupplungIDs));
|
|
1753
|
-
for (const i7Data of result) {
|
|
1754
|
-
const connectivityNode = new ConnectivityNode(getUUID(i7Data.guid), 'knotenkf cn', 'knotenkf');
|
|
1755
|
-
|
|
1756
|
-
const bay = this.cimModel.getBay(this.integralID2UUID.get(i7Data.kpfeld))
|
|
1757
|
-
if (bay) {
|
|
1758
|
-
connectivityNode.connectivityNodeContainerUUID = bay.mrid;
|
|
1759
|
-
// bay.addConnectivityNode(connectivityNode);
|
|
1760
|
-
} else {
|
|
1761
|
-
console.log(`KnotenKf ${i7Data.id} besitzt kein Schaltfeld.`);
|
|
1762
|
-
}
|
|
1763
|
-
this.integralID2UUID.set(i7Data.id, connectivityNode.mrid);
|
|
1764
|
-
this.cimModel.addConnectivityNode(connectivityNode);
|
|
1765
|
-
}
|
|
1766
|
-
} else {
|
|
1767
|
-
console.log(`Tabelle ${Integral7TableNames.KNOTEN_KF} ist nicht vorhanden.`);
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
async convertKnotenLk(laengskupplungIDs: number[]) {
|
|
1772
|
-
if (this.isTableAvailable(Integral7TableNames.KNOTEN_LK)) {
|
|
1773
|
-
const result: KnotenLk[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KNOTEN_LK, 0, 0, laengskupplungIDs));
|
|
1774
|
-
for (const i7Data of result) {
|
|
1775
|
-
const connectivityNode = new ConnectivityNode(generateUUID(), getName(i7Data), 'KnotenLk',);
|
|
1776
|
-
|
|
1777
|
-
const bay = this.cimModel.getBay(this.integralID2UUID.get(i7Data.lkupplung));
|
|
1778
|
-
if (bay) {
|
|
1779
|
-
connectivityNode.connectivityNodeContainerUUID = bay.mrid;
|
|
1780
|
-
// bay.addConnectivityNode(connectivityNode);
|
|
1781
|
-
} else {
|
|
1782
|
-
console.log(`KnotenLk ${i7Data.id} besitzt kein Schaltfeld.`);
|
|
1783
|
-
}
|
|
1784
|
-
this.integralID2UUID.set(i7Data.id, connectivityNode.mrid);
|
|
1785
|
-
this.cimModel.addConnectivityNode(connectivityNode);
|
|
1786
|
-
}
|
|
1787
|
-
} else {
|
|
1788
|
-
console.log(`Tabelle ${Integral7TableNames.KNOTEN_LK} ist nicht vorhanden.`);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
/** Netzschlaufen werden als ein Terminal abgebildet
|
|
1793
|
-
* Schaltzustand wird über Property 'connected' abgebildet. */
|
|
1794
|
-
async convertSchlaufen(knotenSoIDs: number[]) {
|
|
1795
|
-
//Schlaufen
|
|
1796
|
-
if (this.isTableAvailable(Integral7TableNames.SCHLAUFE)) {
|
|
1797
|
-
const result: Schlaufe[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.SCHLAUFE, 0, 0, knotenSoIDs));
|
|
1798
|
-
for (const i7Data of result) {
|
|
1799
|
-
|
|
1800
|
-
const terminal = new Terminal(generateUUID(), 'T_Schlaufe', String(i7Data.id));
|
|
1801
|
-
terminal.connected = convertToBooleanI7(i7Data.schaltzustand);
|
|
1802
|
-
terminal.phases = PhaseCode.ABC;
|
|
1803
|
-
/* Schlaufenterminals werden nicht im Modell,
|
|
1804
|
-
sondern in der Map memoryObjects gespeichert.
|
|
1805
|
-
Serialisierung erfolgt erst nach Konvertierung aller leitenden Elementen!
|
|
1806
|
-
Der Grund: Die 'ConductingEquipment'-Assoziation muss bei jedem Terminal gesetzt sein!
|
|
1807
|
-
this.cimModel.addTerminal(terminal);*/
|
|
1808
|
-
|
|
1809
|
-
this.integralID2UUID.set(i7Data.id, terminal.mrid);
|
|
1810
|
-
this.integralID2UUID.set(i7Data.knotenzw, terminal.mrid);
|
|
1811
|
-
|
|
1812
|
-
this.memoryObjects.set(i7Data.id, terminal);
|
|
1813
|
-
this.memoryObjects.set(i7Data.knotenzw, terminal);
|
|
1814
|
-
const eknotenUUID = this.integralID2UUID.get(i7Data.eknoten);
|
|
1815
|
-
// const connectivityNode = this.cimModel.getConnectivityNode(eknotenUUID) as IConnectivityNode;
|
|
1816
|
-
if (eknotenUUID) {
|
|
1817
|
-
// connectivityNode.addTerminal(terminal);
|
|
1818
|
-
terminal.connectivityNodeUUID = eknotenUUID;
|
|
1819
|
-
const connectivityNode = this.cimModel.getConnectivityNode(eknotenUUID);
|
|
1820
|
-
this.knotenSpannung.set(connectivityNode?.mrid, connectivityNode?.getBaseVoltage());
|
|
1821
|
-
} else {
|
|
1822
|
-
console.log(`Schlaufe ${i7Data.id} besitzt kein KnotenSO).`);
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
} else {
|
|
1826
|
-
console.log(`Tabelle ${Integral7TableNames.SCHLAUFE} ist nicht vorhanden.`)
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
async convertSchemaStandorte(standortIDs: number[]) {
|
|
1831
|
-
if (this.isTableAvailable(Integral7TableNames.NSG_STANDORT)) {
|
|
1832
|
-
const result: NsgStandort[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_STANDORT, 0, 0, standortIDs));
|
|
1833
|
-
for (const i7Data of result) {
|
|
1834
|
-
const standortNsgImpl = new StandortNsgImpl(i7Data);
|
|
1835
|
-
this.integralNsgStandort.set(i7Data.id, standortNsgImpl);
|
|
1836
|
-
|
|
1837
|
-
if (this.integralStandorte.has(standortNsgImpl.standortid)) {
|
|
1838
|
-
standortNsgImpl.standort = this.integralStandorte.get(standortNsgImpl.standortid);
|
|
1839
|
-
standortNsgImpl.standort.standortNsg = standortNsgImpl;
|
|
1840
|
-
} else {
|
|
1841
|
-
console.log(`standortNsg/DiagramObject ${standortNsgImpl.id} hat keine Standort-Instanz.`);
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
} else {
|
|
1845
|
-
console.log(`Tabelle ${Integral7TableNames.NSG_STANDORT} ist nicht vorhanden.`);
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
async convertSchemaKnotenSo(knotenSoIDs: number[]) {
|
|
1850
|
-
if (this.isTableAvailable(Integral7TableNames.NSG_KNOTEN_SO)) {
|
|
1851
|
-
const result: NsgKnotenSo[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_KNOTEN_SO, 0, 0, knotenSoIDs));
|
|
1852
|
-
//const result: NsgStandort[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_STANDORT, 0, 0, standortIDs));
|
|
1853
|
-
for (const i7Data of result) {
|
|
1854
|
-
|
|
1855
|
-
const knotenSoNsgImpl = new KnotenSoNsg(i7Data);
|
|
1856
|
-
this.integralNsgKnotenSo.set(i7Data.id, knotenSoNsgImpl);
|
|
1857
|
-
|
|
1858
|
-
if (this.integralKnotenSo.has(knotenSoNsgImpl.knotensoid)) {
|
|
1859
|
-
knotenSoNsgImpl.knotenso = this.integralKnotenSo.get(knotenSoNsgImpl.knotensoid);
|
|
1860
|
-
knotenSoNsgImpl.knotenso.knotenSoNsg = knotenSoNsgImpl;
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
const diagramObject = new DiagramObject(getUUID(i7Data.guid), 'Abzweig', String(i7Data.variantennr));
|
|
1864
|
-
this.cimModel.addDiagramObject(diagramObject);
|
|
1865
|
-
|
|
1866
|
-
const nsgStandortData = this.integralNsgStandort.get(i7Data.nsgso);
|
|
1867
|
-
|
|
1868
|
-
if (nsgStandortData) {
|
|
1869
|
-
|
|
1870
|
-
const diagramObjectPoint = new DiagramObjectPoint(nsgStandortData.xrel + i7Data.xrel, nsgStandortData.yrel + i7Data.yrel);
|
|
1871
|
-
|
|
1872
|
-
diagramObjectPoint.mrid = generateUUID();
|
|
1873
|
-
diagramObjectPoint.diagramObject = diagramObject;
|
|
1874
|
-
diagramObject.addDiagramObjectPoint(diagramObjectPoint);
|
|
1875
|
-
|
|
1876
|
-
const cnUUID = this.integralID2UUID.get(i7Data.knotenso);
|
|
1877
|
-
|
|
1878
|
-
const cn = this.cimModel.getObject(cnUUID);
|
|
1879
|
-
if (cn) {
|
|
1880
|
-
// cn.addDiagramObject(diagramObject);
|
|
1881
|
-
diagramObject.identifiedObjectUUID = cn.mrid;
|
|
1882
|
-
} else {
|
|
1883
|
-
console.log(`KnotenSo/DiagramObject ${diagramObject.mrid} hat kein PSR-Objekt.`);
|
|
1884
|
-
}
|
|
1885
|
-
const diagramUUID = this.integralID2UUID.get(i7Data.variantennr);
|
|
1886
|
-
const diagram = this.cimModel.getDiagram(diagramUUID);
|
|
1887
|
-
if (diagram) {
|
|
1888
|
-
// diagram.addDiagramObject(diagramObject);
|
|
1889
|
-
diagramObject.diagramUUID = diagram.mrid;
|
|
1890
|
-
} else {
|
|
1891
|
-
//console.log(`Abzweig/DiagramObject ${diagramObject.mrid} mit der VariantenNr ${i7Data.variantennr} hat kein Diagram-Objekt.`);
|
|
1892
|
-
}
|
|
1893
|
-
//this.integralID2UUID.set(+(i7Data.id + '' + i7Data.variantennr), diagramObject.mrid);
|
|
1894
|
-
} else {
|
|
1895
|
-
//console.log(`NSG KnotenSo hat keinen NsgStandort.`);
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
} else {
|
|
1899
|
-
console.log(`Tabelle ${Integral7TableNames.NSG_KNOTEN_SO} ist nicht vorhanden.`);
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
async convertSchemaSchaltanlage(saIDs: number[]) {
|
|
1904
|
-
if (this.isTableAvailable(Integral7TableNames.NSG_SCHALTANLAGE)) {
|
|
1905
|
-
const result: NsgSA[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_SCHALTANLAGE, 0, 0, saIDs));
|
|
1906
|
-
// const result: NsgSA[] = await getConnectionTypeOrm(this.dbConnectionName).query(NSG_SCHALTANLAGE_SQL_QUERY);
|
|
1907
|
-
for (const i7Data of result) {
|
|
1908
|
-
|
|
1909
|
-
const saNsgImpl = new SchaltanlageNsgImpl(i7Data);
|
|
1910
|
-
this.integralNsgSchaltanlage.set(i7Data.id, saNsgImpl);
|
|
1911
|
-
|
|
1912
|
-
//Netzschaltanlage
|
|
1913
|
-
if (this.integralSchaltanlagen.has(saNsgImpl.schaltanlageid)) {
|
|
1914
|
-
saNsgImpl.schaltanlage = this.integralSchaltanlagen.get(saNsgImpl.schaltanlageid);
|
|
1915
|
-
saNsgImpl.schaltanlage.schaltanlageNsg = saNsgImpl;
|
|
1916
|
-
} else {
|
|
1917
|
-
console.log(`SchaltanlageNSG ${i7Data.id} hat keine PSR Instanz.`);
|
|
1918
|
-
}
|
|
1919
|
-
//Standort
|
|
1920
|
-
if (this.integralNsgStandort.has(saNsgImpl.nsgsoid)) {
|
|
1921
|
-
saNsgImpl.nsgso = this.integralNsgStandort.get(saNsgImpl.nsgsoid);
|
|
1922
|
-
saNsgImpl.nsgso.schaltanlagenNsg.push(saNsgImpl);
|
|
1923
|
-
} else {
|
|
1924
|
-
console.log(`SchaltanlageNSG ${i7Data.id} hat keine standortNsg Instanz.`);
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
} else {
|
|
1928
|
-
console.log(`Tabelle ${Integral7TableNames.NSG_KNOTEN_SO} ist nicht vorhanden.`);
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
async convertSchemaSchaltanlagenAbschnitte(schaltanlagenabschnittIDs: number[]) {
|
|
1933
|
-
if (this.isTableAvailable(Integral7TableNames.NSG_SCHALTANLAGENABSCHNITT)) {
|
|
1934
|
-
const result: NsgSAAB[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_SCHALTANLAGENABSCHNITT, 0, 0, schaltanlagenabschnittIDs));
|
|
1935
|
-
for (const i7Data of result) {
|
|
1936
|
-
const saabNsgImpl = new SchaltanlagenabschnittNsg(i7Data);
|
|
1937
|
-
this.integralNsgSchaltanlagenabschnitt.set(i7Data.id, saabNsgImpl);
|
|
1938
|
-
|
|
1939
|
-
if (this.integralSchaltanlagenAbschnitte.has(saabNsgImpl.saabschnittid)) {
|
|
1940
|
-
saabNsgImpl.saabschnitt = this.integralSchaltanlagenAbschnitte.get(saabNsgImpl.saabschnittid);
|
|
1941
|
-
saabNsgImpl.saabschnitt.schaltanlagenabschnittNsg = saabNsgImpl;
|
|
1942
|
-
} else {
|
|
1943
|
-
console.log(`NSG Schaltanlagenabschnitt hat keinen PSR-Abschnitt`);
|
|
1944
|
-
}
|
|
1945
|
-
// Scaltanlage
|
|
1946
|
-
if (saabNsgImpl.saabschnitt && saabNsgImpl.saabschnitt.schaltanlage) {
|
|
1947
|
-
if (saabNsgImpl.saabschnitt.schaltanlage.schaltanlageNsg) {
|
|
1948
|
-
saabNsgImpl.saabschnitt.schaltanlage.schaltanlageNsg.saabNsg.push(saabNsgImpl);
|
|
1949
|
-
saabNsgImpl.nsgsa = saabNsgImpl.saabschnitt.schaltanlage.schaltanlageNsg;
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
} else {
|
|
1954
|
-
console.log(`Tabelle ${Integral7TableNames.NSG_KNOTEN_SO} ist nicht vorhanden.`);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
async convertSchemaSammelschienenAbschnitte() {
|
|
1959
|
-
for (const sa of this.integralSchaltanlagen.values()) {
|
|
1960
|
-
const totalSlots = sa.getTotalSlots();
|
|
1961
|
-
// const delta = sa.getDelta();
|
|
1962
|
-
if (sa.schaltanlageNsg) {
|
|
1963
|
-
const saAusrichtung = sa.schaltanlageNsg.ausrichtung;
|
|
1964
|
-
for (const saab of sa.saab) {
|
|
1965
|
-
for (const ssab of saab.ssab) {
|
|
1966
|
-
const cnUUID = this.integralID2UUID.get(ssab.id);
|
|
1967
|
-
const connectivityNode = this.cimModel.getConnectivityNode(cnUUID) as IConnectivityNode;
|
|
1968
|
-
|
|
1969
|
-
const standortPoint = sa.standort.getPoint();
|
|
1970
|
-
const saPoint = sa.getPoint();
|
|
1971
|
-
const ssabPoint = standortPoint.translate(saPoint.x, saPoint.y);
|
|
1972
|
-
|
|
1973
|
-
const offset = saab.schaltanlagenabschnittNsg.nslots;
|
|
1974
|
-
const laenge = saab.schaltanlagenabschnittNsg.laenge;
|
|
1975
|
-
const delta = sa.getDelta(saab);
|
|
1976
|
-
const hoehe = saab.ssab.length * 8;
|
|
1977
|
-
|
|
1978
|
-
const diagramObject = new DiagramObject(getUUID(''), 'SSAB Diagram', String(sa.schaltanlageNsg.variantennr));
|
|
1979
|
-
const points: Point[] = [];
|
|
1980
|
-
|
|
1981
|
-
if (saAusrichtung === 0) { // oben/waagerecht
|
|
1982
|
-
// points.push(new Pi);
|
|
1983
|
-
points.push(new Point(ssabPoint.x - 8 + (offset * 16), ssabPoint.y + 4 - hoehe + ssab.pos * 8 + delta));
|
|
1984
|
-
points.push(new Point(ssabPoint.x - 8 + (offset * 16) + (laenge * 16), ssabPoint.y + 4 - hoehe + ssab.pos * 8 + delta));
|
|
1985
|
-
|
|
1986
|
-
} else if (saAusrichtung === 1) { // rechts/senkrecht
|
|
1987
|
-
points.push(new Point(ssabPoint.x + 4 - hoehe + ssab.pos * 8 + delta, ssabPoint.y - 8 + (offset * 16)));
|
|
1988
|
-
points.push(new Point(ssabPoint.x + 4 - hoehe + ssab.pos * 8 + delta, ssabPoint.y - 8 + (offset * 16) + (laenge * 16)));
|
|
1989
|
-
|
|
1990
|
-
} else if (saAusrichtung === 2) { // unten/waagerecht
|
|
1991
|
-
points.push(new Point(ssabPoint.x - 8 + (offset * 16), ssabPoint.y + 4 - hoehe + ssab.pos * 8 + delta));
|
|
1992
|
-
points.push(new Point(ssabPoint.x - 8 + (offset * 16) + (laenge * 16), ssabPoint.y + 4 - hoehe + ssab.pos * 8 + delta));
|
|
1993
|
-
} else if (saAusrichtung === 3) { // links/senkrecht
|
|
1994
|
-
points.push(new Point(ssabPoint.x + 4 - hoehe + ssab.pos * 8 + delta, ssabPoint.y - 8 + (totalSlots * 16) - (offset * 16)));
|
|
1995
|
-
points.push(new Point(ssabPoint.x + 4 - hoehe + ssab.pos * 8 + delta, ssabPoint.y - 8 + (totalSlots * 16) - (offset * 16 + laenge * 16)));
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
createDiagramObjectPoints(diagramObject, points);
|
|
1999
|
-
|
|
2000
|
-
// connectivityNode.addDiagramObject(diagramObject);
|
|
2001
|
-
diagramObject.identifiedObjectUUID = connectivityNode.mrid;
|
|
2002
|
-
this.cimModel.addDiagramObject(diagramObject);
|
|
2003
|
-
|
|
2004
|
-
const diagramUUID = this.integralID2UUID.get(sa.schaltanlageNsg.variantennr);
|
|
2005
|
-
const diagram = this.cimModel.getDiagram(diagramUUID);
|
|
2006
|
-
if (diagram) {
|
|
2007
|
-
// diagram.addDiagramObject(diagramObject);
|
|
2008
|
-
diagramObject.diagramUUID = diagram.mrid;
|
|
2009
|
-
} else {
|
|
2010
|
-
//console.log(`SSAB/DiagramObject ${diagramObject.mrid} mit der VariantenNr ${sa.schaltanlageNsg.variantennr} hat kein Diagram-Objekt.`);
|
|
2011
|
-
}
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
async convertSchemaSchaltfelder(schaltfeldIDs: number[]) {
|
|
2019
|
-
if (this.isTableAvailable(Integral7TableNames.NSG_SCHALTFELD)) {
|
|
2020
|
-
const result: NsgSchaltfeld[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_SCHALTFELD, 0, 0, schaltfeldIDs));
|
|
2021
|
-
//const result: NsgSAAB[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NSG_SCHALTANLAGENABSCHNITT, 0, 0, schaltanlagenabschnittIDs));
|
|
2022
|
-
for (const i7Data of result) {
|
|
2023
|
-
|
|
2024
|
-
const sfNSG = new SchaltfeldNsgImpl(i7Data);
|
|
2025
|
-
sfNSG.schaltfeld = this.integralSchaltfelder.get(sfNSG.schaltfeldid);
|
|
2026
|
-
if (sfNSG.schaltfeld) {
|
|
2027
|
-
sfNSG.schaltfeld.schaltfeldNsg = sfNSG;
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
sfNSG.nsgsaa = this.integralNsgSchaltanlagenabschnitt.get(sfNSG.nsgsaaid);
|
|
2031
|
-
|
|
2032
|
-
this.integralNsgSchaltfelder.set(i7Data.id, sfNSG);
|
|
2033
|
-
|
|
2034
|
-
const sf = sfNSG.schaltfeld;
|
|
2035
|
-
if (sf) {
|
|
2036
|
-
const standort = sf.getStandort();
|
|
2037
|
-
const sa = sf.getSA();
|
|
2038
|
-
const saab = sf.getSAAB();
|
|
2039
|
-
|
|
2040
|
-
if (standort && sa && saab) {
|
|
2041
|
-
const pointSt = standort.getPoint();
|
|
2042
|
-
const pointSaRel = sa.getPoint();
|
|
2043
|
-
const pointSa = pointSt.translate(pointSaRel.x, pointSaRel.y);
|
|
2044
|
-
|
|
2045
|
-
const slotOffset = saab.getSlotOffset();
|
|
2046
|
-
|
|
2047
|
-
const saAusrichtung = sa.schaltanlageNsg.ausrichtung;
|
|
2048
|
-
const deltaAusrichtung = sfNSG.deltaausrichtung;
|
|
2049
|
-
const slotnummer = sfNSG.slotnummer;
|
|
2050
|
-
|
|
2051
|
-
const d = 4; //versatz in Pixeln auf Sammelschiene d=0 -> 4 Pixel länger d=1 ->3 / d=2 -> 2
|
|
2052
|
-
|
|
2053
|
-
const deltaSSAB = sa.getDelta(saab); // ssab.length * 8 - 16
|
|
2054
|
-
const posSSAB = sfNSG.schaltfeld.getPosSSAB(saAusrichtung, deltaAusrichtung);
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
let pointLinksOben, pointRechtsUnten;
|
|
2058
|
-
if (saAusrichtung === 0) { // oben/waagerecht
|
|
2059
|
-
const pointSf = pointSa.translate(16 * (slotnummer + slotOffset) - 16, 0);
|
|
2060
|
-
if (deltaAusrichtung === 1) {
|
|
2061
|
-
pointSf.y = pointSf.y + 65 + deltaSSAB; // punkt links unten
|
|
2062
|
-
pointRechtsUnten = pointSf.translate(32, 0);
|
|
2063
|
-
pointLinksOben = pointSf.translate(0, -sfNSG.hoehe /*+ 8 * posSSAB + d*/);
|
|
2064
|
-
} else {
|
|
2065
|
-
pointSf.y = pointSf.y - sfNSG.hoehe + deltaSSAB; // punkt rechts oben
|
|
2066
|
-
pointLinksOben = pointSf.translate(0, 0);
|
|
2067
|
-
pointRechtsUnten = pointSf.translate(32, sfNSG.hoehe /*- 8 * posSSAB - d*/);
|
|
2068
|
-
}
|
|
2069
|
-
} else if (saAusrichtung === 1) { // rechts/senkrecht
|
|
2070
|
-
|
|
2071
|
-
} else if (saAusrichtung === 2) { // unten/waagerecht
|
|
2072
|
-
|
|
2073
|
-
} else if (saAusrichtung === 3) { // links/senkrecht
|
|
2074
|
-
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
//
|
|
2078
|
-
if (pointLinksOben && pointRechtsUnten) {
|
|
2079
|
-
|
|
2080
|
-
const points: Point[] = [];
|
|
2081
|
-
|
|
2082
|
-
points.push(new Point(pointLinksOben.x, pointLinksOben.y)); // links oben
|
|
2083
|
-
points.push(new Point(pointRechtsUnten.x, pointLinksOben.y)); // rechts oben
|
|
2084
|
-
points.push(new Point(pointRechtsUnten.x, pointRechtsUnten.y)); // rechts unten
|
|
2085
|
-
points.push(new Point(pointLinksOben.x, pointRechtsUnten.y)); // links unten
|
|
2086
|
-
points.push(new Point(pointLinksOben.x, pointLinksOben.y));
|
|
2087
|
-
|
|
2088
|
-
points.push(new Point(pointLinksOben.x + 16, pointLinksOben.y));
|
|
2089
|
-
points.push(new Point(pointLinksOben.x + 16, pointRechtsUnten.y));
|
|
2090
|
-
|
|
2091
|
-
const diagramObject = new DiagramObject(getUUID(''), 'Schaltfeld',
|
|
2092
|
-
String(sa.schaltanlageNsg.variantennr));
|
|
2093
|
-
|
|
2094
|
-
const bayUUID = this.integralID2UUID.get(sf.id);
|
|
2095
|
-
const bay = this.cimModel.getBay(bayUUID);
|
|
2096
|
-
if (bay) {
|
|
2097
|
-
createDiagramObjectPoints(diagramObject, points);
|
|
2098
|
-
// bay.addDiagramObject(diagramObject);
|
|
2099
|
-
diagramObject.identifiedObjectUUID = bay.mrid;
|
|
2100
|
-
|
|
2101
|
-
const diagramUUID = this.integralID2UUID.get(sa.schaltanlageNsg.variantennr);
|
|
2102
|
-
const diagram = this.cimModel.getDiagram(diagramUUID);
|
|
2103
|
-
if (diagram) {
|
|
2104
|
-
// diagram.addDiagramObject(diagramObject);
|
|
2105
|
-
diagramObject.diagramUUID = diagram.mrid;
|
|
2106
|
-
|
|
2107
|
-
// this.convertSchemaBayElements(bay, diagram, saAusrichtung, deltaAusrichtung);
|
|
2108
|
-
} else {
|
|
2109
|
-
// console.log(`Schaltfeld/DiagramObject ${diagramObject.mrid} mit der VariantenNr ${sa.schaltanlageNsg.variantennr} hat kein Diagram-Objekt.`);
|
|
2110
|
-
}
|
|
2111
|
-
} else {
|
|
2112
|
-
console.log(`DiagramObject Schaltfeld ${diagramObject.mrid} mit der VariantenNr ${sa.schaltanlageNsg.variantennr} hat kein CIM Schaltfeld ${sf.id} ${bayUUID}.`);
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
/* const diagramObject = new DiagramObject(getUUID(i7Data.guid), 'Schaltfeld', String(i7Data.variantennr));
|
|
2118
|
-
this.cimModel.addDiagramObject(diagramObject);*/
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
}
|
|
2122
|
-
} else {
|
|
2123
|
-
console.log(`Tabelle ${Integral7TableNames.NSG_KNOTEN_SO} ist nicht vorhanden.`);
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
async convertStarreVerbindungen(containerIDs: number[]) {
|
|
2129
|
-
|
|
2130
|
-
if (this.isTableAvailable(Integral7TableNames.KNOTEN_STARR)) {
|
|
2131
|
-
const result: StarrerKnoten[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KNOTEN_STARR, 0, 0, containerIDs));
|
|
2132
|
-
for (const i7Data of result) {
|
|
2133
|
-
const junction = new Junction(getUUID(i7Data.guid), i7Data.bezeichner, 'JNCT', 'starre Verbindung');
|
|
2134
|
-
const schaltzustand = convertToBooleanI7(i7Data.schaltzustand);
|
|
2135
|
-
|
|
2136
|
-
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(this.integralID2UUID.get(i7Data.seliste)) as EquipmentContainer);
|
|
2137
|
-
|
|
2138
|
-
const cnStart = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
2139
|
-
const cnZiel = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
2140
|
-
if (equipmentContainer) {
|
|
2141
|
-
// equipmentContainer.addEquipment(junction);
|
|
2142
|
-
junction.equipmentContainerUUID = equipmentContainer.mrid;
|
|
2143
|
-
} else {
|
|
2144
|
-
console.log(`Starre verbindung ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
2145
|
-
}
|
|
2146
|
-
if (cnStart) {
|
|
2147
|
-
const terminal = createConnection(this.cimModel, junction, cnStart, PhaseCode.ABC, 1);
|
|
2148
|
-
if (schaltzustand === false) {
|
|
2149
|
-
terminal.connected = schaltzustand;
|
|
2150
|
-
}
|
|
2151
|
-
} else {
|
|
2152
|
-
console.log(`Starre verbindung ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
2153
|
-
}
|
|
2154
|
-
if (cnZiel) {
|
|
2155
|
-
const terminal = createConnection(this.cimModel, junction, cnZiel, PhaseCode.ABC, 2);
|
|
2156
|
-
if (schaltzustand === false) {
|
|
2157
|
-
terminal.connected = schaltzustand;
|
|
2158
|
-
}
|
|
2159
|
-
} else {
|
|
2160
|
-
console.log(`Starre verbindung ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
const baseVoltage = getTerminalUn(this.cimModel, junction);
|
|
2164
|
-
if (baseVoltage) {
|
|
2165
|
-
junction.baseVoltageUUID = baseVoltage.mrid;
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
this.integralID2UUID.set(i7Data.id, junction.mrid);
|
|
2169
|
-
this.cimModel.addJunction(junction);
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
} else {
|
|
2173
|
-
console.log(`Tabelle ${Integral7TableNames.KNOTEN_STARR} ist nicht vorhanden.`)
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
/**
|
|
2180
|
-
* @param lineAttribute Attribut zur Bestimmung der Stromkreise */
|
|
2181
|
-
|
|
2182
|
-
async convertErsatzLaengszweige(limit: number, offset: number) {
|
|
2183
|
-
if (this.isTableAvailable(Integral7TableNames.ERSATZLAENGSZWEIG)) {
|
|
2184
|
-
const result: LeitungErsatzLaengszweig[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.ERSATZLAENGSZWEIG, limit, offset, []));
|
|
2185
|
-
for (const i7Data of result) {
|
|
2186
|
-
|
|
2187
|
-
// Topologie
|
|
2188
|
-
/* Anfang
|
|
2189
|
-
* 3 moegliche Anschluesse
|
|
2190
|
-
* KontenSo -> Anschluesspunkt
|
|
2191
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2192
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2193
|
-
|
|
2194
|
-
const i7Schluessel = ERSATZLAENGSZWEIG_PRAEFIX +
|
|
2195
|
-
ueberpruefeZeichenkette(i7Data.ukz) +
|
|
2196
|
-
MITTIGER_PUNKT +
|
|
2197
|
-
ueberpruefeZeichenkette(i7Data.kurzname) +
|
|
2198
|
-
MITTIGER_PUNKT +
|
|
2199
|
-
ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2200
|
-
MITTIGER_PUNKT +
|
|
2201
|
-
ueberpruefeZeichenkette(i7Data.stkabname);
|
|
2202
|
-
|
|
2203
|
-
const equivalentBranch = new EquivalentBranch(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname, i7Schluessel);
|
|
2204
|
-
|
|
2205
|
-
// TODO alles überprüfen
|
|
2206
|
-
equivalentBranch.negativeR12 = isNaN(i7Data.r12_lfl) ? 0.1 : i7Data.r12_lfl;
|
|
2207
|
-
equivalentBranch.negativeR21 = isNaN(i7Data.r21_lfl) ? 0.1 : i7Data.r21_lfl;
|
|
2208
|
-
equivalentBranch.negativeX12 = isNaN(i7Data.x12_lfl) ? 0.1 : i7Data.x12_lfl;
|
|
2209
|
-
equivalentBranch.negativeX21 = isNaN(i7Data.x21_lfl) ? 0.1 : i7Data.x21_lfl;
|
|
2210
|
-
|
|
2211
|
-
equivalentBranch.positiveR12 = isNaN(i7Data.r12_lfl) ? 0.1 : i7Data.r12_lfl;
|
|
2212
|
-
equivalentBranch.positiveR21 = isNaN(i7Data.r21_lfl) ? 0.1 : i7Data.r21_lfl;
|
|
2213
|
-
equivalentBranch.positiveX12 = isNaN(i7Data.x12_lfl) ? 0.1 : i7Data.x12_lfl;
|
|
2214
|
-
equivalentBranch.positiveX21 = isNaN(i7Data.x21_lfl) ? 0.1 : i7Data.x21_lfl;
|
|
2215
|
-
|
|
2216
|
-
equivalentBranch.r = equivalentBranch.negativeR12;
|
|
2217
|
-
equivalentBranch.x = equivalentBranch.negativeX21;
|
|
2218
|
-
equivalentBranch.r21 = equivalentBranch.positiveR12;
|
|
2219
|
-
|
|
2220
|
-
equivalentBranch.x21 = equivalentBranch.negativeX21
|
|
2221
|
-
equivalentBranch.zeroR12 = isNaN(i7Data.r12_ks) ? 0.1 : i7Data.r12_ks;
|
|
2222
|
-
equivalentBranch.zeroR21 = isNaN(i7Data.r12_ks) ? 0.1 : i7Data.r12_ks;
|
|
2223
|
-
equivalentBranch.zeroX12 = isNaN(i7Data.x12_ks) ? 0.1 : i7Data.x12_ks;
|
|
2224
|
-
equivalentBranch.zeroX21 = isNaN(i7Data.x12_ks) ? 0.1 : i7Data.x12_ks;
|
|
2225
|
-
|
|
2226
|
-
const ur1 = getU(i7Data.ur1, this.deafultUn);
|
|
2227
|
-
const ur2 = getU(i7Data.ur2, this.deafultUn);
|
|
2228
|
-
const baseVoltageUr1 = createBaseVoltageIfNotExists(this.cimModel, ur1);
|
|
2229
|
-
const baseVoltageUr2 = createBaseVoltageIfNotExists(this.cimModel, ur2);
|
|
2230
|
-
if (baseVoltageUr1) {
|
|
2231
|
-
equivalentBranch.baseVoltage = baseVoltageUr1;
|
|
2232
|
-
} else if (baseVoltageUr2) {
|
|
2233
|
-
equivalentBranch.baseVoltage = baseVoltageUr2;
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
// Topologie
|
|
2238
|
-
/* Anfang
|
|
2239
|
-
* 3 moegliche Anschluesse
|
|
2240
|
-
* KontenSo -> Anschluesspunkt
|
|
2241
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2242
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2243
|
-
/*
|
|
2244
|
-
const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
2245
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);
|
|
2246
|
-
*/
|
|
2247
|
-
|
|
2248
|
-
const start = this.memoryObjects.get(i7Data.aknoten);
|
|
2249
|
-
// console.log(`${i7Schluessel} start ${start?.constructor.name}`);
|
|
2250
|
-
if (start) {
|
|
2251
|
-
createConnection(this.cimModel, equivalentBranch, start, PhaseCode.ABC, 1);
|
|
2252
|
-
} else {
|
|
2253
|
-
console.log(`Leitung ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
|
|
2254
|
-
}
|
|
2255
|
-
const target = this.memoryObjects.get(i7Data.eknoten);
|
|
2256
|
-
//console.log(`${i7Schluessel} target ${target?.constructor.name}`);
|
|
2257
|
-
if (target) {
|
|
2258
|
-
createConnection(this.cimModel, equivalentBranch, target, PhaseCode.ABC, 2);
|
|
2259
|
-
} else {
|
|
2260
|
-
console.log(`Leitung ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Zielknoten.`);
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
this.cimModel.addEquivalentBranch(equivalentBranch);
|
|
2264
|
-
this.integralID2UUID.set(i7Data.id, equivalentBranch.mrid);
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
} else {
|
|
2268
|
-
console.log(`Tabelle ${Integral7TableNames.ERSATZLAENGSZWEIG} ist nicht vorhanden.`);
|
|
2269
|
-
}
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2273
|
-
* @param lineAttribute Attributsname zum Bestimmen der Stronkreise*/
|
|
2274
|
-
async convertStromkreise() {
|
|
2275
|
-
if (this.isTableAvailable(Integral7TableNames.LEITUNG)) {
|
|
2276
|
-
const result: LeitungStk[] = await this.queryFunctionWrapper(`SELECT DISTINCT kurzname, bezeichner FROM ${Integral7TableNames[I7Objects.LEITUNG]}`);
|
|
2277
|
-
for (const i7Data of result) {
|
|
2278
|
-
|
|
2279
|
-
let line = getLineByAttribute(this.cimModel, 'name', i7Data.bezeichner);
|
|
2280
|
-
if (!line) {
|
|
2281
|
-
line = new Line(generateUUID());
|
|
2282
|
-
line.name = i7Data.bezeichner ? i7Data.bezeichner : 'Stromkreis_' + i7Data.kurzname;
|
|
2283
|
-
line.shortName = i7Data.kurzname;
|
|
2284
|
-
const region = createIfNotExitsGeoregionByName(this.cimModel, 'ENTSO-E');
|
|
2285
|
-
const subregion = createIfNotExitsSubGeoregionByName(this.cimModel, 'Deutschland', region);
|
|
2286
|
-
line.regionUUID = subregion.mrid;
|
|
2287
|
-
|
|
2288
|
-
const i7Schluessel = LEITUNG_PRAEFIX +
|
|
2289
|
-
ueberpruefeZeichenkette(i7Data.ukz) +
|
|
2290
|
-
MITTIGER_PUNKT +
|
|
2291
|
-
ueberpruefeZeichenkette(i7Data.kurzname) +
|
|
2292
|
-
MITTIGER_PUNKT +
|
|
2293
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
2294
|
-
line.description = i7Schluessel;
|
|
2295
|
-
|
|
2296
|
-
this.cimModel.addLine(line);
|
|
2297
|
-
}
|
|
2298
|
-
}
|
|
2299
|
-
} else {
|
|
2300
|
-
console.log(`Tabelle ${Integral7TableNames.LEITUNG} ist nicht vorhanden.`);
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
async convertBetriebsmitteltypenLeitung() {
|
|
2305
|
-
// Freileitungstypen
|
|
2306
|
-
if (this.isTableAvailable(Integral7TableNames.TYP_FREILEITUNG)) {
|
|
2307
|
-
const result: StkTyp[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TYP_FREILEITUNG, 0, 0, []));
|
|
2308
|
-
for (const i7Data of result) {
|
|
2309
|
-
const typ = new OverheadWireInfo(generateUUID(), i7Data.name);
|
|
2310
|
-
this.setWireInfoProperties(typ, i7Data);
|
|
2311
|
-
this.cimModel.addOverheadWireInfo(typ);
|
|
2312
|
-
}
|
|
2313
|
-
} else {
|
|
2314
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_FREILEITUNG} ist nicht vorhanden.`);
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2317
|
-
// Kabelstypen
|
|
2318
|
-
if (this.isTableAvailable(Integral7TableNames.TYP_KABEL)) {
|
|
2319
|
-
const result: StkTyp[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TYP_KABEL, 0, 0, []));
|
|
2320
|
-
for (const i7Data of result) {
|
|
2321
|
-
const typ = new CableInfo(generateUUID(), i7Data.name);
|
|
2322
|
-
this.setWireInfoProperties(typ, i7Data);
|
|
2323
|
-
this.cimModel.addCableInfo(typ);
|
|
2324
|
-
}
|
|
2325
|
-
} else {
|
|
2326
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_KABEL} ist nicht vorhanden.`);
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
async convertLeitungen(limit: number, offset: number) {
|
|
2331
|
-
if (this.isTableAvailable(Integral7TableNames.LEITUNG)) {
|
|
2332
|
-
const result: LeitungStk[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.LEITUNG, limit, offset, []));
|
|
2333
|
-
for (const i7Data of result) {
|
|
2334
|
-
const leitung = new LeitungImpl(i7Data);
|
|
2335
|
-
this.integralLeitungen.set(i7Data.id, leitung);
|
|
2336
|
-
|
|
2337
|
-
const i7Schluessel = LEITUNG_PRAEFIX +
|
|
2338
|
-
ueberpruefeZeichenkette(i7Data.ukz) +
|
|
2339
|
-
MITTIGER_PUNKT +
|
|
2340
|
-
ueberpruefeZeichenkette(i7Data.kurzname) +
|
|
2341
|
-
MITTIGER_PUNKT +
|
|
2342
|
-
ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2343
|
-
MITTIGER_PUNKT +
|
|
2344
|
-
ueberpruefeZeichenkette(i7Data.stkabname);
|
|
2345
|
-
|
|
2346
|
-
const acLineSegment = new ACLineSegment(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.stkabname, i7Schluessel);
|
|
2347
|
-
|
|
2348
|
-
this.cimModel.addACLineSegment(acLineSegment);
|
|
2349
|
-
this.integralID2UUID.set(i7Data.id, acLineSegment.mrid);
|
|
2350
|
-
|
|
2351
|
-
const line = getLine(this.cimModel, i7Data.bezeichner, i7Data.kurzname);
|
|
2352
|
-
if (line) {
|
|
2353
|
-
acLineSegment.equipmentContainerUUID = line.mrid;
|
|
2354
|
-
// line.addEquipment(acLineSegment);
|
|
2355
|
-
} else {
|
|
2356
|
-
console.log(`Leitung ${i7Data.id} besitzt keinen Stromkreis.`);
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
// Topologie
|
|
2360
|
-
/* Anfang
|
|
2361
|
-
* 3 moegliche Anschluesse
|
|
2362
|
-
* KontenSo -> Anschluesspunkt
|
|
2363
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2364
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2365
|
-
/*
|
|
2366
|
-
const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
2367
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);
|
|
2368
|
-
*/
|
|
2369
|
-
|
|
2370
|
-
const start = this.memoryObjects.get(i7Data.aknoten);
|
|
2371
|
-
// console.log(`${i7Schluessel} start ${start?.constructor.name}`);
|
|
2372
|
-
if (start) {
|
|
2373
|
-
const terminal = createConnection(this.cimModel, acLineSegment, start, PhaseCode.ABC, 1);
|
|
2374
|
-
const baseVoltage = this.knotenSpannung.get(terminal.connectivityNodeUUID);
|
|
2375
|
-
acLineSegment.baseVoltage = baseVoltage;
|
|
2376
|
-
|
|
2377
|
-
} else {
|
|
2378
|
-
console.log(`Leitung ${i7Data.id} ${acLineSegment.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
|
|
2379
|
-
}
|
|
2380
|
-
const target = this.memoryObjects.get(i7Data.eknoten);
|
|
2381
|
-
//console.log(`${i7Schluessel} target ${target?.constructor.name}`);
|
|
2382
|
-
if (target) {
|
|
2383
|
-
const terminal = createConnection(this.cimModel, acLineSegment, target, PhaseCode.ABC, 2);
|
|
2384
|
-
const baseVoltage = this.knotenSpannung.get(terminal.connectivityNodeUUID);
|
|
2385
|
-
acLineSegment.baseVoltage = baseVoltage;
|
|
2386
|
-
} else {
|
|
2387
|
-
console.log(`Leitung ${i7Data.id} ${acLineSegment.mrid} besitzt keinen Zielknoten.`);
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
} else {
|
|
2392
|
-
console.log(`Tabelle ${Integral7TableNames.LEITUNG} ist nicht vorhanden.`);
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
async determineLeitungsTypen(leitungsIDs: number[]) {
|
|
2397
|
-
// Freileitungen
|
|
2398
|
-
if (this.isTableAvailable(Integral7TableNames.FREILEITUNG)) {
|
|
2399
|
-
const result: Stk[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.FREILEITUNG, 0, 0, leitungsIDs));
|
|
2400
|
-
for (const i7Data of result) {
|
|
2401
|
-
const acLineSegment = this.cimModel.getACLineSegment(this.integralID2UUID.get(i7Data.leitung));
|
|
2402
|
-
if (acLineSegment) {
|
|
2403
|
-
this.setACLineSegmentProperties(acLineSegment, i7Data, 'Freileitung');
|
|
2404
|
-
} else {
|
|
2405
|
-
console.log(`Freileitung ${i7Data.id} besitzt kein Leitungsobjekt.`);
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
} else {
|
|
2409
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_FREILEITUNG} ist nicht vorhanden.`);
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
// Kabel
|
|
2413
|
-
if (this.isTableAvailable(Integral7TableNames.KABEL)) {
|
|
2414
|
-
const result: Stk[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.KABEL, 0, 0, leitungsIDs));
|
|
2415
|
-
for (const i7Data of result) {
|
|
2416
|
-
const acLineSegment = this.cimModel.getACLineSegment(this.integralID2UUID.get(i7Data.leitung));
|
|
2417
|
-
if (acLineSegment) {
|
|
2418
|
-
this.setACLineSegmentProperties(acLineSegment, i7Data, 'Kabel');
|
|
2419
|
-
} else {
|
|
2420
|
-
console.log(`Kabel ${i7Data.id} besitzt kein Leitungsobjekt.`);
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
} else {
|
|
2424
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_FREILEITUNG} ist nicht vorhanden.`);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
async convertBetriebsmitteltypenTrafo() {
|
|
2429
|
-
// Trafo2WTypen
|
|
2430
|
-
if (this.isTableAvailable(Integral7TableNames.TYP_TRAFO2W)) {
|
|
2431
|
-
const result: Trafo2w[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TYP_TRAFO2W, 0, 0, []));
|
|
2432
|
-
for (const i7Data of result) {
|
|
2433
|
-
const typTrafo = new PowerTransformer2WInfo(generateUUID(), i7Data.name);
|
|
2434
|
-
|
|
2435
|
-
typTrafo.ukr = i7Data.ukr;
|
|
2436
|
-
typTrafo.pkr = i7Data.pkr;
|
|
2437
|
-
typTrafo.pLeer = i7Data.p_leer;
|
|
2438
|
-
typTrafo.iLeer = i7Data.i_leer;
|
|
2439
|
-
|
|
2440
|
-
const typWicklung1 = new TransformerEndInfo(generateUUID());
|
|
2441
|
-
typWicklung1.ratedS = new ApparentPower(i7Data.sr, UnitMultiplier.m, UnitSymbol.VA);
|
|
2442
|
-
this.setTransformerEndInfoProperties(typWicklung1, i7Data, 1);
|
|
2443
|
-
typWicklung1.powerTransformerInfo = typTrafo;
|
|
2444
|
-
typTrafo.transformerEndInfo.push(typWicklung1);
|
|
2445
|
-
|
|
2446
|
-
const typWicklung2 = new TransformerEndInfo(generateUUID());
|
|
2447
|
-
typWicklung2.ratedS = new ApparentPower(i7Data.sr, UnitMultiplier.m, UnitSymbol.VA);
|
|
2448
|
-
// ratedS not needed
|
|
2449
|
-
this.setTransformerEndInfoProperties(typWicklung2, i7Data, 2);
|
|
2450
|
-
typWicklung2.powerTransformerInfo = typTrafo;
|
|
2451
|
-
typTrafo.transformerEndInfo.push(typWicklung2);
|
|
2452
|
-
// const aktstufe = `aktstufe_s${endNumber}`;
|
|
2453
|
-
// const regelung = `regelung_s${endNumber}`;
|
|
2454
|
-
// wicklung.connectionKind
|
|
2455
|
-
this.cimModel.addPowerTransformer2WInfo(typTrafo);
|
|
2456
|
-
}
|
|
2457
|
-
} else {
|
|
2458
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_TRAFO2W} ist nicht vorhanden.`);
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
// Trafo3WTypen
|
|
2462
|
-
if (this.isTableAvailable(Integral7TableNames.TYP_TRAFO3W)) {
|
|
2463
|
-
const result: Trafo3w[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TYP_TRAFO3W, 0, 0, []));
|
|
2464
|
-
for (const i7Data of result) {
|
|
2465
|
-
const typTrafo = new PowerTransformer3WInfo(generateUUID(), i7Data.name);
|
|
2466
|
-
|
|
2467
|
-
typTrafo.pLeer = i7Data.p_leer;
|
|
2468
|
-
typTrafo.iLeer = i7Data.i_leer;
|
|
2469
|
-
|
|
2470
|
-
typTrafo.ukr12 = i7Data.ukr12;
|
|
2471
|
-
typTrafo.ukr13 = i7Data.ukr13;
|
|
2472
|
-
typTrafo.ukr23 = i7Data.ukr23;
|
|
2473
|
-
|
|
2474
|
-
typTrafo.pkr12 = i7Data.pkr12;
|
|
2475
|
-
typTrafo.pkr13 = i7Data.pkr13;
|
|
2476
|
-
typTrafo.pkr23 = i7Data.pkr23;
|
|
2477
|
-
|
|
2478
|
-
const typWicklung1 = new TransformerEndInfo(generateUUID());
|
|
2479
|
-
typWicklung1.ratedS = new ApparentPower(i7Data.sr1, UnitMultiplier.m, UnitSymbol.VA);
|
|
2480
|
-
this.setTransformerEndInfoProperties(typWicklung1, i7Data, 1);
|
|
2481
|
-
typWicklung1.powerTransformerInfo = typTrafo;
|
|
2482
|
-
typTrafo.transformerEndInfo.push(typWicklung1);
|
|
2483
|
-
|
|
2484
|
-
const typWicklung2 = new TransformerEndInfo(generateUUID());
|
|
2485
|
-
typWicklung2.ratedS = new ApparentPower(i7Data.sr2, UnitMultiplier.m, UnitSymbol.VA);
|
|
2486
|
-
this.setTransformerEndInfoProperties(typWicklung2, i7Data, 2);
|
|
2487
|
-
typWicklung2.powerTransformerInfo = typTrafo;
|
|
2488
|
-
typTrafo.transformerEndInfo.push(typWicklung2);
|
|
2489
|
-
|
|
2490
|
-
const typWicklung3 = new TransformerEndInfo(generateUUID());
|
|
2491
|
-
typWicklung3.ratedS = new ApparentPower(i7Data.sr3, UnitMultiplier.m, UnitSymbol.VA);
|
|
2492
|
-
this.setTransformerEndInfoProperties(typWicklung3, i7Data, 3);
|
|
2493
|
-
typWicklung3.powerTransformerInfo = typTrafo;
|
|
2494
|
-
typTrafo.transformerEndInfo.push(typWicklung3);
|
|
2495
|
-
|
|
2496
|
-
// const aktstufe = `aktstufe_s${endNumber}`;
|
|
2497
|
-
// const regelung = `regelung_s${endNumber}`;
|
|
2498
|
-
// wicklung.connectionKind
|
|
2499
|
-
|
|
2500
|
-
this.cimModel.addPowerTransformer3WInfo(typTrafo);
|
|
2501
|
-
}
|
|
2502
|
-
} else {
|
|
2503
|
-
console.log(`Tabelle ${Integral7TableNames.TYP_TRAFO3W} ist nicht vorhanden.`);
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
/* async convertTrafo2W(standortIDs: number[]) {
|
|
2508
|
-
if (this.isTableAvailable(Integral7TableNames.TRAFO2W)) {
|
|
2509
|
-
const result: Trafo2w[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRAFO2W, 0, 0, standortIDs));*/
|
|
2510
|
-
async convertTrafo2W(limit: number, offset: number) {
|
|
2511
|
-
if (this.isTableAvailable(Integral7TableNames.TRAFO2W)) {
|
|
2512
|
-
const result: Trafo2w[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRAFO2W, limit, offset, []));
|
|
2513
|
-
for (const i7Data of result) {
|
|
2514
|
-
const powerTransformer = new PowerTransformer(getUUID(i7Data.guid), getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2515
|
-
const powerTransformerInfo = this.cimModel.getPowerTransformer2WInfoByName(i7Data.nametyp);
|
|
2516
|
-
|
|
2517
|
-
// Topologie
|
|
2518
|
-
/* Anfang
|
|
2519
|
-
* 3 moegliche Anschluesse
|
|
2520
|
-
* KontenSo -> Anschluesspunkt
|
|
2521
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2522
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2523
|
-
/* const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
2524
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);*/
|
|
2525
|
-
|
|
2526
|
-
// const start = this.cimModel.getObject(startUUID);
|
|
2527
|
-
const start = this.memoryObjects.get(i7Data.aknoten);
|
|
2528
|
-
let startTerminal;
|
|
2529
|
-
if (start) {
|
|
2530
|
-
startTerminal = createConnection(this.cimModel, powerTransformer, start, PhaseCode.ABC, 1);
|
|
2531
|
-
} else {
|
|
2532
|
-
console.log(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2533
|
-
}
|
|
2534
|
-
// const target = this.cimModel.getObject(targetUUID);
|
|
2535
|
-
const target = this.memoryObjects.get(i7Data.eknoten);
|
|
2536
|
-
let targetTerminal;
|
|
2537
|
-
if (target) {
|
|
2538
|
-
targetTerminal = createConnection(this.cimModel, powerTransformer, target, PhaseCode.ABC, 2);
|
|
2539
|
-
} else {
|
|
2540
|
-
console.log(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Zielknoten.`);
|
|
2541
|
-
}
|
|
2542
|
-
const schaltgruppe = i7Data.schaltgr;
|
|
2543
|
-
|
|
2544
|
-
// Wicklungen
|
|
2545
|
-
const powerTransformerEnd1 = new PowerTransformerEnd(getUUID(i7Data.guid_w1), `W1_${powerTransformer.name}`);
|
|
2546
|
-
powerTransformerEnd1.endNumber = 1;
|
|
2547
|
-
powerTransformerEnd1.connectionKind = getSchaltgruppe(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2548
|
-
powerTransformerEnd1.phaseAngleClock = getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2549
|
-
const pkr = getPkrTrafo(i7Data, powerTransformerInfo, '');
|
|
2550
|
-
const ukr = getUkrTrafo(i7Data, powerTransformerInfo, '') / 100; // prozente umrechnen
|
|
2551
|
-
|
|
2552
|
-
const sr = getSrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber, false);
|
|
2553
|
-
const ur = getUrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber);
|
|
2554
|
-
// I rated
|
|
2555
|
-
const ir1 = (sr * Math.pow(10, 6) / ur * 1000) / Math.sqrt(3);
|
|
2556
|
-
|
|
2557
|
-
// Berechnung
|
|
2558
|
-
powerTransformerEnd1.r = calculateR(ur, pkr, sr);
|
|
2559
|
-
powerTransformerEnd1.x = calculateX(ur, ukr, sr, powerTransformerEnd1.r);
|
|
2560
|
-
powerTransformerEnd1.g = calculateG(ur, 0);
|
|
2561
|
-
powerTransformerEnd1.b = calculateB(ur, sr, 0, 0);
|
|
2562
|
-
powerTransformerEnd1.ratedU = ur;
|
|
2563
|
-
powerTransformerEnd1.ratedS = sr;
|
|
2564
|
-
|
|
2565
|
-
// Spannungsebene
|
|
2566
|
-
if (powerTransformerEnd1.ratedU) {
|
|
2567
|
-
let baseVoltage = this.cimModel.getBaseVoltage(powerTransformerEnd1.ratedU);
|
|
2568
|
-
if (!baseVoltage) {
|
|
2569
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, powerTransformerEnd1.ratedU);
|
|
2570
|
-
}
|
|
2571
|
-
powerTransformerEnd1.baseVoltageUUID = baseVoltage.mrid;
|
|
2572
|
-
} else {
|
|
2573
|
-
console.log(`Wicklung2W ${i7Data.id} ${powerTransformerEnd1.endNumber} ${powerTransformerEnd1.mrid} besitzt keine Spannungsangabe.`);
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
// Terminal
|
|
2577
|
-
const terminal = startTerminal
|
|
2578
|
-
if (terminal) {
|
|
2579
|
-
powerTransformerEnd1.terminalUUID = terminal.mrid;
|
|
2580
|
-
this.setConductingEquipmentCurrentLimit('W1 ' + powerTransformer.name, terminal.mrid, ir1);
|
|
2581
|
-
} else {
|
|
2582
|
-
console.log(`Wicklung2W ${i7Data.id} ${powerTransformerEnd1.endNumber} ${powerTransformerEnd1.mrid} besitzt keine Terminalinstanz.`);
|
|
2583
|
-
// console.log(`StartTerminal created ` + (startTerminal !== undefined));
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
powerTransformerEnd1.powerTransformerUUID = powerTransformer.mrid;
|
|
2587
|
-
powerTransformer.addPowerTransformerEnd(powerTransformerEnd1);
|
|
2588
|
-
|
|
2589
|
-
// Stufenschalter 1
|
|
2590
|
-
createTapChanger(i7Data, powerTransformerEnd1, this.cimModel, powerTransformerEnd1.ratedU);
|
|
2591
|
-
|
|
2592
|
-
// Wicklung 2
|
|
2593
|
-
const powerTransformerEnd2 = new PowerTransformerEnd(getUUID(i7Data.guid_w2), `W2_${powerTransformer.name}`);
|
|
2594
|
-
powerTransformerEnd2.endNumber = 2;
|
|
2595
|
-
powerTransformerEnd2.connectionKind = getSchaltgruppe(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2596
|
-
powerTransformerEnd2.phaseAngleClock = getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2597
|
-
|
|
2598
|
-
const sr2 = getSrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd2.endNumber, false);
|
|
2599
|
-
const ur2 = getUrTrafo(i7Data, powerTransformerInfo, powerTransformerEnd2.endNumber);
|
|
2600
|
-
// Berechnung
|
|
2601
|
-
powerTransformerEnd2.r = 0;
|
|
2602
|
-
powerTransformerEnd2.x = 0;
|
|
2603
|
-
powerTransformerEnd2.ratedS = sr2;
|
|
2604
|
-
powerTransformerEnd2.ratedU = ur2;
|
|
2605
|
-
|
|
2606
|
-
// I rated
|
|
2607
|
-
const ir2 = (sr * Math.pow(10, 6) / ur * 1000) / Math.sqrt(3);
|
|
2608
|
-
|
|
2609
|
-
// Spannungsebene
|
|
2610
|
-
if (powerTransformerEnd2.ratedU) {
|
|
2611
|
-
let baseVoltage = this.cimModel.getBaseVoltage(powerTransformerEnd2.ratedU);
|
|
2612
|
-
if (!baseVoltage) {
|
|
2613
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, powerTransformerEnd2.ratedU);
|
|
2614
|
-
}
|
|
2615
|
-
powerTransformerEnd2.baseVoltageUUID = baseVoltage.mrid;
|
|
2616
|
-
// powerTransformerEnd2.baseVoltage = baseVoltage;
|
|
2617
|
-
} else {
|
|
2618
|
-
console.log(`Wicklung ${i7Data.id} ${powerTransformerEnd2.endNumber} ${powerTransformerEnd2.mrid} besitzt keine Spannungsangabe.`);
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
// Terminal2
|
|
2622
|
-
const terminal2 = targetTerminal;
|
|
2623
|
-
if (terminal2) {
|
|
2624
|
-
powerTransformerEnd2.terminalUUID = terminal2.mrid;
|
|
2625
|
-
this.setConductingEquipmentCurrentLimit('W2 ' + powerTransformer.name, terminal.mrid, ir2);
|
|
2626
|
-
} else {
|
|
2627
|
-
console.log(`Wicklung2W ${i7Data.id} ${powerTransformerEnd2.endNumber} ${powerTransformerEnd2.mrid} besitzt keine Terminalinstanz.`);
|
|
2628
|
-
console.log(`TargetTerminal created ` + (targetTerminal === undefined));
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
powerTransformerEnd2.powerTransformerUUID = powerTransformer.mrid;
|
|
2632
|
-
powerTransformer.addPowerTransformerEnd(powerTransformerEnd2);
|
|
2633
|
-
|
|
2634
|
-
// Stufenschalter 2
|
|
2635
|
-
createTapChanger(i7Data, powerTransformerEnd2, this.cimModel, powerTransformerEnd2.ratedU);
|
|
2636
|
-
|
|
2637
|
-
// Umspannanlage
|
|
2638
|
-
const substationUUID = this.integralID2UUID.get(i7Data.standort);
|
|
2639
|
-
if (substationUUID) {
|
|
2640
|
-
powerTransformer.equipmentContainerUUID = substationUUID;
|
|
2641
|
-
|
|
2642
|
-
const i7Schluessel = /*substation.description*/ +
|
|
2643
|
-
TRAFO2WPRAEFIX_PRAEFIX +
|
|
2644
|
-
i7Data.bezeichner;
|
|
2645
|
-
powerTransformer.description = i7Schluessel;
|
|
2646
|
-
|
|
2647
|
-
} else {
|
|
2648
|
-
console.log(`Trafo2W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
2649
|
-
}
|
|
2650
|
-
this.cimModel.addPowerTransformer(powerTransformer);
|
|
2651
|
-
this.integralID2UUID.set(i7Data.id, powerTransformer.mrid);
|
|
2652
|
-
}
|
|
2653
|
-
} else {
|
|
2654
|
-
console.log(`Tabelle ${Integral7TableNames.TRAFO2W} ist nicht vorhanden.`);
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
async convertTrafo3W(limit: number, offset: number) {
|
|
2659
|
-
if (this.isTableAvailable(Integral7TableNames.TRAFO3W)) {
|
|
2660
|
-
const result: Trafo3w[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRAFO3W, limit, offset, []));
|
|
2661
|
-
|
|
2662
|
-
const trafoIDs = result.map(obj => obj['id']);
|
|
2663
|
-
|
|
2664
|
-
const trafoWicklungen = new Map<number, Trafo3wWicklung>();
|
|
2665
|
-
if (this.isTableAvailable(Integral7TableNames.TRAFO3_WICKLUNG) && trafoIDs.length) {
|
|
2666
|
-
const wicklungenResult: Trafo3wWicklung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRAFO3_WICKLUNG, 0, 0, trafoIDs));
|
|
2667
|
-
for (const wicklung of wicklungenResult) {
|
|
2668
|
-
trafoWicklungen.set(wicklung.id, wicklung);
|
|
2669
|
-
}
|
|
2670
|
-
} else {
|
|
2671
|
-
console.log(`Tabelle ${Integral7TableNames.TRAFO3_WICKLUNG} ist nicht vorhanden.`);
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
for (const i7Data of result) {
|
|
2675
|
-
const powerTransformer = new PowerTransformer(getUUID(i7Data.guid), getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2676
|
-
|
|
2677
|
-
const powerTransformerInfo = this.cimModel.getPowerTransformer3WInfoByName(i7Data.nametyp);
|
|
2678
|
-
|
|
2679
|
-
const schaltgruppe = i7Data.schaltgr;
|
|
2680
|
-
// Impedanzen
|
|
2681
|
-
// Topologie
|
|
2682
|
-
/* Anfang
|
|
2683
|
-
* 3 moegliche Anschluesse
|
|
2684
|
-
* KontenSo -> Anschluesspunkt
|
|
2685
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2686
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2687
|
-
|
|
2688
|
-
const pkr12 = getPkrTrafo(i7Data, powerTransformerInfo, '12');
|
|
2689
|
-
const pkr13 = getPkrTrafo(i7Data, powerTransformerInfo, '13');
|
|
2690
|
-
const pkr23 = getPkrTrafo(i7Data, powerTransformerInfo, '23');
|
|
2691
|
-
|
|
2692
|
-
const ukr12 = getUkrTrafo(i7Data, powerTransformerInfo, '12');
|
|
2693
|
-
const ukr13 = getUkrTrafo(i7Data, powerTransformerInfo, '13');
|
|
2694
|
-
const ukr23 = getUkrTrafo(i7Data, powerTransformerInfo, '23');
|
|
2695
|
-
|
|
2696
|
-
const sr1 = getSrTrafo(i7Data, powerTransformerInfo, 1, true);
|
|
2697
|
-
const sr2 = getSrTrafo(i7Data, powerTransformerInfo, 2, true);
|
|
2698
|
-
const sr3 = getSrTrafo(i7Data, powerTransformerInfo, 3, true);
|
|
2699
|
-
|
|
2700
|
-
const ur1 = getUrTrafo(i7Data, powerTransformerInfo, 1);
|
|
2701
|
-
const ur2 = getUrTrafo(i7Data, powerTransformerInfo, 2);
|
|
2702
|
-
const ur3 = getUrTrafo(i7Data, powerTransformerInfo, 3);
|
|
2703
|
-
|
|
2704
|
-
// I rated
|
|
2705
|
-
const ir1 = (sr1 * Math.pow(10, 6) / ur1 * 1000) / Math.sqrt(3);
|
|
2706
|
-
const ir2 = (sr2 * Math.pow(10, 6) / ur2 * 1000) / Math.sqrt(3);
|
|
2707
|
-
const ir3 = (sr3 * Math.pow(10, 6) / ur3 * 1000) / Math.sqrt(3);
|
|
2708
|
-
|
|
2709
|
-
//Leerlaufverluste in kW
|
|
2710
|
-
const pLeer = getTrafoPleer(i7Data, powerTransformerInfo)
|
|
2711
|
-
// Leerlaufstrom bezogen auf Wicklung mit dem grössten Sr in %
|
|
2712
|
-
const iLeer = getTrafoIleer(i7Data, powerTransformerInfo);
|
|
2713
|
-
|
|
2714
|
-
// Impedanzen
|
|
2715
|
-
const impedanzW1 = calculateImpedanzenTrafo3W(1, ur1, ur2, ur3,
|
|
2716
|
-
sr1, sr2, sr3,
|
|
2717
|
-
pkr12, pkr13, pkr23,
|
|
2718
|
-
ukr12, ukr13, ukr23,
|
|
2719
|
-
pLeer, iLeer);
|
|
2720
|
-
const impedanzW2 = calculateImpedanzenTrafo3W(2, ur1, ur2, ur3,
|
|
2721
|
-
sr1, sr2, sr3,
|
|
2722
|
-
pkr12, pkr13, pkr23,
|
|
2723
|
-
ukr12, ukr13, ukr23,
|
|
2724
|
-
pLeer, iLeer);
|
|
2725
|
-
const impedanzW3 = calculateImpedanzenTrafo3W(3, ur1, ur2, ur3,
|
|
2726
|
-
sr1, sr2, sr3,
|
|
2727
|
-
pkr12, pkr13, pkr23,
|
|
2728
|
-
ukr12, ukr13, ukr23,
|
|
2729
|
-
pLeer, iLeer);
|
|
2730
|
-
|
|
2731
|
-
const wicklung1 = trafoWicklungen.get(i7Data.trafowicklung3w1);
|
|
2732
|
-
let terminal1, terminal2, terminal3;
|
|
2733
|
-
if (wicklung1) {
|
|
2734
|
-
const start = this.memoryObjects.get(wicklung1.aknoten);
|
|
2735
|
-
/* const startUUID = this.integralID2UUID.get(wicklung1.aknoten)
|
|
2736
|
-
const start = this.cimModel.getObject(startUUID);*/
|
|
2737
|
-
if (start) {
|
|
2738
|
-
terminal1 = createConnection(this.cimModel, powerTransformer, start, PhaseCode.ABC, 1);
|
|
2739
|
-
} else {
|
|
2740
|
-
console.log(`PowerTransformer ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2741
|
-
}
|
|
2742
|
-
} else {
|
|
2743
|
-
console.log(`Trafo ${i7Data.id} Wicklung 1 ${i7Data.trafowicklung3w1} ist nicht vorhanden.`);
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
const powerTransformerEnd1 = new PowerTransformerEnd(getUUID(i7Data.guid_w1), `W1 ${powerTransformer.name}`);
|
|
2747
|
-
powerTransformerEnd1.endNumber = 1;
|
|
2748
|
-
|
|
2749
|
-
powerTransformerEnd1.connectionKind = getSchaltgruppe(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2750
|
-
powerTransformerEnd1.phaseAngleClock = getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
// Berechnung
|
|
2754
|
-
powerTransformerEnd1.r = impedanzW1.r;
|
|
2755
|
-
powerTransformerEnd1.x = impedanzW1.x;
|
|
2756
|
-
powerTransformerEnd1.g = impedanzW1.g;
|
|
2757
|
-
powerTransformerEnd1.b = impedanzW1.b;
|
|
2758
|
-
powerTransformerEnd1.ratedU = ur1;
|
|
2759
|
-
powerTransformerEnd1.ratedS = sr1;
|
|
2760
|
-
|
|
2761
|
-
// Spannungsebene
|
|
2762
|
-
if (powerTransformerEnd1.ratedU) {
|
|
2763
|
-
let baseVoltage = this.cimModel.getBaseVoltage(powerTransformerEnd1.ratedU);
|
|
2764
|
-
if (!baseVoltage) {
|
|
2765
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, powerTransformerEnd1.ratedU);
|
|
2766
|
-
}
|
|
2767
|
-
powerTransformerEnd1.baseVoltageUUID = baseVoltage.mrid;
|
|
2768
|
-
} else {
|
|
2769
|
-
console.log(`Wicklung ${i7Data.id} ${powerTransformerEnd1.endNumber} ${powerTransformerEnd1.mrid} besitzt keine Spannungsangabe.`);
|
|
2770
|
-
}
|
|
2771
|
-
|
|
2772
|
-
powerTransformerEnd1.powerTransformerUUID = powerTransformer.mrid;
|
|
2773
|
-
powerTransformer.addPowerTransformerEnd(powerTransformerEnd1);
|
|
2774
|
-
|
|
2775
|
-
// Terminal
|
|
2776
|
-
// const terminal1 = getConductingEquipmentTerminalBySecNumber(powerTransformer, powerTransformerEnd1.endNumber);
|
|
2777
|
-
if (terminal1) {
|
|
2778
|
-
powerTransformerEnd1.terminalUUID = terminal1.mrid;
|
|
2779
|
-
this.setConductingEquipmentCurrentLimit('W1 ' + powerTransformer.name, terminal1.mrid, ir1);
|
|
2780
|
-
} else {
|
|
2781
|
-
console.log(`Wicklung3W ${i7Data.id} ${powerTransformerEnd1.endNumber} ${powerTransformerEnd1.mrid} besitzt keine Terminalinstanz.`);
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
// Wicklung 2
|
|
2785
|
-
const wicklung2 = trafoWicklungen.get(i7Data.trafowicklung3w2);
|
|
2786
|
-
if (wicklung2) {
|
|
2787
|
-
/* const startUUID = this.integralID2UUID.get(wicklung2.aknoten)
|
|
2788
|
-
const start = this.cimModel.getObject(startUUID);*/
|
|
2789
|
-
const start = this.memoryObjects.get(wicklung2.aknoten);
|
|
2790
|
-
if (start) {
|
|
2791
|
-
terminal2 = createConnection(this.cimModel, powerTransformer, start, PhaseCode.ABC, 2);
|
|
2792
|
-
} else {
|
|
2793
|
-
console.log(`PowerTransformer ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2794
|
-
}
|
|
2795
|
-
} else {
|
|
2796
|
-
console.log(`Trafo ${i7Data.id} Wicklung 2 ${i7Data.trafowicklung3w2} ist nicht vorhanden.`);
|
|
2797
|
-
}
|
|
2798
|
-
const powerTransformerEnd2 = new PowerTransformerEnd(getUUID(i7Data.guid_w2), `Wicklung 2 ${powerTransformer.name}`);
|
|
2799
|
-
powerTransformerEnd2.endNumber = 2;
|
|
2800
|
-
powerTransformerEnd2.connectionKind = getSchaltgruppe(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2801
|
-
powerTransformerEnd2.phaseAngleClock = getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2802
|
-
|
|
2803
|
-
// Berechnung
|
|
2804
|
-
powerTransformerEnd2.r = impedanzW2.r;
|
|
2805
|
-
powerTransformerEnd2.x = impedanzW2.x;
|
|
2806
|
-
powerTransformerEnd2.g = impedanzW2.g;
|
|
2807
|
-
powerTransformerEnd2.b = impedanzW2.b;
|
|
2808
|
-
powerTransformerEnd2.ratedS = sr2;
|
|
2809
|
-
powerTransformerEnd2.ratedU = ur2;
|
|
2810
|
-
|
|
2811
|
-
// Spannungsebene
|
|
2812
|
-
if (powerTransformerEnd2.ratedU) {
|
|
2813
|
-
let baseVoltage = this.cimModel.getBaseVoltage(powerTransformerEnd2.ratedU);
|
|
2814
|
-
if (!baseVoltage) {
|
|
2815
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, powerTransformerEnd2.ratedU);
|
|
2816
|
-
}
|
|
2817
|
-
powerTransformerEnd2.baseVoltageUUID = baseVoltage.mrid;
|
|
2818
|
-
} else {
|
|
2819
|
-
console.log(`Wicklung ${i7Data.id} ${powerTransformerEnd2.endNumber} ${powerTransformerEnd2.mrid} besitzt keine Spannungsangabe.`);
|
|
2820
|
-
}
|
|
2821
|
-
powerTransformerEnd2.powerTransformerUUID = powerTransformer.mrid;
|
|
2822
|
-
powerTransformer.addPowerTransformerEnd(powerTransformerEnd2);
|
|
2823
|
-
// Terminal2
|
|
2824
|
-
/* const terminal2 = getConductingEquipmentTerminalBySecNumber(powerTransformer, powerTransformerEnd2.endNumber);*/
|
|
2825
|
-
if (terminal2) {
|
|
2826
|
-
powerTransformerEnd2.terminalUUID = terminal2.mrid;
|
|
2827
|
-
this.setConductingEquipmentCurrentLimit('W2 ' + powerTransformer.name, terminal2.mrid, ir2);
|
|
2828
|
-
} else {
|
|
2829
|
-
console.log(`Wicklung3W ${i7Data.id} ${powerTransformerEnd2.endNumber} ${powerTransformerEnd2.mrid} besitzt keine Terminalinstanz.`);
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
// Wicklung 3
|
|
2833
|
-
const wicklung3 = trafoWicklungen.get(i7Data.trafowicklung3w3);
|
|
2834
|
-
if (wicklung3) {
|
|
2835
|
-
/* const startUUID = this.integralID2UUID.get(wicklung3.aknoten)
|
|
2836
|
-
const start = this.cimModel.getObject(startUUID);*/
|
|
2837
|
-
const start = this.memoryObjects.get(wicklung3.aknoten);
|
|
2838
|
-
if (start) {
|
|
2839
|
-
terminal3 = createConnection(this.cimModel, powerTransformer, start, PhaseCode.ABC, 3);
|
|
2840
|
-
} else {
|
|
2841
|
-
console.log(`PowerTransformer ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
2842
|
-
}
|
|
2843
|
-
} else {
|
|
2844
|
-
console.log(`Trafo ${i7Data.id} Wicklung 3 ${i7Data.trafowicklung3w2} ist nicht vorhanden.`);
|
|
2845
|
-
}
|
|
2846
|
-
const powerTransformerEnd3 = new PowerTransformerEnd(getUUID(i7Data.guid_w3), `Wicklung 3 ${powerTransformer.name}`);
|
|
2847
|
-
powerTransformerEnd3.endNumber = 3;
|
|
2848
|
-
powerTransformerEnd3.connectionKind = getSchaltgruppe(schaltgruppe, powerTransformerEnd3.endNumber);
|
|
2849
|
-
powerTransformerEnd3.phaseAngleClock = getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd3.endNumber);
|
|
2850
|
-
|
|
2851
|
-
// Berechnung
|
|
2852
|
-
powerTransformerEnd3.r = impedanzW3.r;
|
|
2853
|
-
powerTransformerEnd3.x = impedanzW3.x;
|
|
2854
|
-
powerTransformerEnd2.g = impedanzW3.g;
|
|
2855
|
-
powerTransformerEnd2.b = impedanzW3.b;
|
|
2856
|
-
powerTransformerEnd3.ratedS = sr3;
|
|
2857
|
-
powerTransformerEnd3.ratedU = ur3;
|
|
2858
|
-
|
|
2859
|
-
// Spannungsebene
|
|
2860
|
-
if (powerTransformerEnd3.ratedU) {
|
|
2861
|
-
let baseVoltage = this.cimModel.getBaseVoltage(powerTransformerEnd3.ratedU);
|
|
2862
|
-
if (!baseVoltage) {
|
|
2863
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, powerTransformerEnd3.ratedU);
|
|
2864
|
-
}
|
|
2865
|
-
powerTransformerEnd3.baseVoltageUUID = baseVoltage.mrid;
|
|
2866
|
-
} else {
|
|
2867
|
-
console.log(`Wicklung3W ${i7Data.id} ${powerTransformerEnd3.endNumber} ${powerTransformerEnd3.mrid} besitzt keine Spannungsangabe.`);
|
|
2868
|
-
}
|
|
2869
|
-
|
|
2870
|
-
powerTransformerEnd3.powerTransformerUUID = powerTransformer.mrid;
|
|
2871
|
-
powerTransformer.addPowerTransformerEnd(powerTransformerEnd3);
|
|
2872
|
-
|
|
2873
|
-
// Terminal3
|
|
2874
|
-
/*const terminal3 = getConductingEquipmentTerminalBySecNumber(powerTransformer, powerTransformerEnd3.endNumber);*/
|
|
2875
|
-
if (terminal3) {
|
|
2876
|
-
powerTransformerEnd3.terminalUUID = terminal3.mrid;
|
|
2877
|
-
this.setConductingEquipmentCurrentLimit('W3 ' + powerTransformer.name, terminal3.mrid, ir3);
|
|
2878
|
-
} else {
|
|
2879
|
-
console.log(`Wicklung ${i7Data.id} ${powerTransformerEnd3.endNumber} ${powerTransformerEnd3.mrid} besitzt keine Terminalinstanz.`);
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
// Umspannanlage
|
|
2884
|
-
const substationUUID = this.integralID2UUID.get(i7Data.standort);
|
|
2885
|
-
if (substationUUID) {
|
|
2886
|
-
powerTransformer.equipmentContainerUUID = substationUUID;
|
|
2887
|
-
|
|
2888
|
-
const i7Schluessel = /*substation.description +*/
|
|
2889
|
-
TRAFO3WPRAEFIX_PRAEFIX +
|
|
2890
|
-
i7Data.bezeichner;
|
|
2891
|
-
powerTransformer.description = i7Schluessel;
|
|
2892
|
-
|
|
2893
|
-
} else {
|
|
2894
|
-
console.log(`Trafo2W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
2895
|
-
}
|
|
2896
|
-
this.cimModel.addPowerTransformer(powerTransformer);
|
|
2897
|
-
this.integralID2UUID.set(i7Data.id, powerTransformer.mrid);
|
|
2898
|
-
}
|
|
2899
|
-
} else {
|
|
2900
|
-
console.log(`Tabelle ${Integral7TableNames.TRAFO3W} ist nicht vorhanden.`);
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
async convertLaengsdrosseln(limit: number, offset: number) {
|
|
2905
|
-
console.log('isTableAvailable ' + this.isTableAvailable(Integral7TableNames.LAENGSDROSSEL));
|
|
2906
|
-
if (this.isTableAvailable(Integral7TableNames.LAENGSDROSSEL)) {
|
|
2907
|
-
const result: Ldrossel[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.LAENGSDROSSEL, limit, offset, []));
|
|
2908
|
-
|
|
2909
|
-
for (const i7Data of result) {
|
|
2910
|
-
const seriesCompensator = new AMPRIONSeriesCompensator(getUUID(i7Data.guid), getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2911
|
-
|
|
2912
|
-
// Topologie
|
|
2913
|
-
/* Anfang
|
|
2914
|
-
* 3 moegliche Anschluesse
|
|
2915
|
-
* KontenSo -> Anschluesspunkt
|
|
2916
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2917
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
2918
|
-
/* const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
2919
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);*/
|
|
2920
|
-
|
|
2921
|
-
// const start = this.cimModel.getObject(startUUID);
|
|
2922
|
-
const start = this.memoryObjects.get(i7Data.aknoten);
|
|
2923
|
-
let startTerminal;
|
|
2924
|
-
if (start) {
|
|
2925
|
-
startTerminal = createConnection(this.cimModel, seriesCompensator, start, PhaseCode.ABC, 1);
|
|
2926
|
-
} else {
|
|
2927
|
-
console.log(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keinen Anfangsknoten.`);
|
|
2928
|
-
}
|
|
2929
|
-
// const target = this.cimModel.getObject(targetUUID);
|
|
2930
|
-
const target = this.memoryObjects.get(i7Data.eknoten);
|
|
2931
|
-
let targetTerminal;
|
|
2932
|
-
if (target) {
|
|
2933
|
-
targetTerminal = createConnection(this.cimModel, seriesCompensator, target, PhaseCode.ABC, 2);
|
|
2934
|
-
} else {
|
|
2935
|
-
console.log(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keinen Zielknoten.`);
|
|
2936
|
-
}
|
|
2937
|
-
/** Spannungsebene */
|
|
2938
|
-
const ur = getU(i7Data.ur, this.deafultUn);
|
|
2939
|
-
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, ur);
|
|
2940
|
-
seriesCompensator.baseVoltage = baseVoltage;
|
|
2941
|
-
/**
|
|
2942
|
-
* Längsdrossel ist beschrieben durch:
|
|
2943
|
-
Un = 10 kV = 10000 V
|
|
2944
|
-
IrA = 2500
|
|
2945
|
-
Ukr = 7% = 0,07
|
|
2946
|
-
Pkr = 0
|
|
2947
|
-
|
|
2948
|
-
S = Un(V) * IrA * Wurzel(3) => 43301270,2
|
|
2949
|
-
Z = Ukr * un^2/IrA (umgerechnet) = 0,161
|
|
2950
|
-
R = 0, da Pkr = 0
|
|
2951
|
-
X = Z = 0,161
|
|
2952
|
-
* */
|
|
2953
|
-
/** elektrische Parameter */
|
|
2954
|
-
let ira = 100;
|
|
2955
|
-
if (i7Data.ir && i7Data.ir > 0) {
|
|
2956
|
-
ira = i7Data.ir;
|
|
2957
|
-
}
|
|
2958
|
-
const voltage = baseVoltage.nominalVoltage.value * 1000
|
|
2959
|
-
const z = (i7Data.ukr / 100) * Math.pow(voltage, 2) / (voltage * ira * Math.sqrt(3));
|
|
2960
|
-
seriesCompensator.x = z;
|
|
2961
|
-
|
|
2962
|
-
seriesCompensator.varistorRatedCurrent = ira;
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
/** CurrentLimit */
|
|
2966
|
-
const terminal = startTerminal
|
|
2967
|
-
if (terminal) {
|
|
2968
|
-
this.setConductingEquipmentCurrentLimit('Rating ' + seriesCompensator.name, terminal.mrid, ira);
|
|
2969
|
-
} else {
|
|
2970
|
-
console.log(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
2971
|
-
}
|
|
2972
|
-
|
|
2973
|
-
// Umspannanlage
|
|
2974
|
-
const substationUUID = this.integralID2UUID.get(i7Data.standort);
|
|
2975
|
-
|
|
2976
|
-
/** VoltageLevel */
|
|
2977
|
-
/** Speichern, um später Längsdrossel die VoltageLevelInstanz bestimmen zu können. */
|
|
2978
|
-
const subVlData: { un: number; vlUUID: string }[] = this.substationVoltagelevels.get(i7Data.standort);
|
|
2979
|
-
const vlUUID = subVlData.find(elem => elem.un === i7Data.ur);
|
|
2980
|
-
|
|
2981
|
-
if (vlUUID) {
|
|
2982
|
-
seriesCompensator.equipmentContainerUUID = vlUUID.vlUUID;
|
|
2983
|
-
} else {
|
|
2984
|
-
console.log(`Längsdrossel ${i7Data.id} besitzt kein VoltageLevel Ur ${i7Data.ur}.`);
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
/** PSR Types */
|
|
2988
|
-
const psrType = createIfNotExitsPSRType(this.cimModel, 'Längsdrossel');
|
|
2989
|
-
seriesCompensator.psrTypeUUID = psrType.mrid;
|
|
2990
|
-
this.cimModel.addSeriesCompensator(seriesCompensator);
|
|
2991
|
-
this.integralID2UUID.set(i7Data.id, seriesCompensator.mrid);
|
|
2992
|
-
}
|
|
2993
|
-
} else {
|
|
2994
|
-
console.log(`Tabelle ${Integral7TableNames.LAENGSDROSSEL} ist nicht vorhanden.`);
|
|
2995
|
-
}
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
async convertTrenner3f(containerIDs: number[]) {
|
|
2999
|
-
if (this.isTableAvailable(Integral7TableNames.TRENNER_3P)) {
|
|
3000
|
-
const result: Trenner3p[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRENNER_3P, 0, 0, containerIDs));
|
|
3001
|
-
for (const i7Data of result) {
|
|
3002
|
-
const disconnector = new Disconnector(getUUID(i7Data.guid), i7Data.bezeichner);
|
|
3003
|
-
disconnector.normalOpen = convertToBooleanI7(!i7Data.schaltzustand);
|
|
3004
|
-
disconnector.open = convertToBooleanI7(!i7Data.schaltzustand);
|
|
3005
|
-
|
|
3006
|
-
const equipmentContainer = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.seliste)) as EquipmentContainer;
|
|
3007
|
-
|
|
3008
|
-
const cnStart = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
3009
|
-
const cnZiel = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
3010
|
-
|
|
3011
|
-
if (equipmentContainer) {
|
|
3012
|
-
// equipmentContainer.addEquipment(disconnector);
|
|
3013
|
-
disconnector.equipmentContainerUUID = equipmentContainer.mrid;
|
|
3014
|
-
} else {
|
|
3015
|
-
console.log(`Disconnector ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
if (cnStart) {
|
|
3019
|
-
createConnection(this.cimModel, disconnector, cnStart, PhaseCode.ABC, 1);
|
|
3020
|
-
} else {
|
|
3021
|
-
console.log(`Disconnector ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
3022
|
-
}
|
|
3023
|
-
if (cnZiel) {
|
|
3024
|
-
createConnection(this.cimModel, disconnector, cnZiel, PhaseCode.ABC, 2);
|
|
3025
|
-
} else {
|
|
3026
|
-
console.log(`Disconnector ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
|
-
const vl = this.cimModel.objects.get((equipmentContainer as Bay)?.voltageLevelUUID) as VoltageLevel;
|
|
3030
|
-
const baseVoltage = this.cimModel.getBaseVoltageByUUID(vl?.baseVoltageUUID);
|
|
3031
|
-
if (baseVoltage) {
|
|
3032
|
-
disconnector.baseVoltageUUID = baseVoltage.mrid;
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3035
|
-
this.cimModel.addDisconnector(disconnector);
|
|
3036
|
-
this.integralID2UUID.set(i7Data.id, disconnector.mrid);
|
|
3037
|
-
}
|
|
3038
|
-
} else {
|
|
3039
|
-
console.log(`Tabelle ${Integral7TableNames.TRENNER_3P} ist nicht vorhanden.`);
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
|
|
3043
|
-
async convertTrennerFi3f(containerIDs: number[]) {
|
|
3044
|
-
if (this.isTableAvailable(Integral7TableNames.TRENNERFI_3P)) {
|
|
3045
|
-
const result: Trenner3p[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRENNERFI_3P, 0, 0, containerIDs));
|
|
3046
|
-
for (const i7Data of result) {
|
|
3047
|
-
const disconnector = new Disconnector(generateUUID(), i7Data.bezeichner);
|
|
3048
|
-
disconnector.normalOpen = convertToBooleanI7(i7Data.schaltzustand);
|
|
3049
|
-
disconnector.open = convertToBooleanI7(i7Data.schaltzustand);
|
|
3050
|
-
|
|
3051
|
-
const equipmentContainer = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.seliste)) as EquipmentContainer;
|
|
3052
|
-
|
|
3053
|
-
const cnStart = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
3054
|
-
const cnZiel = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
3055
|
-
|
|
3056
|
-
if (equipmentContainer) {
|
|
3057
|
-
// equipmentContainer.addEquipment(disconnector);
|
|
3058
|
-
disconnector.equipmentContainerUUID = equipmentContainer.mrid;
|
|
3059
|
-
} else {
|
|
3060
|
-
console.log(`Disconnector Fi3 ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
|
-
if (cnStart) {
|
|
3064
|
-
createConnection(this.cimModel, disconnector, cnStart, PhaseCode.ABC, 1);
|
|
3065
|
-
} else {
|
|
3066
|
-
console.log(`Disconnector Fi3 ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
3067
|
-
}
|
|
3068
|
-
if (cnZiel) {
|
|
3069
|
-
createConnection(this.cimModel, disconnector, cnZiel, PhaseCode.ABC, 2);
|
|
3070
|
-
} else {
|
|
3071
|
-
console.log(`Disconnector Fi3 ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
const vl = this.cimModel.objects.get((equipmentContainer as Bay)?.voltageLevelUUID) as VoltageLevel;
|
|
3075
|
-
const baseVoltage = this.cimModel.getBaseVoltageByUUID(vl?.baseVoltageUUID);
|
|
3076
|
-
if (baseVoltage) {
|
|
3077
|
-
disconnector.baseVoltageUUID = baseVoltage.mrid;
|
|
3078
|
-
}
|
|
3079
|
-
this.cimModel.addDisconnector(disconnector);
|
|
3080
|
-
this.integralID2UUID.set(i7Data.id, disconnector.mrid);
|
|
3081
|
-
}
|
|
3082
|
-
} else {
|
|
3083
|
-
console.log(`Tabelle ${Integral7TableNames.TRENNERFI_3P} ist nicht vorhanden.`);
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
|
|
3087
|
-
async convertLeistungsschalter(containerIDs: number[]) {
|
|
3088
|
-
if (this.isTableAvailable(Integral7TableNames.LEISTUNGSSCHALTER)) {
|
|
3089
|
-
const result: Leistungsschalter[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.LEISTUNGSSCHALTER, 0, 0, containerIDs));
|
|
3090
|
-
for (const i7Data of result) {
|
|
3091
|
-
const breaker = new Breaker(generateUUID(), i7Data.bezeichner);
|
|
3092
|
-
breaker.normalOpen = convertToBooleanI7(i7Data.schaltzustand);
|
|
3093
|
-
breaker.open = convertToBooleanI7(i7Data.schaltzustand);
|
|
3094
|
-
|
|
3095
|
-
const equipmentContainer = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.seliste)) as EquipmentContainer;
|
|
3096
|
-
const cnStart = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
3097
|
-
const cnZiel = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
3098
|
-
if (equipmentContainer) {
|
|
3099
|
-
// equipmentContainer.addEquipment(breaker);
|
|
3100
|
-
breaker.equipmentContainerUUID = equipmentContainer.mrid;
|
|
3101
|
-
} else {
|
|
3102
|
-
console.log(`LS ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3103
|
-
}
|
|
3104
|
-
if (cnStart) {
|
|
3105
|
-
createConnection(this.cimModel, breaker, cnStart, PhaseCode.ABC, 1);
|
|
3106
|
-
} else {
|
|
3107
|
-
console.log(`LS ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
3108
|
-
}
|
|
3109
|
-
if (cnZiel) {
|
|
3110
|
-
createConnection(this.cimModel, breaker, cnZiel, PhaseCode.ABC, 2);
|
|
3111
|
-
} else {
|
|
3112
|
-
console.log(`LS ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
const vl = this.cimModel.objects.get((equipmentContainer as Bay)?.voltageLevelUUID) as VoltageLevel;
|
|
3116
|
-
const baseVoltage = this.cimModel.getBaseVoltageByUUID(vl?.baseVoltageUUID);
|
|
3117
|
-
if (baseVoltage) {
|
|
3118
|
-
breaker.baseVoltageUUID = baseVoltage.mrid;
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
this.cimModel.addBreaker(breaker);
|
|
3123
|
-
this.integralID2UUID.set(i7Data.id, breaker.mrid);
|
|
3124
|
-
}
|
|
3125
|
-
} else {
|
|
3126
|
-
console.log(`Tabelle ${Integral7TableNames.LEISTUNGSSCHALTER} ist nicht vorhanden.`);
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
async convertCsConverterDC(knotenSfIDs: number[]) {
|
|
3132
|
-
if (this.isTableAvailable(Integral7TableNames.HGUE_KOPFSTATION_KLASSISCH)) {
|
|
3133
|
-
const result: Kopfstation[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.HGUE_KOPFSTATION_KLASSISCH, 0, 0, knotenSfIDs));
|
|
3134
|
-
for (const i7Data of result) {
|
|
3135
|
-
/** Containment DC DCConverterUnit */
|
|
3136
|
-
const dcConverterUnit = new DCConverterUnit(generateUUID(), 'DCConverterUnit');
|
|
3137
|
-
// Topologie
|
|
3138
|
-
/* Anfang
|
|
3139
|
-
* 3 moegliche Anschluesse
|
|
3140
|
-
* KontenSo -> Anschluesspunkt
|
|
3141
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
3142
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
3143
|
-
/*
|
|
3144
|
-
const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
3145
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);
|
|
3146
|
-
*/
|
|
3147
|
-
|
|
3148
|
-
//const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3149
|
-
const acConnectivityNode = this.cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
3150
|
-
if (acConnectivityNode) {
|
|
3151
|
-
const equipmentContainer = determineEquipmentContainer('Substation', this.cimModel, this.cimModel.getObject(acConnectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
3152
|
-
if (equipmentContainer) {
|
|
3153
|
-
dcConverterUnit.name = `DCConverterUnit ${equipmentContainer.name}`;
|
|
3154
|
-
dcConverterUnit.setSubstation(equipmentContainer as Substation);
|
|
3155
|
-
} else {
|
|
3156
|
-
console.log(`DCConverterUnit ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3157
|
-
}
|
|
3158
|
-
} else {
|
|
3159
|
-
console.log(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3160
|
-
}
|
|
3161
|
-
|
|
3162
|
-
const csConverter = new CsConverter(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
3163
|
-
|
|
3164
|
-
/** Wenn Leitungen konvertiert werden, wird das Attribut operationMode gesetzt. */
|
|
3165
|
-
csConverter.equipmentContainer = dcConverterUnit;
|
|
3166
|
-
|
|
3167
|
-
/** Bemessungsleistung (Gleichstromseite) in MW
|
|
3168
|
-
* im CS-Fall S = P?
|
|
3169
|
-
* Abhängig vom */
|
|
3170
|
-
csConverter.baseS = i7Data.pr;
|
|
3171
|
-
|
|
3172
|
-
/** Bemessungsspannung (Gleichstromseite) in kV*/
|
|
3173
|
-
csConverter.ratedUdc = i7Data.ur;
|
|
3174
|
-
/** spannungsabhängige Wirk-Verluste bei Leerlauf mit Bemessungsspannung in kV*/
|
|
3175
|
-
csConverter.idleLoss = i7Data.p_leer;
|
|
3176
|
-
|
|
3177
|
-
csConverter.maxUdc = i7Data.ur; // +5% * ratedUdc
|
|
3178
|
-
csConverter.minUdc = 0; // -5% * ratedUdc
|
|
3179
|
-
|
|
3180
|
-
csConverter.resistiveLoss = 0;
|
|
3181
|
-
csConverter.switchingLoss = 0;
|
|
3182
|
-
/* csConverter.numberOfValves
|
|
3183
|
-
csConverter.valveU0*/
|
|
3184
|
-
/** Stromrichter */
|
|
3185
|
-
/** Zündwinkel bei Gleichrichterbetrieb (ins Drehstromnetz eingespeiste Wirkleistung < 0) - etwa 15 Grad */
|
|
3186
|
-
/* csConverter.maxAlpha = i7Data.alpha;
|
|
3187
|
-
csConverter.minAlpha = i7Data.alpha;*/
|
|
3188
|
-
|
|
3189
|
-
/** Löschwinkel bei Wechselrichterbetrieb (ins Drehstromnetz Wirkleistung > 0) - etwa 21,5 Grad */
|
|
3190
|
-
/* csConverter.maxGamma = i7Data.gamma;
|
|
3191
|
-
csConverter.minGamma = i7Data.gamma;*/
|
|
3192
|
-
|
|
3193
|
-
const regelungU = convertToBooleanI7(i7Data.u_geregelt);
|
|
3194
|
-
const regelungP = convertToBooleanI7(i7Data.p_geregelt);
|
|
3195
|
-
const regelungW = convertToBooleanI7(i7Data.grad_geregelt);
|
|
3196
|
-
if (regelungU) {
|
|
3197
|
-
csConverter.operatingMode = CsOperatingModeKind.inverter
|
|
3198
|
-
} else if (regelungP) {
|
|
3199
|
-
csConverter.operatingMode = CsOperatingModeKind.rectifier
|
|
3200
|
-
} else {
|
|
3201
|
-
csConverter.operatingMode = CsOperatingModeKind.rectifier
|
|
3202
|
-
}
|
|
3203
|
-
/** Status */
|
|
3204
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3205
|
-
createSvStatus(this.cimModel, inBetrieb, csConverter);
|
|
3206
|
-
|
|
3207
|
-
/** Topologie AC Seite*/
|
|
3208
|
-
if (acConnectivityNode) {
|
|
3209
|
-
createConnection(this.cimModel, csConverter, acConnectivityNode, PhaseCode.ABC, 1);
|
|
3210
|
-
} else {
|
|
3211
|
-
console.log(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
/** Topologie DC Seite*/
|
|
3215
|
-
const dcNode = new DCNode(generateUUID(), 'DCNode');
|
|
3216
|
-
dcNode.dcEquipmentContainerUUID = dcConverterUnit.mrid;
|
|
3217
|
-
|
|
3218
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal(generateUUID(), 'ACDCConvTerminal');
|
|
3219
|
-
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
3220
|
-
acDCConverterDCTerminal.dCConductingEquipmentUUID = csConverter.mrid;
|
|
3221
|
-
acDCConverterDCTerminal.dcNodeUUID = dcNode.mrid;
|
|
3222
|
-
|
|
3223
|
-
/** Topologie DC Leitung Seite*/
|
|
3224
|
-
/** s. DCLineSegment Teil */
|
|
3225
|
-
|
|
3226
|
-
/** DCNode speichern, um später DCLines anschließen zu können*/
|
|
3227
|
-
this.checkMemoryObject(i7Data.id, dcNode);
|
|
3228
|
-
|
|
3229
|
-
this.cimModel.addDCConverterUnit(dcConverterUnit);
|
|
3230
|
-
this.cimModel.addCSConverter(csConverter);
|
|
3231
|
-
this.cimModel.addDCNode(dcNode);
|
|
3232
|
-
this.cimModel.addACDCConverterDCTerminal(acDCConverterDCTerminal);
|
|
3233
|
-
|
|
3234
|
-
this.integralID2UUID.set(i7Data.id, csConverter.mrid);
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
async convertVsConverterDC(knotenSfIDs: number[]) {
|
|
3240
|
-
if (this.isTableAvailable(Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
3241
|
-
const result: Kopfstation[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.HGUE_KOPFSTATION_VSC, 0, 0, knotenSfIDs));
|
|
3242
|
-
for (const i7Data of result) {
|
|
3243
|
-
/** Containment DC DCConverterUnit */
|
|
3244
|
-
const dcConverterUnit = new DCConverterUnit(generateUUID(), 'DCConverterUnit');
|
|
3245
|
-
// Topologie
|
|
3246
|
-
/* Anfang
|
|
3247
|
-
* 3 moegliche Anschluesse
|
|
3248
|
-
* KontenSo -> Anschluesspunkt
|
|
3249
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
3250
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
3251
|
-
|
|
3252
|
-
//const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3253
|
-
//const acConnectivityNode = this.memoryObjects.get(i7Data.anschluss) as unknown as IConnectivityNode;
|
|
3254
|
-
const acConnectivityNode = this.cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
3255
|
-
if (acConnectivityNode) {
|
|
3256
|
-
const equipmentContainer = determineEquipmentContainer('Substation', this.cimModel, this.cimModel.getObject(acConnectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
3257
|
-
if (equipmentContainer) {
|
|
3258
|
-
dcConverterUnit.name = `DCConverterUnit ${equipmentContainer.name}`;
|
|
3259
|
-
dcConverterUnit.setSubstation(equipmentContainer as Substation);
|
|
3260
|
-
} else {
|
|
3261
|
-
console.log(`DCConverterUnit ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3262
|
-
}
|
|
3263
|
-
} else {
|
|
3264
|
-
console.log(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3265
|
-
}
|
|
3266
|
-
|
|
3267
|
-
const vsConverter = new VsConverter(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
3268
|
-
|
|
3269
|
-
/** Wenn Leitungen konvertiert werden, wird das Attribut operationMode gesetzt. */
|
|
3270
|
-
vsConverter.equipmentContainer = dcConverterUnit;
|
|
3271
|
-
|
|
3272
|
-
/** Bemessungsleistung (Gleichstromseite) in MW
|
|
3273
|
-
* im CS-Fall S = P?
|
|
3274
|
-
* Abhängig vom */
|
|
3275
|
-
vsConverter.baseS = i7Data.pr;
|
|
3276
|
-
|
|
3277
|
-
/** Bemessungsspannung (Gleichstromseite) in kV*/
|
|
3278
|
-
vsConverter.ratedUdc = i7Data.ur;
|
|
3279
|
-
/** spannungsabhängige Wirk-Verluste bei Leerlauf mit Bemessungsspannung in kV*/
|
|
3280
|
-
vsConverter.idleLoss = i7Data.p_leer;
|
|
3281
|
-
|
|
3282
|
-
vsConverter.maxUdc = i7Data.ur; // +5% * ratedUdc
|
|
3283
|
-
vsConverter.minUdc = 0; // -5% * ratedUdc
|
|
3284
|
-
|
|
3285
|
-
vsConverter.resistiveLoss = 0;
|
|
3286
|
-
vsConverter.switchingLoss = 0;
|
|
3287
|
-
/* csConverter.maxModulationIndex = ;
|
|
3288
|
-
csConverter.maxValveCurrent = */
|
|
3289
|
-
|
|
3290
|
-
const regelungU = convertToBooleanI7(i7Data.u_geregelt);
|
|
3291
|
-
const regelungP = convertToBooleanI7(i7Data.p_geregelt);
|
|
3292
|
-
const regelungW = convertToBooleanI7(i7Data.grad_geregelt);
|
|
3293
|
-
if (regelungU) {
|
|
3294
|
-
vsConverter.pPccControl = VsPpccControlKind.pPcc;
|
|
3295
|
-
vsConverter.qPccControl = VsQpccControlKind.powerFactorPcc;
|
|
3296
|
-
} else if (regelungP) {
|
|
3297
|
-
vsConverter.pPccControl = VsPpccControlKind.pPcc;
|
|
3298
|
-
vsConverter.qPccControl = VsQpccControlKind.powerFactorPcc;
|
|
3299
|
-
} else {
|
|
3300
|
-
vsConverter.pPccControl = VsPpccControlKind.pPcc;
|
|
3301
|
-
vsConverter.qPccControl = VsQpccControlKind.powerFactorPcc;
|
|
3302
|
-
}
|
|
3303
|
-
|
|
3304
|
-
/** Status */
|
|
3305
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3306
|
-
createSvStatus(this.cimModel, inBetrieb, vsConverter);
|
|
3307
|
-
|
|
3308
|
-
/** Topologie AC Seite*/
|
|
3309
|
-
if (acConnectivityNode) {
|
|
3310
|
-
createConnection(this.cimModel, vsConverter, acConnectivityNode, PhaseCode.ABC, 1);
|
|
3311
|
-
} else {
|
|
3312
|
-
console.log(`VsConverter ${i7Data.id} ${vsConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
/** Topologie DC Seite*/
|
|
3316
|
-
const dcNode = new DCNode(generateUUID(), 'DCNode');
|
|
3317
|
-
dcNode.dcEquipmentContainerUUID = dcConverterUnit.mrid;
|
|
3318
|
-
|
|
3319
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal(generateUUID(), 'ACDCConvTerminal');
|
|
3320
|
-
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
3321
|
-
acDCConverterDCTerminal.dCConductingEquipmentUUID = vsConverter.mrid;
|
|
3322
|
-
acDCConverterDCTerminal.dcNodeUUID = dcNode.mrid;
|
|
3323
|
-
|
|
3324
|
-
/** Topologie DC Leitung Seite*/
|
|
3325
|
-
/** s. DCLineSegment Teil */
|
|
3326
|
-
|
|
3327
|
-
/** DCNode speichern, um später DCLines anschließen zu können*/
|
|
3328
|
-
this.checkMemoryObject(i7Data.id, dcNode);
|
|
3329
|
-
|
|
3330
|
-
this.cimModel.addDCConverterUnit(dcConverterUnit);
|
|
3331
|
-
this.cimModel.addVSConverter(vsConverter);
|
|
3332
|
-
this.cimModel.addDCNode(dcNode);
|
|
3333
|
-
this.cimModel.addACDCConverterDCTerminal(acDCConverterDCTerminal);
|
|
3334
|
-
|
|
3335
|
-
this.integralID2UUID.set(i7Data.id, vsConverter.mrid);
|
|
3336
|
-
}
|
|
3337
|
-
}
|
|
3338
|
-
}
|
|
3339
|
-
|
|
3340
|
-
async convertDCLines(limit: number, offset: number) {
|
|
3341
|
-
if (this.isTableAvailable(Integral7TableNames.HGUE_LEITUNG)) {
|
|
3342
|
-
const result: Hgueleitung[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.HGUE_LEITUNG, limit, offset, []));
|
|
3343
|
-
for (const i7Data of result) {
|
|
3344
|
-
const dcLine = new DCLine(getUUID(i7Data['guid_dcline']), 'DCLine');
|
|
3345
|
-
|
|
3346
|
-
const i7Schluessel = LEITUNG_PRAEFIX +
|
|
3347
|
-
ueberpruefeZeichenkette(i7Data.ukz) +
|
|
3348
|
-
MITTIGER_PUNKT +
|
|
3349
|
-
ueberpruefeZeichenkette(i7Data.kurzname) +
|
|
3350
|
-
MITTIGER_PUNKT +
|
|
3351
|
-
ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
3352
|
-
|
|
3353
|
-
const dcLineSegment = new DCLineSegment(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname, i7Schluessel);
|
|
3354
|
-
/*
|
|
3355
|
-
dcLineSegment.length = keine Informationen vorhanden
|
|
3356
|
-
dcLineSegment.capacitance = keine Informationen vorhanden
|
|
3357
|
-
dcLineSegment.inductance = keine Informationen vorhanden
|
|
3358
|
-
*/
|
|
3359
|
-
dcLineSegment.resistance = i7Data.rdc;
|
|
3360
|
-
|
|
3361
|
-
dcLineSegment.equipmentContainerUUID = dcLine.mrid;
|
|
3362
|
-
|
|
3363
|
-
/** operationMode der Anfangs- und Zielkopfstation setzen */
|
|
3364
|
-
const bipol = convertToBooleanI7(i7Data.bipol);
|
|
3365
|
-
const acDCConverterStart = this.cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt));
|
|
3366
|
-
const acDCConverterTarget = this.cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt));
|
|
3367
|
-
|
|
3368
|
-
const converterUnitStart = (acDCConverterStart as ACDCConverter)?.equipmentContainer as DCConverterUnit;
|
|
3369
|
-
const converterUnitTarget = (acDCConverterTarget as ACDCConverter)?.equipmentContainer as DCConverterUnit;
|
|
3370
|
-
switch (bipol) {
|
|
3371
|
-
case (true) : {
|
|
3372
|
-
converterUnitStart.operationMode = DCConverterOperatingModeKind.bipolar;
|
|
3373
|
-
converterUnitTarget.operationMode = DCConverterOperatingModeKind.bipolar;
|
|
3374
|
-
}
|
|
3375
|
-
default: {
|
|
3376
|
-
converterUnitStart.operationMode = DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3377
|
-
converterUnitTarget.operationMode = DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
// Topologie DC
|
|
3381
|
-
/* Anfang / Ende DCNodes*/
|
|
3382
|
-
const startDCNode = this.memoryObjects.get(i7Data.anetzobjekt);
|
|
3383
|
-
if (startDCNode) {
|
|
3384
|
-
const dcTerminal = new DCTerminal(generateUUID(), 'DCTerminal_HGÜ_Leitung');
|
|
3385
|
-
dcTerminal.sequenceNumber = 2;
|
|
3386
|
-
dcTerminal.dCConductingEquipmentUUID = dcLineSegment.mrid;
|
|
3387
|
-
dcTerminal.dcNodeUUID = startDCNode.mrid;
|
|
3388
|
-
this.cimModel.addDCTerminal(dcTerminal);
|
|
3389
|
-
|
|
3390
|
-
} else {
|
|
3391
|
-
console.log(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
|
-
const tartgetDCNode = this.memoryObjects.get(i7Data.enetzobjekt);
|
|
3395
|
-
if (tartgetDCNode) {
|
|
3396
|
-
const dcTerminal = new DCTerminal(generateUUID(), 'DCTerminal_HGÜ_Leitung');
|
|
3397
|
-
dcTerminal.sequenceNumber = 2;
|
|
3398
|
-
dcTerminal.dCConductingEquipmentUUID = dcLineSegment.mrid;
|
|
3399
|
-
dcTerminal.dcNodeUUID = tartgetDCNode.mrid;
|
|
3400
|
-
this.cimModel.addDCTerminal(dcTerminal);
|
|
3401
|
-
|
|
3402
|
-
} else {
|
|
3403
|
-
console.log(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Zielknoten. ${i7Data.enetzobjekt} ${this.integralID2UUID.get(i7Data.enetzobjekt)}`);
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
this.cimModel.addDCLine(dcLine);
|
|
3407
|
-
this.cimModel.addDCLineSegment(dcLineSegment);
|
|
3408
|
-
|
|
3409
|
-
this.integralID2UUID.set(i7Data.id, dcLineSegment.mrid);
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
} else {
|
|
3413
|
-
console.log(`Tabelle ${Integral7TableNames.HGUE_LEITUNG} ist nicht vorhanden.`);
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
/* async convertBelastungen() {
|
|
3418
|
-
if (this.isTableAvailable(Integral7TableNames.BELASTUNG)) {
|
|
3419
|
-
const result: Belastung[] = await this.queryFunctionWrapper(BELASTUNG_SQL_QUERY);
|
|
3420
|
-
for (const i7Data of result) {
|
|
3421
|
-
const energyConsumer = new EnergyConsumer(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname);
|
|
3422
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3423
|
-
const powerData = getActiveReactivePower(i7Data);
|
|
3424
|
-
|
|
3425
|
-
createSvStatus(this.cimModel, inBetrieb, energyConsumer);
|
|
3426
|
-
|
|
3427
|
-
energyConsumer.p = powerData[0];
|
|
3428
|
-
energyConsumer.q = powerData[1];
|
|
3429
|
-
|
|
3430
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3431
|
-
|
|
3432
|
-
if (connectivityNode) {
|
|
3433
|
-
createConnection(this.cimModel, energyConsumer, connectivityNode, PhaseCode.ABC);
|
|
3434
|
-
|
|
3435
|
-
const equipmentContainerCn = connectivityNode.connectivityNodeContainer as EquipmentContainer;
|
|
3436
|
-
if (equipmentContainerCn) {
|
|
3437
|
-
const equipmentContainer = determineEquipmentContainer(equipmentContainerCn);
|
|
3438
|
-
equipmentContainer.addEquipment(energyConsumer);
|
|
3439
|
-
energyConsumer.equipmentContainer = equipmentContainer;
|
|
3440
|
-
|
|
3441
|
-
const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3442
|
-
BELASTUNG_PRAEFIX + i7Data.bezeichner;
|
|
3443
|
-
energyConsumer.description = i7Schluesel;
|
|
3444
|
-
} else {
|
|
3445
|
-
console.log(`EnergyConsumer ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3446
|
-
}
|
|
3447
|
-
|
|
3448
|
-
} else {
|
|
3449
|
-
console.log(`EnergyConsumer ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
this.cimModel.addEnergyConsumer(energyConsumer);
|
|
3453
|
-
this.integralID2UUID.set(i7Data.id, energyConsumer.mrid);
|
|
3454
|
-
}
|
|
3455
|
-
} else {
|
|
3456
|
-
console.log(`Tabelle ${Integral7TableNames.BELASTUNG} ist nicht vorhanden.`);
|
|
3457
|
-
}
|
|
3458
|
-
}*/
|
|
3459
|
-
/* async convertEinspeisungen() {
|
|
3460
|
-
if (this.isTableAvailable(Integral7TableNames.EINSPEISUNG)) {
|
|
3461
|
-
const result: Einspeisung[] = await this.queryFunctionWrapper(EINSPEISUNG_SQL_QUERY);
|
|
3462
|
-
for (const i7Data of result) {
|
|
3463
|
-
const energySource = new EnergySource(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
3464
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3465
|
-
|
|
3466
|
-
const prio = i7Data.einspprio;
|
|
3467
|
-
const usoll = i7Data.usoll;
|
|
3468
|
-
|
|
3469
|
-
createSvStatus(this.cimModel, inBetrieb, energySource);
|
|
3470
|
-
// TODO Eispeisungen mit Spannungsregelung als ExternalNetworkInjection?
|
|
3471
|
-
const spannungsgeregelt = convertToBooleanI7(i7Data.spannungsgeregelt);
|
|
3472
|
-
|
|
3473
|
-
const powerData = getActiveReactivePower(i7Data);
|
|
3474
|
-
energySource.activePower = powerData[0];
|
|
3475
|
-
energySource.reactivePower = powerData[1];
|
|
3476
|
-
|
|
3477
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3478
|
-
|
|
3479
|
-
if (connectivityNode) {
|
|
3480
|
-
createConnection(this.cimModel, energySource, connectivityNode, PhaseCode.ABC);
|
|
3481
|
-
|
|
3482
|
-
const equipmentContainerCn = connectivityNode.connectivityNodeContainer as EquipmentContainer;
|
|
3483
|
-
if (equipmentContainerCn) {
|
|
3484
|
-
const equipmentContainer = determineEquipmentContainer(equipmentContainerCn);
|
|
3485
|
-
equipmentContainer.addEquipment(energySource);
|
|
3486
|
-
energySource.equipmentContainer = equipmentContainer;
|
|
3487
|
-
|
|
3488
|
-
const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3489
|
-
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3490
|
-
energySource.description = i7Schluesel;
|
|
3491
|
-
|
|
3492
|
-
} else {
|
|
3493
|
-
console.log(`EnergySource ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3494
|
-
}
|
|
3495
|
-
} else {
|
|
3496
|
-
console.log(`EnergySource ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3497
|
-
}
|
|
3498
|
-
|
|
3499
|
-
// ToDo PSRType
|
|
3500
|
-
|
|
3501
|
-
this.cimModel.addEnergySource(energySource);
|
|
3502
|
-
this.integralID2UUID.set(i7Data.id, energySource.mrid);
|
|
3503
|
-
}
|
|
3504
|
-
} else {
|
|
3505
|
-
console.log(`Tabelle ${Integral7TableNames.EINSPEISUNG} ist nicht vorhanden.`);
|
|
3506
|
-
}
|
|
3507
|
-
}*/
|
|
3508
|
-
|
|
3509
|
-
/* async convertBoundaryInjections() {
|
|
3510
|
-
if (this.isTableAvailable(Integral7TableNames.BOUNDARYINJECTION)) {
|
|
3511
|
-
const result: RandnetzEinspeisung[] = await this.queryFunctionWrapper(BOUNDARYINJECTION_SQL_QUERY);
|
|
3512
|
-
for (const i7Data of result) {
|
|
3513
|
-
const externalNetworkInjection = new ExternalNetworkInjection(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
3514
|
-
|
|
3515
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3516
|
-
createSvStatus(this.cimModel, inBetrieb, externalNetworkInjection);
|
|
3517
|
-
|
|
3518
|
-
const prio = i7Data.einspprio;
|
|
3519
|
-
const usoll = i7Data.usoll;
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
const spannungsgeregelt = convertToBooleanI7(i7Data.spannungsgeregelt);
|
|
3523
|
-
|
|
3524
|
-
externalNetworkInjection.p = getNumber(i7Data.p_ersatznetz ) + getNumber(i7Data.p_restnetz);
|
|
3525
|
-
externalNetworkInjection.q = getNumber(i7Data.q_ersatznetz) + getNumber(i7Data.q_restnetz);
|
|
3526
|
-
|
|
3527
|
-
externalNetworkInjection.governorSCD = getNumber(i7Data.kr);
|
|
3528
|
-
externalNetworkInjection.referencePriority = getNumber(i7Data.einspprio);
|
|
3529
|
-
/!* externalNetworkInjection.maxR0ToX0Ratio = 1/(/x0/r0)
|
|
3530
|
-
externalNetworkInjection.maxR1ToX1Ratio = (1/x1/r1)*!/
|
|
3531
|
-
externalNetworkInjection.maxZ0ToZ1Ratio = getNumber(i7Data.z0_z1);
|
|
3532
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3533
|
-
|
|
3534
|
-
if (connectivityNode) {
|
|
3535
|
-
createConnection(this.cimModel, externalNetworkInjection, connectivityNode, PhaseCode.ABC);
|
|
3536
|
-
|
|
3537
|
-
const equipmentContainerCn = connectivityNode.connectivityNodeContainer as EquipmentContainer;
|
|
3538
|
-
if (equipmentContainerCn) {
|
|
3539
|
-
const equipmentContainer = determineEquipmentContainer(equipmentContainerCn);
|
|
3540
|
-
equipmentContainer.addEquipment(externalNetworkInjection);
|
|
3541
|
-
externalNetworkInjection.equipmentContainer = equipmentContainer;
|
|
3542
|
-
|
|
3543
|
-
const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3544
|
-
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3545
|
-
externalNetworkInjection.description = i7Schluesel;
|
|
3546
|
-
|
|
3547
|
-
} else {
|
|
3548
|
-
console.log(`BoundaryInjection ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3549
|
-
}
|
|
3550
|
-
} else {
|
|
3551
|
-
console.log(`BoundaryInjection ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3552
|
-
}
|
|
3553
|
-
|
|
3554
|
-
// ToDo PSRType
|
|
3555
|
-
|
|
3556
|
-
this.cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
3557
|
-
this.integralID2UUID.set(i7Data.id, externalNetworkInjection.mrid);
|
|
3558
|
-
}
|
|
3559
|
-
} else {
|
|
3560
|
-
console.log(`Tabelle ${Integral7TableNames.EINSPEISUNG} ist nicht vorhanden.`);
|
|
3561
|
-
}
|
|
3562
|
-
}*/
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
async convertAsynchronmotor(knotenSfIDs: number[]) {
|
|
3566
|
-
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
3567
|
-
if (this.isTableAvailable(Integral7TableNames.ASYNCHRONMOTOR)) {
|
|
3568
|
-
const result: Asynchronmotor[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs))
|
|
3569
|
-
for (const i7Data of result) {
|
|
3570
|
-
const asynchronousMachine = new AsynchronousMachine(getUUID(i7Data.guid), getName(i7Data), i7Data.bezeichner, i7Data.kurzname);
|
|
3571
|
-
asynchronousMachine.efficiency = i7Data.wirkungsgrad * 100;
|
|
3572
|
-
asynchronousMachine.iaIrRatio = i7Data.ilr_ir;
|
|
3573
|
-
asynchronousMachine.rxLockedRotorRatio = 0;
|
|
3574
|
-
asynchronousMachine.polePairNumber = i7Data.polpaarz;
|
|
3575
|
-
asynchronousMachine.ratedMechanicalPower = i7Data.p_mech;
|
|
3576
|
-
asynchronousMachine.ratedPowerFactor = i7Data.cos_phir;
|
|
3577
|
-
|
|
3578
|
-
asynchronousMachine.ratedS = i7Data.sr;
|
|
3579
|
-
asynchronousMachine.ratedU = i7Data.ur;
|
|
3580
|
-
|
|
3581
|
-
asynchronousMachine.p = i7Data.p0;
|
|
3582
|
-
asynchronousMachine.q = i7Data.flag_ind === 1 ? i7Data.q0_ind : i7Data.q0_kap;
|
|
3583
|
-
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind.motor;
|
|
3584
|
-
asynchronousMachine.controlEnabled = false;
|
|
3585
|
-
|
|
3586
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3587
|
-
createSvStatus(this.cimModel, inBetrieb, asynchronousMachine);
|
|
3588
|
-
|
|
3589
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3590
|
-
|
|
3591
|
-
if (connectivityNode) {
|
|
3592
|
-
createConnection(this.cimModel, asynchronousMachine, connectivityNode, PhaseCode.ABC);
|
|
3593
|
-
|
|
3594
|
-
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
3595
|
-
if (equipmentContainer) {
|
|
3596
|
-
|
|
3597
|
-
// equipmentContainer.addEquipment(asynchronousMachine);
|
|
3598
|
-
asynchronousMachine.equipmentContainerUUID = equipmentContainer?.mrid;
|
|
3599
|
-
|
|
3600
|
-
/* const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3601
|
-
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3602
|
-
asynchronousMachine.description = i7Schluesel;*/
|
|
3603
|
-
|
|
3604
|
-
this.cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
3605
|
-
this.integralID2UUID.set(i7Data.id, asynchronousMachine.mrid);
|
|
3606
|
-
|
|
3607
|
-
} else {
|
|
3608
|
-
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3609
|
-
}
|
|
3610
|
-
} else {
|
|
3611
|
-
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3614
|
-
}
|
|
3615
|
-
} else {
|
|
3616
|
-
console.log(`Tabelle ${Integral7TableNames.ASYNCHRONMOTOR} ist nicht vorhanden.`);
|
|
3617
|
-
}
|
|
3618
|
-
}
|
|
3619
|
-
|
|
3620
|
-
/**------------------Schema----------------------------*/
|
|
3621
|
-
async convertNetzvarianten() {
|
|
3622
|
-
if (this.isTableAvailable(Integral7TableNames.NETZVARIANTEN)) {
|
|
3623
|
-
const result: Netzvarianten[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.NETZVARIANTEN, 0, 0, []));
|
|
3624
|
-
for (const i7Data of result) {
|
|
3625
|
-
// this.allg_netzvarianten.set(i7Data.id, i7Data);
|
|
3626
|
-
/** Netzschemas art mit der id 2 */
|
|
3627
|
-
if (i7Data.art === 2) {
|
|
3628
|
-
const diagram = new Diagram(getUUID(i7Data.guid), i7Data.name, String(i7Data.id));
|
|
3629
|
-
diagram.orientation = OrientationKind.negative;
|
|
3630
|
-
diagram.diagramStyle = this.cimModel.getDiagramStyle(DIAGRAM_LAYOUT_TYPES.NODE_BREAKER);
|
|
3631
|
-
this.cimModel.addDiagram(diagram);
|
|
3632
|
-
this.integralID2UUID.set(i7Data.id, diagram.mrid);
|
|
3633
|
-
}
|
|
3634
|
-
}
|
|
3635
|
-
} else {
|
|
3636
|
-
console.log(`Tabelle ${Integral7TableNames.NETZVARIANTEN} ist nicht vorhanden.`);
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
private setWireInfoProperties(object: WireInfo, data: StkTyp) {
|
|
3641
|
-
/* object.r1 = new ResistancePerLength(data.r1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3642
|
-
object.x1 = new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3643
|
-
object.c1 = new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3644
|
-
|
|
3645
|
-
object.r0 = new ResistancePerLength(data.r1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3646
|
-
object.x0 = new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3647
|
-
object.c0 = new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3648
|
-
|
|
3649
|
-
object.ratedCurrent = new CurrentFlow(data.ir, UnitMultiplier.none, UnitSymbol.A);*/
|
|
3650
|
-
object.r1 = +data.r1;
|
|
3651
|
-
object.x1 = +data.x1;
|
|
3652
|
-
object.c1 = new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F)
|
|
3653
|
-
|
|
3654
|
-
object.r0 = new ResistancePerLength(data.r1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3655
|
-
object.x0 = new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3656
|
-
object.c0 = new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3657
|
-
|
|
3658
|
-
object.ratedCurrent = +data.ir;
|
|
3659
|
-
}
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
private setACLineSegmentProperties(acLineSegment: ACLineSegment, data: Stk, psrTypeName: string) {
|
|
3663
|
-
// acLineSegment.description = data.nametyp;
|
|
3664
|
-
|
|
3665
|
-
// Spannungsebene
|
|
3666
|
-
if (!acLineSegment.baseVoltage) {
|
|
3667
|
-
const un = getU(data.un, this.deafultUn);
|
|
3668
|
-
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
3669
|
-
acLineSegment.baseVoltage = baseVoltage;
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
|
-
// Laenge
|
|
3673
|
-
if (data.laenge) {
|
|
3674
|
-
acLineSegment.length = data.laenge;
|
|
3675
|
-
} else {
|
|
3676
|
-
//console.log(`Stromkreissbschnitt ${data.id} besitzt keine Längenangabe. Annahme der Länge: 0.1 km. `);
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
const assetType = this.cimModel.getWireInfoByName(data.nametyp);
|
|
3680
|
-
// r0
|
|
3681
|
-
if (data.r0 && data.r0 !== 0) {
|
|
3682
|
-
acLineSegment.r0 = data.laenge <= 0 ? data.r0 : data.r0 /*/ data.laenge*/;
|
|
3683
|
-
} else {
|
|
3684
|
-
// console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} r0 ist 0. Btyp. `);
|
|
3685
|
-
if (assetType) {
|
|
3686
|
-
// acLineSegment.r0 = assetType.r0.value * acLineSegment.length;
|
|
3687
|
-
acLineSegment.r0 = assetType.r0.value * acLineSegment.length;
|
|
3688
|
-
// console.log(`\tBtyp r0 ist ${acLineSegment.r0}`);
|
|
3689
|
-
}
|
|
3690
|
-
}
|
|
3691
|
-
|
|
3692
|
-
// x0
|
|
3693
|
-
if (data.x0 && data.x0 !== 0) {
|
|
3694
|
-
acLineSegment.x0 = data.laenge <= 0 ? data.x0 : data.x0 /*/ data.laenge*/;
|
|
3695
|
-
} else {
|
|
3696
|
-
// console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} x0 ist 0. Btyp. `);
|
|
3697
|
-
if (assetType) {
|
|
3698
|
-
// acLineSegment.x0 = assetType.x0.value * acLineSegment.length;
|
|
3699
|
-
acLineSegment.x0 = assetType.x0.value * acLineSegment.length;
|
|
3700
|
-
// console.log(`\tBtyp x0 ist ${acLineSegment.x0}`);
|
|
3701
|
-
}
|
|
3702
|
-
}
|
|
3703
|
-
|
|
3704
|
-
// r1
|
|
3705
|
-
if (data.r1 && data.r1 !== 0) {
|
|
3706
|
-
acLineSegment.r = data.laenge <= 0 ? data.r1 : data.r1 /*/ data.laenge*/;
|
|
3707
|
-
} else {
|
|
3708
|
-
// console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} r1 ist 0. Btyp. `);
|
|
3709
|
-
if (assetType) {
|
|
3710
|
-
// acLineSegment.r = assetType.r1.value * acLineSegment.length;
|
|
3711
|
-
acLineSegment.r = assetType.r1 * data.laenge;
|
|
3712
|
-
// console.log(`\tBtyp r1 ist ${acLineSegment.r}`);
|
|
3713
|
-
}
|
|
3714
|
-
}
|
|
3715
|
-
|
|
3716
|
-
// x1
|
|
3717
|
-
if (data.x1 && data.x1 !== 0) {
|
|
3718
|
-
acLineSegment.x = data.laenge <= 0 ? data.x1 : data.x1 /*/ data.laenge*/;
|
|
3719
|
-
} else {
|
|
3720
|
-
// console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} x1 ist 0. Btyp. `);
|
|
3721
|
-
if (assetType) {
|
|
3722
|
-
// acLineSegment.x = assetType.x1.value * acLineSegment.length;
|
|
3723
|
-
acLineSegment.x = assetType.x1 * data.laenge;
|
|
3724
|
-
// console.log(`\tBtyp x1 ist ${acLineSegment.x}`);
|
|
3725
|
-
}
|
|
3726
|
-
}
|
|
3727
|
-
|
|
3728
|
-
// ir
|
|
3729
|
-
for (const terminalUUID of acLineSegment.terminalsUUIDs) {
|
|
3730
|
-
if (data.ir && data.ir !== 0) {
|
|
3731
|
-
this.setConductingEquipmentCurrentLimit(acLineSegment.name, terminalUUID, data.ir);
|
|
3732
|
-
} /*else {
|
|
3733
|
-
console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} ir ist 0. `);
|
|
3734
|
-
}*/
|
|
3735
|
-
else if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
3736
|
-
this.setConductingEquipmentCurrentLimit(acLineSegment.name, terminalUUID, assetType.ratedCurrent);
|
|
3737
|
-
} else {
|
|
3738
|
-
// console.log(`Stromkreissbschnitt ${data.id} ${acLineSegment.mrid} ir ist 0 und hat keinen Assettyp`);
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
}
|
|
3742
|
-
//PSRType
|
|
3743
|
-
const psrType = createIfNotExitsPSRType(this.cimModel, psrTypeName);
|
|
3744
|
-
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
3745
|
-
// psrType.addPowerSystemResource(acLineSegment);
|
|
3746
|
-
}
|
|
3747
|
-
|
|
3748
|
-
private setConductingEquipmentCurrentLimit(name: string, terminalUUID: string, ir: number) {
|
|
3749
|
-
const currentLimit = new CurrentLimit(generateUUID(), `${name}`);
|
|
3750
|
-
this.cimModel.addCurrentLimit(currentLimit);
|
|
3751
|
-
currentLimit.value = new CurrentFlow(ir, UnitMultiplier.none, UnitSymbol.A);
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
const operationalLimitSet = new OperationalLimitSet(generateUUID(), `${name}`);
|
|
3755
|
-
this.cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
3756
|
-
// operationalLimitSet.addOperationalLimit(currentLimit);
|
|
3757
|
-
currentLimit.operationalLimitSetUUID = operationalLimitSet.mrid;
|
|
3758
|
-
|
|
3759
|
-
const operationalLimitType = this.getOperationalLimitType('patl');
|
|
3760
|
-
// operationalLimitType.addOperationalLimit(currentLimit); speicher
|
|
3761
|
-
currentLimit.operationalLimitTypeUUID = operationalLimitType.mrid;
|
|
3762
|
-
|
|
3763
|
-
// terminal.addOperationalLimitSet(operationalLimitSet); speicher
|
|
3764
|
-
operationalLimitSet.terminalUUID = terminalUUID;
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
private getOperationalLimitType(name: string) {
|
|
3768
|
-
let operationalLimitType = this.cimModel.getOperationalLimitTypeByName(name);
|
|
3769
|
-
if (!operationalLimitType) {
|
|
3770
|
-
operationalLimitType = new OperationalLimitType(generateUUID(), name);
|
|
3771
|
-
operationalLimitType.direction = OperationalLimitDirectionKind.absoluteValue;
|
|
3772
|
-
operationalLimitType.limitType = LimitTypeKind.patl;
|
|
3773
|
-
this.cimModel.addOperationalLimitType(operationalLimitType);
|
|
3774
|
-
}
|
|
3775
|
-
return operationalLimitType;
|
|
3776
|
-
}
|
|
3777
|
-
|
|
3778
|
-
private setTransformerEndInfoProperties(wicklung: TransformerEndInfo, data: any, endNumber: number) {
|
|
3779
|
-
|
|
3780
|
-
const minstufe = `minstufe_s${endNumber}`;
|
|
3781
|
-
const mittelstufe = `mittelstufe_s${endNumber}`;
|
|
3782
|
-
const maxstufe = `maxstufe_s${endNumber}`;
|
|
3783
|
-
const umax = `umax_s${endNumber}`;
|
|
3784
|
-
const umin = `umin_s${endNumber}`;
|
|
3785
|
-
const gestufte_seite = `gestufte_seite_s${endNumber}`;
|
|
3786
|
-
|
|
3787
|
-
const ur = `ur${endNumber}`;
|
|
3788
|
-
|
|
3789
|
-
wicklung.endNumber = endNumber;
|
|
3790
|
-
wicklung.ratedU = new Voltage(data[ur], UnitMultiplier.k, UnitSymbol.V);
|
|
3791
|
-
wicklung.tapActiv = convertToBooleanI7(data[gestufte_seite]);
|
|
3792
|
-
|
|
3793
|
-
const tapChangerInfo = new TapChangerInfo(generateUUID(), `TapChangerInfo_${data['id']}`);
|
|
3794
|
-
tapChangerInfo.highStep = data[maxstufe];
|
|
3795
|
-
tapChangerInfo.lowStep = data[minstufe];
|
|
3796
|
-
tapChangerInfo.neutralStep = data[mittelstufe];
|
|
3797
|
-
|
|
3798
|
-
wicklung.uMax = data[umax];
|
|
3799
|
-
wicklung.uMin = data[umin];
|
|
3800
|
-
|
|
3801
|
-
}
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
async convertSchemaBayElements(bay: Bay, diagram: Diagram, saAusrichtung: number, deltaAusrichtung: number) {
|
|
3805
|
-
for (const eqiup of bay.equipments) {
|
|
3806
|
-
if (eqiup instanceof Disconnector) {
|
|
3807
|
-
const disconnector = eqiup as Disconnector;
|
|
3808
|
-
|
|
3809
|
-
for (const terminal of disconnector.terminals.values()) {
|
|
3810
|
-
const connectedCE = isConnectedTo(terminal.connectivityNode as ConnectivityNode, 'BusbarSection');
|
|
3811
|
-
if (connectedCE && terminal.connectivityNode.diagramObjects.length > 0) {
|
|
3812
|
-
const diagramObjectSSAB = getDiagramObjectBelonginToDiagram(terminal.connectivityNode.diagramObjects, diagram.mrid);
|
|
3813
|
-
const diagramObjectBay = getDiagramObjectBelonginToDiagram(bay.diagramObjects, diagram.mrid);
|
|
3814
|
-
if (diagramObjectSSAB && diagramObjectBay) {
|
|
3815
|
-
const diagramObject = new DiagramObject(getUUID(''), 'SSAB Trenner');
|
|
3816
|
-
if (saAusrichtung === 0) { // oben/waagerecht
|
|
3817
|
-
const x = diagramObjectBay.diagramObjectPoints[0].xPosition + 16;
|
|
3818
|
-
const y = diagramObjectSSAB.diagramObjectPoints[0].yPosition + 0.5;
|
|
3819
|
-
const points = [new Point(x, y)];
|
|
3820
|
-
createDiagramObjectPoints(diagramObject, points);
|
|
3821
|
-
eqiup.addDiagramObject(diagramObject);
|
|
3822
|
-
diagramObject.identifiedObject = eqiup;
|
|
3823
|
-
diagram.addDiagramObject(diagramObject);
|
|
3824
|
-
diagramObject.diagram = diagram;
|
|
3825
|
-
}
|
|
3826
|
-
}
|
|
3827
|
-
} else {
|
|
3828
|
-
|
|
3829
|
-
}
|
|
3830
|
-
}
|
|
3831
|
-
}
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
|
|
3835
|
-
private writeHeaderStart(xmlWriter: XMLWriter, profileURI?: string) {
|
|
3836
|
-
xmlWriter.startDocument('1.0', 'UTF-8');
|
|
3837
|
-
/** <rdf:RDF xmlns:...>*/
|
|
3838
|
-
xmlWriter.startElementNS(RDF_XML.RDF_NS_PREFIX, 'RDF', RDF_XML.RDF_NS);
|
|
3839
|
-
|
|
3840
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.RDF_NS_PREFIX}`, RDF_XML.RDF_NS);
|
|
3841
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.CIM_NS_PREFIX}`, RDF_XML.CIM_NS_16);
|
|
3842
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.ENTSOE_NS_PREFIX}`, RDF_XML.ENTSOE_NS);
|
|
3843
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.MD_NS_PREFIX}`, RDF_XML.MD_NS);
|
|
3844
|
-
|
|
3845
|
-
if (profileURI === RDF_XML.AMP_I7_PROFILE_URI) {
|
|
3846
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.AMPRION_NS_PREFIX}`, RDF_XML.AMPRION_NS);
|
|
3847
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.IPS_NS_PREFIX}`, RDF_XML.IPS_NS);
|
|
3848
|
-
writeElementAttribute(xmlWriter, `xmlns:${RDF_XML.CAPE_NS_PREFIX}`, RDF_XML.CAPE_NS);
|
|
3849
|
-
}
|
|
3850
|
-
}
|
|
3851
|
-
|
|
3852
|
-
private writeHeaderEnd(xmlWriter: XMLWriter) {
|
|
3853
|
-
/** </rdf:RDF>*/
|
|
3854
|
-
xmlWriter.endElement();
|
|
3855
|
-
xmlWriter.endDocument();
|
|
3856
|
-
}
|
|
3857
|
-
|
|
3858
|
-
private objectToCIMXML(xmlWriter: XMLWriter, values: Map<string, IIdentifiedObject>, profileName: string) {
|
|
3859
|
-
for (const object of values.values()) {
|
|
3860
|
-
object.toCIMXML(xmlWriter, profileName);
|
|
3861
|
-
}
|
|
3862
|
-
}
|
|
3863
|
-
|
|
3864
|
-
private objectArrayToCIMXML(xmlWriter: XMLWriter, values: any[], profileName: string) {
|
|
3865
|
-
for (const object of values) {
|
|
3866
|
-
object.toCIMXML(xmlWriter, profileName);
|
|
3867
|
-
}
|
|
3868
|
-
}
|
|
3869
|
-
|
|
3870
|
-
private checkMemoryObject(i7ID: number, cimObject: IdentifiedObject) {
|
|
3871
|
-
/** Wenn an diesem Knoten eine Leitung/Trafo angeschlossen ist, dann belasse dieses Objekt im Speicher. */
|
|
3872
|
-
if (this.leitungAnschlussKnotenIDs.has(i7ID)) {
|
|
3873
|
-
this.memoryObjects.set(i7ID, cimObject);
|
|
3874
|
-
}
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
queryFunctionWrapper(query): Promise<any> {
|
|
3878
|
-
return new Promise((resolve, reject) => {
|
|
3879
|
-
this.queryFunction(query, (successResponse) => {
|
|
3880
|
-
resolve(successResponse);
|
|
3881
|
-
}, (errorResponse) => {
|
|
3882
|
-
reject(errorResponse)
|
|
3883
|
-
});
|
|
3884
|
-
});
|
|
3885
|
-
}
|
|
3886
|
-
|
|
3887
|
-
queryFunction(query, successCallback, errorCallback) {
|
|
3888
|
-
this.mysqlConnection.query(query, (error, results, fields) => {
|
|
3889
|
-
if (error) errorCallback(error);
|
|
3890
|
-
successCallback(results);
|
|
3891
|
-
});
|
|
3892
|
-
}
|
|
3893
|
-
|
|
3894
|
-
private isTableAvailable(tableName: string): boolean {
|
|
3895
|
-
return this.availableTableNames.indexOf(tableName) > -1 ? true : false;
|
|
3896
|
-
}
|
|
3897
|
-
|
|
3898
|
-
private initDbConnection(mySqlConfig: MySQL) {
|
|
3899
|
-
this.mysqlConnection = mysql.createConnection({
|
|
3900
|
-
host: mySqlConfig.host,
|
|
3901
|
-
port: mySqlConfig.port,
|
|
3902
|
-
database: mySqlConfig.database,
|
|
3903
|
-
user: mySqlConfig.user,
|
|
3904
|
-
password: mySqlConfig.password,
|
|
3905
|
-
});
|
|
3906
|
-
}
|
|
3907
|
-
|
|
3908
|
-
openConnection() {
|
|
3909
|
-
this.mysqlConnection.connect();
|
|
3910
|
-
}
|
|
3911
|
-
|
|
3912
|
-
closeConnection() {
|
|
3913
|
-
this.mysqlConnection.end();
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
}
|