Page 2 of 2

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

Posted: Wed Feb 14, 2018 4:11 pm
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.

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

Posted: Wed Feb 14, 2018 4:23 pm
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.

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

Posted: Thu Feb 15, 2018 11:55 am
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.

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

Posted: Fri May 04, 2018 12:59 pm
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?

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

Posted: Fri May 04, 2018 1:11 pm
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.

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

Posted: Fri May 04, 2018 1:21 pm
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!

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

Posted: Mon May 07, 2018 8:59 am
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.

Managing LTN Trains with "Encoded Positions of X" Signals

Posted: Thu Oct 26, 2023 9:47 pm
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 761 times

And everything works fine, except this little guy keeps showing up.
Shorty Train.png
Shorty Train.png (384.75 KiB) Viewed 761 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 761 times

Any constructive advice or references would be greatly appreciated.

Have a wonderful day!

-- Jeff Sorensen

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

Posted: Fri Oct 27, 2023 6:20 am
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.