docs: describe the build-out, the cash flow and the event stream
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
5c91cadf4c
commit
326b80d8d1
3 changed files with 30 additions and 9 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -24,3 +24,14 @@ All notable changes to this project will be documented in this file.
|
|||
- Known-answer tests against Argonne, NOU 2026: 4, Epoch and NVE with the sources' own assumptions
|
||||
(`tests/test_fasit.py`). The misses are kept as documented expected failures: wind on land and offshore wind
|
||||
come out 5–6 % below NVE, and three rows of Argonne's table depend on a reading the source does not settle.
|
||||
- Build-out, power system and cash flow in code (`src/tokenfabrikker/`): when each facility starts and which
|
||||
vintages of IT hardware it gets (S22, S33), the export rule with its own stored stream of random numbers
|
||||
(`data/aarshendelser.npy`), the fitted price lines and the power and capacity balances (S23–S25, S38), and the
|
||||
yearly cash flows with residual value, the additionality rule and net present value for Norway (S26, S34, S35,
|
||||
S40, S45). Tested on made-up numbers only; no result for the hypothesis has been computed.
|
||||
- A second independent reader coded these equations from the specification alone and found 28 ambiguities. They
|
||||
are settled in clarifications 21–40 in chapter 16 of the specification. With the readings aligned, the two
|
||||
implementations agree on 10 000 made-up build-out paths. The clarifications that are choices are marked and put
|
||||
to the project owner (`modell/fagfellevurdering-utkast-2-og-3.md`, part 5).
|
||||
- The price lines of S38 are held against NVE's twelve scenarios: within 5 % for Norway and three price areas,
|
||||
6.0 % and 7.7 % off in one scenario for NO3 and NO4, kept as documented expected failures.
|
||||
|
|
|
|||
16
CLAUDE.md
16
CLAUDE.md
|
|
@ -26,12 +26,17 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
- `src/tokenfabrikker/`: the code, run from `src/` without being installed. `ligninger.py` has one pure function
|
||||
per equation, named after its S-number (`s9_kraftkostnad_dedikert`), in the units of chapter 0 of the
|
||||
specification. `parametere.py` reads the frozen file (checksum, strict validation, unit conversion).
|
||||
`fordelinger.py` and `trekninger.py` make the Monte Carlo draws. So far: chapters 1 to 3 plus S45 and S47; the
|
||||
cash flow, build-out, power system and ownership forms are not coded yet.
|
||||
`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
|
||||
`kontantstrom.py` (S26, S34, S35, S40, S45: `lag_plan`, `regn_program`) put the equations together over the
|
||||
years. So far: chapters 1 to 6; business economics, ownership, scale, environment and verdicts are not coded yet.
|
||||
- `data/trekninger.npy` and `data/trekninger.json`: the 10 000 draws of the 87 drawn quantities, in the parameter
|
||||
file's units. Committed; every later computation reads them.
|
||||
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).
|
||||
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`.
|
||||
- `requirements.txt` (numpy, scipy) and `requirements-dev.txt` (pytest, ruff, mypy) pin exact versions;
|
||||
`pyproject.toml` only configures the tools (ruff `ALL`, mypy strict).
|
||||
|
||||
|
|
@ -54,7 +59,7 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
- **Known-answer tests:** nothing is tuned to make one pass. A miss stays in the suite as a strict `xfail` with
|
||||
the measured deviation and the cause if known, and is reported in the review log.
|
||||
- **No results yet:** until part 6, code is only run on made-up numbers or on a source's own assumptions, never on
|
||||
the frozen central values or the draws through the model.
|
||||
the frozen central values or the draws through the model. `regn_program` is only called with the made-up set.
|
||||
- **Neutrality:** vendors and companies are data sources, cited neutrally, never recommended. Nothing here
|
||||
advertises a business. "Business case" means profitability for Norway, not something for sale.
|
||||
- **Sadhguru** is mentioned in exactly one sentence, as inspiration, in the report's foreword and in README; never
|
||||
|
|
@ -69,6 +74,7 @@ carousel, Python code, and a Claude plugin (own repo, later).
|
|||
- Checks: `.venv/bin/ruff check . && .venv/bin/ruff format --check . && .venv/bin/mypy`
|
||||
- Draws: `PYTHONPATH=src .venv/bin/python -m tokenfabrikker.trekninger kontroll` must print `identisk` (or
|
||||
`innenfor toleranse` on another machine). `lag` rewrites the file and is only run after a deviation from the freeze.
|
||||
The same two commands exist for the event stream: `-m tokenfabrikker.hendelser kontroll`.
|
||||
|
||||
## Workflow
|
||||
- Remote is Forgejo (`git.fromaitochitta.com`), never GitHub. Private under `ktg/` until the repo-standard gate is
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -18,12 +18,15 @@ skal si når satsingen lønner seg, og når den ikke gjør det.
|
|||
- `modell/fagfellevurdering-utkast-1.md` og `modell/fagfellevurdering-utkast-2-og-3.md`: hva uavhengige lesere
|
||||
fant i utkastene, og hva som er gjort med det.
|
||||
- `src/tokenfabrikker/`: koden. Én funksjon per ligning, med samme nummer som i spesifikasjonen. Foreløpig
|
||||
kraftverket, datasenteret og inntekten (kapittel 1–3), innlesing av parameterne og trekningene. Kontantstrømmen,
|
||||
utbyggingen, kraftsystemet og eierformene er ikke kodet ennå.
|
||||
kraftverket, datasenteret og inntekten (kapittel 1–3), utbyggingen (kapittel 4), kraftsystemet (kapittel 5) og
|
||||
kontantstrømmen med netto nåverdi for Norge (kapittel 6), og innlesing av parameterne og trekningene.
|
||||
Bedriftsøkonomien, eierformene, skala, miljø og dommene er ikke kodet ennå.
|
||||
- `data/trekninger.npy`: de 10 000 trekningene av parameterne, laget med fast frø. `data/trekninger.json` sier hva
|
||||
kolonnene er.
|
||||
kolonnene er. `data/aarshendelser.npy` er en egen strøm av tilfeldige tall for eksportregelen, ett tall per
|
||||
trekning og år.
|
||||
- `tests/`: testene. `tests/test_fasit.py` holder koden mot fire publiserte beregninger (Argonne, NOU 2026: 4,
|
||||
Epoch og NVE). Der koden ikke treffer innenfor 5 %, står avviket åpent i testen og i fagfelleloggen.
|
||||
Utbyggingen og kontantstrømmen er testet på oppdiktede tall, ikke på de frosne parameterne.
|
||||
|
||||
## Kjøre testene
|
||||
Krever Python 3.11 eller nyere.
|
||||
|
|
@ -33,9 +36,10 @@ python3 -m venv .venv
|
|||
.venv/bin/pip install -r requirements-dev.txt
|
||||
.venv/bin/pytest
|
||||
PYTHONPATH=src .venv/bin/python -m tokenfabrikker.trekninger kontroll
|
||||
PYTHONPATH=src .venv/bin/python -m tokenfabrikker.hendelser kontroll
|
||||
```
|
||||
|
||||
Den siste kommandoen lager trekningene på nytt og sier om de er like de lagrede.
|
||||
De to siste kommandoene lager trekningene og strømmen for eksportregelen på nytt og sier om de er like de lagrede.
|
||||
|
||||
Ideen om et eget kjernekraftverk for hvert datasenter er inspirert av Sadhguru, som ikke er kilde for noe tall eller noen påstand her.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue