Skip to content

Add test to ensure diversity in IsoFuelPopulation fallback#127

Open
shreyadesai20042009 wants to merge 2 commits into52North:mainfrom
shreyadesai20042009:test-isofuel-population-diversity
Open

Add test to ensure diversity in IsoFuelPopulation fallback#127
shreyadesai20042009 wants to merge 2 commits into52North:mainfrom
shreyadesai20042009:test-isofuel-population-diversity

Conversation

@shreyadesai20042009
Copy link

What this PR does

This PR adds a regression test for IsoFuelPopulation.generate
to cover the fallback behavior when the patcher returns fewer
routes than requested.

Why this is needed

Previously, when insufficient routes were generated, the fallback
logic cloned the last route repeatedly, resulting in an initial
population with identical individuals.

This test:

  • Verifies the population size is preserved
  • Ensures fallback routes are not identical clones
  • Fails with the old cloning behavior
  • Passes once diversity-preserving fallback logic is applied

Scope

  • Tests only (no production code changes)
  • Protects against future regressions

@shreyadesai20042009
Copy link
Author

This PR adds tests only.
CI is awaiting maintainer approval to run on the fork.
Happy to make any adjustments if needed.

@kdemmich
Copy link
Collaborator

kdemmich commented Feb 2, 2026

Hi @shreyadesai20042009, thank you for your PR. We appreciate the time and effort that was put into it but, unfortunately, the description does not follow our PR template. We will not evaluate PRs that do not follow our PR template.

@kdemmich kdemmich added the question Further information is requested label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants