@enervance/insight-cim-model 0.0.59 → 0.0.60

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.
@@ -202,8 +202,11 @@ class ConverterI7 {
202
202
  yield frame.closeXMLModel();
203
203
  let endTime = perf_hooks_1.performance.now();
204
204
  frame.cimModel.purgeData();
205
- console.log(`\nSerializeModel ${geoRegion.name} ${(endTime - startTime) / 1000} seconds\n`);
205
+ console.log(`SerializeModel ${geoRegion.name} ${(endTime - startTime) / 1000} seconds\n`);
206
+ let memoryUsed = process.memoryUsage();
207
+ console.log(`heapUsed ${Math.round(memoryUsed['heapUsed'] / 1024 / 1024 * 100) / 100} MB`);
206
208
  }
209
+ console.log('________________________________________________');
207
210
  console.log('Serialize BD Profiles');
208
211
  for (const entry of this.exportFramesBoundary.entries()) {
209
212
  const geoRegionUUID = entry[0];
@@ -428,54 +431,20 @@ class ConverterI7 {
428
431
  logExecutionTime(this.logger, startTime, `assignment of sequence number`);
429
432
  startTime = perf_hooks_1.performance.now();
430
433
  yield this.convertNetzvarianten(cimModel, integral7Modell);
431
- logExecutionTime(this.logger, startTime, `convertNetzvarianten`);
432
- console.log(this.exportFramesBoundary);
433
434
  for (const key of integral7Modell.i7SchemaID2UUID.keys()) {
434
- startTime = perf_hooks_1.performance.now();
435
435
  yield this.convertSchemaStandorte(cimModel, integral7Modell, standortIDs, key, constants_1.NsgConstants.onlyEingeblendet);
436
- logExecutionTime(this.logger, startTime, `convertSchemaStandorte`);
437
- startTime = perf_hooks_1.performance.now();
438
436
  yield this.convertSchemaKnotenSo(cimModel, integral7Modell, knotenSoIDs, key, constants_1.NsgConstants.onlyEingeblendet);
439
- logExecutionTime(this.logger, startTime, `convertSchemaKnotenSo`);
440
- startTime = perf_hooks_1.performance.now();
441
- logExecutionTime(this.logger, startTime, `convertSchemaHgueKnotenSo`);
442
- startTime = perf_hooks_1.performance.now();
443
437
  yield this.convertSchemaSchaltanlage(cimModel, integral7Modell, schaltanlagenIDs, key, constants_1.NsgConstants.onlyEingeblendet);
444
- logExecutionTime(this.logger, startTime, `convertSchemaSchaltanlage`);
445
- startTime = perf_hooks_1.performance.now();
446
438
  yield this.convertSchemaSchaltanlagenAbschnitte(cimModel, integral7Modell, schaltanlagenAbschnittIDs, key, constants_1.NsgConstants.onlyEingeblendet);
447
- logExecutionTime(this.logger, startTime, `convertSchemaSchaltanlagenAbschnitte`);
448
- startTime = perf_hooks_1.performance.now();
449
439
  yield this.convertSchemaSammelschienenAbschnitte(cimModel, integral7Modell, schaltanlagenAbschnittIDs, key, constants_1.NsgConstants.onlyEingeblendet);
450
- logExecutionTime(this.logger, startTime, `convertSchemaSammelschienenAbschnitte`);
451
- startTime = perf_hooks_1.performance.now();
452
440
  yield this.convertSchemaSchaltfeldElemente(cimModel, integral7Modell, schaltfeldIDs, key, constants_1.NsgConstants.onlyEingeblendet);
453
- logExecutionTime(this.logger, startTime, `convertSchemaSchaltfeldElemente`);
454
- startTime = perf_hooks_1.performance.now();
455
441
  yield this.convertSchemaQuerkupplungen(cimModel, integral7Modell, key, constants_1.NsgConstants.onlyEingeblendet);
456
- logExecutionTime(this.logger, startTime, `convertSchemaQuerkupplungen`);
457
- startTime = perf_hooks_1.performance.now();
458
442
  yield this.convertSchemaLaengskupplungen(cimModel, integral7Modell, key, constants_1.NsgConstants.onlyEingeblendet);
459
- logExecutionTime(this.logger, startTime, `convertSchemaLaengskupplungen`);
460
- startTime = perf_hooks_1.performance.now();
461
443
  yield this.convertSchemaTransformatoren2W(cimModel, integral7Modell, key, constants_1.NsgConstants.onlyEingeblendet);
462
- logExecutionTime(this.logger, startTime, `convertSchemaTransformatoren2W`);
463
- startTime = perf_hooks_1.performance.now();
464
444
  yield this.convertSchemaTransformatoren3W(cimModel, integral7Modell, standortIDs, key, constants_1.NsgConstants.onlyEingeblendet);
465
- logExecutionTime(this.logger, startTime, `convertSchemaTransformatoren3W`);
466
- startTime = perf_hooks_1.performance.now();
467
445
  yield this.convertSchemaQuerzweige(cimModel, integral7Modell, key, constants_1.NsgConstants.onlyEingeblendet);
468
- logExecutionTime(this.logger, startTime, `convertSchemaQuerzweige`);
469
- startTime = perf_hooks_1.performance.now();
470
- logExecutionTime(this.logger, startTime, `convertSchemaSternpunktSchiene`);
471
- startTime = perf_hooks_1.performance.now();
472
- logExecutionTime(this.logger, startTime, `convertSchemaSternpunktKnoten`);
473
- startTime = perf_hooks_1.performance.now();
474
446
  yield this.convertSchemaLeitungen(cimModel, integral7Modell, key, constants_1.NsgConstants.onlyEingeblendet);
475
- logExecutionTime(this.logger, startTime, `convertSchemaLeitungen`);
476
- startTime = perf_hooks_1.performance.now();
477
447
  yield this.convertSchemaKnotenSo2(cimModel, integral7Modell, [...integral7Modell.integralAdditionalGrenzknotenIDs.values()], key, constants_1.NsgConstants.onlyEingeblendet);
478
- logExecutionTime(this.logger, startTime, `convertSchemaKnotenSo`);
479
448
  integral7Modell.integralLaengskupplungen.clear();
480
449
  integral7Modell.integralHgueLeitungen.clear();
481
450
  integral7Modell.integralNSGSchaltanlage.clear();
@@ -494,6 +463,7 @@ class ConverterI7 {
494
463
  integral7Modell.placedCIMObjectsForDLProfil.clear();
495
464
  }
496
465
  }
466
+ logExecutionTime(this.logger, startTime, `convertNetzvarianten`);
497
467
  });
498
468
  }
499
469
  assignTerminalSequenceNumber(cimModel) {
@@ -514,7 +484,6 @@ class ConverterI7 {
514
484
  }
515
485
  }
516
486
  else {
517
- console.log(`Terminal without connection ${terminalUUID}`);
518
487
  }
519
488
  }
520
489
  }
@@ -533,7 +502,6 @@ class ConverterI7 {
533
502
  }
534
503
  }
535
504
  else {
536
- console.log(`Terminal without connection ${terminalUUID}`);
537
505
  }
538
506
  }
539
507
  }
@@ -552,7 +520,6 @@ class ConverterI7 {
552
520
  }
553
521
  }
554
522
  else {
555
- console.log(`Terminal without connection ${terminalUUID}`);
556
523
  }
557
524
  }
558
525
  }
@@ -876,6 +843,8 @@ class ConverterI7 {
876
843
  const filteredResultsNsgSchaltfeld = util_functions_1.DLUtilFunctions.filterByVariantenNrOnlyEingeblendet(resultsNsgSchaltfeld, variantenNr, onlyEingeblendet);
877
844
  for (const i7Data of filteredResultsNsgSchaltfeld) {
878
845
  const nsgSaa = integral7.integralNSGSAAbschnitt.get(i7Data.nsgsaa);
846
+ if (!nsgSaa)
847
+ continue;
879
848
  const nsgSa = integral7.integralNSGSchaltanlage.get(nsgSaa.nsgsaid);
880
849
  if (nsgSa === undefined) {
881
850
  continue;
@@ -996,6 +965,8 @@ class ConverterI7 {
996
965
  ssabs.forEach(ssab => relevantSSabIDs.add(ssab.id));
997
966
  util_functions_1.DLUtilFunctions.placeKupplung(kpFeldI7KnotenBeziehungen, uuidPointsMap, cimModel, relevantSSabIDs, integral7.integralNSGSsab, this.integralID2UUID, integral7.placedCIMObjectsForDLProfil, kpFeldDeltaausrichtung, kpFeldLeftOffset, false);
998
967
  const nsgSaa = integral7.integralNSGSAAbschnitt.get(i7Data.nsgsaa);
968
+ if (!nsgSaa)
969
+ continue;
999
970
  const nsgSa = integral7.integralNSGSchaltanlage.get(nsgSaa.nsgsaid);
1000
971
  uuidPointsMap.forEach((entryDiagramObject, key) => {
1001
972
  if (!(entryDiagramObject.identifiedObject instanceof Terminal_1.Terminal || entryDiagramObject.identifiedObject instanceof ConnectivityNode_1.ConnectivityNode)) {
@@ -1034,18 +1005,20 @@ class ConverterI7 {
1034
1005
  util_functions_1.DLUtilFunctions.placeKupplung(lKupplungI7KnotenBeziehungen, uuidPointsMap, cimModel, relevantSSabIDs, integral7.integralNSGSsab, this.integralID2UUID, integral7.placedCIMObjectsForDLProfil, 0, 0, true);
1035
1006
  }
1036
1007
  const nsgSaa = integral7.integralNSGSAAbschnitt.get(i7Data.nsgsaa);
1037
- const nsgSa = integral7.integralNSGSchaltanlage.get(nsgSaa.nsgsaid);
1038
- uuidPointsMap.forEach((entryDiagramObject, key) => {
1039
- if (!(entryDiagramObject.identifiedObject instanceof Terminal_1.Terminal || entryDiagramObject.identifiedObject instanceof ConnectivityNode_1.ConnectivityNode)) {
1040
- if (entryDiagramObject.rotation === undefined) {
1041
- entryDiagramObject.rotation = util_functions_1.DLUtilFunctions.getRotationBasedOnNsgSa(nsgSa.ausrichtung);
1042
- }
1043
- else {
1044
- entryDiagramObject.rotation += util_functions_1.DLUtilFunctions.getRotationBasedOnNsgSa(nsgSa.ausrichtung);
1008
+ const nsgSa = integral7.integralNSGSchaltanlage.get(nsgSaa === null || nsgSaa === void 0 ? void 0 : nsgSaa.nsgsaid);
1009
+ if (!nsgSa) {
1010
+ uuidPointsMap.forEach((entryDiagramObject, key) => {
1011
+ if (!(entryDiagramObject.identifiedObject instanceof Terminal_1.Terminal || entryDiagramObject.identifiedObject instanceof ConnectivityNode_1.ConnectivityNode)) {
1012
+ if (entryDiagramObject.rotation === undefined) {
1013
+ entryDiagramObject.rotation = util_functions_1.DLUtilFunctions.getRotationBasedOnNsgSa(nsgSa.ausrichtung);
1014
+ }
1015
+ else {
1016
+ entryDiagramObject.rotation += util_functions_1.DLUtilFunctions.getRotationBasedOnNsgSa(nsgSa.ausrichtung);
1017
+ }
1045
1018
  }
1046
- }
1047
- });
1048
- util_functions_1.DLUtilFunctions.rotateShiftAddBasedOnNsgSAA(cimModel, integral7, variantenNr, i7Data.nsgsaa, uuidPointsMap);
1019
+ });
1020
+ util_functions_1.DLUtilFunctions.rotateShiftAddBasedOnNsgSAA(cimModel, integral7, variantenNr, i7Data.nsgsaa, uuidPointsMap);
1021
+ }
1049
1022
  }
1050
1023
  }
1051
1024
  });
@@ -3759,7 +3732,6 @@ class ConverterI7 {
3759
3732
  if (this.isTableAvailable(integral_sql_1.Integral7TableNames.HGUE_LEITUNG) && integral7.hgueAnschlussKnotenIDs.length > 0) {
3760
3733
  const result = yield this.mysqlController.execQuery(integral_sql_1.getI7Query(integral_sql_1.I7Objects.HGUE_LEITUNG, integral7.hgueAnschlussKnotenIDs));
3761
3734
  for (const i7Data of result) {
3762
- console.log(utils_1.getUUID(i7Data.guid_dcline));
3763
3735
  if (utils_1.getUUID(i7Data.guid_dcline) === '6a5b7e1e-f8be-4165-9752-2e2359d9b4f8') {
3764
3736
  let stop = true;
3765
3737
  }