@open3cl/engine 1.1.0 → 1.1.2
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 +18 -4
- package/engine.js +0 -9
- package/package.json +3 -3
- package/utils.js +4 -4
package/11_ecs.js
CHANGED
|
@@ -64,16 +64,30 @@ export default function calc_ecs(
|
|
|
64
64
|
const di = {};
|
|
65
65
|
const du = {};
|
|
66
66
|
|
|
67
|
+
const multipleEcsInstallation = ecs.donnee_entree.enum_cfg_installation_ecs_id === '3';
|
|
68
|
+
const nbLogements = dpe.logement.caracteristique_generale.nombre_appartement || 1;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 11.4 Plusieurs systèmes d’ECS (limité à 2 systèmes différents par logement)
|
|
72
|
+
* Les besoins en ECS pour chaque générateur sont / 2
|
|
73
|
+
*/
|
|
74
|
+
let becsLogement = becs;
|
|
75
|
+
let becsDepLogement = becs_dep;
|
|
76
|
+
if (multipleEcsInstallation) {
|
|
77
|
+
becsLogement = becs / 2;
|
|
78
|
+
becsDepLogement = becs_dep / 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
67
81
|
// La conso de chaque générateur ECS doit être ramenée au prorata de la surface du logement
|
|
68
82
|
di.ratio_besoin_ecs = 1;
|
|
69
83
|
if (virtualisationECS) {
|
|
70
84
|
di.ratio_besoin_ecs = de.cle_repartition_ecs || 1;
|
|
71
|
-
} else if (
|
|
72
|
-
di.ratio_besoin_ecs = 1 /
|
|
85
|
+
} else if (nbLogements > 1) {
|
|
86
|
+
di.ratio_besoin_ecs = 1 / nbLogements || 1;
|
|
73
87
|
}
|
|
74
88
|
|
|
75
|
-
di.besoin_ecs =
|
|
76
|
-
di.besoin_ecs_depensier =
|
|
89
|
+
di.besoin_ecs = becsLogement * di.ratio_besoin_ecs;
|
|
90
|
+
di.besoin_ecs_depensier = becsDepLogement * di.ratio_besoin_ecs;
|
|
77
91
|
|
|
78
92
|
const pvc = ecs.generateur_ecs_collection.generateur_ecs[0].donnee_entree.position_volume_chauffe;
|
|
79
93
|
tv_rendement_distribution_ecs(di, de, du, pvc);
|
package/engine.js
CHANGED
|
@@ -269,15 +269,6 @@ export function calcul_3cl(dpe) {
|
|
|
269
269
|
let becs = apport_et_besoin.besoin_ecs;
|
|
270
270
|
let becs_dep = apport_et_besoin.besoin_ecs_depensier;
|
|
271
271
|
|
|
272
|
-
/**
|
|
273
|
-
* 11.4 Plusieurs systèmes d’ECS (limité à 2 systèmes différents par logement)
|
|
274
|
-
* Les besoins en ECS pour chaque générateur sont / 2
|
|
275
|
-
*/
|
|
276
|
-
if (ecs.length > 1) {
|
|
277
|
-
becs /= 2;
|
|
278
|
-
becs_dep /= 2;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
272
|
ecs.forEach((ecs) => {
|
|
282
273
|
if (bug_for_bug_compat) {
|
|
283
274
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open3cl/engine",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Open Source 3CL-DPE engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"dioma": "^0.4.6",
|
|
45
45
|
"fast-xml-parser": "^4.5.0",
|
|
46
|
-
"lodash-es": "
|
|
46
|
+
"lodash-es": "4.17.21",
|
|
47
47
|
"winston": "3.13.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"pretty-quick": "^4.0.0",
|
|
71
71
|
"semantic-release": "^23.0.6",
|
|
72
72
|
"vitest": "3.0.6",
|
|
73
|
-
"xlsx": "
|
|
73
|
+
"xlsx": "0.18.5"
|
|
74
74
|
},
|
|
75
75
|
"author": "Open3Cl",
|
|
76
76
|
"license": "GPL-3.0",
|
package/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import enums from './enums.js';
|
|
2
2
|
import tvs from './tv.js';
|
|
3
|
-
import
|
|
3
|
+
import { set, has } from 'lodash-es';
|
|
4
4
|
|
|
5
5
|
export let bug_for_bug_compat = false;
|
|
6
6
|
export function set_bug_for_bug_compat() {
|
|
@@ -299,7 +299,7 @@ export function useEnumAsString(jsonObj) {
|
|
|
299
299
|
export function clean_dpe(dpe_in) {
|
|
300
300
|
// skip generateur_[ecs|chauffage] because some input data is contained in donnee_intermediaire (e.g. pn, qp0, ...)
|
|
301
301
|
removeKeyFromJSON(dpe_in, 'donnee_intermediaire', ['generateur_ecs', 'generateur_chauffage']);
|
|
302
|
-
|
|
302
|
+
set(dpe_in, 'logement.sortie', null);
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
export function sanitize_dpe(dpe_in) {
|
|
@@ -313,8 +313,8 @@ export function sanitize_dpe(dpe_in) {
|
|
|
313
313
|
'logement.enveloppe.pont_thermique_collection.pont_thermique'
|
|
314
314
|
];
|
|
315
315
|
for (const path of collection_paths) {
|
|
316
|
-
if (!
|
|
317
|
-
|
|
316
|
+
if (!has(dpe_in, path)) {
|
|
317
|
+
set(dpe_in, path, []);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
if (use_enum_as_string) {
|