FIFO loading

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

User avatar
Rob
Tycoon
Tycoon
Posts: 4355
Joined: 31 Dec 2002 16:52
Location: Ven-Zelderheide, The Netherlands

Post by Rob »

Hmm, not many seem to have tried this.
But it's working very well, no strange things that I noticed. And the fifo is actually working when there isn't enough cargo at the station waiting to fill all the trains.

Oh and I didn't run in the 255 related limitation, yet. :wink:
Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)
Image
Still the best OS around
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

The impfifo branch has been merged; the new nightly builds (r1100 and later) will contain this FIFO system instead of the old one.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Dave
Moderator
Moderator
Posts: 17249
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

Will any change of patch setting be required, DaleStan?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Post by Lakie »

Just wondering... (Quoted from IRC)

Code: Select all

<Lakie> Given the following suitation...
<Lakie> We have Station Z which has 400 units of goods
<Lakie> We have 2 trains going to start loading a Station Z (Trains X and Y)
<Lakie> Train X (first one) reserves 200 units and starts loading
<Lakie> Now can Train Y (which is identical in capacity) reserve remaining cargo and start loading at the same time too?
<Lakie> Or say there was 300 units of cargo or something at Z, atleast that way, it's still fifo but it still means trains can load if there are large amounts of cargo to be processed?
<Lakie> Or would that be too complex?
Hopefully that happens, or atleast I believe Fifo loading should behave something like that. :)
Although, I'll leave DaleStan to decide about what happens with Fifo.

I just believe that reserving cargo for the first train doesn't mean no loading of other trains at the same time, if there is excess cargo. ;)

Just my comments on this,
~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Lakie wrote:Hopefully that happens, or atleast I believe Fifo loading should behave something like that. :)
That's exactly how it works, Lakie. First train reserves as much cargo as is needed to fill it up, then the second train reserves the rest, etc. and both are loading at the same time.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

In the first case (400 units at the station), yes. All wagons in both trains immediately begin loading.

In the second case (300 units at the station), we also need to know the capacity of each wagon. For the sake of convince, let's say that there are 10 wagons, each carrying 20 units. Then, all 10 wagons in train X begin loading, as do the first 5 wagons in train Y. Once another 20 units arrive at the station, the next wagon in Y begins loading, and so on. When train X becomes full and leaves, all remaining wagons in train Y, if any, begin loading.

In other words, at least one full consist will always be loading, plus as many more vehicles as can load without the total remaining capacity exceeding the cargo available at the station.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
gmyx
Engineer
Engineer
Posts: 123
Joined: 27 Feb 2003 00:06
Location: Hammond, Ontario, Canada

Post by gmyx »

I seem to be having a problem with FIFO. Using r1100. None of the trains are loading cargo after a few days, even after Cht: ResetFifo. They just do nothing.

Also, I keep getting "New Waddington now accepts passengers" news item every few game days - even thought that station is for several farms without a town in sight AND does not actually accept passengers. Just wait until aprox feb 15 and you'll get the news item.

BTW: Thanks for making this change to FIFO - it will help greatly to prevent deadlocks in stations.
Attachments
TRP08.SV1
(452.43 KiB) Downloaded 194 times
ttdpatch.cfg
(33.42 KiB) Downloaded 228 times
NewGrfw.cfg
(136 Bytes) Downloaded 179 times
MJS
Director
Director
Posts: 540
Joined: 28 Jul 2005 09:31

Post by MJS »

Is Fifo as useful for passengers as it is for cargo? I know passenger behaviour is not realistic anyway (who would want to catch any train from Paris, no matter where it went? Well, there's a few places I'd like to get away from no matter in which direction...), but would it be possible to have a parameter with the fifoload to enable it for all cargoes, or for all cargoes except passengers & mail?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

The parameter is, as before, the Full load order. Don't set full load, and FIFO won't do anything.

Supposedly, that is; I obviously broke something.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
MJS
Director
Director
Posts: 540
Joined: 28 Jul 2005 09:31

Post by MJS »

Aha. That makes sense, the Full Load option.

