@open3cl/engine 1.0.8 → 1.0.10
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/features/dpe/domain/models/dpe.model.ts +7 -3
- package/features/dpe/domain/models/{plancher-bas.model.ts → plancher.model.ts} +31 -7
- package/features/dpe/domain/models/type-habitation.model.js +8 -0
- package/features/dpe/infrastructure/baieVitreeTv.store.js +70 -0
- package/features/dpe/infrastructure/baieVitreeTv.store.spec.js +106 -0
- package/features/dpe/infrastructure/pontThermiqueTv.store.js +112 -0
- package/features/dpe/infrastructure/pontThermiqueTv.store.spec.js +134 -0
- package/features/engine/domain/contexte.builder.js +59 -63
- package/features/engine/domain/contexte.builder.spec.js +41 -62
- package/features/engine/domain/engine.service.js +20 -2
- package/features/engine/domain/enveloppe/baie_vitree/deperdition-baie-vitree.service.js +1 -1
- package/features/engine/domain/enveloppe/deperdition-enveloppe.service.js +41 -0
- package/features/engine/domain/enveloppe/deperdition-enveloppe.service.spec.js +3 -3
- package/features/engine/domain/enveloppe/deperdition.service.js +2 -3
- package/features/engine/domain/enveloppe/espace_tampon/espace-tampon.service.js +44 -0
- package/features/engine/domain/enveloppe/espace_tampon/espace-tampon.service.spec.js +81 -0
- package/features/engine/domain/enveloppe/mur/deperdition-mur.service.js +31 -3
- package/features/engine/domain/enveloppe/mur/deperdition-mur.service.spec.js +91 -10
- package/features/engine/domain/enveloppe/plancher_bas/deperdition-plancher-bas.service.js +48 -2
- package/features/engine/domain/enveloppe/plancher_bas/deperdition-plancher-bas.service.spec.js +103 -6
- package/features/engine/domain/enveloppe/plancher_haut/deperdition-plancher-haut.service.js +35 -2
- package/features/engine/domain/enveloppe/plancher_haut/deperdition-plancher-haut.service.spec.js +82 -7
- package/features/engine/domain/enveloppe/pont_thermique/deperdition-pont-thermique.service.js +439 -0
- package/features/engine/domain/enveloppe/pont_thermique/deperdition-pont-thermique.service.spec.js +636 -0
- package/features/engine/domain/enveloppe/porte/deperdition-porte.service.js +1 -1
- package/features/engine/domain/enveloppe/porte/deperdition-porte.service.spec.js +2 -2
- package/features/engine/domain/enveloppe/ventilation/deperdition-ventilation.service.js +1 -1
- package/features/engine/domain/logement/nadeq.service.js +62 -0
- package/features/engine/domain/logement/nadeq.service.spec.js +71 -0
- package/features/engine/domain/logement/surface-sud-equivalente.service.js +169 -0
- package/features/engine/domain/logement/surface-sud-equivalente.service.spec.js +210 -0
- package/features/engine/domain/models/contexte.model.ts +10 -5
- package/features/engine/domain/models/deperdition.model.ts +1 -1
- package/package.json +1 -1
- package/features/dpe/domain/models/plancher-haut.model.ts +0 -33
|
@@ -34,7 +34,7 @@ export class DeperditionMurService extends DeperditionService {
|
|
|
34
34
|
surfaceAue: murDE.surface_aue,
|
|
35
35
|
enumCfgIsolationLncId: murDE.enum_cfg_isolation_lnc_id,
|
|
36
36
|
tvCoefReductionDeperditionId: murDE.tv_coef_reduction_deperdition_id,
|
|
37
|
-
|
|
37
|
+
zoneClimatique: ctx.zoneClimatique.value
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
/** @type {MurDI} */
|
|
@@ -65,14 +65,14 @@ export class DeperditionMurService extends DeperditionService {
|
|
|
65
65
|
case '2': // isolation inconnue (table forfaitaire)
|
|
66
66
|
umur = Math.min(
|
|
67
67
|
umurNu,
|
|
68
|
-
this.tvStore.getUmur(ctx.enumPeriodeConstructionId, ctx.
|
|
68
|
+
this.tvStore.getUmur(ctx.enumPeriodeConstructionId, ctx.zoneClimatique.id, ctx.effetJoule)
|
|
69
69
|
);
|
|
70
70
|
break;
|
|
71
71
|
case '7': // année d'isolation différente de l'année de construction
|
|
72
72
|
case '8': // année de construction saisie
|
|
73
73
|
umur = Math.min(
|
|
74
74
|
umurNu,
|
|
75
|
-
this.tvStore.getUmur(enumPeriodeIsolationId, ctx.
|
|
75
|
+
this.tvStore.getUmur(enumPeriodeIsolationId, ctx.zoneClimatique.id, ctx.effetJoule)
|
|
76
76
|
);
|
|
77
77
|
break;
|
|
78
78
|
case '3': // epaisseur isolation saisie justifiée par mesure ou observation
|
|
@@ -165,4 +165,32 @@ export class DeperditionMurService extends DeperditionService {
|
|
|
165
165
|
*/
|
|
166
166
|
return Math.min(2.5, Math.round(parseFloat(umur0) * PRECISION) / PRECISION);
|
|
167
167
|
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Retourner le type d'isolation du mur
|
|
171
|
+
* Si isolation inconnue, on considère isolation iti si la période d'isolation (à défaut année de construction) est > 1975
|
|
172
|
+
*
|
|
173
|
+
* @param ctx {Contexte}
|
|
174
|
+
* @param murDE {MurDE}
|
|
175
|
+
* @return {number}
|
|
176
|
+
*/
|
|
177
|
+
typeIsolation(ctx, murDE) {
|
|
178
|
+
const typeIsolation = parseInt(murDE.enum_type_isolation_id);
|
|
179
|
+
|
|
180
|
+
// Type d'isolation inconnu
|
|
181
|
+
if (typeIsolation === 1) {
|
|
182
|
+
const periodeIsolation = murDE.enum_periode_isolation_id || ctx.enumPeriodeConstructionId;
|
|
183
|
+
|
|
184
|
+
// Année isolation / construction > 1974
|
|
185
|
+
if (parseInt(periodeIsolation) >= 3) {
|
|
186
|
+
// Isolation ITI
|
|
187
|
+
return 3;
|
|
188
|
+
} else {
|
|
189
|
+
// Non isolé
|
|
190
|
+
return 2;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return typeIsolation;
|
|
195
|
+
}
|
|
168
196
|
}
|
|
@@ -77,7 +77,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
77
77
|
const ctx = {
|
|
78
78
|
effetJoule,
|
|
79
79
|
enumPeriodeConstructionId,
|
|
80
|
-
|
|
80
|
+
zoneClimatique: {
|
|
81
|
+
id: zoneClimatiqueId
|
|
82
|
+
}
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
/** @type {MurDE} */
|
|
@@ -105,7 +107,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
105
107
|
const ctx = {
|
|
106
108
|
effetJoule: false,
|
|
107
109
|
enumPeriodeConstructionId: '6',
|
|
108
|
-
|
|
110
|
+
zoneClimatique: {
|
|
111
|
+
id: '3'
|
|
112
|
+
}
|
|
109
113
|
};
|
|
110
114
|
/** @type {MurDE} */
|
|
111
115
|
const de = {
|
|
@@ -129,7 +133,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
129
133
|
const ctx = {
|
|
130
134
|
effetJoule: false,
|
|
131
135
|
enumPeriodeConstructionId: '6',
|
|
132
|
-
|
|
136
|
+
zoneClimatique: {
|
|
137
|
+
id: '3'
|
|
138
|
+
}
|
|
133
139
|
};
|
|
134
140
|
/** @type {MurDE} */
|
|
135
141
|
const de = {
|
|
@@ -153,7 +159,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
153
159
|
const ctx = {
|
|
154
160
|
effetJoule: false,
|
|
155
161
|
enumPeriodeConstructionId: '6',
|
|
156
|
-
|
|
162
|
+
zoneClimatique: {
|
|
163
|
+
id: '3'
|
|
164
|
+
}
|
|
157
165
|
};
|
|
158
166
|
/** @type {MurDE} */
|
|
159
167
|
const de = {
|
|
@@ -176,7 +184,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
176
184
|
const ctx = {
|
|
177
185
|
effetJoule: false,
|
|
178
186
|
enumPeriodeConstructionId: '6',
|
|
179
|
-
|
|
187
|
+
zoneClimatique: {
|
|
188
|
+
id: '3'
|
|
189
|
+
}
|
|
180
190
|
};
|
|
181
191
|
/** @type {MurDE} */
|
|
182
192
|
const de = {
|
|
@@ -199,7 +209,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
199
209
|
const ctx = {
|
|
200
210
|
effetJoule: false,
|
|
201
211
|
enumPeriodeConstructionId: '6',
|
|
202
|
-
|
|
212
|
+
zoneClimatique: {
|
|
213
|
+
id: '3'
|
|
214
|
+
}
|
|
203
215
|
};
|
|
204
216
|
/** @type {MurDE} */
|
|
205
217
|
const de = {
|
|
@@ -222,7 +234,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
222
234
|
const ctx = {
|
|
223
235
|
effetJoule: true,
|
|
224
236
|
enumPeriodeConstructionId: '1',
|
|
225
|
-
|
|
237
|
+
zoneClimatique: {
|
|
238
|
+
id: '3'
|
|
239
|
+
}
|
|
226
240
|
};
|
|
227
241
|
/** @type {MurDE} */
|
|
228
242
|
const de = {
|
|
@@ -246,7 +260,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
246
260
|
const ctx = {
|
|
247
261
|
effetJoule: true,
|
|
248
262
|
enumPeriodeConstructionId: '1',
|
|
249
|
-
|
|
263
|
+
zoneClimatique: {
|
|
264
|
+
id: 3
|
|
265
|
+
}
|
|
250
266
|
};
|
|
251
267
|
/** @type {MurDE} */
|
|
252
268
|
const de = {
|
|
@@ -270,7 +286,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
270
286
|
const ctx = {
|
|
271
287
|
effetJoule: false,
|
|
272
288
|
enumPeriodeConstructionId: '1',
|
|
273
|
-
|
|
289
|
+
zoneClimatique: {
|
|
290
|
+
id: 3
|
|
291
|
+
}
|
|
274
292
|
};
|
|
275
293
|
/** @type {MurDE} */
|
|
276
294
|
const de = {
|
|
@@ -294,7 +312,9 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
294
312
|
const ctx = {
|
|
295
313
|
effetJoule: false,
|
|
296
314
|
enumPeriodeConstructionId: '1',
|
|
297
|
-
|
|
315
|
+
zoneClimatique: {
|
|
316
|
+
id: 3
|
|
317
|
+
}
|
|
298
318
|
};
|
|
299
319
|
/** @type {MurDE} */
|
|
300
320
|
const de = {
|
|
@@ -315,6 +335,67 @@ describe('Calcul de déperdition des murs', () => {
|
|
|
315
335
|
});
|
|
316
336
|
});
|
|
317
337
|
|
|
338
|
+
test.each([
|
|
339
|
+
{
|
|
340
|
+
label: 'mur avec isolation inconnue et période isolation 1975',
|
|
341
|
+
enumTypeIsolationId: 1,
|
|
342
|
+
enumPeriodIsolationId: 3,
|
|
343
|
+
enumPeriodeConstructionId: undefined,
|
|
344
|
+
typeIsolationExpected: 3
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
label: 'mur avec isolation inconnue et période construction 1975',
|
|
348
|
+
enumTypeIsolationId: 1,
|
|
349
|
+
enumPeriodIsolationId: undefined,
|
|
350
|
+
enumPeriodeConstructionId: 6,
|
|
351
|
+
typeIsolationExpected: 3
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
label: 'mur avec isolation inconnue et période isolation 1974',
|
|
355
|
+
enumTypeIsolationId: 1,
|
|
356
|
+
enumPeriodIsolationId: 2,
|
|
357
|
+
enumPeriodeConstructionId: undefined,
|
|
358
|
+
typeIsolationExpected: 2
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
label: 'mur avec isolation inconnue et période construction 1974',
|
|
362
|
+
enumTypeIsolationId: 1,
|
|
363
|
+
enumPeriodIsolationId: undefined,
|
|
364
|
+
enumPeriodeConstructionId: 1,
|
|
365
|
+
typeIsolationExpected: 2
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
label: 'mur avec isolation iti+ite',
|
|
369
|
+
enumTypeIsolationId: 6,
|
|
370
|
+
enumPeriodIsolationId: 1,
|
|
371
|
+
enumPeriodeConstructionId: undefined,
|
|
372
|
+
typeIsolationExpected: 6
|
|
373
|
+
}
|
|
374
|
+
])(
|
|
375
|
+
"Récupération du type d'isolation pour $label",
|
|
376
|
+
({
|
|
377
|
+
enumTypeIsolationId,
|
|
378
|
+
enumPeriodIsolationId = undefined,
|
|
379
|
+
enumPeriodeConstructionId = undefined,
|
|
380
|
+
typeIsolationExpected
|
|
381
|
+
}) => {
|
|
382
|
+
/**
|
|
383
|
+
* @type {MurDE}
|
|
384
|
+
*/
|
|
385
|
+
let murDE = {
|
|
386
|
+
enum_type_isolation_id: enumTypeIsolationId,
|
|
387
|
+
enum_periode_isolation_id: enumPeriodIsolationId
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @type {Contexte}
|
|
392
|
+
*/
|
|
393
|
+
const ctx = { enumPeriodeConstructionId };
|
|
394
|
+
|
|
395
|
+
expect(service.typeIsolation(ctx, murDE)).toBe(typeIsolationExpected);
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
|
|
318
399
|
describe("Test d'intégration de mur", () => {
|
|
319
400
|
test.each(corpus)('vérification des DI des murs pour dpe %s', (ademeId) => {
|
|
320
401
|
let dpeRequest = getAdemeFileJson(ademeId);
|
|
@@ -34,7 +34,7 @@ export class DeperditionPlancherBasService extends DeperditionService {
|
|
|
34
34
|
surfaceAiu: pbDE.surface_aiu,
|
|
35
35
|
surfaceAue: pbDE.surface_aue,
|
|
36
36
|
enumCfgIsolationLncId: pbDE.enum_cfg_isolation_lnc_id,
|
|
37
|
-
|
|
37
|
+
zoneClimatique: ctx.zoneClimatique.value
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
/** @type {PlancherBasDI} */
|
|
@@ -67,7 +67,7 @@ export class DeperditionPlancherBasService extends DeperditionService {
|
|
|
67
67
|
case '8': // année de construction saisie
|
|
68
68
|
upb = Math.min(
|
|
69
69
|
upbNu,
|
|
70
|
-
this.tvStore.getUpb(enumPeriodeIsolationId, ctx.
|
|
70
|
+
this.tvStore.getUpb(enumPeriodeIsolationId, ctx.zoneClimatique.id, ctx.effetJoule)
|
|
71
71
|
);
|
|
72
72
|
break;
|
|
73
73
|
case '3': // epaisseur isolation saisie justifiée par mesure ou observation
|
|
@@ -166,4 +166,50 @@ export class DeperditionPlancherBasService extends DeperditionService {
|
|
|
166
166
|
|
|
167
167
|
return Math.round(parseFloat(upbFinal) * PRECISION) / PRECISION;
|
|
168
168
|
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Retourner le type d'isolation du plancher
|
|
172
|
+
* Si isolation inconnue :
|
|
173
|
+
* - Les planchers sur terre-plein sont considérés non isolés avant 2001 et isolés par l’extérieur (en sous-face) à partir de 2001
|
|
174
|
+
* - Les autres planchers sont considérés isolés par l’extérieur
|
|
175
|
+
*
|
|
176
|
+
* @param ctx {Contexte}
|
|
177
|
+
* @param plancherBasDE {PlancherBasDE}
|
|
178
|
+
* @return {number}
|
|
179
|
+
*/
|
|
180
|
+
typeIsolation(ctx, plancherBasDE) {
|
|
181
|
+
const typeIsolation = parseInt(plancherBasDE.enum_type_isolation_id);
|
|
182
|
+
|
|
183
|
+
// Type d'isolation inconnu
|
|
184
|
+
if (typeIsolation === 1) {
|
|
185
|
+
const typeAdjacence = parseInt(plancherBasDE.enum_type_adjacence_id);
|
|
186
|
+
const periodeIsolation =
|
|
187
|
+
parseInt(plancherBasDE.enum_periode_isolation_id) ||
|
|
188
|
+
parseInt(ctx.enumPeriodeConstructionId);
|
|
189
|
+
|
|
190
|
+
// Plancher sur terre-plein
|
|
191
|
+
if (typeAdjacence === 5) {
|
|
192
|
+
// Année isolation / construction < 2001
|
|
193
|
+
if (periodeIsolation < 7) {
|
|
194
|
+
// Non isolé
|
|
195
|
+
return 2;
|
|
196
|
+
} else {
|
|
197
|
+
// Isolation ITE
|
|
198
|
+
return 4;
|
|
199
|
+
}
|
|
200
|
+
} else {
|
|
201
|
+
// Année isolation / construction < 1975
|
|
202
|
+
if (periodeIsolation < 3) {
|
|
203
|
+
// Non isolé
|
|
204
|
+
return 2;
|
|
205
|
+
} else {
|
|
206
|
+
// Isolation ITE
|
|
207
|
+
return 4;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Isolation ITE si "isolé mais type d'isolation inconnu"
|
|
213
|
+
return typeIsolation === 9 ? 4 : typeIsolation;
|
|
214
|
+
}
|
|
169
215
|
}
|
package/features/engine/domain/enveloppe/plancher_bas/deperdition-plancher-bas.service.spec.js
CHANGED
|
@@ -28,7 +28,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
28
28
|
const ctx = {
|
|
29
29
|
effetJoule: false,
|
|
30
30
|
enumPeriodeConstructionId: '6',
|
|
31
|
-
|
|
31
|
+
zoneClimatique: {
|
|
32
|
+
id: '3'
|
|
33
|
+
}
|
|
32
34
|
};
|
|
33
35
|
/** @type {PlancherBasDE} */
|
|
34
36
|
const de = {
|
|
@@ -53,7 +55,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
53
55
|
const ctx = {
|
|
54
56
|
effetJoule: false,
|
|
55
57
|
enumPeriodeConstructionId: '6',
|
|
56
|
-
|
|
58
|
+
zoneClimatique: {
|
|
59
|
+
id: '3'
|
|
60
|
+
}
|
|
57
61
|
};
|
|
58
62
|
/** @type {PlancherBasDE} */
|
|
59
63
|
const de = {
|
|
@@ -80,7 +84,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
80
84
|
const ctx = {
|
|
81
85
|
effetJoule: false,
|
|
82
86
|
enumPeriodeConstructionId: '6',
|
|
83
|
-
|
|
87
|
+
zoneClimatique: {
|
|
88
|
+
id: '3'
|
|
89
|
+
}
|
|
84
90
|
};
|
|
85
91
|
/** @type {PlancherBasDE} */
|
|
86
92
|
const de = {
|
|
@@ -103,7 +109,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
103
109
|
const ctx = {
|
|
104
110
|
effetJoule: false,
|
|
105
111
|
enumPeriodeConstructionId: '6',
|
|
106
|
-
|
|
112
|
+
zoneClimatique: {
|
|
113
|
+
id: '3'
|
|
114
|
+
}
|
|
107
115
|
};
|
|
108
116
|
/** @type {PlancherBasDE} */
|
|
109
117
|
const de = {
|
|
@@ -127,7 +135,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
127
135
|
const ctx = {
|
|
128
136
|
effetJoule: false,
|
|
129
137
|
enumPeriodeConstructionId: '6',
|
|
130
|
-
|
|
138
|
+
zoneClimatique: {
|
|
139
|
+
id: '3'
|
|
140
|
+
}
|
|
131
141
|
};
|
|
132
142
|
/** @type {PlancherBasDE} */
|
|
133
143
|
const de = {
|
|
@@ -150,7 +160,9 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
150
160
|
const ctx = {
|
|
151
161
|
effetJoule: false,
|
|
152
162
|
enumPeriodeConstructionId: '6',
|
|
153
|
-
|
|
163
|
+
zoneClimatique: {
|
|
164
|
+
id: '3'
|
|
165
|
+
}
|
|
154
166
|
};
|
|
155
167
|
/** @type {PlancherBasDE} */
|
|
156
168
|
const de = {
|
|
@@ -170,6 +182,91 @@ describe('Calcul de déperdition des planchers bas', () => {
|
|
|
170
182
|
});
|
|
171
183
|
});
|
|
172
184
|
|
|
185
|
+
test.each([
|
|
186
|
+
{
|
|
187
|
+
label:
|
|
188
|
+
'plancher bas avec isolation inconnue, adjacence terre-plein et période isolation 1974',
|
|
189
|
+
enumTypeIsolationId: 1,
|
|
190
|
+
enumTypeAdjacenceId: 5,
|
|
191
|
+
enumPeriodIsolationId: 1,
|
|
192
|
+
enumPeriodeConstructionId: undefined,
|
|
193
|
+
typeIsolationExpected: 2
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label:
|
|
197
|
+
'plancher bas avec isolation inconnue, adjacence terre-plein et période construction 2000',
|
|
198
|
+
enumTypeIsolationId: 1,
|
|
199
|
+
enumTypeAdjacenceId: 5,
|
|
200
|
+
enumPeriodIsolationId: undefined,
|
|
201
|
+
enumPeriodeConstructionId: 6,
|
|
202
|
+
typeIsolationExpected: 2
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label:
|
|
206
|
+
'plancher bas avec isolation inconnue, adjacence terre-plein et période isolation 2001',
|
|
207
|
+
enumTypeIsolationId: 1,
|
|
208
|
+
enumPeriodIsolationId: 7,
|
|
209
|
+
enumTypeAdjacenceId: 5,
|
|
210
|
+
enumPeriodeConstructionId: undefined,
|
|
211
|
+
typeIsolationExpected: 4
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
label: 'plancher bas avec isolation inconnue, adjacence garage et période isolation 1974',
|
|
215
|
+
enumTypeIsolationId: 1,
|
|
216
|
+
enumPeriodIsolationId: 2,
|
|
217
|
+
enumTypeAdjacenceId: 8,
|
|
218
|
+
enumPeriodeConstructionId: undefined,
|
|
219
|
+
typeIsolationExpected: 2
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
label: 'plancher bas avec isolation inconnue, adjacence garage et période isolation 1975',
|
|
223
|
+
enumTypeIsolationId: 1,
|
|
224
|
+
enumPeriodIsolationId: 3,
|
|
225
|
+
enumTypeAdjacenceId: 8,
|
|
226
|
+
enumPeriodeConstructionId: undefined,
|
|
227
|
+
typeIsolationExpected: 4
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
label: 'plancher bas avec isolation de type "isolé mais type d\'isolation inconnu"',
|
|
231
|
+
enumTypeIsolationId: 9,
|
|
232
|
+
enumPeriodIsolationId: 1,
|
|
233
|
+
enumPeriodeConstructionId: undefined,
|
|
234
|
+
typeIsolationExpected: 4
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: 'plancher bas avec isolation iti+ite',
|
|
238
|
+
enumTypeIsolationId: 6,
|
|
239
|
+
enumPeriodIsolationId: 1,
|
|
240
|
+
enumPeriodeConstructionId: undefined,
|
|
241
|
+
typeIsolationExpected: 6
|
|
242
|
+
}
|
|
243
|
+
])(
|
|
244
|
+
"Récupération du type d'isolation pour $label",
|
|
245
|
+
({
|
|
246
|
+
enumTypeIsolationId,
|
|
247
|
+
enumPeriodIsolationId = undefined,
|
|
248
|
+
enumTypeAdjacenceId = undefined,
|
|
249
|
+
enumPeriodeConstructionId = undefined,
|
|
250
|
+
typeIsolationExpected
|
|
251
|
+
}) => {
|
|
252
|
+
/**
|
|
253
|
+
* @type {PlancherBasDE}
|
|
254
|
+
*/
|
|
255
|
+
let plancherBasDE = {
|
|
256
|
+
enum_type_isolation_id: enumTypeIsolationId,
|
|
257
|
+
enum_type_adjacence_id: enumTypeAdjacenceId,
|
|
258
|
+
enum_periode_isolation_id: enumPeriodIsolationId
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @type {Contexte}
|
|
263
|
+
*/
|
|
264
|
+
const ctx = { enumPeriodeConstructionId };
|
|
265
|
+
|
|
266
|
+
expect(service.typeIsolation(ctx, plancherBasDE)).toBe(typeIsolationExpected);
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
|
|
173
270
|
describe("Test d'intégration de plancher bas", () => {
|
|
174
271
|
test.each(corpus)('vérification des DI des pb pour dpe %s', (ademeId) => {
|
|
175
272
|
/**
|
|
@@ -32,7 +32,7 @@ export class DeperditionPlancherHautService extends DeperditionService {
|
|
|
32
32
|
surfaceAiu: phDE.surface_aiu,
|
|
33
33
|
surfaceAue: phDE.surface_aue,
|
|
34
34
|
enumCfgIsolationLncId: phDE.enum_cfg_isolation_lnc_id,
|
|
35
|
-
|
|
35
|
+
zoneClimatique: ctx.zoneClimatique.value
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
/** @type {PlancherHautDI} */
|
|
@@ -69,7 +69,7 @@ export class DeperditionPlancherHautService extends DeperditionService {
|
|
|
69
69
|
this.tvStore.getUph(
|
|
70
70
|
enumPeriodeIsolationId,
|
|
71
71
|
this.#getTypeAdjacence(phDE),
|
|
72
|
-
ctx.
|
|
72
|
+
ctx.zoneClimatique.id,
|
|
73
73
|
ctx.effetJoule
|
|
74
74
|
)
|
|
75
75
|
);
|
|
@@ -133,4 +133,37 @@ export class DeperditionPlancherHautService extends DeperditionService {
|
|
|
133
133
|
return 'combles';
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Retourner le type d'isolation du plancher haut
|
|
139
|
+
* Si isolation inconnue :
|
|
140
|
+
* - Pour les bâtiments d’avant 1975, la paroi est considérée comme non isolée
|
|
141
|
+
* - Pour les bâtiments construits à partir de 1975, les plafonds sont considérés isolés par l’extérieur
|
|
142
|
+
*
|
|
143
|
+
* @param ctx {Contexte}
|
|
144
|
+
* @param plancherHautDE {PlancherHautDE}
|
|
145
|
+
* @return {number}
|
|
146
|
+
*/
|
|
147
|
+
typeIsolation(ctx, plancherHautDE) {
|
|
148
|
+
const typeIsolation = parseInt(plancherHautDE.enum_type_isolation_id);
|
|
149
|
+
|
|
150
|
+
// Type d'isolation inconnu
|
|
151
|
+
if (typeIsolation === 1) {
|
|
152
|
+
const periodeIsolation =
|
|
153
|
+
parseInt(plancherHautDE.enum_periode_isolation_id) ||
|
|
154
|
+
parseInt(ctx.enumPeriodeConstructionId);
|
|
155
|
+
|
|
156
|
+
// Année isolation / construction < 1975
|
|
157
|
+
if (periodeIsolation < 3) {
|
|
158
|
+
// Non isolé
|
|
159
|
+
return 2;
|
|
160
|
+
} else {
|
|
161
|
+
// Isolation ITE
|
|
162
|
+
return 4;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Isolation ITE si "isolé mais type d'isolation inconnu"
|
|
167
|
+
return typeIsolation === 9 ? 4 : typeIsolation;
|
|
168
|
+
}
|
|
136
169
|
}
|
package/features/engine/domain/enveloppe/plancher_haut/deperdition-plancher-haut.service.spec.js
CHANGED
|
@@ -28,7 +28,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
28
28
|
const ctx = {
|
|
29
29
|
effetJoule: false,
|
|
30
30
|
enumPeriodeConstructionId: '2',
|
|
31
|
-
|
|
31
|
+
zoneClimatique: {
|
|
32
|
+
id: '3'
|
|
33
|
+
}
|
|
32
34
|
};
|
|
33
35
|
/** @type {PlancherHautDE} */
|
|
34
36
|
const de = {
|
|
@@ -50,7 +52,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
50
52
|
const ctx = {
|
|
51
53
|
effetJoule: false,
|
|
52
54
|
enumPeriodeConstructionId: '1',
|
|
53
|
-
|
|
55
|
+
zoneClimatique: {
|
|
56
|
+
id: '3'
|
|
57
|
+
}
|
|
54
58
|
};
|
|
55
59
|
/** @type {PlancherHautDE} */
|
|
56
60
|
const de = {
|
|
@@ -73,7 +77,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
73
77
|
const ctx = {
|
|
74
78
|
effetJoule: true,
|
|
75
79
|
enumPeriodeConstructionId: '1',
|
|
76
|
-
|
|
80
|
+
zoneClimatique: {
|
|
81
|
+
id: '3'
|
|
82
|
+
}
|
|
77
83
|
};
|
|
78
84
|
/** @type {PlancherHautDE} */
|
|
79
85
|
const de = {
|
|
@@ -96,7 +102,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
96
102
|
const ctx = {
|
|
97
103
|
effetJoule: true,
|
|
98
104
|
enumPeriodeConstructionId: '1',
|
|
99
|
-
|
|
105
|
+
zoneClimatique: {
|
|
106
|
+
id: '3'
|
|
107
|
+
}
|
|
100
108
|
};
|
|
101
109
|
/** @type {PlancherHautDE} */
|
|
102
110
|
const de = {
|
|
@@ -119,7 +127,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
119
127
|
const ctx = {
|
|
120
128
|
effetJoule: false,
|
|
121
129
|
enumPeriodeConstructionId: '6',
|
|
122
|
-
|
|
130
|
+
zoneClimatique: {
|
|
131
|
+
id: '3'
|
|
132
|
+
}
|
|
123
133
|
};
|
|
124
134
|
/** @type {PlancherHautDE} */
|
|
125
135
|
const de = {
|
|
@@ -141,7 +151,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
141
151
|
const ctx = {
|
|
142
152
|
effetJoule: false,
|
|
143
153
|
enumPeriodeConstructionId: '6',
|
|
144
|
-
|
|
154
|
+
zoneClimatique: {
|
|
155
|
+
id: '3'
|
|
156
|
+
}
|
|
145
157
|
};
|
|
146
158
|
/** @type {PlancherHautDE} */
|
|
147
159
|
const de = {
|
|
@@ -164,7 +176,9 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
164
176
|
const ctx = {
|
|
165
177
|
effetJoule: false,
|
|
166
178
|
enumPeriodeConstructionId: '6',
|
|
167
|
-
|
|
179
|
+
zoneClimatique: {
|
|
180
|
+
id: '3'
|
|
181
|
+
}
|
|
168
182
|
};
|
|
169
183
|
/** @type {PlancherHautDE} */
|
|
170
184
|
const de = {
|
|
@@ -181,6 +195,67 @@ describe('Calcul de déperdition des planchers haut', () => {
|
|
|
181
195
|
});
|
|
182
196
|
});
|
|
183
197
|
|
|
198
|
+
test.each([
|
|
199
|
+
{
|
|
200
|
+
label: 'plafond avec isolation inconnue et période isolation 1974',
|
|
201
|
+
enumTypeIsolationId: 1,
|
|
202
|
+
enumPeriodIsolationId: 1,
|
|
203
|
+
enumPeriodeConstructionId: undefined,
|
|
204
|
+
typeIsolationExpected: 2
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'plafond avec isolation inconnue et période construction 1974',
|
|
208
|
+
enumTypeIsolationId: 1,
|
|
209
|
+
enumPeriodIsolationId: undefined,
|
|
210
|
+
enumPeriodeConstructionId: 1,
|
|
211
|
+
typeIsolationExpected: 2
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
label: 'plafond avec isolation inconnue et période isolation 1975',
|
|
215
|
+
enumTypeIsolationId: 1,
|
|
216
|
+
enumPeriodIsolationId: 3,
|
|
217
|
+
enumPeriodeConstructionId: undefined,
|
|
218
|
+
typeIsolationExpected: 4
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: 'plafond avec isolation de type "isolé mais type d\'isolation inconnu"',
|
|
222
|
+
enumTypeIsolationId: 9,
|
|
223
|
+
enumPeriodIsolationId: 1,
|
|
224
|
+
enumPeriodeConstructionId: undefined,
|
|
225
|
+
typeIsolationExpected: 4
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
label: 'plafond avec isolation iti+ite',
|
|
229
|
+
enumTypeIsolationId: 6,
|
|
230
|
+
enumPeriodIsolationId: 1,
|
|
231
|
+
enumPeriodeConstructionId: undefined,
|
|
232
|
+
typeIsolationExpected: 6
|
|
233
|
+
}
|
|
234
|
+
])(
|
|
235
|
+
"Récupération du type d'isolation pour $label",
|
|
236
|
+
({
|
|
237
|
+
enumTypeIsolationId,
|
|
238
|
+
enumPeriodIsolationId = undefined,
|
|
239
|
+
enumPeriodeConstructionId = undefined,
|
|
240
|
+
typeIsolationExpected
|
|
241
|
+
}) => {
|
|
242
|
+
/**
|
|
243
|
+
* @type {PlancherHautDE}
|
|
244
|
+
*/
|
|
245
|
+
let plancherHautDE = {
|
|
246
|
+
enum_type_isolation_id: enumTypeIsolationId,
|
|
247
|
+
enum_periode_isolation_id: enumPeriodIsolationId
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @type {Contexte}
|
|
252
|
+
*/
|
|
253
|
+
const ctx = { enumPeriodeConstructionId };
|
|
254
|
+
|
|
255
|
+
expect(service.typeIsolation(ctx, plancherHautDE)).toBe(typeIsolationExpected);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
|
|
184
259
|
describe("Test d'intégration de plancher haut", () => {
|
|
185
260
|
test.each(corpus)('vérification des DI des ph pour dpe %s', (ademeId) => {
|
|
186
261
|
/**
|