Page 1 of 2

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

Posted: Thu Sep 07, 2017 10:07 am
by tpreissler
Hi,

first of all, many, many, many (...) thanks for LTN. It's been great. Mine is now up and running and working flawlessly.
I do have a couple of questions though.... :-) and I couldn't find this in the doc:

* "Locked SLots per Wagon": What is this for? I find in on a couple of places in the forum, but cannot get my head around it what it is for.
* "Train composition": I take it you enocde the train composition in binary, in my case for L-CCCC-L trains it would be 100001. What's that used for? Is it used in the Depot for loading with fuel, ie. only locos get fuel?
* I understand the requester chest at the Depot in the Demo Map, this is requesting and loading fuel. But there is also a passive provider unloading items. Is it just to ensure cargo is unloaded and so empty or is there
some special meaning behind it?

Apologies for some questions where the answer might be obvious, I am just at my first freeplay and ... still playing. Launched a couple of rockets, maybe 8, each takes about 20 minutes to build :-(.


Cheers

Tom

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

Posted: Thu Sep 07, 2017 12:58 pm
by tpreissler
I found some answers in the parallel thread"Quick Question about merged transports".

"Locked Slots per Wagon" is the same as you can do with the "X" on a chest to limit its size.
"Train composition" is mentioned more or less in the same way, no use case.

I guess I have a look at the Demo map and try reverse engineering it... :-)
It must be there for a reason.

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

Posted: Thu Sep 07, 2017 1:44 pm
by Optera
Locked Slots per Wagon:
Marks the set number of slots are reserved in each wagon for every train going to the provider it's set for.
Used to prevent inserters from getting stuck with items in hand after failing to insert into a wagon.

Example with some math:
A Wagon holds 40 stacks or 40*50=2000 ore.
Stack inserters insert 14 items/ cycle, 6 inserters would need 2000/14/6=23,81 cycles to fill the wagon. As we can't do fractions of cycles they will use 24 cycles before the minimum load is reached leaving 24*6*14-2000=16 ore stuck in their hand.
Setting locked slots to 1 reduces the maximum delivery size by 1 stack = 50 ore making inserters insert the requested 1950 ore as well as excess items in a new stack.


Train Composition:
Binary encoded position of every carriage type. How decoding works can be found here.

Pre 0.15 locomotive fuel inventories could be emptied by inserters. Stations requesting fuel needed to know at which position it's safe to remove fuel.
It's still useful to refuel locomotives at depots.

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

Posted: Mon Sep 25, 2017 10:50 am
by mrvn
Is "Train composition" only an output signal or can I set it as input signal to allow only specific trains at a station? Does that work on depots too or do I need to make one depot per train composition and name them differently?

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

Posted: Mon Sep 25, 2017 1:00 pm
by Optera
mrvn wrote:Is "Train composition" only an output signal or can I set it as input signal to allow only specific trains at a station? Does that work on depots too or do I need to make one depot per train composition and name them differently?
From Documentation:
Constant Combinator: (signal output)
  • train composition: position of wagons & locomotives in parked train (all stops)
    binary encoded signal of train composition up to 31 carriages with lsb at the train stop. More information about binary encoding here
rejected features:
  • limit trains by composition signal
    Can't be done. Composition signal is ambiguous outside a specific stop.

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

Posted: Tue Sep 26, 2017 8:31 am
by mrvn
Optera wrote:
rejected features:
  • limit trains by composition signal
    Can't be done. Composition signal is ambiguous outside a specific stop.
Just for my information:

1) How is train composition any more ambiguous than train length?
2) Train schedules are made while a train is at a depot so why can't train composition be considered? It is at a station so should not be ambiguous.
3) Shouldn't depots accept a train composition and length setting and show an error if not all depots with the same name have the same signals or a train with different setup stops at the depot?

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

Posted: Tue Sep 26, 2017 11:07 am
by Optera
mrvn wrote: Just for my information:

1) How is train composition any more ambiguous than train length?
2) Train schedules are made while a train is at a depot so why can't train composition be considered? It is at a station so should not be ambiguous.
3) Shouldn't depots accept a train composition and length setting and show an error if not all depots with the same name have the same signals or a train with different setup stops at the depot?
Train composition requires knowing which side of the train is in front aka at the stop.
For example a train L(forward)-L(backwards)-4C has 2 different train compositions depending if it pulls or pushes the wagons.

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

Posted: Wed Sep 27, 2017 8:40 pm
by mrvn
Optera wrote:
mrvn wrote: Just for my information:

1) How is train composition any more ambiguous than train length?
2) Train schedules are made while a train is at a depot so why can't train composition be considered? It is at a station so should not be ambiguous.
3) Shouldn't depots accept a train composition and length setting and show an error if not all depots with the same name have the same signals or a train with different setup stops at the depot?
Train composition requires knowing which side of the train is in front aka at the stop.
For example a train L(forward)-L(backwards)-4C has 2 different train compositions depending if it pulls or pushes the wagons.
Ah, so it is ambiguous because you do not know which direction the train is going to leave the station. Somehow I always made my trains unidirectional or palindrom (same composition forwards and backwards).

Note: Never build an L(forward)-L(backwards)-4C. It will have horrible wind resistance going backwards. Build it L(forward)-4C-L(backwards) and you get more out of your trains.

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

Posted: Thu Sep 28, 2017 5:32 am
by Optera
Some limitations stem from LTN being designed to work with as many configurations players may come up with as possible no matter how inefficient they might be.

Personally I use L-6C-L with Nuclear Locomotives from more Locomotives.

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

Posted: Thu Sep 28, 2017 8:24 am
by mrvn
I would still love it if one could specify train composition and length at a depot. Not so that only specific trains arrive at the depot but as a check that trains that do arrive are the correct ones.

