Example station setup questions

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
Bixbite
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Mar 10, 2018 6:40 am
Contact:

Example station setup questions

Post by Bixbite »

I've got a decent understanding of LTN, but I'm trying to understand everything. I'm looking at the examples in this post and this reddit post, and getting lost on several points. Generally, I've got plenty of info on how to do things, but not why they're done.

1) On the requester station, there's an arithmetic combinator multiplying each input by -1; what is its purpose? The only input is the train composition, is it not?

In the reddit post, there's a "junk provider" station for cleaning up left over items:
2a) Are left over items a common problem? Will I regret it if I don't unload cargo at my depots?
2b) How does this junk station know what to provide, i.e. what random items have ended up in the storage chest?

3) Would it be accurate to say that stops are not explicitly declared "provider" or "requester", i.e. a requester could technically provide too if no other providing stations are available, since the default provide threshold is 1000? I assume this is why that reddit post suggests explicitly setting the provide threshold to the max value, to prevent resources ever being taken back out of the station?

I'm sure I have other questions, but I'll leave it at that for now, thanks for any help!

User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1603
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Example station setup questions

Post by jodokus31 »

Bixbite wrote:I've got a decent understanding of LTN, but I'm trying to understand everything. I'm looking at the examples in this post and this reddit post, and getting lost on several points. Generally, I've got plenty of info on how to do things, but not why they're done.

1) On the requester station, there's an arithmetic combinator multiplying each input by -1; what is its purpose? The only input is the train composition, is it not?
From the stop output (combinator), you get the desired train inventory and from the stop itself, you get the actual train inventory. So, actual - desired control the filter inserter. As long as actual > desired, the filter inserters work (indiviual for all items)
For a requester station, the desired train inventory is most of the time "nothing". But if you have anything other in the train by accident or whatever, it helps to unload only the proper amount of the proper item
Bixbite wrote:
In the reddit post, there's a "junk provider" station for cleaning up left over items:
2a) Are left over items a common problem? Will I regret it if I don't unload cargo at my depots?
2b) How does this junk station know what to provide, i.e. what random items have ended up in the storage chest?
If you do everything always correctly in the correct order, while setting up stations, it's probably not needed. But there can be small things like "slots reserved per wagon" set too low, etc.
Otherwise you have to check from time to time and collect leftovers manually and potentially clean wrong items contaminating the factories. Why not automate it :).
The provider simply provides the content of the chests, whatever it is. Whenever it gets requested, then this station will be the first, which provides, because of the high provide priority.
The provider should be capable to provide anything and only load the desired items
Bixbite wrote: 3) Would it be accurate to say that stops are not explicitly declared "provider" or "requester", i.e. a requester could technically provide too if no other providing stations are available, since the default provide threshold is 1000? I assume this is why that reddit post suggests explicitly setting the provide threshold to the max value, to prevent resources ever being taken back out of the station?
If you set up a station, you are also placing the inserter facing in a certain direction (load or unload, or maybe both). This also defines, if the stop should request or provide or both.
You cannot provide from a pure requester station, because you cannot load items into the train with inserters facing in the wrong direction.
So its better to ensure, that the stop never provides anything beyond the threshold by setting it very high (1000 is not very much)

Bixbite
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Mar 10, 2018 6:40 am
Contact:

Re: Example station setup questions

Post by Bixbite »

Thanks for the details! That certainly clears some things up.
jodokus31 wrote:From the stop output (combinator), you get the desired train inventory
Ok, I suspect I know where I confused myself - bear with me. If a train arrives carrying 5000 iron + 5000 copper, and is here to deliver iron (not sure why it would have both items, but lets play along) then the stop output (combinator) will output "copper=5000", so that it stays on the train, correct? I think what I did was wait for a train in the demo map to roll up and start unloading, then threw a stack of something else in to see if it would stay on the train or not, but I'm guessing the stop output doesn't update after the train has arrived, since this isn't intended behaviour, which is why the stack I added was taken off the train?
jodokus31 wrote:Otherwise you have to check from time to time and collect leftovers manually and potentially clean wrong items contaminating the factories. Why not automate it :).
You're not wrong, Factorio plays are never flawless. :P I think I'd at least set up unloading at depots with a speaker alert, so I can investigate when it happens the first few times.
jodokus31 wrote:The provider simply provides the content of the chests, whatever it is.
I'm still not sure how it knows what the contents are though; in that junk station example, no wires are connected to the chest. Does LTN simply know when a chest is adjacent to a station?

I'm just noticing now that the provider station example in the reddit post isn't specifying a "provided items" signal. What would the purpose of that signal be? Does it limit what can be provided to the signal(s) you set, otherwise allowing anything that comes up in the circuit network to be provided?
jodokus31 wrote:You cannot provide from a pure requester station, because you cannot load items into the train with inserters facing in the wrong direction.
Ah of course, I was so wrapped up in the logic behind it I didn't see the obvious!
jodokus31 wrote:So its better to ensure, that the stop never provides anything beyond the threshold by setting it very high (1000 is not very much)
If the stop can't be a provider, why doesn't setting the provider threshold matter? Will it still try to provide if you leave it at 1000, but fail because there are no loading inserters, trapping the train in the station?

User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1603
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Example station setup questions

Post by jodokus31 »

Bixbite wrote:Thanks for the details! That certainly clears some things up.
jodokus31 wrote:From the stop output (combinator), you get the desired train inventory
Ok, I suspect I know where I confused myself - bear with me. If a train arrives carrying 5000 iron + 5000 copper, and is here to deliver iron (not sure why it would have both items, but lets play along) then the stop output (combinator) will output "copper=5000", so that it stays on the train, correct? I think what I did was wait for a train in the demo map to roll up and start unloading, then threw a stack of something else in to see if it would stay on the train or not, but I'm guessing the stop output doesn't update after the train has arrived, since this isn't intended behaviour, which is why the stack I added was taken off the train?
Yes, I guess, it is updated, when creating the schedule. Not sure. You can try to fill random items in the train at the depot and observe what happens. (No warranties ;))
Bixbite wrote:
jodokus31 wrote:Otherwise you have to check from time to time and collect leftovers manually and potentially clean wrong items contaminating the factories. Why not automate it :).
You're not wrong, Factorio plays are never flawless. :P I think I'd at least set up unloading at depots with a speaker alert, so I can investigate when it happens the first few times.
jodokus31 wrote:The provider simply provides the content of the chests, whatever it is.
I'm still not sure how it knows what the contents are though; in that junk station example, no wires are connected to the chest. Does LTN simply know when a chest is adjacent to a station?

I'm just noticing now that the provider station example in the reddit post isn't specifying a "provided items" signal. What would the purpose of that signal be? Does it limit what can be provided to the signal(s) you set, otherwise allowing anything that comes up in the circuit network to be provided?
Im not sure either, how this reddit example works. My own junk provider is a regular provider station with connected chests to the input and a low provide threshold. Maybe the author forgot to connect the chest? Or there is some fancy trick to connect the logistic network? (By the way: Providing whole logistic networks is not recommended, because, the more different items are provided through LTN, the more the performance will suffer. And the most of those items wont be requested anywhere)
Bixbite wrote:
jodokus31 wrote:You cannot provide from a pure requester station, because you cannot load items into the train with inserters facing in the wrong direction.
Ah of course, I was so wrapped up in the logic behind it I didn't see the obvious!
jodokus31 wrote:So its better to ensure, that the stop never provides anything beyond the threshold by setting it very high (1000 is not very much)
If the stop can't be a provider, why doesn't setting the provider threshold matter? Will it still try to provide if you leave it at 1000, but fail because there are no loading inserters, trapping the train in the station?
The stop always acts as requester/provider and doesn't care about the inserters. if an amount of > 1000 is wired to input, it will provide. If a train is not served, it will timeout i think after 120 seconds.

Bixbite
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Mar 10, 2018 6:40 am
Contact:

