docs: describe the code for the build-out of solution T
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
bca6496c0a
commit
4c9539d68a
3 changed files with 28 additions and 10 deletions
21
CLAUDE.md
21
CLAUDE.md
|
|
@ -18,8 +18,9 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
avoided emissions and cooling water).
|
||||
Every model parameter must trace to an entry here.
|
||||
- `FORHANDSREGISTRERING.md`: the approved direction and pre-registered criteria (M1–M7). Committed.
|
||||
- `modell/spesifikasjon.md`: the model specification (equations S1–S54; chapter 17,
|
||||
the addition to the direction, is not coded yet). `modell/parametere.json`: the frozen
|
||||
- `modell/spesifikasjon.md`: the model specification (equations S1–S54; of chapter 17,
|
||||
the addition to the direction, the build-out of solution T and the equations S48–S54 are coded, the rest
|
||||
is not). `modell/parametere.json`: the frozen
|
||||
parameters (value, range, distribution, source entries); its checksum is recorded in the pre-registration
|
||||
(version 1.1 after the one deviation of 2026-11-12, which added the quantities of chapter 17.8).
|
||||
The table in chapter 14 of the specification is generated from that file.
|
||||
|
|
@ -32,7 +33,9 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
specification. `parametere.py` reads the frozen file (checksum, strict validation, unit conversion).
|
||||
`fordelinger.py` and `trekninger.py` make the Monte Carlo draws, `hendelser.py` the stream for yearly events.
|
||||
`inndata.py` holds one set of values in the equations' units (`Inndata`; `fra_trekning` builds it for a draw).
|
||||
`utbygging.py` (S22: start years, IT vintages, export stops), `kraftsystem.py` (S23 to S25, S38) and
|
||||
`utbygging.py` (S22: start years, IT vintages, export stops; chapter 17.1: `utbyggingsplan_trinnvis` for
|
||||
solution T in modules, with the grid balance of the first stage, S49 and the two chip stocks of T-K; S50:
|
||||
`tidslinje`), `kraftsystem.py` (S23 to S25, S38) and
|
||||
`kontantstrom.py` (S26, S34, S35, S40, S45: `lag_plan`, `regn_program`) put the equations together over the
|
||||
years. `nivaaisert.py` (the power cost per facility, year and vintage on levelised form; S15, S19, S27, S42),
|
||||
`eierskap.py` (S28 to S30: business cash flow, tax, ownership forms, the criteria over the draws), `skala.py`
|
||||
|
|
@ -41,15 +44,21 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
41 to 69), settled against an independent reader's code. Clarifications 62 to 66 correct the comparison of
|
||||
ownership forms (residual value, levies, private owners, the rate the state's cash flow is valued with, the
|
||||
cost of capital before tax), approved by the operator 2026-11-12; 67 lists what remains. Clarification 68
|
||||
holds the sources' figures for M5 (i), mirrored in `miljo.KILDEVERDIER_M5`. The run over the draws, the
|
||||
sensitivities and the tools of chapter 12 are not coded yet.
|
||||
holds the sources' figures for M5 (i), mirrored in `miljo.KILDEVERDIER_M5`. Clarifications 70 to 75 hold the
|
||||
readings of chapter 17 made when its build-out was coded, settled against an independent reader's code.
|
||||
Solution T (`Losning.T_F`, `Losning.T_K`) only has its build-out: `lag_plan` returns a `Trinnvisplan`, and
|
||||
`regn_program` refuses T until it is taken through the power system, cash flow, ownership and verdicts.
|
||||
S51 to S54 are pure functions in `ligninger.py`; the factor of S51 is not in the revenue yet, and S53 and
|
||||
S54 are not put together over a programme. The run over the draws, the sensitivities and the tools of
|
||||
chapter 12 are not coded yet.
|
||||
- `data/trekninger.npy` and `data/trekninger.json`: the 10 000 draws of the 91 drawn quantities, in the parameter
|
||||
file's units. `data/aarshendelser.npy` and `.json`: one uniform number per draw and year 2028–2100 for the
|
||||
export rule (own seed). Committed; every later computation reads them.
|
||||
- `tests/`: unit tests per equation, the loader, the draws, and `test_fasit.py` (known answers from Argonne,
|
||||
NOU 2026: 4, Epoch and NVE with the sources' own assumptions). Build-out, power system and cash flow are tested
|
||||
on the made-up set of values in `tests/conftest.py`, and so are the levelised cost, ownership, scale and
|
||||
environment. The verdicts are tested on invented outcomes per draw.
|
||||
environment. The verdicts are tested on invented outcomes per draw. `test_trinnvis.py` holds chapter 17:
|
||||
hand-computed build-outs for T-F and T-K, and S48 to S54.
|
||||
- `requirements.txt` (numpy, scipy) and `requirements-dev.txt` (pytest, ruff, mypy) pin exact versions;
|
||||
`pyproject.toml` only configures the tools (ruff `ALL`, mypy strict).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue