Repository navigation
SWEET's advanced DST branch: a Custom Location can grow along a stored country trajectory - #95
Merged
HughRunyan merged 10 commits intoOct 20, 2026
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>
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>
City.dst_baseline_blank takes population_series, as load_csv_new does: the country's population by year from country_population_trajectory, which WasteMAP's map build stores. The Custom Location's waste, and its scenario's, grow along it instead of along SWEET's own table; the tonnage still comes from the population given, and the two rates a person reads stay the country's. Without it nothing changes. Handed the country's own trajectory, every country's Custom Location comes out within 5.9e-16 of before, and the 12 with fallback rates exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from
adst-population-trajectories
to
am-waste-flow
October 20, 2026 16:29
There was a problem hiding this comment.
🟡 Changes recommended
Other-landfill routing rejects valid empty scenario timelines and permits negative waste allocations.
2 open issues
What changed in this PR
Adds stored population trajectories to SWEET’s advanced DST branch so Custom Locations can follow WasteMAP’s stored country growth.
Changes:
- Adds trajectory helpers and optional stored-population inputs.
- Routes leftover city waste to optional “other landfills.”
- Adds regression tests and changelog documentation.
| File | Description |
|---|---|
| tests/test_population_trajectory.py | Tests stored trajectories and Custom Location growth. |
| tests/test_adst_city_other_landfills.py | Tests leftover routing and request validation. |
| SWEET_python/city_params.py | Adds trajectory helpers and stored-population support. |
| SWEET_python/advanced_dst_city.py | Adds other-landfill routing across entry points. |
| changelog/2026-10.md | Documents trajectory and landfill-routing features. |
Review effort: Balanced
HughRunyan
deleted the
adst-custom-location-grows-along-stored-country
branch
October 20, 2026 18:29
2 tasks done
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.

Stacked on #92. Merge #92 first; this PR then targets
adst-city-routes-the-rest-to-other-landfills(or wherever #92 lands).The same change as #94, cherry-picked onto SWEET's advanced DST branch:
City.dst_baseline_blanktakespopulation_series, the country's stored population by year, and grows a Custom Location along it instead of SWEET's own table. Without the argument nothing changes.WasteMAP's ADST branch (RMI/WasteMAP#891) needs it because its
_custom_locationnow passes the stored country row, the same row the advanced DST's prefill already serves a Custom Location (adst_population_trajectory.for_country). So the two tools grow a Custom Location along one stored row.Numbers: 250 countries checked; 12 fallback-rate places bit-identical, the other 238 within 5.9e-16.
Acceptance criteria
Definition of Done
Acceptance criteria met · tests pass · changelog updated · reviewed & merged.
🤖 Generated with Claude Code