@enervance/insight-cim-model 0.0.157 → 0.0.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/converter/PSDM/ConverterPowerSystemDataModel.js.map +1 -1
- package/dist/converter/integral7/ConverterIntegral7.d.ts +0 -0
- package/dist/converter/integral7/ConverterIntegral7.js +1 -0
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -0
- package/dist/converter/integral7/config/integral-prefix.d.ts +0 -2
- package/dist/converter/integral7/config/integral-prefix.js +1 -3
- package/dist/converter/integral7/config/integral-prefix.js.map +1 -1
- package/dist/converter/integral7/converter.integral7.d.ts +21 -14
- package/dist/converter/integral7/converter.integral7.js +764 -957
- package/dist/converter/integral7/converter.integral7.js.map +1 -1
- package/dist/converter/integral7/dl-convert/dl-converter-i7.d.ts +1 -1
- package/dist/converter/integral7/dl-convert/dl-converter-i7.js.map +1 -1
- package/dist/converter/integral7/interface-i7/IDefaultValuesConfig.d.ts +0 -3
- package/dist/converter/integral7/interface-i7/data-structures-i7.d.ts +3 -3
- package/dist/converter/integral7/interface-i7/export-frame-i7.d.ts +2 -2
- package/dist/converter/integral7/interface-i7/export-frame-i7.js +0 -3
- package/dist/converter/integral7/interface-i7/export-frame-i7.js.map +1 -1
- package/dist/converter/integral7/model/dl-utils/util-functions.js.map +1 -1
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +12 -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 +44 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js +10 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js.map +1 -0
- package/dist/converter/integral7/model/interfaces.d.ts +31 -93
- package/dist/converter/integral7/model/interfaces.js.map +1 -1
- package/dist/converter/integral7/sql/integral.sql.d.ts +1 -4
- package/dist/converter/integral7/sql/integral.sql.js +14 -20
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils-cgmes-export.js +0 -3
- package/dist/converter/integral7/utils-cgmes-export.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +2 -15
- package/dist/converter/integral7/utils.js +16 -186
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl/etl-neplan/etl-neplan.js +8 -15
- package/dist/etl/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/interfaces/model/assets/IAsset.d.ts +2 -0
- package/dist/model/assetinfo/WireInfo.d.ts +0 -1
- package/dist/model/assetinfo/WireInfo.js.map +1 -1
- package/dist/model/assets/AssetContainer.js.map +1 -1
- package/dist/model/common/PositionPoint.js +18 -3
- package/dist/model/common/PositionPoint.js.map +1 -1
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/IdentifiedObject.js +3 -9
- package/dist/model/core/IdentifiedObject.js.map +1 -1
- package/dist/model/core/Terminal.js +2 -2
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js +0 -1
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -1
- package/dist/model/dc/CsConverter.js.map +1 -1
- package/dist/model/dc/DCConverterUnit.d.ts +0 -1
- package/dist/model/dc/DCConverterUnit.js +0 -3
- package/dist/model/dc/DCConverterUnit.js.map +1 -1
- package/dist/model/dc/DCTerminal.js +0 -1
- package/dist/model/dc/DCTerminal.js.map +1 -1
- package/dist/model/diagram/Diagram.js +0 -2
- package/dist/model/diagram/Diagram.js.map +1 -1
- package/dist/model/extensions/amprion/equivalents/INTEGRALEquivalentBranch.js +9 -2
- package/dist/model/extensions/amprion/equivalents/INTEGRALEquivalentBranch.js.map +1 -1
- package/dist/model/extensions/enervance/wires/EVACLineSegment.d.ts +1 -0
- package/dist/model/extensions/enervance/wires/EVACLineSegment.js +27 -0
- package/dist/model/extensions/enervance/wires/EVACLineSegment.js.map +1 -1
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.d.ts +0 -1
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js +0 -3
- package/dist/model/extensions/integral/loadmodel/INTEGRALConformLoad.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALAsynchronousMachine.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.d.ts +0 -1
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js +3 -6
- package/dist/model/extensions/integral/wires/INTEGRALExternalNetworkInjection.js.map +1 -1
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.d.ts +0 -1
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js +1 -7
- package/dist/model/extensions/integral/wires/INTEGRALSynchronousMachine.js.map +1 -1
- package/dist/model/model/Model.d.ts +0 -0
- package/dist/model/model/Model.js +1 -0
- package/dist/model/model/Model.js.map +1 -0
- package/dist/model/operations/ControlArea.d.ts +0 -1
- package/dist/model/operations/ControlArea.js +2 -6
- package/dist/model/operations/ControlArea.js.map +1 -1
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/Breaker.js +1 -1
- package/dist/model/wires/Breaker.js.map +1 -1
- package/dist/model/wires/Disconnector.js +1 -1
- package/dist/model/wires/Disconnector.js.map +1 -1
- package/dist/model/wires/ExternalNetworkInjection.js +4 -4
- package/dist/model/wires/ExternalNetworkInjection.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerAsymmetrical.js +1 -1
- package/dist/model/wires/PhaseTapChangerAsymmetrical.js.map +1 -1
- package/dist/model/wires/PhaseTapChangerSymmetrical.js +1 -1
- package/dist/model/wires/PhaseTapChangerSymmetrical.js.map +1 -1
- package/dist/model/wires/TapChangerTablePoint.js +18 -6
- package/dist/model/wires/TapChangerTablePoint.js.map +1 -1
- package/dist/model-container/model/ModelContainer.d.ts +1 -5
- package/dist/model-container/model/ModelContainer.js +1 -13
- package/dist/model-container/model/ModelContainer.js.map +1 -1
- package/dist/util/collection/util-graph2tree.d.ts +0 -1
- package/dist/util/collection/util-graph2tree.js +2 -65
- package/dist/util/collection/util-graph2tree.js.map +1 -1
- package/dist/util/util-create.d.ts +1 -1
- package/dist/util/util-create.js +19 -31
- package/dist/util/util-create.js.map +1 -1
- package/dist/util/util-test.js +109 -0
- package/dist/util/util-test.js.map +1 -1
- package/dist/utils2/parser.utils.d.ts +1 -1
- package/dist/utils2/parser.utils.js +20 -41
- package/dist/utils2/parser.utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/converter/integral7/model/integral/HgueleitungImpl.d.ts +0 -24
- package/dist/converter/integral7/model/integral/HgueleitungImpl.js +0 -7
- package/dist/converter/integral7/model/integral/HgueleitungImpl.js.map +0 -1
- package/dist/model/operationallimits/ApparentPowerLimit.d.ts +0 -15
- package/dist/model/operationallimits/ApparentPowerLimit.js +0 -56
- package/dist/model/operationallimits/ApparentPowerLimit.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGeoCoordinates = exports.ConverterIntegral7 = void 0;
|
|
3
|
+
exports.connectDCGround = exports.createNeutralGroundReturn = exports.createDCGround = exports.getGeoCoordinates = exports.ConverterIntegral7 = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const JSZip = require("jszip");
|
|
@@ -21,7 +21,6 @@ const SubGeographicalRegion_1 = require("../../model/core/SubGeographicalRegion.
|
|
|
21
21
|
const Substation_1 = require("../../model/core/Substation.js");
|
|
22
22
|
const Terminal_1 = require("../../model/core/Terminal.js");
|
|
23
23
|
const VoltageLevel_1 = require("../../model/core/VoltageLevel.js");
|
|
24
|
-
const ACDCConverter_1 = require("../../model/dc/ACDCConverter.js");
|
|
25
24
|
const ACDCConverterDCTerminal_1 = require("../../model/dc/ACDCConverterDCTerminal.js");
|
|
26
25
|
const CsConverter_1 = require("../../model/dc/CsConverter.js");
|
|
27
26
|
const CsOperatingModeKind_1 = require("../../model/dc/CsOperatingModeKind.js");
|
|
@@ -66,6 +65,7 @@ const LimitTypeKind_1 = require("../../model/operationallimits/LimitTypeKind.js"
|
|
|
66
65
|
const OperationalLimitDirectionKind_1 = require("../../model/operationallimits/OperationalLimitDirectionKind.js");
|
|
67
66
|
const OperationalLimitSet_1 = require("../../model/operationallimits/OperationalLimitSet.js");
|
|
68
67
|
const OperationalLimitType_1 = require("../../model/operationallimits/OperationalLimitType.js");
|
|
68
|
+
const VoltageLimit_1 = require("../../model/operationallimits/VoltageLimit.js");
|
|
69
69
|
const ControlArea_1 = require("../../model/operations/ControlArea.js");
|
|
70
70
|
const Breaker_1 = require("../../model/wires/Breaker.js");
|
|
71
71
|
const BusbarSection_1 = require("../../model/wires/BusbarSection.js");
|
|
@@ -86,6 +86,7 @@ const PowerTransformerEnd_1 = require("../../model/wires/PowerTransformerEnd.js"
|
|
|
86
86
|
const RatioTapChanger_1 = require("../../model/wires/RatioTapChanger.js");
|
|
87
87
|
const RatioTapChangerTable_1 = require("../../model/wires/RatioTapChangerTable.js");
|
|
88
88
|
const ReactiveCapabilityCurve_1 = require("../../model/wires/ReactiveCapabilityCurve.js");
|
|
89
|
+
const RegulatingControl_1 = require("../../model/wires/RegulatingControl.js");
|
|
89
90
|
const RegulatingControlModeKind_1 = require("../../model/wires/RegulatingControlModeKind.js");
|
|
90
91
|
const StaticVarCompensator_1 = require("../../model/wires/StaticVarCompensator.js");
|
|
91
92
|
const SynchronousMachineKind_1 = require("../../model/wires/SynchronousMachineKind.js");
|
|
@@ -127,18 +128,13 @@ const INTEGRALEquivalentBranch_1 = require("../../model/extensions/amprion/equiv
|
|
|
127
128
|
const PhaseTapChangerLinear_1 = require("../../model/wires/PhaseTapChangerLinear.js");
|
|
128
129
|
const DCConverterUnit_1 = require("../../model/extensions/integral/dc/DCConverterUnit.js");
|
|
129
130
|
const DCPolarityKind_1 = require("../../model/dc/DCPolarityKind.js");
|
|
130
|
-
const RotatingMachine_1 = require("../../model/wires/RotatingMachine.js");
|
|
131
|
-
const SynchronousMachine_1 = require("../../model/wires/SynchronousMachine.js");
|
|
132
|
-
const AsynchronousMachine_1 = require("../../model/wires/AsynchronousMachine.js");
|
|
133
|
-
const ControlAreaTypeKind_1 = require("../../model/operations/ControlAreaTypeKind.js");
|
|
134
|
-
const CsPpccControlKind_1 = require("../../model/dc/CsPpccControlKind.js");
|
|
135
|
-
const ApparentPowerLimit_1 = require("../../model/operationallimits/ApparentPowerLimit.js");
|
|
136
131
|
const executor_1 = require("./dl-convert/executor.js");
|
|
137
132
|
const Diagram_1 = require("../../model/diagram/Diagram.js");
|
|
138
133
|
const DiagramObject_1 = require("../../model/diagram/DiagramObject.js");
|
|
139
134
|
const util_asset_model_1 = require("./util-asset.model.js");
|
|
140
135
|
const cim_constants_1 = require("../../constants/cim-constants.js");
|
|
141
136
|
const EVWireObject_1 = require("../../model/extensions/enervance/assets/EVWireObject.js");
|
|
137
|
+
const SynchronousMachine_1 = require("../../model/wires/SynchronousMachine.js");
|
|
142
138
|
class ConverterIntegral7 {
|
|
143
139
|
constructor() {
|
|
144
140
|
/** Exportnetze gemäß Konfiguration */
|
|
@@ -293,22 +289,18 @@ class ConverterIntegral7 {
|
|
|
293
289
|
startTime = perf_hooks.performance.now();
|
|
294
290
|
/** Standort -> Substation */
|
|
295
291
|
yield this.convertStandorte(cimModel, integral7Modell, subGeoRegionsI7IDs, defaultValuesConfig);
|
|
296
|
-
logExecutionTime(this.logger, startTime, `convertStandorte(${
|
|
292
|
+
logExecutionTime(this.logger, startTime, `convertStandorte(${cimModel.substations.size + cimModel.lines.size})`);
|
|
297
293
|
startTime = perf_hooks.performance.now();
|
|
298
294
|
const standortIDs = [...integral7Modell.integralStandorte.keys()];
|
|
299
|
-
/** Regelzone -> ControlArea */
|
|
300
|
-
/**if (standortIDs.length) await this.convertRegelzone(cimModel, defaultValuesConfig, standortIDs);
|
|
301
|
-
logExecutionTime(this.logger, startTime, `convertRegelzone(${cimModel.controlArea.size})`);*/
|
|
302
|
-
/** Schaltanlagen -> VoltageLevel */
|
|
303
295
|
if (standortIDs.length)
|
|
304
296
|
yield this.convertSchaltanlagen(cimModel, integral7Modell, standortIDs, defaultValuesConfig);
|
|
305
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${
|
|
297
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagen(${standortIDs.length})`);
|
|
306
298
|
startTime = perf_hooks.performance.now();
|
|
307
299
|
const schaltanlagenIDs = [...integral7Modell.integralSchaltanlagen.keys()];
|
|
308
300
|
/** Schaltanlagenabschnitte -> mappen auf bereits erstelltes VoltageLevel-Objekt (Schaltanlage) */
|
|
309
301
|
if (schaltanlagenIDs.length)
|
|
310
302
|
yield this.convertSchaltanlagenAbschnitte(cimModel, integral7Modell, schaltanlagenIDs);
|
|
311
|
-
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${
|
|
303
|
+
logExecutionTime(this.logger, startTime, `convertSchaltanlagenAbschnitte(${schaltanlagenIDs.length})`);
|
|
312
304
|
/** Schaltfelder -> Bay */
|
|
313
305
|
startTime = perf_hooks.performance.now();
|
|
314
306
|
const schaltanlagenAbschnittIDs = [...integral7Modell.integralSchaltanlagenAbschnitte.keys()];
|
|
@@ -425,34 +417,34 @@ class ConverterIntegral7 {
|
|
|
425
417
|
yield this.convertAsynchronmotor(cimModel, soSfKnoten, defaultValuesConfig);
|
|
426
418
|
logExecutionTime(this.logger, startTime, `convertAsynchronmotor`);
|
|
427
419
|
}
|
|
428
|
-
/** Einspeisungen -> EnergySources
|
|
420
|
+
/** Einspeisungen -> EnergySources */
|
|
429
421
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
430
|
-
startTime = performance.now();
|
|
431
|
-
yield this.convertEinspeisungen(cimModel,
|
|
422
|
+
startTime = perf_hooks.performance.now();
|
|
423
|
+
yield this.convertEinspeisungen(cimModel, soSfKnoten, objectMappingConfig, energySourceTypeMappingConfig);
|
|
432
424
|
logExecutionTime(this.logger, startTime, `convertEinspeisungen`);
|
|
433
425
|
}
|
|
434
426
|
/** Generatoren -> SynchronousMachine */
|
|
435
427
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
436
|
-
startTime = performance.now();
|
|
437
|
-
|
|
428
|
+
startTime = perf_hooks.performance.now();
|
|
429
|
+
// await this.convertGeneratoren(cimModel, soSfKnoten, energyTypesConfig);
|
|
438
430
|
logExecutionTime(this.logger, startTime, `convertGeneratoren`);
|
|
439
431
|
}
|
|
440
432
|
/** KWBlöcke -> SynchronousMachine */
|
|
441
433
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
442
434
|
startTime = perf_hooks.performance.now();
|
|
443
|
-
|
|
435
|
+
// await this.convertKraftwerksbloecke(cimModel, soSfKnoten, energyTypesConfig);
|
|
444
436
|
logExecutionTime(this.logger, startTime, `convertKraftwerksbloecke`);
|
|
445
437
|
}
|
|
446
438
|
/** Ersatzquerzweige -> ExternalNetworkInjection */
|
|
447
439
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
448
|
-
startTime = performance.now();
|
|
449
|
-
yield this.convertErsatzQuerZweige(cimModel,
|
|
440
|
+
startTime = perf_hooks.performance.now();
|
|
441
|
+
yield this.convertErsatzQuerZweige(cimModel, soSfKnoten, objectMappingConfig.Ersatzquerzweig.class);
|
|
450
442
|
logExecutionTime(this.logger, startTime, `convertErsatzQuerZweige`);
|
|
451
443
|
}
|
|
452
444
|
/** Randnetzeinspeisungen -> ExternalNetworkInjection */
|
|
453
445
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
454
|
-
startTime = performance.now();
|
|
455
|
-
yield this.convertBoundaryInjections(cimModel,
|
|
446
|
+
startTime = perf_hooks.performance.now();
|
|
447
|
+
yield this.convertBoundaryInjections(cimModel, soSfKnoten, objectMappingConfig.Randnetzeinspeisung.class);
|
|
456
448
|
logExecutionTime(this.logger, startTime, `convertBoundaryInjections`);
|
|
457
449
|
}
|
|
458
450
|
/** Kompensationsdrossel -> LinearShuntCompensator */
|
|
@@ -485,16 +477,16 @@ class ConverterIntegral7 {
|
|
|
485
477
|
/** Sonderfall mit Trafo
|
|
486
478
|
* Trafos müssen zuertst konvertiert werden. */
|
|
487
479
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
488
|
-
startTime = performance.now();
|
|
489
|
-
yield this.convertStatcom(cimModel,
|
|
480
|
+
startTime = perf_hooks.performance.now();
|
|
481
|
+
yield this.convertStatcom(cimModel, soSfKnoten);
|
|
490
482
|
logExecutionTime(this.logger, startTime, `convertStatcom`);
|
|
491
483
|
}
|
|
492
484
|
/** SVC -> StaticVarCompensator */
|
|
493
485
|
/** Sonderfall mit Trafo
|
|
494
486
|
* Trafos müssen zuertst konvertiert werden.*/
|
|
495
487
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
496
|
-
startTime = performance.now();
|
|
497
|
-
yield this.convertSVC(cimModel,
|
|
488
|
+
startTime = perf_hooks.performance.now();
|
|
489
|
+
yield this.convertSVC(cimModel, soSfKnoten);
|
|
498
490
|
logExecutionTime(this.logger, startTime, `convertSVC`);
|
|
499
491
|
}
|
|
500
492
|
/** HGÜ Knoten */
|
|
@@ -505,13 +497,13 @@ class ConverterIntegral7 {
|
|
|
505
497
|
/** HGÜ Kopfklassisch */
|
|
506
498
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
507
499
|
startTime = perf_hooks.performance.now();
|
|
508
|
-
|
|
500
|
+
// await this.convertCsConverterDC(cimModel, integral7Modell, soSfKnoten);
|
|
509
501
|
logExecutionTime(this.logger, startTime, `convertCsConverterDC`);
|
|
510
502
|
}
|
|
511
503
|
/** netz_hguekopfvsc */
|
|
512
504
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
513
505
|
startTime = perf_hooks.performance.now();
|
|
514
|
-
|
|
506
|
+
// await this.convertVsConverterDC(cimModel, integral7Modell, soSfKnoten);
|
|
515
507
|
logExecutionTime(this.logger, startTime, `convertVsConverterDC`);
|
|
516
508
|
}
|
|
517
509
|
/** HGÜ-Leitungen -> (DCLine, DCLineSegment)*/
|
|
@@ -623,7 +615,7 @@ class ConverterIntegral7 {
|
|
|
623
615
|
}
|
|
624
616
|
}
|
|
625
617
|
else {
|
|
626
|
-
|
|
618
|
+
//console.log(`Terminal without connection ${terminalUUID}`);
|
|
627
619
|
}
|
|
628
620
|
}
|
|
629
621
|
}
|
|
@@ -643,7 +635,7 @@ class ConverterIntegral7 {
|
|
|
643
635
|
}
|
|
644
636
|
}
|
|
645
637
|
else {
|
|
646
|
-
|
|
638
|
+
//console.log(`Terminal without connection ${terminalUUID}`);
|
|
647
639
|
}
|
|
648
640
|
}
|
|
649
641
|
}
|
|
@@ -663,7 +655,7 @@ class ConverterIntegral7 {
|
|
|
663
655
|
}
|
|
664
656
|
}
|
|
665
657
|
else {
|
|
666
|
-
|
|
658
|
+
//console.log(`Terminal without connection ${terminalUUID}`);
|
|
667
659
|
}
|
|
668
660
|
}
|
|
669
661
|
}
|
|
@@ -697,22 +689,19 @@ class ConverterIntegral7 {
|
|
|
697
689
|
}));
|
|
698
690
|
});
|
|
699
691
|
}
|
|
700
|
-
convertRegelzone(cimModel, defaultValuesConfig
|
|
692
|
+
convertRegelzone(cimModel, defaultValuesConfig) {
|
|
701
693
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
702
694
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.REGELZONE)) {
|
|
703
|
-
|
|
704
|
-
const
|
|
705
|
-
for (const i7Data of resultRz) {
|
|
695
|
+
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.REGELZONE, 0, 0, []));
|
|
696
|
+
for (const i7Data of result) {
|
|
706
697
|
const i7Schluessel = integral_prefix_1.REGELZONE_PRAEFIX + (0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
707
|
-
const ctrlarea = new ControlArea_1.ControlArea((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner), '_RZ']), (0, utils_2.ueberpruefeZeichenkette)(i7Data.kurzname), i7Schluessel);
|
|
708
|
-
ctrlarea.type = ControlAreaTypeKind_1.ControlAreaTypeKind.agc;
|
|
709
|
-
ctrlarea.netInterchange = 0;
|
|
698
|
+
const ctrlarea = new ControlArea_1.ControlArea((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner), '_RZ']), (0, utils_2.ueberpruefeZeichenkette)(i7Data.kurzname), i7Schluessel);
|
|
710
699
|
cimModel.addControlArea(ctrlarea);
|
|
711
700
|
this.addIdMapping(i7Data.id, ctrlarea.mrid, integral_sql_1.Integral7TableNames.REGELZONE);
|
|
712
701
|
}
|
|
713
702
|
}
|
|
714
703
|
else {
|
|
715
|
-
this.logger.debug(`
|
|
704
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.REGELZONE} ist nicht vorhanden.`);
|
|
716
705
|
}
|
|
717
706
|
});
|
|
718
707
|
}
|
|
@@ -759,10 +748,6 @@ class ConverterIntegral7 {
|
|
|
759
748
|
for (const i7Data of result) {
|
|
760
749
|
const i7name = (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', (0, utils_2.ueberpruefeZeichenkette)(i7Data.ukz), '_S'], 32);
|
|
761
750
|
const substation = new AMPRIONSubstation_1.AMPRIONSubstation((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), i7name, i7Data.kurzname, i7Data.kommentar, i7Data.stationsnummer, i7Data.ukz);
|
|
762
|
-
const i7Schluessel = integral_prefix_1.STANDORT_PRAEFIX +
|
|
763
|
-
i7Data.ukz +
|
|
764
|
-
integral_prefix_1.MITTIGER_PUNKT +
|
|
765
|
-
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
766
751
|
let subregion = cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
767
752
|
if (!subregion) {
|
|
768
753
|
const region = (0, utils_1.createIfNotExitsGeoregionByName)(cimModel, defaultValuesConfig.GeographicalRegion.name);
|
|
@@ -908,9 +893,8 @@ class ConverterIntegral7 {
|
|
|
908
893
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KNOTEN_SO, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KNOTEN_SO), standortIDs));
|
|
909
894
|
for (const i7Data of result) {
|
|
910
895
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
911
|
-
const vl = new VoltageLevel_1.VoltageLevel(
|
|
912
|
-
|
|
913
|
-
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
896
|
+
const vl = new VoltageLevel_1.VoltageLevel(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), i7Data.un.toString(), '_VL']), i7Data.kurzname);
|
|
897
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
914
898
|
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', rdfid.substring(0, 8), '_CN']), i7Data.kurzname, i7Data.kommentar);
|
|
915
899
|
connectivityNode.setConnectivityNodeContainer(vl);
|
|
916
900
|
vl.addConnectivityNode(connectivityNode);
|
|
@@ -962,8 +946,8 @@ class ConverterIntegral7 {
|
|
|
962
946
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KNOTEN)) {
|
|
963
947
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KNOTEN, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KNOTEN), standortIDs));
|
|
964
948
|
for (const i7Data of result) {
|
|
965
|
-
const
|
|
966
|
-
const dcNode = new DCNode_1.DCNode(
|
|
949
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
950
|
+
const dcNode = new DCNode_1.DCNode(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_DCCN'], 32, true), i7Data.kurzname);
|
|
967
951
|
cimModel.addDCNode(dcNode);
|
|
968
952
|
this.addIdMapping(i7Data.id, dcNode.mrid, integral_sql_1.Integral7TableNames.HGUE_KNOTEN);
|
|
969
953
|
}
|
|
@@ -983,8 +967,7 @@ class ConverterIntegral7 {
|
|
|
983
967
|
busbarSection.ipMax = i7Data.limit_ip;
|
|
984
968
|
// die Sammelschienen sind nicht aggregiert.
|
|
985
969
|
busbarSection.aggregate = false;
|
|
986
|
-
|
|
987
|
-
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid_cn, this.objectMappingConfig.standardiseUuid);
|
|
970
|
+
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
988
971
|
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_' + i7Data.pos.toString(), '_' + rdfid.substring(0, 8), '_CN'], 32, true), i7Data.kurzname);
|
|
989
972
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Schaltanlagenabschnitt.id));
|
|
990
973
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
@@ -994,14 +977,14 @@ class ConverterIntegral7 {
|
|
|
994
977
|
connectivityNode.connectivityNodeContainer = voltageLevel;
|
|
995
978
|
voltageLevel.addConnectivityNode(connectivityNode);
|
|
996
979
|
// umax
|
|
997
|
-
voltageLevel.highVoltageLimit =
|
|
980
|
+
voltageLevel.highVoltageLimit = i7Data.umax;
|
|
998
981
|
// umin
|
|
999
|
-
voltageLevel.lowVoltageLimit =
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
982
|
+
voltageLevel.lowVoltageLimit = i7Data.umin;
|
|
983
|
+
const i7Schluessel = voltageLevel.description +
|
|
984
|
+
integral_prefix_1.SAMMELSCHIENENABSCHNITT_PRAEFIX +
|
|
985
|
+
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
986
|
+
busbarSection.description = i7Schluessel;
|
|
987
|
+
connectivityNode.description = i7Schluessel;
|
|
1005
988
|
/** Spannungsband */
|
|
1006
989
|
integral7.targetVoltages.set(i7Data.id, { usoll: i7Data.usoll, umin: i7Data.umin, umax: i7Data.umax });
|
|
1007
990
|
// TODO VoltageLimits?
|
|
@@ -1142,19 +1125,13 @@ class ConverterIntegral7 {
|
|
|
1142
1125
|
cimModel.addMultiplierFactor(mf);
|
|
1143
1126
|
load.multiplierFactorUUID = mf.getUUID();
|
|
1144
1127
|
}
|
|
1145
|
-
if (load.getUUID() === '7c1d4120-fdaf-4bc1-aba1-9e8e76aa7a3b') {
|
|
1146
|
-
const stop = true;
|
|
1147
|
-
}
|
|
1148
1128
|
/** SSH */
|
|
1149
|
-
const powerData = (0, utils_2.
|
|
1150
|
-
// const powerDatav2 = getActiveReactivePower2(i7Data, mf);
|
|
1129
|
+
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
1151
1130
|
load.p = powerData[0];
|
|
1152
1131
|
load.q = powerData[1];
|
|
1153
|
-
/**
|
|
1132
|
+
/** Extension */
|
|
1154
1133
|
load.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1155
1134
|
load.q_mf = powerData[3] ? powerData[3] : undefined;
|
|
1156
|
-
load.cos_phi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1157
|
-
load.normallyInService = inBetrieb;
|
|
1158
1135
|
//TODO
|
|
1159
1136
|
/* conformLoad.pFixed = conformLoad.p;
|
|
1160
1137
|
conformLoad.qFixed = conformLoad.q; */
|
|
@@ -1172,8 +1149,9 @@ class ConverterIntegral7 {
|
|
|
1172
1149
|
}
|
|
1173
1150
|
});
|
|
1174
1151
|
}
|
|
1175
|
-
convertEinspeisungen(cimModel,
|
|
1152
|
+
convertEinspeisungen(cimModel, knotenSfIDs, objectMappingConfig, energySourceTypeMappingConfig) {
|
|
1176
1153
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1154
|
+
const targetConfig = objectMappingConfig.Einspeisung;
|
|
1177
1155
|
const targetClass = objectMappingConfig.Einspeisung.class;
|
|
1178
1156
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.EINSPEISUNG)) {
|
|
1179
1157
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.EINSPEISUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.EINSPEISUNG), knotenSfIDs));
|
|
@@ -1183,7 +1161,7 @@ class ConverterIntegral7 {
|
|
|
1183
1161
|
break;
|
|
1184
1162
|
}
|
|
1185
1163
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1186
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel,
|
|
1164
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1187
1165
|
break;
|
|
1188
1166
|
}
|
|
1189
1167
|
case cim_class_names_1.ClassNames.EnergySource: {
|
|
@@ -1191,17 +1169,17 @@ class ConverterIntegral7 {
|
|
|
1191
1169
|
const filtered = result.filter(it => it.spannungsgeregelt && it.einspprio === config.prio);
|
|
1192
1170
|
switch (config.class) {
|
|
1193
1171
|
case 'ExternalNetworkInjection': {
|
|
1194
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel,
|
|
1172
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, filtered);
|
|
1195
1173
|
break;
|
|
1196
1174
|
}
|
|
1197
1175
|
case 'SynchronousMachine': {
|
|
1198
|
-
yield this.convertEnergySourceToSynchronousMachine(cimModel,
|
|
1176
|
+
yield this.convertEnergySourceToSynchronousMachine(cimModel, filtered);
|
|
1199
1177
|
break;
|
|
1200
1178
|
}
|
|
1201
1179
|
}
|
|
1202
1180
|
}
|
|
1203
1181
|
const i7EnergySourceResults = result.filter(it => !it.spannungsgeregelt);
|
|
1204
|
-
yield this.convertEinspeisungen2EnergySource(cimModel,
|
|
1182
|
+
yield this.convertEinspeisungen2EnergySource(cimModel, i7EnergySourceResults, energySourceTypeMappingConfig);
|
|
1205
1183
|
const others = result.filter(it => !it.spannungsgeregelt && !it.einspprio);
|
|
1206
1184
|
console.log(`convertEinspeisungen nicht konvertierte Objekte ${others.length}`);
|
|
1207
1185
|
break;
|
|
@@ -1213,21 +1191,21 @@ class ConverterIntegral7 {
|
|
|
1213
1191
|
}
|
|
1214
1192
|
});
|
|
1215
1193
|
}
|
|
1216
|
-
convertErsatzQuerZweige(cimModel,
|
|
1194
|
+
convertErsatzQuerZweige(cimModel, knotenSfIDs, targetClass) {
|
|
1217
1195
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1218
1196
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG)) {
|
|
1219
1197
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.ERSATZQUERZWEIG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG), knotenSfIDs));
|
|
1220
1198
|
switch (targetClass) {
|
|
1221
1199
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1222
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel,
|
|
1200
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1223
1201
|
break;
|
|
1224
1202
|
}
|
|
1225
1203
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1226
|
-
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel,
|
|
1204
|
+
yield this.convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result);
|
|
1227
1205
|
break;
|
|
1228
1206
|
}
|
|
1229
1207
|
default: {
|
|
1230
|
-
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel,
|
|
1208
|
+
yield this.convertErsatzQuerZweige2EquivalentInjection(cimModel, result);
|
|
1231
1209
|
}
|
|
1232
1210
|
}
|
|
1233
1211
|
}
|
|
@@ -1236,7 +1214,7 @@ class ConverterIntegral7 {
|
|
|
1236
1214
|
}
|
|
1237
1215
|
});
|
|
1238
1216
|
}
|
|
1239
|
-
convertGeneratoren(cimModel,
|
|
1217
|
+
convertGeneratoren(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1240
1218
|
var _a;
|
|
1241
1219
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1242
1220
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
@@ -1246,7 +1224,6 @@ class ConverterIntegral7 {
|
|
|
1246
1224
|
const genType = this.generatorTypen.get(i7Data.nametyp);
|
|
1247
1225
|
const synchronousMachine = new INTEGRALSynchronousMachine_1.INTEGRALSynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SM'], 32, true), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
1248
1226
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1249
|
-
const cosPhi = (0, parser_utils_1.isNumericI7)(i7Data.cos_phi) ? (0, parser_utils_1.convertToNumberI7)(i7Data.cos_phi) : undefined;
|
|
1250
1227
|
const maxP = (0, parser_utils_1.isNumericI7)(i7Data.p_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_max) : undefined;
|
|
1251
1228
|
const minP = (0, parser_utils_1.isNumericI7)(i7Data.p_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_min) : undefined;
|
|
1252
1229
|
const mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
@@ -1257,9 +1234,7 @@ class ConverterIntegral7 {
|
|
|
1257
1234
|
const isRotatingPhaseShifter = (mf !== undefined && maxP === 0 && minP === 0) || flagCondenserOperationMode;
|
|
1258
1235
|
const isGenerator = (maxP > 0 || maxP === undefined);
|
|
1259
1236
|
const isMotor = (minP < 0 || minP === undefined);
|
|
1260
|
-
/**AMPI7 profile */
|
|
1261
1237
|
synchronousMachine.nameprimaertyp = i7Data.nameprimaertyp !== undefined ? i7Data.nameprimaertyp : (genType !== undefined ? genType.nameprimaertyp : undefined);
|
|
1262
|
-
synchronousMachine.cos_phi = cosPhi;
|
|
1263
1238
|
/** Set machine type */
|
|
1264
1239
|
if (isRotatingPhaseShifter && isGenerator && isMotor) {
|
|
1265
1240
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generatorOrCondenserOrMotor;
|
|
@@ -1328,24 +1303,16 @@ class ConverterIntegral7 {
|
|
|
1328
1303
|
}
|
|
1329
1304
|
const prio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
1330
1305
|
synchronousMachine.referencePriority = prio;
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
maxQ = maxQ ? maxQ : minQ;
|
|
1338
|
-
minQ = minQ ? minQ : maxQ;
|
|
1339
|
-
maxQvonPmax = maxQvonPmax ? maxQvonPmax : maxQvonPmin;
|
|
1340
|
-
minQvonPmax = minQvonPmax ? minQvonPmax : minQvonPmin;
|
|
1341
|
-
maxQvonPmin = maxQvonPmin ? maxQvonPmin : maxQvonPmax;
|
|
1342
|
-
minQvonPmin = minQvonPmin ? minQvonPmin : minQvonPmax;
|
|
1306
|
+
const maxQ = (0, parser_utils_1.isNumericI7)(i7Data.q_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_max) : undefined;
|
|
1307
|
+
const minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
1308
|
+
const maxQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmax) : undefined;
|
|
1309
|
+
const minQvonPmax = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmax) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmax) : undefined;
|
|
1310
|
+
const maxQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmax_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmax_von_pmin) : undefined;
|
|
1311
|
+
const minQvonPmin = (0, parser_utils_1.isNumericI7)(i7Data.qmin_von_pmin) ? (0, parser_utils_1.convertToNumberI7)(i7Data.qmin_von_pmin) : undefined;
|
|
1343
1312
|
synchronousMachine.maxQ = maxQ ? maxQ : maxQvonPmax;
|
|
1344
1313
|
synchronousMachine.minQ = minQ ? minQ : minQvonPmin;
|
|
1345
1314
|
const pType = (genType === null || genType === void 0 ? void 0 : genType.sr) * (genType === null || genType === void 0 ? void 0 : genType.cosphir);
|
|
1346
1315
|
const qType = Math.sqrt(Math.pow(genType === null || genType === void 0 ? void 0 : genType.sr, 2) - Math.pow(pType, 2));
|
|
1347
|
-
// AMP I7 Profil
|
|
1348
|
-
synchronousMachine.cos_phi = i7Data.cos_phi;
|
|
1349
1316
|
// SSH Profil
|
|
1350
1317
|
synchronousMachine.setActivePower(p * -1); //convert to load sign system
|
|
1351
1318
|
synchronousMachine.setReactivePower(q * -1); //convert to load sign system
|
|
@@ -1372,21 +1339,21 @@ class ConverterIntegral7 {
|
|
|
1372
1339
|
/** EQ-SC */
|
|
1373
1340
|
synchronousMachine.earthing = ((_a = i7Data.erdung) === null || _a === void 0 ? void 0 : _a.length) > 0 && i7Data.erdung != 'isoliert' ? true : false;
|
|
1374
1341
|
synchronousMachine.r = (0, parser_utils_1.isNumericI7)(i7Data.rg) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rg) : ((0, parser_utils_1.isNumericI7)(genType === null || genType === void 0 ? void 0 : genType.rg) ? (0, parser_utils_1.convertToNumberI7)(genType.rg) : undefined);
|
|
1375
|
-
synchronousMachine.r0 = 0;
|
|
1342
|
+
synchronousMachine.r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r0) : undefined;
|
|
1376
1343
|
synchronousMachine.r2 = 0;
|
|
1377
|
-
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1344
|
+
synchronousMachine.x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : undefined;
|
|
1378
1345
|
synchronousMachine.x2 = 0;
|
|
1379
1346
|
synchronousMachine.satDirectSubtransX = (0, parser_utils_1.isNumericI7)(i7Data.xd2s) ? (0, parser_utils_1.convertToNumberI7)(i7Data.xd2s) : ((0, parser_utils_1.isNumericI7)(genType === null || genType === void 0 ? void 0 : genType.xd2s) ? (0, parser_utils_1.convertToNumberI7)(genType.xd2s) : undefined);
|
|
1380
1347
|
// synchronousMachine.earthingStarPointR
|
|
1381
1348
|
// synchronousMachine.earthingStarPointX
|
|
1382
|
-
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1349
|
+
synchronousMachine.ikk = (0, parser_utils_1.isNumericI7)(i7Data.sk_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.sk_min) : ((0, parser_utils_1.isNumericI7)(i7Data.sk_akt) ? (0, parser_utils_1.convertToNumberI7)(i7Data.sk_akt) : ((0, parser_utils_1.isNumericI7)(i7Data.sk_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.sk_max) : undefined));
|
|
1383
1350
|
// synchronousMachine.mu: number;
|
|
1384
1351
|
// synchronousMachine.satDirectSyncX: number;
|
|
1385
1352
|
// synchronousMachine.satDirectTransX: number;
|
|
1386
1353
|
// synchronousMachine.shortCircuitRotorType: ShortCircuitRotorKind;
|
|
1387
1354
|
// synchronousMachine.voltageRegulationRange: number;
|
|
1388
1355
|
/** Create ReactiveCapabilityCurves */
|
|
1389
|
-
if (minP
|
|
1356
|
+
if (minP && maxP && minQvonPmin && maxQvonPmax) {
|
|
1390
1357
|
const reactiveCapabilityCurve = new ReactiveCapabilityCurve_1.ReactiveCapabilityCurve((0, parser_utils_1.getUUID)(i7Data.guid_rcc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)(['CurveData', synchronousMachine.mrid, '_RCC']));
|
|
1391
1358
|
reactiveCapabilityCurve.curveStyle = CurveStyle_1.CurveStyle.straightLineYValues;
|
|
1392
1359
|
reactiveCapabilityCurve.xUnit = UnitSymbol_1.UnitSymbol.W;
|
|
@@ -1409,6 +1376,26 @@ class ConverterIntegral7 {
|
|
|
1409
1376
|
cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
1410
1377
|
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
1411
1378
|
}
|
|
1379
|
+
/** RegulatingControl */
|
|
1380
|
+
let regulatingControl = undefined;
|
|
1381
|
+
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
1382
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1383
|
+
case 1: {
|
|
1384
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl((0, parser_utils_1.getUUID)(i7Data.guid_rc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)(['GEN'], 32, true));
|
|
1385
|
+
regulatingControl.targetValue = usoll !== undefined ? usoll : synchronousMachine.ratedU;
|
|
1386
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1387
|
+
regulatingControl.discrete = false;
|
|
1388
|
+
regulatingControl.enabled = true;
|
|
1389
|
+
synchronousMachine.controlEnabled = true;
|
|
1390
|
+
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
1391
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.getUUID();
|
|
1392
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
default: {
|
|
1396
|
+
synchronousMachine.controlEnabled = false;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1412
1399
|
/** GeneratingUnit section*/
|
|
1413
1400
|
let generatingUnit;
|
|
1414
1401
|
if (synchronousMachine.type !== SynchronousMachineKind_1.SynchronousMachineKind.condenser) {
|
|
@@ -1499,7 +1486,7 @@ class ConverterIntegral7 {
|
|
|
1499
1486
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1500
1487
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1501
1488
|
}
|
|
1502
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data,
|
|
1489
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl, generatingUnit);
|
|
1503
1490
|
const smtcr = new SynchronousMachineTimeConstantReactance_1.SynchronousMachineTimeConstantReactance(common_utils_1.CommonUtils.generateUUID(), `smtcr_${synchronousMachine.name}`);
|
|
1504
1491
|
smtcr.enabled = inBetrieb;
|
|
1505
1492
|
// TODO: default value?
|
|
@@ -1543,9 +1530,12 @@ class ConverterIntegral7 {
|
|
|
1543
1530
|
}
|
|
1544
1531
|
});
|
|
1545
1532
|
}
|
|
1546
|
-
convertEnergySourceToSynchronousMachine(cimModel,
|
|
1533
|
+
convertEnergySourceToSynchronousMachine(cimModel, result) {
|
|
1547
1534
|
for (const i7Data of result) {
|
|
1548
1535
|
try {
|
|
1536
|
+
if (i7Data.guid.toLowerCase().includes('_e11f3fe9-0b7a-4ff1-a0dc-214c4c3fd8cc')) {
|
|
1537
|
+
console.log();
|
|
1538
|
+
}
|
|
1549
1539
|
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SM'], 32, true), i7Data.kurzname);
|
|
1550
1540
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
1551
1541
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
@@ -1568,7 +1558,28 @@ class ConverterIntegral7 {
|
|
|
1568
1558
|
const usoll = +i7Data.usoll;
|
|
1569
1559
|
synchronousMachine.ratedU = usoll;
|
|
1570
1560
|
synchronousMachine.aggregate = true;
|
|
1571
|
-
|
|
1561
|
+
/** RegulatingControl */
|
|
1562
|
+
let regulatingControl = undefined;
|
|
1563
|
+
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
1564
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1565
|
+
case 1: {
|
|
1566
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)(['GEN'], 32, true));
|
|
1567
|
+
regulatingControl.targetValue = usoll !== undefined ? usoll : synchronousMachine.ratedU;
|
|
1568
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1569
|
+
regulatingControl.discrete = false;
|
|
1570
|
+
regulatingControl.enabled = true;
|
|
1571
|
+
synchronousMachine.controlEnabled = true;
|
|
1572
|
+
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
1573
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.getUUID();
|
|
1574
|
+
synchronousMachine.regulatingControl = regulatingControl;
|
|
1575
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
default: {
|
|
1579
|
+
synchronousMachine.controlEnabled = false;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl);
|
|
1572
1583
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1573
1584
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.GENERATOR);
|
|
1574
1585
|
}
|
|
@@ -1584,48 +1595,41 @@ class ConverterIntegral7 {
|
|
|
1584
1595
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getNetzQuery)(integral_sql_1.I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs));
|
|
1585
1596
|
for (const i7Data of result) {
|
|
1586
1597
|
const assetType = this.asynchronmotorTypen.get(i7Data.nametyp);
|
|
1587
|
-
const
|
|
1588
|
-
const sr = (0, parser_utils_1.isNumericI7)(i7Data.sr) ? i7Data.sr : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.sr) ? assetType === null || assetType === void 0 ? void 0 : assetType.sr : undefined);
|
|
1589
|
-
const wirkungsgrad = (0, parser_utils_1.isNumericI7)(i7Data.wirkungsgrad) ? i7Data.wirkungsgrad : undefined;
|
|
1590
|
-
const cosphir = (0, parser_utils_1.isNumericI7)(i7Data.cosphir) ? i7Data.cosphir : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.cosphir) ? assetType === null || assetType === void 0 ? void 0 : assetType.cosphir : undefined);
|
|
1591
|
-
//AMPI7 profile content
|
|
1592
|
-
const asynchronousMachine = new INTEGRALAsynchronousMachine_1.INTEGRALAsynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_AM']), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1598
|
+
const asynchronousMachine = new INTEGRALAsynchronousMachine_1.INTEGRALAsynchronousMachine((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_AM']), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1593
1599
|
let mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
1594
1600
|
if (mf) {
|
|
1595
1601
|
cimModel.addMultiplierFactor(mf);
|
|
1596
1602
|
asynchronousMachine.multiplierFactorUUID = mf.getUUID();
|
|
1597
1603
|
}
|
|
1598
|
-
asynchronousMachine.
|
|
1599
|
-
|
|
1600
|
-
asynchronousMachine.
|
|
1604
|
+
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind_1.AsynchronousMachineKind.motor;
|
|
1605
|
+
asynchronousMachine.efficiency = i7Data.wirkungsgrad * 100;
|
|
1606
|
+
asynchronousMachine.iaIrRatio = (0, parser_utils_1.isNumericI7)(i7Data.ilr_ir) ? i7Data.ilr_ir : assetType === null || assetType === void 0 ? void 0 : assetType.ilr_ir;
|
|
1607
|
+
//asynchronousMachine.rxLockedRotorRatio = 0;
|
|
1608
|
+
asynchronousMachine.polePairNumber = (0, parser_utils_1.isNumericI7)(i7Data.polpaarz) ? i7Data.polpaarz : assetType === null || assetType === void 0 ? void 0 : assetType.polpaarz;
|
|
1609
|
+
asynchronousMachine.ratedMechanicalPower = (0, parser_utils_1.isNumericI7)(i7Data.p_mech) ? i7Data.p_mech : assetType === null || assetType === void 0 ? void 0 : assetType.p_mech;
|
|
1610
|
+
asynchronousMachine.ratedPowerFactor = (0, parser_utils_1.isNumericI7)(i7Data.cos_phir) ? i7Data.cos_phir : assetType === null || assetType === void 0 ? void 0 : assetType.cosphir;
|
|
1601
1611
|
asynchronousMachine.ratedS = (0, parser_utils_1.isNumericI7)(i7Data.sr) ? i7Data.sr : assetType === null || assetType === void 0 ? void 0 : assetType.sr;
|
|
1602
1612
|
asynchronousMachine.ratedU = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? i7Data.ur : assetType === null || assetType === void 0 ? void 0 : assetType.ur;
|
|
1603
|
-
//EQ short circuit profile content
|
|
1604
|
-
asynchronousMachine.converterFedDrive = false;
|
|
1605
|
-
asynchronousMachine.efficiency = wirkungsgrad * 100;
|
|
1606
|
-
asynchronousMachine.iaIrRatio = (0, parser_utils_1.isNumericI7)(i7Data.ilr_ir) ? i7Data.ilr_ir : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.ilr_ir) ? assetType.ilr_ir : undefined);
|
|
1607
|
-
asynchronousMachine.polePairNumber = (0, parser_utils_1.isNumericI7)(i7Data.polpaarz) ? i7Data.polpaarz : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.polpaarz) ? assetType.polpaarz : undefined);
|
|
1608
|
-
asynchronousMachine.ratedMechanicalPower = (0, parser_utils_1.isNumericI7)(i7Data.p_mech) ? i7Data.p_mech : ((0, parser_utils_1.isNumericI7)(assetType === null || assetType === void 0 ? void 0 : assetType.p_mech) ? i7Data.p_mech : (0, utils_2.getPMech)(sr, wirkungsgrad, cosphir));
|
|
1609
|
-
asynchronousMachine.reversible = false;
|
|
1610
|
-
//SSH profile content
|
|
1611
1613
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
1612
1614
|
const p = powerData[0];
|
|
1613
1615
|
const q = powerData[1];
|
|
1614
1616
|
asynchronousMachine.setActivePower(p);
|
|
1615
1617
|
asynchronousMachine.setReactivePower(q);
|
|
1616
|
-
asynchronousMachine.asynchronousMachineType = AsynchronousMachineKind_1.AsynchronousMachineKind.motor;
|
|
1617
|
-
asynchronousMachine.controlEnabled = false;
|
|
1618
|
-
//AMPI7 profile content
|
|
1619
1618
|
asynchronousMachine.p_mf = powerData[2] ? powerData[2] : undefined;
|
|
1620
1619
|
asynchronousMachine.q_mf = powerData[3] ? powerData[3] : undefined;
|
|
1621
|
-
|
|
1620
|
+
asynchronousMachine.controlEnabled = false;
|
|
1621
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : true;
|
|
1622
|
+
asynchronousMachine.normallyInService = inBetrieb;
|
|
1622
1623
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1623
1624
|
if (connectivityNode) {
|
|
1624
1625
|
(0, util_create_1.createConnection)(cimModel, asynchronousMachine, connectivityNode, PhaseCode_1.PhaseCode.ABC);
|
|
1626
|
+
//const equipmentContainer = determineEquipmentContainer('VoltageLevel', this.cimModel, this.cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()) as EquipmentContainer);
|
|
1625
1627
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(connectivityNode.getConnectivityNodeContainerUUID()));
|
|
1626
1628
|
if (equipmentContainer) {
|
|
1627
1629
|
equipmentContainer.addEquipment(asynchronousMachine);
|
|
1628
1630
|
asynchronousMachine.equipmentContainer = equipmentContainer;
|
|
1631
|
+
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1632
|
+
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1629
1633
|
}
|
|
1630
1634
|
else {
|
|
1631
1635
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
@@ -1634,8 +1638,6 @@ class ConverterIntegral7 {
|
|
|
1634
1638
|
else {
|
|
1635
1639
|
this.logger.debug(`AsynchronousMachine ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1636
1640
|
}
|
|
1637
|
-
cimModel.addAsynchronousMachine(asynchronousMachine);
|
|
1638
|
-
this.addIdMapping(i7Data.id, asynchronousMachine.mrid, integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR);
|
|
1639
1641
|
}
|
|
1640
1642
|
}
|
|
1641
1643
|
else {
|
|
@@ -1643,7 +1645,7 @@ class ConverterIntegral7 {
|
|
|
1643
1645
|
}
|
|
1644
1646
|
});
|
|
1645
1647
|
}
|
|
1646
|
-
convertKraftwerksbloecke(cimModel,
|
|
1648
|
+
convertKraftwerksbloecke(cimModel, knotenSfIDs, energyTypesConfig) {
|
|
1647
1649
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1648
1650
|
// Generatoren werden als GeneratingUnit und SynchronousMachine abgebildet
|
|
1649
1651
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KWBLOCK)) {
|
|
@@ -1700,6 +1702,19 @@ class ConverterIntegral7 {
|
|
|
1700
1702
|
// synchronousMachine.x0 = i7Data.x0k;
|
|
1701
1703
|
// synchronousMachine.x2 = 0;
|
|
1702
1704
|
// synchronousMachine.satDirectSubtransX = i7Data.xd2s;
|
|
1705
|
+
// RegulatingControl
|
|
1706
|
+
const regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), `RC_KWBlock ${i7Data.id}`);
|
|
1707
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1708
|
+
// TODO Welche Modi sind möglich?
|
|
1709
|
+
case 1: {
|
|
1710
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
default: {
|
|
1714
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.timeScheduled;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1703
1718
|
// GeneratingUnit
|
|
1704
1719
|
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
1705
1720
|
/** Wenn ein Config für den Primärenergietyp vorhanden*/
|
|
@@ -1770,18 +1785,8 @@ class ConverterIntegral7 {
|
|
|
1770
1785
|
// generatingUnit.totalEfficiency
|
|
1771
1786
|
generatingUnit.addRotatingMachine(synchronousMachine);
|
|
1772
1787
|
synchronousMachine.generatingUnitUUID = generatingUnit.mrid;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
// TODO Welche Modi sind möglich?
|
|
1776
|
-
case 1: {
|
|
1777
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1778
|
-
break;
|
|
1779
|
-
}
|
|
1780
|
-
default: {
|
|
1781
|
-
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.timeScheduled;
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
1788
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, synchronousMachine, i7Data, regulatingControl, generatingUnit);
|
|
1789
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
1785
1790
|
cimModel.addGeneratingUnit(generatingUnit);
|
|
1786
1791
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1787
1792
|
this.addIdMapping(i7Data.id, synchronousMachine.mrid, integral_sql_1.Integral7TableNames.KWBLOCK);
|
|
@@ -1789,7 +1794,7 @@ class ConverterIntegral7 {
|
|
|
1789
1794
|
}
|
|
1790
1795
|
});
|
|
1791
1796
|
}
|
|
1792
|
-
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel,
|
|
1797
|
+
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, result) {
|
|
1793
1798
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1794
1799
|
for (const i7Data of result) {
|
|
1795
1800
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_ENI']), i7Data.kurzname);
|
|
@@ -1817,14 +1822,14 @@ class ConverterIntegral7 {
|
|
|
1817
1822
|
externalNetworkInjection.minZ0ToZ1Ratio
|
|
1818
1823
|
externalNetworkInjection.p
|
|
1819
1824
|
externalNetworkInjection.q*/
|
|
1820
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data
|
|
1825
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data);
|
|
1821
1826
|
// ToDo PSRType
|
|
1822
1827
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1823
1828
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1824
1829
|
}
|
|
1825
1830
|
});
|
|
1826
1831
|
}
|
|
1827
|
-
convertErsatzQuerZweige2EquivalentInjection(cimModel,
|
|
1832
|
+
convertErsatzQuerZweige2EquivalentInjection(cimModel, result) {
|
|
1828
1833
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1829
1834
|
for (const i7Data of result) {
|
|
1830
1835
|
const einspeisePrio = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : 1;
|
|
@@ -1837,10 +1842,10 @@ class ConverterIntegral7 {
|
|
|
1837
1842
|
const p_ein = (0, parser_utils_1.isNumericI7)(i7Data.p_ein) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_ein) * -1 : undefined; //Einspeisung: Erzeugerzählpfeilsystem, d.h. eine Übersetzung ins Verbraucherzählpfeilsystem wird durchgeführt
|
|
1838
1843
|
const q_ein = (0, parser_utils_1.isNumericI7)(i7Data.q_ein) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_ein) * -1 : undefined; //Einspeisung: Erzeugerzählpfeilsystem, d.h. eine Übersetzung ins Verbraucherzählpfeilsystem wird durchgeführt
|
|
1839
1844
|
const kr = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
1840
|
-
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.
|
|
1845
|
+
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r1) : undefined;
|
|
1841
1846
|
const r1 = (0, parser_utils_1.isNumericI7)(i7Data.r1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r1) : undefined;
|
|
1842
|
-
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1843
|
-
const x1 = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
1847
|
+
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.r1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r1) : undefined;
|
|
1848
|
+
const x1 = (0, parser_utils_1.isNumericI7)(i7Data.r1) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r1) : undefined;
|
|
1844
1849
|
const equivalentInjection = new INTEGRALEquivalentInjection_1.INTEGRALEquivalentInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_EI']), i7Data.kurzname);
|
|
1845
1850
|
/** Export Extended Ward equivalent with voltage regulation */
|
|
1846
1851
|
if (flag_lfl && !flag_ks && usoll && (r_ext !== 0 || x_ext !== 0)) {
|
|
@@ -1857,19 +1862,6 @@ class ConverterIntegral7 {
|
|
|
1857
1862
|
equivalentInjection.x0 = 1e9;
|
|
1858
1863
|
equivalentInjection.x2 = 1e9;
|
|
1859
1864
|
}
|
|
1860
|
-
/** Export Extended Ward equivalent with no voltage regulation */
|
|
1861
|
-
else if ((r_ext !== 0 || x_ext !== 0)) {
|
|
1862
|
-
equivalentInjection.regulationCapability = false;
|
|
1863
|
-
equivalentInjection.rExt = r_ext;
|
|
1864
|
-
equivalentInjection.r = 1e9;
|
|
1865
|
-
equivalentInjection.r0 = 1e9;
|
|
1866
|
-
equivalentInjection.r2 = 1e9;
|
|
1867
|
-
equivalentInjection.xExt = x_ext;
|
|
1868
|
-
equivalentInjection.x = 1e9;
|
|
1869
|
-
equivalentInjection.x0 = 1e9;
|
|
1870
|
-
equivalentInjection.x2 = 1e9;
|
|
1871
|
-
}
|
|
1872
|
-
/** Export equivalent with only short circuit computation capability */
|
|
1873
1865
|
else if (!flag_lfl && flag_ks) {
|
|
1874
1866
|
equivalentInjection.regulationCapability = false;
|
|
1875
1867
|
equivalentInjection.r = r1;
|
|
@@ -1890,6 +1882,17 @@ class ConverterIntegral7 {
|
|
|
1890
1882
|
equivalentInjection.x0 = x0;
|
|
1891
1883
|
equivalentInjection.x2 = x1;
|
|
1892
1884
|
}
|
|
1885
|
+
else if ((r_ext !== 0 || x_ext !== 0)) {
|
|
1886
|
+
equivalentInjection.regulationCapability = false;
|
|
1887
|
+
equivalentInjection.rExt = r_ext;
|
|
1888
|
+
equivalentInjection.r = 1e9;
|
|
1889
|
+
equivalentInjection.r0 = 1e9;
|
|
1890
|
+
equivalentInjection.r2 = 1e9;
|
|
1891
|
+
equivalentInjection.xExt = x_ext;
|
|
1892
|
+
equivalentInjection.x = 1e9;
|
|
1893
|
+
equivalentInjection.x0 = 1e9;
|
|
1894
|
+
equivalentInjection.x2 = 1e9;
|
|
1895
|
+
}
|
|
1893
1896
|
else {
|
|
1894
1897
|
equivalentInjection.regulationCapability = false;
|
|
1895
1898
|
equivalentInjection.r = 1e9;
|
|
@@ -1905,30 +1908,30 @@ class ConverterIntegral7 {
|
|
|
1905
1908
|
equivalentInjection.einspeisePrio = einspeisePrio;
|
|
1906
1909
|
equivalentInjection.kr = kr;
|
|
1907
1910
|
equivalentInjection.aggregate = true; // default Wert im I7 Export. Not needed for EquivalentInjection, BusbarSection, PowerTransformerEnd, EquivalentShunt, EquivalentBranch
|
|
1908
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data
|
|
1911
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1909
1912
|
// ToDo PSRType
|
|
1910
1913
|
cimModel.addEquivalentInjection(equivalentInjection);
|
|
1911
1914
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG);
|
|
1912
1915
|
}
|
|
1913
1916
|
});
|
|
1914
1917
|
}
|
|
1915
|
-
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine
|
|
1916
|
-
convertBoundaryInjections(cimModel,
|
|
1918
|
+
//TODO: Die Randnetzeinspeisung ist nach CGMES 2.4.15 eine equivalentInejction, d.h. die Fallunterscheidung kann ausbleiben?...Diskussion mit Andreas
|
|
1919
|
+
convertBoundaryInjections(cimModel, knotenSfIDs, targetClass) {
|
|
1917
1920
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1918
1921
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.BOUNDARYINJECTION)) {
|
|
1919
1922
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.BOUNDARYINJECTION, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.BOUNDARYINJECTION), knotenSfIDs));
|
|
1920
1923
|
switch (targetClass) {
|
|
1921
1924
|
case cim_class_names_1.ClassNames.EquivalentInjection: {
|
|
1922
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel,
|
|
1925
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1923
1926
|
break;
|
|
1924
1927
|
}
|
|
1925
1928
|
case cim_class_names_1.ClassNames.ExternalNetworkInjection: {
|
|
1926
|
-
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel,
|
|
1929
|
+
yield this.convertEinspeisungen2ExternalNetworkInjection(cimModel, result);
|
|
1927
1930
|
break;
|
|
1928
1931
|
}
|
|
1929
1932
|
default: {
|
|
1930
1933
|
//BoundaryInjections are always exported to EquivalentInjection objects for Boundary profile
|
|
1931
|
-
yield this.convertBoundaryInjections2EquivalentInjection(cimModel,
|
|
1934
|
+
yield this.convertBoundaryInjections2EquivalentInjection(cimModel, result);
|
|
1932
1935
|
}
|
|
1933
1936
|
}
|
|
1934
1937
|
}
|
|
@@ -1937,7 +1940,7 @@ class ConverterIntegral7 {
|
|
|
1937
1940
|
}
|
|
1938
1941
|
});
|
|
1939
1942
|
}
|
|
1940
|
-
convertBoundaryInjections2EquivalentInjection(cimModel,
|
|
1943
|
+
convertBoundaryInjections2EquivalentInjection(cimModel, result) {
|
|
1941
1944
|
for (const i7Data of result) {
|
|
1942
1945
|
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), 'BD_EI']), i7Data.kurzname);
|
|
1943
1946
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -1964,7 +1967,7 @@ class ConverterIntegral7 {
|
|
|
1964
1967
|
/** Spannung in kilo*/
|
|
1965
1968
|
// regulatingControl.targetValueUnitMultiplier = UnitMultiplier.k;
|
|
1966
1969
|
// equivalentInjection.regulatingControl = regulatingControl;
|
|
1967
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data
|
|
1970
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, equivalentInjection, i7Data);
|
|
1968
1971
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
1969
1972
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
1970
1973
|
// ToDo PSRType
|
|
@@ -1989,7 +1992,7 @@ class ConverterIntegral7 {
|
|
|
1989
1992
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
1990
1993
|
}
|
|
1991
1994
|
}
|
|
1992
|
-
convertBoundaryInjections2ExternalNetworkInjection(cimModel,
|
|
1995
|
+
convertBoundaryInjections2ExternalNetworkInjection(cimModel, result) {
|
|
1993
1996
|
for (const i7Data of result) {
|
|
1994
1997
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, utils_2.getName)(i7Data), i7Data.kurzname);
|
|
1995
1998
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
@@ -2005,7 +2008,18 @@ class ConverterIntegral7 {
|
|
|
2005
2008
|
/** externalNetworkInjection.maxR0ToX0Ratio = 1/(/x0/r0)
|
|
2006
2009
|
externalNetworkInjection.maxR1ToX1Ratio = (1/x1/r1) */
|
|
2007
2010
|
externalNetworkInjection.maxZ0ToZ1Ratio = (0, parser_utils_1.convertToNumberI7)(i7Data.z0_z1);
|
|
2008
|
-
|
|
2011
|
+
/** RegulatingControl */
|
|
2012
|
+
const regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), `RC_BI_${i7Data.id}`);
|
|
2013
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2014
|
+
regulatingControl.discrete = true;
|
|
2015
|
+
regulatingControl.enabled = inBetrieb;
|
|
2016
|
+
/** zulässges Spannungsband um die Knoten-Sollspannung
|
|
2017
|
+
* Diff umin, umax */
|
|
2018
|
+
//regulatingControl.targetDeadband = i7Data.uband;
|
|
2019
|
+
/** Spannung in kilo*/
|
|
2020
|
+
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2021
|
+
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2022
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2009
2023
|
// const connectivityNode = this.cimModelDefaultValues.objects.get(this.integralID2UUID.get(i7Data.anschluss)) as IConnectivityNode;
|
|
2010
2024
|
/** aus dem EqContainer die Sollspannung bestimmen */
|
|
2011
2025
|
// ToDo PSRType
|
|
@@ -2026,6 +2040,7 @@ class ConverterIntegral7 {
|
|
|
2026
2040
|
}*/
|
|
2027
2041
|
// ToDo PSRType
|
|
2028
2042
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2043
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
2029
2044
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
2030
2045
|
}
|
|
2031
2046
|
}
|
|
@@ -2064,31 +2079,26 @@ class ConverterIntegral7 {
|
|
|
2064
2079
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2065
2080
|
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
2066
2081
|
/**EQ */
|
|
2067
|
-
if (flag_lfl &&
|
|
2082
|
+
if (flag_lfl || (flag_lfl && flag_ks)) {
|
|
2068
2083
|
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2069
2084
|
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2070
|
-
|
|
2071
|
-
equivalentBranch.x21 = isNumericI7(i7Data.x21_lfl) ? convertToNumberI7(i7Data.x21_lfl) : equivalentBranch.x;
|
|
2072
|
-
|
|
2073
|
-
equivalentBranch.positiveR12 = isNumericI7(i7Data.r12_ks) ? convertToNumberI7(i7Data.r12_ks) : 10e9;
|
|
2085
|
+
equivalentBranch.r21 = (0, parser_utils_1.isNumericI7)(i7Data.r21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r21_lfl) : equivalentBranch.r;
|
|
2086
|
+
equivalentBranch.x21 = (0, parser_utils_1.isNumericI7)(i7Data.x21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x21_lfl) : equivalentBranch.x;
|
|
2087
|
+
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
2074
2088
|
equivalentBranch.positiveR21 = equivalentBranch.positiveR12;
|
|
2075
|
-
equivalentBranch.positiveX12 = isNumericI7(i7Data.x12_ks) ? convertToNumberI7(i7Data.x12_ks) : 10e9;
|
|
2089
|
+
equivalentBranch.positiveX12 = (0, parser_utils_1.isNumericI7)(i7Data.x12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_ks) : 10e9;
|
|
2076
2090
|
equivalentBranch.positiveX21 = equivalentBranch.positiveX12;
|
|
2077
|
-
|
|
2078
2091
|
equivalentBranch.negativeR12 = equivalentBranch.positiveR12;
|
|
2079
2092
|
equivalentBranch.negativeR21 = equivalentBranch.positiveR21;
|
|
2080
2093
|
equivalentBranch.negativeX12 = equivalentBranch.positiveX12;
|
|
2081
2094
|
equivalentBranch.negativeX21 = equivalentBranch.positiveX21;
|
|
2082
|
-
|
|
2083
|
-
equivalentBranch.zeroR12 = isNumericI7(i7Data.r0) ? convertToNumberI7(i7Data.r0) : 10e9;
|
|
2095
|
+
equivalentBranch.zeroR12 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r0) : 10e9;
|
|
2084
2096
|
equivalentBranch.zeroR21 = equivalentBranch.zeroR12;
|
|
2085
|
-
equivalentBranch.zeroX12 = isNumericI7(i7Data.x0) ? convertToNumberI7(i7Data.x0) : 10e9
|
|
2086
|
-
equivalentBranch.zeroX21 = equivalentBranch.zeroX12
|
|
2097
|
+
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2098
|
+
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2087
2099
|
}
|
|
2088
2100
|
else if (!flag_lfl && flag_ks) {
|
|
2089
2101
|
/**EQ-SC */
|
|
2090
|
-
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2091
|
-
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2092
2102
|
equivalentBranch.positiveR12 = (0, parser_utils_1.isNumericI7)(i7Data.r12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_ks) : 10e9;
|
|
2093
2103
|
equivalentBranch.positiveR21 = equivalentBranch.positiveR12;
|
|
2094
2104
|
equivalentBranch.positiveX12 = (0, parser_utils_1.isNumericI7)(i7Data.x12_ks) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_ks) : 10e9;
|
|
@@ -2102,7 +2112,7 @@ class ConverterIntegral7 {
|
|
|
2102
2112
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2103
2113
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2104
2114
|
}
|
|
2105
|
-
else { //If
|
|
2115
|
+
else { //If neither flag_lfl nor flag_ks are specified, any impedance value that is specified will be exported.
|
|
2106
2116
|
equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 0;
|
|
2107
2117
|
equivalentBranch.x = (0, parser_utils_1.isNumericI7)(i7Data.x12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x12_lfl) : 0;
|
|
2108
2118
|
equivalentBranch.r21 = (0, parser_utils_1.isNumericI7)(i7Data.r21_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r21_lfl) : equivalentBranch.r;
|
|
@@ -2119,9 +2129,7 @@ class ConverterIntegral7 {
|
|
|
2119
2129
|
equivalentBranch.zeroR21 = equivalentBranch.zeroR12;
|
|
2120
2130
|
equivalentBranch.zeroX12 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? (0, parser_utils_1.convertToNumberI7)(i7Data.x0) : 10e9;
|
|
2121
2131
|
equivalentBranch.zeroX21 = equivalentBranch.zeroX12;
|
|
2122
|
-
|
|
2123
|
-
this.logger.warn(`Ersatzlängszweig mit GUID ${equivalentBranch.getUUID()} sind die Flags flag_lfl sowie flag_ks nicht definiert.`);
|
|
2124
|
-
}
|
|
2132
|
+
this.logger.warn(`Ersatzlängszweig mit GUID ${equivalentBranch.getUUID()} sind die Flags flag_lfl sowie flag_ks nicht definiert.`);
|
|
2125
2133
|
}
|
|
2126
2134
|
const bdf = [];
|
|
2127
2135
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten)));
|
|
@@ -2151,6 +2159,7 @@ class ConverterIntegral7 {
|
|
|
2151
2159
|
}
|
|
2152
2160
|
/** Kompensationsdrossel*/
|
|
2153
2161
|
convertKompensationsdrossel(cimModel, targetVoltages, knotenSfIDs) {
|
|
2162
|
+
var _a, _b;
|
|
2154
2163
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2155
2164
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL)) {
|
|
2156
2165
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KOMPENSATIONSDROSSEL, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL), knotenSfIDs));
|
|
@@ -2207,13 +2216,60 @@ class ConverterIntegral7 {
|
|
|
2207
2216
|
}
|
|
2208
2217
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr * -1, shunt.nomU, shunt.maximumSections);
|
|
2209
2218
|
shunt.gPerSection = (0, utils_2.calculateGPerSection)(pr, shunt.nomU, shunt.maximumSections);
|
|
2219
|
+
// RegulatingControl
|
|
2220
|
+
const spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7Data.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_lf) : false;
|
|
2221
|
+
const spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7Data.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.rpv_geregelt) : (cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg)) !== undefined ? true : false);
|
|
2222
|
+
let knotenSpgGeregelt = undefined;
|
|
2223
|
+
if (spannungsregelungRemote) {
|
|
2224
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg));
|
|
2225
|
+
}
|
|
2226
|
+
let regulatingControl = undefined;
|
|
2227
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2228
|
+
//Create and define regulating control for voltage control
|
|
2229
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl((0, parser_utils_1.getUUID)(i7Data.guid_rc, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([shunt.getUUID().substring(0, 8), '_LSC']));
|
|
2230
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2231
|
+
regulatingControl.discrete = true; //default für ShuntCompensator ist true. s. CGMES Doku
|
|
2232
|
+
regulatingControl.targetDeadband = (0, parser_utils_1.isNumericI7)(i7Data.uband) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uband) : undefined; //zulässiges Spannungsband
|
|
2233
|
+
/** Spannung in kilo*/
|
|
2234
|
+
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2235
|
+
regulatingControl.enabled = true;
|
|
2236
|
+
if (knotenSpgGeregelt) {
|
|
2237
|
+
const cn_point = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2238
|
+
const terminal = (0, util_graph2tree_1.getControlledNode)(cn_point, knotenSpgGeregelt);
|
|
2239
|
+
if (terminal) {
|
|
2240
|
+
const cn = terminal.getConnectivityNode();
|
|
2241
|
+
if (regulatingControl.targetDeadband === undefined) {
|
|
2242
|
+
regulatingControl.targetDeadband = cn.getBaseVoltageAsNumber() * 0.1;
|
|
2243
|
+
}
|
|
2244
|
+
regulatingControl.terminalUUID = terminal.getUUID();
|
|
2245
|
+
regulatingControl.name = (0, util_create_1.createNotation)([regulatingControl.name, '_', (_a = cn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8), '_RC'], 32, true);
|
|
2246
|
+
const tV = targetVoltages.get(this.UUID2Integral7ID.get(cn.getUUID()).find(elem => elem));
|
|
2247
|
+
if (tV && regulatingControl.targetValue === undefined) {
|
|
2248
|
+
regulatingControl.targetValue = tV['usoll'];
|
|
2249
|
+
}
|
|
2250
|
+
regulatingControl.targetValue = targetVoltages.get((_b = this.UUID2Integral7ID.get(cn.getUUID())) === null || _b === void 0 ? void 0 : _b.find(elem => elem))['usoll'];
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
regulatingControl.addRegulatingCondEq(shunt);
|
|
2254
|
+
shunt.regulatingControlUUID = regulatingControl.mrid;
|
|
2255
|
+
shunt.controlEnabled = regulatingControl === undefined ? false : regulatingControl.enabled;
|
|
2256
|
+
shunt.regulatingControl = regulatingControl;
|
|
2257
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
2258
|
+
const term = cimModel.terminals.get(regulatingControl.terminalUUID);
|
|
2259
|
+
if (term) {
|
|
2260
|
+
term.addRegulatingControl(regulatingControl);
|
|
2261
|
+
}
|
|
2262
|
+
else {
|
|
2263
|
+
let stop = true;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2210
2266
|
//SHC section
|
|
2211
2267
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2212
2268
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2213
2269
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0)) * -1;
|
|
2214
2270
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2215
2271
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2216
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2272
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, shunt.regulatingControl, undefined, targetVoltages);
|
|
2217
2273
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2218
2274
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL);
|
|
2219
2275
|
}
|
|
@@ -2225,6 +2281,7 @@ class ConverterIntegral7 {
|
|
|
2225
2281
|
}
|
|
2226
2282
|
/** Kompensationskondensator*/
|
|
2227
2283
|
convertKompensationskondensatoren(cimModel, targetVoltages, knotenSfIDs) {
|
|
2284
|
+
var _a, _b;
|
|
2228
2285
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2229
2286
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR)) {
|
|
2230
2287
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.KOMPENSATIONSKONDENSATOR, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR), knotenSfIDs));
|
|
@@ -2281,13 +2338,60 @@ class ConverterIntegral7 {
|
|
|
2281
2338
|
}
|
|
2282
2339
|
shunt.bPerSection = (0, utils_2.calculateBPerSection)(qr, shunt.nomU, shunt.maximumSections);
|
|
2283
2340
|
shunt.gPerSection = (0, utils_2.calculateGPerSection)(pr, shunt.nomU, shunt.maximumSections);
|
|
2341
|
+
// RegulatingControl
|
|
2342
|
+
const spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7Data.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_lf) : false;
|
|
2343
|
+
const spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7Data.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.rpv_geregelt) : false;
|
|
2344
|
+
let knotenSpgGeregelt = undefined;
|
|
2345
|
+
if (spannungsregelungRemote) {
|
|
2346
|
+
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7Data.knotenspgreg));
|
|
2347
|
+
}
|
|
2348
|
+
let regulatingControl = undefined;
|
|
2349
|
+
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
2350
|
+
//Create and define regulating control for voltage control
|
|
2351
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([shunt.getUUID().substring(0, 8), '_LSC']));
|
|
2352
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2353
|
+
regulatingControl.discrete = true; //default für ShuntCompensator ist true. s. CGMES Doku
|
|
2354
|
+
regulatingControl.targetDeadband = (0, parser_utils_1.isNumericI7)(i7Data.uband) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uband) : undefined; //zulässiges Spannungsband
|
|
2355
|
+
/** Spannung in kilo*/
|
|
2356
|
+
regulatingControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
2357
|
+
regulatingControl.enabled = true;
|
|
2358
|
+
if (knotenSpgGeregelt) {
|
|
2359
|
+
const cn_point = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2360
|
+
const terminal = (0, util_graph2tree_1.getControlledNode)(cn_point, knotenSpgGeregelt);
|
|
2361
|
+
if (terminal) {
|
|
2362
|
+
const cn = terminal.getConnectivityNode();
|
|
2363
|
+
if (regulatingControl.targetDeadband === undefined) {
|
|
2364
|
+
regulatingControl.targetDeadband = cn.getBaseVoltageAsNumber() * 0.1;
|
|
2365
|
+
}
|
|
2366
|
+
regulatingControl.terminalUUID = terminal.getUUID();
|
|
2367
|
+
regulatingControl.name = (0, util_create_1.createNotation)([regulatingControl.name, '_', (_a = cn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8), '_RC'], 32, true);
|
|
2368
|
+
const tV = targetVoltages.get(this.UUID2Integral7ID.get(cn.getUUID()).find(elem => elem));
|
|
2369
|
+
if (tV && regulatingControl.targetValue === undefined) {
|
|
2370
|
+
regulatingControl.targetValue = tV['usoll'];
|
|
2371
|
+
}
|
|
2372
|
+
regulatingControl.targetValue = targetVoltages.get((_b = this.UUID2Integral7ID.get(cn.getUUID())) === null || _b === void 0 ? void 0 : _b.find(elem => elem))['usoll'];
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
regulatingControl.addRegulatingCondEq(shunt);
|
|
2376
|
+
shunt.regulatingControlUUID = regulatingControl.mrid;
|
|
2377
|
+
shunt.controlEnabled = regulatingControl === undefined ? false : regulatingControl.enabled;
|
|
2378
|
+
shunt.regulatingControl = regulatingControl;
|
|
2379
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
2380
|
+
const term = cimModel.terminals.get(regulatingControl.terminalUUID);
|
|
2381
|
+
if (term) {
|
|
2382
|
+
term.addRegulatingControl(regulatingControl);
|
|
2383
|
+
}
|
|
2384
|
+
else {
|
|
2385
|
+
let stop = true;
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2284
2388
|
//SHC section
|
|
2285
2389
|
const r0 = (0, parser_utils_1.isNumericI7)(i7Data.r0) ? i7Data.r0 : undefined;
|
|
2286
2390
|
const x0 = (0, parser_utils_1.isNumericI7)(i7Data.x0) ? i7Data.x0 : undefined;
|
|
2287
2391
|
shunt.b0PerSection = (0, utils_2.calculateB0PerSection)(/*r0,*/ Math.abs(x0));
|
|
2288
2392
|
shunt.g0PerSection = (0, utils_2.calculateG0PerSection)(r0 /*,x0*/);
|
|
2289
2393
|
this.setShuntGrounding(shunt, sternpunktKnotenMap.get(i7Data.knoten1p), r0, x0);
|
|
2290
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, targetVoltages);
|
|
2394
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, shunt, i7Data, shunt.regulatingControl, undefined, targetVoltages);
|
|
2291
2395
|
cimModel.addLinearShuntCompensator(shunt);
|
|
2292
2396
|
this.addIdMapping(i7Data.id, shunt.mrid, integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR);
|
|
2293
2397
|
}
|
|
@@ -2297,12 +2401,13 @@ class ConverterIntegral7 {
|
|
|
2297
2401
|
}
|
|
2298
2402
|
});
|
|
2299
2403
|
}
|
|
2300
|
-
convertStatcom(cimModel,
|
|
2404
|
+
convertStatcom(cimModel, knotenSfIDs) {
|
|
2301
2405
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2302
2406
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STATCOM)) {
|
|
2303
2407
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.STATCOM, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.STATCOM), knotenSfIDs));
|
|
2304
2408
|
for (const i7Data of result) {
|
|
2305
2409
|
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_SVC']), i7Data.kurzname);
|
|
2410
|
+
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2306
2411
|
const ur = (0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined;
|
|
2307
2412
|
const uref = (0, parser_utils_1.isNumericI7)(i7Data.uref) ? (0, parser_utils_1.convertToNumberI7)(i7Data.uref) : undefined;
|
|
2308
2413
|
const mrez = (0, parser_utils_1.isNumericI7)(i7Data.mrez) ? (0, parser_utils_1.convertToNumberI7)(i7Data.mrez) : undefined;
|
|
@@ -2320,12 +2425,34 @@ class ConverterIntegral7 {
|
|
|
2320
2425
|
/** SV */
|
|
2321
2426
|
//statVarCom.svpowerflow
|
|
2322
2427
|
/** Regelung */
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2428
|
+
const regulatingControl = (0, utils_2.createRegulatingControl)(`RC_Statcom_${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
2429
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
2430
|
+
regulatingControl.enabled = true;
|
|
2431
|
+
statVarCom.controlEnabled = true;
|
|
2432
|
+
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_os);
|
|
2433
|
+
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2434
|
+
if (flagOS && i7Data.trafo) {
|
|
2435
|
+
const trafoUUID = this.integralID2UUID.get(i7Data.trafo);
|
|
2436
|
+
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2437
|
+
if (powerTransformer) {
|
|
2438
|
+
try {
|
|
2439
|
+
const bvNumbers = powerTransformer.powerTransformerEnd.map(elem => { var _a, _b; return (_b = (_a = elem.baseVoltage) === null || _a === void 0 ? void 0 : _a.nominalVoltage) === null || _b === void 0 ? void 0 : _b.value; });
|
|
2440
|
+
const maxBv = Math.max(...bvNumbers);
|
|
2441
|
+
const powerTransformerEnd = powerTransformer.powerTransformerEnd[bvNumbers.indexOf(maxBv)];
|
|
2442
|
+
regulatingControl.terminal = powerTransformerEnd.terminal;
|
|
2443
|
+
powerTransformerEnd.terminal.addRegulatingControl(regulatingControl);
|
|
2444
|
+
regulatingControl.targetValue = maxBv;
|
|
2445
|
+
}
|
|
2446
|
+
catch (e) {
|
|
2447
|
+
this.logger.debug(`Statcom Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
else {
|
|
2451
|
+
this.logger.debug(`Statcom RegulatingControl ${i7Data.id} konnte dem Trafo ${i7Data.trafo} nicht zugeordnet werden.`);
|
|
2452
|
+
}
|
|
2328
2453
|
}
|
|
2454
|
+
/** EQ */
|
|
2455
|
+
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2329
2456
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
2330
2457
|
this.addIdMapping(i7Data.id, statVarCom.mrid, integral_sql_1.Integral7TableNames.STATCOM);
|
|
2331
2458
|
}
|
|
@@ -2335,7 +2462,7 @@ class ConverterIntegral7 {
|
|
|
2335
2462
|
}
|
|
2336
2463
|
});
|
|
2337
2464
|
}
|
|
2338
|
-
convertSVC(cimModel,
|
|
2465
|
+
convertSVC(cimModel, knotenSfIDs) {
|
|
2339
2466
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2340
2467
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SVC)) {
|
|
2341
2468
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.SVC, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.SVC), knotenSfIDs));
|
|
@@ -2358,7 +2485,33 @@ class ConverterIntegral7 {
|
|
|
2358
2485
|
statVarCom.q = (0, parser_utils_1.isNumericI7)(i7Data.q0svc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q0svc) : undefined;
|
|
2359
2486
|
/** SV */
|
|
2360
2487
|
//statVarCom.svpowerflow
|
|
2361
|
-
|
|
2488
|
+
/** Regelung */
|
|
2489
|
+
const regulatingControl = (0, utils_2.createRegulatingControl)(`RC_Statcom_${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
2490
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
2491
|
+
regulatingControl.enabled = true;
|
|
2492
|
+
statVarCom.controlEnabled = true;
|
|
2493
|
+
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7Data.flag_os);
|
|
2494
|
+
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2495
|
+
if (flagOS && i7Data.trafo) {
|
|
2496
|
+
const trafoUUID = this.integralID2UUID.get(i7Data.trafo);
|
|
2497
|
+
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2498
|
+
if (powerTransformer) {
|
|
2499
|
+
try {
|
|
2500
|
+
const bvNumbers = powerTransformer.powerTransformerEnd.map(elem => { var _a, _b; return (_b = (_a = elem.baseVoltage) === null || _a === void 0 ? void 0 : _a.nominalVoltage) === null || _b === void 0 ? void 0 : _b.value; });
|
|
2501
|
+
const maxBv = Math.max(...bvNumbers);
|
|
2502
|
+
const powerTransformerEnd = powerTransformer.powerTransformerEnd[bvNumbers.indexOf(maxBv)];
|
|
2503
|
+
regulatingControl.terminal = powerTransformerEnd.terminal;
|
|
2504
|
+
powerTransformerEnd.terminal.addRegulatingControl(regulatingControl);
|
|
2505
|
+
regulatingControl.targetValue = maxBv;
|
|
2506
|
+
}
|
|
2507
|
+
catch (e) {
|
|
2508
|
+
this.logger.debug(`Statcom Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
else {
|
|
2512
|
+
this.logger.debug(`Statcom RegulatingControl ${i7Data.id} konnte dem Trafo ${i7Data.trafo} nicht zugeordnet werden.`);
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2362
2515
|
/** EQ */
|
|
2363
2516
|
statVarCom.voltageSetPoint = regulatingControl.targetValue ? regulatingControl.targetValue : ur;
|
|
2364
2517
|
cimModel.addStaticVarCompensator(statVarCom);
|
|
@@ -2376,9 +2529,10 @@ class ConverterIntegral7 {
|
|
|
2376
2529
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KOPFSTATION_KLASSISCH, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_KLASSISCH), knotenSfIDs));
|
|
2377
2530
|
for (const i7Data of result) {
|
|
2378
2531
|
/** Containment DC DCConverterUnit */
|
|
2379
|
-
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2532
|
+
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2533
|
+
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2380
2534
|
dcConverterUnit.governorSCDAc = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2381
|
-
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2535
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.kr_dc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr_dc) : undefined;
|
|
2382
2536
|
// Topologie
|
|
2383
2537
|
/* Anfang
|
|
2384
2538
|
* 3 moegliche Anschluesse
|
|
@@ -2404,46 +2558,54 @@ class ConverterIntegral7 {
|
|
|
2404
2558
|
else {
|
|
2405
2559
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
2406
2560
|
}
|
|
2407
|
-
const csConverter = new CsConverter_1.CsConverter((0, parser_utils_1.getUUID)(i7Data.guid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CSC']), i7Data.kurzname);
|
|
2408
|
-
const pr = (0, parser_utils_1.isNumericI7)(i7Data.pr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pr) : undefined;
|
|
2409
|
-
const pges = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pges) : undefined;
|
|
2561
|
+
const csConverter = new CsConverter_1.CsConverter((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_CSC']), i7Data.kurzname);
|
|
2410
2562
|
/** Wenn Leitungen konvertiert werden, wird das Attribut operationMode gesetzt. */
|
|
2411
2563
|
csConverter.equipmentContainer = dcConverterUnit;
|
|
2412
2564
|
/** Bemessungsleistung (Gleichstromseite) in MW
|
|
2413
2565
|
* im CS-Fall S = P?
|
|
2414
2566
|
* Abhängig vom */
|
|
2415
|
-
csConverter.baseS = pr;
|
|
2567
|
+
csConverter.baseS = (0, parser_utils_1.isNumericI7)(i7Data.pr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pr) : undefined;
|
|
2416
2568
|
/** Bemessungsspannung (Gleichstromseite) in kV*/
|
|
2417
|
-
csConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2418
|
-
csConverter.ratedIdc = (0, utils_2.calculateRatedIdc)(csConverter.ratedUdc, pr);
|
|
2569
|
+
csConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.udc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.udc) : ((0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined);
|
|
2419
2570
|
/** spannungsabhängige Wirk-Verluste in kW bei Leerlauf mit Bemessungsspannung in kV*/
|
|
2420
2571
|
csConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) * Math.pow(10, -3) : undefined;
|
|
2421
2572
|
csConverter.maxUdc = csConverter.ratedUdc * 1.05; // +5% * ratedUdc
|
|
2422
2573
|
csConverter.minUdc = csConverter.ratedUdc * 0.95; // -5% * ratedUdc
|
|
2423
|
-
csConverter.resistiveLoss =
|
|
2574
|
+
csConverter.resistiveLoss = 0;
|
|
2424
2575
|
csConverter.switchingLoss = 0;
|
|
2425
2576
|
/* csConverter.numberOfValves
|
|
2426
2577
|
csConverter.valveU0*/
|
|
2427
2578
|
/** Stromrichter */
|
|
2428
2579
|
/** Zündwinkel bei Gleichrichterbetrieb (ins Drehstromnetz eingespeiste Wirkleistung < 0) - etwa 15 Grad */
|
|
2429
|
-
csConverter.maxAlpha =
|
|
2430
|
-
|
|
2580
|
+
/* csConverter.maxAlpha = i7Data.alpha;
|
|
2581
|
+
csConverter.minAlpha = i7Data.alpha;*/
|
|
2431
2582
|
/** Löschwinkel bei Wechselrichterbetrieb (ins Drehstromnetz Wirkleistung > 0) - etwa 21,5 Grad */
|
|
2432
|
-
csConverter.maxGamma =
|
|
2433
|
-
|
|
2583
|
+
/* csConverter.maxGamma = i7Data.gamma;
|
|
2584
|
+
csConverter.minGamma = i7Data.gamma;*/
|
|
2434
2585
|
/** SSH profile export*/
|
|
2435
|
-
csConverter.p = pges ? pges * -1 : 0;
|
|
2586
|
+
csConverter.p = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? i7Data.pges * -1 : 0;
|
|
2436
2587
|
csConverter.q = (0, parser_utils_1.isNumericI7)(i7Data.qges) ? i7Data.qges * -1 : 0;
|
|
2437
|
-
|
|
2588
|
+
const regelungU = (0, parser_utils_1.convertToBooleanI7)(i7Data.u_geregelt);
|
|
2589
|
+
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7Data.p_geregelt);
|
|
2590
|
+
if (regelungU) {
|
|
2591
|
+
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.inverter;
|
|
2592
|
+
}
|
|
2593
|
+
else if (regelungP) {
|
|
2594
|
+
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
2595
|
+
}
|
|
2596
|
+
else {
|
|
2597
|
+
csConverter.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
2598
|
+
}
|
|
2438
2599
|
/** Status */
|
|
2439
2600
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2440
2601
|
csConverter.normallyInService = inBetrieb;
|
|
2441
2602
|
/** Topologie AC Seite*/
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
|
|
2603
|
+
if (acConnectivityNode) {
|
|
2604
|
+
csConverter.pccTerminal = this.createConnection(cimModel, csConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
2605
|
+
}
|
|
2606
|
+
else {
|
|
2607
|
+
this.logger.debug(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
2608
|
+
}
|
|
2447
2609
|
/** Topologie DC Seite*/
|
|
2448
2610
|
const dcNode = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodep, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCN']));
|
|
2449
2611
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2469,27 +2631,17 @@ class ConverterIntegral7 {
|
|
|
2469
2631
|
}
|
|
2470
2632
|
});
|
|
2471
2633
|
}
|
|
2472
|
-
convertVsConverterDC(cimModel,
|
|
2634
|
+
convertVsConverterDC(cimModel, integral7, knotenSfIDs) {
|
|
2635
|
+
var _a, _b;
|
|
2473
2636
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2474
2637
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
2475
2638
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.HGUE_KOPFSTATION_VSC, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC), knotenSfIDs));
|
|
2476
2639
|
for (const i7Data of result) {
|
|
2477
2640
|
/** Containment DC DCConverterUnit */
|
|
2478
|
-
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2479
|
-
|
|
2480
|
-
const localTargetVoltage = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
2481
|
-
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.einspprio) : undefined;
|
|
2641
|
+
const dcConverterUnit = new DCConverterUnit_1.INTEGRALDCConverterUnit((0, parser_utils_1.getUUID)(i7Data.guid_dcconverterp, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCCU']));
|
|
2642
|
+
dcConverterUnit.referencePriority = (0, parser_utils_1.isNumericI7)(i7Data.einspprio) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2482
2643
|
dcConverterUnit.governorSCDAc = (0, parser_utils_1.isNumericI7)(i7Data.kr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr) : undefined;
|
|
2483
|
-
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.
|
|
2484
|
-
if (dcConverterUnit.governorSCDAc !== undefined) {
|
|
2485
|
-
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDAc.`);
|
|
2486
|
-
}
|
|
2487
|
-
if (dcConverterUnit.governorSCDDc !== undefined) {
|
|
2488
|
-
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no governorSCDDc.`);
|
|
2489
|
-
}
|
|
2490
|
-
if (dcConverterUnit.referencePriority !== undefined) {
|
|
2491
|
-
this.logger.debug(`Object Kopfstation from Table ${integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC} has no referencePriority.`);
|
|
2492
|
-
}
|
|
2644
|
+
dcConverterUnit.governorSCDDc = (0, parser_utils_1.isNumericI7)(i7Data.kr_dc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.kr_dc) : undefined;
|
|
2493
2645
|
// Topologie
|
|
2494
2646
|
/** Anfang
|
|
2495
2647
|
* 3 moegliche Anschluesse
|
|
@@ -2524,23 +2676,44 @@ class ConverterIntegral7 {
|
|
|
2524
2676
|
//If udc is set in Integral data model set converter.ratedUdc as i7Data.udc else take the data value for i7Data.ur (Bemessungsspannung)
|
|
2525
2677
|
vsConverter.ratedUdc = (0, parser_utils_1.isNumericI7)(i7Data.udc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.udc) : ((0, parser_utils_1.isNumericI7)(i7Data.ur) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ur) : undefined);
|
|
2526
2678
|
/** spannungsabhängige Wirk-Verluste bei Leerlauf mit Bemessungsspannung in kV*/
|
|
2527
|
-
vsConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer)
|
|
2528
|
-
vsConverter.maxUdc = vsConverter.ratedUdc * 1.
|
|
2529
|
-
vsConverter.minUdc = vsConverter.ratedUdc * 0.
|
|
2530
|
-
vsConverter.resistiveLoss =
|
|
2679
|
+
vsConverter.idleLoss = (0, parser_utils_1.isNumericI7)(i7Data.p_leer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.p_leer) / 1000 : undefined;
|
|
2680
|
+
vsConverter.maxUdc = vsConverter.ratedUdc * 1.05; // +5% * ratedUdc
|
|
2681
|
+
vsConverter.minUdc = vsConverter.ratedUdc * 0.95; // -5% * ratedUdc
|
|
2682
|
+
vsConverter.resistiveLoss = undefined;
|
|
2531
2683
|
vsConverter.switchingLoss = undefined;
|
|
2532
2684
|
/* csConverter.maxModulationIndex = ;
|
|
2533
2685
|
csConverter.maxValveCurrent = */
|
|
2534
2686
|
/** SSH export values */
|
|
2535
2687
|
vsConverter.p = (0, parser_utils_1.isNumericI7)(i7Data.pges) ? i7Data.pges * -1 : 0;
|
|
2536
2688
|
vsConverter.q = (0, parser_utils_1.isNumericI7)(i7Data.qges) ? i7Data.qges * -1 : 0;
|
|
2537
|
-
|
|
2689
|
+
const regelungU = (0, parser_utils_1.convertToBooleanI7)(i7Data.u_geregelt);
|
|
2690
|
+
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7Data.p_geregelt);
|
|
2691
|
+
if (regelungU) {
|
|
2692
|
+
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
2693
|
+
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
2694
|
+
vsConverter.targetUpcc = (_a = acConnectivityNode === null || acConnectivityNode === void 0 ? void 0 : acConnectivityNode.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getBaseVoltageAsNumber(); //Voltage
|
|
2695
|
+
vsConverter.targetUdc = vsConverter.ratedUdc;
|
|
2696
|
+
}
|
|
2697
|
+
else {
|
|
2698
|
+
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
2699
|
+
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
2700
|
+
vsConverter.targetPpcc = vsConverter.baseS * -1; //ActivePower
|
|
2701
|
+
vsConverter.targetUpcc = (_b = acConnectivityNode === null || acConnectivityNode === void 0 ? void 0 : acConnectivityNode.getVoltageLevel()) === null || _b === void 0 ? void 0 : _b.getBaseVoltageAsNumber();
|
|
2702
|
+
vsConverter.targetQpcc = 0; //ReactivePower
|
|
2703
|
+
}
|
|
2538
2704
|
vsConverter.droop = 0; //pu
|
|
2539
2705
|
vsConverter.droopCompensation = 0; //Resistance
|
|
2540
2706
|
vsConverter.qShare = 0; //PerCent
|
|
2541
2707
|
/** Status */
|
|
2542
2708
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2543
2709
|
vsConverter.normallyInService = inBetrieb;
|
|
2710
|
+
/** Topologie AC Seite*/
|
|
2711
|
+
if (acConnectivityNode) {
|
|
2712
|
+
vsConverter.pccTerminal = (0, util_create_1.createConnection)(cimModel, vsConverter, acConnectivityNode, PhaseCode_1.PhaseCode.ABC, 1);
|
|
2713
|
+
}
|
|
2714
|
+
else {
|
|
2715
|
+
this.logger.debug(`VsConverter ${i7Data.id} ${vsConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
2716
|
+
}
|
|
2544
2717
|
/** Topologie DC Seite mit DCGround*/
|
|
2545
2718
|
const dcNode = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodep, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCN']));
|
|
2546
2719
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
@@ -2551,11 +2724,32 @@ class ConverterIntegral7 {
|
|
|
2551
2724
|
vsConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
2552
2725
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
2553
2726
|
dcNode.dcTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
2727
|
+
const dcGround = new DCGround_1.DCGround((0, parser_utils_1.getUUID)(i7Data.guid_dcground, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG'], 32, true));
|
|
2728
|
+
const dcTerminalG = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalg, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
2729
|
+
const dcTerminalM1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
2730
|
+
const dcNodeG = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1, this.objectMappingConfig.standardiseUuid));
|
|
2731
|
+
dcTerminalG.dCConductingEquipment = dcGround;
|
|
2732
|
+
dcTerminalM1.dCConductingEquipment = vsConverter;
|
|
2733
|
+
dcTerminalM1.polarity = DCPolarityKind_1.DCPolarityKind.middle;
|
|
2734
|
+
dcTerminalG.dcNode = dcNodeG;
|
|
2735
|
+
dcTerminalM1.dcNode = dcNodeG;
|
|
2736
|
+
dcGround.equipmentContainer = dcConverterUnit;
|
|
2737
|
+
dcNodeG.dcEquipmentContainer = dcConverterUnit;
|
|
2738
|
+
dcNodeG.dcTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
2739
|
+
dcNodeG.dcTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
2740
|
+
vsConverter.dCTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
2741
|
+
/** EQ-SC */
|
|
2742
|
+
dcGround.r = undefined;
|
|
2743
|
+
dcGround.inductance = undefined;
|
|
2554
2744
|
/** DCNode speichern, um später DCLines anschließen zu können*/
|
|
2555
2745
|
cimModel.addDCConverterUnit(dcConverterUnit);
|
|
2556
2746
|
cimModel.addVSConverter(vsConverter);
|
|
2557
2747
|
cimModel.addDCNode(dcNode);
|
|
2748
|
+
cimModel.addDCNode(dcNodeG);
|
|
2558
2749
|
cimModel.addACDCConverterDCTerminal(acDCConverterDCTerminal);
|
|
2750
|
+
cimModel.addDCTerminal(dcTerminalG);
|
|
2751
|
+
cimModel.addDCGround(dcGround);
|
|
2752
|
+
cimModel.addACDCConverterDCTerminal(dcTerminalM1);
|
|
2559
2753
|
integral7.integralHgueKopf.set(i7Data.id, i7Data);
|
|
2560
2754
|
this.checkAnschlussIDs(i7Data.id, integral7);
|
|
2561
2755
|
this.addIdMapping(i7Data.id, vsConverter.mrid, integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC);
|
|
@@ -2563,7 +2757,7 @@ class ConverterIntegral7 {
|
|
|
2563
2757
|
}
|
|
2564
2758
|
});
|
|
2565
2759
|
}
|
|
2566
|
-
convertEinspeisungen2EnergySource(cimModel,
|
|
2760
|
+
convertEinspeisungen2EnergySource(cimModel, result, energySourceTypeMappingConfig) {
|
|
2567
2761
|
var _a, _b, _c, _d;
|
|
2568
2762
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2569
2763
|
for (const i7Data of result) {
|
|
@@ -2608,15 +2802,37 @@ class ConverterIntegral7 {
|
|
|
2608
2802
|
}
|
|
2609
2803
|
});
|
|
2610
2804
|
}
|
|
2611
|
-
convertEnergySourceToExternalNetworkInjection(cimModel,
|
|
2805
|
+
convertEnergySourceToExternalNetworkInjection(cimModel, i7Data, prio, inBetrieb) {
|
|
2612
2806
|
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2613
2807
|
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(rdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', rdfid.substring(0, 8), '_EI'], 32, true), i7Data.kurzname);
|
|
2614
2808
|
externalNetworkInjection.referencePriority = prio;
|
|
2615
2809
|
const usoll = i7Data.usoll;
|
|
2810
|
+
// RegulatingControl
|
|
2811
|
+
let regulatingControl = undefined;
|
|
2812
|
+
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
2813
|
+
switch (i7Data.spannungsgeregelt) {
|
|
2814
|
+
// TODO Welche Modi sind möglich?
|
|
2815
|
+
case 1: {
|
|
2816
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(externalNetworkInjection.getUUID(), this.objectMappingConfig.standardiseUuid);
|
|
2817
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([cimrdfid.substring(0, 8), '_RC_ENI'], 32, true));
|
|
2818
|
+
regulatingControl.targetValue = usoll;
|
|
2819
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2820
|
+
regulatingControl.discrete = false;
|
|
2821
|
+
regulatingControl.enabled = true;
|
|
2822
|
+
externalNetworkInjection.controlEnabled = true;
|
|
2823
|
+
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
2824
|
+
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2825
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
2826
|
+
break;
|
|
2827
|
+
}
|
|
2828
|
+
default: {
|
|
2829
|
+
externalNetworkInjection.controlEnabled = false;
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2616
2832
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
2617
2833
|
externalNetworkInjection.p = powerData[0];
|
|
2618
2834
|
externalNetworkInjection.q = powerData[1];
|
|
2619
|
-
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data,
|
|
2835
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2620
2836
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2621
2837
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2622
2838
|
}
|
|
@@ -2642,19 +2858,20 @@ class ConverterIntegral7 {
|
|
|
2642
2858
|
this.addIdMapping(i7Data.id, equivalentInjection.mrid, integral_sql_1.Integral7TableNames.EINSPEISUNG);
|
|
2643
2859
|
}
|
|
2644
2860
|
catch (err) {
|
|
2645
|
-
this.logger.error(`
|
|
2861
|
+
this.logger.error(`Err convertEinspeisungen2EquivalentInjection ${i7Data.id} ${err}`);
|
|
2646
2862
|
}
|
|
2647
2863
|
}
|
|
2648
2864
|
});
|
|
2649
2865
|
}
|
|
2650
|
-
convertEinspeisungen2ExternalNetworkInjection(cimModel,
|
|
2651
|
-
var _a;
|
|
2866
|
+
convertEinspeisungen2ExternalNetworkInjection(cimModel, result) {
|
|
2652
2867
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2653
2868
|
for (const i7Data of result) {
|
|
2654
2869
|
try {
|
|
2655
|
-
const
|
|
2656
|
-
const
|
|
2657
|
-
externalNetworkInjection
|
|
2870
|
+
const cn = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2871
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2872
|
+
const externalNetworkInjection = new INTEGRALExternalNetworkInjection_1.INTEGRALExternalNetworkInjection(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_ENI'], 32, true), i7Data.kurzname);
|
|
2873
|
+
// const un = cn.getVoltageLevel().getBaseVoltageAsNumber();
|
|
2874
|
+
externalNetworkInjection.nameprimaertyp = i7Data.nameprimaertyp;
|
|
2658
2875
|
let mf = undefined;
|
|
2659
2876
|
mf = this.cimModelDefault.multiplierFactors.get(this.integralID2UUID.get(i7Data.multfaktor));
|
|
2660
2877
|
if (mf) {
|
|
@@ -2673,8 +2890,15 @@ class ConverterIntegral7 {
|
|
|
2673
2890
|
externalNetworkInjection.minP = minP;
|
|
2674
2891
|
const minQ = (0, parser_utils_1.isNumericI7)(i7Data.q_min) ? (0, parser_utils_1.convertToNumberI7)(i7Data.q_min) : undefined;
|
|
2675
2892
|
externalNetworkInjection.minQ = minQ;
|
|
2676
|
-
/**
|
|
2677
|
-
|
|
2893
|
+
/** bei nicht modellierter Einspeisepriorität,
|
|
2894
|
+
* erfolgt keine Wirkleistungsregelung */
|
|
2895
|
+
if (this.objectMappingConfig.Target === 'Westnetz' && !einspeisePrioritaet) {
|
|
2896
|
+
externalNetworkInjection.maxP = 0;
|
|
2897
|
+
externalNetworkInjection.minP = 0;
|
|
2898
|
+
}
|
|
2899
|
+
const usoll = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
2900
|
+
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : false;
|
|
2901
|
+
//TODO: get data from database
|
|
2678
2902
|
/**Convert short circuit constants */
|
|
2679
2903
|
const r0X0 = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0) : undefined;
|
|
2680
2904
|
const r1X1 = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1) : undefined;
|
|
@@ -2683,7 +2907,7 @@ class ConverterIntegral7 {
|
|
|
2683
2907
|
externalNetworkInjection.maxR0ToX0Ratio = maxR0X0Ratio;
|
|
2684
2908
|
const maxR1X1Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x1_r1_max) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x1_r1_max) : r1X1;
|
|
2685
2909
|
externalNetworkInjection.maxR1ToX1Ratio = maxR1X1Ratio;
|
|
2686
|
-
const maxZ0Z1Ratio = z0Z1;
|
|
2910
|
+
const maxZ0Z1Ratio = (0, parser_utils_1.isNumericI7)(i7Data.z0_z1_max) ? (0, parser_utils_1.convertToNumberI7)(i7Data.z0_z1_max) : z0Z1;
|
|
2687
2911
|
externalNetworkInjection.maxZ0ToZ1Ratio = maxZ0Z1Ratio;
|
|
2688
2912
|
const minR0X0Ratio = (0, parser_utils_1.isNumericI7)(i7Data.x0_r0_min) ? 1 / (0, parser_utils_1.convertToNumberI7)(i7Data.x0_r0_min) : r0X0;
|
|
2689
2913
|
externalNetworkInjection.minR0ToX0Ratio = minR0X0Ratio;
|
|
@@ -2698,22 +2922,41 @@ class ConverterIntegral7 {
|
|
|
2698
2922
|
externalNetworkInjection.minInitialSymShCCurrent = minIkSecond;
|
|
2699
2923
|
const maxIkSecond = (0, parser_utils_1.isNumericI7)(i7Data.sk_max) ? (0, parser_utils_1.convertToNumberI7)(skMax) / Math.sqrt(3) * skMax : undefined;
|
|
2700
2924
|
externalNetworkInjection.maxInitialSymShCCurrent = maxIkSecond;
|
|
2701
|
-
|
|
2925
|
+
// RegulatingControl
|
|
2926
|
+
let regulatingControl = undefined;
|
|
2927
|
+
// TODO targetDeadband: ab welcher spannung soll reguliert werden.
|
|
2928
|
+
switch (i7Data.spannungsgeregelt) {
|
|
2929
|
+
// TODO Welche Modi sind möglich?
|
|
2930
|
+
case 1: {
|
|
2931
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(externalNetworkInjection.getUUID(), this.objectMappingConfig.standardiseUuid);
|
|
2932
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([cimrdfid.substring(0, 8), '_RC_ENI'], 32, true));
|
|
2933
|
+
regulatingControl.targetValue = usoll;
|
|
2934
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
2935
|
+
regulatingControl.discrete = false;
|
|
2936
|
+
regulatingControl.enabled = true;
|
|
2937
|
+
externalNetworkInjection.controlEnabled = true;
|
|
2938
|
+
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
2939
|
+
externalNetworkInjection.regulatingControl = regulatingControl;
|
|
2940
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
2941
|
+
break;
|
|
2942
|
+
}
|
|
2943
|
+
default: {
|
|
2944
|
+
externalNetworkInjection.controlEnabled = false;
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
2948
|
+
// ToDo PSRType
|
|
2702
2949
|
/** Convert SSH-profile dataset. */
|
|
2703
2950
|
/**
|
|
2704
|
-
* @description Set einspprio as referencePriority. PowerFactory sets external network injections with referencePriority
|
|
2951
|
+
* @description Set einspprio as referencePriority. PowerFactory sets external network injections with referencePriority to has slack control mode. In regular case referencePriority for externalnetworkextensions is set to value '0'.
|
|
2705
2952
|
* einspprio having no effect in loadflow calculation if voltage control does not exists.
|
|
2706
2953
|
* */
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
externalNetworkInjection.referencePriority = prio + 1; //TODO: SLACK is a injection with maximum prio in the network section and active voltage control.
|
|
2711
|
-
}
|
|
2712
|
-
else if (prio !== undefined && prio === 0) {
|
|
2713
|
-
externalNetworkInjection.referencePriority = prio;
|
|
2954
|
+
if ((regulatingControl === null || regulatingControl === void 0 ? void 0 : regulatingControl.mode) === RegulatingControlModeKind_1.RegulatingControlModeKind.voltage) {
|
|
2955
|
+
if (einspeisePrioritaet && einspeisePrioritaet > 0) {
|
|
2956
|
+
externalNetworkInjection.referencePriority = einspeisePrioritaet;
|
|
2714
2957
|
}
|
|
2715
2958
|
else {
|
|
2716
|
-
|
|
2959
|
+
einspeisePrioritaet = undefined;
|
|
2717
2960
|
}
|
|
2718
2961
|
}
|
|
2719
2962
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data, mf);
|
|
@@ -2721,352 +2964,43 @@ class ConverterIntegral7 {
|
|
|
2721
2964
|
const q = powerData[1];
|
|
2722
2965
|
externalNetworkInjection.setActivePower(p * -1); //convert to load sign system
|
|
2723
2966
|
externalNetworkInjection.setReactivePower(q * -1); //convert to load sign system
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
externalNetworkInjection.cos_phi = cosPhi;
|
|
2727
|
-
externalNetworkInjection.p_mf = (mf && powerData[2]) ? powerData[2] * -1 : undefined;
|
|
2728
|
-
externalNetworkInjection.q_mf = (mf && powerData[3]) ? powerData[3] * -1 : undefined;
|
|
2729
|
-
externalNetworkInjection.normallyInService = inBetrieb;
|
|
2967
|
+
externalNetworkInjection.p_mf = powerData[2] ? powerData[2] * -1 : undefined;
|
|
2968
|
+
externalNetworkInjection.q_mf = powerData[3] ? powerData[3] * -1 : undefined;
|
|
2730
2969
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
2731
2970
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
2732
2971
|
}
|
|
2733
2972
|
catch (err) {
|
|
2734
|
-
this.logger.error(`
|
|
2973
|
+
this.logger.error(`Err convertEinspeisungen2ExternalNetworkInjection ${i7Data.id} ${err}`);
|
|
2735
2974
|
}
|
|
2736
2975
|
}
|
|
2737
2976
|
});
|
|
2738
2977
|
}
|
|
2739
|
-
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data,
|
|
2740
|
-
var _a, _b, _c
|
|
2978
|
+
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data, regulatingControl, generatingUnit, targetVoltages) {
|
|
2979
|
+
var _a, _b, _c;
|
|
2741
2980
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2742
2981
|
condEquip.normallyInService = inBetrieb;
|
|
2743
2982
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
2744
|
-
let
|
|
2745
|
-
let rControl = undefined;
|
|
2746
|
-
let i7DataEinsp = undefined;
|
|
2747
|
-
let i7DataSVC = undefined;
|
|
2748
|
-
let i7DataKomp = undefined;
|
|
2749
|
-
let i7DataRQ = undefined;
|
|
2750
|
-
let i7DataHgue = undefined;
|
|
2751
|
-
let suffix = undefined;
|
|
2752
|
-
let uband = undefined;
|
|
2753
|
-
let tCn = undefined; //controlled node of this device
|
|
2754
|
-
let spannungsregelungLokal = undefined;
|
|
2755
|
-
let spannungsregelungRemote = undefined;
|
|
2756
|
-
let knotenSpgGeregelt = undefined;
|
|
2757
|
-
let isRegulatingControl = undefined;
|
|
2758
|
-
let hasGeneratingUnit = undefined;
|
|
2759
|
-
if (condEquip instanceof RotatingMachine_1.RotatingMachine || condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection || condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2760
|
-
i7DataEinsp = i7Data;
|
|
2761
|
-
i7DataRQ = i7Data;
|
|
2762
|
-
}
|
|
2763
|
-
if (condEquip instanceof SynchronousMachine_1.SynchronousMachine) {
|
|
2764
|
-
suffix = '_SM';
|
|
2765
|
-
if (generatingUnit !== undefined) {
|
|
2766
|
-
hasGeneratingUnit = true;
|
|
2767
|
-
}
|
|
2768
|
-
else {
|
|
2769
|
-
hasGeneratingUnit = false;
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
else if (condEquip instanceof AsynchronousMachine_1.AsynchronousMachine) {
|
|
2773
|
-
suffix = '_ASM';
|
|
2774
|
-
}
|
|
2775
|
-
else if (condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection) {
|
|
2776
|
-
suffix = '_ENI';
|
|
2777
|
-
}
|
|
2778
|
-
else if (condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
2779
|
-
suffix = '_EI';
|
|
2780
|
-
}
|
|
2781
|
-
else if (condEquip instanceof StaticVarCompensator_1.StaticVarCompensator) {
|
|
2782
|
-
i7DataSVC = i7Data;
|
|
2783
|
-
i7DataRQ = i7Data;
|
|
2784
|
-
suffix = '_SVC';
|
|
2785
|
-
}
|
|
2786
|
-
else if (condEquip instanceof LinearShuntCompensator_1.LinearShuntCompensator) {
|
|
2787
|
-
i7DataKomp = i7Data;
|
|
2788
|
-
i7DataRQ = i7Data;
|
|
2789
|
-
suffix = '_LSC';
|
|
2790
|
-
}
|
|
2791
|
-
else if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
2792
|
-
i7DataHgue = i7Data;
|
|
2793
|
-
suffix = '_ACDCC';
|
|
2794
|
-
}
|
|
2795
|
-
// RegulatingControl: Test if this is a regulating control.
|
|
2796
|
-
if (i7DataEinsp) {
|
|
2797
|
-
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.spannungsgeregelt) : false;
|
|
2798
|
-
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataEinsp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataEinsp.rpv_geregelt) : false;
|
|
2799
|
-
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataEinsp.knotenspgreg));
|
|
2800
|
-
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2801
|
-
}
|
|
2802
|
-
else if (i7DataKomp) {
|
|
2803
|
-
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataKomp.flag_lf) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.flag_lf) : false;
|
|
2804
|
-
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataKomp.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataKomp.rpv_geregelt) : false;
|
|
2805
|
-
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataKomp.knotenspgreg));
|
|
2806
|
-
isRegulatingControl = spannungsregelungLokal || spannungsregelungRemote;
|
|
2807
|
-
}
|
|
2808
|
-
else if (i7DataHgue) {
|
|
2809
|
-
spannungsregelungLokal = (0, parser_utils_1.isBooleanI7)(i7DataHgue.spannungsgeregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.spannungsgeregelt) : false;
|
|
2810
|
-
spannungsregelungRemote = (0, parser_utils_1.isBooleanI7)(i7DataHgue.rpv_geregelt) ? (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.rpv_geregelt) : false;
|
|
2811
|
-
knotenSpgGeregelt = cimModel.objects.get(this.integralID2UUID.get(i7DataHgue.knotenspgreg));
|
|
2812
|
-
isRegulatingControl = false;
|
|
2813
|
-
}
|
|
2814
|
-
else if (i7DataSVC) {
|
|
2815
|
-
isRegulatingControl = true;
|
|
2816
|
-
}
|
|
2817
|
-
else {
|
|
2818
|
-
isRegulatingControl = false;
|
|
2819
|
-
}
|
|
2983
|
+
let controlledTerm = undefined;
|
|
2820
2984
|
if (connectivityNode) {
|
|
2821
|
-
const
|
|
2822
|
-
|
|
2823
|
-
if (
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
if (
|
|
2831
|
-
|
|
2832
|
-
if (
|
|
2833
|
-
|
|
2834
|
-
}
|
|
2835
|
-
if (cterminal) {
|
|
2836
|
-
tCn = cterminal.getConnectivityNode();
|
|
2837
|
-
if (tCn) {
|
|
2838
|
-
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2839
|
-
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2840
|
-
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2841
|
-
}
|
|
2842
|
-
else {
|
|
2843
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
else {
|
|
2847
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2848
|
-
}
|
|
2849
|
-
}
|
|
2850
|
-
if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal) {
|
|
2851
|
-
switch (knotenSpgGeregelt) {
|
|
2852
|
-
case undefined: {
|
|
2853
|
-
cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2854
|
-
if (cterminal === undefined) {
|
|
2855
|
-
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
2856
|
-
}
|
|
2857
|
-
break;
|
|
2858
|
-
}
|
|
2859
|
-
default: {
|
|
2860
|
-
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
if (cterminal) {
|
|
2864
|
-
tCn = cterminal.getConnectivityNode();
|
|
2865
|
-
if (tCn) {
|
|
2866
|
-
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2867
|
-
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2868
|
-
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2869
|
-
}
|
|
2870
|
-
else {
|
|
2871
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2872
|
-
}
|
|
2873
|
-
}
|
|
2874
|
-
}
|
|
2875
|
-
uband = (0, parser_utils_1.isNumericI7)(tVMax) && (0, parser_utils_1.isNumericI7)(tVMin) ? (0, parser_utils_1.convertToNumberI7)(tVMax) - (0, parser_utils_1.convertToNumberI7)(tVMin) : undefined;
|
|
2876
|
-
if (uband === undefined) {
|
|
2877
|
-
if (tCn) {
|
|
2878
|
-
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
2882
|
-
//Create and define regulating control for voltage control
|
|
2883
|
-
if (cterminal !== undefined) {
|
|
2884
|
-
const uuid = (0, parser_utils_1.getUUID)(i7DataRQ.guid_rc);
|
|
2885
|
-
rControl = (0, utils_2.createRegulatingControl)((0, parser_utils_1.getUUID)(i7DataRQ.guid_rc), (0, util_create_1.createNotation)([regCondEquip.getUUID().substring(0, 8), suffix]), true, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage);
|
|
2886
|
-
if (i7DataEinsp) {
|
|
2887
|
-
rControl.discrete = false; //default for ExternalNetworkInjection is false. s. CGMES Doku
|
|
2888
|
-
}
|
|
2889
|
-
else {
|
|
2890
|
-
rControl.discrete = true; //default for LinearShuntCompensator is true because of stepping mode.
|
|
2891
|
-
}
|
|
2892
|
-
rControl.targetDeadband = (0, parser_utils_1.isNumericI7)(uband) ? uband : undefined; //zulässiges Spannungsband
|
|
2893
|
-
/** Spannung in kilo*/
|
|
2894
|
-
rControl.targetValue = usoll;
|
|
2895
|
-
const guidSuffix = (_a = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8);
|
|
2896
|
-
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
2897
|
-
rControl.terminalUUID = cterminal.getUUID();
|
|
2898
|
-
rControl.addRegulatingCondEq(regCondEquip);
|
|
2899
|
-
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
2900
|
-
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
2901
|
-
regCondEquip.regulatingControl = rControl;
|
|
2902
|
-
cimModel.addRegulatingControl(rControl);
|
|
2903
|
-
const term = cimModel.terminals.get(rControl.terminalUUID);
|
|
2904
|
-
if (term) {
|
|
2905
|
-
term.addRegulatingControl(rControl);
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
else {
|
|
2909
|
-
const stop = true;
|
|
2910
|
-
}
|
|
2911
|
-
}
|
|
2912
|
-
else if (isRegulatingControl && i7DataSVC) {
|
|
2913
|
-
/** Regelung */
|
|
2914
|
-
const regCondEquip = condEquip;
|
|
2915
|
-
const cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2916
|
-
let tVMax = undefined;
|
|
2917
|
-
let tVMin = undefined;
|
|
2918
|
-
if (cterminal) {
|
|
2919
|
-
tCn = cterminal.getConnectivityNode();
|
|
2920
|
-
if (tCn) {
|
|
2921
|
-
tVMax = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umax'];
|
|
2922
|
-
tVMin = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['umin'];
|
|
2923
|
-
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
2924
|
-
}
|
|
2925
|
-
else {
|
|
2926
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Lokal geregelter Knoten konnte nicht ermittelt werden.`);
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
|
-
uband = (0, parser_utils_1.isNumericI7)(tVMax) && (0, parser_utils_1.isNumericI7)(tVMin) ? (0, parser_utils_1.convertToNumberI7)(tVMax) - (0, parser_utils_1.convertToNumberI7)(tVMin) : undefined;
|
|
2930
|
-
if (uband === undefined) {
|
|
2931
|
-
if (tCn) {
|
|
2932
|
-
uband = tCn.getBaseVoltageAsNumber() * 0.1;
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
if (cterminal !== undefined) {
|
|
2936
|
-
const uuid = (0, parser_utils_1.getUUID)(i7DataSVC.guid_rc);
|
|
2937
|
-
rControl = (0, utils_2.createRegulatingControl)(uuid, (0, util_create_1.createNotation)([condEquip.getUUID().substring(0, 8), suffix]), inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage);
|
|
2938
|
-
rControl.enabled = true;
|
|
2939
|
-
if (isStatcom) {
|
|
2940
|
-
rControl.discrete = true;
|
|
2941
|
-
}
|
|
2942
|
-
else {
|
|
2943
|
-
rControl.discrete = false;
|
|
2944
|
-
}
|
|
2945
|
-
condEquip.controlEnabled = true;
|
|
2946
|
-
const flagOS = (0, parser_utils_1.convertToBooleanI7)(i7DataSVC.flag_os);
|
|
2947
|
-
/** die Regelung erfolgt auf die Oberspannungsseite des zugehörenden Transformators */
|
|
2948
|
-
if (flagOS && i7DataSVC.trafo) {
|
|
2949
|
-
const trafoUUID = this.integralID2UUID.get(i7DataSVC.trafo);
|
|
2950
|
-
const powerTransformer = cimModel.getObject(trafoUUID);
|
|
2951
|
-
if (powerTransformer) {
|
|
2952
|
-
try {
|
|
2953
|
-
for (const end of powerTransformer.powerTransformerEnd) {
|
|
2954
|
-
if (end.phaseTapChanger) {
|
|
2955
|
-
end.phaseTapChanger.controlEnabled = false;
|
|
2956
|
-
}
|
|
2957
|
-
if (end.ratioTapChanger) {
|
|
2958
|
-
end.ratioTapChanger.controlEnabled = false;
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
catch (e) {
|
|
2963
|
-
this.logger.debug(`debug --- ${i7DataSVC.constructor.name} Zuordnung zu Trafo fehlgeschlagen.`);
|
|
2964
|
-
}
|
|
2985
|
+
const terminal = this.createConnection(cimModel, condEquip, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
|
|
2986
|
+
controlledTerm = terminal;
|
|
2987
|
+
if (regulatingControl) {
|
|
2988
|
+
if (regulatingControl.terminalUUID === undefined) {
|
|
2989
|
+
if (!(controlledTerm.conductingEquipment instanceof BusbarSection_1.BusbarSection)) {
|
|
2990
|
+
controlledTerm = (0, util_graph2tree_1.getControlledNode)(connectivityNode, undefined);
|
|
2991
|
+
}
|
|
2992
|
+
regulatingControl.terminalUUID = terminal.getUUID();
|
|
2993
|
+
regulatingControl.name = (0, util_create_1.createNotation)([regulatingControl.name, '_', (_a = connectivityNode.getVoltageLevel()) === null || _a === void 0 ? void 0 : _a.getUUID().substring(0, 8), '_RC'], 32, true);
|
|
2994
|
+
if (regulatingControl.targetValue === undefined) {
|
|
2995
|
+
const tV = targetVoltages === null || targetVoltages === void 0 ? void 0 : targetVoltages.get(this.UUID2Integral7ID.get(connectivityNode.getUUID()).find(elem => elem));
|
|
2996
|
+
if (tV) {
|
|
2997
|
+
regulatingControl.targetValue = tV['usoll'];
|
|
2965
2998
|
}
|
|
2966
2999
|
}
|
|
2967
|
-
rControl.targetValue = usoll;
|
|
2968
|
-
rControl.targetDeadband = uband;
|
|
2969
|
-
rControl.terminal = cterminal;
|
|
2970
|
-
const guidSuffix = (_b = tCn === null || tCn === void 0 ? void 0 : tCn.getVoltageLevel()) === null || _b === void 0 ? void 0 : _b.getUUID().substring(0, 8);
|
|
2971
|
-
rControl.name = (0, util_create_1.createNotation)([rControl.name, '_', guidSuffix, '_RC'], 32, true);
|
|
2972
|
-
regCondEquip.regulatingControlUUID = rControl.mrid;
|
|
2973
|
-
regCondEquip.controlEnabled = rControl === undefined ? false : rControl.enabled;
|
|
2974
|
-
regCondEquip.regulatingControl = rControl;
|
|
2975
|
-
cterminal.addRegulatingControl(rControl);
|
|
2976
|
-
cimModel.addRegulatingControl(rControl);
|
|
2977
|
-
}
|
|
2978
|
-
else {
|
|
2979
|
-
const stop = true;
|
|
2980
3000
|
}
|
|
2981
3001
|
}
|
|
2982
|
-
|
|
2983
|
-
let cterminal = (0, util_graph2tree_1.getNextBusbar)(connectivityNode);
|
|
2984
|
-
const regelungU = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.u_geregelt);
|
|
2985
|
-
const regelungP = (0, parser_utils_1.convertToBooleanI7)(i7DataHgue.p_geregelt);
|
|
2986
|
-
condEquip.pccTerminal = cpTerminal;
|
|
2987
|
-
if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
2988
|
-
if (regelungU) {
|
|
2989
|
-
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.inverter;
|
|
2990
|
-
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.dcVoltage;
|
|
2991
|
-
condEquip.targetUdc = (0, parser_utils_1.isNumericI7)(i7DataHgue.udc) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.udc) : condEquip.ratedUdc;
|
|
2992
|
-
}
|
|
2993
|
-
else if (regelungP) {
|
|
2994
|
-
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
2995
|
-
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
2996
|
-
condEquip.targetPpcc = (0, parser_utils_1.isNumericI7)(i7DataHgue.pges) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pges) : ((0, parser_utils_1.isNumericI7)(i7DataHgue.pr) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pr) : undefined);
|
|
2997
|
-
}
|
|
2998
|
-
else {
|
|
2999
|
-
condEquip.operatingMode = CsOperatingModeKind_1.CsOperatingModeKind.rectifier;
|
|
3000
|
-
condEquip.pPccControl = CsPpccControlKind_1.CsPpccControlKind.activePower;
|
|
3001
|
-
condEquip.targetPpcc = (0, parser_utils_1.isNumericI7)(i7DataHgue.pges) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pges) : ((0, parser_utils_1.isNumericI7)(i7DataHgue.pr) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.pr) : undefined);
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
|
-
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3005
|
-
usoll = (0, parser_utils_1.isNumericI7)(i7DataHgue.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7DataHgue.usoll) : undefined;
|
|
3006
|
-
if (regelungU) {
|
|
3007
|
-
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
3008
|
-
condEquip.targetUdc = condEquip.ratedUdc;
|
|
3009
|
-
}
|
|
3010
|
-
else if (regelungP) {
|
|
3011
|
-
condEquip.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
3012
|
-
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.powerFactorPcc;
|
|
3013
|
-
condEquip.targetPpcc = condEquip.baseS * -1; //ActivePower
|
|
3014
|
-
condEquip.targetQpcc = 0; //ReactivePower, TODO: define ReactivePowerCapabilityCurve
|
|
3015
|
-
}
|
|
3016
|
-
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
3017
|
-
//get rated voltage of controlled node.
|
|
3018
|
-
if (knotenSpgGeregelt && spannungsregelungRemote) {
|
|
3019
|
-
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3020
|
-
if (cterminal === undefined) {
|
|
3021
|
-
let stop = true;
|
|
3022
|
-
}
|
|
3023
|
-
if (cterminal) {
|
|
3024
|
-
tCn = cterminal.getConnectivityNode();
|
|
3025
|
-
if (tCn) {
|
|
3026
|
-
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3027
|
-
}
|
|
3028
|
-
else {
|
|
3029
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
else {
|
|
3033
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Anschlusspunkt (Terminal) des entfernt geregelter Knoten konnte nicht ermittelt werden.`);
|
|
3034
|
-
}
|
|
3035
|
-
}
|
|
3036
|
-
else if ((knotenSpgGeregelt || connectivityNode) && spannungsregelungLokal && usoll === undefined) {
|
|
3037
|
-
switch (knotenSpgGeregelt) {
|
|
3038
|
-
case undefined: {
|
|
3039
|
-
if (cterminal === undefined) {
|
|
3040
|
-
cterminal = (0, util_graph2tree_1.getControlledNode)(cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)), cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss)));
|
|
3041
|
-
}
|
|
3042
|
-
break;
|
|
3043
|
-
}
|
|
3044
|
-
default: {
|
|
3045
|
-
cterminal = (0, util_graph2tree_1.getControlledNode)(connectivityNode, knotenSpgGeregelt);
|
|
3046
|
-
}
|
|
3047
|
-
}
|
|
3048
|
-
if (cterminal) {
|
|
3049
|
-
tCn = cterminal.getConnectivityNode();
|
|
3050
|
-
if (tCn) {
|
|
3051
|
-
usoll = targetVoltages.get(this.UUID2Integral7ID.get(tCn.getUUID()).find(elem => elem))['usoll'];
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
}
|
|
3055
|
-
condEquip.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
3056
|
-
if (usoll !== undefined) {
|
|
3057
|
-
condEquip.targetUpcc = usoll;
|
|
3058
|
-
}
|
|
3059
|
-
else {
|
|
3060
|
-
this.logger.debug(`debug --- ${i7Data.constructor.name} ${i7Data.id} Sollspannung konnte nicht ermittelt werden.`);
|
|
3061
|
-
}
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
}
|
|
3065
|
-
let equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, connectivityNode.connectivityNodeContainer);
|
|
3002
|
+
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, connectivityNode.connectivityNodeContainer);
|
|
3066
3003
|
if (equipmentContainer) {
|
|
3067
|
-
if (condEquip instanceof ACDCConverter_1.ACDCConverter) {
|
|
3068
|
-
equipmentContainer = condEquip.equipmentContainer;
|
|
3069
|
-
}
|
|
3070
3004
|
condEquip.equipmentContainer = equipmentContainer;
|
|
3071
3005
|
equipmentContainer.addEquipment(condEquip);
|
|
3072
3006
|
//TODO: Überarbeitung notwendig, da hier der Präfix nicht eindeutig für Einspeisungen ermittelt werden kann.
|
|
@@ -3087,36 +3021,27 @@ class ConverterIntegral7 {
|
|
|
3087
3021
|
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3088
3022
|
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3089
3023
|
}
|
|
3090
|
-
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3091
|
-
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3092
|
-
integral_prefix_1.HGUEKOPFVSC_PRAEFIX + i7Data.bezeichner;
|
|
3093
|
-
}
|
|
3094
|
-
else if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3095
|
-
i7Schluessel = (0, utils_2.getDescription)(equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) +
|
|
3096
|
-
integral_prefix_1.HGUEKOPFKLASSISCH_PRAEFIX + i7Data.bezeichner;
|
|
3097
|
-
}
|
|
3098
3024
|
condEquip.description = i7Schluessel;
|
|
3099
|
-
if (
|
|
3025
|
+
if (generatingUnit) {
|
|
3100
3026
|
const substation = this.determineEquipmentContainer('Substation', cimModel, equipmentContainer);
|
|
3101
3027
|
generatingUnit.equipmentContainer = substation;
|
|
3102
3028
|
}
|
|
3103
3029
|
}
|
|
3104
3030
|
else {
|
|
3105
|
-
this.logger.error(
|
|
3031
|
+
this.logger.error(`${(_b = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _b === void 0 ? void 0 : _b.name} ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3106
3032
|
}
|
|
3107
3033
|
}
|
|
3108
3034
|
else {
|
|
3109
|
-
this.logger.error(
|
|
3035
|
+
this.logger.error(`${(_c = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _c === void 0 ? void 0 : _c.name} ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3110
3036
|
}
|
|
3111
|
-
return rControl;
|
|
3112
3037
|
}
|
|
3113
3038
|
convertQuerkupplungen(cimModel, integral7, schaltanlagenAbschnittIDs) {
|
|
3114
3039
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3115
3040
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.QUERKUPPLUNG)) {
|
|
3116
3041
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.QUERKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.QUERKUPPLUNG), schaltanlagenAbschnittIDs));
|
|
3117
3042
|
for (const i7Data of result) {
|
|
3118
|
-
const
|
|
3119
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3043
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3044
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_B']), 'Querkupplung');
|
|
3120
3045
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3121
3046
|
bay.locationID = i7Data.ips_folder_id;
|
|
3122
3047
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
@@ -3124,12 +3049,12 @@ class ConverterIntegral7 {
|
|
|
3124
3049
|
bay.voltageLevel = voltageLevel;
|
|
3125
3050
|
voltageLevel.addBay(bay);
|
|
3126
3051
|
const i7Schluessel = voltageLevel.description +
|
|
3127
|
-
|
|
3052
|
+
'/QK-' +
|
|
3128
3053
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
3129
3054
|
bay.description = i7Schluessel;
|
|
3130
3055
|
}
|
|
3131
3056
|
else {
|
|
3132
|
-
this.logger.debug(`
|
|
3057
|
+
this.logger.debug(`Querkupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3133
3058
|
}
|
|
3134
3059
|
integral7.querkupplungIDs.push(i7Data.id);
|
|
3135
3060
|
cimModel.addBay(bay);
|
|
@@ -3137,7 +3062,7 @@ class ConverterIntegral7 {
|
|
|
3137
3062
|
}
|
|
3138
3063
|
}
|
|
3139
3064
|
else {
|
|
3140
|
-
this.logger.debug(`
|
|
3065
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.QUERKUPPLUNG} ist nicht vorhanden.`);
|
|
3141
3066
|
}
|
|
3142
3067
|
});
|
|
3143
3068
|
}
|
|
@@ -3146,8 +3071,8 @@ class ConverterIntegral7 {
|
|
|
3146
3071
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3147
3072
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LAENGSKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG), schaltanlagenIDs));
|
|
3148
3073
|
for (const i7Data of result) {
|
|
3149
|
-
const
|
|
3150
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3074
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3075
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_B']), i7Data.kurzname, 'Laengskupplung');
|
|
3151
3076
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3152
3077
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3153
3078
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -3160,7 +3085,7 @@ class ConverterIntegral7 {
|
|
|
3160
3085
|
bay.description = i7Schluessel;
|
|
3161
3086
|
}
|
|
3162
3087
|
else {
|
|
3163
|
-
this.logger.debug(`
|
|
3088
|
+
this.logger.debug(`Laengskupplung ${i7Data.id} besitzt keine Anlage.`);
|
|
3164
3089
|
}
|
|
3165
3090
|
const lKupplungImpl = new Laengskupplung_1.LaengskupplungImpl(i7Data);
|
|
3166
3091
|
integral7.integralLaengskupplungen.set(i7Data.id, lKupplungImpl);
|
|
@@ -3170,7 +3095,7 @@ class ConverterIntegral7 {
|
|
|
3170
3095
|
}
|
|
3171
3096
|
}
|
|
3172
3097
|
else {
|
|
3173
|
-
this.logger.debug(`
|
|
3098
|
+
this.logger.debug(`Tabelle ${integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG} ist nicht vorhanden.`);
|
|
3174
3099
|
}
|
|
3175
3100
|
});
|
|
3176
3101
|
}
|
|
@@ -3348,8 +3273,11 @@ class ConverterIntegral7 {
|
|
|
3348
3273
|
/** Spannungsebene */
|
|
3349
3274
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3350
3275
|
seriesCompensator.baseVoltage = baseVoltages[0] ? baseVoltages[0] : baseVoltages[1];
|
|
3276
|
+
if (seriesCompensator.baseVoltage === undefined) {
|
|
3277
|
+
let stop = true;
|
|
3278
|
+
}
|
|
3351
3279
|
/** EQ */
|
|
3352
|
-
const ur =
|
|
3280
|
+
const ur = (0, utils_2.getU)(i7Data.ur);
|
|
3353
3281
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3354
3282
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3355
3283
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3362,7 +3290,7 @@ class ConverterIntegral7 {
|
|
|
3362
3290
|
/** CurrentLimit */
|
|
3363
3291
|
const terminal = startTerminal;
|
|
3364
3292
|
if (terminal) {
|
|
3365
|
-
this.
|
|
3293
|
+
this.setConductingEquipmentCurrentLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, ir);
|
|
3366
3294
|
}
|
|
3367
3295
|
else {
|
|
3368
3296
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3433,9 +3361,9 @@ class ConverterIntegral7 {
|
|
|
3433
3361
|
bdf.push(this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.eknoten)));
|
|
3434
3362
|
/** Spannungsebene */
|
|
3435
3363
|
const baseVoltages = (0, utils_2.getTerminalUn)(cimModel, bdf, seriesCompensator);
|
|
3436
|
-
seriesCompensator.baseVoltage = baseVoltages[0]
|
|
3364
|
+
seriesCompensator.baseVoltage = baseVoltages[0];
|
|
3437
3365
|
/** EQ */
|
|
3438
|
-
const ur =
|
|
3366
|
+
const ur = (0, utils_2.getU)(i7Data.ur);
|
|
3439
3367
|
const ir = (0, parser_utils_1.isNumericI7)(i7Data.ir) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ir) : undefined;
|
|
3440
3368
|
const ukr = (0, parser_utils_1.isNumericI7)(i7Data.ukr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.ukr) : undefined;
|
|
3441
3369
|
const pkr = (0, parser_utils_1.isNumericI7)(i7Data.pkr) ? (0, parser_utils_1.convertToNumberI7)(i7Data.pkr) : undefined;
|
|
@@ -3448,7 +3376,7 @@ class ConverterIntegral7 {
|
|
|
3448
3376
|
/** CurrentLimit */
|
|
3449
3377
|
const terminal = startTerminal;
|
|
3450
3378
|
if (terminal) {
|
|
3451
|
-
this.
|
|
3379
|
+
this.setConductingEquipmentCurrentLimit(cimModel, 'Rating ' + seriesCompensator.name, terminal, ir);
|
|
3452
3380
|
}
|
|
3453
3381
|
else {
|
|
3454
3382
|
this.logger.debug(`Längsdrossel ${i7Data.id} ${seriesCompensator.mrid} besitzt keine Terminalinstanz.`);
|
|
@@ -3519,7 +3447,6 @@ class ConverterIntegral7 {
|
|
|
3519
3447
|
}
|
|
3520
3448
|
// Verbindung herstellen
|
|
3521
3449
|
const terminal = this.createConnection(cimModel, junction, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3522
|
-
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3523
3450
|
integral7.sternPunktImpModel.connectivityNodes.set(connectivityNode.mrid, connectivityNode);
|
|
3524
3451
|
integral7.sternPunktImpModel.junctions.set(junction.mrid, junction);
|
|
3525
3452
|
integral7.sternPunktImpModel.stpSchieneJunctionUUIDs.set(i7DataSchiene.id, junction.mrid);
|
|
@@ -3572,7 +3499,6 @@ class ConverterIntegral7 {
|
|
|
3572
3499
|
// Verbindung herstellen
|
|
3573
3500
|
if (connectivityNode) {
|
|
3574
3501
|
const terminal = this.createConnection(cimModel, conductingEquip, connectivityNode, PhaseCode_1.PhaseCode.N, true);
|
|
3575
|
-
cimModel.terminals.delete(terminal.mrid); //TODO: complete/repair implementation of star point connections.
|
|
3576
3502
|
}
|
|
3577
3503
|
}
|
|
3578
3504
|
}
|
|
@@ -3631,8 +3557,8 @@ class ConverterIntegral7 {
|
|
|
3631
3557
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
3632
3558
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LAENGSKUPPLUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG), schaltanlagenIDs));
|
|
3633
3559
|
for (const i7Data of result) {
|
|
3634
|
-
const
|
|
3635
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(
|
|
3560
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3561
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_B']), i7Data.kurzname, 'Laengskupplung');
|
|
3636
3562
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
3637
3563
|
bay.number = (0, parser_utils_1.isNumericI7)(i7Data.feldnummer) ? (0, parser_utils_1.convertToNumberI7)(i7Data.feldnummer).toString() : undefined;
|
|
3638
3564
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -3698,7 +3624,6 @@ class ConverterIntegral7 {
|
|
|
3698
3624
|
object.x0 = +data.x0; // new ReactancePerLength(data.x1, UnitMultiplier.none, UnitSymbol.ohm);
|
|
3699
3625
|
object.c0 = +data.c0; // new CapacitancePerLength(data.c1, UnitMultiplier.micro, UnitSymbol.F);
|
|
3700
3626
|
object.ratedCurrent = +data.ir;
|
|
3701
|
-
object.limitingCurrent = +data.igrenz;
|
|
3702
3627
|
}
|
|
3703
3628
|
convertLeitungen(frame, integral7, defaultValuesConfig) {
|
|
3704
3629
|
var _a, _b, _c;
|
|
@@ -3707,6 +3632,9 @@ class ConverterIntegral7 {
|
|
|
3707
3632
|
const cimModel = frame.cimModel;
|
|
3708
3633
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.LEITUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.LEITUNG), integral7.leitungsAnschlussIDs));
|
|
3709
3634
|
const leitungIDs = result.map(elem => elem.id);
|
|
3635
|
+
const lt1 = leitungIDs.find(it => it === 105031594);
|
|
3636
|
+
/* const lt2 = leitungIDs.find(it => it === 105031293);
|
|
3637
|
+
const lt2 = leitungIDs.find(it => it === 105031293);*/
|
|
3710
3638
|
const cableAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.KABEL);
|
|
3711
3639
|
const overheadAvailable = this.isTableAvailable(integral_sql_1.Integral7TableNames.FREILEITUNG);
|
|
3712
3640
|
let type = integral_sql_1.I7Objects.STROMKREISABSCHNITT;
|
|
@@ -3759,8 +3687,8 @@ class ConverterIntegral7 {
|
|
|
3759
3687
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner) +
|
|
3760
3688
|
'-' +
|
|
3761
3689
|
(0, utils_2.ueberpruefeZeichenkette)(stk.bezeichner);
|
|
3762
|
-
const
|
|
3763
|
-
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(
|
|
3690
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(stk.custom_guid_0120 + stk.custom_guid_2137, this.objectMappingConfig.standardiseUuid);
|
|
3691
|
+
const acLineSegment = new INTEGRALACLineSegment_1.INTEGRALACLineSegment(cimrdfid, (0, util_create_1.createNotation)([name, '_' + stk.pos.toString(), '_' + cimrdfid.substring(0, 8), '_ACLS'], 32, true), i7Data.stkabname, i7Schluessel);
|
|
3764
3692
|
if (stk.baujahr) {
|
|
3765
3693
|
const wire = new EVWireObject_1.EVWireObject(common_utils_1.CommonUtils.generateUUID(), stk.name);
|
|
3766
3694
|
wire.type = 'Stromkreisabschnitt';
|
|
@@ -3787,9 +3715,6 @@ class ConverterIntegral7 {
|
|
|
3787
3715
|
* KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt
|
|
3788
3716
|
*/
|
|
3789
3717
|
const acLineSegmentStart = acLineSegments[0];
|
|
3790
|
-
if (line.getUUID() === "4637c6dc-fad5-45f1-91e0-091d00717a3b" || line.getUUID() === "a992f3c9-f2e1-4cd6-8cc6-fd3d5d167871") {
|
|
3791
|
-
const stop = true;
|
|
3792
|
-
}
|
|
3793
3718
|
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
|
|
3794
3719
|
if (startTerminal) {
|
|
3795
3720
|
//this.setACLineSegmentCurrentLimt(cimModel, acLineSegmentStart, acLineSegmentStart.description, startTerminal);
|
|
@@ -3891,7 +3816,7 @@ class ConverterIntegral7 {
|
|
|
3891
3816
|
}
|
|
3892
3817
|
}
|
|
3893
3818
|
else {
|
|
3894
|
-
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}:
|
|
3819
|
+
this.logger.error(`Leitung ${line.getUUID()} with Terminal ${terminal.getUUID()}: ConnectivityNode konnte nicht bestimmt werden.`);
|
|
3895
3820
|
}
|
|
3896
3821
|
tmp_terminal = values.next();
|
|
3897
3822
|
}
|
|
@@ -3913,7 +3838,7 @@ class ConverterIntegral7 {
|
|
|
3913
3838
|
});
|
|
3914
3839
|
}
|
|
3915
3840
|
convertDCLines(cimModel, integral7, defaultValuesConfig) {
|
|
3916
|
-
var _a
|
|
3841
|
+
var _a;
|
|
3917
3842
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
3918
3843
|
//Workaround: Prefill Integral 7 model hgueAnschlussKnotenIDs because of missing bays and schlaufen for dc objects this data structure keeps empty.
|
|
3919
3844
|
//for(let dc_node of this.hgueAnschlussKnotenIDs){
|
|
@@ -3937,10 +3862,7 @@ class ConverterIntegral7 {
|
|
|
3937
3862
|
let converterTargetNeg = false;
|
|
3938
3863
|
let converterUnitTargetSide = false;
|
|
3939
3864
|
let bipol = (0, parser_utils_1.convertToBooleanI7)(i7Data.bipol);
|
|
3940
|
-
|
|
3941
|
-
bipol = false;
|
|
3942
|
-
}
|
|
3943
|
-
let dcNode = undefined;
|
|
3865
|
+
bipol = (0, parser_utils_1.convertToBooleanI7)(false);
|
|
3944
3866
|
//Parameter "guidp" is available for monopolar and bipolar dc systems. Thus create DCLineSegment with positive sign property in any case.
|
|
3945
3867
|
const dcLineSegment = new DCLineSegment_1.DCLineSegment((0, parser_utils_1.getUUID)(i7Data.guidp, this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCLS']), i7Data.kurzname, i7Schluessel);
|
|
3946
3868
|
let dcLineSegmentNeg = undefined;
|
|
@@ -3952,7 +3874,7 @@ class ConverterIntegral7 {
|
|
|
3952
3874
|
dcLineSegment.capacitance = undefined;
|
|
3953
3875
|
dcLineSegment.inductance = undefined;
|
|
3954
3876
|
/**EQ: given directly by the INTEGRAL system model */
|
|
3955
|
-
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3877
|
+
dcLineSegment.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (bipol ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) / 2 : (0, parser_utils_1.convertToNumberI7)(i7Data.rdc)) : undefined;
|
|
3956
3878
|
dcLineSegment.equipmentContainer = dcLine;
|
|
3957
3879
|
//create second dcLineSegment in case this dcLine is a bipol.
|
|
3958
3880
|
if (bipol) {
|
|
@@ -3961,42 +3883,34 @@ class ConverterIntegral7 {
|
|
|
3961
3883
|
dcLineSegmentNeg.length = dcLineSegment.length;
|
|
3962
3884
|
dcLineSegmentNeg.capacitance = undefined;
|
|
3963
3885
|
dcLineSegmentNeg.inductance = undefined;
|
|
3964
|
-
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) : undefined;
|
|
3886
|
+
dcLineSegmentNeg.resistance = (0, parser_utils_1.isNumericI7)(i7Data.rdc) ? (bipol ? (0, parser_utils_1.convertToNumberI7)(i7Data.rdc) / 2 : (0, parser_utils_1.convertToNumberI7)(i7Data.rdc)) : undefined;
|
|
3965
3887
|
dcLineSegmentNeg.equipmentContainer = dcLineNeg;
|
|
3966
3888
|
}
|
|
3967
3889
|
const acDCConverterStart = cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.anetzobjekt)) : undefined;
|
|
3968
3890
|
converterStart = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStart !== undefined);
|
|
3969
3891
|
let acDCConverterStartNeg = undefined;
|
|
3970
3892
|
const acDCConverterTarget = cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) ? cimModel.getObject(this.integralID2UUID.get(i7Data.enetzobjekt)) : undefined;
|
|
3971
|
-
|
|
3893
|
+
converterStart = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTarget !== undefined);
|
|
3972
3894
|
let acDCConverterTargetNeg = undefined;
|
|
3973
|
-
if (acDCConverterTarget === undefined) {
|
|
3974
|
-
const stop = true;
|
|
3975
|
-
}
|
|
3976
|
-
else if (acDCConverterStart === undefined) {
|
|
3977
|
-
const stop = true;
|
|
3978
|
-
}
|
|
3979
|
-
const int7hguekopfStart = converterStart ? (_a = integral7.integralHgueKopf) === null || _a === void 0 ? void 0 : _a.get(this.UUID2Integral7ID.get(acDCConverterStart.getUUID()).find(elem => elem)) : undefined;
|
|
3980
|
-
const int7hguekopfTarget = converterTarget ? (_b = integral7.integralHgueKopf) === null || _b === void 0 ? void 0 : _b.get(this.UUID2Integral7ID.get(acDCConverterTarget.getUUID()).find(elem => elem)) : undefined;
|
|
3981
3895
|
//Setting acDCConverterStartNeg and acDCConverterTargetNeg in case this DCLine is a bipol
|
|
3982
3896
|
if (bipol) {
|
|
3983
|
-
|
|
3897
|
+
const int7hguekopf = converterStart ? (_a = integral7.integralHgueKopf) === null || _a === void 0 ? void 0 : _a.get(this.UUID2Integral7ID.get(acDCConverterStart.getUUID()).find(elem => elem)) : undefined;
|
|
3898
|
+
acDCConverterStartNeg = converterStart && int7hguekopf !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopf, acDCConverterStart.constructor.name, acDCConverterStart) : undefined;
|
|
3984
3899
|
converterStartNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterStartNeg !== undefined);
|
|
3985
|
-
acDCConverterTargetNeg = converterTarget &&
|
|
3900
|
+
acDCConverterTargetNeg = converterTarget && int7hguekopf !== undefined ? (0, util_create_1.createACDCConverterNeg)(cimModel, int7hguekopf, acDCConverterTarget.constructor.name, acDCConverterTarget) : undefined;
|
|
3986
3901
|
converterTargetNeg = (0, parser_utils_1.convertToBooleanI7)(acDCConverterTargetNeg !== undefined);
|
|
3987
3902
|
}
|
|
3988
|
-
//Set grounding for dcConverterUnit
|
|
3989
|
-
const converterUnitStart = (acDCConverterStart === null || acDCConverterStart === void 0 ? void 0 : acDCConverterStart.equipmentContainer) ? acDCConverterStart.equipmentContainer : undefined;
|
|
3990
|
-
converterUnitStartSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitStart !== undefined);
|
|
3991
|
-
const converterUnitTarget = (acDCConverterTarget === null || acDCConverterTarget === void 0 ? void 0 : acDCConverterTarget.equipmentContainer) ? acDCConverterTarget.equipmentContainer : undefined;
|
|
3992
|
-
converterUnitTargetSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitTarget !== undefined);
|
|
3993
3903
|
if (converterStart && !converterStartNeg) {
|
|
3994
|
-
|
|
3904
|
+
createDCGround(acDCConverterStart);
|
|
3995
3905
|
}
|
|
3996
3906
|
else if (converterStart && converterStartNeg) {
|
|
3997
|
-
|
|
3998
|
-
connectDCGround(
|
|
3907
|
+
createDCGround(acDCConverterStart);
|
|
3908
|
+
connectDCGround(acDCConverterStartNeg);
|
|
3999
3909
|
}
|
|
3910
|
+
const converterUnitStart = acDCConverterStart.equipmentContainer ? acDCConverterStart.equipmentContainer : undefined;
|
|
3911
|
+
converterUnitStartSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitStart !== undefined);
|
|
3912
|
+
const converterUnitTarget = acDCConverterTarget.equipmentContainer ? acDCConverterTarget.equipmentContainer : undefined;
|
|
3913
|
+
converterUnitTargetSide = (0, parser_utils_1.convertToBooleanI7)(converterUnitTarget !== undefined);
|
|
4000
3914
|
switch (bipol) {
|
|
4001
3915
|
case true: {
|
|
4002
3916
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
@@ -4007,11 +3921,11 @@ class ConverterIntegral7 {
|
|
|
4007
3921
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
4008
3922
|
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.bipolar;
|
|
4009
3923
|
if (converterTarget && !converterTargetNeg) {
|
|
4010
|
-
|
|
3924
|
+
createDCGround(acDCConverterTarget);
|
|
4011
3925
|
}
|
|
4012
3926
|
else if (converterTarget && converterTargetNeg) {
|
|
4013
|
-
|
|
4014
|
-
connectDCGround(
|
|
3927
|
+
createDCGround(acDCConverterTarget);
|
|
3928
|
+
connectDCGround(acDCConverterTargetNeg);
|
|
4015
3929
|
}
|
|
4016
3930
|
else {
|
|
4017
3931
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r ACDCConverter konnte nicht ermittelt werden.`);
|
|
@@ -4025,29 +3939,27 @@ class ConverterIntegral7 {
|
|
|
4025
3939
|
case false: {
|
|
4026
3940
|
if (converterUnitStartSide && !converterUnitTargetSide) {
|
|
4027
3941
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3942
|
+
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
3943
|
+
createNeutralGroundReturn(converterUnitStart, converterUnitTarget);
|
|
4028
3944
|
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: zugehörende/r DCConverterUnit am Leitungsende konnte nicht ermittelt werden.`);
|
|
4029
3945
|
}
|
|
4030
3946
|
else if (converterUnitStartSide && converterUnitTargetSide) {
|
|
4031
3947
|
converterUnitStart.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4032
|
-
converterUnitTarget.operationMode = DCConverterOperatingModeKind_1.DCConverterOperatingModeKind.monopolarGroundReturn;
|
|
4033
|
-
createDCGround(cimModel, acDCConverterTarget, int7hguekopfTarget);
|
|
4034
3948
|
}
|
|
4035
|
-
break;
|
|
4036
3949
|
}
|
|
4037
3950
|
default: {
|
|
4038
|
-
this.logger.
|
|
3951
|
+
this.logger.error(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid}: die bipol-Eigenschaft ist nicht gesetzt.`);
|
|
4039
3952
|
}
|
|
4040
3953
|
}
|
|
4041
3954
|
// Topologie DC
|
|
4042
3955
|
/* Anfang / Ende DCNodes*/
|
|
4043
|
-
|
|
4044
|
-
const startDCNodeNeg =
|
|
3956
|
+
const startDCNode = acDCConverterStart ? getDCNodeFromConverter(acDCConverterStart) : undefined;
|
|
3957
|
+
const startDCNodeNeg = acDCConverterStartNeg ? getDCNodeFromConverter(acDCConverterStartNeg) : undefined;
|
|
4045
3958
|
if (startDCNode) {
|
|
4046
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(
|
|
4047
|
-
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
3959
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.guid_dcterminalp', this.objectMappingConfig.standardiseUuid), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT'], 32, true));
|
|
4048
3960
|
dcTerminal.connected = true;
|
|
3961
|
+
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
4049
3962
|
dcTerminal.dcNode = startDCNode;
|
|
4050
|
-
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4051
3963
|
startDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4052
3964
|
cimModel.addDCTerminal(dcTerminal);
|
|
4053
3965
|
}
|
|
@@ -4055,23 +3967,23 @@ class ConverterIntegral7 {
|
|
|
4055
3967
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
4056
3968
|
}
|
|
4057
3969
|
if (startDCNodeNeg) {
|
|
4058
|
-
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(
|
|
3970
|
+
const dcTerminal = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)('i7Data.guid_dcterminaln'), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCT'], 32, true));
|
|
3971
|
+
dcTerminal.connected = true;
|
|
4059
3972
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
4060
3973
|
dcTerminal.dcNode = startDCNodeNeg;
|
|
4061
|
-
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4062
3974
|
startDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4063
3975
|
cimModel.addDCTerminal(dcTerminal);
|
|
4064
3976
|
}
|
|
4065
3977
|
else {
|
|
4066
3978
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Anfangsknoten NEG. ${i7Data.anetzobjekt} ${this.integralID2UUID.get(i7Data.anetzobjekt)}`);
|
|
4067
3979
|
}
|
|
4068
|
-
const targetDCNode =
|
|
4069
|
-
const targetDCNodeNeg =
|
|
3980
|
+
const targetDCNode = acDCConverterTarget ? getDCNodeFromConverter(acDCConverterTarget) : undefined;
|
|
3981
|
+
const targetDCNodeNeg = acDCConverterTargetNeg ? getDCNodeFromConverter(acDCConverterTargetNeg) : undefined;
|
|
4070
3982
|
if (targetDCNode) {
|
|
4071
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3983
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT'], 32, true));
|
|
3984
|
+
dcTerminal.connected = true;
|
|
4072
3985
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
4073
3986
|
dcTerminal.dcNode = targetDCNode;
|
|
4074
|
-
dcLineSegment.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4075
3987
|
targetDCNode.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4076
3988
|
cimModel.addDCTerminal(dcTerminal);
|
|
4077
3989
|
}
|
|
@@ -4079,10 +3991,10 @@ class ConverterIntegral7 {
|
|
|
4079
3991
|
this.logger.debug(`HGÜ-Leitung ${i7Data.id} ${dcLineSegment.mrid} besitzt keinen Zielknoten. ${i7Data.enetzobjekt} ${this.integralID2UUID.get(i7Data.enetzobjekt)}`);
|
|
4080
3992
|
}
|
|
4081
3993
|
if (targetDCNodeNeg) {
|
|
4082
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(
|
|
3994
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_neg', '_DCT'], 32, true));
|
|
3995
|
+
dcTerminal.connected = true;
|
|
4083
3996
|
dcTerminal.dCConductingEquipment = dcLineSegmentNeg;
|
|
4084
3997
|
dcTerminal.dcNode = targetDCNodeNeg;
|
|
4085
|
-
dcLineSegmentNeg.dCTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4086
3998
|
targetDCNodeNeg.dcTerminals.set(dcTerminal.getUUID(), dcTerminal);
|
|
4087
3999
|
cimModel.addDCTerminal(dcTerminal);
|
|
4088
4000
|
}
|
|
@@ -4091,7 +4003,7 @@ class ConverterIntegral7 {
|
|
|
4091
4003
|
}
|
|
4092
4004
|
cimModel.addDCLine(dcLine);
|
|
4093
4005
|
cimModel.addDCLineSegment(dcLineSegment);
|
|
4094
|
-
if (bipol
|
|
4006
|
+
if (bipol) {
|
|
4095
4007
|
cimModel.addDCLine(dcLineNeg);
|
|
4096
4008
|
cimModel.addDCLineSegment(dcLineSegmentNeg);
|
|
4097
4009
|
}
|
|
@@ -4267,11 +4179,8 @@ class ConverterIntegral7 {
|
|
|
4267
4179
|
}
|
|
4268
4180
|
}
|
|
4269
4181
|
for (const i7Data of result) {
|
|
4270
|
-
const
|
|
4271
|
-
|
|
4272
|
-
const stop = true;
|
|
4273
|
-
}
|
|
4274
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_PT']), i7Data.kurzname, i7Data.kommentar);
|
|
4182
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4183
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_PT']), i7Data.kurzname, i7Data.kommentar);
|
|
4275
4184
|
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer);
|
|
4276
4185
|
/** AssetInfos */
|
|
4277
4186
|
if (i7Data.baujahr) {
|
|
@@ -4329,7 +4238,9 @@ class ConverterIntegral7 {
|
|
|
4329
4238
|
const ukr = (0, utils_2.getUkrTrafo)(i7Data, powerTransformerInfo, '');
|
|
4330
4239
|
const sr = (0, utils_2.getSrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber, false);
|
|
4331
4240
|
const ur = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, powerTransformerEnd1.endNumber);
|
|
4332
|
-
const
|
|
4241
|
+
//const x0 = get
|
|
4242
|
+
// I rated
|
|
4243
|
+
const ir1 = (0, utils_2.getTrafoIr)(ur, sr);
|
|
4333
4244
|
// P0 Lastverluste im I7 Modell p_leer
|
|
4334
4245
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4335
4246
|
// Leerlaufverluste
|
|
@@ -4358,7 +4269,7 @@ class ConverterIntegral7 {
|
|
|
4358
4269
|
const startTerminal = start ? this.createConnection(cimModel, powerTransformer, start, PhaseCode.ABC, true, 1) : undefined;*/
|
|
4359
4270
|
if (!startTerminal)
|
|
4360
4271
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Anfangsknoten.`);
|
|
4361
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7,
|
|
4272
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, startTerminal, sternpunktKnotenMap, integral7, ir1, i7Data, defaultValuesConfig);
|
|
4362
4273
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4363
4274
|
let equivalentInjection = undefined;
|
|
4364
4275
|
if (startTerminal) {
|
|
@@ -4384,12 +4295,14 @@ class ConverterIntegral7 {
|
|
|
4384
4295
|
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4385
4296
|
powerTransformerEnd2.x0 = zeroSequImpedanzWx.x02;
|
|
4386
4297
|
powerTransformerEnd2.r0 = zeroSequImpedanzWx.r02;
|
|
4298
|
+
// I rated
|
|
4299
|
+
const ir2 = (sr * Math.pow(10, 6) / ur2 * 1000) / Math.sqrt(3);
|
|
4387
4300
|
/* const ziel = cimModel.getObject(this.integralID2UUID.get(i7Data.eknoten));
|
|
4388
4301
|
const zielTerminal = ziel ? this.createConnection(cimModel, powerTransformer, ziel, PhaseCode.ABC, true, 2) : undefined;*/
|
|
4389
4302
|
const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
|
|
4390
4303
|
if (!zielTerminal)
|
|
4391
4304
|
this.logger.debug(`PowerTransformer2W ${i7Data.id} ${powerTransformer.mrid} besitzt keinen Zielknoten.`);
|
|
4392
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7,
|
|
4305
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, zielTerminal, sternpunktKnotenMap, integral7, ir2, i7Data, defaultValuesConfig);
|
|
4393
4306
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4394
4307
|
if (zielTerminal) {
|
|
4395
4308
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten));
|
|
@@ -4478,15 +4391,8 @@ class ConverterIntegral7 {
|
|
|
4478
4391
|
}
|
|
4479
4392
|
for (const i7Data of result) {
|
|
4480
4393
|
const sternpunktKnotenMap = new Map();
|
|
4481
|
-
const
|
|
4482
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(
|
|
4483
|
-
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4484
|
-
if (substation) {
|
|
4485
|
-
powerTransformer.equipmentContainer = substation;
|
|
4486
|
-
}
|
|
4487
|
-
else {
|
|
4488
|
-
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4489
|
-
}
|
|
4394
|
+
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
4395
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(cimrdfid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', cimrdfid.substring(0, 8), '_PT']), i7Data.kurzname, i7Data.kommentar);
|
|
4490
4396
|
const facility = util_asset_model_1.UtilAssetModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer);
|
|
4491
4397
|
/** AssetInfos */
|
|
4492
4398
|
if (i7Data.baujahr) {
|
|
@@ -4497,6 +4403,13 @@ class ConverterIntegral7 {
|
|
|
4497
4403
|
facility.setAssetInfo(powerTransformerInfo);
|
|
4498
4404
|
powerTransformerInfo.addAsset(facility);
|
|
4499
4405
|
}
|
|
4406
|
+
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
4407
|
+
if (substation) {
|
|
4408
|
+
powerTransformer.equipmentContainer = substation;
|
|
4409
|
+
}
|
|
4410
|
+
else {
|
|
4411
|
+
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4412
|
+
}
|
|
4500
4413
|
const schaltgruppe = i7Data.schaltgr;
|
|
4501
4414
|
//Set property 'isPartOfGeneratorUnit' to 'true' if property 'Blocktransformator' is set in Integral data.
|
|
4502
4415
|
if (this.blocktransformatoren.includes((0, parser_utils_1.convertToNumberI7)(i7Data.id))) {
|
|
@@ -4526,9 +4439,10 @@ class ConverterIntegral7 {
|
|
|
4526
4439
|
const ur1 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 1);
|
|
4527
4440
|
const ur2 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 2);
|
|
4528
4441
|
const ur3 = (0, utils_2.getUrTrafo)(i7Data, powerTransformerInfo, 3);
|
|
4529
|
-
|
|
4530
|
-
const
|
|
4531
|
-
const
|
|
4442
|
+
// I rated: power in MVA, ur in kV
|
|
4443
|
+
const ir1 = sr1 * Math.pow(10, 6) / ((ur1 * Math.pow(10, 3)) * Math.sqrt(3));
|
|
4444
|
+
const ir2 = sr2 * Math.pow(10, 6) / ((ur2 * Math.pow(10, 3)) * Math.sqrt(3));
|
|
4445
|
+
const ir3 = sr3 * Math.pow(10, 6) / ((ur3 * Math.pow(10, 3)) * Math.sqrt(3));
|
|
4532
4446
|
//Leerlaufverluste in kW
|
|
4533
4447
|
const pLeer = (0, utils_2.getTrafoPleer)(i7Data, powerTransformerInfo);
|
|
4534
4448
|
// Leerlaufstrom bezogen auf Wicklung mit dem grössten Sr in %
|
|
@@ -4581,7 +4495,7 @@ class ConverterIntegral7 {
|
|
|
4581
4495
|
powerTransformerEnd1.r0 = zeroSequImpedanzWx.r01;
|
|
4582
4496
|
powerTransformerEnd1.ratedU = ur1;
|
|
4583
4497
|
powerTransformerEnd1.ratedS = sr1;
|
|
4584
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7,
|
|
4498
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd1, powerTransformer, terminal1, sternpunktKnotenMap, integral7, ir1, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4585
4499
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4586
4500
|
let equivalentInjection = undefined;
|
|
4587
4501
|
if (terminal1) {
|
|
@@ -4591,9 +4505,6 @@ class ConverterIntegral7 {
|
|
|
4591
4505
|
equivalentInjection = this.createBoundaryEquivalentInjection(frame, tmp_cn);
|
|
4592
4506
|
}
|
|
4593
4507
|
}
|
|
4594
|
-
if (powerTransformer.mrid === "49afe40b-89cc-419f-afc5-f330c6589f82") {
|
|
4595
|
-
const stop = true;
|
|
4596
|
-
}
|
|
4597
4508
|
//set transformer end winding connection
|
|
4598
4509
|
powerTransformerEnd1.connectionKind = (0, utils_2.getSchaltgruppe)(schaltgruppe, powerTransformerEnd1.endNumber, powerTransformerEnd1.grounded);
|
|
4599
4510
|
powerTransformerEnd1.phaseAngleClock = (0, utils_2.getSchaltgruppeAngleClock)(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
@@ -4634,7 +4545,7 @@ class ConverterIntegral7 {
|
|
|
4634
4545
|
powerTransformerEnd2.ratedS = sr2;
|
|
4635
4546
|
powerTransformerEnd2.ratedU = ur2;
|
|
4636
4547
|
powerTransformerEnd2.powerTransformer = powerTransformer;
|
|
4637
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7,
|
|
4548
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7, ir2, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4638
4549
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4639
4550
|
equivalentInjection = undefined;
|
|
4640
4551
|
if (terminal2) {
|
|
@@ -4684,7 +4595,7 @@ class ConverterIntegral7 {
|
|
|
4684
4595
|
powerTransformerEnd3.ratedS = sr3;
|
|
4685
4596
|
powerTransformerEnd3.ratedU = ur3;
|
|
4686
4597
|
powerTransformerEnd3.powerTransformer = powerTransformer;
|
|
4687
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7,
|
|
4598
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7, ir3, i7Data, defaultValuesConfig, trafoWicklungen);
|
|
4688
4599
|
/**Add boundary equivalent injection if terminal is connected to boudary point. */
|
|
4689
4600
|
equivalentInjection = undefined;
|
|
4690
4601
|
if (terminal3) {
|
|
@@ -4837,6 +4748,60 @@ class ConverterIntegral7 {
|
|
|
4837
4748
|
equipment.equipmentContainer = undefined;
|
|
4838
4749
|
cimModel.removeObject(equipment);
|
|
4839
4750
|
}
|
|
4751
|
+
/** ConnectivityNodes */
|
|
4752
|
+
/** Change EquipmentContainer from Substation/VoltageLevel to Line */
|
|
4753
|
+
/* const location = substation.location;
|
|
4754
|
+
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
4755
|
+
const connectivityNode = connectivityNodes[i];
|
|
4756
|
+
connectivityNode.connectivityNodeContainer = line;
|
|
4757
|
+
line.addConnectivityNode(connectivityNode);
|
|
4758
|
+
/!** Junction *!/
|
|
4759
|
+
//TODO ggfs. mit Grenzknoten verbinden
|
|
4760
|
+
const junction = new Junction(generateUUID(), `${line.name} BD_Junc`, `Junction`, 'Junction for Geo');
|
|
4761
|
+
junction.equipmentContainer = line;
|
|
4762
|
+
|
|
4763
|
+
/!**
|
|
4764
|
+
* Junction class is included in the boundary for the purpose of GeographicalLocation profile and
|
|
4765
|
+
* for special representation of the boundary points (Xnodes).
|
|
4766
|
+
* The Terminal of the Junction is included in the EQ instance file.
|
|
4767
|
+
* The Junction is contained in the same Line as the ConnectivityNode is contained.
|
|
4768
|
+
* *!/
|
|
4769
|
+
const terminal = new Terminal(generateUUID(),'boundary_junction_label', 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
4770
|
+
terminal.conductingEquipment = junction;
|
|
4771
|
+
terminal.connectivityNode = connectivityNode;
|
|
4772
|
+
junction.terminals.set(terminal.getUUID(), terminal);
|
|
4773
|
+
masFrame.cimModel.addTerminal(terminal);
|
|
4774
|
+
// MAS GL Profil BD Modell Abhängigkeit hinzufügen
|
|
4775
|
+
masFrame.addDependentModel(RDF_XML.PROFILE_EQ_BD, frame.getModelUUID(RDF_XML.PROFILE_EQ_BD));
|
|
4776
|
+
/!** Geokoordinaten *!/
|
|
4777
|
+
/!** Die Geokoordinaten der UA wird auf die Junction des ConnectivityNodes übertragen*!/
|
|
4778
|
+
if (location) {
|
|
4779
|
+
const clonedLocation = new Location(generateUUID(), `Location ${i + 1}`);
|
|
4780
|
+
clonedLocation.addPowerSystemResource(junction);
|
|
4781
|
+
clonedLocation.coordinateSystem = location.coordinateSystem;
|
|
4782
|
+
const clonedPositionPoint = new PositionPoint(generateUUID(), `PositionPoint ${i + 1}`);
|
|
4783
|
+
/!** Lan Länge *!/ //Take first position point found for this location.
|
|
4784
|
+
clonedPositionPoint.xPosition = location.positionPoints[0].xPosition;
|
|
4785
|
+
/!** Lat Breite *!/
|
|
4786
|
+
clonedPositionPoint.yPosition = location.positionPoints[0].yPosition;
|
|
4787
|
+
|
|
4788
|
+
clonedPositionPoint.location = clonedLocation;
|
|
4789
|
+
clonedLocation.addPositionPoint(clonedPositionPoint);
|
|
4790
|
+
masFrame.cimModel.addLocation(clonedLocation);
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
line.addEquipment(junction);
|
|
4794
|
+
cimModel.addJunction(junction);
|
|
4795
|
+
}
|
|
4796
|
+
// Location bereinigen
|
|
4797
|
+
cimModel.locations.delete(location.mrid);
|
|
4798
|
+
cimModel.removeObject(location);
|
|
4799
|
+
for (const positionPoint of location.positionPoints) {
|
|
4800
|
+
const idx = cimModel.positionPoints.indexOf(positionPoint);
|
|
4801
|
+
if (idx > -1) {
|
|
4802
|
+
cimModel.positionPoints.splice(idx, 1);
|
|
4803
|
+
}
|
|
4804
|
+
}*/
|
|
4840
4805
|
/** Geokoordinaten */
|
|
4841
4806
|
const location = substation.location;
|
|
4842
4807
|
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
@@ -4856,7 +4821,8 @@ class ConverterIntegral7 {
|
|
|
4856
4821
|
let terminal = new Terminal_1.Terminal(common_utils_1.CommonUtils.generateUUID(), (0, util_create_1.createNotation)([line.getUUID().substring(0, 8), '_BD-JCT-T']), 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
4857
4822
|
junction.terminals.set(terminal.getUUID(), terminal);
|
|
4858
4823
|
terminal.conductingEquipment = junction;
|
|
4859
|
-
|
|
4824
|
+
// TODO ist nicht notwendig
|
|
4825
|
+
// terminal.connectivityNode = connectivityNode;
|
|
4860
4826
|
line.addEquipment(junction);
|
|
4861
4827
|
/** Die Geokoordinaten der UA wird auf die Junction des ConnectivityNodes übertragen */
|
|
4862
4828
|
if (location && location.positionPoints.length) {
|
|
@@ -4933,12 +4899,11 @@ class ConverterIntegral7 {
|
|
|
4933
4899
|
data.laenge = 1;
|
|
4934
4900
|
}
|
|
4935
4901
|
// Laenge: If valid data.laenge is given then assign it to parameter length, else set parameter length to zero. REMARK: CGMES Standard 2.x.y defines that a cim:ACLineSegment with no impedance has length of zero and arbitrary r, x, b, g etc.
|
|
4936
|
-
if ((0, parser_utils_1.isNumericI7)(data.laenge) && data.laenge > 0
|
|
4902
|
+
if ((0, parser_utils_1.isNumericI7)(data.laenge) && data.laenge > 0 /*&& !data.flag_impedanzlos*/) {
|
|
4937
4903
|
acLineSegment.length = data.laenge;
|
|
4938
|
-
}
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
}
|
|
4904
|
+
} /* else {
|
|
4905
|
+
acLineSegment.length = 1;
|
|
4906
|
+
}*/
|
|
4942
4907
|
const assetType = defaultModel.getWireInfoByName(data.nametyp);
|
|
4943
4908
|
// r0
|
|
4944
4909
|
if ((0, parser_utils_1.isNumericI7)(data.r0) && data.r0 > 0 && !data.flag_impedanzlos) {
|
|
@@ -5012,89 +4977,48 @@ class ConverterIntegral7 {
|
|
|
5012
4977
|
}
|
|
5013
4978
|
// ir
|
|
5014
4979
|
for (const terminal of acLineSegment.terminals.values()) {
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
4980
|
+
if ((0, parser_utils_1.isNumericI7)(data.ir) && data.ir > 0) {
|
|
4981
|
+
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, data.ir);
|
|
4982
|
+
}
|
|
4983
|
+
else if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
4984
|
+
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
4985
|
+
}
|
|
5018
4986
|
//PSRType
|
|
5019
4987
|
const psrType = (0, utils_1.createIfNotExitsPSRType)(cimModel, data.typ);
|
|
5020
4988
|
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
4989
|
+
// psrType.addPowerSystemResource(acLineSegment);
|
|
5021
4990
|
}
|
|
5022
4991
|
}
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
currentLimitTatl.operationalLimitSet = operationalLimitSet;
|
|
5054
|
-
operationalLimitTypeTatl = this.createIfNotExistOperationalLimitType(cimModel, 'tatl', LimitTypeKind_1.LimitTypeKind.tatl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5055
|
-
operationalLimitTypeTatl.addOperationalLimit(currentLimitTatl);
|
|
5056
|
-
currentLimitTatl.operationalLimitType = operationalLimitTypeTatl;
|
|
5057
|
-
}
|
|
5058
|
-
else if (currentLimitPatl) {
|
|
5059
|
-
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5060
|
-
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5061
|
-
operationalLimitSet.addOperationalLimit(currentLimitPatl);
|
|
5062
|
-
currentLimitPatl.operationalLimitSet = operationalLimitSet;
|
|
5063
|
-
operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5064
|
-
operationalLimitTypePatl.addOperationalLimit(currentLimitPatl);
|
|
5065
|
-
currentLimitPatl.operationalLimitType = operationalLimitTypePatl;
|
|
5066
|
-
operationalLimitSet.terminal = terminal;
|
|
5067
|
-
}
|
|
5068
|
-
else if (currentLimitTatl) {
|
|
5069
|
-
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5070
|
-
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5071
|
-
operationalLimitSet.addOperationalLimit(currentLimitTatl);
|
|
5072
|
-
currentLimitTatl.operationalLimitSet = operationalLimitSet;
|
|
5073
|
-
operationalLimitTypeTatl = this.createIfNotExistOperationalLimitType(cimModel, 'tatl', LimitTypeKind_1.LimitTypeKind.tatl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5074
|
-
operationalLimitTypeTatl.addOperationalLimit(currentLimitTatl);
|
|
5075
|
-
currentLimitTatl.operationalLimitType = operationalLimitTypeTatl;
|
|
5076
|
-
operationalLimitSet.terminal = terminal;
|
|
5077
|
-
}
|
|
5078
|
-
}
|
|
5079
|
-
else if (limit instanceof ApparentPowerLimit_1.ApparentPowerLimit) {
|
|
5080
|
-
let apparentPowerLimit = undefined;
|
|
5081
|
-
if (physLimit != undefined) {
|
|
5082
|
-
apparentPowerLimit = limit;
|
|
5083
|
-
apparentPowerLimit.uuid = common_utils_1.CommonUtils.generateUUID();
|
|
5084
|
-
apparentPowerLimit.name = `${name}`;
|
|
5085
|
-
cimModel.addCurrentLimit(apparentPowerLimit);
|
|
5086
|
-
apparentPowerLimit.value = new ApparentPower_1.ApparentPower(physLimit, UnitMultiplier_1.UnitMultiplier.M, UnitSymbol_1.UnitSymbol.VA);
|
|
5087
|
-
if (apparentPowerLimit) {
|
|
5088
|
-
operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5089
|
-
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5090
|
-
operationalLimitSet.addOperationalLimit(apparentPowerLimit);
|
|
5091
|
-
apparentPowerLimit.operationalLimitSet = operationalLimitSet;
|
|
5092
|
-
operationalLimitTypePatl = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5093
|
-
operationalLimitTypePatl.addOperationalLimit(apparentPowerLimit);
|
|
5094
|
-
apparentPowerLimit.operationalLimitType = operationalLimitTypePatl;
|
|
5095
|
-
operationalLimitSet.terminal = terminal;
|
|
5096
|
-
}
|
|
5097
|
-
}
|
|
4992
|
+
setConductingEquipmentCurrentLimit(cimModel, name, terminal, ir) {
|
|
4993
|
+
const currentLimit = new CurrentLimit_1.CurrentLimit(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
4994
|
+
cimModel.addCurrentLimit(currentLimit);
|
|
4995
|
+
currentLimit.value = new CurrentFlow_1.CurrentFlow(ir, UnitMultiplier_1.UnitMultiplier.none, UnitSymbol_1.UnitSymbol.A);
|
|
4996
|
+
const operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
4997
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
4998
|
+
operationalLimitSet.addOperationalLimit(currentLimit);
|
|
4999
|
+
currentLimit.operationalLimitSet = operationalLimitSet;
|
|
5000
|
+
const operationalLimitType = this.createIfNotExistOperationalLimitType(cimModel, 'patl', LimitTypeKind_1.LimitTypeKind.patl, OperationalLimitDirectionKind_1.OperationalLimitDirectionKind.absoluteValue);
|
|
5001
|
+
operationalLimitType.addOperationalLimit(currentLimit);
|
|
5002
|
+
currentLimit.operationalLimitType = operationalLimitType;
|
|
5003
|
+
operationalLimitSet.terminal = terminal;
|
|
5004
|
+
}
|
|
5005
|
+
setVoltageLimit(cimModel, name, terminal, voltage, type, direction) {
|
|
5006
|
+
const voltageLimit = new VoltageLimit_1.VoltageLimit(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5007
|
+
cimModel.addVoltageLimit(voltageLimit);
|
|
5008
|
+
voltageLimit.value = voltage;
|
|
5009
|
+
const operationalLimitSet = new OperationalLimitSet_1.OperationalLimitSet(common_utils_1.CommonUtils.generateUUID(), `${name}`);
|
|
5010
|
+
cimModel.addOperationalLimitSet(operationalLimitSet);
|
|
5011
|
+
operationalLimitSet.addOperationalLimit(voltageLimit);
|
|
5012
|
+
voltageLimit.operationalLimitSet = operationalLimitSet;
|
|
5013
|
+
const operationalLimitType = this.createIfNotExistOperationalLimitType(cimModel, name, type, direction);
|
|
5014
|
+
operationalLimitType.addOperationalLimit(voltageLimit);
|
|
5015
|
+
voltageLimit.operationalLimitType = operationalLimitType;
|
|
5016
|
+
operationalLimitSet.terminal = terminal;
|
|
5017
|
+
}
|
|
5018
|
+
setACLineSegmentCurrentLimt(cimModel, acLineSegment, nametyp, terminal) {
|
|
5019
|
+
const assetType = this.cimModelDefault.getWireInfoByName(nametyp);
|
|
5020
|
+
if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
5021
|
+
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
5098
5022
|
}
|
|
5099
5023
|
}
|
|
5100
5024
|
createIfNotExistOperationalLimitType(cimModel, name, type, direction) {
|
|
@@ -5126,10 +5050,7 @@ class ConverterIntegral7 {
|
|
|
5126
5050
|
terminal.phases = phase;
|
|
5127
5051
|
terminal.conductingEquipment = conductingEquipment;
|
|
5128
5052
|
conductingEquipment.addTerminal(terminal);
|
|
5129
|
-
terminal.connected =
|
|
5130
|
-
if (terminal.connected === false) {
|
|
5131
|
-
const stop = true;
|
|
5132
|
-
}
|
|
5053
|
+
terminal.connected = connected;
|
|
5133
5054
|
if (!isNameSet) {
|
|
5134
5055
|
terminal.name = (0, util_create_1.createNotation)([conductingEquipment.getUUID().substring(0, 8), '_' + terminal.name], 32, true);
|
|
5135
5056
|
}
|
|
@@ -5139,7 +5060,7 @@ class ConverterIntegral7 {
|
|
|
5139
5060
|
createBoundaryConnection(frame, conductingEquipment, i7ObjectID, phase) {
|
|
5140
5061
|
const cimModel = frame.cimModel;
|
|
5141
5062
|
const anschlussUUID = this.integralID2UUID.get(i7ObjectID);
|
|
5142
|
-
let terminal
|
|
5063
|
+
let terminal;
|
|
5143
5064
|
let cn = undefined;
|
|
5144
5065
|
if (cimModel.objects.has(anschlussUUID)) {
|
|
5145
5066
|
// Anschluss befindet sich im selben Modell
|
|
@@ -5193,7 +5114,7 @@ class ConverterIntegral7 {
|
|
|
5193
5114
|
this.annotateBoundaryNode(frame.name, frame.isoCode, frame.tsoName, cn);
|
|
5194
5115
|
}
|
|
5195
5116
|
else {
|
|
5196
|
-
this.logger.error(`
|
|
5117
|
+
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein Grenz ConnenctivityNode bestimmt werden`);
|
|
5197
5118
|
}
|
|
5198
5119
|
if (terminal) {
|
|
5199
5120
|
terminal.conductingEquipment = conductingEquipment;
|
|
@@ -5201,7 +5122,7 @@ class ConverterIntegral7 {
|
|
|
5201
5122
|
}
|
|
5202
5123
|
}
|
|
5203
5124
|
else {
|
|
5204
|
-
this.logger.error(`
|
|
5125
|
+
this.logger.error(`Für das Objekt ${conductingEquipment.constructor.name} ${conductingEquipment.getUUID()} konnte am I7-Objekt ${i7ObjectID} kein Grenzknoten bestimmt werden`);
|
|
5205
5126
|
}
|
|
5206
5127
|
}
|
|
5207
5128
|
return terminal;
|
|
@@ -5300,7 +5221,6 @@ class ConverterIntegral7 {
|
|
|
5300
5221
|
getSpannungsbandTrafo(i7Data, powerTransformerEnds) {
|
|
5301
5222
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5302
5223
|
return new Promise((resolve) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
5303
|
-
var _a, _b, _c;
|
|
5304
5224
|
let minMaxSollResult;
|
|
5305
5225
|
// Spannungsgeregelter Anschluss
|
|
5306
5226
|
/**
|
|
@@ -5309,18 +5229,9 @@ class ConverterIntegral7 {
|
|
|
5309
5229
|
* 2 - Niederspannungsseite (Anschluss 3)
|
|
5310
5230
|
* 3 - Externer Knoten
|
|
5311
5231
|
* */
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
if (powerTransformerEnds[1] && powerTransformerEnds[1].getTerminal() === undefined) {
|
|
5316
|
-
const stop = true;
|
|
5317
|
-
}
|
|
5318
|
-
if (powerTransformerEnds[2] && powerTransformerEnds[2].getTerminal() === undefined) {
|
|
5319
|
-
const stop = true;
|
|
5320
|
-
}
|
|
5321
|
-
let tempKnotenId = i7Data.spgreg_anschluss === 0 ? this.UUID2Integral7ID.get((_a = powerTransformerEnds[0].getTerminal()) === null || _a === void 0 ? void 0 : _a.getConnectivityNodeUUID())[0] : undefined;
|
|
5322
|
-
tempKnotenId = i7Data.spgreg_anschluss === 1 ? this.UUID2Integral7ID.get((_b = powerTransformerEnds[1].getTerminal()) === null || _b === void 0 ? void 0 : _b.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5323
|
-
tempKnotenId = i7Data.spgreg_anschluss === 2 ? this.UUID2Integral7ID.get((_c = powerTransformerEnds[2].getTerminal()) === null || _c === void 0 ? void 0 : _c.getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5232
|
+
let tempKnotenId = i7Data.spgreg_anschluss === 0 ? this.UUID2Integral7ID.get(powerTransformerEnds[0].getTerminal().getConnectivityNodeUUID())[0] : undefined;
|
|
5233
|
+
tempKnotenId = i7Data.spgreg_anschluss === 1 ? this.UUID2Integral7ID.get(powerTransformerEnds[1].getTerminal().getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5234
|
+
tempKnotenId = i7Data.spgreg_anschluss === 2 ? this.UUID2Integral7ID.get(powerTransformerEnds[2].getTerminal().getConnectivityNodeUUID())[0] : tempKnotenId;
|
|
5324
5235
|
tempKnotenId = i7Data.spgreg_anschluss === 3 ? (i7Data.spgreg_knoten !== undefined ? i7Data.spgreg_knoten : undefined) : tempKnotenId;
|
|
5325
5236
|
if (i7Data.spgreg_anschluss >= 0 && i7Data.spgreg_anschluss <= 2 && tempKnotenId !== undefined) { // Lokale Regelung
|
|
5326
5237
|
// Falls tempKnotenId ausgeprägt ist, bestimme in welcher Tabelle der aKnoten bzw. eKnoten enthalten ist.
|
|
@@ -5640,14 +5551,14 @@ class ConverterIntegral7 {
|
|
|
5640
5551
|
coordinateSystem.crsUrn = crsUrn;
|
|
5641
5552
|
cimModel.addCoordinateSystem(coordinateSystem);
|
|
5642
5553
|
}
|
|
5643
|
-
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7,
|
|
5554
|
+
setPowerTransformerEndProperties(frame, powerTransformerEnd, powerTransformer, terminal, sternpunktKnotenMap, integral7, ir, i7Data, defaultValuesConfig, windings) {
|
|
5644
5555
|
var _a, _b;
|
|
5645
5556
|
const cimModel = frame.cimModel;
|
|
5646
5557
|
if (terminal) {
|
|
5647
5558
|
// Topologie
|
|
5648
5559
|
powerTransformerEnd.terminal = terminal;
|
|
5649
|
-
//
|
|
5650
|
-
this.
|
|
5560
|
+
// CurrentLimit
|
|
5561
|
+
this.setConductingEquipmentCurrentLimit(cimModel, `W${powerTransformerEnd.endNumber}` + (powerTransformer === null || powerTransformer === void 0 ? void 0 : powerTransformer.name), terminal, ir);
|
|
5651
5562
|
let isTrafo2w = i7Data.trafowicklung3w3 === undefined ? true : false;
|
|
5652
5563
|
// Erdung / Sternpunkt
|
|
5653
5564
|
if (sternpunktKnotenMap.has(i7Data.id) && isTrafo2w) {
|
|
@@ -5701,25 +5612,25 @@ class ConverterIntegral7 {
|
|
|
5701
5612
|
}
|
|
5702
5613
|
convertTapChangers(i7Data, transformerEnds, cimModel, transformerinfo, connectivityNode, spannungsband) {
|
|
5703
5614
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5704
|
-
/*if(getUUID(i7Data.guid) === '11e7be86-8bb7-41ba-898a-74cd5e8efbb9'){ //Zeile50
|
|
5615
|
+
/*if(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '11e7be86-8bb7-41ba-898a-74cd5e8efbb9'){ //Zeile50
|
|
5705
5616
|
let stop = true; DONE
|
|
5706
5617
|
}
|
|
5707
|
-
if(getUUID(i7Data.guid) === '1239F03C-ED5B-4FDF-9453-D97E611FCC36'){ //Zeile52 - Datenfehler: Transformatoren mit definierter Zusatzspannung und Stufungsbereich, jedoch 'Stufensteller nicht vorhanden'
|
|
5618
|
+
if(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '1239F03C-ED5B-4FDF-9453-D97E611FCC36'){ //Zeile52 - Datenfehler: Transformatoren mit definierter Zusatzspannung und Stufungsbereich, jedoch 'Stufensteller nicht vorhanden'
|
|
5708
5619
|
let stop = true; DONE
|
|
5709
5620
|
}*/
|
|
5710
|
-
/*if(getUUID(i7Data.guid)=== 'CFDAA56A-A0DA-4C5B-92CC-21138B6D6D07'){ //Standard LR
|
|
5621
|
+
/*if(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid)=== 'CFDAA56A-A0DA-4C5B-92CC-21138B6D6D07'){ //Standard LR
|
|
5711
5622
|
let stop = true;
|
|
5712
5623
|
}*/
|
|
5713
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '00ebe00e-50fa-4fc0-9ed6-557528a9b460') { //Zeile53 - Typ Meeden'
|
|
5624
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '00ebe00e-50fa-4fc0-9ed6-557528a9b460') { //Zeile53 - Typ Meeden'
|
|
5714
5625
|
let stop = true;
|
|
5715
5626
|
}
|
|
5716
|
-
/*if(getUUID(i7Data.guid) === '012416f2d9584971baa93360fcf40be2'){ //Zeile55 - SR statt LR'
|
|
5627
|
+
/*if(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '012416f2d9584971baa93360fcf40be2'){ //Zeile55 - SR statt LR'
|
|
5717
5628
|
let stop = true;
|
|
5718
5629
|
}*/
|
|
5719
|
-
if ((0, parser_utils_1.getUUID)(i7Data.guid) === '515508dc-5982-4686-ad26-08d39db91421') { //Zeile81 - SR statt LR'
|
|
5630
|
+
if ((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '515508dc-5982-4686-ad26-08d39db91421') { //Zeile81 - SR statt LR'
|
|
5720
5631
|
let stop = true;
|
|
5721
5632
|
}
|
|
5722
|
-
/*if(getUUID(i7Data.guid) === '5ec82d14-ee64-43b6-86ff-c7615d96f7ad'){ //Zeile58
|
|
5633
|
+
/*if(getUUID(i7Data.guid, this.objectMappingConfig.standardiseUuid) === '5ec82d14-ee64-43b6-86ff-c7615d96f7ad'){ //Zeile58
|
|
5723
5634
|
let stop = true;
|
|
5724
5635
|
}*/
|
|
5725
5636
|
let ratioPhaseTapChangerPresent = false;
|
|
@@ -5797,23 +5708,21 @@ class ConverterIntegral7 {
|
|
|
5797
5708
|
const spezialRegelung = (0, parser_utils_1.isNumericI7)(i7Data.trafo_spezial) ? i7Data.trafo_spezial : transformerinfo === null || transformerinfo === void 0 ? void 0 : transformerinfo.spezialRegelung;
|
|
5798
5709
|
//const neutralU = transformerEnd.ratedU;
|
|
5799
5710
|
let tapChanger = undefined;
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
//angle is given and angle%180===0 or angle is not given but spezialRegelung, thus => PhaseTapChanger ("Querregler" oder "Schrägregler")
|
|
5711
|
+
if ((0, parser_utils_1.isNumericI7)(angle) && (0, parser_utils_1.convertToNumberI7)(angle) % 180 !== 0 || spezialRegelung) {
|
|
5712
|
+
// Winkel ist definiert =>PST/Queregler/PhaseTapChanger
|
|
5803
5713
|
tapChanger = this.createPhaseTapChanger(i7Data, transformerEnds, cimModel, gestufteSeite, entryI7, transformerinfo);
|
|
5804
5714
|
}
|
|
5805
5715
|
else {
|
|
5806
|
-
//
|
|
5807
|
-
invert = Math.trunc((0, parser_utils_1.convertToNumberI7)(angle) / 180) % 2 === 0 ? 1 : -1;
|
|
5716
|
+
// Winkel ist nicht definiert => Längsregler/RatioTapChanger
|
|
5808
5717
|
tapChanger = this.createRatioTapChanger(i7Data, transformerEnds, cimModel, connectivityNode, gestufteSeite, entryI7, spannungsband, transformerinfo);
|
|
5809
5718
|
}
|
|
5810
5719
|
// Stufen
|
|
5811
|
-
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent,
|
|
5720
|
+
this.setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, entryI7, ratioPhaseTapChangerPresent, tapChangerInfo);
|
|
5812
5721
|
let stop = true;
|
|
5813
5722
|
}
|
|
5814
5723
|
let stop = true;
|
|
5815
5724
|
}
|
|
5816
|
-
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent,
|
|
5725
|
+
setTapChangerVoltageProperties(i7Data, cimModel, tapChanger, tapChangerNumber, ratioPhaseTapChangerPresent, tapChangerInfo) {
|
|
5817
5726
|
var _a;
|
|
5818
5727
|
let lowStep = (0, parser_utils_1.isNumericI7)(i7Data[`minstufe_s${tapChangerNumber}`])
|
|
5819
5728
|
? i7Data[`minstufe_s${tapChangerNumber}`]
|
|
@@ -5835,66 +5744,43 @@ class ConverterIntegral7 {
|
|
|
5835
5744
|
const neutralStepIndex = i7TapArray.indexOf(neutralStep);*/
|
|
5836
5745
|
const lowerVoltageStepCount = (0, utils_2.getTapChangerStepCount)(lowStep, neutralStep);
|
|
5837
5746
|
const upperVoltageStepCount = (0, utils_2.getTapChangerStepCount)(neutralStep, highStep);
|
|
5838
|
-
|
|
5747
|
+
const uMin = (0, parser_utils_1.isNumericI7)(i7Data[`umin_s${tapChangerNumber}`])
|
|
5839
5748
|
? i7Data[`umin_s${tapChangerNumber}`]
|
|
5840
5749
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMin;
|
|
5841
|
-
|
|
5750
|
+
const uMax = (0, parser_utils_1.isNumericI7)(i7Data[`umax_s${tapChangerNumber}`])
|
|
5842
5751
|
? i7Data[`umax_s${tapChangerNumber}`]
|
|
5843
5752
|
: tapChangerInfo === null || tapChangerInfo === void 0 ? void 0 : tapChangerInfo.uMax;
|
|
5844
|
-
let
|
|
5753
|
+
let lowerVoltageStepIncrement = Math.abs(uMin / lowerVoltageStepCount);
|
|
5845
5754
|
let upperVoltageStepIncrement = Math.abs(uMax / upperVoltageStepCount);
|
|
5846
5755
|
let increaseVoltageStepIncrement = (0, parser_utils_1.isNumericI7)(upperVoltageStepIncrement) ? upperVoltageStepIncrement : 0;
|
|
5847
5756
|
if (tapChanger instanceof RatioTapChanger_1.RatioTapChanger) {
|
|
5848
5757
|
const ratioTapChanger = tapChanger;
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
//test for uMin and uMax voltage add are not symmetrical...
|
|
5852
|
-
if (Math.abs(lowerVoltageStepDecrement) !== Math.abs(upperVoltageStepIncrement) || uMax < uMin || uMax === uMin || ratioPhaseTapChangerPresent) {
|
|
5853
|
-
if (uMax === uMin) {
|
|
5854
|
-
const stop = true;
|
|
5855
|
-
}
|
|
5758
|
+
// Min/Max Zusatzspannung sind nicht symmetrisch
|
|
5759
|
+
if (Math.abs(lowerVoltageStepIncrement) !== Math.abs(upperVoltageStepIncrement) || uMax < uMin || ratioPhaseTapChangerPresent) {
|
|
5856
5760
|
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(common_utils_1.CommonUtils.generateUUID(), `${i7Data.bezeichner} W_${tapChangerNumber}`);
|
|
5857
5761
|
let step_tmp = 0;
|
|
5858
5762
|
let start_step_tmp = step_tmp;
|
|
5859
|
-
//
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
step_tmp = i;
|
|
5864
|
-
}
|
|
5865
|
-
}
|
|
5866
|
-
else {
|
|
5867
|
-
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5868
|
-
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((lowerVoltageStepDecrement * Math.abs(lowerVoltageStepCount - i)) / 100)));
|
|
5869
|
-
step_tmp = i;
|
|
5870
|
-
}
|
|
5763
|
+
// Spannung verringern
|
|
5764
|
+
for (let i = 0; i < Math.abs(lowerVoltageStepCount); i++) {
|
|
5765
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((lowerVoltageStepIncrement * Math.abs(lowerVoltageStepCount - i)) / 100)));
|
|
5766
|
+
step_tmp = i;
|
|
5871
5767
|
}
|
|
5872
|
-
//neutral
|
|
5768
|
+
// neutral Step
|
|
5873
5769
|
step_tmp++;
|
|
5874
5770
|
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[step_tmp], 1);
|
|
5875
5771
|
step_tmp++;
|
|
5876
5772
|
start_step_tmp = step_tmp;
|
|
5877
|
-
//
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)));
|
|
5881
|
-
}
|
|
5882
|
-
}
|
|
5883
|
-
else {
|
|
5884
|
-
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5885
|
-
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 - ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)));
|
|
5886
|
-
}
|
|
5773
|
+
// Spannung erhoehen
|
|
5774
|
+
for (let i = start_step_tmp; i < start_step_tmp + Math.abs(upperVoltageStepCount); i++) {
|
|
5775
|
+
(0, util_create_1.createRatioTapChangerTablePoint)(ratioTapChangerTable, i7TapArray[i], (1 + ((upperVoltageStepIncrement * (i - start_step_tmp + 1)) / 100)));
|
|
5887
5776
|
}
|
|
5888
5777
|
tapChanger.ratioTapChangerTable = ratioTapChangerTable;
|
|
5889
5778
|
ratioTapChangerTable.ratioTapChanger = tapChanger;
|
|
5890
|
-
//
|
|
5891
|
-
|
|
5779
|
+
// Durchschnitt
|
|
5780
|
+
ratioTapChanger.stepVoltageIncrement = Math.abs(Math.round(lowerVoltageStepIncrement)) + Math.abs(Math.round(increaseVoltageStepIncrement)) / 2;
|
|
5892
5781
|
cimModel.addRatioTapChangerTable(ratioTapChangerTable);
|
|
5893
5782
|
}
|
|
5894
|
-
|
|
5895
|
-
//uMin and uMax are symmetrical
|
|
5896
|
-
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
5897
|
-
}
|
|
5783
|
+
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
5898
5784
|
}
|
|
5899
5785
|
if (tapChanger instanceof PhaseTapChangerNonLinear_1.PhaseTapChangerNonLinear) {
|
|
5900
5786
|
tapChanger.voltageStepIncrement = increaseVoltageStepIncrement;
|
|
@@ -5907,8 +5793,8 @@ class ConverterIntegral7 {
|
|
|
5907
5793
|
tapChanger.neutralStep = neutralStep;
|
|
5908
5794
|
tapChanger.normalStep = currentStep;
|
|
5909
5795
|
tapChanger.step = currentStep;
|
|
5910
|
-
if (Math.abs(
|
|
5911
|
-
this.logger.info(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${
|
|
5796
|
+
if (Math.abs(lowerVoltageStepIncrement) !== Math.abs(increaseVoltageStepIncrement)) {
|
|
5797
|
+
this.logger.info(`Trafo ${i7Data.id}: Zusatzspannung Min/Max sind nicht symmetrisch MIN ${lowerVoltageStepIncrement} MAX ${increaseVoltageStepIncrement}. Das Attribut voltageStepIncrement i.H.v ${increaseVoltageStepIncrement} könnte inkorrekt sein.`);
|
|
5912
5798
|
}
|
|
5913
5799
|
}
|
|
5914
5800
|
createRatioTapChanger(i7Data, transformerEnds, cimModel, regulatingConnectivityNode, gestufteSeite, tapChangerNumber, spannungsband, transformerinfo) {
|
|
@@ -5925,9 +5811,6 @@ class ConverterIntegral7 {
|
|
|
5925
5811
|
* */
|
|
5926
5812
|
/** Regelung */
|
|
5927
5813
|
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`), this.objectMappingConfig.standardiseUuid), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
5928
|
-
if (ratioTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
5929
|
-
const stop = true;
|
|
5930
|
-
}
|
|
5931
5814
|
ratioTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(`i7Data.unter_last_nicht_verstellbar_s${gestufteSeite}`) ? !(0, parser_utils_1.convertToBooleanI7)(`i7Data.unter_last_nicht_verstellbar_s${gestufteSeite}`) : false;
|
|
5932
5815
|
ratioTapChanger.transformerEnd = transformerEnd;
|
|
5933
5816
|
//transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
@@ -5969,7 +5852,7 @@ class ConverterIntegral7 {
|
|
|
5969
5852
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
5970
5853
|
}
|
|
5971
5854
|
else {
|
|
5972
|
-
this.logger.
|
|
5855
|
+
this.logger.error(`Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
5973
5856
|
}
|
|
5974
5857
|
cimModel.addRatioTapChanger(ratioTapChanger);
|
|
5975
5858
|
return ratioTapChanger;
|
|
@@ -6017,24 +5900,14 @@ class ConverterIntegral7 {
|
|
|
6017
5900
|
}
|
|
6018
5901
|
default: {
|
|
6019
5902
|
// There is no information given about special tapchanger control, thus create PhaseTapChangerLinear
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
const phaseTapChangerAsym = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`)), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
6024
|
-
phaseTapChangerAsym.windingConnectionAngle = winkel;
|
|
6025
|
-
phaseTapChanger = phaseTapChangerAsym;
|
|
6026
|
-
cimModel.addPhaseTapChangerAsymmetrical(phaseTapChangerAsym);
|
|
5903
|
+
const phaseTapChangerLin = new PhaseTapChangerLinear_1.PhaseTapChangerLinear((0, parser_utils_1.getUUID)(eval(`i7Data.guid_tch${tapChangerNumber}`), this.objectMappingConfig.standardiseUuid), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
5904
|
+
phaseTapChanger = phaseTapChangerLin;
|
|
5905
|
+
cimModel.addPhaseTapChangerLinear(phaseTapChangerLin);
|
|
6027
5906
|
break;
|
|
6028
5907
|
}
|
|
6029
5908
|
}
|
|
6030
|
-
if (phaseTapChanger.mrid === "df659ba2-a075-4f7d-bdd6-6b038cae962a") {
|
|
6031
|
-
const stop = true;
|
|
6032
|
-
}
|
|
6033
|
-
if (phaseTapChanger.mrid === "3d0bdc23-fe46-408d-99b3-369a02d28a28") {
|
|
6034
|
-
const stop = true;
|
|
6035
|
-
}
|
|
6036
5909
|
// Attribute
|
|
6037
|
-
phaseTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(
|
|
5910
|
+
phaseTapChanger.ltcFlag = (0, parser_utils_1.isNumericI7)(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`) ? (0, parser_utils_1.convertToBooleanI7)(`i7Data.unter_last_nicht_verstellbar_s${tapChangerNumber}`) : false;
|
|
6038
5911
|
phaseTapChanger.transformerEnd = transformerEnd;
|
|
6039
5912
|
//transformerEnd.phaseTapChanger = phaseTapChanger;
|
|
6040
5913
|
// Wirkleistungsregelung Anschluss
|
|
@@ -6073,7 +5946,7 @@ class ConverterIntegral7 {
|
|
|
6073
5946
|
cimModel.addTapChangerControl(tapChangerControl);
|
|
6074
5947
|
}
|
|
6075
5948
|
else {
|
|
6076
|
-
this.logger.
|
|
5949
|
+
this.logger.error(`Trafo ${i7Data.id}: Trafo ${i7Data.id}: TapChangerControl konnte nicht erstellt werden.`);
|
|
6077
5950
|
}
|
|
6078
5951
|
return phaseTapChanger;
|
|
6079
5952
|
}
|
|
@@ -6395,98 +6268,32 @@ function getGeoCoordinates(i7Data) {
|
|
|
6395
6268
|
return undefined;
|
|
6396
6269
|
}
|
|
6397
6270
|
exports.getGeoCoordinates = getGeoCoordinates;
|
|
6398
|
-
function getDCNodeFromConverter(acDcConverter
|
|
6271
|
+
function getDCNodeFromConverter(acDcConverter) {
|
|
6399
6272
|
let ret_val = undefined;
|
|
6400
6273
|
if (acDcConverter.dCTerminals) {
|
|
6401
6274
|
for (const terminal of acDcConverter.dCTerminals.values()) {
|
|
6402
|
-
if (terminal.dcNode
|
|
6275
|
+
if (terminal.dcNode) {
|
|
6403
6276
|
ret_val = terminal.dcNode;
|
|
6404
6277
|
}
|
|
6405
6278
|
}
|
|
6406
6279
|
}
|
|
6407
6280
|
return ret_val;
|
|
6408
6281
|
}
|
|
6409
|
-
function createDCGround(cimModel, acDCConverter, i7Data) {
|
|
6410
|
-
const dcConverterUnit = acDCConverter.equipmentContainer;
|
|
6411
|
-
const dcGround = new DCGround_1.DCGround((0, parser_utils_1.getUUID)(i7Data.guid_dcground), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG'], 32, true));
|
|
6412
|
-
const dcTerminalG = new DCTerminal_1.DCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalg), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCG_DCT']));
|
|
6413
|
-
const dcTerminalM1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
6414
|
-
const dcNodeG = new DCNode_1.DCNode((0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1));
|
|
6415
|
-
dcTerminalG.dCConductingEquipment = dcGround;
|
|
6416
|
-
dcTerminalM1.dCConductingEquipment = acDCConverter;
|
|
6417
|
-
dcTerminalM1.polarity = DCPolarityKind_1.DCPolarityKind.middle;
|
|
6418
|
-
dcTerminalG.dcNode = dcNodeG;
|
|
6419
|
-
dcTerminalM1.dcNode = dcNodeG;
|
|
6420
|
-
dcGround.equipmentContainer = dcConverterUnit;
|
|
6421
|
-
dcGround.dCTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6422
|
-
dcNodeG.dcEquipmentContainer = dcConverterUnit;
|
|
6423
|
-
dcNodeG.dcTerminals.set(dcTerminalG.getUUID(), dcTerminalG);
|
|
6424
|
-
dcNodeG.dcTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6425
|
-
acDCConverter.dCTerminals.set(dcTerminalM1.getUUID(), dcTerminalM1);
|
|
6426
|
-
cimModel.addDCTerminal(dcTerminalG);
|
|
6427
|
-
cimModel.addDCGround(dcGround);
|
|
6428
|
-
cimModel.addDCGroundTerminal(dcTerminalM1);
|
|
6429
|
-
cimModel.addDCNode(dcNodeG);
|
|
6430
|
-
/** EQ-SC */
|
|
6431
|
-
dcGround.r = undefined;
|
|
6432
|
-
dcGround.inductance = undefined;
|
|
6433
|
-
return dcNodeG;
|
|
6434
|
-
}
|
|
6435
|
-
/**
|
|
6436
|
-
*
|
|
6437
|
-
* @param acDCConverter
|
|
6438
|
-
* @param i7Data
|
|
6439
|
-
* @param endNumber Start means a value of '1'. Target means a value of '2'.
|
|
6440
|
-
*/
|
|
6441
|
-
function connectDCGround(cimModel, acdcConverter, i7Data, dcNode, polarity) {
|
|
6442
|
-
let dcTerminalMx = undefined;
|
|
6443
|
-
let dcNodeG = dcNode;
|
|
6444
|
-
const dcTerminalM1UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm1);
|
|
6445
|
-
const dcTerminalM2UUID = (0, parser_utils_1.getUUID)(i7Data.guid_dcterminalm2);
|
|
6446
|
-
if (dcNodeG.dcTerminals.get(dcTerminalM1UUID)) {
|
|
6447
|
-
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM2UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_NEG', '_DCT']));
|
|
6448
|
-
}
|
|
6449
|
-
else {
|
|
6450
|
-
dcTerminalMx = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(dcTerminalM1UUID), (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_DCT']));
|
|
6451
|
-
}
|
|
6452
|
-
dcTerminalMx.polarity = polarity;
|
|
6453
|
-
dcNodeG.dcTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6454
|
-
acdcConverter.dCTerminals.set(dcTerminalMx.getUUID(), dcTerminalMx);
|
|
6455
|
-
dcTerminalMx.dCConductingEquipment = acdcConverter;
|
|
6456
|
-
dcTerminalMx.dcNode = dcNodeG;
|
|
6457
|
-
cimModel.addDCGroundTerminal(dcTerminalMx);
|
|
6458
|
-
}
|
|
6459
|
-
function createNeutralGroundReturn(cimModel, i7Data, acdcConverterStart, acdcConverterTarget) {
|
|
6460
|
-
let dcNodeM1 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterStart.getUUID());
|
|
6461
|
-
let dcNodeM2 = (0, utils_1.getDCNodeGroundByDCConverterUnit)(cimModel, acdcConverterTarget.getUUID());
|
|
6462
|
-
let dcTerminalN1 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineStart_DCT']));
|
|
6463
|
-
let dcTerminalN2 = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal((0, parser_utils_1.getUUID)(undefined), (0, util_create_1.createNotation)(['NeutrallineTarget_DCT']));
|
|
6464
|
-
//let dcNeutralLine:DCLineSegment = new DCLineSegment(getUUID(undefined), createNotation([getName(i7Data), '_neutral','_DCLS'],32,true), createNotation([i7Data.kurzname,'_neg'],12,true), 'neutral line not contained in INT7 data model');
|
|
6465
|
-
if (dcNodeM1 !== undefined) {
|
|
6466
|
-
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6467
|
-
acdcConverterStart.dCTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6468
|
-
}
|
|
6469
|
-
else {
|
|
6470
|
-
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem1);
|
|
6471
|
-
dcNodeM1 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M1');
|
|
6472
|
-
dcNodeM1.dcTerminals.set(dcTerminalN1.getUUID(), dcTerminalN1);
|
|
6473
|
-
dcTerminalN1.dCConductingEquipment = undefined;
|
|
6474
|
-
}
|
|
6475
|
-
if (dcNodeM2 !== undefined) {
|
|
6476
|
-
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6477
|
-
}
|
|
6478
|
-
else {
|
|
6479
|
-
const uuid = (0, parser_utils_1.getUUID)(i7Data.guid_dcnodem2);
|
|
6480
|
-
dcNodeM2 = new DCNode_1.DCNode(uuid, (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', uuid.substring(0, 8), '_DCCN'], 32, true), 'M2');
|
|
6481
|
-
dcNodeM2.dcTerminals.set(dcTerminalN2.getUUID(), dcTerminalN2);
|
|
6482
|
-
}
|
|
6483
|
-
cimModel.addACDCConverterDCTerminal(dcTerminalN1);
|
|
6484
|
-
cimModel.addACDCConverterDCTerminal(dcTerminalN2);
|
|
6485
|
-
//cimModel.addDCLineSegment(dcNeutralLineSegment);
|
|
6486
|
-
//cimModel.addDCLine(dcNeutralLine);
|
|
6487
|
-
}
|
|
6488
6282
|
function logExecutionTime(logger, startTime, text) {
|
|
6489
6283
|
logger.debug(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6490
6284
|
console.log(`${text} ${(perf_hooks.performance.now() - startTime) / 1000} seconds`);
|
|
6491
6285
|
}
|
|
6286
|
+
function createDCGround(acdcConverter) {
|
|
6287
|
+
// TODO
|
|
6288
|
+
return new DCGround_1.DCGround();
|
|
6289
|
+
}
|
|
6290
|
+
exports.createDCGround = createDCGround;
|
|
6291
|
+
function createNeutralGroundReturn(dcConverterUnit1, dcConverterUnit12) {
|
|
6292
|
+
// TODO
|
|
6293
|
+
}
|
|
6294
|
+
exports.createNeutralGroundReturn = createNeutralGroundReturn;
|
|
6295
|
+
function connectDCGround(acdcConverter) {
|
|
6296
|
+
// TODO
|
|
6297
|
+
}
|
|
6298
|
+
exports.connectDCGround = connectDCGround;
|
|
6492
6299
|
//# sourceMappingURL=converter.integral7.js.map
|