@open3cl/engine 1.3.2 → 1.3.4
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/9_conso_ch.js +66 -29
- package/README.md +19 -8
- package/package.json +5 -1
package/9_conso_ch.js
CHANGED
|
@@ -38,8 +38,8 @@ function coef_ch(Fch) {
|
|
|
38
38
|
1: 0.25 * (1 - Fch)
|
|
39
39
|
},
|
|
40
40
|
'installation de chauffage avec chaudière en relève de pac': {
|
|
41
|
-
0:
|
|
42
|
-
1:
|
|
41
|
+
0: 1, // deja proratisé en amont, voir 9_chauffage.js#getProrataGenerateur
|
|
42
|
+
1: 1
|
|
43
43
|
},
|
|
44
44
|
'installation de chauffage avec chaudière en relève de pac avec insert ou poêle bois en appoint':
|
|
45
45
|
{
|
|
@@ -81,9 +81,6 @@ export function conso_ch(
|
|
|
81
81
|
const gen_lge_id = requestInputID(de, du, 'lien_generateur_emetteur');
|
|
82
82
|
const coef = coef_ch(de.fch || 0.5)[cfg_ch][_pos] || 1;
|
|
83
83
|
|
|
84
|
-
let conso_ch = 0;
|
|
85
|
-
let conso_ch_dep;
|
|
86
|
-
|
|
87
84
|
let em_filt;
|
|
88
85
|
|
|
89
86
|
if (em_list.length === 1) {
|
|
@@ -115,31 +112,43 @@ export function conso_ch(
|
|
|
115
112
|
);
|
|
116
113
|
break;
|
|
117
114
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const Ich = emetteur_eq / di.rg;
|
|
139
|
-
const Ich_dep = emetteur_eq / di.rg_dep;
|
|
140
|
-
conso_ch = coef * Ich * bch;
|
|
141
|
-
conso_ch_dep = coef * Ich_dep * bch_dep;
|
|
115
|
+
case 'convecteurs bi-jonction': {
|
|
116
|
+
// Installation individuelle
|
|
117
|
+
const coeffInd = coef_ch(de.fch)[cfg_ch][1];
|
|
118
|
+
const consoInd = calc_conso_ch_default(di, de, bch, bch_dep, coeffInd, em_filt, GV, Sh, hsp);
|
|
119
|
+
|
|
120
|
+
// Installation collective
|
|
121
|
+
const coeffColl = coef_ch(de.fch)[cfg_ch][0];
|
|
122
|
+
const consoColl = calc_conso_ch_default(
|
|
123
|
+
di,
|
|
124
|
+
de,
|
|
125
|
+
bch,
|
|
126
|
+
bch_dep,
|
|
127
|
+
coeffColl,
|
|
128
|
+
em_filt,
|
|
129
|
+
GV,
|
|
130
|
+
Sh,
|
|
131
|
+
hsp,
|
|
132
|
+
1.03
|
|
133
|
+
);
|
|
142
134
|
|
|
135
|
+
di.conso_ch = consoInd.conso_ch + consoColl.conso_ch;
|
|
136
|
+
di.conso_ch_depensier = consoInd.conso_ch_dep + consoColl.conso_ch_dep;
|
|
137
|
+
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
default: {
|
|
141
|
+
const { conso_ch, conso_ch_dep } = calc_conso_ch_default(
|
|
142
|
+
di,
|
|
143
|
+
de,
|
|
144
|
+
bch,
|
|
145
|
+
bch_dep,
|
|
146
|
+
coef,
|
|
147
|
+
em_filt,
|
|
148
|
+
GV,
|
|
149
|
+
Sh,
|
|
150
|
+
hsp
|
|
151
|
+
);
|
|
143
152
|
di.conso_ch = conso_ch;
|
|
144
153
|
di.conso_ch_depensier = conso_ch_dep;
|
|
145
154
|
break;
|
|
@@ -147,6 +156,34 @@ export function conso_ch(
|
|
|
147
156
|
}
|
|
148
157
|
}
|
|
149
158
|
|
|
159
|
+
function calc_conso_ch_default(di, de, bch, bch_dep, coeff, em_filt, GV, Sh, hsp, i0) {
|
|
160
|
+
const hasMultipleEmetteur = em_filt.length > 1;
|
|
161
|
+
|
|
162
|
+
const emetteur_eq = em_filt.reduce((acc, em) => {
|
|
163
|
+
const int = calc_intermittence(GV, Sh, hsp, i0 ? i0 : em.donnee_intermediaire.i0);
|
|
164
|
+
const r_em = rendement_emission(em);
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 9.1.3 Installation avec plusieurs émissions pour un même générateur
|
|
168
|
+
* La part de la consommation traitée par chaque émetteur est proratisé par le ratio des surfaces habitables.
|
|
169
|
+
* @type {number|number}
|
|
170
|
+
*/
|
|
171
|
+
const ratio_s = hasMultipleEmetteur
|
|
172
|
+
? em.donnee_entree.surface_chauffee / de.surface_chauffee
|
|
173
|
+
: 1;
|
|
174
|
+
|
|
175
|
+
const Ich = 1 / r_em;
|
|
176
|
+
return acc + ratio_s * int * Ich;
|
|
177
|
+
}, 0);
|
|
178
|
+
|
|
179
|
+
const Ich = emetteur_eq / di.rg;
|
|
180
|
+
const Ich_dep = emetteur_eq / di.rg_dep;
|
|
181
|
+
const conso_ch = coeff * Ich * bch;
|
|
182
|
+
const conso_ch_dep = coeff * Ich_dep * bch_dep;
|
|
183
|
+
|
|
184
|
+
return { conso_ch, conso_ch_dep };
|
|
185
|
+
}
|
|
186
|
+
|
|
150
187
|
/**
|
|
151
188
|
* 9.8 Installation de chauffage collectif avec base + appoint
|
|
152
189
|
*/
|
package/README.md
CHANGED
|
@@ -110,10 +110,11 @@ 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
|
|
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
|
+
| DPE_FOLDER_PATH | Chemin vers lequel sont stockés les fichiers DPE (si non précisé, utiliser `dpes-folder-path` dans la ligne de commande |
|
|
117
118
|
|
|
118
119
|
Attention aux quotas sur l'api:
|
|
119
120
|
|
|
@@ -178,10 +179,20 @@ Résultats des tests de corpus avec le mode de compatibilité activé.
|
|
|
178
179
|
| 1.2.8 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5747 (+468) | 57% (+4%) | |
|
|
179
180
|
| 1.2.8 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 3142 (+414) | 31% (+4%) | |
|
|
180
181
|
| ------------------ | -------------------------------------- | -------------- | --------------------- | -------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
|
|
181
|
-
| 1.3.1 | corpus_dpe.csv | 5% | 9980 | 4508 (+19) | 45% |
|
|
182
|
-
| 1.3.1 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 5459 (+184) | 55% (+2%) |
|
|
183
|
-
| 1.3.1 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5848 (+101) | 58% (+1%) |
|
|
184
|
-
| 1.3.1 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 4018 (+876) | 40% (+9%) |
|
|
182
|
+
| 1.3.1 | corpus_dpe.csv | 5% | 9980 | 4508 (+19) | 45% | |
|
|
183
|
+
| 1.3.1 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 5459 (+184) | 55% (+2%) | |
|
|
184
|
+
| 1.3.1 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5848 (+101) | 58% (+1%) | |
|
|
185
|
+
| 1.3.1 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 4018 (+876) | 40% (+9%) | |
|
|
186
|
+
| ------------------ | -------------------------------------- | -------------- | --------------------- | -------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
|
|
187
|
+
| 1.3.2 | corpus_dpe.csv | 5% | 9980 | 4519 (+11) | 45% | |
|
|
188
|
+
| 1.3.2 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 5476 (+17) | 55% | |
|
|
189
|
+
| 1.3.2 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5869 (+21) | 58% | |
|
|
190
|
+
| 1.3.2 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 4040 (+22) | 40% | |
|
|
191
|
+
| ------------------ | -------------------------------------- | -------------- | --------------------- | -------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
|
|
192
|
+
| 1.3.3 | corpus_dpe.csv | 5% | 9980 | 4522 (+3) | 45% | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=corpus_dpe.csv) |
|
|
193
|
+
| 1.3.3 | dpe_immeuble_chauffage_individuel.csv | 5% | 9998 | 5488 (+12) | 55% | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_individuel.csv) |
|
|
194
|
+
| 1.3.3 | dpe_immeuble_chauffage_collectif.csv | 5% | 10000 | 5869 | 58% | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_collectif.csv) |
|
|
195
|
+
| 1.3.3 | dpe_immeuble_chauffage_mixte.csv | 5% | 10000 | 4082 (+42) | 40% | [Voir le détail](https://open3cl.github.io/engine/reports/corpus?corpus_file=dpe_immeuble_chauffage_mixte.csv) |
|
|
185
196
|
|
|
186
197
|
## Roadmap
|
|
187
198
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open3cl/engine",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Open Source 3CL-DPE engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"test": "vitest run",
|
|
16
16
|
"test:ci": "vitest run --coverage",
|
|
17
17
|
"test:corpus": "node test/corpus/run_corpus_checks.js",
|
|
18
|
+
"test:corpus:ch-ind": "node test/corpus/run_corpus_checks.js --corpus-file-path=test/corpus/dpe_immeuble_chauffage_individuel.csv",
|
|
19
|
+
"test:corpus:ch-col": "node test/corpus/run_corpus_checks.js --corpus-file-path=test/corpus/dpe_immeuble_chauffage_collectif.csv",
|
|
20
|
+
"test:corpus:ch-mix": "node test/corpus/run_corpus_checks.js --corpus-file-path=test/corpus/dpe_immeuble_chauffage_mixte.csv",
|
|
21
|
+
"test:corpus:all": "npm run test:corpus && npm run test:corpus:ch-ind && npm run test:corpus:ch-col && npm run test:corpus:ch-mix",
|
|
18
22
|
"qa:lint": "eslint .",
|
|
19
23
|
"qa:lint:fix": "npm run qa:lint -- --fix",
|
|
20
24
|
"qa:duplication": "jscpd",
|