Every S-number of the specification points to the functions named after it and, where it is put together over the years or the draws, to the functions that do so. A test holds the stored map against the code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
19 KiB
19 KiB
Kart fra ligning til funksjon
Kartet viser, for hvert S-nummer i spesifikasjonen (modell/spesifikasjon.md), funksjonene i koden som regner ligningen: først funksjonene som har nummeret i navnet (s9_…), så funksjonene som setter nummeret sammen over årene eller over trekningene, etter lista SAMMENSATT i src/tokenfabrikker/kart.py (avklaring 131).
Fila er laget av koden og rettes ikke for hånd. PYTHONPATH=src .venv/bin/python -m tokenfabrikker.kart lag skriver den, og PYTHONPATH=src .venv/bin/python -m tokenfabrikker.kart kontroll sier om den er lik den koden lager. Beskrivelsen er første linje av funksjonens egen dokumentasjon, på engelsk som i koden.
54 ligninger, 98 funksjoner med nummeret i navnet og 47 oppføringer for funksjoner som setter sammen.
| Ligning | Funksjon | Slag | Første linje av beskrivelsen |
|---|---|---|---|
| S1 | ligninger.s1_crf |
ligning | S1: capital recovery factor, per year. CRF(0, L) = 1/L. |
| S2 | ligninger.s2_laeringseksponentligninger.s2_investering_per_mw |
ligning ligning |
S2: b = -log2(1 - ell). ell is the learning rate per doubling and may be negative.S2: overnight investment per MW for unit number n of the Norwegian series, kr/MW. |
| S3 | ligninger.s3_byggetidsfaktorligninger.s3_investering_med_renter |
ligning ligning |
S3: interest during construction as a factor on the overnight cost. S3: levelised-form investment for one unit, with interest during construction, kr. |
| S4 | ligninger.s4_kapasitetsfaktorligninger.s4_kapasitetsfaktor_smaa_enheterligninger.s4_energi_kjernekraft |
ligning ligning ligning |
S4 (text): the drawn capacity factor, capped at (1 - o_p)(1 - o_f). S4 (text): capacity factor for small units on the grid (B'), KF (1 - o_f^A)/(1 - o_f). S4: yearly production of a plant with N_u units of P_u MW, MWh per year. |
| S5 | ligninger.s5_fast_driftligninger.s5_lcoe_kjernekraft |
ligning ligning |
S5: fixed operation per MW for a unit of P_u MW, f_N (P_u/P_ref)^nu_f, kr/MW per year.S5: cost per MWh for a grid-connected plant with identical units, kr/MWh. |
| S6 | ligninger.s6_ulykkeskostnad_per_hendelseligninger.s6_ulykkeskostnad |
ligning ligning |
S6: K_U(P_u) = K_U min(1, P_u/P_ref), kr per event. K_U in kr (the file's mrd. kr).S6: expected accident cost not covered by insurance, kr/MWh. |
| S7 | ligninger.s7_enhetsstorrelseligninger.s7_enheter_som_maa_gaa |
ligning ligning |
S7: unit size and number of units that must run in solution A. S7: m = ceil(PUE * P_IT / P_u), the units that must run for a given unit size. |
| S8 | ligninger.s8_planlagt_uteligninger.s8_uavhengig_utfallsrateligninger.s8_tilgjengelighetligninger.s8_reserveenheterligninger.s8_antall_enheter |
ligning ligning ligning ligning ligning |
S8: n_p, the smallest whole x (zero allowed) with x >= (m + r + x) o_p. S8: o' = (1 - beta_F) o_f^A, the part of forced outage that hits units one by one. S8: A_uavh(m, r), the probability that at least m of m + r units run.S8: r, the smallest number of reserve units with A_uavh(m, r) >= A_krav. S8: N_u = m + r + n_p, all units in the plant. |
| S9 | ligninger.s9_kraftkostnad_dedikert |
ligning | S9: cost per MWh delivered to the data centre in solution A, kr/MWh. |
| S10 | ligninger.s10_energi_datasenter |
ligning | S10: E_D = 8760 * lam * PUE * P_IT, yearly energy to the data centre, MWh per year. |
| S11 | ligninger.s11_nettkostnadligninger.s11_kraftkostnad_nett |
ligning ligning |
S11: H_a, yearly cost of new grid capacity for one facility, kr/year. S11: cost per MWh to the data centre in a grid solution (B, B', C, R), kr/MWh. |
| S12 | ligninger.s33_tidligste_tidspunkt_nettligninger.s39_portefolje_Cligninger.s39_torraarsenergi_av_taktutbygging.kraftrom_fornybarkontantstrom.lag_plan |
setter sammen setter sammen setter sammen setter sammen setter sammen |
S33 and S12 (C, R): T_0 + tau_nett, a point in time, not yet a year. S39 and S12 (C): the portfolio that gives E_torr MWh in a dry year.S12, S22 and S39 (C): dry-year production of E_normal MWh built in the fixed order.S22, second term accumulated from T_0 (C): facilities the renewable power has room for. The build-out of a path with N_anlegg facilities (S22, S33; chapter 17.1 for T). |
| S13 | ligninger.s13_it_kostnad |
ligning | S13: c_H(t_v) = c_H0 (1 + gamma_H)^(min(t_v, 2035) - 2025), kr per MW IT. |
| S14 | ligninger.s14_snittlast |
ligning | S14: lam = lam_0 + (1 - lam_0) mu_u. Used only in the token control (chapter 3.3). |
| S15 | ligninger.s15_lcocnivaaisert.kraftkostnad |
ligning setter sammen |
S15: yearly cost of compute per MW IT, kr per MW IT per year. The levelised cost of power and compute for the path in res. |
| S16 | ligninger.s16_inntekt |
ligning | S16: yearly revenue of one vintage, mu * Gamma * y * P_IT, kr/year. |
| S17 | ligninger.s17_kontraktspris_fra_spot |
ligning | S17: fixed yearly price equivalent to a spot path over the equipment's life. |
| S18 | ligninger.s18_pris |
ligning | S18: price of compute, y = LCOC^v (1 + pi_g), kr per MW IT per year. |
| S19 | ligninger.s19_marginnivaaisert.kraftkostnad |
ligning setter sammen |
S19: the right-hand side of the accounting identity M_a = mu Gamma y - LCOC_a. The levelised cost of power and compute for the path in res. |
| S20 | ligninger.s20_tokeninntekt |
ligning | S20: yearly revenue from selling tokens (control only), kr/year. |
| S21 | ligninger.s21_kostnad_per_token |
ligning | S21: cost per million tokens (control only), kr per million tokens. |
| S22 | ligninger.s22_reaktoreffekt_Bligninger.s22_grense_reaktorligninger.s22_grense_fornybarligninger.s22_grense_brikkerutbygging.kraftrom_reaktorutbygging.kraftrom_fornybarutbygging.utbyggingsplanutbygging.utbyggingsplan_trinnviskontantstrom.lag_plan |
ligning ligning ligning ligning setter sammen setter sammen setter sammen setter sammen setter sammen |
S22 (text): P_G^N in B, the reactor capacity one facility needs, lam PUE P_IT / KF, MW. S22, first term (A, B, B'): n_reaktor P_IT / P_G^N, MW IT per year. S22, second term (C): g w_tort / (8760 lam PUE), MW IT per year. S22, third term: s_brikker G_server - utskifting(t), MW IT per year. S22, first term accumulated from T_0: how many facilities the reactors built have room for. S22, second term accumulated from T_0 (C): facilities the renewable power has room for. S22: the year each facility starts and the vintages it gets. Chapter 17.1: the year each module of a path in solution T starts, and its vintages. The build-out of a path with N_anlegg facilities (S22, S33; chapter 17.1 for T). |
| S23 | ligninger.s23_netto_uttakligninger.s23_prisvirkningkraftsystem.kraftaarkraftsystem.relativ_prisvirkningkontantstrom.regn_program |
ligning ligning setter sammen setter sammen setter sammen |
S23: Delta Q = (1 - delta_V) Q_D - Q_G, new use from the grid minus new production, MWh. S23: Delta p_z = m_v s_v [P_z(S_0 - Delta Q) - P_z(S_0)], kr/MWh. S23, S24 and S38 for one year. S23: Delta p_z / p_z^0 per price area, in a normal year or in the dry year. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S24 | ligninger.s24_effektbalansekraftsystem.kraftaarkontantstrom.regn_program |
ligning setter sammen setter sammen |
S24: (Delta R, Delta R^-1), the capacity balance in the scarcest hour, MW. S23, S24 and S38 for one year. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S25 | ligninger.s25_velferdkontantstrom.regn_program |
ligning setter sammen |
S25: Delta W = Delta p S_0, kr per year. Delta_p for all of Norway, S_0 in MWh.S26 for one path: the yearly cash flows and the net present value for Norway. |
| S26 | ligninger.s26_diskontering_rundskrivligninger.s26_subsidieelementligninger.s26_netto_naaverdikontantstrom.regn_program |
ligning ligning ligning setter sammen |
Clarification 118 b: D_R(j), the circular's stepwise discount factor, j = t - T_0. S26: SE = max(0, -present value of the project's net cash flow), kr. S26: net present value for Norway against the zero alternative, kr. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S27 | ligninger.s27_nettariffligninger.s27_kraftkostnad_bedrift_nettligninger.s27_kraftkostnad_bedrift_dedikertligninger.s27_margin_bedriftnivaaisert.kraftkostnad |
ligning ligning ligning ligning setter sammen |
Chapter 7: the grid tariff of one facility, kr per year. Chapter 7: S11 as a business pays it, kr/MWh. Chapter 7: S9 as a business pays it, kr/MWh: the electricity tax also applies off-grid. S27: mu Gamma y - LCOC^bed per MW IT and year, kr. S27 holds when this is not negative. The levelised cost of power and compute for the path in res. |
| S28 | ligninger.s28_avskrivningligninger.s28_realverdiligninger.s28_etter_framforingligninger.s28_naaverdiligninger.s28_restverdieierskap.naaverdi_etter_skatt |
ligning ligning ligning ligning ligning setter sammen |
Chapter 7: straight-line depreciation of one asset in year t, kr.Chapter 7: what a nominal amount fixed aar years ago is worth in constant kroner.Chapter 7: the taxable amount per year when negative amounts are carried forward. S28: the present value at T_0 of yearly amounts with index t - T_0, kr. Clarification 62: what one facility is worth at the final year, kr at T_s. S28: NV_e, the project's present value after tax with the cost of capital r_e, kr. |
| S29 | ligninger.s29_kapitalkostnadligninger.s29_krav_for_skatteierskap.kapitalkostnadeierskap.krav_for_skatt |
ligning ligning setter sammen setter sammen |
S29: the cost of capital of an ownership form, real, after tax. Clarification 66: the real required return before tax, r_e / (1 - tau_s). S29: r_e, real. With direct ownership it is the state's borrowing rate as drawn. Clarification 66: the required return before tax the cost of compute is computed with. |
| S30 | ligninger.s30_skattligninger.s30_statens_kontantstromligninger.s30_private_eiereeierskap.eierresultatkjoring.regn_eierformerkjoring.eierformer_paa_trinnet |
ligning ligning ligning setter sammen setter sammen setter sammen |
S30: corporate tax and special tax per year, kr, for the project as one taxpayer. S30: the state's net cash flow in a year with ownership form e, kr. Clarification 64: the private owners' cash flow in a year, kr. S29 and S30 for one ownership form. S30 and the cost of compute per ownership form for one path in one draw. The ownership forms for each solution on the step the verdicts are read on. |
| S31 | ligninger.s31_nettobidragskala.overskudd_utover_avkastningskala.skala |
ligning setter sammen setter sammen |
S31: the yearly net contribution to Norway's income above normal return on capital, kr. S31, the sum over the facilities of Y_k - K_k^drift - ann_k per year, kr. S31 per year and M6 for the path in res. |
| S32 | ligninger.s32_utslippmiljo.utslipp_livslop |
ligning setter sammen |
S32: life-cycle emissions in one year, tonnes CO2 equivalents. S32: life-cycle emissions per year, tonnes CO2 equivalents (index t - T_0). |
| S33 | ligninger.s33_tidligste_tidspunkt_kjernekraftligninger.s33_tidligste_tidspunkt_nett |
ligning ligning |
S33 (A, B, B'): T_0 + max(tau_F, tau_reg_min + tau_N), a point in time, not yet a year. S33 and S12 (C, R): T_0 + tau_nett, a point in time, not yet a year. |
| S34 | ligninger.s34_kontantstrom_datasenterkontantstrom.regn_program |
ligning setter sammen |
S34: the data centre's cash flow in a year, kr. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S35 | ligninger.s35_kontantstrom_kraftkontantstrom.regn_program |
ligning setter sammen |
S35: the cash flow of power plant, grid and capacity in a year, kr. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S36 | ligninger.s36_bufferligninger.s36_ekstern_forsyning |
ligning ligning |
S36: P_buf = delta_L * PUE * P_IT, the buffer that covers the largest load step, MW. S36: yearly cost of external supply to the plant itself (two lines and gensets), kr/year. |
| S37 | ligninger.s37_andeldommer.andelkjoring.losningsdommer |
ligning setter sammen setter sammen |
S37: the share of the draws in which the condition of a category is met. S37 for a threshold: the share of all draws with a value at least / below vilkaar.The verdicts for one solution from its outcome in every draw (S37, clarification 100). |
| S38 | ligninger.s38_tilpass_linjeligninger.s38_prisinndata.tilpass_prislinjerkraftsystem.kraftaar |
ligning ligning setter sammen setter sammen |
S38: the least-squares line P = alpha + b S through the points. Returns (alpha, b). S38: the price at power balance S, kr/MWh.S38: one least-squares line per price area through NVE's scenarios. S23, S24 and S38 for one year. |
| S39 | ligninger.s39_enheter_Bligninger.s39_portefolje_Cligninger.s39_torraarsenergi_av_takt |
ligning ligning ligning |
S39 (B): N_u = ceil(sum of E_D / (8760 KF P_ref)), units of P_ref for the programme. S39 and S12 (C): the portfolio that gives E_torr MWh in a dry year.S12, S22 and S39 (C): dry-year production of E_normal MWh built in the fixed order. |
| S40 | ligninger.s40_restverdiligninger.s40_restverdi_rundskrivkontantstrom.regn_program |
ligning ligning setter sammen |
S40: residual value of one facility after the final year, kr in present value at T_0. Clarification 118 b: S40 with the circular's rate, kr in present value at T_0. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S41 | ligninger.s41_programkostnad |
ligning | S41: K_prog per year for T_0 < t <= t_1, kr per year (A, B and B', once per programme). |
| S42 | ligninger.s42_naaverdivektet_marginnivaaisert.kraftkostnad |
ligning setter sammen |
S42: the margins of S27 for every vintage of the path, weighted by D_D(t_v), kr. The levelised cost of power and compute for the path in res. |
| S43 | ligninger.s43_knapphetspaaslagligninger.s43_avtakende_paaslag |
ligning ligning |
S43: pi_0 = y_obs / LCOC^v(2025) - 1, set to zero when negative. Clarification 120, line 13: pi(t_v) = pi_0 exp(-(t_v - 2026) / tau_pi), for every vintage. |
| S44 | ligninger.s44_inntektsfaktorligninger.s44_tilgjengelighetligninger.s44_inntektsfaktor_trinn |
ligning ligning ligning |
S44: revenue factor Gamma = (1 - beta_F o_f^A) E[min(X, m)] / m. Clarification 119 c: the probability that at least m units run, A.Clarification 119 c: Gamma as the step of the table Gamma_trinn for the availability A. |
| S45 | ligninger.s45_tilleggsfaktorligninger.s45_los_tilleggsfaktorkontantstrom.regn_program |
ligning ligning setter sammen |
S45: varsigma_i = min(1, present value of costs / present value of sales revenue). S45 by iteration (clarifications 12 and 22): varsigma_i for one technology. S26 for one path: the yearly cash flows and the net present value for Norway. |
| S46 | ligninger.s46_overskridelsesfaktor |
ligning | S46: xi_N = 1 + o_xi when u_xi < w_xi (the budget reading), otherwise 1. |
| S47 | ligninger.s47_effektkostnadligninger.s47_utkoblingligninger.s47_utfall_ut_over_dimensjonerende_feil |
ligning ligning ligning |
S47: F_a, yearly cost of the capacity a grid solution lacks, kr/year, whole programme. S47, second arm: the revenue lost when the data centres disconnect in the scarce hours. Clarification 121, line 21: Delta R^-1' = Delta R - max(0, max_i kappa_i P_u,i - P_dim,0). |
| S48 | ligninger.s48_tidligste_tidspunkt_trinnvisligninger.s48_nettsaldo |
ligning ligning |
S48 (T): T_0 + max(min(tau_1, tau_nett), 1 + tau_D), a point in time, not yet a year. Text under S48: the grid balance at the start of a year in the first stage, MW of draw. |
| S49 | ligninger.s49_kjernekraft_bygges |
ligning | S49 (T-K): True when what is left of the path needs at least one whole unit. |
| S50 | ligninger.s50_regnekraft_i_driftutbygging.tidslinjekjoring.tidslinje_over_trekningene |
ligning setter sammen setter sammen |
S50: MW IT in operation in one year on power of type x.S50 for one path: MW IT in operation per type of power, for each year T_0 + 1 .. T_s. S50 over the draws for one solution on one step (chapter 17.2, clarification 99). |
| S51 | ligninger.s51_bortfallligninger.s51_bortfall_egne_maskinerligninger.s51_etterspoerselsfaktor |
ligning ligning ligning |
17.3: the loss of demand for vintage t_v in a scenario.17.3, the scenario "80 % on the users' own machines": s_flytt (1 - s_trening). S51: mu_d = max(0, 1 - eps_d d), the factor on the share of capacity sold. |
| S52 | ligninger.s52_bortfallsterskelkjoring.pristerskel_for_losningterskler.pristerskel |
ligning setter sammen setter sammen |
S52: d* = min(1, max(0, (1 - k_a) / eps_d)), the loss that gives median NPV zero. The price threshold k of chapter 3.2 for one solution on one step (clarification 105). The lowest factor k >= 0 with f(k) >= 0, for a function that does not fall with k. |
| S53 | ligninger.s53_unngaatt_utslippligninger.s53_utslipp_med_fradragmiljo.unngaatt_utslippmiljo.utslipp_med_fradrag |
ligning ligning setter sammen setter sammen |
S53, one facility or module with a vintage in operation: avoided emissions, tonnes per year. S53: U_med = U_liv - U_unngaatt, tonnes; shown next to the main figure, never judged. S53: the emissions the same compute would have had elsewhere, tonnes per year. S53: U_med = U_liv - U_unngaatt per year, tonnes; never part of M5 or any verdict. |
| S54 | ligninger.s54_it_energiligninger.s54_kjolevannmiljo.it_energimiljo.vannmengdemiljo.kjolevann |
ligning ligning setter sammen setter sammen setter sammen |
S54: 8760 lam P, the IT energy of facilities and modules with a vintage in operation, MWh. S54: w_D E_IT + w_N E_N, cubic metres of cooling water in one year. S54: E_IT per year, 8760 lam P_k over facilities and modules with a vintage in operation. S54 with the factors given: w_D E_IT + w_N E_N per year, cubic metres. S54 with the main figures: sea water in once-through cooling for nuclear power. |