@enervance/insight-cim-model 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.utils.js +2 -1
- package/dist/config/config.utils.js.map +1 -1
- package/dist/config/westnetz-neplan/callbacks/cb-psr.js +17 -5
- package/dist/config/westnetz-neplan/callbacks/cb-psr.js.map +1 -1
- package/dist/config/westnetz-neplan/property-handler-westenergy.config.d.ts +19 -19
- package/dist/converter/integral7/converter-i7.d.ts +4 -2
- package/dist/converter/integral7/converter-i7.js +327 -251
- package/dist/converter/integral7/converter-i7.js.map +1 -1
- package/dist/converter/integral7/interface-i7/export-frame-i7.js +14 -7
- package/dist/converter/integral7/interface-i7/export-frame-i7.js.map +1 -1
- package/dist/converter/integral7/model/interfaces.d.ts +2 -0
- package/dist/converter/integral7/sql/integral.sql.js +1 -0
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils-cgmes-export.js +6 -0
- package/dist/converter/integral7/utils-cgmes-export.js.map +1 -1
- package/dist/converter/integral7/utils.js +9 -1
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl/etl-neplan/etl-neplan-csv.js +6 -8
- package/dist/etl/etl-neplan/etl-neplan-csv.js.map +1 -1
- package/dist/etl/etl-neplan/etl-neplan-geo.js +0 -1
- package/dist/etl/etl-neplan/etl-neplan-geo.js.map +1 -1
- package/dist/etl/etl-neplan/etl-neplan.d.ts +0 -1
- package/dist/etl/etl-neplan/etl-neplan.js +8 -31
- package/dist/etl/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/persistence-interfaces.d.ts +16 -0
- package/dist/interfaces/persistence-interfaces.js +7 -0
- package/dist/interfaces/persistence-interfaces.js.map +1 -1
- package/dist/model/assets/Asset.js +2 -1
- package/dist/model/assets/Asset.js.map +1 -1
- package/dist/model/assets/AssetDeployment.js +2 -2
- package/dist/model/assets/AssetDeployment.js.map +1 -1
- package/dist/model/assets/DeploymentDate.js +1 -1
- package/dist/model/assets/DeploymentDate.js.map +1 -1
- package/dist/model/common/Location.js +22 -22
- package/dist/model/core/PowerSystemResource.d.ts +1 -0
- package/dist/model/core/PowerSystemResource.js +7 -0
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/Terminal.js +31 -31
- package/dist/model/wires/PhaseTapChangerSymmetrical.js +1 -1
- package/dist/model/wires/PhaseTapChangerSymmetrical.js.map +1 -1
- package/dist/model/wires/PowerTransformer.js.map +1 -1
- package/dist/model/wires/RegulatingCondEq.js +1 -1
- package/dist/model/wires/RegulatingCondEq.js.map +1 -1
- package/dist/util/sparql/sparql-utils.d.ts +7 -0
- package/dist/util/sparql/sparql-utils.js +63 -1
- package/dist/util/sparql/sparql-utils.js.map +1 -1
- package/dist/util/util-create.js +14 -18
- package/dist/util/util-create.js.map +1 -1
- package/package.json +1 -1
|
@@ -112,6 +112,10 @@ const AsynchronousMachine_1 = require("../../model/wires/AsynchronousMachine");
|
|
|
112
112
|
const EquivalentBranch_1 = require("../../model/equivalents/EquivalentBranch");
|
|
113
113
|
const AMPRIONLine_1 = require("../../model/extensions/amprion/core/AMPRIONLine");
|
|
114
114
|
const ControlArea_1 = require("../../model/operations/ControlArea");
|
|
115
|
+
const PhaseTapChangerSymmetrical_1 = require("../../model/wires/PhaseTapChangerSymmetrical");
|
|
116
|
+
const RatioTapChangerTable_1 = require("../../model/wires/RatioTapChangerTable");
|
|
117
|
+
const RatioTapChanger_1 = require("../../model/wires/RatioTapChanger");
|
|
118
|
+
const TransformerControlMode_1 = require("../../model/wires/TransformerControlMode");
|
|
115
119
|
class ConverterI7 {
|
|
116
120
|
constructor() {
|
|
117
121
|
this.exportFrames = new Map();
|
|
@@ -135,7 +139,6 @@ class ConverterI7 {
|
|
|
135
139
|
convert(objectMappingConfig, defaultValuesConfig, energyTypesConfig, exportConfig, tempDirPath) {
|
|
136
140
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
137
141
|
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
var _a, _b;
|
|
139
142
|
try {
|
|
140
143
|
yield this.createColumnIndex();
|
|
141
144
|
yield this.configExportFrames(exportConfig, defaultValuesConfig, tempDirPath);
|
|
@@ -148,6 +151,7 @@ class ConverterI7 {
|
|
|
148
151
|
yield this.queryLDroselAnschlussIDs();
|
|
149
152
|
yield this.queryErsatzLaengsAnschlussIDs();
|
|
150
153
|
yield this.queryLkondensatorAnschlussIDs();
|
|
154
|
+
console.log('Convert BD Profiles');
|
|
151
155
|
for (const entry of this.exportFramesBoundary.entries()) {
|
|
152
156
|
const geoRegionUUID = entry[0];
|
|
153
157
|
const frame = entry[1];
|
|
@@ -156,33 +160,38 @@ class ConverterI7 {
|
|
|
156
160
|
continue;
|
|
157
161
|
yield this.convertFrame(frame, geoRegion, objectMappingConfig, energyTypesConfig, defaultValuesConfig);
|
|
158
162
|
}
|
|
163
|
+
console.log('Convert MAS Profiles');
|
|
159
164
|
for (const entry of this.exportFrames.entries()) {
|
|
160
165
|
const geoRegionUUID = entry[0];
|
|
161
166
|
const frame = entry[1];
|
|
162
167
|
const geoRegion = frame.cimModel.getGeographicalRegion(geoRegionUUID);
|
|
163
168
|
if (!geoRegion)
|
|
164
169
|
continue;
|
|
165
|
-
|
|
170
|
+
console.log(`Convert MAS profile: ${frame.mas}`);
|
|
166
171
|
yield this.convertFrame(frame, geoRegion, objectMappingConfig, energyTypesConfig, defaultValuesConfig);
|
|
167
172
|
frame.validateCIMModel();
|
|
168
173
|
const startTime = perf_hooks_1.performance.now();
|
|
169
174
|
frame.openXMLModel();
|
|
175
|
+
console.log(`Serialize MAS profile: ${frame.mas}`);
|
|
170
176
|
frame.serializeModel(defaultValuesConfig);
|
|
171
177
|
yield frame.closeXMLModel();
|
|
172
178
|
let endTime = perf_hooks_1.performance.now();
|
|
173
179
|
frame.cimModel.purgeData();
|
|
174
180
|
console.log(`\nSerializeModel ${geoRegion.name} ${(endTime - startTime) / 1000} seconds\n`);
|
|
175
181
|
}
|
|
182
|
+
console.log('Serialize BD Profiles');
|
|
176
183
|
for (const entry of this.exportFramesBoundary.entries()) {
|
|
177
184
|
const geoRegionUUID = entry[0];
|
|
178
185
|
const frame = entry[1];
|
|
179
186
|
const geoRegion = frame.cimModel.getGeographicalRegion(geoRegionUUID);
|
|
180
187
|
if (!geoRegion)
|
|
181
188
|
continue;
|
|
182
|
-
|
|
189
|
+
console.log('Transform MAS Profiles');
|
|
190
|
+
yield this.transformBoundaryModel(frame, [...this.exportFrames.values()]);
|
|
183
191
|
frame.validateCIMModel();
|
|
184
192
|
const startTime = perf_hooks_1.performance.now();
|
|
185
193
|
frame.openXMLModel();
|
|
194
|
+
console.log(`Serialize BD profile: ${frame.mas}`);
|
|
186
195
|
frame.serializeModel(defaultValuesConfig);
|
|
187
196
|
yield frame.closeXMLModel();
|
|
188
197
|
let endTime = perf_hooks_1.performance.now();
|
|
@@ -386,7 +395,7 @@ class ConverterI7 {
|
|
|
386
395
|
yield this.convertLeitungen(frame, integral7Modell, defaultValuesConfig);
|
|
387
396
|
logExecutionTime(this.logger, startTime, `convertLeitungen`);
|
|
388
397
|
startTime = perf_hooks_1.performance.now();
|
|
389
|
-
yield this.convertErsatzLaengszweige(
|
|
398
|
+
yield this.convertErsatzLaengszweige(frame, integral7Modell, defaultValuesConfig);
|
|
390
399
|
logExecutionTime(this.logger, startTime, `convertErsatzlaengszweige`);
|
|
391
400
|
}
|
|
392
401
|
startTime = perf_hooks_1.performance.now();
|
|
@@ -409,7 +418,7 @@ class ConverterI7 {
|
|
|
409
418
|
.then((result) => {
|
|
410
419
|
for (const i7Data of result) {
|
|
411
420
|
const i7Schluesel = integral_prefix_1.GEOREGION_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
412
|
-
const region = new GeographicalRegion_1.GeographicalRegion(utils_1.getUUID(i7Data.guid), utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
421
|
+
const region = new GeographicalRegion_1.GeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_GR", `_${regions.length}`.toString()]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
413
422
|
this.addIdMapping(i7Data.id, region.mrid, integral_sql_1.Integral7TableNames.REGION);
|
|
414
423
|
regions.push(region);
|
|
415
424
|
}
|
|
@@ -433,8 +442,8 @@ class ConverterI7 {
|
|
|
433
442
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.REGELZONE)) {
|
|
434
443
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.REGELZONE, 0, 0, []));
|
|
435
444
|
for (const i7Data of result) {
|
|
436
|
-
const
|
|
437
|
-
const ctrlarea = new ControlArea_1.ControlArea(utils_1.getUUID(i7Data.guid),
|
|
445
|
+
const i7Schluessel = integral_prefix_1.REGELZONE_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
446
|
+
const ctrlarea = new ControlArea_1.ControlArea(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_RZ", `_${cimModel.controlArea.size}`.toString()]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluessel);
|
|
438
447
|
cimModel.addControlArea(ctrlarea);
|
|
439
448
|
this.addIdMapping(i7Data.id, ctrlarea.mrid, integral_sql_1.Integral7TableNames.REGELZONE);
|
|
440
449
|
}
|
|
@@ -453,11 +462,11 @@ class ConverterI7 {
|
|
|
453
462
|
.then((result) => {
|
|
454
463
|
for (const i7Data of result) {
|
|
455
464
|
const i7Schluesel = integral_prefix_1.SUBGEOREGION_PRAEFIX + utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
456
|
-
const subregion = new SubGeographicalRegion_1.SubGeographicalRegion(utils_1.getUUID(i7Data.guid), utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
465
|
+
const subregion = new SubGeographicalRegion_1.SubGeographicalRegion(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.ueberpruefeZeichenkette(i7Data.bezeichner), "_SGR", `_${subRegions.length}`.toString()]), utils_2.ueberpruefeZeichenkette(i7Data.kurzname), i7Schluesel);
|
|
457
466
|
const regionUUID = this.integralID2UUID.get(i7Data.georegion);
|
|
458
467
|
let region = regions.find(elem => elem.mrid === regionUUID);
|
|
459
468
|
if (!region) {
|
|
460
|
-
region = utils_1.createIfNotExitsGeoregionByName(this.cimModelDefault, defaultValuesConfig.GeographicalRegion.name);
|
|
469
|
+
region = utils_1.createIfNotExitsGeoregionByName(this.cimModelDefault, util_create_1.createNotation([defaultValuesConfig.GeographicalRegion.name, "_GR", `_${regions.length}`.toString()]));
|
|
461
470
|
this.logger.debug(`SubGeographicalRegion UUID ${subregion.mrid} I7-ID ${i7Data.id} Name ${i7Data.bezeichner} hat keine Region.`);
|
|
462
471
|
}
|
|
463
472
|
subregion.region = region;
|
|
@@ -489,7 +498,7 @@ class ConverterI7 {
|
|
|
489
498
|
utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
490
499
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
491
500
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
492
|
-
const i7name = util_create_1.createNotation([utils_2.getName(i7Data), utils_2.ueberpruefeZeichenkette(i7Data.ukz)], 32);
|
|
501
|
+
const i7name = util_create_1.createNotation([utils_2.getName(i7Data), "_", utils_2.ueberpruefeZeichenkette(i7Data.ukz)], 32);
|
|
493
502
|
const substation = new AMPRIONSubstation_1.AMPRIONSubstation(utils_1.getUUID(i7Data.guid), i7name, i7Data.id + '', i7Schluessel, i7Data.stationsnummer, i7Data.ukz);
|
|
494
503
|
let subregion = cimModel.getSubGeographicalRegion(this.integralID2UUID.get(i7Data.subgeoregion));
|
|
495
504
|
if (!subregion) {
|
|
@@ -541,7 +550,7 @@ class ConverterI7 {
|
|
|
541
550
|
i7Data.un +
|
|
542
551
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
543
552
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
544
|
-
const vl = new VoltageLevel_1.VoltageLevel(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, i7Schluessel);
|
|
553
|
+
const vl = new VoltageLevel_1.VoltageLevel(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_VL", `_${cimModel.voltageLevels.size}`.toString()]), i7Data.kurzname, i7Schluessel);
|
|
545
554
|
const un = utils_2.getU(i7Data.un, defaultValuesConfig.DefaultVoltage);
|
|
546
555
|
const baseVoltage = util_create_1.createBaseVoltageIfNotExists(cimModel, un, this.exportFramesBoundary);
|
|
547
556
|
vl.baseVoltage = baseVoltage;
|
|
@@ -593,7 +602,7 @@ class ConverterI7 {
|
|
|
593
602
|
const i7Schluessel = voltageLevel.description +
|
|
594
603
|
integral_prefix_1.SCHALTFELD_PRAEFIX +
|
|
595
604
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
596
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, i7Schluessel);
|
|
605
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B", `_${cimModel.bays.size}`.toString()]), i7Data.kurzname, i7Schluessel);
|
|
597
606
|
bay.number = i7Data.feldnummer + '';
|
|
598
607
|
bay.locationID = i7Data.ips_folder_id;
|
|
599
608
|
bay.voltageLevel = voltageLevel;
|
|
@@ -620,8 +629,8 @@ class ConverterI7 {
|
|
|
620
629
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_SO, standortIDs));
|
|
621
630
|
for (const i7Data of result) {
|
|
622
631
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
623
|
-
const vl = new VoltageLevel_1.VoltageLevel(utils_1.generateUUID(),
|
|
624
|
-
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid),
|
|
632
|
+
const vl = new VoltageLevel_1.VoltageLevel(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_VL", `_${cimModel.voltageLevels.size}`.toString()]), i7Data.kurzname);
|
|
633
|
+
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), String(i7Data.id));
|
|
625
634
|
connectivityNode.setConnectivityNodeContainer(vl);
|
|
626
635
|
vl.addConnectivityNode(connectivityNode);
|
|
627
636
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
@@ -668,10 +677,10 @@ class ConverterI7 {
|
|
|
668
677
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SAMMELSCHIENE, schaltanlagenAbschnittIDs));
|
|
669
678
|
for (const i7Data of result) {
|
|
670
679
|
const i7Schaltanlagenabschnitt = integral7.integralSchaltanlagenAbschnitte.get(i7Data.saabschnitt);
|
|
671
|
-
const busbarSection = new BusbarSection_1.BusbarSection(utils_1.generateUUID(), utils_2.getName(i7Schaltanlagenabschnitt), i7Schaltanlagenabschnitt.kurzname);
|
|
680
|
+
const busbarSection = new BusbarSection_1.BusbarSection(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Schaltanlagenabschnitt), "_BBS", `_${cimModel.busbarSections.size}`.toString()]), i7Schaltanlagenabschnitt.kurzname);
|
|
672
681
|
busbarSection.ipMax = i7Data.limit_ip;
|
|
673
682
|
busbarSection.aggregate = false;
|
|
674
|
-
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.
|
|
683
|
+
const connectivityNode = new AMPRIONConnectivityNode_1.AMPRIONConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), i7Data.id.toString());
|
|
675
684
|
const terminal = this.createConnection(cimModel, busbarSection, connectivityNode, PhaseCode_1.PhaseCode.ABC, true, 1);
|
|
676
685
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Schaltanlagenabschnitt.id));
|
|
677
686
|
connectivityNode.nodeNumber = i7Data.id_psse_cape;
|
|
@@ -711,7 +720,7 @@ class ConverterI7 {
|
|
|
711
720
|
const result = yield this.queryDataInChuncks(integral_sql_1.I7Objects.KNOTEN_SF, schaltfeldIDs);
|
|
712
721
|
for (const i7Data of result) {
|
|
713
722
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.schaltfeld));
|
|
714
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid),
|
|
723
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), 'knotensf', `${bay.description}/${i7Data.bezeichner}`);
|
|
715
724
|
if (bay) {
|
|
716
725
|
connectivityNode.connectivityNodeContainer = bay;
|
|
717
726
|
bay.addConnectivityNode(connectivityNode);
|
|
@@ -735,7 +744,7 @@ class ConverterI7 {
|
|
|
735
744
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_KF)) {
|
|
736
745
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_KF, querkupplungIDs));
|
|
737
746
|
for (const i7Data of result) {
|
|
738
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid),
|
|
747
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), 'knotenkf');
|
|
739
748
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.kpfeld));
|
|
740
749
|
if (bay) {
|
|
741
750
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -758,7 +767,7 @@ class ConverterI7 {
|
|
|
758
767
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_LK)) {
|
|
759
768
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_LK, laengskupplungIDs));
|
|
760
769
|
for (const i7Data of result) {
|
|
761
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), utils_2.getName(i7Data), 'KnotenLk');
|
|
770
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), 'KnotenLk');
|
|
762
771
|
const bay = cimModel.getBay(this.integralID2UUID.get(i7Data.lkupplung));
|
|
763
772
|
if (bay) {
|
|
764
773
|
connectivityNode.connectivityNodeContainer = bay;
|
|
@@ -781,7 +790,7 @@ class ConverterI7 {
|
|
|
781
790
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SCHLAUFE)) {
|
|
782
791
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SCHLAUFE, knotenSoIDs));
|
|
783
792
|
for (const i7Data of result) {
|
|
784
|
-
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(),
|
|
793
|
+
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "-Schlaufe_T", `_${cimModel.terminals.size}`.toString()]), String(i7Data.id));
|
|
785
794
|
terminal.connected = utils_2.convertToBooleanI7(i7Data.schaltzustand);
|
|
786
795
|
terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
787
796
|
this.addIdMapping(i7Data.id, terminal.mrid, integral_sql_1.Integral7TableNames.SCHLAUFE);
|
|
@@ -809,7 +818,7 @@ class ConverterI7 {
|
|
|
809
818
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.BELASTUNG)) {
|
|
810
819
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.BELASTUNG, knotenSfIDs));
|
|
811
820
|
for (const i7Data of result) {
|
|
812
|
-
const load = targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad ? new ConformLoad_1.ConformLoad(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data)) : new EnergyConsumer_1.EnergyConsumer(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data));
|
|
821
|
+
const load = targetClass === cim_class_names_1.CIM_CLASS_NAMES.ConformLoad ? new ConformLoad_1.ConformLoad(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CL", `_${cimModel.energyConsumers.size}`.toString()])) : new EnergyConsumer_1.EnergyConsumer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_EC", `_${cimModel.energyConsumers.size}`.toString()]));
|
|
813
822
|
this.setTopologyEnergySourceConsumerObject(cimModel, load, i7Data);
|
|
814
823
|
const powerData = utils_2.getActiveReactivePower(i7Data);
|
|
815
824
|
load.p = powerData[0];
|
|
@@ -855,7 +864,7 @@ class ConverterI7 {
|
|
|
855
864
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.GENERATOR)) {
|
|
856
865
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.GENERATOR, knotenSfIDs));
|
|
857
866
|
for (const i7Data of result) {
|
|
858
|
-
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
867
|
+
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SM", `_${cimModel.synchronousMachine.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
859
868
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generator;
|
|
860
869
|
synchronousMachine.operatingMode = SynchronousMachineOperatingMode_1.SynchronousMachineOperatingMode.generator;
|
|
861
870
|
if (utils_2.convertToNumberI7(i7Data.blocktrafo_1)) {
|
|
@@ -900,7 +909,7 @@ class ConverterI7 {
|
|
|
900
909
|
synchronousMachine.aggregate = true;
|
|
901
910
|
synchronousMachine.ratedPowerFactor = utils_2.isNumericI7(i7Data.cosphir) ? utils_2.convertToNumberI7(i7Data.cosphir) : undefined;
|
|
902
911
|
synchronousMachine.r = utils_2.isNumericI7(i7Data.rg) ? utils_2.convertToNumberI7(i7Data.rg) : undefined;
|
|
903
|
-
const reactiveCapabilityCurve = new ReactiveCapabilityCurve_1.ReactiveCapabilityCurve(utils_1.generateUUID(), 'CurveData');
|
|
912
|
+
const reactiveCapabilityCurve = new ReactiveCapabilityCurve_1.ReactiveCapabilityCurve(utils_1.generateUUID(), util_create_1.createNotation(['CurveData', "_RCC", `_${cimModel.reactiveCapabilityCurve.size}`.toString()]));
|
|
904
913
|
reactiveCapabilityCurve.curveStyle = CurveStyle_1.CurveStyle.straightLineYValues;
|
|
905
914
|
reactiveCapabilityCurve.xUnit = UnitSymbol_1.UnitSymbol.W;
|
|
906
915
|
reactiveCapabilityCurve.y1Unit = UnitSymbol_1.UnitSymbol.VAr;
|
|
@@ -920,43 +929,41 @@ class ConverterI7 {
|
|
|
920
929
|
cimModel.addReactiveCapabilityCurve(reactiveCapabilityCurve);
|
|
921
930
|
synchronousMachine.initialReactiveCapabilityCurveUUID = reactiveCapabilityCurve.mrid;
|
|
922
931
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
923
|
-
|
|
924
|
-
regulatingControl.enabled = inBetrieb;
|
|
925
|
-
regulatingControl.targetValue = usoll;
|
|
932
|
+
let regulatingControl = undefined;
|
|
926
933
|
switch (i7Data.spannungsgeregelt) {
|
|
927
934
|
case 1: {
|
|
935
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_Gen_${i7Data.id}`);
|
|
936
|
+
regulatingControl.targetValue = usoll;
|
|
928
937
|
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
929
938
|
regulatingControl.discrete = false;
|
|
930
939
|
regulatingControl.enabled = inBetrieb;
|
|
931
940
|
synchronousMachine.controlEnabled = inBetrieb;
|
|
941
|
+
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
942
|
+
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
943
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
932
944
|
break;
|
|
933
945
|
}
|
|
934
946
|
default: {
|
|
935
|
-
|
|
936
|
-
regulatingControl.discrete = false;
|
|
937
|
-
regulatingControl.enabled = inBetrieb;
|
|
938
|
-
synchronousMachine.controlEnabled = inBetrieb;
|
|
947
|
+
synchronousMachine.controlEnabled = false;
|
|
939
948
|
}
|
|
940
949
|
}
|
|
941
|
-
regulatingControl.addRegulatingCondEq(synchronousMachine);
|
|
942
|
-
synchronousMachine.regulatingControlUUID = regulatingControl.mrid;
|
|
943
950
|
const generatingUnitConfig = energyTypesConfig[i7Data.nameprimaertyp];
|
|
944
951
|
let generatingUnit;
|
|
945
952
|
if (generatingUnitConfig) {
|
|
946
953
|
switch (generatingUnitConfig.class) {
|
|
947
954
|
case 'ThermalGeneratingUnit': {
|
|
948
|
-
generatingUnit = new ThermalGeneratingUnit_1.ThermalGeneratingUnit(utils_1.getUUID(''),
|
|
955
|
+
generatingUnit = new ThermalGeneratingUnit_1.ThermalGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_TGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
949
956
|
if (generatingUnitConfig.fuelType) {
|
|
950
957
|
utils_2.generateFuelType(i7Data.nameprimaertyp, generatingUnitConfig.fuelType, generatingUnit, cimModel);
|
|
951
958
|
}
|
|
952
959
|
break;
|
|
953
960
|
}
|
|
954
961
|
case 'SolarGeneratingUnit': {
|
|
955
|
-
generatingUnit = new SolarGeneratingUnit_1.SolarGeneratingUnit(utils_1.getUUID(''),
|
|
962
|
+
generatingUnit = new SolarGeneratingUnit_1.SolarGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_SGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
956
963
|
break;
|
|
957
964
|
}
|
|
958
965
|
case 'WindGeneratingUnit': {
|
|
959
|
-
generatingUnit = new WindGeneratingUnit_1.WindGeneratingUnit(utils_1.getUUID(''),
|
|
966
|
+
generatingUnit = new WindGeneratingUnit_1.WindGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_WGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname, i7Data.nameprimaertyp);
|
|
960
967
|
switch (generatingUnitConfig.fuelType) {
|
|
961
968
|
case 'onshore': {
|
|
962
969
|
generatingUnit.windGenUnitType = WindGenUnitKind_1.WindGenUnitKind.onshore;
|
|
@@ -974,18 +981,18 @@ class ConverterI7 {
|
|
|
974
981
|
break;
|
|
975
982
|
}
|
|
976
983
|
case 'NuclearGeneratingUnit': {
|
|
977
|
-
generatingUnit = new NuclearGeneratingUnit_1.NuclearGeneratingUnit(utils_1.getUUID(''),
|
|
984
|
+
generatingUnit = new NuclearGeneratingUnit_1.NuclearGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_NGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
978
985
|
break;
|
|
979
986
|
}
|
|
980
987
|
case 'HydroGeneratingUnit': {
|
|
981
|
-
generatingUnit = new HydroGeneratingUnit_1.HydroGeneratingUnit(utils_1.getUUID(''),
|
|
988
|
+
generatingUnit = new HydroGeneratingUnit_1.HydroGeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_HGU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
982
989
|
generatingUnit.energyConversionCapability = HydroEnergyConversionKind_1.HydroEnergyConversionKind.pumpAndGenerator;
|
|
983
990
|
break;
|
|
984
991
|
}
|
|
985
992
|
}
|
|
986
993
|
}
|
|
987
994
|
if (!generatingUnit) {
|
|
988
|
-
generatingUnit = new GeneratingUnit_1.GeneratingUnit(utils_1.getUUID(''),
|
|
995
|
+
generatingUnit = new GeneratingUnit_1.GeneratingUnit(utils_1.getUUID(''), util_create_1.createNotation([i7Data.bezeichner, "_GU", `_${cimModel.generatingUnit.size}`.toString()]), i7Data.kurzname);
|
|
989
996
|
}
|
|
990
997
|
generatingUnit.initialP = utils_2.isNumericI7(i7Data.p0) ? utils_2.convertToNumberI7(i7Data.p0) : undefined;
|
|
991
998
|
generatingUnit.maxOperatingP = utils_2.isNumericI7(i7Data.p_max) ? utils_2.convertToNumberI7(i7Data.p_max) : undefined;
|
|
@@ -1012,7 +1019,6 @@ class ConverterI7 {
|
|
|
1012
1019
|
smtcr.xQuadSubtrans = utils_2.isNumericI7(i7Data.xqu2s) ? utils_2.convertToNumberI7(i7Data.xqu2s) : undefined;
|
|
1013
1020
|
smtcr.synchronousMachine = synchronousMachine;
|
|
1014
1021
|
synchronousMachine.synchronousMachineDynamics = smtcr;
|
|
1015
|
-
cimModel.addRegulatingControl(regulatingControl);
|
|
1016
1022
|
cimModel.addGeneratingUnit(generatingUnit);
|
|
1017
1023
|
cimModel.addSynchronousMachine(synchronousMachine);
|
|
1018
1024
|
cimModel.addSynchronousMachineTimeConstantReactance(smtcr);
|
|
@@ -1026,7 +1032,7 @@ class ConverterI7 {
|
|
|
1026
1032
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ASYNCHRONMOTOR)) {
|
|
1027
1033
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.ASYNCHRONMOTOR, 0, 0, knotenSfIDs));
|
|
1028
1034
|
for (const i7Data of result) {
|
|
1029
|
-
const asynchronousMachine = new AsynchronousMachine_1.AsynchronousMachine(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1035
|
+
const asynchronousMachine = new AsynchronousMachine_1.AsynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_AM", `_${cimModel.asynchronousMachine.size}`.toString()]), i7Data.kurzname, 'SO-' + i7Data.ukz + integral_prefix_1.MITTIGER_PUNKT + i7Data.bezeichner);
|
|
1030
1036
|
asynchronousMachine.efficiency = i7Data.wirkungsgrad * 100;
|
|
1031
1037
|
asynchronousMachine.iaIrRatio = i7Data.ilr_ir;
|
|
1032
1038
|
asynchronousMachine.polePairNumber = i7Data.polpaarz;
|
|
@@ -1067,7 +1073,7 @@ class ConverterI7 {
|
|
|
1067
1073
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KWBLOCK)) {
|
|
1068
1074
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KWBLOCK, knotenSfIDs));
|
|
1069
1075
|
for (const i7Data of result) {
|
|
1070
|
-
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1076
|
+
const synchronousMachine = new SynchronousMachine_1.SynchronousMachine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SM", `_${cimModel.synchronousMachine.size}`.toString()]), i7Data.kurzname);
|
|
1071
1077
|
synchronousMachine.type = SynchronousMachineKind_1.SynchronousMachineKind.generator;
|
|
1072
1078
|
synchronousMachine.operatingMode = SynchronousMachineOperatingMode_1.SynchronousMachineOperatingMode.generator;
|
|
1073
1079
|
synchronousMachine.referencePriority = utils_2.isNumericI7(i7Data.einspprio) ? utils_2.convertToNumberI7(i7Data.einspprio) : undefined;
|
|
@@ -1159,7 +1165,7 @@ class ConverterI7 {
|
|
|
1159
1165
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZQUERZWEIG)) {
|
|
1160
1166
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.ERSATZQUERZWEIG, knotenSfIDs));
|
|
1161
1167
|
for (const i7Data of result) {
|
|
1162
|
-
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1168
|
+
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ENI", `_${cimModel.externalNetworkInjections.size}`.toString()]), i7Data.kurzname);
|
|
1163
1169
|
const usoll = utils_2.isNumericI7(i7Data.usoll) ? utils_2.convertToNumberI7(i7Data.usoll) : undefined;
|
|
1164
1170
|
const kr = 0;
|
|
1165
1171
|
externalNetworkInjection.governorSCD = kr;
|
|
@@ -1202,7 +1208,7 @@ class ConverterI7 {
|
|
|
1202
1208
|
}
|
|
1203
1209
|
convertBoundaryInjections2EquivalentInjection(cimModel, result) {
|
|
1204
1210
|
for (const i7Data of result) {
|
|
1205
|
-
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1211
|
+
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), 'BD_EI', `_${cimModel.equivalentInjections.size}`]), i7Data.kurzname);
|
|
1206
1212
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1207
1213
|
const einspeisePrio = utils_2.convertToNumberI7(i7Data.einspprio);
|
|
1208
1214
|
equivalentInjection.p = utils_2.convertToNumberI7(i7Data.p_ersatznetz) + utils_2.convertToNumberI7(i7Data.p_restnetz);
|
|
@@ -1236,10 +1242,11 @@ class ConverterI7 {
|
|
|
1236
1242
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.Integral7TableNames.BOUNDARYINJECTION);
|
|
1237
1243
|
}
|
|
1238
1244
|
}
|
|
1239
|
-
convertErsatzLaengszweige(
|
|
1245
|
+
convertErsatzLaengszweige(frame, knotenSfIDs, defaultValuesConfig) {
|
|
1240
1246
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1247
|
+
const cimModel = frame.cimModel;
|
|
1241
1248
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG)) {
|
|
1242
|
-
const result = yield this.mysqlController.execQuery(integral_sql_1.
|
|
1249
|
+
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.ERSATZLAENGSZWEIG, knotenSfIDs));
|
|
1243
1250
|
for (const i7Data of result) {
|
|
1244
1251
|
const i7Schluessel = integral_prefix_1.ERSATZLAENGSZWEIG_PRAEFIX +
|
|
1245
1252
|
utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
@@ -1249,7 +1256,7 @@ class ConverterI7 {
|
|
|
1249
1256
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
1250
1257
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
1251
1258
|
utils_2.ueberpruefeZeichenkette(i7Data.stkabname);
|
|
1252
|
-
const equivalentBranch = new EquivalentBranch_1.EquivalentBranch(utils_1.getUUID(i7Data.guid), i7Data.bezeichner, i7Data.kurzname, i7Schluessel);
|
|
1259
|
+
const equivalentBranch = new EquivalentBranch_1.EquivalentBranch(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([i7Data.bezeichner, '_EB', `_${cimModel.equivalentBranches.size}`]), i7Data.kurzname, i7Schluessel);
|
|
1253
1260
|
const ur1 = utils_2.getU(i7Data.ur1, defaultValuesConfig.DefaultVoltage);
|
|
1254
1261
|
const ur2 = utils_2.getU(i7Data.ur2, defaultValuesConfig.DefaultVoltage);
|
|
1255
1262
|
const baseVoltageUr1 = util_create_1.createBaseVoltageIfNotExists(cimModel, ur1, this.exportFramesBoundary);
|
|
@@ -1260,20 +1267,8 @@ class ConverterI7 {
|
|
|
1260
1267
|
else if (baseVoltageUr2) {
|
|
1261
1268
|
equivalentBranch.baseVoltage = baseVoltageUr2;
|
|
1262
1269
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
util_create_1.createConnection(cimModel, equivalentBranch, start, PhaseCode_1.PhaseCode.ABC, 1);
|
|
1266
|
-
}
|
|
1267
|
-
else {
|
|
1268
|
-
this.logger.debug(`Leitung ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
|
|
1269
|
-
}
|
|
1270
|
-
const target = cimModel.objects.get(this.integralID2UUID.get(i7Data.eknoten));
|
|
1271
|
-
if (target) {
|
|
1272
|
-
util_create_1.createConnection(cimModel, equivalentBranch, target, PhaseCode_1.PhaseCode.ABC, 2);
|
|
1273
|
-
}
|
|
1274
|
-
else {
|
|
1275
|
-
this.logger.debug(`Leitung ${i7Data.id} ${equivalentBranch.mrid} besitzt keinen Zielknoten.`);
|
|
1276
|
-
}
|
|
1270
|
+
this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC, 1);
|
|
1271
|
+
this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC, 2);
|
|
1277
1272
|
cimModel.addEquivalentBranch(equivalentBranch);
|
|
1278
1273
|
this.addIdMapping(i7Data.id, equivalentBranch.mrid, integral_sql_1.Integral7TableNames.ERSATZLAENGSZWEIG);
|
|
1279
1274
|
}
|
|
@@ -1288,7 +1283,7 @@ class ConverterI7 {
|
|
|
1288
1283
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSDROSSEL)) {
|
|
1289
1284
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KOMPENSATIONSDROSSEL, knotenSfIDs));
|
|
1290
1285
|
for (const i7Data of result) {
|
|
1291
|
-
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1286
|
+
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC", `_${cimModel.linearShuntCompensators.size}`.toString()]), i7Data.kurzname);
|
|
1292
1287
|
shunt.normalSections = i7Data.aktstufe;
|
|
1293
1288
|
shunt.maximumSections = i7Data.maxstufe;
|
|
1294
1289
|
shunt.nomU = i7Data.ur;
|
|
@@ -1298,7 +1293,7 @@ class ConverterI7 {
|
|
|
1298
1293
|
const spannungsregelungRemote = utils_2.isBooleanI7(i7Data.rpv_geregelt) ? utils_2.convertToBooleanI7(i7Data.rpv_geregelt) : false;
|
|
1299
1294
|
let regulatingControl;
|
|
1300
1295
|
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
1301
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `
|
|
1296
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_Kompdrossel_${i7Data.id}`);
|
|
1302
1297
|
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1303
1298
|
regulatingControl.discrete = true;
|
|
1304
1299
|
regulatingControl.targetDeadband = i7Data.uband;
|
|
@@ -1322,7 +1317,7 @@ class ConverterI7 {
|
|
|
1322
1317
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KOMPENSATIONSKONDENSATOR)) {
|
|
1323
1318
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KOMPENSATIONSKONDENSATOR, knotenSfIDs));
|
|
1324
1319
|
for (const i7Data of result) {
|
|
1325
|
-
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1320
|
+
const shunt = new LinearShuntCompensator_1.LinearShuntCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_LSC", `_${cimModel.linearShuntCompensators.size}`.toString()]), i7Data.kurzname);
|
|
1326
1321
|
shunt.normalSections = i7Data.aktstufe;
|
|
1327
1322
|
shunt.maximumSections = i7Data.maxstufe;
|
|
1328
1323
|
shunt.nomU = i7Data.ur;
|
|
@@ -1332,7 +1327,7 @@ class ConverterI7 {
|
|
|
1332
1327
|
const spannungsregelungRemote = utils_2.isBooleanI7(i7Data.rpv_geregelt) ? utils_2.convertToBooleanI7(i7Data.rpv_geregelt) : false;
|
|
1333
1328
|
let regulatingControl;
|
|
1334
1329
|
if (spannungsregelungLokal || spannungsregelungRemote) {
|
|
1335
|
-
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `
|
|
1330
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_KompKondensator_${i7Data.id}`);
|
|
1336
1331
|
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1337
1332
|
regulatingControl.discrete = true;
|
|
1338
1333
|
regulatingControl.enabled = inBetrieb;
|
|
@@ -1356,9 +1351,9 @@ class ConverterI7 {
|
|
|
1356
1351
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.STATCOM)) {
|
|
1357
1352
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.STATCOM, knotenSfIDs));
|
|
1358
1353
|
for (const i7Data of result) {
|
|
1359
|
-
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1354
|
+
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC", `_${cimModel.staticVarCompensator.size}`.toString()]), i7Data.kurzname);
|
|
1360
1355
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1361
|
-
const regulatingControl = utils_2.createRegulatingControl(`
|
|
1356
|
+
const regulatingControl = utils_2.createRegulatingControl(`RC_Statcom_${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
1362
1357
|
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
1363
1358
|
const uref = utils_2.isNumericI7(i7Data.uref) ? utils_2.convertToNumberI7(i7Data.uref) : undefined;
|
|
1364
1359
|
regulatingControl.targetValue = uref;
|
|
@@ -1396,7 +1391,7 @@ class ConverterI7 {
|
|
|
1396
1391
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.SVC)) {
|
|
1397
1392
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.SVC, knotenSfIDs));
|
|
1398
1393
|
for (const i7Data of result) {
|
|
1399
|
-
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1394
|
+
const statVarCom = new StaticVarCompensator_1.StaticVarCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SVC", `_${cimModel.staticVarCompensator.size}`.toString()]), i7Data.kurzname);
|
|
1400
1395
|
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1401
1396
|
const regulatingControl = utils_2.createRegulatingControl(`RC_SVC ${i7Data.id}`, inBetrieb, UnitMultiplier_1.UnitMultiplier.k, RegulatingControlModeKind_1.RegulatingControlModeKind.voltage, cimModel, statVarCom);
|
|
1402
1397
|
this.setTopologyEnergySourceConsumerObject(cimModel, statVarCom, i7Data, regulatingControl);
|
|
@@ -1436,12 +1431,11 @@ class ConverterI7 {
|
|
|
1436
1431
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_KLASSISCH)) {
|
|
1437
1432
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_KOPFSTATION_KLASSISCH, knotenSfIDs));
|
|
1438
1433
|
for (const i7Data of result) {
|
|
1439
|
-
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(),
|
|
1434
|
+
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU", `_${cimModel.dcConverterUnit.size}`.toString()]));
|
|
1440
1435
|
const acConnectivityNode = cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1441
1436
|
if (acConnectivityNode) {
|
|
1442
1437
|
const equipmentContainer = this.determineEquipmentContainer('Substation', cimModel, acConnectivityNode.connectivityNodeContainer);
|
|
1443
1438
|
if (equipmentContainer) {
|
|
1444
|
-
dcConverterUnit.name = `DCConverterUnit ${equipmentContainer.name}`;
|
|
1445
1439
|
dcConverterUnit.setSubstation(equipmentContainer);
|
|
1446
1440
|
}
|
|
1447
1441
|
else {
|
|
@@ -1451,7 +1445,7 @@ class ConverterI7 {
|
|
|
1451
1445
|
else {
|
|
1452
1446
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1453
1447
|
}
|
|
1454
|
-
const csConverter = new CsConverter_1.CsConverter(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1448
|
+
const csConverter = new CsConverter_1.CsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_CSC", `_${cimModel.csConverter.size}`.toString()]), i7Data.kurzname);
|
|
1455
1449
|
csConverter.equipmentContainer = dcConverterUnit;
|
|
1456
1450
|
csConverter.baseS = i7Data.pr;
|
|
1457
1451
|
csConverter.ratedUdc = i7Data.ur;
|
|
@@ -1480,10 +1474,10 @@ class ConverterI7 {
|
|
|
1480
1474
|
else {
|
|
1481
1475
|
this.logger.debug(`CsConverter ${i7Data.id} ${csConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
1482
1476
|
}
|
|
1483
|
-
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(),
|
|
1477
|
+
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN", `_${cimModel.dcNodes.size}`.toString()]));
|
|
1484
1478
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
1485
1479
|
dcConverterUnit.dCNodes.set(dcNode.getUUID(), dcNode);
|
|
1486
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(),
|
|
1480
|
+
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT", `_${cimModel.acDCConverterDCTerminals.size}`.toString()]));
|
|
1487
1481
|
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
1488
1482
|
acDCConverterDCTerminal.dCConductingEquipment = csConverter;
|
|
1489
1483
|
csConverter.dCTerminals.set(acDCConverterDCTerminal.getUUID(), acDCConverterDCTerminal);
|
|
@@ -1504,12 +1498,11 @@ class ConverterI7 {
|
|
|
1504
1498
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_KOPFSTATION_VSC)) {
|
|
1505
1499
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_KOPFSTATION_VSC, knotenSfIDs));
|
|
1506
1500
|
for (const i7Data of result) {
|
|
1507
|
-
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(),
|
|
1501
|
+
const dcConverterUnit = new DCConverterUnit_1.DCConverterUnit(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCCU", `_${cimModel.dcConverterUnit.size}`.toString()]));
|
|
1508
1502
|
const acConnectivityNode = cimModel.connectivityNodes.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
1509
1503
|
if (acConnectivityNode) {
|
|
1510
1504
|
const equipmentContainer = this.determineEquipmentContainer('Substation', cimModel, acConnectivityNode.connectivityNodeContainer);
|
|
1511
1505
|
if (equipmentContainer) {
|
|
1512
|
-
dcConverterUnit.name = `DCConverterUnit ${equipmentContainer.name}`;
|
|
1513
1506
|
dcConverterUnit.setSubstation(equipmentContainer);
|
|
1514
1507
|
}
|
|
1515
1508
|
else {
|
|
@@ -1519,7 +1512,7 @@ class ConverterI7 {
|
|
|
1519
1512
|
else {
|
|
1520
1513
|
this.logger.debug(`DCConverterUnit ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
1521
1514
|
}
|
|
1522
|
-
const vsConverter = new VsConverter_1.VsConverter(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1515
|
+
const vsConverter = new VsConverter_1.VsConverter(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_VSC", `_${cimModel.vsConverter.size}`.toString()]), i7Data.kurzname);
|
|
1523
1516
|
vsConverter.equipmentContainer = dcConverterUnit;
|
|
1524
1517
|
vsConverter.baseS = i7Data.pr;
|
|
1525
1518
|
utils_2.isNumericI7(i7Data.udc) ? vsConverter.ratedUdc = i7Data.udc : vsConverter.ratedUdc = i7Data.ur;
|
|
@@ -1532,8 +1525,8 @@ class ConverterI7 {
|
|
|
1532
1525
|
const regelungP = utils_2.convertToBooleanI7(i7Data.p_geregelt);
|
|
1533
1526
|
const regelungW = utils_2.convertToBooleanI7(i7Data.grad_geregelt);
|
|
1534
1527
|
if (regelungU) {
|
|
1535
|
-
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.
|
|
1536
|
-
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.
|
|
1528
|
+
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.udc;
|
|
1529
|
+
vsConverter.qPccControl = VsQpccControlKind_1.VsQpccControlKind.voltagePcc;
|
|
1537
1530
|
}
|
|
1538
1531
|
else if (regelungP) {
|
|
1539
1532
|
vsConverter.pPccControl = VsPpccControlKind_1.VsPpccControlKind.pPcc;
|
|
@@ -1551,9 +1544,9 @@ class ConverterI7 {
|
|
|
1551
1544
|
else {
|
|
1552
1545
|
this.logger.debug(`VsConverter ${i7Data.id} ${vsConverter.mrid} besitzt keinen AC Anschluss.`);
|
|
1553
1546
|
}
|
|
1554
|
-
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(),
|
|
1547
|
+
const dcNode = new DCNode_1.DCNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCN", `_${cimModel.dcNodes.size}`.toString()]));
|
|
1555
1548
|
dcNode.dcEquipmentContainer = dcConverterUnit;
|
|
1556
|
-
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(),
|
|
1549
|
+
const acDCConverterDCTerminal = new ACDCConverterDCTerminal_1.ACDCConverterDCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_ACDCC-DCT", `_${cimModel.acDCConverterDCTerminals.size}`.toString()]));
|
|
1557
1550
|
acDCConverterDCTerminal.sequenceNumber = 1;
|
|
1558
1551
|
acDCConverterDCTerminal.dCConductingEquipmentUUID = vsConverter.mrid;
|
|
1559
1552
|
acDCConverterDCTerminal.dcNode = dcNode;
|
|
@@ -1574,7 +1567,7 @@ class ConverterI7 {
|
|
|
1574
1567
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1575
1568
|
for (const i7Data of result) {
|
|
1576
1569
|
try {
|
|
1577
|
-
const energySource = new EnergySource_1.EnergySource(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1570
|
+
const energySource = new EnergySource_1.EnergySource(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ES", `_${cimModel.energySources.size}`.toString()]), i7Data.kurzname);
|
|
1578
1571
|
this.setTopologyEnergySourceConsumerObject(cimModel, energySource, i7Data);
|
|
1579
1572
|
energySource.nominalVoltage = (_c = (_b = (_a = energySource.equipmentContainer) === null || _a === void 0 ? void 0 : _a.baseVoltage) === null || _b === void 0 ? void 0 : _b.nominalVoltage) === null || _c === void 0 ? void 0 : _c.value;
|
|
1580
1573
|
const prio = i7Data.einspprio;
|
|
@@ -1596,7 +1589,7 @@ class ConverterI7 {
|
|
|
1596
1589
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1597
1590
|
for (const i7Data of result) {
|
|
1598
1591
|
try {
|
|
1599
|
-
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1592
|
+
const equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), '_EI', `_${cimModel.equivalentInjections.size}`]), i7Data.kurzname);
|
|
1600
1593
|
const prio = i7Data.einspprio;
|
|
1601
1594
|
const usoll = i7Data.usoll;
|
|
1602
1595
|
const powerData = utils_2.getActiveReactivePower(i7Data);
|
|
@@ -1616,15 +1609,33 @@ class ConverterI7 {
|
|
|
1616
1609
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1617
1610
|
for (const i7Data of result) {
|
|
1618
1611
|
try {
|
|
1619
|
-
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname);
|
|
1612
|
+
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_ENI", `_${cimModel.externalNetworkInjections.size}`.toString()]), i7Data.kurzname);
|
|
1620
1613
|
const prio = i7Data.einspprio;
|
|
1621
1614
|
externalNetworkInjection.referencePriority = prio;
|
|
1622
1615
|
const usoll = i7Data.usoll;
|
|
1623
1616
|
const powerData = utils_2.getActiveReactivePower(i7Data);
|
|
1624
1617
|
externalNetworkInjection.p = powerData[0];
|
|
1625
1618
|
externalNetworkInjection.q = powerData[1];
|
|
1626
|
-
|
|
1627
|
-
|
|
1619
|
+
const inBetrieb = utils_2.convertToBooleanI7(i7Data.betrieb);
|
|
1620
|
+
let regulatingControl = undefined;
|
|
1621
|
+
switch (i7Data.spannungsgeregelt) {
|
|
1622
|
+
case 1: {
|
|
1623
|
+
regulatingControl = new RegulatingControl_1.RegulatingControl(utils_1.generateUUID(), `RC_ENI_${i7Data.id}`);
|
|
1624
|
+
regulatingControl.targetValue = usoll;
|
|
1625
|
+
regulatingControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
1626
|
+
regulatingControl.discrete = false;
|
|
1627
|
+
regulatingControl.enabled = inBetrieb;
|
|
1628
|
+
externalNetworkInjection.controlEnabled = inBetrieb;
|
|
1629
|
+
regulatingControl.addRegulatingCondEq(externalNetworkInjection);
|
|
1630
|
+
externalNetworkInjection.regulatingControlUUID = regulatingControl.mrid;
|
|
1631
|
+
cimModel.addRegulatingControl(regulatingControl);
|
|
1632
|
+
break;
|
|
1633
|
+
}
|
|
1634
|
+
default: {
|
|
1635
|
+
externalNetworkInjection.controlEnabled = false;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
this.setTopologyEnergySourceConsumerObject(cimModel, externalNetworkInjection, i7Data, regulatingControl);
|
|
1628
1639
|
cimModel.addExternalNetworkInjection(externalNetworkInjection);
|
|
1629
1640
|
this.addIdMapping(i7Data.id, externalNetworkInjection.mrid, integral_sql_1.I7Objects.EINSPEISUNG);
|
|
1630
1641
|
}
|
|
@@ -1668,7 +1679,7 @@ class ConverterI7 {
|
|
|
1668
1679
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.QUERKUPPLUNG)) {
|
|
1669
1680
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.QUERKUPPLUNG, schaltanlagenAbschnittIDs));
|
|
1670
1681
|
for (const i7Data of result) {
|
|
1671
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), 'Querkupplung');
|
|
1682
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B", `_${cimModel.bays.size}`.toString()]), 'Querkupplung');
|
|
1672
1683
|
bay.number = i7Data.feldnummer + '';
|
|
1673
1684
|
bay.locationID = i7Data.ips_folder_id;
|
|
1674
1685
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.saabschnitt));
|
|
@@ -1698,7 +1709,7 @@ class ConverterI7 {
|
|
|
1698
1709
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
1699
1710
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKUPPLUNG, schaltanlagenIDs));
|
|
1700
1711
|
for (const i7Data of result) {
|
|
1701
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, 'Laengskupplung');
|
|
1712
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B", `_${cimModel.bays.size}`.toString()]), i7Data.kurzname, 'Laengskupplung');
|
|
1702
1713
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
1703
1714
|
bay.number = i7Data.feldnummer + '';
|
|
1704
1715
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -1728,42 +1739,10 @@ class ConverterI7 {
|
|
|
1728
1739
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.KNOTEN_STARR)) {
|
|
1729
1740
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.KNOTEN_STARR, containerIDs));
|
|
1730
1741
|
for (const i7Data of result) {
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
equipmentContainer.addEquipment(junction);
|
|
1736
|
-
junction.equipmentContainer = equipmentContainer;
|
|
1737
|
-
}
|
|
1738
|
-
else {
|
|
1739
|
-
this.logger.debug(`Starre verbindung ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
1740
|
-
}
|
|
1741
|
-
const cnStart = cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.aknoten));
|
|
1742
|
-
const cnZiel = cimModel.getConnectivityNode(this.integralID2UUID.get(i7Data.eknoten));
|
|
1743
|
-
if (cnStart) {
|
|
1744
|
-
const terminal = this.createConnection(cimModel, junction, cnStart, PhaseCode_1.PhaseCode.ABC, true, 1);
|
|
1745
|
-
if (schaltzustand === false) {
|
|
1746
|
-
terminal.connected = schaltzustand;
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1750
|
-
this.logger.debug(`Starre verbindung ${i7Data.id} besitzt keinen Anfangsknoten.`);
|
|
1751
|
-
}
|
|
1752
|
-
if (cnZiel) {
|
|
1753
|
-
const terminal = this.createConnection(cimModel, junction, cnZiel, PhaseCode_1.PhaseCode.ABC, true, 2);
|
|
1754
|
-
if (schaltzustand === false) {
|
|
1755
|
-
terminal.connected = schaltzustand;
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
else {
|
|
1759
|
-
this.logger.debug(`Starre verbindung ${i7Data.id} besitzt keinen Zielknoten.`);
|
|
1760
|
-
}
|
|
1761
|
-
const baseVoltage = utils_2.getTerminalUn(cimModel, junction);
|
|
1762
|
-
if (baseVoltage) {
|
|
1763
|
-
junction.baseVoltage = baseVoltage;
|
|
1764
|
-
}
|
|
1765
|
-
this.addIdMapping(i7Data.id, junction.mrid, integral_sql_1.Integral7TableNames.KNOTEN_STARR);
|
|
1766
|
-
cimModel.addJunction(junction);
|
|
1742
|
+
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR", `_${cimModel.breakers.size}`.toString()]), 'Breaker', 'starre Verbindung');
|
|
1743
|
+
yield this.convertSwitch(breaker, cimModel, i7Data);
|
|
1744
|
+
cimModel.addBreaker(breaker);
|
|
1745
|
+
this.addIdMapping(i7Data.id, breaker.mrid, integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER);
|
|
1767
1746
|
}
|
|
1768
1747
|
}
|
|
1769
1748
|
else {
|
|
@@ -1776,7 +1755,7 @@ class ConverterI7 {
|
|
|
1776
1755
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TRENNERFI_3P)) {
|
|
1777
1756
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TRENNERFI_3P, containerIDs));
|
|
1778
1757
|
for (const i7Data of result) {
|
|
1779
|
-
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), i7Data.
|
|
1758
|
+
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D", `_${cimModel.disconnectors.size}`.toString()]));
|
|
1780
1759
|
yield this.convertSwitch(disconnector, cimModel, i7Data);
|
|
1781
1760
|
cimModel.addDisconnector(disconnector);
|
|
1782
1761
|
this.addIdMapping(i7Data.id, disconnector.mrid, integral_sql_1.Integral7TableNames.TRENNERFI_3P);
|
|
@@ -1792,7 +1771,7 @@ class ConverterI7 {
|
|
|
1792
1771
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.TRENNER_3P)) {
|
|
1793
1772
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.TRENNER_3P, containerIDs));
|
|
1794
1773
|
for (const i7Data of result) {
|
|
1795
|
-
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), i7Data.
|
|
1774
|
+
const disconnector = new Disconnector_1.Disconnector(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_D", `_${cimModel.disconnectors.size}`.toString()]));
|
|
1796
1775
|
yield this.convertSwitch(disconnector, cimModel, i7Data);
|
|
1797
1776
|
cimModel.addDisconnector(disconnector);
|
|
1798
1777
|
this.addIdMapping(i7Data.id, disconnector.mrid, integral_sql_1.Integral7TableNames.TRENNER_3P);
|
|
@@ -1808,7 +1787,7 @@ class ConverterI7 {
|
|
|
1808
1787
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER)) {
|
|
1809
1788
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LEISTUNGSSCHALTER, containerIDs));
|
|
1810
1789
|
for (const i7Data of result) {
|
|
1811
|
-
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), i7Data.
|
|
1790
|
+
const breaker = new Breaker_1.Breaker(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_BR", `_${cimModel.breakers.size}`.toString()]));
|
|
1812
1791
|
yield this.convertSwitch(breaker, cimModel, i7Data);
|
|
1813
1792
|
cimModel.addBreaker(breaker);
|
|
1814
1793
|
this.addIdMapping(i7Data.id, breaker.mrid, integral_sql_1.Integral7TableNames.LEISTUNGSSCHALTER);
|
|
@@ -1861,7 +1840,7 @@ class ConverterI7 {
|
|
|
1861
1840
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSDROSSEL)) {
|
|
1862
1841
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getNetzQuery(integral_sql_1.I7Objects.LAENGSDROSSEL, 0, 0, []));
|
|
1863
1842
|
for (const i7Data of result) {
|
|
1864
|
-
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '', 'LD-' + i7Data.bezeichner);
|
|
1843
|
+
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC", `_${cimModel.seriesCompensators.size}`.toString()]), i7Data.id + '', 'LD-' + i7Data.bezeichner);
|
|
1865
1844
|
const start = cimModel.objects.get(this.integralID2UUID.get(i7Data.aknoten));
|
|
1866
1845
|
let startTerminal;
|
|
1867
1846
|
if (start) {
|
|
@@ -1936,8 +1915,8 @@ class ConverterI7 {
|
|
|
1936
1915
|
for (const i7DataSchiene of stpSchiene) {
|
|
1937
1916
|
try {
|
|
1938
1917
|
stpSchieneIDs.push(i7DataSchiene.id);
|
|
1939
|
-
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), utils_2.getName(i7DataSchiene), `StpSchiene_${i7DataSchiene.id}`);
|
|
1940
|
-
const junction = new Junction_1.Junction(utils_1.generateUUID(), `
|
|
1918
|
+
const connectivityNode = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_CN", `_${cimModel.connectivityNodes.size}`.toString()]), `StpSchiene_${i7DataSchiene.id}`);
|
|
1919
|
+
const junction = new Junction_1.Junction(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7DataSchiene), "_J", `_${cimModel.junctions.size}`.toString()]), `StpSchiene/${i7DataSchiene.id}`);
|
|
1941
1920
|
const equipmentContainer = this.determineEquipmentContainer('VoltageLevel', cimModel, cimModel.getObject(this.integralID2UUID.get(i7DataSchiene.id)));
|
|
1942
1921
|
if (equipmentContainer) {
|
|
1943
1922
|
equipmentContainer.addEquipment(junction);
|
|
@@ -1980,14 +1959,14 @@ class ConverterI7 {
|
|
|
1980
1959
|
const junctionUUID = integral7.sternPunktImpModel.stpSchieneJunctionUUIDs.get((i7Data.anschluss));
|
|
1981
1960
|
let conductingEquip;
|
|
1982
1961
|
if (imax && imin) {
|
|
1983
|
-
const petersenCoil = new PetersenCoil_1.PetersenCoil(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '');
|
|
1962
|
+
const petersenCoil = new PetersenCoil_1.PetersenCoil(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PC", `_${cimModel.petersenCoils.size}`.toString()]), i7Data.id + '');
|
|
1984
1963
|
integral7.sternPunktImpModel.petersenCoils.set(petersenCoil.mrid, petersenCoil);
|
|
1985
1964
|
integral7.sternPunktImpModel.junctionUUIDstpImp.set(junctionUUID, petersenCoil);
|
|
1986
1965
|
this.addIdMapping(i7Data.id, petersenCoil.mrid, integral_sql_1.Integral7TableNames.STERNPUNKT_IMPEDANZ);
|
|
1987
1966
|
conductingEquip = petersenCoil;
|
|
1988
1967
|
}
|
|
1989
1968
|
else {
|
|
1990
|
-
const groundingImpedance = new GroundingImpedance_1.GroundingImpedance(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '');
|
|
1969
|
+
const groundingImpedance = new GroundingImpedance_1.GroundingImpedance(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_GI", `_${cimModel.groundingImpedances.size}`.toString()]), i7Data.id + '');
|
|
1991
1970
|
groundingImpedance.r = utils_2.isNumericI7(i7Data.rne) ? i7Data.rne : (utils_2.isNumericI7(kdType === null || kdType === void 0 ? void 0 : kdType.rne) ? kdType === null || kdType === void 0 ? void 0 : kdType.rne : undefined);
|
|
1992
1971
|
groundingImpedance.x = utils_2.isNumericI7(i7Data.xne) ? i7Data.xne : (utils_2.isNumericI7(kdType === null || kdType === void 0 ? void 0 : kdType.xne) ? kdType === null || kdType === void 0 ? void 0 : kdType.xne : undefined);
|
|
1993
1972
|
integral7.sternPunktImpModel.groundingImpedances.set(groundingImpedance.mrid, groundingImpedance);
|
|
@@ -2055,7 +2034,7 @@ class ConverterI7 {
|
|
|
2055
2034
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKUPPLUNG)) {
|
|
2056
2035
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKUPPLUNG, schaltanlagenIDs));
|
|
2057
2036
|
for (const i7Data of result) {
|
|
2058
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.kurzname, 'Laengskupplung');
|
|
2037
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_B", `_${cimModel.bays.size}`.toString()]), i7Data.kurzname, 'Laengskupplung');
|
|
2059
2038
|
const voltageLevel = cimModel.getVoltageLevel(this.integralID2UUID.get(i7Data.schaltanlage));
|
|
2060
2039
|
bay.number = i7Data.feldnummer + '';
|
|
2061
2040
|
bay.locationID = i7Data.ips_folder_id;
|
|
@@ -2152,13 +2131,12 @@ class ConverterI7 {
|
|
|
2152
2131
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2153
2132
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
2154
2133
|
utils_2.ueberpruefeZeichenkette(i7Data.stkabname);
|
|
2155
|
-
let name =
|
|
2156
|
-
utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
2134
|
+
let name = utils_2.ueberpruefeZeichenkette(i7Data.ukz) +
|
|
2157
2135
|
'-' +
|
|
2158
2136
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2159
2137
|
'-' +
|
|
2160
2138
|
utils_2.ueberpruefeZeichenkette(i7Data.stkabname);
|
|
2161
|
-
const line = new AMPRIONLine_1.AMPRIONLine(utils_1.getUUID(i7Data.guid), name, i7Data.stkabname, i7Schluessel);
|
|
2139
|
+
const line = new AMPRIONLine_1.AMPRIONLine(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([name, "_L", `_${cimModel.lines.size}`.toString()]), i7Data.stkabname, i7Schluessel);
|
|
2162
2140
|
line.ukz = i7Data.ukz;
|
|
2163
2141
|
let acLineSegments = [];
|
|
2164
2142
|
for (const stk of stromkreisabschnitte) {
|
|
@@ -2168,7 +2146,7 @@ class ConverterI7 {
|
|
|
2168
2146
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner) +
|
|
2169
2147
|
'-' +
|
|
2170
2148
|
utils_2.ueberpruefeZeichenkette(stk.bezeichner);
|
|
2171
|
-
const acLineSegment = new ACLineSegment_1.ACLineSegment(utils_1.generateUUID(), name, i7Data.stkabname, i7Schluessel);
|
|
2149
|
+
const acLineSegment = new ACLineSegment_1.ACLineSegment(utils_1.generateUUID(), util_create_1.createNotation([name, "_ACLS", `_${cimModel.acLineSegments.size}`.toString(), `_${acLineSegments.length}`.toString()]), i7Data.stkabname, i7Schluessel);
|
|
2172
2150
|
acLineSegment.equipmentContainer = line;
|
|
2173
2151
|
line.addEquipment(acLineSegment);
|
|
2174
2152
|
acLineSegments.push(acLineSegment);
|
|
@@ -2179,7 +2157,6 @@ class ConverterI7 {
|
|
|
2179
2157
|
const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC, tmp_sequence_number);
|
|
2180
2158
|
let equivalentInjection = undefined;
|
|
2181
2159
|
if (startTerminal) {
|
|
2182
|
-
this.setACLineSegmentCurrentLimt(cimModel, acLineSegmentStart, acLineSegmentStart.description, startTerminal);
|
|
2183
2160
|
tmp_sequence_number++;
|
|
2184
2161
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.aknoten));
|
|
2185
2162
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(startTerminal.getConnectivityNodeUUID());
|
|
@@ -2198,13 +2175,13 @@ class ConverterI7 {
|
|
|
2198
2175
|
this.logger.debug(`Leitung ${i7Data.id} ${acLineSegmentStart.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
|
|
2199
2176
|
}
|
|
2200
2177
|
cimModel.addACLineSegment(acLineSegmentStart);
|
|
2178
|
+
this.setACLineSegmentProperties(cimModel, acLineSegments[0], stromkreisabschnitte[0], defaultValuesConfig);
|
|
2201
2179
|
const anzahl = acLineSegments.length;
|
|
2202
2180
|
let tmp_terminal = undefined;
|
|
2203
2181
|
for (let i = 0; i < anzahl - 1; i++) {
|
|
2204
|
-
const cn = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(),
|
|
2182
|
+
const cn = new ConnectivityNode_1.ConnectivityNode(utils_1.generateUUID(), util_create_1.createNotation([name, "_CN", `_${cimModel.connectivityNodes.size}`.toString()]));
|
|
2205
2183
|
const acLineSegment1 = acLineSegments[i];
|
|
2206
2184
|
tmp_terminal = this.createConnection(cimModel, acLineSegment1, cn, PhaseCode_1.PhaseCode.ABC, true, tmp_sequence_number);
|
|
2207
|
-
this.setACLineSegmentCurrentLimt(cimModel, acLineSegment1, acLineSegment1.description, tmp_terminal);
|
|
2208
2185
|
cimModel.addACLineSegment(acLineSegment1);
|
|
2209
2186
|
if (tmp_terminal) {
|
|
2210
2187
|
tmp_sequence_number++;
|
|
@@ -2213,7 +2190,6 @@ class ConverterI7 {
|
|
|
2213
2190
|
this.setACLineSegmentProperties(cimModel, acLineSegments[i], stromkreisabschnitte[i], defaultValuesConfig);
|
|
2214
2191
|
const acLineSegment2 = acLineSegments[i + 1];
|
|
2215
2192
|
tmp_terminal = this.createConnection(cimModel, acLineSegment2, cn, PhaseCode_1.PhaseCode.ABC, true, tmp_sequence_number);
|
|
2216
|
-
this.setACLineSegmentCurrentLimt(cimModel, acLineSegment2, acLineSegment2.description, tmp_terminal);
|
|
2217
2193
|
cimModel.addACLineSegment(acLineSegment1);
|
|
2218
2194
|
if (tmp_terminal) {
|
|
2219
2195
|
tmp_sequence_number++;
|
|
@@ -2225,7 +2201,6 @@ class ConverterI7 {
|
|
|
2225
2201
|
const acLineSegmentZiel = acLineSegments[anzahl - 1];
|
|
2226
2202
|
const targetTerminal = this.createBoundaryConnection(frame, acLineSegmentZiel, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC, tmp_sequence_number);
|
|
2227
2203
|
if (targetTerminal) {
|
|
2228
|
-
this.setACLineSegmentCurrentLimt(cimModel, acLineSegmentZiel, acLineSegmentZiel.description, targetTerminal);
|
|
2229
2204
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(i7Data.eknoten));
|
|
2230
2205
|
let tmp_cn = bdf === null || bdf === void 0 ? void 0 : bdf.cimModel.getConnectivityNode(targetTerminal.getConnectivityNodeUUID());
|
|
2231
2206
|
if (tmp_cn && 'boundaryPoint' in tmp_cn && tmp_cn.boundaryPoint) {
|
|
@@ -2294,7 +2269,7 @@ class ConverterI7 {
|
|
|
2294
2269
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.LAENGSKONDENSATOR) && integral7.lKondensatorAnschlussKnotenIDs) {
|
|
2295
2270
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.LAENGSKONDENSATOR, integral7.lKondensatorAnschlussKnotenIDs));
|
|
2296
2271
|
for (const i7Data of result) {
|
|
2297
|
-
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2272
|
+
const seriesCompensator = new AMPRIONSeriesCompensator_1.AMPRIONSeriesCompensator(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_SC", `_${cimModel.seriesCompensators.size}`.toString()]), i7Data.id + '', i7Data.bezeichner);
|
|
2298
2273
|
const start = cimModel.getObject(this.integralID2UUID.get(i7Data.aknoten));
|
|
2299
2274
|
let startTerminal;
|
|
2300
2275
|
if (start) {
|
|
@@ -2357,10 +2332,10 @@ class ConverterI7 {
|
|
|
2357
2332
|
if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_LEITUNG) && integral7.hgueAnschlussKnotenIDs.length) {
|
|
2358
2333
|
const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_LEITUNG, integral7.hgueAnschlussKnotenIDs));
|
|
2359
2334
|
for (const i7Data of result) {
|
|
2360
|
-
const dcLine = new DCLine_1.DCLine(utils_1.getUUID(i7Data['guid_dcline']), i7Data.
|
|
2335
|
+
const dcLine = new DCLine_1.DCLine(utils_1.getUUID(i7Data['guid_dcline']), util_create_1.createNotation([utils_2.getName(i7Data), "_DCL", `_${cimModel.dcLines.size}`.toString()]));
|
|
2361
2336
|
const i7Schluessel = integral_prefix_1.HGUELEITUNG_PRAEFIX +
|
|
2362
2337
|
utils_2.ueberpruefeZeichenkette(i7Data.bezeichner);
|
|
2363
|
-
const dcLineSegment = new DCLineSegment_1.DCLineSegment(utils_1.generateUUID(), i7Data.
|
|
2338
|
+
const dcLineSegment = new DCLineSegment_1.DCLineSegment(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCLS", `_${cimModel.dcLineSegment.size}`.toString()]), i7Data.id.toString(), i7Schluessel);
|
|
2364
2339
|
dcLineSegment.resistance = i7Data.rdc;
|
|
2365
2340
|
dcLineSegment.equipmentContainer = dcLine;
|
|
2366
2341
|
const bipol = utils_2.convertToBooleanI7(i7Data.bipol);
|
|
@@ -2386,7 +2361,7 @@ class ConverterI7 {
|
|
|
2386
2361
|
}
|
|
2387
2362
|
const startDCNode = getDCNodeFromConverter(acDCConverterStart);
|
|
2388
2363
|
if (startDCNode) {
|
|
2389
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(),
|
|
2364
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT", `_${cimModel.dcTerminals.size}`.toString()]));
|
|
2390
2365
|
dcTerminal.connected = true;
|
|
2391
2366
|
dcTerminal.sequenceNumber = 1;
|
|
2392
2367
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
@@ -2399,7 +2374,7 @@ class ConverterI7 {
|
|
|
2399
2374
|
}
|
|
2400
2375
|
const targetDCNode = getDCNodeFromConverter(acDCConverterTarget);
|
|
2401
2376
|
if (targetDCNode) {
|
|
2402
|
-
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(),
|
|
2377
|
+
const dcTerminal = new DCTerminal_1.DCTerminal(utils_1.generateUUID(), util_create_1.createNotation([utils_2.getName(i7Data), "_DCT", `_${cimModel.dcTerminals.size}`.toString()]));
|
|
2403
2378
|
dcTerminal.connected = true;
|
|
2404
2379
|
dcTerminal.sequenceNumber = 2;
|
|
2405
2380
|
dcTerminal.dCConductingEquipment = dcLineSegment;
|
|
@@ -2504,7 +2479,7 @@ class ConverterI7 {
|
|
|
2504
2479
|
}
|
|
2505
2480
|
}
|
|
2506
2481
|
for (const i7Data of result) {
|
|
2507
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2482
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT", `_${cimModel.powerTransformer.size}`.toString()]), i7Data.id + '', i7Data.bezeichner);
|
|
2508
2483
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
2509
2484
|
if (substation) {
|
|
2510
2485
|
powerTransformer.equipmentContainer = substation;
|
|
@@ -2575,7 +2550,7 @@ class ConverterI7 {
|
|
|
2575
2550
|
powerTransformerEnd1.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd1.endNumber);
|
|
2576
2551
|
powerTransformerEnd2.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd2.endNumber, powerTransformerEnd2.grounded);
|
|
2577
2552
|
powerTransformerEnd2.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd2.endNumber);
|
|
2578
|
-
|
|
2553
|
+
this.sortTransformerEnd(powerTransformer, 'ratedU', 'desc');
|
|
2579
2554
|
const powerTransformerEnds = [powerTransformerEnd1, powerTransformerEnd2];
|
|
2580
2555
|
const terminals = [startTerminal, zielTerminal];
|
|
2581
2556
|
const spRegKnoten = yield this.getSpannungsbandTrafo2W(i7Data);
|
|
@@ -2584,28 +2559,12 @@ class ConverterI7 {
|
|
|
2584
2559
|
const connectivityNode = cimModel.getObject(cnUUID);
|
|
2585
2560
|
for (const powerTransformerEnd of powerTransformerEnds) {
|
|
2586
2561
|
const winkel = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${powerTransformerEnd.endNumber}`]);
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
case (2): {
|
|
2593
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2594
|
-
break;
|
|
2595
|
-
}
|
|
2596
|
-
default: {
|
|
2597
|
-
if (winkel !== 0) {
|
|
2598
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2599
|
-
}
|
|
2600
|
-
else {
|
|
2601
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2602
|
-
}
|
|
2603
|
-
break;
|
|
2604
|
-
}
|
|
2562
|
+
if (winkel > 0) {
|
|
2563
|
+
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband, false);
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
this.createRatioTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2605
2567
|
}
|
|
2606
|
-
}
|
|
2607
|
-
for (let i = 1; i <= powerTransformer.powerTransformerEnds.length; i++) {
|
|
2608
|
-
powerTransformer.powerTransformerEnds[i - 1].endNumber = i;
|
|
2609
2568
|
}
|
|
2610
2569
|
cimModel.addPowerTransformerEnd(powerTransformerEnd1);
|
|
2611
2570
|
cimModel.addPowerTransformerEnd(powerTransformerEnd2);
|
|
@@ -2648,7 +2607,7 @@ class ConverterI7 {
|
|
|
2648
2607
|
}
|
|
2649
2608
|
}
|
|
2650
2609
|
for (const i7Data of result) {
|
|
2651
|
-
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), utils_2.getName(i7Data), i7Data.id + '', i7Data.bezeichner);
|
|
2610
|
+
const powerTransformer = new PowerTransformer_1.PowerTransformer(utils_1.getUUID(i7Data.guid), util_create_1.createNotation([utils_2.getName(i7Data), "_PT", `_${cimModel.powerTransformer.size}`.toString()]), i7Data.id + '', i7Data.bezeichner);
|
|
2652
2611
|
const substation = cimModel.getSubstation(this.integralID2UUID.get(i7Data.standort));
|
|
2653
2612
|
if (substation) {
|
|
2654
2613
|
powerTransformer.equipmentContainer = substation;
|
|
@@ -2722,7 +2681,7 @@ class ConverterI7 {
|
|
|
2722
2681
|
powerTransformerEnd2.ratedS = sr2;
|
|
2723
2682
|
powerTransformerEnd2.ratedU = ur2;
|
|
2724
2683
|
powerTransformerEnd2.powerTransformer = powerTransformer;
|
|
2725
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7,
|
|
2684
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd2, powerTransformer, terminal2, sternpunktKnotenMap, integral7, ir2, i7Data, defaultValuesConfig);
|
|
2726
2685
|
equivalentInjection = undefined;
|
|
2727
2686
|
if (terminal2) {
|
|
2728
2687
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(wicklung2.aknoten));
|
|
@@ -2748,7 +2707,7 @@ class ConverterI7 {
|
|
|
2748
2707
|
powerTransformerEnd3.ratedS = sr3;
|
|
2749
2708
|
powerTransformerEnd3.ratedU = ur3;
|
|
2750
2709
|
powerTransformerEnd3.powerTransformer = powerTransformer;
|
|
2751
|
-
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7,
|
|
2710
|
+
this.setPowerTransformerEndProperties(frame, powerTransformerEnd3, powerTransformer, terminal3, sternpunktKnotenMap, integral7, ir3, i7Data, defaultValuesConfig);
|
|
2752
2711
|
equivalentInjection = undefined;
|
|
2753
2712
|
if (terminal3) {
|
|
2754
2713
|
let bdf = this.getConnectedBoundaryModel(this.integralID2UUID.get(wicklung3.aknoten));
|
|
@@ -2761,7 +2720,7 @@ class ConverterI7 {
|
|
|
2761
2720
|
}
|
|
2762
2721
|
powerTransformerEnd3.connectionKind = utils_2.getSchaltgruppe(schaltgruppe, powerTransformerEnd3.endNumber, powerTransformerEnd3.grounded);
|
|
2763
2722
|
powerTransformerEnd3.phaseAngleClock = utils_2.getSchaltgruppeAngleClock(schaltgruppe, powerTransformerEnd3.endNumber);
|
|
2764
|
-
|
|
2723
|
+
this.sortTransformerEnd(powerTransformer, 'ratedU', 'desc');
|
|
2765
2724
|
const terminals = [terminal1, terminal2, terminal3];
|
|
2766
2725
|
const powerTransformerEnds = [powerTransformerEnd1, powerTransformerEnd2, powerTransformerEnd3];
|
|
2767
2726
|
const spRegKnoten = yield this.getSpannungsbandTrafo2W(i7Data);
|
|
@@ -2770,28 +2729,12 @@ class ConverterI7 {
|
|
|
2770
2729
|
const connectivityNode = cimModel.getObject(cnUUID);
|
|
2771
2730
|
for (const powerTransformerEnd of powerTransformerEnds) {
|
|
2772
2731
|
const winkel = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${powerTransformerEnd.endNumber}`]);
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
case (2): {
|
|
2779
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2780
|
-
break;
|
|
2781
|
-
}
|
|
2782
|
-
default: {
|
|
2783
|
-
if (winkel !== 0) {
|
|
2784
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2785
|
-
}
|
|
2786
|
-
else {
|
|
2787
|
-
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2788
|
-
}
|
|
2789
|
-
break;
|
|
2790
|
-
}
|
|
2732
|
+
if (winkel > 0) {
|
|
2733
|
+
this.createPhaseTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband, true);
|
|
2734
|
+
}
|
|
2735
|
+
else {
|
|
2736
|
+
this.createRatioTapChanger(i7Data, powerTransformerEnd, cimModel, powerTransformerEnd.ratedU, connectivityNode, spannungsband);
|
|
2791
2737
|
}
|
|
2792
|
-
}
|
|
2793
|
-
for (let i = 1; i <= powerTransformer.powerTransformerEnds.length; i++) {
|
|
2794
|
-
powerTransformer.powerTransformerEnds[i - 1].endNumber = i;
|
|
2795
2738
|
}
|
|
2796
2739
|
cimModel.addPowerTransformer(powerTransformer);
|
|
2797
2740
|
cimModel.addPowerTransformerEnd(powerTransformerEnd1);
|
|
@@ -2823,12 +2766,19 @@ class ConverterI7 {
|
|
|
2823
2766
|
wicklung.uMax = data[umax];
|
|
2824
2767
|
wicklung.uMin = data[umin];
|
|
2825
2768
|
}
|
|
2826
|
-
transformBoundaryModel(frame,
|
|
2769
|
+
transformBoundaryModel(frame, masFrames) {
|
|
2827
2770
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
2771
|
+
const bdModelUUID = frame.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD);
|
|
2772
|
+
const relevantMasFrames = masFrames.filter(elem => {
|
|
2773
|
+
for (const modelUUIDs of elem.dependentModels.values()) {
|
|
2774
|
+
if ((modelUUIDs === null || modelUUIDs === void 0 ? void 0 : modelUUIDs.indexOf(bdModelUUID)) > -1)
|
|
2775
|
+
return elem;
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2828
2778
|
const cimModel = frame.cimModel;
|
|
2829
2779
|
const substations = Array.from(cimModel.substations.values());
|
|
2830
2780
|
for (const substation of substations) {
|
|
2831
|
-
const line = new Line_1.Line(substation.mrid, substation.name, substation.shortName, substation.description);
|
|
2781
|
+
const line = new Line_1.Line(substation.mrid, substation.name + "_BD-L", substation.shortName, substation.description);
|
|
2832
2782
|
const subregion = substation.subGeographicalRegion;
|
|
2833
2783
|
line.subGeographicalRegion = subregion;
|
|
2834
2784
|
subregion.addLine(line);
|
|
@@ -2867,58 +2817,42 @@ class ConverterI7 {
|
|
|
2867
2817
|
equipment.equipmentContainer = undefined;
|
|
2868
2818
|
cimModel.removeObject(equipment);
|
|
2869
2819
|
}
|
|
2870
|
-
|
|
2871
|
-
for (
|
|
2820
|
+
const location = substation.location;
|
|
2821
|
+
for (let i = 0; i < connectivityNodes.length; i++) {
|
|
2822
|
+
const connectivityNode = connectivityNodes[i];
|
|
2872
2823
|
connectivityNode.connectivityNodeContainer = line;
|
|
2873
2824
|
line.addConnectivityNode(connectivityNode);
|
|
2874
|
-
const junction = new Junction_1.Junction(utils_1.generateUUID(), `${line.name}
|
|
2825
|
+
const junction = new Junction_1.Junction(utils_1.generateUUID(), `${line.name}_BD-J`, `Junction`, 'Junction for Geo');
|
|
2875
2826
|
junction.equipmentContainer = line;
|
|
2876
|
-
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(),
|
|
2877
|
-
terminal.conductingEquipment = junction;
|
|
2878
|
-
terminal.connectivityNode = connectivityNode;
|
|
2827
|
+
const terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation([`${line.name}_BD-T`, `_${cimModel.terminals.size}`.toString()]), 'bd_jct_lab', 'terminal to connect junction to associated boundary ConnectivityNode', 1);
|
|
2879
2828
|
junction.terminals.set(terminal.getUUID(), terminal);
|
|
2829
|
+
terminal.conductingEquipment = junction;
|
|
2880
2830
|
line.addEquipment(junction);
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
const clonedLocation = new Location_1.Location(utils_1.generateUUID(), `Location ${cnt}`);
|
|
2831
|
+
if (location && location.positionPoints.length) {
|
|
2832
|
+
const clonedLocation = new Location_1.Location(utils_1.generateUUID(), `Location_${i + 1}`);
|
|
2884
2833
|
clonedLocation.addPowerSystemResource(junction);
|
|
2885
2834
|
clonedLocation.coordinateSystem = location.coordinateSystem;
|
|
2886
|
-
const clonedPositionPoint = new PositionPoint_1.PositionPoint(utils_1.generateUUID(), `PositionPoint ${
|
|
2835
|
+
const clonedPositionPoint = new PositionPoint_1.PositionPoint(utils_1.generateUUID(), `PositionPoint ${i + 1}`);
|
|
2887
2836
|
clonedPositionPoint.xPosition = location.positionPoints[0].xPosition;
|
|
2888
2837
|
clonedPositionPoint.yPosition = location.positionPoints[0].yPosition;
|
|
2889
2838
|
clonedPositionPoint.location = clonedLocation;
|
|
2890
2839
|
clonedLocation.addPositionPoint(clonedPositionPoint);
|
|
2891
|
-
|
|
2892
|
-
}
|
|
2893
|
-
if (location && location.powerSystemResources.size && location.powerSystemResources.get(substation.mrid) !== undefined) {
|
|
2894
|
-
location.addPowerSystemResource(junction);
|
|
2895
|
-
junction.location = location;
|
|
2896
|
-
masFrame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_EQ_BD, frame.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
2897
|
-
location.powerSystemResources.delete(substation.mrid);
|
|
2898
|
-
substation.location = undefined;
|
|
2899
|
-
cimModel.locations.delete(location.mrid);
|
|
2900
|
-
cimModel.removeObject(location);
|
|
2901
|
-
for (const positionPoint of location.positionPoints) {
|
|
2902
|
-
const idx = frame.cimModel.positionPoints.indexOf(positionPoint);
|
|
2903
|
-
if (idx > -1) {
|
|
2904
|
-
frame.cimModel.positionPoints.splice(idx, 1);
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
masFrame.cimModel.addLocation(location);
|
|
2908
|
-
}
|
|
2909
|
-
else if (location) {
|
|
2910
|
-
const additionalLocation = new Location_1.Location(utils_1.generateUUID(), `Location ${cnt}`);
|
|
2911
|
-
additionalLocation.addPowerSystemResource(junction);
|
|
2912
|
-
additionalLocation.coordinateSystem = location.coordinateSystem;
|
|
2913
|
-
const additionalPositionPoint = new PositionPoint_1.PositionPoint(utils_1.generateUUID(), `PositionPoint ${cnt}`);
|
|
2914
|
-
additionalPositionPoint.xPosition = location.positionPoints[0].xPosition;
|
|
2915
|
-
additionalPositionPoint.yPosition = location.positionPoints[0].yPosition;
|
|
2916
|
-
additionalPositionPoint.location = additionalLocation;
|
|
2917
|
-
additionalLocation.addPositionPoint(additionalPositionPoint);
|
|
2918
|
-
masFrame.cimModel.addLocation(additionalLocation);
|
|
2840
|
+
cimModel.addLocation(clonedLocation);
|
|
2919
2841
|
}
|
|
2842
|
+
cimModel.addTerminal(terminal);
|
|
2920
2843
|
cimModel.addJunction(junction);
|
|
2921
|
-
|
|
2844
|
+
}
|
|
2845
|
+
if (location && location.powerSystemResources.size && location.powerSystemResources.get(substation.mrid) !== undefined) {
|
|
2846
|
+
location.powerSystemResources.delete(substation.mrid);
|
|
2847
|
+
substation.location = undefined;
|
|
2848
|
+
cimModel.locations.delete(location.mrid);
|
|
2849
|
+
cimModel.removeObject(location);
|
|
2850
|
+
for (const positionPoint of location.positionPoints) {
|
|
2851
|
+
const idx = frame.cimModel.positionPoints.indexOf(positionPoint);
|
|
2852
|
+
if (idx > -1) {
|
|
2853
|
+
frame.cimModel.positionPoints.splice(idx, 1);
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2922
2856
|
}
|
|
2923
2857
|
cimModel.substations.delete(substation.mrid);
|
|
2924
2858
|
cimModel.removeObject(substation);
|
|
@@ -2926,6 +2860,33 @@ class ConverterI7 {
|
|
|
2926
2860
|
}
|
|
2927
2861
|
});
|
|
2928
2862
|
}
|
|
2863
|
+
sortTransformerEnd(powerTransformer, sortProperty, order) {
|
|
2864
|
+
let winding_guids = new Array(powerTransformer.powerTransformerEnds.length);
|
|
2865
|
+
let winding_guids_fixed = new Array(powerTransformer.powerTransformerEnds.length);
|
|
2866
|
+
for (let i = 0; i < powerTransformer.powerTransformerEnds.length; i++) {
|
|
2867
|
+
winding_guids[i] = powerTransformer.powerTransformerEnds[i].getUUID();
|
|
2868
|
+
winding_guids_fixed[i] = powerTransformer.powerTransformerEnds[i].getUUID();
|
|
2869
|
+
}
|
|
2870
|
+
powerTransformer.powerTransformerEnds.sort(function (w1, w2) {
|
|
2871
|
+
if (order === 'asc')
|
|
2872
|
+
return w1[sortProperty] - w2[sortProperty];
|
|
2873
|
+
if (order === 'desc')
|
|
2874
|
+
return w2[sortProperty] - w1[sortProperty];
|
|
2875
|
+
});
|
|
2876
|
+
const winding1_guid = winding_guids[0];
|
|
2877
|
+
const winding2 = powerTransformer.powerTransformerEnds[0];
|
|
2878
|
+
if (!(winding1_guid === winding2.getUUID())) {
|
|
2879
|
+
const winding1 = powerTransformer.powerTransformerEnds.find(e => e.mrid === winding1_guid[0]);
|
|
2880
|
+
if (winding1) {
|
|
2881
|
+
let val = winding2.phaseAngleClock;
|
|
2882
|
+
winding2.phaseAngleClock = 0;
|
|
2883
|
+
winding1.phaseAngleClock = 12 - val;
|
|
2884
|
+
}
|
|
2885
|
+
else {
|
|
2886
|
+
const isNull = true;
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2929
2890
|
setACLineSegmentProperties(cimModel, acLineSegment, data, defaultValuesConfig) {
|
|
2930
2891
|
if (utils_2.isNumericI7(data.laenge) && data.laenge <= 0) {
|
|
2931
2892
|
data.flag_impedanzlos = 1;
|
|
@@ -3000,12 +2961,12 @@ class ConverterI7 {
|
|
|
3000
2961
|
else {
|
|
3001
2962
|
acLineSegment.bch = 0;
|
|
3002
2963
|
}
|
|
3003
|
-
for (const
|
|
2964
|
+
for (const terminal of acLineSegment.terminals.values()) {
|
|
3004
2965
|
if (utils_2.isNumericI7(data.ir) && data.ir > 0) {
|
|
3005
|
-
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name,
|
|
2966
|
+
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, data.ir);
|
|
3006
2967
|
}
|
|
3007
2968
|
else if (assetType && assetType.ratedCurrent && assetType.ratedCurrent !== 0) {
|
|
3008
|
-
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name,
|
|
2969
|
+
this.setConductingEquipmentCurrentLimit(cimModel, acLineSegment.name, terminal, assetType.ratedCurrent);
|
|
3009
2970
|
}
|
|
3010
2971
|
const psrType = utils_1.createIfNotExitsPSRType(cimModel, data.typ);
|
|
3011
2972
|
acLineSegment.psrTypeUUID = psrType.mrid;
|
|
@@ -3057,7 +3018,7 @@ class ConverterI7 {
|
|
|
3057
3018
|
let terminal;
|
|
3058
3019
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
3059
3020
|
const cn = object;
|
|
3060
|
-
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), '
|
|
3021
|
+
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation(['Terminal_T', `_${cimModel.terminals.size}`.toString()]));
|
|
3061
3022
|
terminal.setConnectivityNode(cn);
|
|
3062
3023
|
cn.addTerminal(terminal);
|
|
3063
3024
|
cimModel.addTerminal(terminal);
|
|
@@ -3085,11 +3046,12 @@ class ConverterI7 {
|
|
|
3085
3046
|
const frameBD = this.getConnectedBoundaryModel(anschlussUUID);
|
|
3086
3047
|
if (frameBD) {
|
|
3087
3048
|
const cimModelBD = frameBD.cimModel;
|
|
3049
|
+
frame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_EQ, frameBD.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
3088
3050
|
const object = cimModelBD.getObject(anschlussUUID);
|
|
3089
3051
|
let cn;
|
|
3090
3052
|
if (object instanceof ConnectivityNode_1.ConnectivityNode) {
|
|
3091
3053
|
cn = object;
|
|
3092
|
-
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), '
|
|
3054
|
+
terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation(['Terminal_T', `_${cimModel.terminals.size}`.toString()]));
|
|
3093
3055
|
terminal.connectivityNodeUUID = cn.mrid;
|
|
3094
3056
|
terminal.phases = phase;
|
|
3095
3057
|
terminal.connected = true;
|
|
@@ -3098,10 +3060,15 @@ class ConverterI7 {
|
|
|
3098
3060
|
}
|
|
3099
3061
|
else if (object instanceof Terminal_1.Terminal) {
|
|
3100
3062
|
terminal = object;
|
|
3101
|
-
cn = terminal.
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3063
|
+
cn = terminal.getConnectivityNode();
|
|
3064
|
+
if (cn === undefined) {
|
|
3065
|
+
frameBD.cimModel.getConnectivityNode(terminal.getConnectivityNodeUUID());
|
|
3066
|
+
}
|
|
3067
|
+
if (cn !== undefined) {
|
|
3068
|
+
cn.terminals.delete(terminal.mrid);
|
|
3069
|
+
terminal.setConnectivityNodeUUID(cn.getUUID());
|
|
3070
|
+
terminal.setConnectivityNode(undefined);
|
|
3071
|
+
}
|
|
3105
3072
|
cimModelBD.terminals.delete(terminal.mrid);
|
|
3106
3073
|
cimModel.addTerminal(terminal);
|
|
3107
3074
|
}
|
|
@@ -3135,17 +3102,17 @@ class ConverterI7 {
|
|
|
3135
3102
|
let equivalentInjection = undefined;
|
|
3136
3103
|
frame.cimModel.equivalentInjections.forEach((equivinj, uuid) => {
|
|
3137
3104
|
var _a;
|
|
3138
|
-
if (equivinj.name.match(frame.tsoName).length > 0 && ((_a = equivinj.terminals.values()) === null || _a === void 0 ? void 0 : _a.next().value.getConnectivityNodeUUID()) === cn.getUUID()) {
|
|
3105
|
+
if (equivinj.name.match(frame.tsoName) && equivinj.name.match(frame.tsoName).length > 0 && ((_a = equivinj.terminals.values()) === null || _a === void 0 ? void 0 : _a.next().value.getConnectivityNodeUUID()) === cn.getUUID()) {
|
|
3139
3106
|
equivinj_exists = true;
|
|
3140
3107
|
}
|
|
3141
3108
|
});
|
|
3142
3109
|
if (!equivinj_exists) {
|
|
3143
|
-
let tmp_terminal = new Terminal_1.Terminal(utils_1.generateUUID(), 'T');
|
|
3110
|
+
let tmp_terminal = new Terminal_1.Terminal(utils_1.generateUUID(), util_create_1.createNotation(['Terminal_BD-T', `_${frame.cimModel.equivalentInjections.size}`.toString()]));
|
|
3144
3111
|
tmp_terminal.setConnectivityNodeUUID(cn.mrid);
|
|
3145
3112
|
tmp_terminal.phases = PhaseCode_1.PhaseCode.ABC;
|
|
3146
3113
|
tmp_terminal.connected = true;
|
|
3147
3114
|
tmp_terminal.sequenceNumber = 1;
|
|
3148
|
-
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.generateUUID(), `
|
|
3115
|
+
equivalentInjection = new EquivalentInjection_1.EquivalentInjection(utils_1.generateUUID(), util_create_1.createNotation([cn.name, '', '_BD-EI', `_${frame.cimModel.equivalentInjections.size}`.toString()]));
|
|
3149
3116
|
equivalentInjection.p = 0;
|
|
3150
3117
|
equivalentInjection.q = 0;
|
|
3151
3118
|
equivalentInjection.regulationStatus = false;
|
|
@@ -3306,13 +3273,14 @@ class ConverterI7 {
|
|
|
3306
3273
|
this.addDefaultObjectsLoadModel(frame.cimModel, defaultValuesConfig);
|
|
3307
3274
|
this.addDefaultObjectsGeo(frame.cimModel, defaultValuesConfig);
|
|
3308
3275
|
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_EQ_BD], tempDirPath);
|
|
3276
|
+
frame.addDependentModel(rdf_xml_1.RDF_XML.PROFILE_GL, frame.getModelUUID(rdf_xml_1.RDF_XML.PROFILE_EQ_BD));
|
|
3309
3277
|
}
|
|
3310
3278
|
this.exportFramesBoundary = this.associateGeoRegionsToExportFrames(boundaryFrames);
|
|
3311
3279
|
const gridFrames = this.initExportFrames(gridExports, geoRegions, allSubGeoRegions);
|
|
3312
3280
|
for (const frame of gridFrames) {
|
|
3313
3281
|
this.addDefaultObjectsLoadModel(frame.cimModel, defaultValuesConfig);
|
|
3314
3282
|
this.addDefaultObjectsGeo(frame.cimModel, defaultValuesConfig);
|
|
3315
|
-
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_EQ, rdf_xml_1.RDF_XML.PROFILE_SSH, rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_AMPI7, rdf_xml_1.RDF_XML.PROFILE_DY], tempDirPath);
|
|
3283
|
+
frame.initProfileXmlSerializers([rdf_xml_1.RDF_XML.PROFILE_EQ, rdf_xml_1.RDF_XML.PROFILE_SSH, rdf_xml_1.RDF_XML.PROFILE_GL, rdf_xml_1.RDF_XML.PROFILE_AMPI7, rdf_xml_1.RDF_XML.PROFILE_DY, rdf_xml_1.RDF_XML.PROFILE_SV], tempDirPath);
|
|
3316
3284
|
}
|
|
3317
3285
|
this.exportFrames = this.associateGeoRegionsToExportFrames(gridFrames);
|
|
3318
3286
|
});
|
|
@@ -3327,7 +3295,7 @@ class ConverterI7 {
|
|
|
3327
3295
|
for (const exportObject of exportEntry.objects) {
|
|
3328
3296
|
switch (exportEntry.objectType) {
|
|
3329
3297
|
case data_structures_i7_1.ExportObjectType.georegion: {
|
|
3330
|
-
const geoRegion = geoRegions.find(elem => elem.name
|
|
3298
|
+
const geoRegion = geoRegions.find(elem => elem.name.match(exportObject.name));
|
|
3331
3299
|
if (!geoRegion) {
|
|
3332
3300
|
this.logger.error(`Kein ${exportEntry.objectType} mit dem Namen ${exportObject.name} gefunden.`);
|
|
3333
3301
|
continue;
|
|
@@ -3339,7 +3307,7 @@ class ConverterI7 {
|
|
|
3339
3307
|
break;
|
|
3340
3308
|
}
|
|
3341
3309
|
case data_structures_i7_1.ExportObjectType.subgeoregion: {
|
|
3342
|
-
const subGeoRegion = subGeoRegions.find(elem => elem.name
|
|
3310
|
+
const subGeoRegion = subGeoRegions.find(elem => elem.name.match(exportObject.name));
|
|
3343
3311
|
if (!subGeoRegion) {
|
|
3344
3312
|
this.logger.error(`Kein ${exportEntry.objectType} mit dem Namen ${exportObject.name} gefunden.`);
|
|
3345
3313
|
continue;
|
|
@@ -3512,14 +3480,122 @@ class ConverterI7 {
|
|
|
3512
3480
|
powerTransformerEnd.powerTransformer = powerTransformer;
|
|
3513
3481
|
powerTransformer.addPowerTransformerEnd(powerTransformerEnd);
|
|
3514
3482
|
}
|
|
3515
|
-
|
|
3483
|
+
createRatioTapChanger(i7Data, transformerEnd, cimModel, neutralU, connectivityNode, spannungsband) {
|
|
3484
|
+
var _a, _b;
|
|
3485
|
+
const wicklungsnummer = transformerEnd.endNumber;
|
|
3486
|
+
const gestufteSeite = i7Data[`gestufte_seite_s${wicklungsnummer}`] === 0 ? 1 : i7Data[`gestufte_seite_s${wicklungsnummer}`];
|
|
3487
|
+
if (gestufteSeite === wicklungsnummer) {
|
|
3488
|
+
const lowStep = i7Data[`minstufe_s${transformerEnd.endNumber}`];
|
|
3489
|
+
const highStep = i7Data[`maxstufe_s${transformerEnd.endNumber}`];
|
|
3490
|
+
const neutralStep = i7Data[`mittelstufe_s${transformerEnd.endNumber}`];
|
|
3491
|
+
const currentStep = i7Data[`aktstufe_s${transformerEnd.endNumber}`];
|
|
3492
|
+
const i7TapArray = utils_2.getTapChangerStepArray(lowStep, highStep);
|
|
3493
|
+
const mappedCurrentStep = i7TapArray.indexOf(currentStep) + 1;
|
|
3494
|
+
const lowerVoltageStepCount = utils_2.getTapChangerStepCount(lowStep, neutralStep);
|
|
3495
|
+
const increaseVoltageStepCount = utils_2.getTapChangerStepCount(neutralStep, highStep);
|
|
3496
|
+
const lowerVoltageStepIncrement = Math.abs(i7Data[`umin_s${transformerEnd.endNumber}`]) / lowerVoltageStepCount * -1;
|
|
3497
|
+
let increaseVoltageStepIncrement = Math.abs(i7Data[`umax_s${transformerEnd.endNumber}`]) / lowerVoltageStepCount;
|
|
3498
|
+
increaseVoltageStepIncrement = isNaN(increaseVoltageStepIncrement) ? 1 : increaseVoltageStepIncrement;
|
|
3499
|
+
const ratioTapChangerTable = new RatioTapChangerTable_1.RatioTapChangerTable(utils_1.generateUUID(), `${transformerEnd.name} W${transformerEnd.endNumber}`);
|
|
3500
|
+
for (let i = 0; i < lowerVoltageStepCount; i++) {
|
|
3501
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, i + 1, 1 + (lowerVoltageStepIncrement * (lowerVoltageStepCount - i)));
|
|
3502
|
+
}
|
|
3503
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, lowerVoltageStepCount + 1, 1);
|
|
3504
|
+
for (let i = 0; i < increaseVoltageStepCount; i++) {
|
|
3505
|
+
const step = (lowerVoltageStepCount + 1) + (i + 1);
|
|
3506
|
+
util_create_1.createRatioTapChangerTablePoint(ratioTapChangerTable, step, 1 + (increaseVoltageStepIncrement * (i + 1)));
|
|
3507
|
+
}
|
|
3508
|
+
const ratioTapChanger = new RatioTapChanger_1.RatioTapChanger(utils_1.generateUUID(), `${transformerEnd.name} W${transformerEnd.endNumber}`);
|
|
3509
|
+
ratioTapChanger.stepVoltageIncrement = increaseVoltageStepIncrement;
|
|
3510
|
+
ratioTapChanger.tculControlMode = TransformerControlMode_1.TransformerControlMode.volt;
|
|
3511
|
+
ratioTapChanger.ltcFlag = false;
|
|
3512
|
+
ratioTapChanger.lowStep = 1;
|
|
3513
|
+
ratioTapChanger.highStep = ratioTapChangerTable.ratioTapChangerTablePoints.length;
|
|
3514
|
+
ratioTapChanger.neutralStep = i7TapArray.indexOf(neutralStep) + 1;
|
|
3515
|
+
ratioTapChanger.normalStep = ratioTapChanger.neutralStep;
|
|
3516
|
+
ratioTapChanger.step = mappedCurrentStep;
|
|
3517
|
+
ratioTapChanger.transformerEnd = transformerEnd;
|
|
3518
|
+
transformerEnd.ratioTapChanger = ratioTapChanger;
|
|
3519
|
+
ratioTapChanger.neutralU = neutralU;
|
|
3520
|
+
ratioTapChanger.ratioTapChangerTableUUID = ratioTapChangerTable.mrid;
|
|
3521
|
+
ratioTapChangerTable.ratioTapChanger = ratioTapChanger;
|
|
3522
|
+
const regelung = +i7Data[`regelung_s${transformerEnd.endNumber}`];
|
|
3523
|
+
if (regelung > 0) {
|
|
3524
|
+
const tapChangerControl = new TapChangerControl_1.TapChangerControl(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
3525
|
+
tapChangerControl.discrete = true;
|
|
3526
|
+
const umax = utils_2.getSpannungsband('umax', spannungsband, neutralU);
|
|
3527
|
+
const umin = utils_2.getSpannungsband('umin', spannungsband, neutralU);
|
|
3528
|
+
const usoll = utils_2.getSpannungsband('usoll', spannungsband, (umax + umin) / 2);
|
|
3529
|
+
const pVorgabe = utils_2.isNumericI7(i7Data[`p_vorgabe`]) ? +i7Data[`p_vorgabe`] : undefined;
|
|
3530
|
+
switch (regelung) {
|
|
3531
|
+
case 1: {
|
|
3532
|
+
ratioTapChanger.controlEnabled = true;
|
|
3533
|
+
tapChangerControl.enabled = true;
|
|
3534
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.voltage;
|
|
3535
|
+
tapChangerControl.targetValue = usoll;
|
|
3536
|
+
tapChangerControl.targetDeadband = umax - usoll;
|
|
3537
|
+
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.k;
|
|
3538
|
+
break;
|
|
3539
|
+
}
|
|
3540
|
+
case 2: {
|
|
3541
|
+
ratioTapChanger.controlEnabled = true;
|
|
3542
|
+
tapChangerControl.enabled = true;
|
|
3543
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.activePower;
|
|
3544
|
+
tapChangerControl.targetValue = pVorgabe;
|
|
3545
|
+
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3546
|
+
break;
|
|
3547
|
+
}
|
|
3548
|
+
case 3: {
|
|
3549
|
+
ratioTapChanger.controlEnabled = true;
|
|
3550
|
+
tapChangerControl.enabled = true;
|
|
3551
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.currentFlow;
|
|
3552
|
+
break;
|
|
3553
|
+
}
|
|
3554
|
+
case 4: {
|
|
3555
|
+
ratioTapChanger.controlEnabled = true;
|
|
3556
|
+
tapChangerControl.enabled = true;
|
|
3557
|
+
tapChangerControl.mode = RegulatingControlModeKind_1.RegulatingControlModeKind.reactivePower;
|
|
3558
|
+
tapChangerControl.targetValueUnitMultiplier = UnitMultiplier_1.UnitMultiplier.M;
|
|
3559
|
+
break;
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
ratioTapChanger.tapChangerControl = tapChangerControl;
|
|
3563
|
+
tapChangerControl.addTapChanger(ratioTapChanger);
|
|
3564
|
+
cimModel.addTapChangerControl(tapChangerControl);
|
|
3565
|
+
}
|
|
3566
|
+
else {
|
|
3567
|
+
ratioTapChanger.controlEnabled = false;
|
|
3568
|
+
}
|
|
3569
|
+
if ((_a = connectivityNode === null || connectivityNode === void 0 ? void 0 : connectivityNode.terminals) === null || _a === void 0 ? void 0 : _a.size) {
|
|
3570
|
+
const terminal = [...connectivityNode.terminals.values()].find(elem => elem.connected);
|
|
3571
|
+
if (terminal)
|
|
3572
|
+
this.setTapChangerControl(ratioTapChanger, terminal);
|
|
3573
|
+
}
|
|
3574
|
+
if (!((_b = ratioTapChanger.tapChangerControl) === null || _b === void 0 ? void 0 : _b.terminal)) {
|
|
3575
|
+
this.logger.error(`Trafo ${i7Data.trafo3w}: Kein Terminal für TapChangerControl`);
|
|
3576
|
+
if (transformerEnd.phaseTapChanger) {
|
|
3577
|
+
transformerEnd.phaseTapChanger.tapChangerControl = undefined;
|
|
3578
|
+
transformerEnd.phaseTapChanger.tapChangerControlUUID = undefined;
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
cimModel.addRatioTapChanger(ratioTapChanger);
|
|
3582
|
+
cimModel.addRatioTapChangerTable(ratioTapChangerTable);
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
createPhaseTapChanger(i7Data, transformerEnd, cimModel, neutralU, connectivityNode, spannungsband, is3WTransformer) {
|
|
3516
3586
|
var _a, _b;
|
|
3517
3587
|
const wicklungsnummer = transformerEnd.endNumber;
|
|
3518
3588
|
const gestufteSeite = i7Data[`gestufte_seite_s${wicklungsnummer}`] === 0 ? 1 : i7Data[`gestufte_seite_s${wicklungsnummer}`];
|
|
3519
3589
|
if (gestufteSeite === wicklungsnummer) {
|
|
3520
|
-
const spezialregelung = i7Data.trafo_spezial;
|
|
3521
3590
|
let phaseTapChanger;
|
|
3591
|
+
const spezialregelung = i7Data.trafo_spezial ? i7Data.trafo_spezial : (is3WTransformer ? 2 : undefined);
|
|
3522
3592
|
switch (spezialregelung) {
|
|
3593
|
+
case (1): {
|
|
3594
|
+
const phaseTapChangerSync = new PhaseTapChangerSymmetrical_1.PhaseTapChangerSymmetrical(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
3595
|
+
phaseTapChanger = phaseTapChangerSync;
|
|
3596
|
+
cimModel.addPhaseTapChangerSymmetrical(phaseTapChangerSync);
|
|
3597
|
+
break;
|
|
3598
|
+
}
|
|
3523
3599
|
case (2): {
|
|
3524
3600
|
const phaseTapChangerAsync = new PhaseTapChangerAsymmetrical_1.PhaseTapChangerAsymmetrical(utils_1.generateUUID(), `${transformerEnd.name} W_${transformerEnd.endNumber}`);
|
|
3525
3601
|
phaseTapChangerAsync.windingConnectionAngle = utils_2.convertToNumberI7(i7Data[`uzus_winkel_s${transformerEnd.endNumber}`]);
|