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

With autorefit a consist does not always load all cargo it could load without autorefit #5435

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

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 4, 2013

fonsinchen opened the ticket and wrote:

See the attached savegame. If you leave it running for some time you'll see that the train will occasionally leave some coal in the station, even though it could easily have loaded it. This is because with autorefit we "reserve" cargo for each single vehicle separately, even if there is no full load order. See economy.cpp:1500 ff. This means some of the wagons can reserve coal they intent to later load and thus prevent later wagons from loading the same coal. However, if the last wagon does not load up to its capacity, the "coal" bit in full_load_amount will be cleared in economy.cpp:1517. This, together with anything_loaded being true because some other wagon did load, leads to VF_STOP_LOADING to be set in line 1590. This in turn prevents the whole consist from loading any further cargo, also those wagons which could load the cargo they've previously reserved.

I have fixed that in cargodist. See the, currently experimental, branch "reserve" at github.com/fonsinchen/openttd-cargodist .

Attachments

Reported version: trunk
Operating system: All


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

DorpsGek commented Jan 6, 2013

fonsinchen wrote:

There's an easy fix for this. See attached patch. Basically, we just have to remember the reservations we have performed and not stop loading if there is still some reservation left.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5435#comment11854

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 3, 2013

Rubidium closed the ticket.

Reason for closing: Fixed

In r24963


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

@DorpsGek DorpsGek closed this as completed Feb 3, 2013
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) 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