feat(grunnlag): the approved EEA assessment as a fixed table, and M7 rejects a net present value that is not a number (clarifications 136 and 139)
fra_frys takes the assessment of clarification 136 («usikker» for all four ownership forms) and has no guard any more; it is still not called before part 6. beste_per_trekning raises on NaN, where the best would depend on the order of the solutions. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
9b6e65c512
commit
6a51c4f4d2
6 changed files with 75 additions and 37 deletions
|
|
@ -119,6 +119,15 @@ def test_m7_hvem_som_er_best_blant_a_b_og_c() -> None:
|
|||
# ------------------------------------------------------------------ M3 and M4
|
||||
|
||||
|
||||
def test_M7_avviser_en_netto_naaverdi_som_ikke_er_et_tall() -> None:
|
||||
"""Clarification 139: with NaN the best would depend on the order of the solutions."""
|
||||
with pytest.raises(ValueError, match="not a number in draw 1"):
|
||||
dommer.beste_per_trekning({Losning.A: [1.0, math.nan], Losning.B: [2.0, 0.0]})
|
||||
with pytest.raises(ValueError, match="not a number in draw 0"):
|
||||
dommer.beste_per_trekning({Losning.B: [0.0], Losning.C: [math.nan]})
|
||||
assert dommer.beste_per_trekning({Losning.A: [-math.inf], Losning.B: [None]}) == [(Losning.A,)]
|
||||
|
||||
|
||||
def test_m3_verste_prisvirkning_i_R(oppdiktet: LagInndata) -> None:
|
||||
"""One facility in R takes 3.942 TWh from the balance: 39.42 kr/MWh on a price of 600.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue