Threshold and Stack Threshold

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Malidictus
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Jan 18, 2020 11:24 pm
Contact:

Re: Threshold and Stack Threshold

Post by Malidictus »

Since this seems to be a catch-all thread, I should post here:

I have a problem which might have to do with thresholds, but it's the opposite of what the OP's facing. I've set stack thresholds pretty low, I've set requested amounts very high, yet LTN doesn't seem to want to create the requisite number of deliveries. To give a specific example:

I run trains with 3 cars, so 120 stacks per train. All of my providers and all of my requesters are set to a stack threshold of 120. I'm requesting 1800 copper ore at the same station. That's enough request for 15 trains. I would expect that - given I have sufficient copper ore - that 15 deliveries would be sent to that station from wherever copper ore is available. I have multiple mines and other sources.

Now, I have considered a couple of possible issues - either I don't have enough trains or I don't have enough ore. I use LTN Manager, so I expect that it would show me if either is the case. If I don't have enough trains to fulfil requirements, then I'd expect to see "No train found to carry items" alerts to pop up. They do pop up here and there when I create traffic jam, but they're rare. More than that - I look at my depots and I see plenty of item trains sitting idle. It seems like I have enough trains. If I don't have enough copper ore, I would expect to see a note of that under the red "Requested" category - requests made but unable to be fulfilled. That's not happening either.

