What is "Locked Slots per Wagon" and "Train composition"?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

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

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by Optera »

knightofrust wrote:How exactly does the locked slots feature work? I have a station with a constant combinator providing 'locked slots = 39' signal at its input, but when the train came its wagons had no locked slots at all.
It marks that number as locked internally. In your example LTN will see only 1 slot per wagon and calculate delivery size accordingly.

knightofrust
Inserter
Inserter
Posts: 23
Joined: Fri Feb 13, 2015 10:45 am
Contact:

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by knightofrust »

Optera wrote:
knightofrust wrote:How exactly does the locked slots feature work? I have a station with a constant combinator providing 'locked slots = 39' signal at its input, but when the train came its wagons had no locked slots at all.
It marks that number as locked internally. In your example LTN will see only 1 slot per wagon and calculate delivery size accordingly.
But the train stood still and got loaded with much more items than a single slot can hold.

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

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by mrvn »

Check the messages it shows when sending a train. It will show a pickup of one stack (only 50 coal or 100 plates). Then when the train is at the station check the yellow constant combinator from the LTN stations. It will show the train composition and only one stack of items. It is then your job to stop loading items when the train contents >= requested amount.

"Locked Slots per Wagon" is maybe misnamed. It's the number of slots LTN should ignore so that you can overload the wagon. Because making the inserters load an exact count is hard.

RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 347
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by RocketManChronicles »

Hi, I just started using this mod and the save map and the Nilaus videos were very helpful getting started. I am trying to convert my base over to LTN, as it is much easier to manage and maintain than having 100+ manual train schedules. Anyway, I am beyond getting several different depots going and moving resources around in a much smarter way. (Thank you!)

However, I am concerned that trains may be scheduled wrong if I do not control a few more things. I have one depot with L-8T-L trains and another elsewhere with L-8C-L trains. I am afraid that a L-8C-L train is going to be scheduled to a station only tank cars can go. So, do I use the car encoding (this thread) to limit the trains scheduled to the requestor station (oil pickup) to have only tank cars? Is that how I approach solving this problem? Likewise, I apply the same vice versa so that a tank train does not go to a cargo station? I think Nilaus shows some of this in his series, I will hav eto check out those episode from a few months ago, maybe those will help?

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

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by Optera »

You can safely mix fluid and cargo wagons of different capacities and train lengths, LTN will pick the best fitting match for each delivery.
LTN reads train capacities separately from train composition whenever a train enters a depot.

Encoding is read only.
It was added to allow players building smart station/depot designs able to service trains of different compositions.
Since inserters can no longer snatch fuel out of locomotives it' can be mostly ignored.

RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 347
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by RocketManChronicles »

Ok, that makes sense. I may be back in looking at smart train stations as I do see value in the complexity of smart systems. Thank you for the prompt reply!

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

Re: What is "Locked Slots per Wagon" and "Train composition"?

Post by mrvn »

Small tips:

1) Ignore train composition completely.
2) Build trains of the same length all the same way, e.g. locomotive at the front and back, cars in the middle. Having a cargo train and a fluid train of same length is fine.
3) Build a depot for every size of train and train composition and name them differently (one cargo and one fluid depot per size is sufficient). Now you know exactly where the locomotives will be and can refuel them without complex circuit logic.
4) If you mix cargo/fluid trains make them single headed or palindrom. Actually make all double headed trains palindrom or 3 doesn't work.

Delugeia
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Oct 23, 2023 12:53 am
Contact:

Managing LTN Trains with "Encoded Positions of X" Signals

Post by Delugeia »

Hello Friends,

I am having a problem understanding the "Encoded Positions of X" signals for managing trains of different lengths. I have watched a bunch of videos, tried to read through the documentation, and even consulted ChatGPT, but to no avail. I'm hoping someone here can point me in the right direction.

In short, I want certain stations to only allow trains of a specific configuration of Locomotives (L), Cargo Wagons (C), and Fluid Wagons (F). For example, I have an Iron Plate station and I only want trains matching: "L C C C C L"; which, if I remember anything from my Com Sci classes, would be: "L 33, C 30".

This is what my combinator looks like for the requestor station.
Combinator Settings.png
Combinator Settings.png (25.97 KiB) Viewed 627 times

And everything works fine, except this little guy keeps showing up.
Shorty Train.png
Shorty Train.png (384.75 KiB) Viewed 627 times

I've also tried using the "Encoded Positions of EVERY X" signals (the ones with the red signal backgrounds). But those didn't seem to work either.
Options.png
Options.png (24.73 KiB) Viewed 627 times

Any constructive advice or references would be greatly appreciated.

Have a wonderful day!

-- Jeff Sorensen

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

Re: Managing LTN Trains with "Encoded Positions of X" Signals

Post by Optera »

Use Network ID and train length to filter trains.

Encoded Position is read only for smart loading/unloading.
Position signals are direction dependent, while trains only have a concept of front and back during travel.
e.g. <L-CC-<L-L> can't be distinguished from <L-L>-CC-L> until the train starts moving.

Post Reply

Return to “Logistic Train Network”