mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Implements SAP10.2 Appendix J Table 3c row 1 (Instantaneous combi, two-
profile EN 13203-2 / OPS 26 tests):
(61)m = (45)m × [r1 + DVF × F3] × fu + [F2 × n_m]
DVF (Daily Volume Factor) is piecewise in V_d,m, gated on the test
profile pair: M+L (PCDF separate_dhw_tests=2) or M+S (=3). Helper
`_table_3c_dvf` keeps the spec's piecewise branches close to the
formula in `combi_loss_monthly_kwh_table_3c_two_profile_instantaneous`.
Tests:
- 000477 element-wise LINE_61 pin via Table 3c (PCDB 18118 lodges
r1=0.015, F2=0.0, F3=0.00014; profile_pair=M+L). Closes 000477's
combi-loss component at abs=1e-3 against U985 PDF.
- Parametrized DVF boundary table for M+L (V<100, V=100, V=199.8,
V>199.8) and M+S (V<36, V∈[36,100.2], V>100.2) at abs=1e-9.
Citation fix: parser docstring updates the BRE PCDF Spec reference from
the placeholder "v1.0 §7.11" to the actual Rev 6b (12 May 2021) Gas and
Oil Boiler Table, pp. 14-15 (now landed at docs/sap-spec/). Notes that
PCDF field 48's encoding (1=schedule 2 → profile M; 2=schedules 2+3 →
M+L; 3=schedules 2+1 → M+S) drives the Table 3b/3c row selection, and
that r2 (field 55) is lodged but spec-excluded from SAP.
Table 3c rows 2-5 (storage-FGHRS / storage-combi variants) and Table
3b rows 2-5 stay deferred — symmetric "row 1 only" coverage until a
fixture exercises them.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| domain | ||
| fetchers | ||
| repos | ||
| utils | ||
| README.md | ||
Shared packages
Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).
| Package | Purpose |
|---|---|
domain/ |
Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic. |
repos/ |
Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain. |
fetchers/ |
External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes. |
utils/ |
Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers. |
Adding a new shared package
Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.
See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.