Skip to content

All ten waste types are eligible for combustion#33

Open
HughRunyan wants to merge 3 commits into
mainfrom
all-waste-types-combustible
Open

All ten waste types are eligible for combustion#33
HughRunyan wants to merge 3 commits into
mainfrom
all-waste-types-combustible

Conversation

@HughRunyan

@HughRunyan HughRunyan commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added metal, glass, other to every combustion-eligibility set:
    • city_params.py — all 5 live definitions (City.__init__ default, load_csv_new, import_basics, and the two import_basics_site paths)
    • config.py — the combustion_components template
    • dst_allocation.py — the DEFAULT_ELIGIBILITY mirror
  • The min-cost-max-flow allocator itself is unchanged; only the combustion eligibility set it reads is widened. Documented that spare_combustibles degrades 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.
  • Updated the unit tests and the standalone validation harness for the new semantics (a metal-only city can now combust).
  • Added 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 passed
  • python dst_allocation_prototype.py — 400k-case fuzz + curated scenarios: 0 feasibility mismatches, 0 invalid allocations, 0 crashes
  • ✅ Smoke test: a City with metal/glass/other waste now assigns those types a real share of the combustion composition (was 0% before)
  • ✅ Changelog updated

Acceptance criteria

  • All 10 waste types are combustion-eligible on every construction path
  • Allocator remains correct: feasibility unchanged for compost/anaerobic/recycling; combustion remainder correctly widened
  • Tests + validation harness updated and green
  • changelog/2026-07.md added

Companion PR (backend incineration columns + DST frontend): RMI/WasteMAP#716

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]>
@HughRunyan HughRunyan added enhancement New feature or request model-output-change Changes model OUTPUT values (expected progress, not breaking); results differ from prior runs labels Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and dst_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.

Comment thread changelog/2026-07.md Outdated

## 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request model-output-change Changes model OUTPUT values (expected progress, not breaking); results differ from prior runs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants