Requester with multiple requests?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Requester with multiple requests?

Post by Mmmmmmorten »

I'm trying out a new station type in my robot focused mega build.

The station I'm trying to build is for unloading mats from 18x trains [6-12-0], but now I'm trying all Active provider chests and I'll check station storage from the Storage chests at the station itself, instead of the boxes the trains unload into.

What I'm trying to do is setting up 1 station that have trains with different cargo unloading at the same place.
LTN Requester multiple items.jpg
LTN Requester multiple items.jpg (21.89 KiB) Viewed 6257 times
I have set up a Constant combinator for the station, but not sure if this will work?

How does LTN handle 3 different material requests from the same station?
If it can - how does it dispatch trains?
- In this scenario the station can handle 3 trains total - does LTN send 2 trains to fulfill the needs of the first requested item (if one train is not enough), or will it send 1 of each material, and then more as needed?

Never tried this with either LTN, robots or active providers with buffer at station - so any helpful tips and pitfall to avoid is appreciated!

/old dude
:geek:
FACTORIO EDAX TEMPUS, VITA BREVIS.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Requester with multiple requests?

Post by Optera »

Mmmmmmorten wrote:
Wed Apr 10, 2019 10:48 pm
How does LTN handle 3 different material requests from the same station?
If it can - how does it dispatch trains?
- In this scenario the station can handle 3 trains total - does LTN send 2 trains to fulfill the needs of the first requested item (if one train is not enough), or will it send 1 of each material, and then more as needed?
With the provided parameters assuming 48k is the train capacity LTN will sent 3 trains, one for each item. 60k-48k is below the threshold for a 2nd delivery.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Requester with multiple requests?

Post by Mmmmmmorten »

Optera wrote:
Thu Apr 11, 2019 6:31 am
With the provided parameters assuming 48k is the train capacity LTN will sent 3 trains, one for each item. 60k-48k is below the threshold for a 2nd delivery.
Fantastic!
Just what I wanted to do! :D
Not often my fantasies and what will work actually match...

Just one clarification and I'm all set... The Delivery timeout (ticks) set to 18000 standard = 5 min. When do this counter start?
Just wondering if this is something I should change with 3 trains going to the same place. Unloading should be really fast, but wouldn't want a train to get canceled while waiting at the station.

I'm also considering changing the "Stop timeout (ticks)" to zero (0), at least temporarily, as I have some issues with my first robot stations not unloading first and last cargo wagon due to lazy robots (found this to be a common issue with Passive Provider chests). So this change will fix that for now, until I can update the stations with some smarts or different chest setup. Should not impact the station above as it's all Active providers instant unload to Storage chests at station - just have to make sure there is room for 48.000 x 3 goods (+ the other 4-8 train delivering there).

/old dude
:geek:

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Requester with multiple requests?

Post by Optera »

Mmmmmmorten wrote:
Thu Apr 11, 2019 12:22 pm
Just one clarification and I'm all set... The Delivery timeout (ticks) set to 18000 standard = 5 min. When do this counter start?
Just wondering if this is something I should change with 3 trains going to the same place. Unloading should be really fast, but wouldn't want a train to get canceled while waiting at the station.
When a train is assigned a delivery.
On my 2kspm base I increased it to 15min, as travel time to mining outposts can be quite long.

View this as a final safety against lost trains. Normal operations should be well under this.
Mmmmmmorten wrote:
Thu Apr 11, 2019 12:22 pm
I'm also considering changing the "Stop timeout (ticks)" to zero (0), at least temporarily, as I have some issues with my first robot stations not unloading first and last cargo wagon due to lazy robots (found this to be a common issue with Passive Provider chests). So this change will fix that for now, until I can update the stations with some smarts or different chest setup. Should not impact the station above as it's all Active providers instant unload to Storage chests at station - just have to make sure there is room for 48.000 x 3 goods (+ the other 4-8 train delivering there).
Stop timeout only ever happens at really slow stations or when allowing trains deliver more than buffer chests can hold.
Personally I use circuit conditions and force trains to stay at requesters indefinitely sending red = 1 while they have cargo.

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Requester with multiple requests?

Post by mrvn »

Mmmmmmorten wrote:
Wed Apr 10, 2019 10:48 pm
I'm trying out a new station type in my robot focused mega build.

