Repository navigation
Description
These macro-side changes follow from the DEFINE-UK review in PolicyEngine/define-uk-model#15. Nothing in this repo was edited. Line references are to the current main checkout.
1. Adapter: two scenarios are now refused, and the error message misleads
define-uk-model#15 makes define_uk.scenarios.run_scenario raise StockFlowInconsistent for the two cached solves that break stock-flow consistency. In both, sectoral net lending does not sum to zero:
fossil_fuel_ban__no_forward_guidance: 2035Q3 and 2036Q1, |LEND| up to 74.56fossil_fuel_ban__unexpected_enforcement: 2033Q1, 14.63
StockFlowInconsistent subclasses ValueError. integration/src/policyengine_macro/core.py:4286 catches (KeyError, ValueError) and replies "Unknown DEFINE-UK scenario … run define-scenarios to list the valid names". But both names are in that list. The fix is to catch StockFlowInconsistent first, return available: False with the adapter's message ("the cached solve is not stock-flow consistent"), and not suggest the listing tool.
2. Show the units the adapter now returns
Each run_scenario variable now carries a units string (define-uk-model#15, commit 6ffdd56):
- EMIS deltas are MtCO2e per quarter (×4 for per year).
- A UPLOT
delta_pctis % of the rate; the pp change is indelta_level.
pe-macro define-scenario (integration/src/policyengine_macro/cli.py, the DEFINE table) prints bare numbers, so an EMIS delta read as annual is 4× too small. Add the units column, or convert EMIS to per year with an explicit label.
3. Site text that repeats withdrawn claims
| File | Now | Change |
|---|---|---|
define/methodology/index.html:223 |
"DEFINE-UK 1.78 (our computation)" | "GPI multiplier 1.78, cumulative to 2040 (our computation)". "DEFINE-UK 1.78" reads as a model version |
define/methodology/index.html:225-227 |
Bar spanning 1.1–1.5, "short-horizon published multipliers" | Delete it: that is the withdrawn IMF/"Batini et al. 2021" range |
define/validation/index.html:279 |
"Not comparable to IMF 1.1–1.5, OBR ≈1.0" | Keep only OBR ≈1.0 |
define/validation/index.html:285-291, :396 |
"social benefits fall … upper-leaning" | Withdrawn: in the cached run SOCB rises (+8.0) and 77% of ΔSPEND_GVT is SPEND_GVTPS; the direction of the bias is not established |
reports/define-uk-replication/index.html:304-311,317-319 |
Same "upper-leaning" and "ΔGCF_GVTG is the clean comparison" text | Same correction |
papers/define-uk/sections/calibration.tex:43, limitations.tex:14 |
Denominator = OCONS+SOCB+GCF, "bias it upward" | Same correction; rebuild the paper |
define/validation/index.html:87-88 and :205-206 |
4.66% vs 1.31% stated in a tile and the table | Keep the table row (it has the source); link the tile to it |
4. Pending decision that will change a published number
PolicyEngine/define-uk-model#16 asks which impulse definition the GPI multiplier uses. The options are 1.78 (published) and the recommended 2.30 (power-sector spending only). If it changes, every 1.78 above changes with it, so batch items 3 and 4 if #16 is decided first.
🤖 Generated with Claude Code
Activity
vahid-ahmadi commentedon Nov 6, 2026
Correction to section 3: the line numbers above came from a working checkout. On
maintoday the text is atdefine/methodology/index.html:231("DEFINE-UK 1.78 (our computation)"),define/validation/index.html:230-233("social benefits fall … upper-leaning"),reports/define-uk-replication/index.html:311-318andpapers/define-uk/sections/calibration.tex:43. The redesign branchvahid/redesign-r2-integrate(PR #200) already rewords the validation and report passages, so section 3 may be partly covered once #200 lands. Sections 1 and 2 (the adapter and the CLI) are not covered by #200.🤖 Generated with Claude Code
vahid-ahmadi commentedon Nov 25, 2026
Closing: all four sections are resolved on main (checked at 7cce161 against define-uk-model
283f92a).core.pycatchesStockFlowInconsistentand reports the scenario as refused, not unknown.pe-macro define-scenarioprints aunitscolumn. On the site, emissions are labelled per year and unemployment in pp./define/validation#calibration; the overview tile and the scorecard row link to it). The paper sections followed in 81610c1./models/comparecites it that way as a short-horizon comparator. The rows in this issue that ask for its removal are superseded.#286 fixes what this check found left over: four pages compared the clean-room 1.52 with the full-run 2.30 where the model now compares it with 2.25; the cumulative figures had no units; and #15's merge date read 6 Nov (it merged on 10 Nov).
🤖 Generated with Claude Code