I have multiple stations requesting 1800 copper ore, but I don't see their requests display as unfulfilled, nor do I see tens of thousands of copper ore in transit. It feels like either LTN is limiting the trains it'll send to each station down to maybe 4-6 at a time (I've set no train limits) anywhere, or else it'll only generate a train route every 5-10 seconds and it just takes forever to generate enough routes. I checked my settings, and Update Frequency (ticks) is set to 2, so I should be getting 30 updates per second... I think, at least, given the tooltip.

So I guess my question is - what am I doing wrong, and how can I tell LTN to generate more simultaneous routes?

nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: Threshold and Stack Threshold

Post by nuhll »

theres a setting (signal) for how many trains should be sent to a station

Malidictus
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Jan 18, 2020 11:24 pm
Contact:

Re: Threshold and Stack Threshold

Post by Malidictus »

nuhll wrote: ↑
Tue Jan 04, 2022 9:32 pm
theres a setting (signal) for how many trains should be sent to a station
Correct. However, I didn't send any such signals to any of the train stations involved. As I understand it from the options descriptions, no signal means no limit, so that shouldn't be an issue.

I did try increasing update frequency, and I think that may have addressed the issue somewhat. Maybe I just have too many trains for all of them to be updated promptly. Will continue to experiment.

Litcube
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jun 25, 2016 2:52 pm
Contact:

Re: Threshold and Stack Threshold

Post by Litcube »

I don't understand the point of stack thresholds and request thresholds when it comes to a requester station. You *have* to put in a negative request threshold or it doesn't work. What, then, does the stack threshold do in this case? Should we not include stack thresholds in requester stations?

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

Re: Threshold and Stack Threshold

Post by mrvn »

Litcube wrote: ↑
Sat Jul 23, 2022 4:06 pm
I don't understand the point of stack thresholds and request thresholds when it comes to a requester station. You *have* to put in a negative request threshold or it doesn't work. What, then, does the stack threshold do in this case? Should we not include stack thresholds in requester stations?
Imagine a station requesting coal and sulfuric acid. You would set a stack threshold of 40 to only request coal when you can fill a cargo wagon and the normal threshold to 25000 so you only request sulfuric acid when you can fill a fluid wagon.

When you set a stack threshold then the requested amount is compared to the stack threshold for items and the normal threshold for fluids. That's what it is for. (Note: setting a stack threshold even if you don't have fluids makes it easier to get the amount right but that's just a happy coincidence).

chugin_iv
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Feb 23, 2021 2:22 pm
Contact:

Re: Threshold and Stack Threshold

Post by chugin_iv »

It's been awhile, but I'm back to trying to build an LTN-controlled train network.
mrvn wrote: ↑
Sat Nov 06, 2021 11:42 am
chugin_iv wrote: ↑
Sat Nov 06, 2021 8:47 am
mrvn wrote: ↑
Fri Nov 05, 2021 11:01 pm
What's a full train? You can't decide that from the train stop itself.
Why? Train station is designed with specific train composition in mind. If the train station is designed for N cargo wagons then full train = N * 40 stacks or N * 25000 (liters?) for liquid trains.
But there is no N signal in the train stop. At most you have the min/max train size signal but that includes locomotives. And the train could have 1, 2, 3, 4... locomotives. So how do you determine N?
Guessing from the fact than on my current map LTN dispatches deliveries of different amounts with trains of different length, it already can determine train composition and train capacity.

BTW, I've started using tosts-Train-Chests mod, so I don't really care any more if shorter train does the delivery.
mrvn wrote: ↑
Sat Nov 06, 2021 11:42 am
chugin_iv wrote: ↑
Sat Nov 06, 2021 8:47 am
mrvn wrote: ↑
Fri Nov 05, 2021 11:01 pm
Unless you want it to never use a partial train.
Yes, that's the idea.
mrvn wrote: ↑
Fri Nov 05, 2021 11:01 pm
For that you could change scripts/dispatcher.lua: getFreeTrains to only return trains where "inventorySize <= size". You would still want a minimum threshold for the smallest train the station allows so the dispatcher doesn't run every tick.
That seems to be backwards. I don't want to run shorter train, especially when my chests are (hopefully) properly balanced - shorter train will either not get filled to the same proportion as longer train (if provider station is not yet ready), or will not get fully unloaded (if consumer station is too full), creating imbalance as the result.

I want the train to be the exact composition the station was designed for, just later, when it can carry a full load.
If your station has min train size == max train size and those trains all have the same number of locomotives then you would get full trains or none at all. Only when min train size < max train size can you get shorter trains and for that you have to design your stations to handle different train sizes. It's a corner case but one that makes your idea hard to implement.
I wish it was like that, but it's not. If my provider station has slightly more copper plates than a full train, then LTN dispatches 2 trains: one to get a full load, and the second to get the reminder. Thing is, while the first train loads, the factory is not standing still and keeps producing copper plates, so by the time the second train gets to the station there's about twice as much copper plates as it was dispatched to carry (still not a full train), so LTN dispatches a THIRD train to carry new plates. BUT the second train is already at the station and it loads ALL the plates there, and even waits a while 'cause new plates keep trickling in, causing "2 seconds timeout" to reset all the time. So by the time third train gets to the station, it's nearly empty. And if you don't yet have fast enough inserters, the queue behind the first train can get much longer - I've seen up to 10 trains in the waiting stack, all expecting to carry 10 stacks of plates.

Needless to say, I consider that behavior to be broken on the part of LTN.
  1. The threshold (either item or stack) seems to only determine whether the deliveries happen at all, but if provider station has more than threshold, then LTN halpfully generates partial deliveries.
  2. When items at the provider station trickle in slowly, these partial deliveries get compounded on by generating MORE of them, when the first one will actually suck up all the extra items (up to full capacity), leaving the subsequent trains with empty station.
Optera wrote: ↑
Wed Nov 17, 2021 7:40 pm
LTN is a lot more flexible than TSM, for example one stop may request iron ore AND provide iron plates.
Yes, I know that LTN is intended to be more "flexible" than other mods, but it achieves it by breaking the golden rule: β€œSimple things should be simple, complex things should be possible.” LTN, on the other hand, makes simple things unnecessarily complex to implement. Simple things should be the DEFAULT! Simple thing = full trains only (meaning the wait conditions are "full cargo" and "empty cargo", not "copper plates >= 1038" and "copper plates = 0", as LTN sets now), distinct provider and requester stations. Anything more complex (like combined provider+requester stations, allow partial loads, etc.) should REQUIRE at least additional checkboxes checked.

Yes, I know that it's possible to link inserters to wires and with some hacky combinator machinery only load/unload the requested amount, but LTN shouldn't assume that my stations have that setup. Neither should it asume that I have filter inserters, or bi-directional inserters, or anything at all really other than what is the most basic station setup one would use without LTN at all. If you do have some of these things, great, tell LTN about them with special signals, it's not hard compared to making that setup.
Optera wrote: ↑
Wed Nov 17, 2021 7:40 pm
Setting request threshold to 2^31 is the intended way of telling LTN a station is never a provider.
Case in point - using unrelated unintuitive signals to prevent station from suddenly switching from requester to provider. That's a hack, no matter what you write on a forum (not even in FAQ or mod description!).

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: Threshold and Stack Threshold

Post by DaleStan »

chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
It's been awhile, but I'm back to trying to build an LTN-controlled train network.
mrvn wrote:
chugin_iv wrote: ↑
Sat Nov 06, 2021 8:47 am
Why? Train station is designed with specific train composition in mind. If the train station is designed for N cargo wagons then full train = N * 40 stacks or N * 25000 (liters?) for liquid trains.
But there is no N signal in the train stop. At most you have the min/max train size signal but that includes locomotives. And the train could have 1, 2, 3, 4... locomotives. So how do you determine N?
Guessing from the fact than on my current map LTN dispatches deliveries of different amounts with trains of different length, it already can determine train composition and train capacity.
It's easy to determine train capacity, but it sounds to me like mrvn is asking how you think station capacity should be determined.
chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
I want the train to be the exact composition the station was designed for, just later, when it can carry a full load.
Then set the station's request threshold to whatever a full load is. LTN can't tell what the station was designed for, but you can.

chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
Optera wrote: Setting request threshold to 2^31 is the intended way of telling LTN a station is never a provider.
Case in point - using unrelated unintuitive signals to prevent station from suddenly switching from requester to provider. That's a hack, no matter what you write on a forum (not even in FAQ or mod description!).
That's why someone else invented LTN Combinator. Magic signals all gone handled automatically.


LTN is designed to be automatic in the same way that a Roomba is designed to be automatic (but without the 'taking pictures of you in your bathroom' feature): It will accomplish the task in question, but not necessarily the way you expect. The more you want it to operate the way a human would do it, the more you'll need to poke and prod it into compliance.

chugin_iv
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Feb 23, 2021 2:22 pm
Contact:

Re: Threshold and Stack Threshold

Post by chugin_iv »

DaleStan wrote: ↑
Mon Jan 09, 2023 3:56 pm
chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
It's been awhile, but I'm back to trying to build an LTN-controlled train network.
mrvn wrote:
chugin_iv wrote: ↑
Sat Nov 06, 2021 8:47 am
Why? Train station is designed with specific train composition in mind. If the train station is designed for N cargo wagons then full train = N * 40 stacks or N * 25000 (liters?) for liquid trains.
But there is no N signal in the train stop. At most you have the min/max train size signal but that includes locomotives. And the train could have 1, 2, 3, 4... locomotives. So how do you determine N?
Guessing from the fact than on my current map LTN dispatches deliveries of different amounts with trains of different length, it already can determine train composition and train capacity.
It's easy to determine train capacity, but it sounds to me like mrvn is asking how you think station capacity should be determined.
Station capacity is whatever my requested amount is, or 1 full train (whichever is greater).
DaleStan wrote: ↑
Mon Jan 09, 2023 3:56 pm
chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
I want the train to be the exact composition the station was designed for, just later, when it can carry a full load.
Then set the station's request threshold to whatever a full load is. LTN can't tell what the station was designed for, but you can.
It is. My request thershold is 160 stacks, or 4 full wagons - exactly the size of my "long" trains. My provide threshold is 40 (to accomodate 1-wagon trains meant to carry goods to the mall).

Doesn't prevent LTN from using 1-wagon trains to carry plates to other full-size stations, nor giving them 10-stack delivery orders. Or even using long trains with the same small orders.
DaleStan wrote: ↑
Mon Jan 09, 2023 3:56 pm
chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
Optera wrote: Setting request threshold to 2^31 is the intended way of telling LTN a station is never a provider.
Case in point - using unrelated unintuitive signals to prevent station from suddenly switching from requester to provider. That's a hack, no matter what you write on a forum (not even in FAQ or mod description!).
That's why someone else invented LTN Combinator. Magic signals all gone handled automatically.


LTN is designed to be automatic in the same way that a Roomba is designed to be automatic (but without the 'taking pictures of you in your bathroom' feature): It will accomplish the task in question, but not necessarily the way you expect. The more you want it to operate the way a human would do it, the more you'll need to poke and prod it into compliance.
I use LTN Combinator. Doesn't help with small delivery requests.

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

Re: Threshold and Stack Threshold

Post by mrvn »

chugin_iv wrote: ↑
Mon Jan 09, 2023 5:40 pm
DaleStan wrote: ↑
Mon Jan 09, 2023 3:56 pm
chugin_iv wrote: ↑
Sun Jan 08, 2023 11:33 am
I want the train to be the exact composition the station was designed for, just later, when it can carry a full load.
Then set the station's request threshold to whatever a full load is. LTN can't tell what the station was designed for, but you can.
It is. My request thershold is 160 stacks, or 4 full wagons - exactly the size of my "long" trains. My provide threshold is 40 (to accomodate 1-wagon trains meant to carry goods to the mall).

Doesn't prevent LTN from using 1-wagon trains to carry plates to other full-size stations, nor giving them 10-stack delivery orders. Or even using long trains with the same small orders.
That is your problem.

If you set your threshold to handle 1 wagon trains then LTN will dispatch trains to carry 1 wagon trains worth of ore too. So if your station has 200 stacks then LTN will send a train for 160 stacks and a train for 40 stacks. You told it 40 stacks are enough to allow a train to come.

There is no way to say that LTN should match request thresholds of 160 stacks with providers providing 160 stacks, i.e. an only-full-trains options. The request threshold is the minimum amount of items missing where LTN tries to get more. It's not a threshold for how full a train must be to be send. We might want such a setting but there isn't one. Once the request theshold is breached LTN tries to get new resources from any provider it can. Even if that means sending a train for 1 iron ore because some provider provides a single iron ore.


So my suggestion is to build separate stations for different train sizes like this:
multi-station.png
multi-station.png (4.12 MiB) Viewed 2299 times
LCL trains for the mall go to the short station with wooden chests while LCCCCCL trains for e.g. electronic circuit boards go to the long station with the warehouses. By splitting the stations you can set a different provider threshold for each so it only ever provides when there are enough items for a full train.


There are other alternatives I can think about:

1) Simply set the provider threshold to 160. This does not prevent a short train from arriving and getting 40 stacks. You actually should have done that anyway because if you have 40 stacks of items spread over buffer chests for N wagons and a short train comes and wants 40 stacks then only 40/N stacks are available for loading the short train. You have to re-balance your buffer chests during loading to get 40 stacks loaded into a short train. (Or produce the rest of the 40 stacks while the train is on the way or waiting in the station).

