@enervance/insight-cim-model 0.0.324 → 0.0.327

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.
@@ -9,7 +9,7 @@ import { ConverterStatus, IExportConfig, Integral7Model, ITargetVoltage } from '
9
9
  import { DefaultValuesConfigInterface } from './interface-i7/default-values-config.interface.js';
10
10
  import { I7ExportFrame } from './interface-i7/export-frame-i7.js';
11
11
  import { ObjectMappingConfigInterface } from './interface-i7/object-mapping-config.interface.js';
12
- import { AsynchronmotorTyp, Einspeisung, Ersatzquerzweig, GeneratorTyp, KDrosselTyp, Marktgebiet, Netzgruppe, Standort, Trafo } from './model/interfaces.js';
12
+ import { AsynchronmotorTyp, Einspeisung, Ersatzquerzweig, GeneratorTyp, ISvProfileData, KDrosselTyp, Marktgebiet, Netzgruppe, Standort, Trafo } from './model/interfaces.js';
13
13
  import { ConfigurableDLConvertOptions, Executor } from './dl-convert/executor.js';
14
14
  import { IEnergySourceTypeMapping } from './interface-i7/energy-source.type.mapping.js';
15
15
  import { IUuidConfig } from './interface-i7/uuid-config.interface.js';
@@ -63,7 +63,9 @@ export declare class ConverterIntegral7 {
63
63
  /** Array zur Speicherung von I7 Berechnungen */
64
64
  private powerFlowResults;
65
65
  /** Map zur Speicherung der relevanten Infos für das SV-Profile je Frame */
66
- private svProfileTerminalData;
66
+ private: Map<number, ISvProfileData>;
67
+ private svProfileZweigData;
68
+ private svProfileKnotenData;
67
69
  set configurableDLConvertOptions(arg: ConfigurableDLConvertOptions);
68
70
  get configurableDLConvertOptions(): ConfigurableDLConvertOptions;
69
71
  constructor();
@@ -317,7 +317,8 @@ class ConverterIntegral7 {
317
317
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
318
318
  const integral7Modell = frame.getI7Model();
319
319
  const cimModel = frame.cimModel;
320
- this.svProfileTerminalData = new Map;
320
+ this.svProfileZweigData = new Map;
321
+ this.svProfileZweigData = new Map;
321
322
  const subGeoRegionsUUIDs = geoRegion.regions.map(elem => elem.mrid);
322
323
  const subGeoRegionsI7IDs = [];
323
324
  for (const uuid of subGeoRegionsUUIDs) {
@@ -597,7 +598,7 @@ class ConverterIntegral7 {
597
598
  if (this.powerFlowResults.length) {
598
599
  const powerFlowResultID = this.powerFlowResults[0].ergnr;
599
600
  /** Leitungen */
600
- yield this.createSvPowerFlowAnschluesse(cimModel, powerFlowResultID, this.svProfileTerminalData);
601
+ yield this.createSvPowerFlowAnschluesse(cimModel, powerFlowResultID, this.svProfileZweigData);
601
602
  /** Sammelschienen */
602
603
  yield this.createSvProfileDataSsab(cimModel, powerFlowResultID);
603
604
  /** KnotenSo */
@@ -693,7 +694,7 @@ class ConverterIntegral7 {
693
694
  createSvPowerFlowAnschluesse(cimModel, powerFlowResultID, svProfileData) {
694
695
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
695
696
  /** Längszweige */
696
- if (!this.svProfileTerminalData.size && !this.powerFlowResults.length)
697
+ if (!this.svProfileZweigData.size && !this.powerFlowResults.length)
697
698
  return;
698
699
  if (!this.isTableAvailable(integral_sql_1.Integral7TableNames.ERG_LFL_ANSCHLUSS))
699
700
  return;
@@ -2579,8 +2580,17 @@ class ConverterIntegral7 {
2579
2580
  * KontenSo -> Anschluesspunkt
2580
2581
  * KnotenSf -> Schaltfeldpunkt
2581
2582
  * KnotenZw -> Netzschlaufe -> KnotenSo -> Anschlusspunkt */
2582
- this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
2583
- this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
2583
+ const startTerminal = this.createBoundaryConnection(frame, equivalentBranch, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
2584
+ const targetTerminal = this.createBoundaryConnection(frame, equivalentBranch, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
2585
+ /** SVProfile Data */
2586
+ this.svProfileZweigData.set(i7Data.flakn3p, {
2587
+ powerFlowResultID: i7Data.flakn3p,
2588
+ terminalUUID: startTerminal === null || startTerminal === void 0 ? void 0 : startTerminal.mrid
2589
+ });
2590
+ this.svProfileZweigData.set(i7Data.flekn3p, {
2591
+ powerFlowResultID: i7Data.flekn3p,
2592
+ terminalUUID: targetTerminal === null || targetTerminal === void 0 ? void 0 : targetTerminal.mrid
2593
+ });
2584
2594
  /**EQ */
2585
2595
  if (flag_lfl && !flag_ks) {
2586
2596
  equivalentBranch.r = (0, parser_utils_1.isNumericI7)(i7Data.r12_lfl) ? (0, parser_utils_1.convertToNumberI7)(i7Data.r12_lfl) : 10e9;
@@ -3385,6 +3395,10 @@ class ConverterIntegral7 {
3385
3395
  }
3386
3396
  if (connectivityNode) {
3387
3397
  const cpTerminal = this.createConnection(cimModel, condEquip, connectivityNode, PhaseCode_1.PhaseCode.ABC, true);
3398
+ this.svProfileZweigData.set(i7Data.flussinfo3p, {
3399
+ powerFlowResultID: i7Data.flussinfo3p,
3400
+ terminalUUID: cpTerminal === null || cpTerminal === void 0 ? void 0 : cpTerminal.mrid
3401
+ });
3388
3402
  //create regulating control
3389
3403
  if (isRegulatingControl && (i7DataEinsp || i7DataKomp)) {
3390
3404
  let cterminal = undefined; //connection point terminal of this device
@@ -4285,8 +4299,8 @@ class ConverterIntegral7 {
4285
4299
  tableName = integral_sql_1.Integral7TableNames.FREILEITUNG;
4286
4300
  }
4287
4301
  const leitungStromkreisabschnitt = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(type, this.getAvailableColumnNames(tableName), leitungIDs));
4288
- let result_ohl = undefined;
4289
- let result_cable = undefined;
4302
+ let result_ohl = new Array;
4303
+ let result_cable = new Array;
4290
4304
  if (type.match(integral_sql_1.I7Objects.STROMKREISABSCHNITT_KABEL_FREILEITUNG)) {
4291
4305
  result_cable = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.STROMKREISABSCHNITT_KABEL, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.KABEL), leitungIDs));
4292
4306
  result_ohl = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.STROMKREISABSCHNITT_FREILEITUNG, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.FREILEITUNG), leitungIDs));
@@ -4371,7 +4385,7 @@ class ConverterIntegral7 {
4371
4385
  const acLineSegmentStart = acLineSegments[0];
4372
4386
  const startTerminal = this.createBoundaryConnection(frame, acLineSegmentStart, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
4373
4387
  /** SVProfile Data */
4374
- this.svProfileTerminalData.set(i7Data.flakn3p, {
4388
+ this.svProfileZweigData.set(i7Data.flakn3p, {
4375
4389
  powerFlowResultID: i7Data.flakn3p,
4376
4390
  terminalUUID: startTerminal === null || startTerminal === void 0 ? void 0 : startTerminal.mrid
4377
4391
  });
@@ -4394,7 +4408,7 @@ class ConverterIntegral7 {
4394
4408
  else {
4395
4409
  this.logger.debug(`Leitung ${i7Data.id} ${acLineSegmentStart.mrid} besitzt keinen Anfangsknoten. ${i7Data.aknoten} ${this.integralID2UUID.get(i7Data.aknoten)}`);
4396
4410
  }
4397
- let cable = result_cable.filter(elem => elem.id === stromkreisabschnitte[0].id);
4411
+ let cable = result_cable === null || result_cable === void 0 ? void 0 : result_cable.filter(elem => elem.id === stromkreisabschnitte[0].id);
4398
4412
  this.setACLineSegmentProperties(this.cimModelDefault, cimModel, acLineSegmentStart, stromkreisabschnitte[0], cable.length > 0, defaultValuesConfig);
4399
4413
  cimModel.addACLineSegment(acLineSegmentStart);
4400
4414
  /** Mitte */
@@ -4431,7 +4445,7 @@ class ConverterIntegral7 {
4431
4445
  const acLineSegmentZiel = acLineSegments[anzahl - 1];
4432
4446
  const targetTerminal = this.createBoundaryConnection(frame, acLineSegmentZiel, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
4433
4447
  /** SvProfile Data */
4434
- this.svProfileTerminalData.set(i7Data.flekn3p, {
4448
+ this.svProfileZweigData.set(i7Data.flekn3p, {
4435
4449
  powerFlowResultID: i7Data.flekn3p,
4436
4450
  terminalUUID: targetTerminal === null || targetTerminal === void 0 ? void 0 : targetTerminal.mrid
4437
4451
  });
@@ -5091,7 +5105,7 @@ class ConverterIntegral7 {
5091
5105
  * */
5092
5106
  const startTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.aknoten, PhaseCode_1.PhaseCode.ABC);
5093
5107
  /** SvProfile Data */
5094
- this.svProfileTerminalData.set(i7Data.flakn3p, {
5108
+ this.svProfileZweigData.set(i7Data.flakn3p, {
5095
5109
  powerFlowResultID: i7Data.flakn3p,
5096
5110
  terminalUUID: startTerminal === null || startTerminal === void 0 ? void 0 : startTerminal.mrid
5097
5111
  });
@@ -5130,7 +5144,7 @@ class ConverterIntegral7 {
5130
5144
  const zielTerminal = ziel ? this.createConnection(cimModel, powerTransformer, ziel, PhaseCode.ABC, true, 2) : undefined;*/
5131
5145
  const zielTerminal = this.createBoundaryConnection(frame, powerTransformer, i7Data.eknoten, PhaseCode_1.PhaseCode.ABC);
5132
5146
  /** SvProfile Data */
5133
- this.svProfileTerminalData.set(i7Data.flekn3p, {
5147
+ this.svProfileZweigData.set(i7Data.flekn3p, {
5134
5148
  powerFlowResultID: i7Data.flekn3p,
5135
5149
  terminalUUID: zielTerminal === null || zielTerminal === void 0 ? void 0 : zielTerminal.mrid
5136
5150
  });
@@ -5332,7 +5346,7 @@ class ConverterIntegral7 {
5332
5346
  const start = cimModel.getObject(knotenUUID);*/
5333
5347
  const terminal1 = this.createBoundaryConnection(frame, powerTransformer, wicklung1.aknoten, PhaseCode_1.PhaseCode.ABC);
5334
5348
  /** SvProfile Data */
5335
- this.svProfileTerminalData.set(wicklung1.flakn3p, {
5349
+ this.svProfileZweigData.set(wicklung1.flakn3p, {
5336
5350
  powerFlowResultID: wicklung1.flakn3p,
5337
5351
  terminalUUID: terminal1 === null || terminal1 === void 0 ? void 0 : terminal1.mrid
5338
5352
  });
@@ -5382,7 +5396,7 @@ class ConverterIntegral7 {
5382
5396
  /* const start2 = cimModel.getObject(this.integralID2UUID.get(wicklung2.aknoten));
5383
5397
  const terminal2 = start ? this.createConnection(cimModel, powerTransformer, start2, PhaseCode.ABC, true, 2) : undefined;*/
5384
5398
  const terminal2 = this.createBoundaryConnection(frame, powerTransformer, wicklung2.aknoten, PhaseCode_1.PhaseCode.ABC);
5385
- this.svProfileTerminalData.set(wicklung2.flakn3p, {
5399
+ this.svProfileZweigData.set(wicklung2.flakn3p, {
5386
5400
  powerFlowResultID: wicklung2.flakn3p,
5387
5401
  terminalUUID: terminal2 === null || terminal2 === void 0 ? void 0 : terminal2.mrid
5388
5402
  });
@@ -5434,7 +5448,7 @@ class ConverterIntegral7 {
5434
5448
  /* const start3 = cimModel.getObject(this.integralID2UUID.get(wicklung2.aknoten));
5435
5449
  const terminal3 = start ? this.createConnection(cimModel, powerTransformer, start3, PhaseCode.ABC, true, 3) : undefined;*/
5436
5450
  const terminal3 = this.createBoundaryConnection(frame, powerTransformer, wicklung3.aknoten, PhaseCode_1.PhaseCode.ABC);
5437
- this.svProfileTerminalData.set(wicklung3.flakn3p, {
5451
+ this.svProfileZweigData.set(wicklung3.flakn3p, {
5438
5452
  powerFlowResultID: wicklung3.flakn3p,
5439
5453
  terminalUUID: terminal3 === null || terminal3 === void 0 ? void 0 : terminal3.mrid
5440
5454
  });