tokenfabrikker/CHANGELOG.md
Kjell Tore Guttormsen ea26cd4226
feat(trekninger): read parameter file 1.1 and store the new draws
The loader knows the new checksum and the units of the new quantities
(g CO2 per kWh, cubic metres per MWh). 10 000 draws of 91 quantities with the
same seed; the four new ones are the last columns. All columns have new
numbers, because the random numbers are laid out row by row. The stream for
yearly events is byte for byte the same; only its description records the new
checksum. Tests for the counts, the new quantities and the checksum in the
pre-registration. README, CHANGELOG and CLAUDE.md updated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 23:07:09 +01:00

78 lines
7.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Changelog
All notable changes to this project will be documented in this file.
## Unreleased
- Pre-registration of what is tested and what it takes for the hypothesis to hold (`FORHANDSREGISTRERING.md`).
- Source bank: 948 entries in 21 areas, each checked against its primary source (`kilder/`). The second round
(areas 13–21) covers the parameters that lacked a source when the model was specified.
- Model specification, draft 3 (47 equations), after a pre-read of draft 2, two independent reviews of draft 3
and a control of the corrections (`modell/`).
- Parameters frozen before anything is computed: 124 parameters in 2025 kroner, one distribution each, with the
source entries they rest on (`modell/parametere.json`). The checksum is recorded in the pre-registration.
No code and no results yet.
- Eight clarifications of the pre-registered criteria, approved by the project owner after the parameter freeze
and before anything is computed (`FORHANDSREGISTRERING.md`, «Presiseringer»). The parameter file is unchanged.
- First code (`src/tokenfabrikker/`): one function per equation for the power plant, the data centre and the
revenue (S1–S21, S36, S43–S47), a strict reader for the frozen parameter file with unit conversion, and the
10 000 Monte Carlo draws stored in `data/`. Python with pinned numpy and scipy, pytest, ruff `ALL` and mypy strict.
No result for the hypothesis has been computed.
- An independent reader coded the key equations from the specification alone. The two implementations agree on
all 23 functions. The 19 ambiguities the reader found are settled in a new, dated chapter 16 of the
specification (`modell/`); the parameter file and the pre-registration are unchanged.
- 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.
- Business economics, ownership, scale, environment and verdicts in code (`nivaaisert.py`, `eierskap.py`,
`skala.py`, `miljo.py`, `dommer.py`; S15, S19, S27 to S32, S37, S42), tested on made-up numbers only. A third
independent reader coded the same chapters from the specification alone and found 60 points, 14 of them
objections to the economics; a new reader then recoded from the clarifications in four more rounds (17, 5, 1
and 0 new points). The readings stand in clarifications 41–61 in chapter 16; the two implementations agree on
1 000 made-up paths. Corrected after the readers: the accident cost stays when the additionality rule binds,
tax depreciation loses real value with price growth, and the special tax only meets return above the cost of
capital. Weaknesses in the comparison of ownership forms that are not corrected are listed in clarification 61
and put to the project owner (`modell/fagfellevurdering-utkast-2-og-3.md`, part 6). No result for the
hypothesis has been computed.
- The comparison of ownership forms corrected before anything is computed (clarifications 62–67 in chapter 16):
a residual value at the final year as a taxable sale, the electricity tax as the state's only levy with what
displaced private data centres would have paid deducted, private owners who pay what their share is worth in
expectation, the state's cash flow valued with the required return for compute, and the cost of capital before
tax. An independent reader coded the corrections from the text alone in three rounds; its first-round finding
that the private owners and the state were priced with different rates changed the correction. With it every
ownership form has the same expected value in the main run, and they differ in risk and capital. The two
implementations agree to within one krone on 1 500 made-up paths. The project owner approved the corrections
before anything is computed.
- The direction of the project extended by the project owner (what can start quickly, a stepwise build-up, and
compute on the users' own machines), and four more clarifications of the pre-registered criteria (9–12), all
before anything is computed (`FORHANDSREGISTRERING.md`). The sources' figures for the emissions test M5 (i)
are set up and checked against the primary sources (clarification 68). The parameter file is unchanged.
- Source bank extended with areas 22–26 for the addition to the direction (188 entries: fast start on the grid,
power with short lead time, stepwise build-up, compute on the users' own machines, avoided emissions and
cooling water), each checked against its primary source by an independent controller (`kilder/`).
- The addition to the direction written into the specification as chapter 17 (equations S48–S54) and into the
pre-registration, before anything is computed: a new solution T, "stepwise", in two versions (modules of
100 MW on the grid with new renewable power, and the same with grid-connected nuclear power from when it can
come), which A must also beat; no gas power; a threshold and two labelled scenarios for compute on the users'
own machines; the calculation of emissions with a deduction; cooling water; and a timeline of megawatts in
operation per solution. An independent reader coded the chapter from the text alone in three rounds; its findings
changed the chip rule and the condition for nuclear power in the second version, the cap on early grid
connections and the lead time. The parameter file is unchanged; the new quantities are candidates until the
deviation from the freeze.
- One deviation from the parameter freeze, before anything is computed (`modell/parametere.json` version 1.1,
new checksum in the pre-registration): thirteen new quantities for the addition to the direction, seven new
sensitivities and three corrected lines in the list of sensitivities. None of the 124 frozen parameters got a
new value, range or distribution. 137 parameters, 91 drawn quantities, new draws in `data/`. Before the
deviation the project itself looked up the 30 source entries behind the new quantities in the primary
sources; four things changed from the candidates (see chapter 17.8 of the specification).