So if I set train length >= 4 and a LC train arrives something is wrong. The train stop should show an error, give a message and halt the train.

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

Posted: Thu Sep 28, 2017 8:35 am
by Optera
mrvn wrote:I would still love it if one could specify train composition and length at a depot. Not so that only specific trains arrive at the depot but as a check that trains that do arrive are the correct ones.

So if I set train length >= 4 and a LC train arrives something is wrong. The train stop should show an error, give a message and halt the train.
If you never assign a LC train to that depot name it will never go there.

Changing depot assignment from name based to composition, length will only result in players not reading the manual to build even more deadlocks.

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

Posted: Thu Sep 28, 2017 8:56 am
by mrvn
Optera wrote:
mrvn wrote:I would still love it if one could specify train composition and length at a depot. Not so that only specific trains arrive at the depot but as a check that trains that do arrive are the correct ones.

So if I set train length >= 4 and a LC train arrives something is wrong. The train stop should show an error, give a message and halt the train.
If you never assign a LC train to that depot name it will never go there.

Changing depot assignment from name based to composition, length will only result in players not reading the manual to build even more deadlocks.
I know that. But it is easy to make a mistake. And as I said this is not about making depot assignment based on composition. This is to add a check that the name based assignment wasn't done wrong. And yes, it would create a deadlock. But it would also tell the player right that tick that he made a mistake assigning that train to the depot. So there would be no surprise.

On the other hand if you have a train assigned to the wrong depot then you likely end up with fuel in a cargo wagon and/or a locomotive not getting any fuel. Or an too long train stops at the depot with its tail hanging out and blocking the main track. That will slowly corrupt the whole train system without being immediately obvious.

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

Posted: Thu Sep 28, 2017 9:05 am
by Optera
mrvn wrote:
Optera wrote:
mrvn wrote:I would still love it if one could specify train composition and length at a depot. Not so that only specific trains arrive at the depot but as a check that trains that do arrive are the correct ones.

So if I set train length >= 4 and a LC train arrives something is wrong. The train stop should show an error, give a message and halt the train.
If you never assign a LC train to that depot name it will never go there.

Changing depot assignment from name based to composition, length will only result in players not reading the manual to build even more deadlocks.
I know that. But it is easy to make a mistake. And as I said this is not about making depot assignment based on composition. This is to add a check that the name based assignment wasn't done wrong. And yes, it would create a deadlock. But it would also tell the player right that tick that he made a mistake assigning that train to the depot. So there would be no surprise.

On the other hand if you have a train assigned to the wrong depot then you likely end up with fuel in a cargo wagon and/or a locomotive not getting any fuel. Or an too long train stops at the depot with its tail hanging out and blocking the main track. That will slowly corrupt the whole train system without being immediately obvious.
You can see all of those just by looking at trains in the depot. There's no point in making an over complicated system essentially doing the same.

How does Encoded Position # work?

Posted: Sat Feb 03, 2018 3:13 am
by Indiglow
I've gathered how most other output signals work, but encoded position isn't working right or I don't understand it.

I have a requester station that I have set the output to say Encoded Position of PetroChem Oil Tank Wagon # 2

I am under the impression that this means I need a train where this specific wagon is in the 2nd position (Locomotive then PetroChem Oil Tank Wagon). The requesting station keeps sending PetroChem Oil Tanks AND PetroChem Gas Tank Wagons that are located in position #2 of a train setup....it's essentially ignoring the request that I want the Oil Tank Wagon to be in position 2 only.

What am I doing wrong?

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

Posted: Sat Feb 03, 2018 6:21 am
by Optera
Merged into existing topic about train composition.
Please use forum search before starting new threads.

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

Posted: Sat Feb 03, 2018 9:44 pm
by Indiglow
Optera wrote:Merged into existing topic about train composition.
Please use forum search before starting new threads.

Thanks.

I did use a search and searching for how "encoded position" doesn't result in anyone explaining how they work it just results in people saying "use encoded positions"

I am still actively looking for a tutorial or an explanation on how to properly use "Encoded position #" 's

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

Posted: Sun Feb 04, 2018 7:17 am
by Optera
Indiglow wrote:I am still actively looking for a tutorial or an explanation on how to properly use "Encoded position #" 's
Check the demo map and my post 12 posts above yours viewtopic.php?f=214&t=52471#p306857

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

Posted: Sun Feb 04, 2018 6:01 pm
by Indiglow
Optera wrote:
Indiglow wrote:I am still actively looking for a tutorial or an explanation on how to properly use "Encoded position #" 's
Check the demo map and my post 12 posts above yours viewtopic.php?f=214&t=52471#p306857
I appreciate the reply. After going through that, I still can't figure out what it is I am doing wrong. I have included pictures:

Pictures
https://imgur.com/a/xFmhR

I am requesting that Encoded Position of this specific train type be in position # 2 in the first image

In the second image, the output of the depot shows that is exactly what this depot is outputting

However, the requesting will keep accepting both types of trains in the second image (a gas loader petrochem and an oil loader petrochecm) despite the fact that the gas loader depot chem train is set with a different name and with an output of that style train in position #2

I can't quite understand why my requester is sending out the gas tanker when I am specifically requesting the oil one only.

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

Posted: Mon Feb 05, 2018 6:35 am
by Optera
Indiglow wrote:I am requesting that Encoded Position of this specific train type be in position # 2 in the first image
Train composition is read only. Use train length and network id to limit trains to certain stations.

As I Wrote in Rejected features
limit trains by composition signal #93
Can't be done. Composition signal is ambiguous outside a specific stop.

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

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