2) Set the number of trains allowed for the station to min(1, items / 160 stacks). This prevents a second train from getting scheduled unless there are enough items there to fill the second train. But it also allows a short train to comes and get just 40 stacks if the station is idle.

3) Build short trains as LC and long trains as LLLCCCC... Now you can place 2 train stops so the first cargo wagon for both train types stops at the same place. And with 2 train stops you can use separate provider limits and min/max train sizes. You also need to add a bit of circuit logic to set the train limit to "N - #arriving trains" for both stops so you don't get too many trains. Unless you have a stacker large enough to hold max trains for both stops.

Note: The mall probably only needs 1 train so it's easy to split the max trains to 1 and N-1 for the two train stops.

Two train stops means you can also report the right amount of items available to each stop (only the chests for the first wagon for the short trains stop). But it still leaves the problem that a short train will unbalance your buffer chests.

chugin_iv
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Feb 23, 2021 2:22 pm
Contact:

Re: Threshold and Stack Threshold

Post by chugin_iv »

mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
If you set your threshold to handle 1 wagon trains then LTN will dispatch trains to carry 1 wagon trains worth of ore too. So if your station has 200 stacks then LTN will send a train for 160 stacks and a train for 40 stacks. You told it 40 stacks are enough to allow a train to come.
I also told it that my requester station requires 160 stacks, and it ignores that, so I call that a bug.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
There is no way to say that LTN should match request thresholds of 160 stacks with providers providing 160 stacks, i.e. an only-full-trains options. The request threshold is the minimum amount of items missing where LTN tries to get more. It's not a threshold for how full a train must be to be send.
THAT is a bug. Thresholds should affect each delivery.

