@enervance/insight-cim-model 0.0.170 → 0.0.171
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.
|
@@ -436,7 +436,7 @@ class ConverterIntegral7 {
|
|
|
436
436
|
/** Einspeisungen -> EnergySources or EquivalentInjection or ExternalNetworkInjection */
|
|
437
437
|
if (knotenSoIDs.length > 0 || integral7Modell.knotenSfIDs.length > 0) {
|
|
438
438
|
startTime = performance.now();
|
|
439
|
-
yield this.convertEinspeisungen(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig);
|
|
439
|
+
yield this.convertEinspeisungen(cimModel, integral7Modell.targetVoltages, soSfKnoten, objectMappingConfig, energySourceTypeMappingConfig);
|
|
440
440
|
logExecutionTime(this.logger, startTime, `convertEinspeisungen`);
|
|
441
441
|
}
|
|
442
442
|
/** Generatoren -> SynchronousMachine */
|
|
@@ -763,7 +763,7 @@ class ConverterIntegral7 {
|
|
|
763
763
|
const result = yield this.mysqlController.execQuery((0, integral_sql_1.getI7Query)(integral_sql_1.I7Objects.STANDORT, this.getAvailableColumnNames(integral_sql_1.Integral7TableNames.STANDORT), whereID));
|
|
764
764
|
for (const i7Data of result) {
|
|
765
765
|
const i7name = (0, util_create_1.createNotation)([(0, utils_2.getName)(i7Data), '_', (0, utils_2.ueberpruefeZeichenkette)(i7Data.ukz), '_S'], 32);
|
|
766
|
-
const substation = new AMPRIONSubstation_1.AMPRIONSubstation((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid),
|
|
766
|
+
const substation = new AMPRIONSubstation_1.AMPRIONSubstation((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), i7Data.bezeichner, i7Data.kurzname, i7Data.kommentar, i7Data.stationsnummer, i7Data.ukz);
|
|
767
767
|
const i7Schluessel = integral_prefix_1.STANDORT_PRAEFIX +
|
|
768
768
|
((_a = i7Data.ukz) !== null && _a !== void 0 ? _a : '') +
|
|
769
769
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
@@ -824,7 +824,7 @@ class ConverterIntegral7 {
|
|
|
824
824
|
i7Data.un +
|
|
825
825
|
integral_prefix_1.MITTIGER_PUNKT +
|
|
826
826
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
827
|
-
const vl = new VoltageLevel_1.VoltageLevel((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid),
|
|
827
|
+
const vl = new VoltageLevel_1.VoltageLevel((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), i7Data.bezeichner, i7Data.kurzname, i7Schluessel);
|
|
828
828
|
vl.key = i7Schluessel;
|
|
829
829
|
const facility = util_cim_model_1.UtilCimModel.createFacilityInstanceForPsr(cimModel, vl, cim_constants_1.CimAssetAliasNames.VoltageLevel, this.configUuid);
|
|
830
830
|
if (i7Data.baujahr) {
|
|
@@ -888,7 +888,7 @@ class ConverterIntegral7 {
|
|
|
888
888
|
integral_prefix_1.SCHALTFELD_PRAEFIX +
|
|
889
889
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
890
890
|
const cimrdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
891
|
-
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid,
|
|
891
|
+
const bay = new AMPRIONBay_1.AMPRIONBay(cimrdfid, i7Data === null || i7Data === void 0 ? void 0 : i7Data.bezeichner, i7Data.kurzname, i7Schluessel);
|
|
892
892
|
bay.key = i7Schluessel;
|
|
893
893
|
if (i7Data.feldnummer > 0) {
|
|
894
894
|
const stop = true;
|
|
@@ -1169,9 +1169,6 @@ class ConverterIntegral7 {
|
|
|
1169
1169
|
cimModel.addMultiplierFactor(mf);
|
|
1170
1170
|
load.multiplierFactorUUID = mf.getUUID();
|
|
1171
1171
|
}
|
|
1172
|
-
if (load.getUUID() === '7c1d4120-fdaf-4bc1-aba1-9e8e76aa7a3b') {
|
|
1173
|
-
const stop = true;
|
|
1174
|
-
}
|
|
1175
1172
|
/** SSH */
|
|
1176
1173
|
const powerData = (0, utils_2.getActiveReactivePower2)(i7Data, mf);
|
|
1177
1174
|
// const powerDatav2 = getActiveReactivePower2(i7Data, mf);
|
|
@@ -1825,7 +1822,7 @@ class ConverterIntegral7 {
|
|
|
1825
1822
|
convertErsatzQuerZweige2ExternalNetworkInjection(cimModel, targetVoltages, result) {
|
|
1826
1823
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1827
1824
|
for (const i7Data of result) {
|
|
1828
|
-
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid),
|
|
1825
|
+
const externalNetworkInjection = new ExternalNetworkInjection_1.ExternalNetworkInjection((0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid), i7Data.bezeichner, i7Data.kurzname);
|
|
1829
1826
|
// ??
|
|
1830
1827
|
const usoll = (0, parser_utils_1.isNumericI7)(i7Data.usoll) ? (0, parser_utils_1.convertToNumberI7)(i7Data.usoll) : undefined;
|
|
1831
1828
|
// TODO: Beteiligen sich Ersatzquerzweige an der Wirkleistungsregelung? Hier: NEIN
|
|
@@ -2609,7 +2606,7 @@ class ConverterIntegral7 {
|
|
|
2609
2606
|
const prio = i7Data.einspprio;
|
|
2610
2607
|
const inBetrieb = (0, parser_utils_1.isBooleanI7)(i7Data.betrieb) ? (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb) : false;
|
|
2611
2608
|
const rdfid = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
2612
|
-
const energySource = new EnergySource_1.EnergySource(rdfid,
|
|
2609
|
+
const energySource = new EnergySource_1.EnergySource(rdfid, i7Data.bezeichner, i7Data.kurzname);
|
|
2613
2610
|
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;
|
|
2614
2611
|
energySource.normallyInService = inBetrieb;
|
|
2615
2612
|
const powerData = (0, utils_2.getActiveReactivePower)(i7Data);
|
|
@@ -2618,7 +2615,7 @@ class ConverterIntegral7 {
|
|
|
2618
2615
|
this.setTopologyEnergySourceConsumerObject(cimModel, energySource, i7Data);
|
|
2619
2616
|
// PSRType
|
|
2620
2617
|
/** 1 Primärergie-Angabe */
|
|
2621
|
-
let typeName = (_d = energySourceTypeMappingConfig.find(it => it.i7Name === i7Data.nameprimaertyp)) === null || _d === void 0 ? void 0 : _d.ePlanningType;
|
|
2618
|
+
let typeName = (_d = energySourceTypeMappingConfig === null || energySourceTypeMappingConfig === void 0 ? void 0 : energySourceTypeMappingConfig.find(it => it.i7Name === i7Data.nameprimaertyp)) === null || _d === void 0 ? void 0 : _d.ePlanningType;
|
|
2622
2619
|
/** 2 Anhand des Namens vom Objekt */
|
|
2623
2620
|
if (!typeName) {
|
|
2624
2621
|
typeName = (0, utils_1.getTypeNameFromStringByRegEx)(i7Data.bezeichner, energySourceTypeMappingConfig);
|
|
@@ -2775,7 +2772,7 @@ class ConverterIntegral7 {
|
|
|
2775
2772
|
});
|
|
2776
2773
|
}
|
|
2777
2774
|
setTopologyEnergySourceConsumerObject(cimModel, condEquip, i7Data, targetVoltages, generatingUnit, isStatcom) {
|
|
2778
|
-
var _a, _b, _c, _d;
|
|
2775
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
2779
2776
|
const inBetrieb = (0, parser_utils_1.convertToBooleanI7)(i7Data.betrieb);
|
|
2780
2777
|
condEquip.normallyInService = inBetrieb;
|
|
2781
2778
|
const connectivityNode = cimModel.objects.get(this.integralID2UUID.get(i7Data.anschluss));
|
|
@@ -3109,41 +3106,45 @@ class ConverterIntegral7 {
|
|
|
3109
3106
|
//TODO: Überarbeitung notwendig, da hier der Präfix nicht eindeutig für Einspeisungen ermittelt werden kann.
|
|
3110
3107
|
let i7Schluessel = '';
|
|
3111
3108
|
if (condEquip instanceof EnergyConsumer_1.EnergyConsumer) {
|
|
3112
|
-
i7Schluessel = (
|
|
3109
|
+
i7Schluessel = ((_d = (_c = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _c === void 0 ? void 0 : _c.key) !== null && _d !== void 0 ? _d : '') +
|
|
3113
3110
|
integral_prefix_1.BELASTUNG_PRAEFIX + i7Data.bezeichner;
|
|
3114
3111
|
}
|
|
3115
3112
|
else if (condEquip instanceof EquivalentInjection_1.EquivalentInjection) {
|
|
3116
|
-
i7Schluessel = (
|
|
3113
|
+
i7Schluessel = ((_f = (_e = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _e === void 0 ? void 0 : _e.key) !== null && _f !== void 0 ? _f : '') +
|
|
3117
3114
|
integral_prefix_1.ERSATZQUERZWEIG_PRAEFIX + i7Data.bezeichner;
|
|
3118
3115
|
}
|
|
3119
3116
|
else if (condEquip instanceof StaticVarCompensator_1.StaticVarCompensator) {
|
|
3120
|
-
i7Schluessel = (
|
|
3117
|
+
i7Schluessel = ((_h = (_g = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _g === void 0 ? void 0 : _g.key) !== null && _h !== void 0 ? _h : '') +
|
|
3121
3118
|
integral_prefix_1.STATCOM_PRAEFIX + i7Data.bezeichner;
|
|
3122
3119
|
}
|
|
3123
3120
|
else if (condEquip instanceof ExternalNetworkInjection_1.ExternalNetworkInjection) {
|
|
3124
|
-
i7Schluessel = (
|
|
3121
|
+
i7Schluessel = ((_k = (_j = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _j === void 0 ? void 0 : _j.key) !== null && _k !== void 0 ? _k : '') +
|
|
3122
|
+
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3123
|
+
}
|
|
3124
|
+
else if (condEquip instanceof EnergySource_1.EnergySource) {
|
|
3125
|
+
i7Schluessel = ((_m = (_l = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _l === void 0 ? void 0 : _l.key) !== null && _m !== void 0 ? _m : '') +
|
|
3125
3126
|
integral_prefix_1.EINSPEISUNG_PRAEFIX + i7Data.bezeichner;
|
|
3126
3127
|
}
|
|
3127
3128
|
else if (condEquip instanceof VsConverter_1.VsConverter) {
|
|
3128
|
-
i7Schluessel = (
|
|
3129
|
+
i7Schluessel = ((_p = (_o = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _o === void 0 ? void 0 : _o.key) !== null && _p !== void 0 ? _p : '') +
|
|
3129
3130
|
integral_prefix_1.HGUEKOPFVSC_PRAEFIX + i7Data.bezeichner;
|
|
3130
3131
|
}
|
|
3131
3132
|
else if (condEquip instanceof CsConverter_1.CsConverter) {
|
|
3132
|
-
i7Schluessel = (
|
|
3133
|
+
i7Schluessel = ((_r = (_q = equipmentContainer === null || equipmentContainer === void 0 ? void 0 : equipmentContainer.getSubstation()) === null || _q === void 0 ? void 0 : _q.key) !== null && _r !== void 0 ? _r : '') +
|
|
3133
3134
|
integral_prefix_1.HGUEKOPFKLASSISCH_PRAEFIX + i7Data.bezeichner;
|
|
3134
3135
|
}
|
|
3135
|
-
condEquip.
|
|
3136
|
+
condEquip.key = i7Schluessel;
|
|
3136
3137
|
if (hasGeneratingUnit) {
|
|
3137
3138
|
const substation = this.determineEquipmentContainer('Substation', cimModel, equipmentContainer);
|
|
3138
3139
|
generatingUnit.equipmentContainer = substation;
|
|
3139
3140
|
}
|
|
3140
3141
|
}
|
|
3141
3142
|
else {
|
|
3142
|
-
this.logger.error(`error --- ${(
|
|
3143
|
+
this.logger.error(`error --- ${(_s = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _s === void 0 ? void 0 : _s.name} ${i7Data.id} besitzt keinen EquipmentContainer.`);
|
|
3143
3144
|
}
|
|
3144
3145
|
}
|
|
3145
3146
|
else {
|
|
3146
|
-
this.logger.error(`error --- ${(
|
|
3147
|
+
this.logger.error(`error --- ${(_t = condEquip === null || condEquip === void 0 ? void 0 : condEquip.constructor) === null || _t === void 0 ? void 0 : _t.name} ${i7Data.id} besitzt keinen ConnectivityNode.`);
|
|
3147
3148
|
}
|
|
3148
3149
|
return rControl;
|
|
3149
3150
|
}
|
|
@@ -3756,8 +3757,9 @@ class ConverterIntegral7 {
|
|
|
3756
3757
|
(0, utils_2.ueberpruefeZeichenkette)(i7Data.stkabname);
|
|
3757
3758
|
/** Wenn kein Stromkreisobjekt vorhanden ist, dann erstelle ein neues Objekt. */
|
|
3758
3759
|
const uuidString = (0, parser_utils_1.getUUID)(i7Data.guid, this.objectMappingConfig.standardiseUuid);
|
|
3759
|
-
const line = new AMPRIONLine_1.AMPRIONLine(uuidString,
|
|
3760
|
+
const line = new AMPRIONLine_1.AMPRIONLine(uuidString, i7Schluessel);
|
|
3760
3761
|
line.ukz = i7Data.ukz;
|
|
3762
|
+
line.key = i7Schluessel;
|
|
3761
3763
|
let acLineSegments = [];
|
|
3762
3764
|
/** ACLineSegments erstellen */
|
|
3763
3765
|
for (const stk of stromkreisabschnitte) {
|
|
@@ -4310,6 +4312,10 @@ class ConverterIntegral7 {
|
|
|
4310
4312
|
else {
|
|
4311
4313
|
this.logger.debug(`Trafo2W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4312
4314
|
}
|
|
4315
|
+
const i7Schluessel = (substation === null || substation === void 0 ? void 0 : substation.key) +
|
|
4316
|
+
integral_prefix_1.TRAFO2WPRAEFIX_PRAEFIX +
|
|
4317
|
+
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
4318
|
+
powerTransformer.key = i7Schluessel;
|
|
4313
4319
|
if (powerTransformer.getUUID() === '515508dc-5982-4686-ad26-08d39db91421') {
|
|
4314
4320
|
let stop = true;
|
|
4315
4321
|
} // kein Typ in D4
|
|
@@ -4520,6 +4526,10 @@ class ConverterIntegral7 {
|
|
|
4520
4526
|
this.logger.debug(`Trafo3W ${i7Data.id} besitzt keine Umspannanlage.`);
|
|
4521
4527
|
}
|
|
4522
4528
|
const facility = util_cim_model_1.UtilCimModel.createFacilityInstanceForPsr(cimModel, powerTransformer, cim_constants_1.CimAssetAliasNames.Transformer, this.configUuid);
|
|
4529
|
+
const i7Schluessel = (substation === null || substation === void 0 ? void 0 : substation.key) +
|
|
4530
|
+
integral_prefix_1.TRAFO3WPRAEFIX_PRAEFIX +
|
|
4531
|
+
(0, utils_2.ueberpruefeZeichenkette)(i7Data.bezeichner);
|
|
4532
|
+
powerTransformer.key = i7Schluessel;
|
|
4523
4533
|
/** AssetInfos */
|
|
4524
4534
|
if (i7Data.baujahr) {
|
|
4525
4535
|
util_cim_model_1.UtilCimModel.setLifecycleDate(facility, i7Data.baujahr);
|