-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autorouter taking too long to time out #11252
Labels
autorouting
Issues relating to autorouting
Comments
Gist containing the game data for game 177538, up to action 792. |
Yeah, agree. I think the intent of the timeout options is to stop looking
for routes after the timeout has expired, so should never be allowed to go
for a long time like 10 hours.
The timeout worked correctly for me when I was testing it when it was first
implemented, even on games like 1822 with similar open network routing
issues.
…On Thu, Oct 3, 2024 at 12:46 PM Oliver Burnett-Hall < ***@***.***> wrote:
Gist
<https://gist.github.com/ollybh/795692af552ddd782bf1e3cd5e0a0135#file-1858-game-177538-json>
containing the game data for game 177538, up to action 792.
—
Reply to this email directly, view it on GitHub
<#11252 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6CEXHHJS4DKDDRKWS2A63ZZWNKPAVCNFSM6AAAAABPKPA7GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSGIYDCOJTGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
ollybh
added a commit
to ollybh/18xx
that referenced
this issue
Oct 6, 2024
The auto-router's path timeout is supposed to stop too much time being spent on building up the set of possible routes for trains. It was being checked once in each iteration of possible starting nodes for routes. However, in particularly degenerate cases this meant that far too long was elapsing between timeout checks: issue tobymao#11252 had more than ten hours pass before the first and second timeout checks. This moves the timeout check to an inner loop, so it is checked more frequently.
3 tasks
ollybh
added a commit
to ollybh/18xx
that referenced
this issue
Oct 6, 2024
The auto-router's path timeout is supposed to stop too much time being spent on building up the set of possible routes for trains. It was being checked once in each iteration of possible starting nodes for routes. However, in particularly degenerate cases this meant that far too long was elapsing between timeout checks: issue tobymao#11252 had more than ten hours pass before the first and second timeout checks. This moves the timeout check to an inner loop, so it is checked more frequently.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue #11239 was a report of being unable to select a route. This was probably caused by the autorouter being started and locking up the interface.
This occurred at action 792 of game 177538. This game exhibits horrendously bad autorouter performance: it is a game of 1858 which has Lawson track and a lot of tiles have been laid with many open cities. This means that the autorouter is going to struggle, but the problem here is that it is not timing out correctly: with the default setting of 30 seconds for path timeout, it took more than 10 hours to timeout on my desktop computer (which is far from being new or high-spec, but 😱).
The path timeout is checked once in the autorouter's outer loop, iterating over the corporation's reachable nodes and looking at the potential routes from each. In this case it took multiple hours to check the nodes from the first node, and then only timed out when moving onto the second node.
Moving the timeout check into an inner loop won't fix the performance of the autorouter, but will at least means it times out much more quickly.
The text was updated successfully, but these errors were encountered: