A roof capped below two panels is still offered no PV 🟩

Pins the ADR-0058 install floor delivered with the tracer slice (rung_max
< 2 returns empty) — no red phase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-07 22:07:39 +00:00
parent 5a382948d5
commit 1756976d7e

View file

@ -348,3 +348,28 @@ def test_sub_ladder_rungs_never_take_from_north_planes() -> None:
assert [c.panels_count for c in configs] == [2, 3]
assert [c.yearly_energy_dc_kwh for c in configs] == [639.0, 958.5]
assert all(s.azimuth_degrees == 180.0 for c in configs for s in c.segments)
def test_roof_capped_below_two_panels_still_yields_no_configs() -> None:
# ADR-0058 — the install floor: a roof whose cap resolves below 2 panels
# is never offered PV. Max 2 → cap 1.4 < 2; the ladder cliff is the
# correct outcome here, not a Sub-Ladder rung.
# Arrange
potential = SolarPotential(
panel_capacity_watts=400.0,
max_array_panels_count=2,
configurations=(
SolarPanelConfiguration(
panels_count=2,
yearly_energy_dc_kwh=640.0,
segments=(_segment(2, 180.0, 640.0),),
),
),
)
# Act
configs = select_conservative_configs(potential)
# Assert
assert configs == ()