feat(folsomheter): the row for standard contract terms carries the note that it can favour A (clarification 125)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-11-13 20:36:00 +01:00
commit 550f02d0a9
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
2 changed files with 16 additions and 1 deletions

View file

@ -57,6 +57,13 @@ HOVEDKJORINGEN: Final = "hovedkjøringen"
"""The name of the main run in the table."""
MERKNAD_STANDARDVILKAAR: Final = (
"Vilkårene erstatter regelen i hovedkjøringen: anlegget får full inntekt når tilgjengeligheten "
"når kravet. Raden kan derfor trekke i favør av A."
)
"""Line 10 follows the frozen list and can favour A; the row must say so (clarification 125)."""
class Avlesning(enum.StrEnum):
"""Where a row is read (clarifications 112 and 116)."""
@ -90,6 +97,7 @@ class Rad:
brytere: the switches of the model code the row sets.
saerskilt: a change that depends on the draw, a table, or another path.
eierrad: the row of the ownership pass, for the four rows that are read there.
merknad: what the table must say next to the row, in the language of the report.
"""
navn: str
@ -99,6 +107,7 @@ class Rad:
brytere: Brytere = kj.INGEN_BRYTERE
saerskilt: Saerskilt | None = None
eierrad: Eierrad | None = None
merknad: str = ""
@property
def linje(self) -> int:
@ -133,7 +142,7 @@ _RADER: Final = (
Rad("7", SMAA_ENHETER, brytere=_dim(minstelast=0.20)),
Rad("8", SMAA_ENHETER, brytere=_dim(fritt_enhetsvalg=True)),
Rad("9", SMAA_ENHETER, saerskilt=Saerskilt.HALV_TAU_N),
Rad("10", (Losning.A,), brytere=_dim(gamma_trinn=True)),
Rad("10", (Losning.A,), brytere=_dim(gamma_trinn=True), merknad=MERKNAD_STANDARDVILKAAR),
Rad("11a", ALLE, verdier={"mu_rel": 0.90}),
Rad("11b", ALLE, verdier={"mu_rel": 0.95}),
Rad("12", ALLE, Avlesning.VARER, brytere=_program(paaslag=Paaslagsform.VARIG)),

View file

@ -68,6 +68,12 @@ def test_lista_har_42_rader_fra_37_linjer() -> None:
}
def test_raden_for_standardvilkaar_sier_at_den_kan_trekke_i_favor_av_A() -> None:
"""Clarification 125: line 10 follows the frozen list, and the row says what follows."""
assert {navn for navn, rad in RADER.items() if rad.merknad} == {"10"}
assert "i favør av A" in RADER["10"].merknad
def test_radene_leses_av_der_avklaring_112_sier() -> None:
andre = {
navn: rad.avlesning for navn, rad in RADER.items() if rad.avlesning is not Avlesning.HOVED