OpenTTD

Tasklist

FS#5874 - Cargodist not sending cargo along new route

Attached to Project: OpenTTD
Opened by Simon Smith (Simons_Mith) - Friday, 24 January 2014, 02:48 GMT
Last edited by fonsinchen (fonsinchen) - Friday, 24 January 2014, 21:39 GMT
Type Bug
Category Vehicles → Cargodist
Status Closed
Assigned To fonsinchen (fonsinchen)
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In spite of a 2-3 year wait, not one ton of metal has been directed to Nantnor Tanner Road. Coords: 405x1712

Vehicles concerned: RV 234 and Train 1.

Great Accgrove Rivers Steel plant is at 461x1681

Route first set up in beta-2, problem persists in beta-3.
This task depends upon

Closed by  fonsinchen (fonsinchen)
Friday, 24 January 2014, 21:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r26276
Comment by Alberth (Alberth) - Friday, 24 January 2014, 10:59 GMT
Train 1 arrives at "Great Accgrove Rivers Steel plant" at the end of April 1991 (ie 6 months later).

It is fully loaded with building materials. After visiting the depot, it unloads the building materials, and switches to metal
Since all steel goes to Parnwell, nothing is loaded.

At Nantnor Tanner Road, RV 234 is waiting for metal, to bring to the Nantnor James Watt Street, to the Nantnor Machine Shop

The question seems to be why cargo-dist doesn't see the machine shop as a feasible destination.
Comment by Alberth (Alberth) - Friday, 24 January 2014, 11:01 GMT
Images with the various windows
Comment by Simon Smith (Simons_Mith) - Friday, 24 January 2014, 16:52 GMT
if you don't mind me speculating about a possible workaround, could you set up cargodist so that some small fraction of a cargo always remains 'to any station'? Then you'd always have something to deliver, if not very much.
Comment by fonsinchen (fonsinchen) - Friday, 24 January 2014, 17:35 GMT
As far as I can see vehicle 234 refits to Engineering Supplies on order 4 but never refits back to metal. Am I missing anything? That's not the reason for the problem, though.
Comment by fonsinchen (fonsinchen) - Friday, 24 January 2014, 18:02 GMT
The link graph schedule is clogged up with loads and loads of link graphs for fish having one station each, with the effect being that the metal link graph is never scheduled. That, of course, is a bug as there is nothing particularly interesting to do with a 1-station link graph. On a related note: How did you manage to get a 15% cargo rating at so many fishing grounds all around the map?
Comment by Simon Smith (Simons_Mith) - Friday, 24 January 2014, 19:18 GMT
Fish ratings: I have no real idea, I haven't shipped a fish in this game yet. My only water-related thing is that I /do/ have a dock which when I first set it up used no ships, because the dredging site I wanted to access was already in its catchment area from shore. I just bolted a train station on to the dock and used it like that. When a nearby oil rig formed later, I set up a ship with full load and transfer orders for that. Could that unusual use of a dock have upset things?

Metal refit to eng supplies, but not back again: Good point, that would have screwed up my chain if RV234 had ever /made/ it to the machine shop. But it's on orders to full load metal at the moment, a job it has made no progress on in 2-3 years. And when I did fix that oversight later it didn't cause any metal to start to flow.
Comment by fonsinchen (fonsinchen) - Friday, 24 January 2014, 20:21 GMT
The relevant link graph is at position 110 in the schedule. As each link graph takes 16 days to compute and you're only computing 1 link graph at a time, this one will be due in 1760 days, which is about 5 years. You can drastically reduce that by lowering the link graph update interval in the advanced settings. If you set that to 2, it will only take 220 days for the link graph to be calculated. I'm preparing a patch which will make the schedule skip all link graphs with only 1 node now. That should help significantly. The question remains, though: How did all the fishing grounds end up in the link graphs? Any ideas on that are welcome.
Comment by Simon Smith (Simons_Mith) - Friday, 24 January 2014, 20:37 GMT
Thanks very much, I'll do that. With ref to the fishing, I've asked on the FIRS dev thread, and if I get a response, or find a way to reproduce that issue in a clean game, I'll post a suitable update here.
Comment by fonsinchen (fonsinchen) - Friday, 24 January 2014, 20:53 GMT
It's pretty simple, actually. If you disable "Deliver cargo to a station only if there is a demand" in "Stations" -> "Cargo Handling" in the advanced options, then you will get separate link graphs for all those "neutral" stations. If you then have insanely many of those you'll notice that your real link graphs aren't calculated anymore in a timely fashion. The skipping of one-station graphs should be an adequate counter measure. see https://github.com/ulfhermann/openttd/commit/5aa64f123d93d470a5dcad48fdf1d81294c35698
Comment by Simon Smith (Simons_Mith) - Friday, 24 January 2014, 21:27 GMT
Ah, I think I had that setting on early in this game before changing my mind about it and turning it off again. That would explain why it's at 15% for some places, but those that spawned after I turned it off again are unaffected.

Loading...