Skip to content

Warn about invalid arrivalPos on single-edge routes - #18425

Open
NearCai wants to merge 6 commits into
eclipse-sumo:mainfrom
NearCai:pr/single-edge-arrivalpos
Open

NearCai wants to merge 6 commits into
eclipse-sumo:mainfrom
NearCai:pr/single-edge-arrivalpos

Conversation

@NearCai

@NearCai NearCai commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #5928.

For a route consisting of a single edge, an explicit arrivalPos that is not greater
than an explicit departPos cannot be reached (the vehicle would have to drive
backwards). This adds a warning at load time:

Warning: Vehicle 'v0' has a single-edge route but arrivalPos 10.00 is not greater than departPos 50.00.

The behaviour itself is unchanged. A regression test
(tests/complex/traci/vehicle/singleEdgeArrivalPos) is included.

Local verification: built sumo and ran the new test; warning matches the expected output.

Signed-off-by: dkm <2094657017@qq.com>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 09:44

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

behrisch and others added 5 commits October 28, 2026 21:51
Negative arrival positions are relative to the end of the edge and are
interpreted later, so comparing them at load time produces false warnings
for existing tests. Keep the warning for explicit positive arrival positions
where the comparison is meaningful.

Refs eclipse-sumo#5928
The expected file was a single newline, but the test produces no output
at all. An empty file matches the actual output.
The expected file had a CRLF line ending while SUMO writes LF on Linux and
macOS, which made the wheel tests report differences in errors.
@NearCai
NearCai force-pushed the pr/single-edge-arrivalpos branch from be603b7 to 0f05c76 Compare October 30, 2026 15:46
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.

In Vehicles with single edge route, arrivalPosition must be greater than departPos

3 participants