mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Resolve a landlord double-glazing override to its glazing code 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f1c6825cae
commit
0fb86771dd
1 changed files with 11 additions and 2 deletions
|
|
@ -14,10 +14,19 @@ from __future__ import annotations
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from domain.modelling.simulation import EpcSimulation
|
from domain.modelling.simulation import EpcSimulation, GlazingOverlay
|
||||||
|
|
||||||
|
# Canonical glazing description → SAP10 glazing-type code (the Table 24 /
|
||||||
|
# `u_window` cascade enum, `_GLAZING_CODE_TO_UWINDOW` in heat_transmission).
|
||||||
|
_GLAZING_CODES: dict[str, int] = {
|
||||||
|
"Double glazing, 2002 or later": 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def glazing_overlay_for(
|
def glazing_overlay_for(
|
||||||
glazing_value: str, building_part: int
|
glazing_value: str, building_part: int
|
||||||
) -> Optional[EpcSimulation]:
|
) -> Optional[EpcSimulation]:
|
||||||
raise NotImplementedError
|
code = _GLAZING_CODES.get(glazing_value)
|
||||||
|
if code is None:
|
||||||
|
return None
|
||||||
|
return EpcSimulation(glazing=GlazingOverlay(glazing_type=code))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue