Restrict trains to certain resources only?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
Malidictus
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jan 18, 2020 11:24 pm
Contact:

Restrict trains to certain resources only?

Post by Malidictus »

I finally managed to get a train network set up, after reading through the manual and watching some tutorial videos. From what I can tell, trains are chosen to complete a delivery based on their composition. Is it possible to set restrictions on individual trains based on what they're allowed to carry? I saw an option in the Options menu about resetting train car cargo limits, but I'm not sure if me manually setting cargo limits will really help. Does the LTN network even read filters, or would it send a train with slots filtered for copper to an iron Provider?

To offer a bit more context, I'm trying to upgrade my existing train network to LTN. Right now, I have dedicated trains for Coal, Iron, Copper and so on. With LTN, it seems like any train with box cars would be applicable to every kind of bulk cargo. I suppose it's possible to set up multiple networks on multiple "channels" for each, but that grows the complexity of the system dramatically. I just fear my trains failing to unload at a station because I messed something up about the unloaders or throughput or balancing or whatever, leaving with cargo still on board back to the Depot, then delivering it to another station of the wrong kind.

Is there any way to ensure trains only pick up their own cargo?

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

Re: Restrict trains to certain resources only?

Post by Optera »

LTN is designed to reuse trains wherever possible. Limiting trains to one resource per train by NetworkID and length, while possible, removes the primary reason to use LTN.

If you are afraid of being unable to build safe stations check my designs here: viewtopic.php?p=297643#p297643

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

Re: Restrict trains to certain resources only?

Post by Malidictus »

Optera wrote:
Sun Jan 19, 2020 7:40 am
LTN is designed to reuse trains wherever possible. Limiting trains to one resource per train by NetworkID and length, while possible, removes the primary reason to use LTN.

If you are afraid of being unable to build safe stations check my designs here: viewtopic.php?p=297643#p297643
Got it! Thank you for the response. I'll check that thread and examine the designs provided.

*edit*

Further question, then: In one of the tutorial videos, I think Diablo mentions removing the mandatory leave timer when unloading to ensure trains never leave Requester stations with leftover cargo still on-board. I know there were some corrections to that video, but that suggestion wasn't among them. Are there any specific downsides to doing this, aside from maybe trains being stuck on stations if I do my request thresholds badly or else fail to balance output buffers (which I have in the past)?

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

Re: Restrict trains to certain resources only?

Post by Optera »

Forcing trains out of stations is something every player has to decide for themselves.
I prefer trains always returning to depot and handle left overs there.
pro: trains never lock down stations
con: finding which station had a problem is more difficult

Others seem to prefer trains being stuck where the problem occurred.
pro: finding which station had a problem is simpler
con: trains lock down stations

Beside changing global stop timeout, LTN also supports circuit control signals: red forces trains to stay in a station while green forces trains out.

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

Re: Restrict trains to certain resources only?

Post by Malidictus »

Fair points, thank you. As an old Transport Tycoon player, my sense is to leave trains stuck at stations and resolve problems locally as I see them, though obviously that could cause issues of congestion. I'll play around with "filtered stations" and see what comes of it, though. Thank you for the examples. I'm still not exactly sure how to handle station return signals (have to do a bit more research on my end), but if I can read "expected train contents" then feed that to filtered inserters, that might be a nice fallback in case bad things happen.

How does the system handle trains stuck at stations, incidentally? I recall seeing a timeout of 10 minutes after which trains are considered "lost," but I assume this only applies for during transit. Will a stuck train cause another one to be issues?
Optera wrote:
Sun Jan 19, 2020 1:01 pm
Beside changing global stop timeout, LTN also supports circuit control signals: red forces trains to stay in a station while green forces trains out.
This one actually went a little over my head. Do you mean I can feed a red signal with a positive value to the train station (passed to the train) to keep it from leaving and a green signal with a positive value to force it to leave? I'm still a bit iffy on what's input and what's output :)

Also, if these questions start to get irritating, feel free to disregard. I don't want to become a nuisance. Just trying to get a bit more intuitive understanding, is all. Thank you regardless.

Sopel
Inserter
Inserter
Posts: 35
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Re: Restrict trains to certain resources only?

Post by Sopel »

I would consider having a train in depo with any resources to be a bug in one's railway network. It should always be ensured that providers load only as much as is requested and requesters have enough space to unload everything. Instead of doing complex filtering when unloading and handling unwanted materials in depo I disable a depo train stop when the train parked at it contains any items (and i issue a programmable speaker warning). Then I can use LTN Tracker to see which station malfunctioned and the misloaded train doesn't break anything.

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

Re: Restrict trains to certain resources only?

Post by Malidictus »

Sopel wrote:
Mon Jan 20, 2020 6:29 pm
I would consider having a train in depo with any resources to be a bug in one's railway network. It should always be ensured that providers load only as much as is requested and requesters have enough space to unload everything. Instead of doing complex filtering when unloading and handling unwanted materials in depo I disable a depo train stop when the train parked at it contains any items (and i issue a programmable speaker warning). Then I can use LTN Tracker to see which station malfunctioned and the misloaded train doesn't break anything.
Yeah, I think I'm going to have to do something of this nature, as well, though probably less complex. I was having balancing issues with my fluid unloading station - pipes would constantly leak into the tanks, causing volume calculation issues. I'll need to do a better job at load balancing between tanks and boxes. But you're right - unintended leftover stuff inside trains would definitely be a flaw in my own stations, no doubt about it. I just need some kind of fail-safe solution, where the problems caused are simple to solve and troubleshoot once I discover them. I think for the time being I'm going to disable the unload timer fallback and try to redesign my oil loading and unloading stations to avoid having to account for pipes.

Thanks for the perspective, though - it's much appreciated.

Sopel
Inserter
Inserter
Posts: 35
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Re: Restrict trains to certain resources only?

Post by Sopel »

It's not complex at all! That's the best part. The only thing one has to do is set the depo stop to "Read train contents" and "Enable/disable" on Anything>0. Wires only required if you want the programmable speaker part.

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

Re: Restrict trains to certain resources only?

Post by Malidictus »

Sopel wrote:
Tue Jan 21, 2020 12:52 am
It's not complex at all! That's the best part. The only thing one has to do is set the depo stop to "Read train contents" and "Enable/disable" on Anything>0. Wires only required if you want the programmable speaker part.
My understanding of the enable/disable option was that it creates an "enable" logical check. If I set that check to "any train contents" > 0, wouldn't that keep the station permanently disabled unless a train with cargo stops on it... which it might not be able to do on a disabled station? Wouldn't a <= 0 check work there, since it would trip all of the time but fail to trip if a train has cargo?

But I think I see what you mean, though. Disable the Depot station to prevent the train from being called out and so it's marked in red on the map. That's pretty clever :)

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

Re: Restrict trains to certain resources only?

Post by Optera »

Disabling stops only works in the most basic depot design. When building stacker depots disabled stops will prevent trains from pathing into the stacker.
For stacker depots remove the depot control signal as seen in Depot for LTN 1.10.13

Sopel
Inserter
Inserter
Posts: 35
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Re: Restrict trains to certain resources only?

Post by Sopel »

Malidictus wrote:
Tue Jan 21, 2020 1:46 am
Sopel wrote:
Tue Jan 21, 2020 12:52 am
It's not complex at all! That's the best part. The only thing one has to do is set the depo stop to "Read train contents" and "Enable/disable" on Anything>0. Wires only required if you want the programmable speaker part.
My understanding of the enable/disable option was that it creates an "enable" logical check. If I set that check to "any train contents" > 0, wouldn't that keep the station permanently disabled unless a train with cargo stops on it... which it might not be able to do on a disabled station? Wouldn't a <= 0 check work there, since it would trip all of the time but fail to trip if a train has cargo?

But I think I see what you mean, though. Disable the Depot station to prevent the train from being called out and so it's marked in red on the map. That's pretty clever :)
Yea, it needs to be "Everything <= 0", so the logical negation. I always make this mistake for some reason ;D
Optera wrote:
Tue Jan 21, 2020 7:55 am
Disabling stops only works in the most basic depot design. When building stacker depots disabled stops will prevent trains from pathing into the stacker.
For stacker depots remove the depot control signal as seen in Depot for LTN 1.10.13
okay. I'm using unique names for each depo so I don't need any chain signals nor stackers to maintain throughput there. I didn't consider other options

Post Reply

Return to “Logistic Train Network”

Who is online

Users browsing this forum: No registered users