All ten waste types are eligible for combustion#33
Open
HughRunyan wants to merge 3 commits into
Open
Conversation
Add metal, glass, and other to every combustion-eligibility set so all 10 waste types can be combusted (incinerated). The model computes methane only, so combustion simply diverts mass from the landfill -- combusted mass produces no methane -- and there is no reason to hold the three inert types out of that diversion. Eligibility sets updated: - city_params.py: all 5 live combustion sets (City.__init__ default, load_csv_new, import_basics, and the two import_basics_site paths) - config.py: combustion_components template - dst_allocation.py: DEFAULT_ELIGIBILITY mirror The min-cost-max-flow allocator is unchanged; only the combustion eligibility set it reads is widened. dst_allocation.py's spare_combustibles two-tier cost now degrades to a documented no-op (no non-combustible types remain to spare, and the combustion remainder no longer depends on the 3-treatment allocation). Tests/harness updated for the new semantics (a metal-only city can now combust): test_dst_allocation.py, test_mass_checker_integration.py, dst_allocation_prototype.py. Adds changelog/2026-07.md. Model-output change (not breaking): the combustion composition renormalizes over 10 types and the incineration remainder grows to the full post-diversion leftover. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Expands combustion (incineration) eligibility from 7 to all 10 waste types (adding metal, glass, other) across the City parameter construction paths and DST allocation defaults, aligning the methane-only model with combustion as a pure landfill-diversion mass flow.
Changes:
- Widened combustion eligibility sets in
city_params.py,config.py, anddst_allocation.py(and mirrored in the prototype harness). - Updated unit/integration tests and prototype scenarios to reflect that metal-only (etc.) waste streams can now combust.
- Added July 2026 changelog entry documenting the model-output change and allocator note.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_mass_checker_integration.py | Updates test eligibility map so combustion includes metal/glass/other. |
| tests/test_dst_allocation.py | Adjusts feasibility test to expect combustion to be feasible for a metal-only city. |
| SWEET_python/dst_allocation.py | Updates DEFAULT_ELIGIBILITY combustion set and documents that spare_combustibles becomes a no-op under universal combustibility. |
| SWEET_python/config.py | Updates combustion_components template to include all 10 waste types. |
| SWEET_python/city_params.py | Updates all live City construction paths’ combustion eligibility sets to include metal/glass/other. |
| dst_allocation_prototype.py | Mirrors eligibility expansion and updates curated combustion scenario. |
| changelog/README.md | Adds July 2026 entry link/summary. |
| changelog/2026-07.md | New changelog entry describing the behavior/model-output change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## Changed | ||
| - Combustion (incineration) is now eligible for **all ten** waste types. Added `metal`, `glass`, and `other` to every combustion-eligibility set: the five live definitions in `city_params.py` (the `City.__init__` default plus the `load_csv_new`, `import_basics`, and two `import_basics_site` construction paths), the `params` template in `config.py`, and the `DEFAULT_ELIGIBILITY` mirror in `dst_allocation.py`. Previously combustion was restricted to seven types (food, green, wood, paper_cardboard, textiles, plastic, rubber), which modeled metal/glass/other as inert and recycling-only. Since the model is methane-only, combustion just removes mass from the landfill (combusted mass generates no methane), so this widens a mass-flow pathway rather than adding an emissions pathway. **Model-output change:** the per-type combustion composition now renormalizes over ten types (the existing types' shares drop and metal/glass/other pick up a share), and the leftover-combustible remainder available to the incineration slider grows to the full leftover after compost/anaerobic/recycling. ([#33](https://github.com/RMI/SWEET_python/pull/33)) | ||
| - Documented that `dst_allocation.py`'s `spare_combustibles` two-tier cost degrades to a no-op under universal combustion eligibility: with no non-combustible types left, there is nothing to steer the other treatments onto and the combustion remainder (`total − compost − anaerobic − recycling`) no longer depends on the allocation. The mechanism is retained for the general case. Verified with a 40k-case fuzz sweep (identical feasibility and allocation with the penalty on vs. off). ([#33](https://github.com/RMI/SWEET_python/pull/33)) |
Address Copilot review on PR #33. The "40k-case fuzz sweep" cited for the spare_combustibles no-op refers to an ad-hoc penalty-on-vs-off run that isn't part of the committed harness, and it reads as inconsistent with the ~400k solver-vs-oracle harness documented elsewhere. Keep the verified claim, drop the specific count. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Purpose
The model restricted combustion (incineration) to 7 of 10 waste types, holding out metal, glass, and other as inert / recycling-only. Because the model computes methane only (no combustion CO₂), combustion is purely a mass-flow diversion — combusted mass simply leaves the landfill and produces no methane — so there is no reason to hold the three inert types out. This makes all ten waste types combustion-eligible.
This also better reflects real-world waste-to-energy practice: mixed residual waste (metal and glass included) enters the furnace, and inert material is recovered from bottom ash afterward rather than separated beforehand.
What changed
metal,glass,otherto every combustion-eligibility set:city_params.py— all 5 live definitions (City.__init__default,load_csv_new,import_basics, and the twoimport_basics_sitepaths)config.py— thecombustion_componentstemplatedst_allocation.py— theDEFAULT_ELIGIBILITYmirrorspare_combustiblesdegrades to a no-op under universal eligibility (no non-combustible types left to steer onto, and the combustion remainder no longer depends on the allocation). Kept for the general case.changelog/2026-07.md.Model-output change (not breaking)
Labeled
model-output-change. For a given incineration level, the combusted composition now renormalizes over ten types (existing types' shares drop; metal/glass/other pick up a share) and the incineration remainder grows to the full post-diversion leftover. No API or data-contract changes — nothing stops running.Testing / Definition of Done
pytest tests/— 86 passedpython dst_allocation_prototype.py— 400k-case fuzz + curated scenarios: 0 feasibility mismatches, 0 invalid allocations, 0 crashesCitywith metal/glass/other waste now assigns those types a real share of the combustion composition (was 0% before)Acceptance criteria
changelog/2026-07.mdaddedCompanion PR (backend incineration columns + DST frontend): RMI/WasteMAP#716