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

When facing undecidable orders vehicles may reload cargo they've just transfered at the same station #5671

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

Comments

@DorpsGek
Copy link
Member

fonsinchen opened the ticket and wrote:

Undecidable orders are orders that depend on load percentage. If Cargodist is enabled there is no general way of getting the loading algorithm right for vehicles whose next order depends on load percentage. Imagine a vehicle that has an order list like this:

1 Go to A and full load
2 Go to B
3 if load percentage > 50 jump to 6
4 Go to C
5 Jump to 1
6 Go to D

Now imagine the vehicle's cargo isn't accepted at B, so any cargo it carries goes either to C or D. Let the Cargo distribution algorithm decide that 60% of its cargo choose C as next hop at B, while the remaining 40% choose D. The vehicle could either transfer the cargo for C at B, then keep the cargo for D and actually go to C because of order 3. Or it could transfer the cargo for D, keep the cargo for C and go to D. Whatever it does is wrong.

As a pragmatic solution for half of this problem, when loading the vehicle will just load anything waiting at B for either C or D. The reasoning is that most of the time it's better to move the cargo than to let it sit in the station. The solution for unloading and transferring, however, is different. There the vehicle draws a random next hop from all available ones and acts as if it was going there. That is inconsistent, leading to cargo being reloaded.

In order to make loading and unloading/transferring consistent, the vehicle should keep all cargo going to either C or D and not transfer any of that at B.

Reported version: trunk
Operating system: All


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

fonsinchen closed the ticket.

Reason for closing: Fixed

In r25891


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

@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