@open3cl/engine 1.2.7 → 1.2.9
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/README.md +13 -10
- package/conso.js +2 -2
- 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/README.md
CHANGED
|
@@ -110,11 +110,10 @@ const result = calcul_3cl(dpeData);
|
|
|
110
110
|
|
|
111
111
|
## Variables d'environnements
|
|
112
112
|
|
|
113
|
-
| Nom | Description
|
|
114
|
-
| ----------------------- |
|
|
115
|
-
| ADEME_API_CLIENT_ID | Client id pour l'api de l'ademe
|
|
116
|
-
| ADEME_API_CLIENT_SECRET | Client secret pour l'api de l'ademe
|
|
117
|
-
| CORPUS_DPES_FILE_PATH | Chemin vers le dossier contenant tous les DPES téléchargés |
|
|
113
|
+
| Nom | Description |
|
|
114
|
+
| ----------------------- | ----------------------------------- |
|
|
115
|
+
| ADEME_API_CLIENT_ID | Client id pour l'api de l'ademe |
|
|
116
|
+
| ADEME_API_CLIENT_SECRET | Client secret pour l'api de l'ademe |
|
|
118
117
|
|
|
119
118
|
Attention aux quotas sur l'api:
|
|
120
119
|
|
|
@@ -167,12 +166,16 @@ deperdition_mur,
|
|
|
167
166
|
|
|
168
167
|
Résultats des tests de corpus avec le mode de compatibilité activé.
|
|
169
168
|
|
|
170
|
-
| Version librairie | corpus | Taux d'erreur | Nb de DPES analysés | Nb en dessous
|
|
169
|
+
| Version librairie | corpus | Taux d'erreur | Nb de DPES analysés | Nb en dessous du taux d'erreur | Taux de réussite | Détail des valeurs |
|
|
171
170
|
| :---------------- | :------------------------------------ | :------------ | ------------------- | ------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
-
| 1.2.3 | corpus_dpe.csv | 5% | 9980 | 4489 | 45% |
|
|
173
|
-
| 1.2.3 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 3257 | 32% |
|
|
174
|
-
| 1.2.3 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5279 | 53% |
|
|
175
|
-
| 1.2.3 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 2728 | 27% |
|
|
171
|
+
| 1.2.3 | corpus_dpe.csv | 5% | 9980 | 4489 | 45% | |
|
|
172
|
+
| 1.2.3 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 3257 | 32% | |
|
|
173
|
+
| 1.2.3 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5279 | 53% | |
|
|
174
|
+
| 1.2.3 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 2728 | 27% | |
|
|
175
|
+
| 1.2.8 | corpus_dpe.csv | 5% | 9980 | 4489 | 45% | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=corpus_dpe.csv) |
|
|
176
|
+
| 1.2.8 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 5275 (+2018) | 53% (+21%) | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_individuel.csv) |
|
|
177
|
+
| 1.2.8 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5747 (+468) | 57% (+4%) | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_collectif.csv) |
|
|
178
|
+
| 1.2.8 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 3142 (+414) | 31% (+4%) | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_mixte.csv) |
|
|
176
179
|
|
|
177
180
|
## Roadmap
|
|
178
181
|
|
package/conso.js
CHANGED
|
@@ -300,7 +300,7 @@ export function classe_bilan_dpe(ep_conso_5_usages_m2, zc_id, ca_id, Sh) {
|
|
|
300
300
|
|
|
301
301
|
const cut = tvs.dpe_class_limit[ca][Math.round(Sh)] ?? [];
|
|
302
302
|
|
|
303
|
-
if (
|
|
303
|
+
if (ep_conso_5_usages_m2 == null) return null;
|
|
304
304
|
if (ep_conso_5_usages_m2 < (cut['A'] ?? 70)) return 'A';
|
|
305
305
|
if (ep_conso_5_usages_m2 < (cut['B'] ?? 110)) return 'B';
|
|
306
306
|
if (ep_conso_5_usages_m2 < (cut['C'] ?? 180)) return 'C';
|
|
@@ -323,7 +323,7 @@ export function classe_emission_ges(emission_ges_5_usages_m2, zc_id, ca_id, Sh)
|
|
|
323
323
|
|
|
324
324
|
const cut = tvs.ges_class_limit[ca][Math.round(Sh)] ?? [];
|
|
325
325
|
|
|
326
|
-
if (
|
|
326
|
+
if (emission_ges_5_usages_m2 == null) return null;
|
|
327
327
|
if (emission_ges_5_usages_m2 < (cut['A'] ?? 6)) return 'A';
|
|
328
328
|
if (emission_ges_5_usages_m2 < (cut['B'] ?? 11)) return 'B';
|
|
329
329
|
if (emission_ges_5_usages_m2 < (cut['C'] ?? 30)) return 'C';
|
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.9",
|
|
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",
|