For total provided/requested amount we have separate signal, no need to hijack thresholds for the secondary total amount.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
We might want such a setting but there isn't one. Once the request theshold is breached LTN tries to get new resources from any provider it can. Even if that means sending a train for 1 iron ore because some provider provides a single iron ore.
That's a waste on every level - train count, UPS, even train fuel.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
So my suggestion is to build separate stations for different train sizes like this:

multi-station.png

LCL trains for the mall go to the short station with wooden chests while LCCCCCL trains for e.g. electronic circuit boards go to the long station with the warehouses. By splitting the stations you can set a different provider threshold for each so it only ever provides when there are enough items for a full train.
I don't need that many trains at the mall to store that much resources in separate buffers of separate train stations for every resource.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
There are other alternatives I can think about:

1) Simply set the provider threshold to 160. This does not prevent a short train from arriving and getting 40 stacks.
What?! Why not?! It should!
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
You actually should have done that anyway because if you have 40 stacks of items spread over buffer chests for N wagons and a short train comes and wants 40 stacks then only 40/N stacks are available for loading the short train. You have to re-balance your buffer chests during loading to get 40 stacks loaded into a short train. (Or produce the rest of the 40 stacks while the train is on the way or waiting in the station).
Linked chests are a thing (with a mod), so that's not a problem.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
2) Set the number of trains allowed for the station to min(1, items / 160 stacks).
I think you meant max(1, items / 160 stacks), otherwise you'll never get more than 1 train, no matter your item count.

