Tresholds (R/P)? where am i thinking wrong?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Tresholds (R/P)? where am i thinking wrong?

Post by GrumpyJoe »

I have a small problem.
Request Threshold (optional) - Missing amount of items/fluids triggering a delivery. (global default=1000)
Provide Threshold (optional) - Amount of items/fluids required to act as provider. (global default=1000)
i have a very "wrong" setup, i´d just need to make room inside a block, but i wanted it to start to see how it goes

i have a provider that (for the moment) holds both slag and dirty barrels. Those two stack sizes are very different, so for the provider/requester chain of dirty barrels to the washing plant, i needed a provide treshold of 1000, otherwise even an Angel´s warehouse would get stuck with barrels only pretty quick.
So far so good.
provider.png
provider.png (57 KiB) Viewed 1753 times
Now as soon as i built my slag storage, trains started delivering ~1000 slag (when the initial slag pieces that built up while not carried away were gone) to that storage, where i have a treshold of 32k (minus 2 locked slots to prevent inserter junk, dont mind the X signal here)
requester.png
requester.png (67.86 KiB) Viewed 1753 times
Whats the point i dont get from the description? Shouldn´t it create schedules of 32000-400 slag?

Up until that point i thought i can do it all, create fluid stations that dont pollute the tank wagons, network IDs to not circle slag/crushed stone around its storage stations but rather pick up at #2, store it and deliver at 4#. I can make smart stations with filter inserters that stop working when a train is filled according to its schedule with using station output signal.... but here I am stuck at this very basic thing.
Im probably just banging my head against a wall, where all i had to do was walk through an obvious door... :roll: Am i just tired? Is this the real world?


Thinking about it again, i figured that its for cargo hold, so you dont try to fill more than it can hold, so its rather a limit than an actual request.
But then again, LTN can see the stacks of a wagon and do the math (red X signal)
And from the description i thought provide treshold is the point at which it starts feeding into the network, but request treshold is the mininum it requests

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

Re: Tresholds (R/P)? where am i thinking wrong?

Post by eduran »

Request threshold limits are used to decide when the request from the station is "broadcast". So in your case, you have to wire -32k or less of an item signal into it for anything to happen. Once below that threshold, the station will take what it can get. If 32k are available (+a large enough train), that is what's going to be delivered. If less is available, the delivery will be smaller.

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

Re: Tresholds (R/P)? where am i thinking wrong?

Post by Optera »

LTN tries to always fulfill requests.
While your slag storage has below -32k slag LTN will grab any slag it finds, starting with highest priority then highest count, to ship it there.
A provider is eligible for anything above provide threshold. In your example it seems it had just above 1k slag so LTN happily shipped that.

There are some exceptions, but generally as rule of thumb:
Requesters trigger deliveries.
The lower of both thresholds limits minimum delivery size.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Tresholds (R/P)? where am i thinking wrong?

Post by GrumpyJoe »

Thanks alot!

Boy was i on the wrong path. shows i shouldn´t play after a day of only numbers in the office

Think Optera will understand when i say Ich hab den Wald vor lauter Bäumen nicht gesehen ;)

So, the solution is: dont mix up storage with stack sizes that different. Or negate slag, when its below 32k. Yummy, more circuitry!

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

Re: Tresholds (R/P)? where am i thinking wrong?

Post by Optera »

GrumpyJoe wrote:
Thu Feb 07, 2019 4:53 am
So, the solution is: dont mix up storage with stack sizes that different. Or negate slag, when its below 32k. Yummy, more circuitry!
Yes, mixing cargo of vastly different potential capacities requires extra circuitry or dedicated stops.

The naive way is a decider slag > slag_capacity output slag: input count
This method however can trigger a 32k delivery instantly followed by a 1k delivery when you have 33k.

To prevent the above I like to abuse factorio's divisions truncation to always get multiples of train capacity. This takes 2 arithmetic combinators for every item.
Barrels=(Barrels/barrel_capacity) * barrel_capacity
Slag=(Slag/slag_capacity) * slag_capacity

Post Reply

Return to “Logistic Train Network”