Skip to content
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

Conditional orders aren't properly predicted when refreshing stats #5674

Closed
DorpsGek opened this issue Jul 26, 2013 · 2 comments
Closed

Conditional orders aren't properly predicted when refreshing stats #5674

DorpsGek opened this issue Jul 26, 2013 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

fonsinchen opened the ticket and wrote:

When refreshing the link stats for the next hops a vehicle will visit only one branch of each conditional order is refreshed. As the routing scheme may depend on all information about possible next hops of the vehicle to be available this is suboptimal. See http://wiki.openttdcoop.org/PublicServer:Archive_-_Games_261_-_270# gameid_262 for an example. As long as traffic was low on the "circle" lines the links frequently dropped as they weren't properly predicted. That lead to cargo only being routed along a prefix of the possible routes and consequently the vehicles only served that prefix and then went back to the source station because of the conditional "if empty go back" orders.

In order to fix that a few changes are necessary:
ulfhermann/openttd@dae6943
ulfhermann/openttd@4824ed8
ulfhermann/openttd@59eff23

The end result is that the order list is regarded as a tree and walked recursively to predict all possible ways a vehicle could go.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5674
@DorpsGek
Copy link
Member Author

fonsinchen wrote:

This doesn't properly work with nested conditionals.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5674#comment12461

@DorpsGek
Copy link
Member Author

fonsinchen closed the ticket.

Reason for closing: Fixed

In r25738


This comment was imported from FlySpray: https://bugs.openttd.org/task/5674

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Cargodist labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant