Repository navigation
SWEET's advanced DST branch can take a stored population trajectory - #92
Merged
Merged
Conversation
AdvancedDSTCityRequest gains other_landfills: one landfill spec with no open or close years and no gate total. Each year it takes 1 minus the shares of the listed landfills open that year, so a caller can state the sites it knows and leave the rest, without balancing the shares to 1. A listed landfill's share in years it is shut goes there too, instead of being spread over the open ones, and a year claiming more than 1 is scaled down rather than refused. landfills may now be empty. Every entry point first lists other landfills as one more landfill (_with_other_landfills), so a run with them is the same run, bit for bit, as one listing that landfill at the leftover share. Requests without the field are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o SWEET city_population_trajectory and country_population_trajectory give a city's or a country's population in every model year, with what its shape comes from, and load_csv_new takes a stored trajectory as population_series. WasteMAP's map build stores them so its city DST grows a city the way the build did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er-landfills' into adst-population-trajectories # Conflicts: # changelog/2026-10.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified; existing defaults are preserved and focused regression coverage accompanies the changes.
No open issues 🎉
What changed in this PR
Adds stored population trajectories to SWEET’s advanced DST branch, allowing WasteMAP to reuse population growth curves without changing default behavior.
Changes:
- Adds city and country trajectory helpers and optional
population_seriesloading. - Adds regression tests for trajectory generation and reuse.
- Documents the feature and numerical precision.
| File | Description |
|---|---|
| tests/test_population_trajectory.py | Tests trajectory shapes, fallbacks, and loader integration. |
| SWEET_python/city_params.py | Adds trajectory helpers, stored-series support, and shared fallback constants. |
| changelog/2026-10.md | Documents stored trajectories and related PRs. |
Review effort: Balanced
Rounding to whole people bent the curve of the few places WPP interpolates (Svalbard and Jan Mayen: 2,591.78 people in 2022, the 1975/2022 ratio off by 0.03%), so a Custom Location there would not grow as dst_baseline_blank does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
2 tasks done
Base automatically changed from
adst-city-routes-the-rest-to-other-landfills
to
am-waste-flow
October 20, 2026 16:26
…ion-trajectories # Conflicts: # SWEET_python/advanced_dst_city.py # changelog/2026-10.md # tests/test_adst_city_other_landfills.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Output
The same change as #91 (into
main), for SWEET's advanced DST branch. It is one cherry-picked commit plus its changelog links:city_population_trajectoryandcountry_population_trajectorygive a city's or a country's population in people for every model year, and what the shape comes from ("UN city rates","country curve","country fallback rates").load_csv_new(..., population_series=)grows a city along a stored trajectory.Why
WasteMAP's advanced DST now grows a city's waste along the same stored trajectory the city DST uses. Its city prefill serves the trajectory, and the API passes it to
load_csv_new. WasteMAP'sam-waste-flowbuilds with this branch of SWEET, so the API there needs these functions. The WasteMAP PR that uses it pins this branch until this merges.Numbers
No number moves in SWEET: nothing calls the new argument by default. See #91 for why a stored trajectory reproduces SWEET's own growth to ~1e-15 rather than to the bit.
Acceptance criteria
main→am-waste-flowcatch-up merges cleanly.pytest -m "not integration": 604 passed on this branch (with The city-level advanced DST sends waste no listed landfill takes to other landfills #90).Definition of Done
Acceptance criteria met · tests pass · changelog updated · #90 merged first · reviewed & merged.
🤖 Generated with Claude Code