Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “no cyclic routing” mode to UXsim’s route choice so vehicles preferentially avoid revisiting nodes/links, addressing cyclic-route frequency concerns raised in issue #272.
Changes:
- Introduces
World(..., no_cyclic_routing=True)and applies node revisit-avoidance during next-link selection. - Adds a verification test intended to detect repeated/symmetric link traversals under this mode.
- Updates README and bumps the “run examples” CI matrix Python version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
uxsim/uxsim.py |
Adds no_cyclic_routing flag, applies avoidance logic in route_next_link_choice, and documents the new option. |
tests/test_verification_route_choice.py |
Adds a new verification test for the no-cyclic routing behavior on a generated grid network. |
README.md |
Adds documentation badge and updates feature bullets. |
.github/workflows/run-examples.yml |
Updates the Python version matrix used when running example-based tests. |
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.
With
W = World(..., no_cyclic_routing=True), vehicles try to avoid traveling the same link or node twice to avoid unrealistic cyclic routes.This addresses #272