@open3cl/engine 1.3.23 → 1.3.25
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/16.2_production_enr.js
CHANGED
|
@@ -40,8 +40,11 @@ export class ProductionENR {
|
|
|
40
40
|
// Calcul de l'électricité auto-consommée pour chaque enveloppe
|
|
41
41
|
this.calculateConsoElecAc(productionElectricite, productionElecEnr, conso, zc_id, th, Sh);
|
|
42
42
|
|
|
43
|
-
// Mise à jour des consommations
|
|
43
|
+
// Mise à jour des consommations d'énergie finale en minorant l'énergie consommée par l'énergie autoconsommée par le poste
|
|
44
44
|
this.updateEfConso(productionElectricite, conso, Sh);
|
|
45
|
+
|
|
46
|
+
// Mise à jour des consommations d'énergie primaire en minorant l'énergie consommée par l'énergie autoconsommée par le poste
|
|
47
|
+
this.updateEPConso(productionElectricite, conso, Sh);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
return {
|
|
@@ -150,7 +153,7 @@ export class ProductionENR {
|
|
|
150
153
|
}
|
|
151
154
|
|
|
152
155
|
/**
|
|
153
|
-
* Mise à jour des consommations ef en minorant l'énergie consommée par l'énergie autoconsommée par chaque enveloppe
|
|
156
|
+
* Mise à jour des consommations ef en minorant l'énergie finale consommée par l'énergie autoconsommée par chaque enveloppe
|
|
154
157
|
* @param productionElectricite
|
|
155
158
|
* @param conso
|
|
156
159
|
* @param Sh
|
|
@@ -172,6 +175,32 @@ export class ProductionENR {
|
|
|
172
175
|
conso.ef_conso.conso_5_usages_m2 = Math.floor(conso.ef_conso.conso_5_usages / Sh);
|
|
173
176
|
}
|
|
174
177
|
|
|
178
|
+
/**
|
|
179
|
+
* Mise à jour des consommations ef en minorant l'énergie primaire consommée par l'énergie autoconsommée par chaque enveloppe
|
|
180
|
+
* @param productionElectricite
|
|
181
|
+
* @param conso {{ep_conso: Ep_conso}}
|
|
182
|
+
* @param Sh
|
|
183
|
+
*/
|
|
184
|
+
updateEPConso(productionElectricite, conso, Sh) {
|
|
185
|
+
conso.ep_conso.ep_conso_ecs -= 2.3 * productionElectricite.conso_elec_ac_ecs;
|
|
186
|
+
conso.ep_conso.ep_conso_ch -= 2.3 * productionElectricite.conso_elec_ac_ch;
|
|
187
|
+
conso.ep_conso.ep_conso_fr -= 2.3 * productionElectricite.conso_elec_ac_fr;
|
|
188
|
+
conso.ep_conso.ep_conso_eclairage -= 2.3 * productionElectricite.conso_elec_ac_eclairage;
|
|
189
|
+
conso.ep_conso.ep_conso_totale_auxiliaire -=
|
|
190
|
+
2.3 * productionElectricite.conso_elec_ac_auxiliaire;
|
|
191
|
+
|
|
192
|
+
const conso_elec =
|
|
193
|
+
productionElectricite.conso_elec_ac_ecs +
|
|
194
|
+
productionElectricite.conso_elec_ac_ch +
|
|
195
|
+
productionElectricite.conso_elec_ac_fr +
|
|
196
|
+
productionElectricite.conso_elec_ac_eclairage +
|
|
197
|
+
productionElectricite.conso_elec_ac_auxiliaire;
|
|
198
|
+
|
|
199
|
+
conso.ep_conso.ep_conso_5_usages -= 2.3 * conso_elec;
|
|
200
|
+
|
|
201
|
+
conso.ep_conso.ep_conso_5_usages_m2 = Math.floor(conso.ep_conso.ep_conso_5_usages / Sh);
|
|
202
|
+
}
|
|
203
|
+
|
|
175
204
|
/**
|
|
176
205
|
* Calcul des taux d'autoproduction consommés pour chaque enveloppe
|
|
177
206
|
* @param efConso {Ef_conso}
|
package/3.4_pont_thermique.js
CHANGED
|
@@ -36,6 +36,7 @@ function tv_k(pt_di, di, de, du, pc_id, logement) {
|
|
|
36
36
|
const mur_list = enveloppe.mur_collection.mur || [];
|
|
37
37
|
const pb_list = enveloppe.plancher_bas_collection.plancher_bas || [];
|
|
38
38
|
const ph_list = enveloppe.plancher_haut_collection.plancher_haut || [];
|
|
39
|
+
/** @type {BaieVitreeItem[]} **/
|
|
39
40
|
const bv_list = enveloppe.baie_vitree_collection.baie_vitree || [];
|
|
40
41
|
const porte_list = enveloppe.porte_collection.porte || [];
|
|
41
42
|
|
|
@@ -114,11 +115,29 @@ function tv_k(pt_di, di, de, du, pc_id, logement) {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
(
|
|
118
|
+
let mur = mur_list.find((mur, murIndex) => {
|
|
119
|
+
if (
|
|
119
120
|
compareReferences(mur.donnee_entree.reference, de.reference_1) ||
|
|
120
121
|
compareReferences(mur.donnee_entree.reference, de.reference_2)
|
|
121
|
-
|
|
122
|
+
) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
if (bug_for_bug_compat) {
|
|
126
|
+
/**
|
|
127
|
+
* Si on ne trouve pas de mur associé au pont thermique, on vérifie si on trouve une baie vitrée associée
|
|
128
|
+
* au pont thermique et si cette dernière à une reference_paroi qui correspond à un mur existant.
|
|
129
|
+
*/
|
|
130
|
+
/** @type {BaieVitreeItem} **/
|
|
131
|
+
const bvPt = bv_list.find((bv) => bv.donnee_entree.reference === de.reference_1);
|
|
132
|
+
if (bvPt && Number(bvPt.donnee_entree.reference_paroi) === murIndex) {
|
|
133
|
+
console.error(
|
|
134
|
+
`Aucun mur trouvé pour le pont thermique, le mur à été retrouvé en recherchant le référence du pont thermique sur les baie vitrée et la variable reference_paroi`
|
|
135
|
+
);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return false;
|
|
140
|
+
});
|
|
122
141
|
|
|
123
142
|
const matcher = {
|
|
124
143
|
enum_type_liaison_id: de.enum_type_liaison_id
|
package/README.md
CHANGED
|
@@ -71,11 +71,13 @@ Vous devez d'abord installer [NodeJS](https://nodejs.org/en) en version 20 ou su
|
|
|
71
71
|
npm install @open3cl/engine
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
## Démonstration
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Il est possible d'analyser un dpe pour tester la lib Open3CL: [https://open3cl.github.io/engine](https://open3cl.github.io/engine/build/).
|
|
77
|
+
Un dpe au format XML peut être chargé, il sera envoyé à la lib Open3CL. Un visuel permet de voir les informations
|
|
78
|
+
du dpe d'origine ainsi que du dpe en sortie de la lib ainsi qu'un différentiel.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
C'est un bon moyen de détecter un éventuel problème dans le dpe ou la librairie.
|
|
79
81
|
|
|
80
82
|
## Utilisation
|
|
81
83
|
|
package/engine.js
CHANGED
|
@@ -20,7 +20,7 @@ import { Inertie } from './7_inertie.js';
|
|
|
20
20
|
import getFicheTechnique from './ficheTechnique.js';
|
|
21
21
|
import { ProductionENR } from './16.2_production_enr.js';
|
|
22
22
|
|
|
23
|
-
const LIB_VERSION = '1.3.
|
|
23
|
+
const LIB_VERSION = '1.3.25';
|
|
24
24
|
|
|
25
25
|
function calc_th(map_id) {
|
|
26
26
|
const map = enums.methode_application_dpe_log[map_id];
|
|
@@ -14,6 +14,7 @@ export interface MurDE extends DE {
|
|
|
14
14
|
enum_type_adjacence_id?: number; // ENUM type_adjacence
|
|
15
15
|
enum_orientation_id?: number; // ENUM orientation
|
|
16
16
|
surface_paroi_totale?: number;
|
|
17
|
+
surface_paroi_opaque?: number;
|
|
17
18
|
umur0_saisi?: number;
|
|
18
19
|
tv_umur0_id?: number; // TV
|
|
19
20
|
epaisseur_structure?: number;
|
|
@@ -28,6 +29,7 @@ export interface MurDE extends DE {
|
|
|
28
29
|
epaisseur_isolation?: number;
|
|
29
30
|
tv_umur_id?: number; // TV
|
|
30
31
|
enum_methode_saisie_u_id?: number; // ENUM methode_saisie_u
|
|
32
|
+
paroi_lourde?: boolean;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export interface MurDI {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open3cl/engine",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.25",
|
|
4
4
|
"description": "Open Source 3CL-DPE engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
+
"http-server": "http-server",
|
|
15
16
|
"test": "vitest run",
|
|
16
17
|
"test:ci": "vitest run --coverage",
|
|
17
18
|
"test:corpus": "node test/corpus/run_all_corpus_checks.js",
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
"release:dry": "semantic-release --dry-run",
|
|
26
27
|
"prepare": "husky install",
|
|
27
28
|
"assets:sync": "node scripts/synchronize_assets.js",
|
|
28
|
-
"version:update": "node scripts/update_version.js"
|
|
29
|
+
"version:update": "node scripts/update_version.js",
|
|
30
|
+
"reports:preview": "npm run http-server dist/reports/corpus -o"
|
|
29
31
|
},
|
|
30
32
|
"repository": {
|
|
31
33
|
"type": "git",
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"dependencies": {
|
|
39
41
|
"dioma": "^0.4.6",
|
|
40
42
|
"fast-xml-parser": "^4.5.0",
|
|
43
|
+
"http-server": "^14.1.1",
|
|
41
44
|
"lodash-es": "4.17.21",
|
|
42
45
|
"mathjs": "^15.1.0",
|
|
43
46
|
"winston": "3.13.0"
|