@enervance/insight-cim-model 0.0.1 → 0.0.3
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-neplan/neplan-load.config.js +0 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +6 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +6 -0
- package/dist/constants/cim-class-names.js +6 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/converter/integral7/ConverterIntegral7.d.ts +17 -4
- package/dist/converter/integral7/ConverterIntegral7.js +530 -39
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/config/db-config.d.ts +3 -1
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +9 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js +3 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js.map +1 -0
- package/dist/converter/integral7/model/integral/Kopfstation.d.ts +31 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js +3 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js.map +1 -0
- package/dist/converter/integral7/model/interfaces.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.js +22 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +4 -1
- package/dist/converter/integral7/utils.js +26 -8
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js +22 -7
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-feederline.d.ts +3 -1
- package/dist/etl-neplan/etl-neplan-feederline.js +73 -15
- package/dist/etl-neplan/etl-neplan-feederline.js.map +1 -1
- package/dist/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/etl-neplan/neplan-contingency-analysis.d.ts +14 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +337 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -0
- package/dist/graph/Types.d.ts +5 -0
- package/dist/graph/Types.js +10 -0
- package/dist/graph/Types.js.map +1 -0
- package/dist/graph/connections/connection.d.ts +11 -0
- package/dist/graph/connections/connection.js +17 -0
- package/dist/graph/connections/connection.js.map +1 -0
- package/dist/graph/edges/edge.d.ts +8 -0
- package/dist/graph/edges/edge.js +16 -0
- package/dist/graph/edges/edge.js.map +1 -0
- package/dist/graph/graph-interfaces.d.ts +15 -0
- package/dist/graph/graph-interfaces.js +3 -0
- package/dist/graph/graph-interfaces.js.map +1 -0
- package/dist/graph/graph-util.d.ts +13 -0
- package/dist/graph/graph-util.js +114 -0
- package/dist/graph/graph-util.js.map +1 -0
- package/dist/graph/graph.d.ts +15 -0
- package/dist/graph/graph.js +75 -0
- package/dist/graph/graph.js.map +1 -0
- package/dist/graph/nodes/node.d.ts +14 -0
- package/dist/graph/nodes/node.js +28 -0
- package/dist/graph/nodes/node.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/model/core/ACDCTerminal.js +2 -2
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/ConnectivityNode.js +3 -2
- package/dist/model/core/ConnectivityNode.js.map +1 -1
- package/dist/model/core/PSRType.d.ts +0 -1
- package/dist/model/core/PSRType.js +3 -6
- package/dist/model/core/PSRType.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js +3 -8
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/Substation.d.ts +3 -0
- package/dist/model/core/Substation.js +4 -0
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +2 -0
- package/dist/model/core/Terminal.js +2 -2
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +0 -1
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +23 -0
- package/dist/model/dc/ACDCConverter.js +33 -0
- package/dist/model/dc/ACDCConverter.js.map +1 -0
- package/dist/model/dc/ACDCConverterDCTerminal.d.ts +13 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js +54 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -0
- package/dist/model/dc/CsConverter.d.ts +21 -0
- package/dist/model/dc/CsConverter.js +43 -0
- package/dist/model/dc/CsConverter.js.map +1 -0
- package/dist/model/dc/CsOperatingModeKind.d.ts +4 -0
- package/dist/model/dc/CsOperatingModeKind.js +9 -0
- package/dist/model/dc/CsOperatingModeKind.js.map +1 -0
- package/dist/model/dc/CsPpccControlKind.d.ts +5 -0
- package/dist/model/dc/CsPpccControlKind.js +10 -0
- package/dist/model/dc/CsPpccControlKind.js.map +1 -0
- package/dist/model/dc/DCBaseTerminal.d.ts +8 -0
- package/dist/model/dc/DCBaseTerminal.js +30 -0
- package/dist/model/dc/DCBaseTerminal.js.map +1 -0
- package/dist/model/dc/DCConductingEquipment.d.ts +5 -0
- package/dist/model/dc/DCConductingEquipment.js +12 -0
- package/dist/model/dc/DCConductingEquipment.js.map +1 -0
- package/dist/model/dc/DCConverterOperatingModeKind.d.ts +5 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js +10 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js.map +1 -0
- package/dist/model/dc/DCConverterUnit.d.ts +14 -0
- package/dist/model/dc/DCConverterUnit.js +54 -0
- package/dist/model/dc/DCConverterUnit.js.map +1 -0
- package/dist/model/dc/DCEquipmentContainer.d.ts +5 -0
- package/dist/model/dc/DCEquipmentContainer.js +12 -0
- package/dist/model/dc/DCEquipmentContainer.js.map +1 -0
- package/dist/model/dc/DCLine.d.ts +11 -0
- package/dist/model/dc/DCLine.js +48 -0
- package/dist/model/dc/DCLine.js.map +1 -0
- package/dist/model/dc/DCLineSegment.d.ts +13 -0
- package/dist/model/dc/DCLineSegment.js +69 -0
- package/dist/model/dc/DCLineSegment.js.map +1 -0
- package/dist/model/dc/DCNode.d.ts +12 -0
- package/dist/model/dc/DCNode.js +41 -0
- package/dist/model/dc/DCNode.js.map +1 -0
- package/dist/model/dc/DCPolarityKind.d.ts +5 -0
- package/dist/model/dc/DCPolarityKind.js +10 -0
- package/dist/model/dc/DCPolarityKind.js.map +1 -0
- package/dist/model/dc/DCTerminal.d.ts +10 -0
- package/dist/model/dc/DCTerminal.js +38 -0
- package/dist/model/dc/DCTerminal.js.map +1 -0
- package/dist/model/dc/VsConverter.d.ts +18 -0
- package/dist/model/dc/VsConverter.js +33 -0
- package/dist/model/dc/VsConverter.js.map +1 -0
- package/dist/model/dc/VsPpccControlKind.d.ts +7 -0
- package/dist/model/dc/VsPpccControlKind.js +12 -0
- package/dist/model/dc/VsPpccControlKind.js.map +1 -0
- package/dist/model/dc/VsQpccControlKind.d.ts +5 -0
- package/dist/model/dc/VsQpccControlKind.js +10 -0
- package/dist/model/dc/VsQpccControlKind.js.map +1 -0
- package/dist/model/domain/UnitMultiplier.js.map +1 -1
- package/dist/model/extensions/amprion/model/AmprionModell.d.ts +25 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js +64 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.d.ts +34 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js +134 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.d.ts +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js +77 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.d.ts +14 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js +57 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.d.ts +7 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.d.ts +19 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js +74 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.d.ts +15 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js +26 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.d.ts +5 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js +10 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js.map +1 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.d.ts +9 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +46 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -0
- package/dist/model/extensions/enervance/operations/EVTerminalAction.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/generation/WindGeneratingUnit.d.ts +5 -0
- package/dist/model/generation/WindGeneratingUnit.js +66 -0
- package/dist/model/generation/WindGeneratingUnit.js.map +1 -1
- package/dist/model/model/Model.d.ts +39 -1
- package/dist/model/model/Model.js +91 -1
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +1 -0
- package/dist/model/wires/ACLineSegment.js +15 -2
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +1 -0
- package/dist/model/wires/AsynchronousMachine.js +37 -1
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/Disconnector.js +1 -1
- package/dist/model/wires/EnergySource.d.ts +2 -0
- package/dist/model/wires/EnergySource.js +28 -2
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +18 -2
- package/dist/model/wires/SeriesCompensator.js +108 -5
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/util/util-create.js.map +1 -1
- package/dist/util/util-topology.d.ts +2 -2
- package/dist/util/util-topology.js +14 -6
- package/dist/util/util-topology.js.map +1 -1
- package/package.json +1 -1
- package/src/config/westnetz-neplan/neplan-load.config.ts +1 -1
- package/src/constants/cim-class-definition.ts +20 -1
- package/src/constants/cim-class-names.ts +9 -0
- package/src/converter/integral7/ConverterIntegral7.ts +753 -345
- package/src/converter/integral7/config/db-config.ts +3 -2
- package/src/converter/integral7/model/integral/Hgueleitung.ts +12 -0
- package/src/converter/integral7/model/integral/Kopfstation.ts +46 -0
- package/src/converter/integral7/model/interfaces.ts +23 -16
- package/src/converter/integral7/sql/integral.sql.ts +27 -1
- package/src/converter/integral7/utils.ts +43 -11
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +30 -12
- package/src/etl-neplan/etl-neplan-feederline.ts +100 -17
- package/src/etl-neplan/etl-neplan.ts +1 -0
- package/src/etl-neplan/neplan-contingency-analysis.ts +572 -0
- package/src/graph/Types.ts +7 -0
- package/src/graph/connections/connection.ts +29 -0
- package/src/graph/edges/edge.ts +27 -0
- package/src/graph/graph-interfaces.ts +21 -0
- package/src/graph/graph-util.ts +158 -0
- package/src/graph/graph.ts +84 -0
- package/src/graph/nodes/node.ts +43 -0
- package/src/index.ts +8 -0
- package/src/model/core/ACDCTerminal.ts +2 -2
- package/src/model/core/ConnectivityNode.ts +2 -2
- package/src/model/core/PSRType.ts +3 -6
- package/src/model/core/PowerSystemResource.ts +3 -7
- package/src/model/core/Substation.ts +6 -0
- package/src/model/core/Terminal.ts +15 -6
- package/src/model/core/VoltageLevel.ts +0 -1
- package/src/model/dc/ACDCConverter.ts +66 -0
- package/src/model/dc/ACDCConverterDCTerminal.ts +64 -0
- package/src/model/dc/CsConverter.ts +68 -0
- package/src/model/dc/CsOperatingModeKind.ts +4 -0
- package/src/model/dc/CsPpccControlKind.ts +5 -0
- package/src/model/dc/DCBaseTerminal.ts +30 -0
- package/src/model/dc/DCConductingEquipment.ts +8 -0
- package/src/model/dc/DCConverterOperatingModeKind.ts +6 -0
- package/src/model/dc/DCConverterUnit.ts +60 -0
- package/src/model/dc/DCEquipmentContainer.ts +8 -0
- package/src/model/dc/DCLine.ts +56 -0
- package/src/model/dc/DCLineSegment.ts +81 -0
- package/src/model/dc/DCNode.ts +49 -0
- package/src/model/dc/DCPolarityKind.ts +5 -0
- package/src/model/dc/DCTerminal.ts +45 -0
- package/src/model/dc/VsConverter.ts +48 -0
- package/src/model/dc/VsPpccControlKind.ts +7 -0
- package/src/model/dc/VsQpccControlKind.ts +5 -0
- package/src/model/domain/UnitMultiplier.ts +12 -12
- package/src/model/equivalents/EquivalentBranch.ts +10 -10
- package/src/model/extensions/amprion/model/AmprionModell.ts +92 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +174 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +64 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +21 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +36 -0
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +5 -0
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +53 -0
- package/src/model/extensions/enervance/core/EVTerminal.ts +1 -1
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -1
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -1
- package/src/model/generation/WindGeneratingUnit.ts +73 -0
- package/src/model/model/Model.ts +131 -7
- package/src/model/wires/ACLineSegment.ts +244 -228
- package/src/model/wires/AsynchronousMachine.ts +38 -1
- package/src/model/wires/Disconnector.ts +1 -1
- package/src/model/wires/EnergySource.ts +256 -222
- package/src/model/wires/SeriesCompensator.ts +145 -19
- package/src/util/util-create.ts +2 -0
- package/src/util/util-topology.ts +18 -7
- package/test/apache-jena-fuseki-interface/{apache-jena-fuseki-neplan.tests.spec.ts → apache-jena-fuseki-neplan-1.tests.sp-ec.ts} +0 -26
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.spec.ts +255 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +20867 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +3784 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +42546 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +10101 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +6229 -0
- package/test/integral7-converter/integral7-converter.tests.spec.ts +12 -3
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +1 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.lock +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACLineSegment,
|
|
3
|
-
ApparentPower, BaseVoltage,
|
|
3
|
+
ApparentPower, AsynchronousMachine, AsynchronousMachineKind, BaseVoltage,
|
|
4
4
|
Bay,
|
|
5
5
|
Breaker,
|
|
6
6
|
BusbarSection,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
Disconnector,
|
|
23
23
|
EnergyConsumer,
|
|
24
24
|
EnergySource,
|
|
25
|
-
EquipmentContainer,
|
|
25
|
+
EquipmentContainer, EquivalentBranch,
|
|
26
26
|
generateUUID,
|
|
27
27
|
GeneratingUnit,
|
|
28
28
|
GeneratorControlSource,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
ReactiveCapabilityCurve,
|
|
52
52
|
RegulatingControl,
|
|
53
53
|
RegulatingControlModeKind,
|
|
54
|
-
ResistancePerLength,
|
|
54
|
+
ResistancePerLength, SeriesCompensator,
|
|
55
55
|
SolarGeneratingUnit,
|
|
56
56
|
SubGeographicalRegion,
|
|
57
57
|
Substation,
|
|
@@ -72,15 +72,15 @@ import * as mysql from 'mysql';
|
|
|
72
72
|
import {
|
|
73
73
|
Abzweig,
|
|
74
74
|
Anlage,
|
|
75
|
-
AnlagenAbschnitt,
|
|
75
|
+
AnlagenAbschnitt, Asynchronmotor,
|
|
76
76
|
Belastung,
|
|
77
77
|
Einspeisung,
|
|
78
78
|
Generator,
|
|
79
79
|
Georegion,
|
|
80
80
|
KnotenKf,
|
|
81
81
|
KnotenLk,
|
|
82
|
-
Laengskupplung,
|
|
83
|
-
Leistungsschalter,
|
|
82
|
+
Laengskupplung, Ldrossel,
|
|
83
|
+
Leistungsschalter, LeitungErsatzLaengszweig,
|
|
84
84
|
LeitungStk,
|
|
85
85
|
Netzvarianten,
|
|
86
86
|
NsgKnotenSo,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
} from '../../util/utils';
|
|
112
112
|
import {
|
|
113
113
|
BELASTUNG_PRAEFIX,
|
|
114
|
-
EINSPEISUNG_PRAEFIX,
|
|
114
|
+
EINSPEISUNG_PRAEFIX, ERSATZLAENGSZWEIG_PRAEFIX,
|
|
115
115
|
GENERATOR_PRAEFIX,
|
|
116
116
|
KNOTEN_STANDORT_PRAEFIX,
|
|
117
117
|
LEITUNG_PRAEFIX,
|
|
@@ -129,10 +129,9 @@ import {
|
|
|
129
129
|
calculateX,
|
|
130
130
|
convertToBooleanI7,
|
|
131
131
|
createTapChanger,
|
|
132
|
-
createTempDirPath,
|
|
133
132
|
createWriteStreamPromise,
|
|
134
133
|
determineEquipmentContainer,
|
|
135
|
-
generateFuelType,
|
|
134
|
+
generateFuelType, generateNodeStream,
|
|
136
135
|
getActiveReactivePower,
|
|
137
136
|
getDescription,
|
|
138
137
|
getLine,
|
|
@@ -146,7 +145,7 @@ import {
|
|
|
146
145
|
getSrTrafo,
|
|
147
146
|
getTerminalUn,
|
|
148
147
|
getTrafoIleer,
|
|
149
|
-
getTrafoPleer,
|
|
148
|
+
getTrafoPleer, getU,
|
|
150
149
|
getUkrTrafo,
|
|
151
150
|
getUrTrafo,
|
|
152
151
|
putUUIDtoI7Ids,
|
|
@@ -154,7 +153,7 @@ import {
|
|
|
154
153
|
writeZipFile
|
|
155
154
|
} from './utils';
|
|
156
155
|
import { calculateImpedanzenTrafo3W } from './utils-trafo3w';
|
|
157
|
-
import { FUEL_TYPE_CONFIG } from './config/generation-unit-fuel-types';
|
|
156
|
+
// import { FUEL_TYPE_CONFIG } from './config/generation-unit-fuel-types';
|
|
158
157
|
import { getNetzQuery, I7Objects, Integral7TableNames } from './sql/integral.sql';
|
|
159
158
|
import { MySQL, Status } from './config/db-config';
|
|
160
159
|
import path from "path";
|
|
@@ -178,11 +177,29 @@ import { LeitungImpl } from './model/integral/Leitung';
|
|
|
178
177
|
import { TapChangerInfo } from '../../model/assetinfo/TapChangerInfo';
|
|
179
178
|
import { AMPRIONBay } from '../../model/extensions/amprion/core/AMPRIONBay';
|
|
180
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';
|
|
181
196
|
|
|
182
197
|
export class ConverterIntegral7 {
|
|
183
198
|
mysqlConnection: mysql.Connection;
|
|
184
199
|
cimModel: Model;
|
|
185
200
|
|
|
201
|
+
/** Standardspannungsebene: falls im I7-Modell keine Spannung angegeben ist */
|
|
202
|
+
deafultUn = 110;
|
|
186
203
|
/** Das Array hält die verfügbaren Tabellennamen in der Projektdatenbank.
|
|
187
204
|
* Integral 7 legt die Tabellen keine leeren Tabellen an.
|
|
188
205
|
* Das heißt: wenn es keine Typinformation für Kabel gepflegt sind, dann existiert keine Tabelle in der Datenbank*/
|
|
@@ -196,6 +213,9 @@ export class ConverterIntegral7 {
|
|
|
196
213
|
|
|
197
214
|
standortAnzahl: number;
|
|
198
215
|
leitungsAnzahl: number;
|
|
216
|
+
hgueLeitungsAnzahl: number;
|
|
217
|
+
ersatzlaengszweigAnzahl: number;
|
|
218
|
+
laengsdrosselAnzahl: number;
|
|
199
219
|
trafo2WAnzahl: number;
|
|
200
220
|
trafo3WAnzahl: number;
|
|
201
221
|
/** Begrenzt die Anzahl der abgefragten Daten aus der DB
|
|
@@ -221,20 +241,19 @@ export class ConverterIntegral7 {
|
|
|
221
241
|
|
|
222
242
|
integralLeitungen: Map<number, LeitungImpl> = new Map();
|
|
223
243
|
|
|
224
|
-
/** Integral 7 IDs
|
|
244
|
+
/** Integral 7 IDs für blockweise Verarbeitung SQLs */
|
|
225
245
|
schaltfeldIDs = [];
|
|
226
246
|
querkupplungIDs = [];
|
|
227
247
|
laengskupplungIDs = [];
|
|
228
248
|
knotenSoIDs = [];
|
|
229
249
|
knotenSfIDs = [];
|
|
230
250
|
leitungsIDs = [];
|
|
231
|
-
trafo2WIDs = [];
|
|
232
251
|
|
|
233
252
|
/** CIM Objekte, die zur Laufzeit im Speicher bleiben.
|
|
234
253
|
* Sie werden zur Erstellung der Topologie verwendet. */
|
|
235
254
|
/** Schlaufen werden als Terminals mit Schaltzustand abgebildet. */
|
|
236
255
|
memoryObjects: Map<number, IdentifiedObject> = new Map();
|
|
237
|
-
/** IDs von
|
|
256
|
+
/** IDs von Leitungsanlussknoten
|
|
238
257
|
* Die IDs werden zur Bestimmung der im Speicher zu haltenden Objekte (ConnectivityNodes, Terminals) herangezogen. */
|
|
239
258
|
leitungAnschlussKnotenIDs = new Set();
|
|
240
259
|
|
|
@@ -243,6 +262,14 @@ export class ConverterIntegral7 {
|
|
|
243
262
|
* Key -> CN UUID -> Basevoltage */
|
|
244
263
|
knotenSpannung = new Map<string, BaseVoltage>();
|
|
245
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
|
+
|
|
246
273
|
constructor() {
|
|
247
274
|
this.cimModel = new Model();
|
|
248
275
|
this.availableTableNames = [];
|
|
@@ -257,6 +284,9 @@ export class ConverterIntegral7 {
|
|
|
257
284
|
await this.getAvailableTableNames(mySqlConfig.database);
|
|
258
285
|
this.standortAnzahl = await this.queryObjectCount(Integral7TableNames.STANDORT);
|
|
259
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);
|
|
260
290
|
this.trafo2WAnzahl = await this.queryObjectCount(Integral7TableNames.TRAFO2W);
|
|
261
291
|
this.trafo3WAnzahl = await this.queryObjectCount(Integral7TableNames.TRAFO3W);
|
|
262
292
|
await this.queryAnschlussIDs();
|
|
@@ -267,12 +297,12 @@ export class ConverterIntegral7 {
|
|
|
267
297
|
});
|
|
268
298
|
}
|
|
269
299
|
|
|
270
|
-
async
|
|
300
|
+
async convert(energyTypesConfig: any, tempDirPath: string): Promise<Status> {
|
|
271
301
|
|
|
272
302
|
return new Promise(async (resolve, reject) => {
|
|
273
303
|
try {
|
|
274
304
|
|
|
275
|
-
const tempDirPath = await createTempDirPath() as string
|
|
305
|
+
/*const tempDirPath = exportPath ? exportPath : await createTempDirPath() as string;*/
|
|
276
306
|
|
|
277
307
|
/** EQ Profile */
|
|
278
308
|
const filePathEQ = path.join(tempDirPath, 'eq.xml');
|
|
@@ -320,7 +350,7 @@ export class ConverterIntegral7 {
|
|
|
320
350
|
|
|
321
351
|
|
|
322
352
|
/** Amprion I7 Profile */
|
|
323
|
-
const filePathAmpI7 = path.join(tempDirPath, '
|
|
353
|
+
const filePathAmpI7 = path.join(tempDirPath, 'amp_i7.xml');
|
|
324
354
|
const writeStreamAmpI7 = fs.createWriteStream(filePathAmpI7);
|
|
325
355
|
const xmlWriterAmpI7 = new XMLWriter(true, (string, encoding) => {
|
|
326
356
|
writeStreamAmpI7.write(string, encoding);
|
|
@@ -466,7 +496,10 @@ export class ConverterIntegral7 {
|
|
|
466
496
|
/** Generatoren -> SynchronousMachine */
|
|
467
497
|
//console.log(`Gen currentLimit = ${currentLimit} offset = ${offset}`);
|
|
468
498
|
if (knotenSoIDs.length > 0 || this.knotenSfIDs.length > 0) {
|
|
469
|
-
await this.convertGeneratoren([...knotenSoIDs, ...this.knotenSfIDs]);
|
|
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]);
|
|
470
503
|
}
|
|
471
504
|
// if (offset === 4800 || offset === 4900) console.log(`9082->${this.integralID2UUID.get(9082)} Generatoren offset = ${offset}`);
|
|
472
505
|
|
|
@@ -494,11 +527,21 @@ export class ConverterIntegral7 {
|
|
|
494
527
|
if (containerStarreVerbindungen.length > 0) {
|
|
495
528
|
await this.convertLeistungsschalter(containerStarreVerbindungen);
|
|
496
529
|
}
|
|
497
|
-
//if (offset === 1800 || offset === 1900) console.log(`32716->${this.integralID2UUID.get(32716)} convertLeistungsschalter offset = ${offset}`);
|
|
498
530
|
|
|
499
|
-
|
|
500
|
-
|
|
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
|
+
|
|
501
543
|
|
|
544
|
+
/** Ende CONDUCTING EQUIPMENT */
|
|
502
545
|
/** Schema konvertieren */
|
|
503
546
|
//console.log(`Schema currentLimit = ${currentLimit} offset = ${offset}`);
|
|
504
547
|
await this.convertSchemaStandorte(standortIDs);
|
|
@@ -527,6 +570,7 @@ export class ConverterIntegral7 {
|
|
|
527
570
|
// if (offset > 0) console.log(`32716->${this.integralID2UUID.get(32716)} convertSchemaSchaltfelder offset = ${offset}`);
|
|
528
571
|
|
|
529
572
|
/** Export EQ */
|
|
573
|
+
/** DC Modell wird nach den HGÜ-Leitungen exportiert */
|
|
530
574
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.substations, RDF_XML.PROFILE_EQ);
|
|
531
575
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.voltageLevels, RDF_XML.PROFILE_EQ);
|
|
532
576
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.bays, RDF_XML.PROFILE_EQ);
|
|
@@ -542,6 +586,7 @@ export class ConverterIntegral7 {
|
|
|
542
586
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.breakers, RDF_XML.PROFILE_EQ);
|
|
543
587
|
|
|
544
588
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.synchronousMachine, RDF_XML.PROFILE_EQ);
|
|
589
|
+
this.objectToCIMXML(xmlWriterEQ, this.cimModel.asynchronousMachine, RDF_XML.PROFILE_EQ);
|
|
545
590
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.generatingUnit, RDF_XML.PROFILE_EQ);
|
|
546
591
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.thermalGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
547
592
|
this.objectToCIMXML(xmlWriterEQ, this.cimModel.nuclearGeneratingUnit, RDF_XML.PROFILE_EQ);
|
|
@@ -595,6 +640,7 @@ export class ConverterIntegral7 {
|
|
|
595
640
|
this.cimModel.energySources.clear();
|
|
596
641
|
|
|
597
642
|
this.cimModel.synchronousMachine.clear();
|
|
643
|
+
this.cimModel.asynchronousMachine.clear();
|
|
598
644
|
this.cimModel.generatingUnit.clear();
|
|
599
645
|
this.cimModel.thermalGeneratingUnit.clear();
|
|
600
646
|
this.cimModel.nuclearGeneratingUnit.clear();
|
|
@@ -642,17 +688,41 @@ export class ConverterIntegral7 {
|
|
|
642
688
|
console.log(`Offset ${offset} done`);
|
|
643
689
|
}
|
|
644
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
|
+
|
|
645
716
|
/** Leitungen werden aufgrund besonderer Struktur separat implementiert. */
|
|
646
717
|
const restCountLeitung = this.leitungsAnzahl < this.limit ? this.leitungsAnzahl : (this.leitungsAnzahl % this.limit);
|
|
647
718
|
const intervalCountLeitung = (this.leitungsAnzahl - restCountLeitung) / this.limit;
|
|
648
719
|
const numberOfIntervalsLeitung = restCountLeitung > 0 ? intervalCountLeitung + 1 : intervalCountLeitung;
|
|
649
|
-
console.log('Convert ACLineSegments ' + this.leitungsAnzahl
|
|
650
|
-
|
|
720
|
+
console.log('Convert ACLineSegments ' + this.leitungsAnzahl);
|
|
721
|
+
/** Stromkreisabschnitte */
|
|
651
722
|
for (let i = 0; i < numberOfIntervalsLeitung; i++) {
|
|
652
723
|
const offset = i * this.limit;
|
|
653
724
|
const currentLimit = (i + 1 === numberOfIntervalsLeitung && restCountLeitung > 0) ? restCountLeitung : this.limit;
|
|
654
725
|
|
|
655
|
-
/** Stromkreisabschnitte */
|
|
656
726
|
|
|
657
727
|
await this.convertLeitungen(currentLimit, offset);
|
|
658
728
|
this.leitungsIDs = [...this.integralLeitungen.keys()];
|
|
@@ -665,6 +735,9 @@ export class ConverterIntegral7 {
|
|
|
665
735
|
|
|
666
736
|
this.objectToCIMXML(xmlWriterSV, this.cimModel.terminals, RDF_XML.PROFILE_SSH);
|
|
667
737
|
|
|
738
|
+
// AMP
|
|
739
|
+
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.acLineSegments, RDF_XML.PROFILE_AMPI7);
|
|
740
|
+
|
|
668
741
|
/** Collections leeren */
|
|
669
742
|
this.cimModel.acLineSegments.clear();
|
|
670
743
|
this.cimModel.connectivityNodes.clear();
|
|
@@ -677,6 +750,60 @@ export class ConverterIntegral7 {
|
|
|
677
750
|
this.leitungsIDs.length = 0;
|
|
678
751
|
}
|
|
679
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
|
+
}
|
|
680
807
|
/** Transformatoren 2W */
|
|
681
808
|
const restCountTrafo2W = this.trafo2WAnzahl < this.limit ? this.trafo2WAnzahl : (this.trafo2WAnzahl % this.limit);
|
|
682
809
|
const intervalCountTrafo2W = (this.trafo2WAnzahl - restCountTrafo2W) / this.limit;
|
|
@@ -722,7 +849,7 @@ export class ConverterIntegral7 {
|
|
|
722
849
|
|
|
723
850
|
}
|
|
724
851
|
|
|
725
|
-
|
|
852
|
+
/** Transformatoren 3W */
|
|
726
853
|
const restCountTrafo3W = this.trafo2WAnzahl < this.limit ? this.trafo3WAnzahl : (this.trafo3WAnzahl % this.limit);
|
|
727
854
|
const intervalCountTrafo3W = (this.trafo3WAnzahl - restCountTrafo3W) / this.limit;
|
|
728
855
|
const numberOfIntervalsTrafo3W = restCountTrafo3W > 0 ? intervalCountTrafo3W + 1 : intervalCountTrafo3W;
|
|
@@ -771,11 +898,14 @@ export class ConverterIntegral7 {
|
|
|
771
898
|
}
|
|
772
899
|
|
|
773
900
|
const memoryTerminals = new Map();
|
|
774
|
-
for (const
|
|
901
|
+
for (const entry of this.memoryObjects.entries()) {
|
|
902
|
+
const value = entry[1];
|
|
775
903
|
if (value instanceof Terminal) {
|
|
776
904
|
const terminal = value as Terminal;
|
|
777
|
-
if(terminal.conductingEquipment || terminal.conductingEquipmentUUID) {
|
|
905
|
+
if (terminal.conductingEquipment || terminal.conductingEquipmentUUID) {
|
|
778
906
|
memoryTerminals.set(value.mrid, value);
|
|
907
|
+
} else {
|
|
908
|
+
console.log(`Terminal ohne conductingEquipment UUID ${terminal.mrid} shortName ${terminal.shortName} ID | ${entry[0]}`);
|
|
779
909
|
}
|
|
780
910
|
}
|
|
781
911
|
}
|
|
@@ -786,6 +916,20 @@ export class ConverterIntegral7 {
|
|
|
786
916
|
this.objectToCIMXML(xmlWriterEQ, memoryTerminals, RDF_XML.PROFILE_EQ);
|
|
787
917
|
this.objectToCIMXML(xmlWriterSSH, memoryTerminals, RDF_XML.PROFILE_SSH);
|
|
788
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
|
+
|
|
789
933
|
this.objectToCIMXML(xmlWriterAmpI7, this.cimModel.psrTypes, RDF_XML.PROFILE_AMPI7);
|
|
790
934
|
|
|
791
935
|
/* this.objectToCIMXML(xmlWriterEQ, memoryTerminals, RDF_XML.PROFILE_EQ);
|
|
@@ -829,7 +973,7 @@ export class ConverterIntegral7 {
|
|
|
829
973
|
]);
|
|
830
974
|
|
|
831
975
|
const zip = new JSZip();
|
|
832
|
-
const filePathZip = path.join(tempDirPath, 'cgmes.zip');
|
|
976
|
+
// const filePathZip = path.join(tempDirPath, 'cgmes.zip');
|
|
833
977
|
const readStreamEq = fs.createReadStream(filePathEQ);
|
|
834
978
|
zip.file('EQ.xml', readStreamEq);
|
|
835
979
|
|
|
@@ -845,26 +989,39 @@ export class ConverterIntegral7 {
|
|
|
845
989
|
const readStreamAmpI7 = fs.createReadStream(filePathAmpI7);
|
|
846
990
|
zip.file('AMP_I7.xml', readStreamAmpI7);
|
|
847
991
|
|
|
848
|
-
await writeZipFile(zip, filePathZip);
|
|
849
992
|
|
|
850
|
-
resolve(
|
|
993
|
+
resolve(await generateNodeStream(zip));
|
|
851
994
|
|
|
852
|
-
|
|
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.'});
|
|
853
1002
|
} catch (e) {
|
|
854
|
-
console.log(e);
|
|
855
1003
|
reject({status: 'error', message: e.toString()});
|
|
856
1004
|
}
|
|
857
1005
|
});
|
|
858
1006
|
}
|
|
859
1007
|
|
|
860
|
-
async
|
|
1008
|
+
async release(tempDirPath?: string): Promise<Status> {
|
|
861
1009
|
return new Promise(async (resolve, reject) => {
|
|
862
1010
|
try {
|
|
863
1011
|
this.closeConnection();
|
|
864
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
|
+
}
|
|
865
1022
|
resolve({status: 'successful', message: 'ok'});
|
|
866
1023
|
} catch (e) {
|
|
867
|
-
reject({status: 'error', message:
|
|
1024
|
+
reject({status: 'error', message: JSON.stringify(e)});
|
|
868
1025
|
}
|
|
869
1026
|
});
|
|
870
1027
|
}
|
|
@@ -883,16 +1040,19 @@ export class ConverterIntegral7 {
|
|
|
883
1040
|
|
|
884
1041
|
private async queryObjectCount(tableName: string): Promise<number> {
|
|
885
1042
|
return new Promise((resolve, reject) => {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
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);
|
|
891
1051
|
}
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
}
|
|
1052
|
+
});
|
|
1053
|
+
} else {
|
|
1054
|
+
return resolve(0);
|
|
1055
|
+
}
|
|
896
1056
|
});
|
|
897
1057
|
}
|
|
898
1058
|
|
|
@@ -904,6 +1064,11 @@ export class ConverterIntegral7 {
|
|
|
904
1064
|
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
905
1065
|
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
906
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
|
+
}
|
|
907
1072
|
results = await this.queryFunctionWrapper(`SELECT DISTINCT aknoten, eknoten FROM ${Integral7TableNames[I7Objects.TRAFO2W]}`);
|
|
908
1073
|
for (const result of results) {
|
|
909
1074
|
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
@@ -914,6 +1079,16 @@ export class ConverterIntegral7 {
|
|
|
914
1079
|
this.leitungAnschlussKnotenIDs.add(result[`aknoten`]);
|
|
915
1080
|
this.leitungAnschlussKnotenIDs.add(result[`eknoten`]);
|
|
916
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
|
+
}
|
|
917
1092
|
} catch (e) {
|
|
918
1093
|
console.error("ERROR:" + e);
|
|
919
1094
|
}
|
|
@@ -982,10 +1157,13 @@ export class ConverterIntegral7 {
|
|
|
982
1157
|
substation.subGeographicalRegion = subregion;
|
|
983
1158
|
// subregion.addSubstation(substation);
|
|
984
1159
|
|
|
1160
|
+
/** Speichern, um später Längsdrossel die VoltageLevelInstanz bestimmen zu können. */
|
|
1161
|
+
this.substationVoltagelevels.set(i7Data.id, []);
|
|
985
1162
|
this.cimModel.addSubstation(substation);
|
|
986
1163
|
this.integralID2UUID.set(i7Data.id, substation.mrid);
|
|
987
1164
|
putUUIDtoI7Ids(substation.mrid, i7Data.id, this.UUID2IntegralID);
|
|
988
1165
|
|
|
1166
|
+
|
|
989
1167
|
/** Integral 7 Modell erstellen zur Berechnung der Netzschema */
|
|
990
1168
|
const standort = new StandortImpl(i7Data);
|
|
991
1169
|
this.integralStandorte.set(i7Data.id, standort);
|
|
@@ -1012,7 +1190,8 @@ export class ConverterIntegral7 {
|
|
|
1012
1190
|
|
|
1013
1191
|
vl.addConnectivityNode(connectivityNode);
|
|
1014
1192
|
|
|
1015
|
-
const
|
|
1193
|
+
const un = getU(i7Data.un, this.deafultUn);
|
|
1194
|
+
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
1016
1195
|
vl.baseVoltage = baseVoltage;
|
|
1017
1196
|
|
|
1018
1197
|
const substation = this.cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
@@ -1055,7 +1234,9 @@ export class ConverterIntegral7 {
|
|
|
1055
1234
|
// this.tableName2tableData.set(Integral7TableNames.SCHALTANLAGE, result);
|
|
1056
1235
|
for (const i7Data of result) {
|
|
1057
1236
|
const vl = new VoltageLevel(getUUID(i7Data.guid), getName(i7Data), i7Data.kurzname);
|
|
1058
|
-
|
|
1237
|
+
|
|
1238
|
+
const un = getU(i7Data.un, this.deafultUn);
|
|
1239
|
+
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
1059
1240
|
vl.baseVoltageUUID = baseVoltage.mrid;
|
|
1060
1241
|
|
|
1061
1242
|
this.cimModel.addVoltageLevel(vl);
|
|
@@ -1079,6 +1260,12 @@ export class ConverterIntegral7 {
|
|
|
1079
1260
|
schaltanlage.addStandort(this.integralStandorte.get(schaltanlage.standortid));
|
|
1080
1261
|
this.integralSchaltanlagen.set(i7Data.id, schaltanlage);
|
|
1081
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
|
+
});
|
|
1082
1269
|
} else {
|
|
1083
1270
|
console.log(`VoltageLevel ${i7Data.id} ${vl.mrid} besitzt keine Umspannanlage.`);
|
|
1084
1271
|
}
|
|
@@ -1349,7 +1536,7 @@ export class ConverterIntegral7 {
|
|
|
1349
1536
|
}
|
|
1350
1537
|
}
|
|
1351
1538
|
|
|
1352
|
-
async convertGeneratoren(knotenSfIDs: number[]) {
|
|
1539
|
+
async convertGeneratoren(knotenSfIDs: number[], energyTypesConfig: any) {
|
|
1353
1540
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
1354
1541
|
if (this.isTableAvailable(Integral7TableNames.GENERATOR)) {
|
|
1355
1542
|
const result: Generator[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.GENERATOR, 0, 0, knotenSfIDs))
|
|
@@ -1433,7 +1620,7 @@ export class ConverterIntegral7 {
|
|
|
1433
1620
|
|
|
1434
1621
|
|
|
1435
1622
|
// GeneratingUnit
|
|
1436
|
-
const generatingUnitConfig =
|
|
1623
|
+
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1437
1624
|
|
|
1438
1625
|
/** Wenn ein Config für den Primärenergietyp vorhanden*/
|
|
1439
1626
|
let generatingUnit;
|
|
@@ -1454,12 +1641,18 @@ export class ConverterIntegral7 {
|
|
|
1454
1641
|
case 'WindGeneratingUnit': {
|
|
1455
1642
|
generatingUnit = new WindGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1456
1643
|
switch (generatingUnitConfig.fuelType) {
|
|
1457
|
-
case 'onshore':
|
|
1644
|
+
case 'onshore': {
|
|
1458
1645
|
generatingUnit.windGenUnitType = WindGenUnitKind.onshore;
|
|
1459
1646
|
break;
|
|
1460
|
-
|
|
1647
|
+
}
|
|
1648
|
+
case 'offshore': {
|
|
1461
1649
|
generatingUnit.windGenUnitType = WindGenUnitKind.offshore;
|
|
1462
1650
|
break;
|
|
1651
|
+
}
|
|
1652
|
+
default : {
|
|
1653
|
+
generatingUnit.windGenUnitType = WindGenUnitKind.onshore;
|
|
1654
|
+
break;
|
|
1655
|
+
}
|
|
1463
1656
|
}
|
|
1464
1657
|
break;
|
|
1465
1658
|
}
|
|
@@ -1940,7 +2133,7 @@ export class ConverterIntegral7 {
|
|
|
1940
2133
|
const junction = new Junction(getUUID(i7Data.guid), i7Data.bezeichner, 'JNCT', 'starre Verbindung');
|
|
1941
2134
|
const schaltzustand = convertToBooleanI7(i7Data.schaltzustand);
|
|
1942
2135
|
|
|
1943
|
-
const equipmentContainer = determineEquipmentContainer(
|
|
2136
|
+
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(this.integralID2UUID.get(i7Data.seliste)) as EquipmentContainer);
|
|
1944
2137
|
|
|
1945
2138
|
const cnStart = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
1946
2139
|
const cnZiel = this.cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
@@ -1986,89 +2179,95 @@ export class ConverterIntegral7 {
|
|
|
1986
2179
|
/**
|
|
1987
2180
|
* @param lineAttribute Attribut zur Bestimmung der Stromkreise */
|
|
1988
2181
|
|
|
1989
|
-
|
|
1990
|
-
|
|
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) {
|
|
1991
2186
|
|
|
1992
|
-
|
|
1993
|
-
|
|
2187
|
+
// Topologie
|
|
2188
|
+
/* Anfang
|
|
2189
|
+
* 3 moegliche Anschluesse
|
|
2190
|
+
* KontenSo -> Anschluesspunkt
|
|
2191
|
+
* KnotenSf -> Schaltfeldpunkt
|
|
2192
|
+
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
|
|
1994
2193
|
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
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);
|
|
2001
2202
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
equivalentBranch.
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
const baseVoltageUr1 = createBaseVoltageIfNotExists(this.cimModel, i7Data.ur1);
|
|
2034
|
-
const baseVoltageUr2 = createBaseVoltageIfNotExists(this.cimModel, i7Data.ur2);
|
|
2035
|
-
if (baseVoltageUr1) {
|
|
2036
|
-
equivalentBranch.baseVoltage = baseVoltageUr1;
|
|
2037
|
-
} else if (baseVoltageUr2) {
|
|
2038
|
-
equivalentBranch.baseVoltage = baseVoltageUr2;
|
|
2039
|
-
} else {
|
|
2040
|
-
console.log(`Ersatzlaengszweig ${i7Data.id} ${equivalentBranch.mrid} besitzt keine Spannungsebenenangabe.`);
|
|
2041
|
-
}
|
|
2042
|
-
this.cimModel.addEquivalentBranch(equivalentBranch);
|
|
2043
|
-
this.integralID2UUID.set(i7Data.id, equivalentBranch.mrid);
|
|
2044
|
-
|
|
2045
|
-
// Topologie
|
|
2046
|
-
/!* Anfang
|
|
2047
|
-
* 3 moegliche Anschluesse
|
|
2048
|
-
* KontenSo -> Anschluesspunkt
|
|
2049
|
-
* KnotenSf -> Schaltfeldpunkt
|
|
2050
|
-
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt *!/
|
|
2051
|
-
const startUUID = this.integralID2UUID.get(i7Data.aknoten);
|
|
2052
|
-
const targetUUID = this.integralID2UUID.get(i7Data.eknoten);
|
|
2053
|
-
|
|
2054
|
-
const start = this.cimModel.getObject(startUUID);
|
|
2055
|
-
if(start) {
|
|
2056
|
-
createConnection(this.cimModel, equivalentBranch, start, PhaseCode.ABC, 1);
|
|
2057
|
-
} else {
|
|
2058
|
-
console.log(`Ersatzlaengszweig ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Anfangsknoten.`);
|
|
2059
|
-
}
|
|
2060
|
-
const target = this.cimModel.getObject(targetUUID);
|
|
2061
|
-
if(target) {
|
|
2062
|
-
createConnection(this.cimModel, equivalentBranch, target, PhaseCode.ABC, 2);
|
|
2063
|
-
} else {
|
|
2064
|
-
console.log(`Ersatzlaengszweig ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Zielknoten.`);
|
|
2065
|
-
}
|
|
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;
|
|
2066
2234
|
}
|
|
2067
2235
|
|
|
2068
|
-
|
|
2069
|
-
|
|
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);
|
|
2070
2265
|
}
|
|
2071
|
-
|
|
2266
|
+
|
|
2267
|
+
} else {
|
|
2268
|
+
console.log(`Tabelle ${Integral7TableNames.ERSATZLAENGSZWEIG} ist nicht vorhanden.`);
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2072
2271
|
|
|
2073
2272
|
/**
|
|
2074
2273
|
* @param lineAttribute Attributsname zum Bestimmen der Stronkreise*/
|
|
@@ -2201,7 +2400,7 @@ export class ConverterIntegral7 {
|
|
|
2201
2400
|
for (const i7Data of result) {
|
|
2202
2401
|
const acLineSegment = this.cimModel.getACLineSegment(this.integralID2UUID.get(i7Data.leitung));
|
|
2203
2402
|
if (acLineSegment) {
|
|
2204
|
-
this.setACLineSegmentProperties(acLineSegment, i7Data, '
|
|
2403
|
+
this.setACLineSegmentProperties(acLineSegment, i7Data, 'Freileitung');
|
|
2205
2404
|
} else {
|
|
2206
2405
|
console.log(`Freileitung ${i7Data.id} besitzt kein Leitungsobjekt.`);
|
|
2207
2406
|
}
|
|
@@ -2216,7 +2415,7 @@ export class ConverterIntegral7 {
|
|
|
2216
2415
|
for (const i7Data of result) {
|
|
2217
2416
|
const acLineSegment = this.cimModel.getACLineSegment(this.integralID2UUID.get(i7Data.leitung));
|
|
2218
2417
|
if (acLineSegment) {
|
|
2219
|
-
this.setACLineSegmentProperties(acLineSegment, i7Data, '
|
|
2418
|
+
this.setACLineSegmentProperties(acLineSegment, i7Data, 'Kabel');
|
|
2220
2419
|
} else {
|
|
2221
2420
|
console.log(`Kabel ${i7Data.id} besitzt kein Leitungsobjekt.`);
|
|
2222
2421
|
}
|
|
@@ -2702,6 +2901,100 @@ export class ConverterIntegral7 {
|
|
|
2702
2901
|
}
|
|
2703
2902
|
}
|
|
2704
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
|
+
|
|
2705
2998
|
async convertTrenner3f(containerIDs: number[]) {
|
|
2706
2999
|
if (this.isTableAvailable(Integral7TableNames.TRENNER_3P)) {
|
|
2707
3000
|
const result: Trenner3p[] = await this.queryFunctionWrapper(getNetzQuery(I7Objects.TRENNER_3P, 0, 0, containerIDs));
|
|
@@ -2834,6 +3127,293 @@ export class ConverterIntegral7 {
|
|
|
2834
3127
|
}
|
|
2835
3128
|
}
|
|
2836
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
|
+
|
|
2837
3417
|
/* async convertBelastungen() {
|
|
2838
3418
|
if (this.isTableAvailable(Integral7TableNames.BELASTUNG)) {
|
|
2839
3419
|
const result: Belastung[] = await this.queryFunctionWrapper(BELASTUNG_SQL_QUERY);
|
|
@@ -2925,6 +3505,7 @@ export class ConverterIntegral7 {
|
|
|
2925
3505
|
console.log(`Tabelle ${Integral7TableNames.EINSPEISUNG} ist nicht vorhanden.`);
|
|
2926
3506
|
}
|
|
2927
3507
|
}*/
|
|
3508
|
+
|
|
2928
3509
|
/* async convertBoundaryInjections() {
|
|
2929
3510
|
if (this.isTableAvailable(Integral7TableNames.BOUNDARYINJECTION)) {
|
|
2930
3511
|
const result: RandnetzEinspeisung[] = await this.queryFunctionWrapper(BOUNDARYINJECTION_SQL_QUERY);
|
|
@@ -2980,230 +3561,61 @@ export class ConverterIntegral7 {
|
|
|
2980
3561
|
}
|
|
2981
3562
|
}*/
|
|
2982
3563
|
|
|
2983
|
-
/* async convertGeneratoren() {
|
|
2984
|
-
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
2985
|
-
if (this.isTableAvailable(Integral7TableNames.GENERATOR)) {
|
|
2986
|
-
const result: Generator[] = await this.queryFunctionWrapper(GENERATOR_SQL_QUERY);
|
|
2987
|
-
for (const i7Data of result) {
|
|
2988
|
-
const synchronousMachine = new SynchronousMachine(getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname);
|
|
2989
|
-
|
|
2990
|
-
const s = getActiveReactivePower(i7Data);
|
|
2991
|
-
const s0 = getNumber(i7Data.sr);
|
|
2992
|
-
synchronousMachine.ratedS = s0 === 0 ? s[0] : s0;
|
|
2993
|
-
synchronousMachine.ratedU = i7Data.ur;
|
|
2994
|
-
|
|
2995
|
-
synchronousMachine.type = SynchronousMachineKind.generator;
|
|
2996
|
-
synchronousMachine.referencePriority = i7Data.einspprio;
|
|
2997
|
-
|
|
2998
|
-
const maxQ = getNumber(i7Data.q_max);
|
|
2999
|
-
synchronousMachine.maxQ = maxQ !== 0 ? maxQ : getNumber(i7Data.qmax_von_pmax);
|
|
3000
|
-
const minQ = getNumber(i7Data.q_min);
|
|
3001
|
-
synchronousMachine.minQ = minQ !== 0 ? minQ : getNumber(i7Data.qmin_von_pmin);
|
|
3002
|
-
|
|
3003
|
-
const reactiveCapabilityCurve = new ReactiveCapabilityCurve(generateUUID(), 'CurveData');
|
|
3004
|
-
reactiveCapabilityCurve.curveStyle = CurveStyle.straightLineYValues;
|
|
3005
|
-
reactiveCapabilityCurve.xUnit = UnitSymbol.W;
|
|
3006
|
-
reactiveCapabilityCurve.y1Unit = UnitSymbol.VAr;
|
|
3007
|
-
reactiveCapabilityCurve.y2Unit = UnitSymbol.VAr;
|
|
3008
|
-
|
|
3009
|
-
const curveData1 = new CurveData(generateUUID());
|
|
3010
|
-
curveData1.curve = reactiveCapabilityCurve;
|
|
3011
|
-
curveData1.xvalue = i7Data.p_min; //pMin
|
|
3012
|
-
curveData1.y1value = i7Data.qmin_von_pmin;//qMin pMin
|
|
3013
|
-
curveData1.y2value = i7Data.qmax_von_pmin;//qMay pMin
|
|
3014
|
-
this.cimModel.addCurveData(curveData1);
|
|
3015
|
-
|
|
3016
|
-
const curveData2 = new CurveData(generateUUID());
|
|
3017
|
-
curveData2.curve = reactiveCapabilityCurve;
|
|
3018
|
-
curveData2.xvalue = i7Data.p_max; //pMin
|
|
3019
|
-
curveData2.y1value = i7Data.qmin_von_pmax//qMin pMin
|
|
3020
|
-
curveData2.y2value = i7Data.qmax_von_pmax;//qMay pMin
|
|
3021
|
-
this.cimModel.addCurveData(curveData2);
|
|
3022
3564
|
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
// synchronousMachine.earthingStarPointX
|
|
3044
|
-
// ynchronousMachine.ikk: number;
|
|
3045
|
-
// synchronousMachine.mu: number;
|
|
3046
|
-
|
|
3047
|
-
// synchronousMachine.satDirectSyncX: number;
|
|
3048
|
-
// synchronousMachine.satDirectTransX: number;
|
|
3049
|
-
// synchronousMachine.shortCircuitRotorType: ShortCircuitRotorKind;
|
|
3050
|
-
// synchronousMachine.voltageRegulationRange: number;
|
|
3051
|
-
|
|
3052
|
-
// RegulatingControl
|
|
3053
|
-
const regulatingControl = new RegulatingControl(generateUUID(), `RegulatingControl_${synchronousMachine.name}`);
|
|
3054
|
-
switch (i7Data.spannungsgeregelt) {
|
|
3055
|
-
case 1: {
|
|
3056
|
-
regulatingControl.mode = RegulatingControlModeKind.voltage;
|
|
3057
|
-
}
|
|
3058
|
-
}
|
|
3059
|
-
synchronousMachine.regulatingControl = regulatingControl;
|
|
3060
|
-
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
// GeneratingUnit
|
|
3064
|
-
const generatingUnitConfig = FUEL_TYPE_CONFIG[i7Data.nameprimaertyp];
|
|
3065
|
-
|
|
3066
|
-
/!** Wenn ein Config für den Primärenergietyp vorhanden*!/
|
|
3067
|
-
let generatingUnit;
|
|
3068
|
-
|
|
3069
|
-
if (generatingUnitConfig) {
|
|
3070
|
-
switch (generatingUnitConfig.class) {
|
|
3071
|
-
case 'ThermalGeneratingUnit': {
|
|
3072
|
-
generatingUnit = new ThermalGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
3073
|
-
if (generatingUnitConfig.fuelType) {
|
|
3074
|
-
generateFuelType(i7Data.nameprimaertyp, generatingUnitConfig.fuelType, generatingUnit, this.cimModel);
|
|
3075
|
-
}
|
|
3076
|
-
break;
|
|
3077
|
-
}
|
|
3078
|
-
case 'SolarGeneratingUnit': {
|
|
3079
|
-
generatingUnit = new SolarGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
3080
|
-
break;
|
|
3081
|
-
}
|
|
3082
|
-
case 'WindGeneratingUnit': {
|
|
3083
|
-
generatingUnit = new WindGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname, i7Data.nameprimaertyp);
|
|
3084
|
-
switch (generatingUnitConfig.fuelType) {
|
|
3085
|
-
case 'onshore':
|
|
3086
|
-
generatingUnit.windGenUnitType = WindGenUnitKind.onshore;
|
|
3087
|
-
break;
|
|
3088
|
-
case 'offshore':
|
|
3089
|
-
generatingUnit.windGenUnitType = WindGenUnitKind.offshore;
|
|
3090
|
-
break;
|
|
3091
|
-
}
|
|
3092
|
-
break;
|
|
3093
|
-
}
|
|
3094
|
-
case 'NuclearGeneratingUnit': {
|
|
3095
|
-
generatingUnit = new NuclearGeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname);
|
|
3096
|
-
break;
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
if(!generatingUnit) {
|
|
3102
|
-
generatingUnit = new GeneratingUnit(getUUID(''), 'Generator_' + i7Data.bezeichner, i7Data.kurzname);
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
generatingUnit.maxOperatingP = getNumber(i7Data.p_max);
|
|
3106
|
-
generatingUnit.minOperatingP = getNumber(i7Data.p_min);
|
|
3107
|
-
|
|
3108
|
-
generatingUnit.initialP = i7Data.p0;
|
|
3109
|
-
generatingUnit.nominalP = generatingUnit.maxOperatingP;
|
|
3110
|
-
|
|
3111
|
-
generatingUnit.genControlSource = GeneratorControlSource.unavailable;
|
|
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;
|
|
3112
3585
|
|
|
3586
|
+
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3587
|
+
createSvStatus(this.cimModel, inBetrieb, asynchronousMachine);
|
|
3113
3588
|
|
|
3589
|
+
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3114
3590
|
|
|
3115
|
-
|
|
3116
|
-
|
|
3591
|
+
if (connectivityNode) {
|
|
3592
|
+
createConnection(this.cimModel, asynchronousMachine, connectivityNode, PhaseCode.ABC);
|
|
3117
3593
|
|
|
3118
|
-
const
|
|
3594
|
+
const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
3595
|
+
if (equipmentContainer) {
|
|
3119
3596
|
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
regulatingControl.terminal = terminal;
|
|
3123
|
-
const equipmentContainerCn = connectivityNode.connectivityNodeContainer as EquipmentContainer;
|
|
3124
|
-
if (equipmentContainerCn) {
|
|
3125
|
-
const equipmentContainer = determineEquipmentContainer(equipmentContainerCn);
|
|
3126
|
-
equipmentContainer.addEquipment(synchronousMachine);
|
|
3127
|
-
synchronousMachine.equipmentContainer = equipmentContainer;
|
|
3597
|
+
// equipmentContainer.addEquipment(asynchronousMachine);
|
|
3598
|
+
asynchronousMachine.equipmentContainerUUID = equipmentContainer?.mrid;
|
|
3128
3599
|
|
|
3129
|
-
|
|
3130
|
-
|
|
3600
|
+
/* const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3601
|
+
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3602
|
+
asynchronousMachine.description = i7Schluesel;*/
|
|
3131
3603
|
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
synchronousMachine.description = i7Schluesel;
|
|
3604
|
+
this.cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
3605
|
+
this.integralID2UUID.set(i7Data.id, asynchronousMachine.mrid);
|
|
3135
3606
|
|
|
3136
|
-
} else {
|
|
3137
|
-
console.log(`SynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3138
|
-
}
|
|
3139
3607
|
} else {
|
|
3140
|
-
console.log(`
|
|
3608
|
+
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3141
3609
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
this.cimModel.addGeneratingUnit(generatingUnit);
|
|
3145
|
-
this.cimModel.addSynchronousMachine(synchronousMachine);
|
|
3146
|
-
this.integralID2UUID.set(i7Data.id, synchronousMachine.mrid);
|
|
3147
|
-
|
|
3610
|
+
} else {
|
|
3611
|
+
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3148
3612
|
}
|
|
3149
|
-
}
|
|
3150
|
-
}*/
|
|
3151
|
-
|
|
3152
|
-
/* async convertAsynchronmotor() {
|
|
3153
|
-
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
3154
|
-
if (this.isTableAvailable(Integral7TableNames.ASYNCHRONMOTOR)) {
|
|
3155
|
-
const result: Asynchronmotor[] = await this.queryFunctionWrapper(ASYNCHRONMOTOR_SQL_QUERY);
|
|
3156
|
-
for (const i7Data of result) {
|
|
3157
|
-
const asynchronousMachine = new AsynchronousMachine(getUUID(i7Data.guid), getName(i7Data), i7Data.bezeichner, i7Data.kurzname);
|
|
3158
|
-
asynchronousMachine.efficiency = i7Data.wirkungsgrad * 100;
|
|
3159
|
-
asynchronousMachine.iaIrRatio = i7Data.ilr_ir;
|
|
3160
|
-
asynchronousMachine.rxLockedRotorRatio = 0;
|
|
3161
|
-
asynchronousMachine.polePairNumber = i7Data.polpaarz;
|
|
3162
|
-
asynchronousMachine.ratedMechanicalPower = i7Data.p_mech;
|
|
3163
|
-
asynchronousMachine.ratedPowerFactor = i7Data.cos_phir;
|
|
3164
|
-
|
|
3165
|
-
asynchronousMachine.ratedS = i7Data.sr;
|
|
3166
|
-
asynchronousMachine.ratedU = i7Data.ur;
|
|
3167
|
-
|
|
3168
|
-
asynchronousMachine.p = i7Data.p0;
|
|
3169
|
-
asynchronousMachine.q = i7Data.flag_ind === 1 ? i7Data.q0_ind : i7Data.q0_kap;
|
|
3170
|
-
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind.motor;
|
|
3171
|
-
asynchronousMachine.controlEnabled = false;
|
|
3172
|
-
|
|
3173
|
-
const inBetrieb = convertToBooleanI7(i7Data.betrieb);
|
|
3174
|
-
createSvStatus(this.cimModel, inBetrieb, asynchronousMachine);
|
|
3175
3613
|
|
|
3176
|
-
const connectivityNode = this.cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
3177
|
-
|
|
3178
|
-
if (connectivityNode) {
|
|
3179
|
-
createConnection(this.cimModel, asynchronousMachine, connectivityNode, PhaseCode.ABC);
|
|
3180
|
-
|
|
3181
|
-
const equipmentContainerCN = connectivityNode.connectivityNodeContainer as EquipmentContainer;
|
|
3182
|
-
if (equipmentContainerCN) {
|
|
3183
|
-
const equipmentContainer = determineEquipmentContainer(equipmentContainerCN);
|
|
3184
|
-
|
|
3185
|
-
equipmentContainer.addEquipment(asynchronousMachine);
|
|
3186
|
-
asynchronousMachine.equipmentContainer = equipmentContainer;
|
|
3187
|
-
|
|
3188
|
-
const i7Schluesel = getDescription(equipmentContainer.getSubstation()) +
|
|
3189
|
-
EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3190
|
-
asynchronousMachine.description = i7Schluesel;
|
|
3191
|
-
|
|
3192
|
-
this.cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
3193
|
-
this.integralID2UUID.set(i7Data.id, asynchronousMachine.mrid);
|
|
3194
|
-
|
|
3195
|
-
} else {
|
|
3196
|
-
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3197
|
-
}
|
|
3198
|
-
} else {
|
|
3199
|
-
console.log(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3200
|
-
}
|
|
3201
|
-
|
|
3202
|
-
}
|
|
3203
|
-
} else {
|
|
3204
|
-
console.log(`Tabelle ${Integral7TableNames.ASYNCHRONMOTOR} ist nicht vorhanden.`);
|
|
3205
3614
|
}
|
|
3206
|
-
}
|
|
3615
|
+
} else {
|
|
3616
|
+
console.log(`Tabelle ${Integral7TableNames.ASYNCHRONMOTOR} ist nicht vorhanden.`);
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3207
3619
|
|
|
3208
3620
|
/**------------------Schema----------------------------*/
|
|
3209
3621
|
async convertNetzvarianten() {
|
|
@@ -3252,12 +3664,8 @@ export class ConverterIntegral7 {
|
|
|
3252
3664
|
|
|
3253
3665
|
// Spannungsebene
|
|
3254
3666
|
if (!acLineSegment.baseVoltage) {
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, data.un);
|
|
3258
|
-
} else {
|
|
3259
|
-
baseVoltage = createBaseVoltageIfNotExists(this.cimModel, 110);
|
|
3260
|
-
}
|
|
3667
|
+
const un = getU(data.un, this.deafultUn);
|
|
3668
|
+
const baseVoltage = createBaseVoltageIfNotExists(this.cimModel, un);
|
|
3261
3669
|
acLineSegment.baseVoltage = baseVoltage;
|
|
3262
3670
|
}
|
|
3263
3671
|
|