feat(dommer): five solutions in M5 and the verdicts, and three sensitivities of chapter 17.8 as switches
The ladder, part I and M7 now cover A, B, C, T-F and T-K: A is best when it can be built and beats each of the four others that can. M5 holds by definition for T-F and judges T-K as nuclear power on every step. Switches for the sensitivities: full displacement in the first stage (delta_V = 1 for the modules started within the grid that exists, in S11, S23, S24, the grid investment and V), new renewable power counted from a later year for C and T, and Inndata.med for modules of 50 and 200 MW. Next to S54 the withdrawal with sea water only for the nuclear production the data centres themselves use. With the switches off every figure for all seven solutions is unchanged to the last digit (267 made-up paths, 516 817 lines, byte for byte). Not yet reconciled against the independent reader's code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
811fad1296
commit
fe2b2131f3
9 changed files with 754 additions and 42 deletions
|
|
@ -89,17 +89,22 @@ def test_dom_m2_teller_null_som_oppfylt() -> None:
|
|||
|
||||
|
||||
def test_dom_m7_a_mot_b_og_c() -> None:
|
||||
"""A is best in 5 of 10 draws: holds. A draw where A cannot be built is not one of them."""
|
||||
"""A is best in 5 of 10 draws: holds. A draw where A cannot be built is not one of them.
|
||||
|
||||
The two versions of solution T are left out here; ``test_trinnvis_dommer.py`` has all five.
|
||||
"""
|
||||
A = _utfall((10.0, 5), (1.0, 3), (None, 2))
|
||||
B = _utfall((5.0, 5), (2.0, 3), (-9.0, 2))
|
||||
C = _utfall((None, 5), (0.0, 5))
|
||||
assert dommer.a_er_best(A, B, C) == [True] * 5 + [False] * 5
|
||||
assert dommer.dom_m7(A, B, C) is Dom.HOLDER
|
||||
assert dommer.a_er_best({Losning.A: A, Losning.B: B, Losning.C: C}) == [True] * 5 + [False] * 5
|
||||
assert dommer.dom_m7({Losning.A: A, Losning.B: B, Losning.C: C}) is Dom.HOLDER
|
||||
alltid_bedre = _utfall((5.0, 5), (2.0, 5))
|
||||
assert dommer.dom_m7(_utfall((10.0, 4), (1.0, 6)), alltid_bedre, C) is Dom.BETINGELSER
|
||||
assert dommer.dom_m7(_utfall((10.0, 1), (1.0, 9)), alltid_bedre, C) is Dom.HOLDER_IKKE
|
||||
fire = {Losning.A: _utfall((10.0, 4), (1.0, 6)), Losning.B: alltid_bedre, Losning.C: C}
|
||||
assert dommer.dom_m7(fire) is Dom.BETINGELSER
|
||||
en = {Losning.A: _utfall((10.0, 1), (1.0, 9)), Losning.B: alltid_bedre, Losning.C: C}
|
||||
assert dommer.dom_m7(en) is Dom.HOLDER_IKKE
|
||||
# equal is not best
|
||||
assert dommer.a_er_best([1.0], [1.0], [0.0]) == [False]
|
||||
assert dommer.a_er_best({Losning.A: [1.0], Losning.B: [1.0], Losning.C: [0.0]}) == [False]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------ M3 and M4
|
||||
|
|
@ -208,7 +213,7 @@ def test_ellers_paa_hoyeste_trinn_som_lar_seg_bygge() -> None:
|
|||
|
||||
|
||||
def test_referansekjoringen_kan_ikke_gi_trinnet() -> None:
|
||||
"""R reaches 90 % on every step here, but only A, B and C decide the step."""
|
||||
"""R reaches 90 % on every step here, but only A, B, C, T-F and T-K decide the step."""
|
||||
stige = _stige(n1=(0.0, 10), n5=(0.0, 10))
|
||||
assert dommer.trinn_for_dommene(stige).grunnlag is Grunnlag.HOYESTE
|
||||
|
||||
|
|
@ -267,7 +272,7 @@ def test_del_I_holder_ikke_naar_hver_losning_er_felt() -> None:
|
|||
assert dommer.del_I(per_losning, median, Trinnvalg(None, Grunnlag.INGEN)) is Dom.HOLDER_IKKE
|
||||
|
||||
|
||||
def test_del_I_ser_bare_paa_A_B_og_C() -> None:
|
||||
def test_del_I_ser_ikke_paa_referansekjoringen() -> None:
|
||||
"""The reference run R holds on everything here; it cannot give «holder»."""
|
||||
per_losning = {
|
||||
Losning.A: _dommer(M2=Dom.HOLDER_IKKE),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue