Hi All,
I came with the following idea out of frustration of using the timetable feature: I wish a vehicle would wait as "Full load all/any cargo", except that when there's no more cargo left at the station, and there's another vehicle at the station that's ready to take over the loading, the first vehicle will leave the station. Let's call it "Sync load any cargo" -- vehicle A leaves the station if for any of A's cargo types there's a vehicle B at the station that can load that cargo, and "Sync load all cargo" -- A leaves the station if for each of A's cargo types there's some vehicle B at the station that can load it. I assume here that OpenTTD already has some kind of FIFO loading order on vehicles that load the same cargo, so for the sake of the above definition they would be handled in that order (A is the one that loads first in that FIFO order).
For those who are familiar with TCP: this is in essence how a basic TCP implementation works -- it sends the next packet when an acknowledgement to a past one arrives, thus the network self-regulates the timing between the packets without any need to fine-grained timers. In OpenTTD terms -- packets == vehicles.
Rationale: it will work as self-regulated, self-adapting, timetables. No micromanagement required (e.g. no need to reset the start date when adding vehicles to the group, or redoing the entire timetable when replacing with faster vehicles, optimizing routes, etc...). It automatically minimizes vehicle round-trip time while still preventing vehicles from 'clumping' together.
Limitations: in its straightforward implementation, for stations that can handle at most one vehicle at a time (e.g. one platform train station or a helipad), vehicle A won't know that B might be waiting for it just outside the station. In principle it should be possible to fix that later with a more complicated logic.
So what's the community's opinion about this suggestion? Regardless of that, can somebody who's familiar with the code give me some pointers as to where's the vehicle loading and waiting logic is? (I could tinker with it but I'm not familiar with the codebase )
Cheers
Self-clocked station loading
Moderator: OpenTTD Developers
- L. Spooner Inc
- Engineer
- Posts: 84
- Joined: 22 Jul 2019 08:13
Re: Self-clocked station loading
I just ran into a similar problem with truck depots. I had two trucks heading to the depot to drop off rubber, and two heading to pick up the goods to deliver them to a nearby town. Unfortunately the goods trucks got there first, blocking the rubber trucks from dropping off their load and sitting at 0% with their "load all" orders. I tried to turn the goods trucks around, but the rubber trucks had them blocked in and wouldn't move. Even adding a second truck depot wouldn't clear the logjam. I ended up having to pause the game, clear all their orders, and send the rubber trucks to their vehicle depot so I could back up the goods trucks.
Re: Self-clocked station loading
That's why you never use the same station both for loading and unloading. And if you absolutely have to use the same station, make sure that there are separate sets of platforms for loading and unloading. Which is, of course, hard to achieve with trucks, therefore just use separate stations.L. Spooner Inc wrote: ↑13 Aug 2019 12:25 Unfortunately the goods trucks got there first, blocking the rubber trucks from dropping off their load and sitting at 0% with their "load all" orders.
Who is online
Users browsing this forum: No registered users and 11 guests