Re: Example station setup questions

Post by Bixbite »

It appears the stop output signals are set the moment the train arrives. So yes, when I threw a stack in during unloading, that was too late, but when I added a stack to the train before it arrived at the station, it was not unloaded. Makes sense now.

I'm going to assume the storage chest in the reddit post's junk provider is supposed to be wired to the input lamp, and leave it at that. :D Also, I never liked hooking up logistics network contents to circuit networks anyway, since carried items aren't counted, but good to know there's a performance hit too.

New question: in the LTN demo map, the provider stations have an arithmetic combinator set to "item * -12" and then wired to the inserters that fill up the buffer chests with the enabled condition "everything < 2". I haven't been able to wrap my head around that part at all; is the -12 because there are 12 buffer chests? Why have an enabled condition on those inserters at all, instead of letting them always be on to fill the buffer chests?

User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1603
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Example station setup questions

Post by jodokus31 »

Bixbite wrote: New question: in the LTN demo map, the provider stations have an arithmetic combinator set to "item * -12" and then wired to the inserters that fill up the buffer chests with the enabled condition "everything < 2". I haven't been able to wrap my head around that part at all; is the -12 because there are 12 buffer chests? Why have an enabled condition on those inserters at all, instead of letting them always be on to fill the buffer chests?
Without looking at the demo map, I would assume, its used for loading the chests equally. 12 is the number of chests. This is rather important to ensure a fast loading speed to the train, which is the time critical thing.
If the chests are filled unevenly, then it ends up, that you only load the train with one or 2 inserters. Alternatively, you have to balance the lanes to each chest before, which can get big.
I'm currently using those 6x6 warehouses, which is far easier to handle. For 2 cargo wagons, I only need to equalize 2 warehouses next to each other.
There is also a merge chests mod, which allows to treat all chests as one.

Ringkeeper
Fast Inserter
Fast Inserter
Posts: 141
Joined: Wed Feb 03, 2016 7:16 pm
Contact:

Re: Example station setup questions

Post by Ringkeeper »

One of the garbage stations in the LTN station threads is mine, so i can explain :D

Its a normal provider station from the bluebook with all the LTN stations plus the filter by Optera, so you can filter out the fuel that you deliver to depots. Otherwise you create endless loops.

If you use the depots from the bluebook, the left over things get unloaded into active provider chests. You just need to make sure, that your whole depot is one logistic network.
Then the provider will request the stuff from the active provider chests :)

Why things get transported to depot? Many reasons... you request already on new build station (due to blueprints etc) before you connected the rails... after some time, trains time out and new one gets send. So if you don't catch the mistake fast, you end up with 5+ trains that want to deliver to that station and maybe a huge traffic jam. and then they will return to depot as they can't unload everything (as chests are full).

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

Re: Example station setup questions

Post by mrvn »

Bixbite wrote:It appears the stop output signals are set the moment the train arrives. So yes, when I threw a stack in during unloading, that was too late, but when I added a stack to the train before it arrived at the station, it was not unloaded. Makes sense now.

I'm going to assume the storage chest in the reddit post's junk provider is supposed to be wired to the input lamp, and leave it at that. :D Also, I never liked hooking up logistics network contents to circuit networks anyway, since carried items aren't counted, but good to know there's a performance hit too.

New question: in the LTN demo map, the provider stations have an arithmetic combinator set to "item * -12" and then wired to the inserters that fill up the buffer chests with the enabled condition "everything < 2". I haven't been able to wrap my head around that part at all; is the -12 because there are 12 buffer chests? Why have an enabled condition on those inserters at all, instead of letting them always be on to fill the buffer chests?
I haven't seen the map but I'm assuming this should be "each / -12 = each". That computes the average content of the 12 chests rounded down and negative. If you wire that to all inserters and also wire each chest to each inserter with the other wire color and add enabled condition "everything < 2" then each buffer chest will only get items if it doesn't exceed the average by 2.

Post Reply

Return to “Logistic Train Network”