@open3cl/engine 1.2.6 → 1.2.8
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/11_ecs.js +12 -1
- package/engine.js +23 -3
- package/package.json +3 -1
package/11_ecs.js
CHANGED
|
@@ -58,7 +58,10 @@ export default function calc_ecs(
|
|
|
58
58
|
ca_id,
|
|
59
59
|
zc_id,
|
|
60
60
|
th,
|
|
61
|
-
virtualisationECS
|
|
61
|
+
virtualisationECS,
|
|
62
|
+
surfaceImmeuble,
|
|
63
|
+
nombreAppartements,
|
|
64
|
+
isImmeubleSystemEcsIndividuels
|
|
62
65
|
) {
|
|
63
66
|
const de = ecs.donnee_entree;
|
|
64
67
|
const di = {};
|
|
@@ -68,6 +71,14 @@ export default function calc_ecs(
|
|
|
68
71
|
di.ratio_besoin_ecs = 1;
|
|
69
72
|
if (virtualisationECS) {
|
|
70
73
|
di.ratio_besoin_ecs = de.cle_repartition_ecs || 1;
|
|
74
|
+
} else if (isImmeubleSystemEcsIndividuels) {
|
|
75
|
+
if (nombreAppartements) {
|
|
76
|
+
di.ratio_besoin_ecs = 1 / nombreAppartements;
|
|
77
|
+
} else {
|
|
78
|
+
di.ratio_besoin_ecs =
|
|
79
|
+
((de.surface_habitable / (surfaceImmeuble || 1)) * (de.rdim || 1)) /
|
|
80
|
+
(de.nombre_logement * nombreAppartements);
|
|
81
|
+
}
|
|
71
82
|
} else if (de.rdim) {
|
|
72
83
|
di.ratio_besoin_ecs = 1 / de.rdim || 1;
|
|
73
84
|
}
|
package/engine.js
CHANGED
|
@@ -268,14 +268,21 @@ export function calcul_3cl(dpe) {
|
|
|
268
268
|
|
|
269
269
|
let becs = apport_et_besoin.besoin_ecs;
|
|
270
270
|
let becs_dep = apport_et_besoin.besoin_ecs_depensier;
|
|
271
|
+
let isImmeubleSystemEcsIndividuels = false;
|
|
271
272
|
|
|
272
273
|
/**
|
|
273
274
|
* 11.4 Plusieurs systèmes d’ECS (limité à 2 systèmes différents par logement)
|
|
274
275
|
* Les besoins en ECS pour chaque générateur sont / 2
|
|
275
276
|
*/
|
|
276
277
|
if (ecs.length > 1) {
|
|
277
|
-
|
|
278
|
-
|
|
278
|
+
// Immeuble avec différents systèmes individuels
|
|
279
|
+
isImmeubleSystemEcsIndividuels =
|
|
280
|
+
th === 'immeuble' && ecs.every((e) => e.donnee_entree.enum_type_installation_id === '1');
|
|
281
|
+
|
|
282
|
+
if (!isImmeubleSystemEcsIndividuels) {
|
|
283
|
+
becs /= 2;
|
|
284
|
+
becs_dep /= 2;
|
|
285
|
+
}
|
|
279
286
|
}
|
|
280
287
|
|
|
281
288
|
ecs.forEach((ecs) => {
|
|
@@ -364,7 +371,20 @@ export function calcul_3cl(dpe) {
|
|
|
364
371
|
}
|
|
365
372
|
});
|
|
366
373
|
}
|
|
367
|
-
calc_ecs(
|
|
374
|
+
calc_ecs(
|
|
375
|
+
dpe,
|
|
376
|
+
ecs,
|
|
377
|
+
becs,
|
|
378
|
+
becs_dep,
|
|
379
|
+
GV,
|
|
380
|
+
ca_id,
|
|
381
|
+
zc_id,
|
|
382
|
+
th,
|
|
383
|
+
virtualisationECS,
|
|
384
|
+
dpe.logement.caracteristique_generale.surface_habitable_immeuble,
|
|
385
|
+
dpe.logement.caracteristique_generale.nombre_appartement,
|
|
386
|
+
isImmeubleSystemEcsIndividuels
|
|
387
|
+
);
|
|
368
388
|
});
|
|
369
389
|
|
|
370
390
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open3cl/engine",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Open Source 3CL-DPE engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@commitlint/cli": "^19.2.1",
|
|
43
43
|
"@commitlint/config-conventional": "^19.1.0",
|
|
44
44
|
"@commitlint/cz-commitlint": "^19.2.0",
|
|
45
|
+
"@duckdb/node-api": "^1.3.2-alpha.25",
|
|
45
46
|
"@semantic-release/changelog": "^6.0.3",
|
|
46
47
|
"@semantic-release/git": "^10.0.1",
|
|
47
48
|
"@semantic-release/github": "^10.0.2",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"ansi-colors": "^4.1.3",
|
|
51
52
|
"cli-progress": "^3.12.0",
|
|
52
53
|
"deep-object-diff": "^1.1.9",
|
|
54
|
+
"duckdb": "^1.3.2",
|
|
53
55
|
"eslint": "^8.57.0",
|
|
54
56
|
"eslint-config-prettier": "^9.1.0",
|
|
55
57
|
"eslint-config-standard": "^17.1.0",
|