On that topic: why there's no "min" or "max" function on the combinators?
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
This prevents a second train from getting scheduled unless there are enough items there to fill the second train. But it also allows a short train to comes and get just 40 stacks if the station is idle.
And then why do I need LTN at all, after I set all my stations with circuitry to calculate train limits?..
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
3) Build short trains as LC and long trains as LLLCCCC... Now you can place 2 train stops so the first cargo wagon for both train types stops at the same place. And with 2 train stops you can use separate provider limits and min/max train sizes. You also need to add a bit of circuit logic to set the train limit to "N - #arriving trains" for both stops so you don't get too many trains. Unless you have a stacker large enough to hold max trains for both stops.

Note: The mall probably only needs 1 train so it's easy to split the max trains to 1 and N-1 for the two train stops.
That might be better than separate stop with separate buffer, even with the limitation that it seems to require odd number of locomotives on the long trains to align inserters with the wagons.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
Two train stops means you can also report the right amount of items available to each stop (only the chests for the first wagon for the short trains stop).
Not sure how I prevent LTN from double-counting my buffer on both stations and sending both trains when there's only 1 long train of resources available.
mrvn wrote: ↑
Mon Mar 20, 2023 3:39 pm
But it still leaves the problem that a short train will unbalance your buffer chests.
Again, not a problem with linked chests the length of an entire station.

torne
Filter Inserter
Filter Inserter
Posts: 341
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: Threshold and Stack Threshold

Post by torne »

A request threshold of N means "do not do any deliveries to this station until at least N items are being requested" - or to put it another way, ignore negative signals if they are not below -N.
A provide threshold of N means "do not do any deliveries from this station until at least N items are available" - or, ignore positive signals if they are not at least N.

That's all they do. If you have a requester that has an input signal of -100K ore and a threshold of 50K then that requester is eligible to receive deliveries of any amount between 1 and 100K ore - the threshold has been met, so the only number that then matters is the 100K being requested. The actual size of any particular delivery will be the lowest number out of the requested amount, the provided amount, and the capacity of the train.

This is just how LTN is designed, and unfortunately it means that there is no trivial way to ensure that deliveries are always full trains unless you can set all of the request and provide thresholds for a given product to at least the capacity of a full train.

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

Re: Threshold and Stack Threshold

Post by mrvn »

You seem under the assumption that request/provide thresholds are about trains. They are not. The thresholds are about the station. The provider or requester station becomes active when the threshold is breached.

LTN constantly looks for an active (above the threshold) requester station and matches that to an active provider station. Once it finds a provider having goods for a requester it looks for the biggest train that can carry at most "min(requested, provided)" items within the min/max train size limits of both stations. In your case "provided" is only 40 stacks so that's the amount you get even if "requested" is far larger. Note that that is the amount requested and provided. The threshold does not figure into the train calculations at all.

Again, the threshold is about when the station becomes a candidate for a delivery, not about the amount delivered. There is sadly no setting for that.


I think in your case simply set the provider/requester threshold suitable to the max train size instead of the min train size and you would be happy. That way LTN will always use full trains. The only drawback of this is that the mall will have to wait for 160 stacks to be smelted before it can take it's 40 stacks. But then you are left with 120 stacks and getting back to 160 will be quick for the next train.

Don't like to wait for the mall getting items? Want to prefer it to get items as soon as 40 stacks are available? Here is how you can do it:

