#LTN sending too many liquid trains

1 messages · Page 1 of 1 (latest)

delicate orbit
#

In our SE playthrough, we notice that even though are liquid requests seem filled, we still sometimes receive an additional (or more) train. Because the storage tanks are already full, the train is not able to empty its cargo before the two minute timeout is reached. This causes the train to return to the depot with its contents. In the pictures are our wiring setup and the combinator settings. Do you have any idea what could cause this problem?

clear wasp
#

What do the requesters look like?

delicate orbit
#

I'm not sure what you mean with the requesters. The first pic shows the combinator in question with the requests in the second one

clear wasp
#

Ah, figured that was the provider station, given that it has a provider threshold

delicate orbit
#

Yeah that is sort of a safety switch so trains don't go there to load liquids

clear wasp
#

Right... Set a requester threshold too, and a provider threshold on the provider, matching the capacity of your trains

#

Right now I'll guess it dispatches a bunch of trains for a tiny load, they get filled completely because loading does not respect the requests, and the requester station overflows

delicate orbit
#

that makes sense

#

i'll give it a shot

#

i figured the train size itself would sort that

#

like this then? my trains are only 1 wagon

clear wasp
#

Yes, though that will give issues with the current request size

#

You're requesting up to half a wagon and demanding it not send a train until it needs a full wagon

#

Easiest solution is to increase the request, but you could also lower the threshold and change your provider stations so they stop loading the train once it has what it requests

delicate orbit
#

we only let trains ride when they can bring a full load to reduce unnecessary traffic

#

just to make sure I understand correctly: that -10k means the train requests a 10k load? I've always assumed it meant that that was the threshold for when a train gets sent

clear wasp
#

Yes, that's the maximum amount of material you want at the station

#

You then subtract however much is already at the station to get the actual request (or well, add to the negative number, really)

#

Say the request is set to -10k, and the station has (+)6k, LTN will see a demand for 4k items. If that is above the request threshold, it will try to send a train carrying 4k items

delicate orbit
#

right, that I understand. and we have set a provide threshold of a full train so circumvent the half full train problem

clear wasp
#

Yup

#

Though if you only have a provide threshold, but no requset threshold, LTN may still send a train for a small amount of items

#

It simply sees that the requester wants that small number of items, and that the provider is capable of providing it

delicate orbit
#

Could it send another one in the time the first one is on the way because the request isn't filled yet?

clear wasp
#

Yes

delicate orbit
#

I think I'm starting to get it. Correct me if I'm wrong:

#

No I don't get it

delicate orbit
#

Then there would be a continuous request for trains until the request was filled

clear wasp
#

Eh, I think something got lost along the way

#

A train that is currently on the way to the station will effectively have its expected cargo added to the inventory of the requester and subtracted from the inventory of the provider if it hasn't gotten there yet

delicate orbit
#

So far so good

clear wasp
#

So if LTN sends a train to a provider to pick up 10k items, and that provider has 15k in storage, LTN will treat that provider as if it has 5k items as soon as the train is dispatched

#

Effectively, that stops it from sending too many trains

#

If a requester is drained of items fast enough though, LTN can definitely have multiple trains on the way at once

#

And to finish that thought: if those trains are all carrying way more than LTN is expecting them to (due to missing requester thresholds), it can easily overflow the requester

delicate orbit
#

I think I'm still with you

#

but how do request thresholds fix that?

#

I don't get how the fluid threshold and the request threshold connect to each other

clear wasp
#

They force LTN to wait until the requester has space to unload a full train, at which point it will simply send a full train because that's how much the station is missing

#

Space in its request value that is, not space in its storage buffer. That's your responsibility

#

Request threshold basically is how many items the station needs to be missing from the request value before a train is sent

#

So if the request is 10k and the threshold is 6k, LTN will only send a train once there are 4k items left (6k below the request)

delicate orbit
#

Would just setting a fluid request and request threshold of 25k be a simple solution?

clear wasp
#

Then it will only send a train once the station is completely dry

delicate orbit
#

We have 2 storage tanks as a station

clear wasp
#

You'll want some difference between the request and threshold to make sure the station can keep running while a train is coming

#

With 2 tanks you could set the request to -40k

#

Or anything up to -50k, really

delicate orbit
#

so you dont run dry

clear wasp
#

15k even, yes

#

Once you reach 15k fluid left, it will send a train to get the station back up to the request value, for which it needs 25k or a full train

delicate orbit
#

We talked it through and we think we almost get it

#

We now understand why the request was overfilled, but how come we then got several trains? There have been situations where two trains were sent, the first train couldn't even empty its cargo, so the second train had no chance at all

delicate orbit
clear wasp
#

If there is no threshold it can send a train for whatever the global minimum is, usually a few k

#

So as soon as the requester is missing more than that, a train is sent

delicate orbit
#

Assuming another provide threshold is met then?

clear wasp
#

Yes, assuming the providers are completely filled

#

you can also have the inverse scenario when you have set only request thresholds and your providers are running low. The outcome is the same: LTN will send a train to pick up a tiny load as soon as the provider has more items than the global provide threshold

#

That's why you need both provide and request thresholds

delicate orbit
#

maybe the tl;dr is we were lazy

clear wasp
#

lol

delicate orbit
#

the reason why we didnt run into trouble with items is because we have warehouses there, so the cap was almost never reached

#

it fits

#

..in more ways than one

clear wasp
#

lol

#

Ideally you'd set thresholds everywhere, limit loading to whatever the train requests (including item type) and use filter inserters for unloading

#

That way your setup should be pretty foolproof

delicate orbit
#

we're gonna retroactively add request thresholds everywhere

#

which brings me to another question: how does that work with stations which have both items and fluids?

clear wasp
#

Poorly shoob

#

I've found it's best to avoid that altogether

delicate orbit
#

we're in too deep for that

#

does either stack or count threshold overrule the other?

clear wasp
#

I'm not sure tbh

delicate orbit
#

Would you mind talking us through one example to drive it home?

clear wasp
#

Of what, exactly?

#

Have a specific scenario in mind?

delicate orbit
#

of a provide/request scenario

clear wasp
#

How about this graphic from the LTN manual?

#

May have to open that in browser, it's kinda horrible, lol

#

To make some things clear there: the requester has a request of 128k and a request threshold of 15k, the provider has a provide threshold of 15k

delicate orbit
#

Maybe it will make sense with what you told us because it was always difficult

clear wasp
#

The vertical blue and orange bars show a bunch of possible inventories for both of the stations, and the arrows between them show what happens for each of the combinations of the two

delicate orbit
#

it does make more sense now

#

From what it seems, stack threshold seems to > count threshold

clear wasp
#

Even if the number of items it sets is lower?

delicate orbit
#

We had an item request of 1k, a stack threshold of 10, a count threshold of 25k (for fluids)

#

When we had 224 items in a warehouse, a train with a request of 776 items was sent

delicate orbit
#

We changed everything to what you suggested

#

Seems to work well