But I now have a passenger train that's set to Full Load, and it insists on loading waggon by waggon, instead of spreading passengers as it used to do. Maybe that's what you were referring too as well, I don't know.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

gmyx: I believe I've found and fixed the problem; vehicles were leaving that had not arrived. The next nightly should fix this problem.

Attached is a fixed savegame.

MJS: I suspect you have the same problem as gmyx. CHT: ResetFIFO should do the trick starting next nighty; if it doesn't, let me know.
Attachments
TRP08.SV1
(455.18 KiB) Downloaded 226 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

DaleStan wrote:In the second case (300 units at the station), we also need to know the capacity of each wagon. For the sake of convince, let's say that there are 10 wagons, each carrying 20 units. Then, all 10 wagons in train X begin loading, as do the first 5 wagons in train Y. Once another 20 units arrive at the station, the next wagon in Y begins loading, and so on. When train X becomes full and leaves, all remaining wagons in train Y, if any, begin loading.
Recently NewGRF sets contain wagons of various eras, each with different capacity.
Let's say there is a train A with 20 wagons of capacity=10 units, and a train B with 10 wagons, each carrying 20 units.
Following your alghoritm: Once 10 units arrive at the station, the next wagon in A begins loading.
This way, train B won't be loaded simultanously to train A.
A will load first, leave the station, and eventually let train B load.

Is that right? Or you have some special-case handling?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

MeusH wrote:A will load first, leave the station, and eventually let train B load.
That's why it's called FIFO loading. Train A will always finish loading first, but if there's enough cargo to fully load train A, then train B will start loading the remaining cargo.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

So, in both cases, the first train to arrive, plus the front half of the second train, will start loading immediately. The remainder of the second train will start loading as the necessary cargo arrives (I'm assuming you're talking about the 300-unit case here.)

Please explain what part of this paragraph you are not understanding, and I'll attempt to word it better:
DaleStan wrote:In other words, at least one full consist will always be loading, plus as many more vehicles as can load without the total remaining capacity exceeding the cargo available at the station.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Oh, excuse me, but I thought about sitiuation of no cargo waiting at the station and I didn't mention it.

Let's discuss about two cases:
1) Train A with 10units/wagon gets to a station first. Train B with 20units/wagon gets there second:
I assume that train A will get loaded first.

But onto the second case:
2) Train B with 20units/wagon gets to a station first. Train A with 10units/wagon gets there second:
Train B should have higher priority, but Once 10 units arrive at the station, the next wagon in A begins loading., train A will get served first, won't it?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

The train that gets there first will get loaded first. What's so hard to understand about that?

Capacity makes no difference to loading order, only to how many trains will load simultaneously.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Okay, thanks
gmyx
Engineer
Engineer
Posts: 123
Joined: 27 Feb 2003 00:06
Location: Hammond, Ontario, Canada

Post by gmyx »

Again with another FIFO problem. This time it's with an oil field on the left-left of the map. I normaly raise the land near the oil field and use a regular train station. The problem I have is my oil trains are only loading their first wagon - and only one train will do so. All other oil fields on the map are fine. Using r1159
Attachments
TRP06.SV1
(491.27 KiB) Downloaded 151 times
ttdpatch.cfg
(33.42 KiB) Downloaded 140 times
NewGrfw.cfg
(136 Bytes) Downloaded 170 times
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Post by stevenh »

Could these trains have been sitting there for a while? (ie. if they had broken in a previous beta, they'll still be stuck now, afaik)
Maybe you need one more "cht:resetfifo" on the station just to repair the loading.
gmyx
Engineer
Engineer
Posts: 123
Joined: 27 Feb 2003 00:06
Location: Hammond, Ontario, Canada

Post by gmyx »

stevenh wrote:Could these trains have been sitting there for a while? (ie. if they had broken in a previous beta, they'll still be stuck now, afaik)
Maybe you need one more "cht:resetfifo" on the station just to repair the loading.
Actually, I just expanded to it, if you look at my previous save game it was not there. If I do a resetfifo, they load properly one time only. When they return, same problem of only one wagon on one train.
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 16 guests