Set the max train size to "1 + available items / 40 stacks" via arithmetic combinator and the provider threshold to 40 stacks. That way LTN won't be tempted to send a 4 wagon train for 40 stacks.

Bandicoot
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Sep 28, 2023 9:27 pm
Contact:

SOLVED Trains wants to load from requester station

Post by Bandicoot »

trains try to request items from a request station, which ofc it isnt meant to load the train but just o request items, it has been working fine for a while but now it is not. trains keeps coming embty to load from the station. is it because there are more items in the chest than the set treshold so that the trains wants to take away the eccess? if so, how do is stop them from doing so?
Image
PS, not sure if image is loading so here is the direct link from lightshot http://prntscr.com/yRELU8UXmHbq
Last edited by Bandicoot on Thu Sep 28, 2023 10:04 pm, edited 1 time in total.

Bandicoot
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Sep 28, 2023 9:27 pm
Contact:

Re: Trains wants to load from requester station

Post by Bandicoot »

okay i solved it, problem is that the default treshold for providing gets applied even to chests that are set to only request as they might have more items than they require, ence the trains try to keep the treshold at its value, emptying the eccess. this would be nice to toggle off with a simple checkmark, but it can be fixed by setting default tresholds so high no chest can ever provide enough, then specify the request for indivudual stations will override this default value.

i wont delete the post as it can be helpfull to someone who finds empty trainls all over the place as i had happen all of a sudden due to bots filling the chests past the trains tresholds.

FiveStarGeneraI
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Oct 26, 2023 3:40 pm
Contact:

Requestor LTN Stop being used as Provider Stop

Post by FiveStarGeneraI »

Train setup: 2 Locomotive, 8 Cargo

Train Stop marked as requestor ...
Encoded Network ID: 1
Limit Trains: 1
Request Stack Threshold <=: 320
Solid Rocket Fuel: -6400 (40stacks * 8wagons * 10stackAmt * 2loads)

Requests fine when low ...

When I had a bunch extra Solid Rocket Fuel, I dumped it into that warehouse that is connected to the LTN, making the warehouse have a total of 4 train loads, aka 2 EXTRA ... which then, seems to have turned the stop into a provider stop (even though I did not have a Provide Stack Threshold>=: 320), so a different stop requesting Solid Rocket Fuel (Depot stop to fuel the trains) tried to get 1 full train load from this Request Stop ...

I get it, that the LTN see's it as having enough to fill 1 train load ... but when there are specifically marked as Requestor OR Provider, they should only be those "type" of stops ... not both ...

Is this intended or a bug?

Thanks

User avatar
Nosferatu
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: Requestor LTN Stop being used as Provider Stop

Post by Nosferatu »

You can't mark a station as requester only.
standard provide threshold is 1000 I think.
So if you didn't set a higher one 6400 + 1000 = 7400 is enough that ltn thinks it's a provider.

You can raise that 1000 standard in modoption.
Or you can set a an absurdly high provide threshold in each requester to guard you against such mishaps.

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

Re: Threshold and Stack Threshold

Post by Optera »

Merged all requester turning into provider threads into threshold thread.

FiveStarGeneraI
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Oct 26, 2023 3:40 pm
Contact:

Re: Threshold and Stack Threshold

Post by FiveStarGeneraI »

Thanks, I will give that a try and see if it works ... for now I make sure I dump my excess inventory into a station I intentionally want to be a provider (I currently do the same concept of only limit "2 train loads" of resources inside the warehouse vs " a full warehouse" to reduce item count

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

Re: Requestor LTN Stop being used as Provider Stop

Post by mrvn »

Nosferatu wrote: ↑
Thu Oct 26, 2023 4:19 pm
You can't mark a station as requester only.
standard provide threshold is 1000 I think.
So if you didn't set a higher one 6400 + 1000 = 7400 is enough that ltn thinks it's a provider.

You can raise that 1000 standard in modoption.
Or you can set a an absurdly high provide threshold in each requester to guard you against such mishaps.
Yeah, I always change those to 1_000_000_000 because with larger stations or fluids a default of 1000 is absolutely pointless in preventing accidentally providing stuff.

I can also recommend the LTN combinator mod where you can set a provider/requester checkmark to get defaults matching the type of station. So MAX_INT for a requester station but 1000 (or whatever you set LTN default to) for a provider station.

Post Reply

Return to β€œLogistic Train Network”