@enervance/insight-cim-model 0.0.98 → 0.0.100
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.
|
@@ -3,27 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CimModelAssetinfoUtil = void 0;
|
|
4
4
|
class CimModelAssetinfoUtil {
|
|
5
5
|
static getElectricPropertiesACLineSegmentFromInfo(acLineSegment) {
|
|
6
|
+
var _a;
|
|
6
7
|
const wireObjectAcLineSegment = acLineSegment.getAsset();
|
|
7
8
|
const array = [];
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
if (wireObjectAcLineSegment)
|
|
10
|
+
for (const wireObjectSubSegment of wireObjectAcLineSegment.assets.values()) {
|
|
11
|
+
const subSegmentAsset = wireObjectSubSegment;
|
|
12
|
+
const length = isNaN(subSegmentAsset.length) ? 1 : +subSegmentAsset.length;
|
|
13
|
+
const assetInfo = subSegmentAsset === null || subSegmentAsset === void 0 ? void 0 : subSegmentAsset.getAssetInfo();
|
|
14
|
+
if (!assetInfo)
|
|
15
|
+
continue;
|
|
16
|
+
const sizeDescription = assetInfo.sizeDescription || '';
|
|
17
|
+
const strandCount = assetInfo.strandCount || '';
|
|
18
|
+
const voltage = assetInfo.voltage || '';
|
|
19
|
+
const name = assetInfo.name ? assetInfo.name : '';
|
|
20
|
+
const ratedCurrent = assetInfo.ratedCurrent || 0;
|
|
21
|
+
array.push({
|
|
22
|
+
length: length,
|
|
23
|
+
x: assetInfo.x1 * length,
|
|
24
|
+
r: assetInfo.r1 * length,
|
|
25
|
+
gch: assetInfo.c1 * length,
|
|
26
|
+
ratedCurrent: ratedCurrent,
|
|
27
|
+
wireType: assetInfo.type,
|
|
28
|
+
typeDescription: `${voltage}kV ${strandCount}x${sizeDescription} ${name}`
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (!array.length) {
|
|
19
32
|
array.push({
|
|
20
|
-
length: length,
|
|
21
|
-
x:
|
|
22
|
-
r:
|
|
23
|
-
gch:
|
|
24
|
-
ratedCurrent:
|
|
25
|
-
wireType:
|
|
26
|
-
typeDescription:
|
|
33
|
+
length: acLineSegment.length,
|
|
34
|
+
x: acLineSegment.x,
|
|
35
|
+
r: acLineSegment.r,
|
|
36
|
+
gch: acLineSegment.gch,
|
|
37
|
+
ratedCurrent: acLineSegment.getCurrentLimit(),
|
|
38
|
+
wireType: (_a = acLineSegment.psrType) === null || _a === void 0 ? void 0 : _a.name,
|
|
39
|
+
typeDescription: ''
|
|
27
40
|
});
|
|
28
41
|
}
|
|
29
42
|
return array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cim.model.assetinfo.util.js","sourceRoot":"","sources":["../../src/utils2/cim.model.assetinfo.util.ts"],"names":[],"mappings":";;;AAIA,MAAsB,qBAAqB;IAElC,MAAM,CAAC,0CAA0C,CAAC,aAA4B
|
|
1
|
+
{"version":3,"file":"cim.model.assetinfo.util.js","sourceRoot":"","sources":["../../src/utils2/cim.model.assetinfo.util.ts"],"names":[],"mappings":";;;AAIA,MAAsB,qBAAqB;IAElC,MAAM,CAAC,0CAA0C,CAAC,aAA4B;;QACnF,MAAM,uBAAuB,GAAG,aAAa,CAAC,QAAQ,EAAkB,CAAC;QACzE,MAAM,KAAK,GAAyB,EAAE,CAAC;QACvC,IAAI,uBAAuB;YAC3B,KAAK,MAAM,oBAAoB,IAAI,uBAAuB,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE;gBAC1E,MAAM,eAAe,GAAG,oBAAoC,CAAC;gBAC7D,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC;gBAC3E,MAAM,S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