The station I'm trying to build is for unloading mats from 18x trains [6-12-0], but now I'm trying all Active provider chests and I'll check station storage from the Storage chests at the station itself, instead of the boxes the trains unload into.

What I'm trying to do is setting up 1 station that have trains with different cargo unloading at the same place.
LTN Requester multiple items.jpg
I have set up a Constant combinator for the station, but not sure if this will work?

How does LTN handle 3 different material requests from the same station?
If it can - how does it dispatch trains?
- In this scenario the station can handle 3 trains total - does LTN send 2 trains to fulfill the needs of the first requested item (if one train is not enough), or will it send 1 of each material, and then more as needed?

Never tried this with either LTN, robots or active providers with buffer at station - so any helpful tips and pitfall to avoid is appreciated!

/old dude
:geek:
FACTORIO EDAX TEMPUS, VITA BREVIS.
This works just fine but it really depends on circumstances what trains will be send.

For example when you first activate the station you might get 3 trains of iron plates. Then 1 train of steel. Then 3 trains of copper plate. It depends on whats provided too. At any time no more than 3 trains will be send to the station even if they carry different goods. In the end you will get at least 12k of each item and no more than 60k (+a few pates when trains are overloaded) if enough is provided.

Later then as soon as any of the 3 items falls below 12k a new request will be made for 48k of the item.

If you have stations that provide both iron plates and steel you can also get trains with a mixed load of iron plates and steel. In which case the request could be for 32k of iron plate and 16k of steel or any other ratio that adds up to the 48k request limit.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Requester with multiple requests?

Post by Mmmmmmorten »

Well, it works fine! :)

It was kind of like mrvn said.. a potluck of trains at the beginning, but it quickly stabilized and is now running smoothly. :D

Wonder if the LTN setup use math to determine that iron had larger negative number (changed it to -72k as it is used a lot more) sent choose to close this gap instead of fulfilling the need of each one first?
Not really important for startup, as it works perfectly when the base is filled up and running normally.

/old dude
:geek:

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: Requester with multiple requests?

Post by eduran »

Requests are processed by age. LTN will keep sending trains to fulfill the request you added first. Only when that is not possible or the requested amount drop below the threshold will the next item be processed. If all requests were added on the same tick (set up CC first, connect to lamp with all items already set), the order depends on which signal is returned first by the Lua API. There is no priority for larger requests.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Requester with multiple requests?

Post by Mmmmmmorten »

eduran wrote:
Sat Apr 13, 2019 11:25 am
Requests are processed by age. LTN will keep sending trains to fulfill the request you added first. Only when that is not possible or the requested amount drop below the threshold will the next item be processed. If all requests were added on the same tick (set up CC first, connect to lamp with all items already set), the order depends on which signal is returned first by the Lua API. There is no priority for larger requests.
Ahh I see. Good to know. I set up stations to handle multiple trains at the same time, so that was probably why I got more than one of same kind when I turned on the Constant combinator at the station. If you are missing a lot and can handle more than one train (I have set "Limit trains" = 2 (or 3) in most stations with parking available) LTN sends multiple trains - as it should. Then when things normalize, it send multiple trains with different cargo (if needed) and things work perfectly.

The only other issue I had when I turned everything on was a huge amount of LTN trains running about doing it's job - and unfortunately bad train track design from me. Had not left enough room for my 18x trains and had several intersections where trains ended up butting heads and piling up. First notice I got of this happening was when LTN started cancelling orders due to time out :oops:
This had me running about manually moving trains to fix pile-ups, and again left me with new trains sent out by LTN (due to timeout of others) and (the worst of it all) trains with cargo returning to depot to dump it all there.

Just to bad LTN tracker does not track trains that stopped moving over undue duration's (as in train pile-up at intersection or bad side-track). An alarm for this (before they time out) - with the new feature you have that pop to the location and mark the train? :mrgreen:

/old dude
:geek:

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: Requester with multiple requests?

Post by eduran »

Mmmmmmorten wrote:
Sat Apr 13, 2019 1:00 pm
Just to bad LTN tracker does not track trains that stopped moving over undue duration's (as in train pile-up at intersection or bad side-track). An alarm for this (before they time out) - with the new feature you have that pop to the location and mark the train?
I am working on a plugin for LTNT that will do that. Not sure when it will be ready, currently it is in an early stage.

Post Reply

Return to “Logistic Train Network”