Skip to content

Add no cyclic routing mode#274

Merged
toruseo merged 8 commits intomainfrom
develop
Mar 27, 2026
Merged

Add no cyclic routing mode#274
toruseo merged 8 commits intomainfrom
develop

Conversation

@toruseo
Copy link
Copy Markdown
Owner

@toruseo toruseo commented Mar 27, 2026

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

Copilot AI review requested due to automatic review settings March 27, 2026 03:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread tests/test_verification_route_choice.py
Comment thread README.md
Comment thread uxsim/uxsim.py
Comment thread uxsim/uxsim.py
Comment thread uxsim/uxsim.py Outdated
Comment thread tests/test_verification_route_choice.py Outdated
Comment thread tests/test_verification_route_choice.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@toruseo toruseo enabled auto-merge March 27, 2026 03:21
@toruseo toruseo disabled auto-merge March 27, 2026 03:25
@toruseo toruseo enabled auto-merge March 27, 2026 03:26
@toruseo toruseo merged commit 5aad1bb into main Mar 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants