Problem when not all wagons should be loaded

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

Hello

Im using LTN for the first time, and so far its working perfectly, since i watched whatever tutorial i could find.

There is just one thing i cant work out myself.
Im using LCC trains, for both cargo and fluids.
I have set up encoded positions of locos and wagons (1# loco, 6# wagons), since i think thats what needed to prevent the system to send fluid wagons to cargo stations and vice versa.

Now i have a few stations with a rather strange setup. Since im building withing fixed size blocks, i ran out of space for stations in one of them, so i wanted to have one unload place for item type A and the 2nd for item type B, within the same station. The loading and unloading stations are built to make sure its loaded and unloaded at the right position, with some filters set to inserters. And thats working. Basicly im only loading half a train.
I have set the provider and requester inputs to half a trains possible content (8k when it could load 16k if it used both wagons)

What happens is that it still creates schedules that say "wait until cargo type = >15999" as with any normal, fully used, train.
And that creates problems that will become bigger the more my stack inserters can handle, since the train is waiting for 120 seconds cos it cant load 2 wagons.

Is it creating schedules based on possible loading thats read via encoded positions?
Otherwise i cant figure out what i did wrong.
Im am not your rolling wheel, I am the highway!

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Problem when not all wagons should be loaded

Post by steinio »

LTN can't handle mixed trains and train composition signal is readonly.

You need to seperate fluid and cargo trains.
Image

Transport Belt Repair Man

View unread Posts

HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Re: Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

they are not mixed, since im only using one wagon with one type of cargo

it looks like this:
Loco-EmptyCargo-FullCargo
or
Loco-FullCargo-EmptyCargo
where the full cargo is only of one type.
Its working, just sets the numbers completly off.

There is also 2 different types of encoding for trains
#1L-#6Cargo (LCC)
#1L-#6Fluidwagon (LFF)
They are not mixed in wagon types. Its two encoded types to make sure its not sending LFF trains to LCC stations

All i want is, when I set a request treshold of 8k and a provide treshold of 8k, that the mod only creates schedules with 8k, so the train can leave once thats loaded.

I had a different strange behavior after i posted the first one.
I setup a normal chain, requesting and providing 16k, 2 wagons full of the same type.
The provider had 50k in the chests, the requester had zero and the signal read -16k as it should. It sent 2 trains, one schedule read like "bring 1089", the 2nd something different, but not >15999
Last edited by HerpicusMcDerpington on Wed Mar 07, 2018 2:07 pm, edited 1 time in total.
Im am not your rolling wheel, I am the highway!

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

Re: Problem when not all wagons should be loaded

Post by jodokus31 »

HerpicusMcDerpington wrote: What happens is that it still creates schedules that say "wait until cargo type = >15999" as with any normal, fully used, train.
And that creates problems that will become bigger the more my stack inserters can handle, since the train is waiting for 120 seconds cos it cant load 2 wagons.
You can try to use the locked slots per wagon signal.
f.e. if you have 40 slots per wagon
If you set locked slots per wagon to 21, it will create max delivieres of 19 slots per wagon. 19* 200 stacksize *2 wagon => 7800.
Whether the items are loaded to only one wagon, doesnt matter.

HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Re: Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

something else just popped up.

Lets say i have a normal setup, 2 stations with -16k for requesting, one with +16k (plus more) for providing.
I put something in one requester station by hand, so it goes positive.
This will set up a train to pick up from one requester station thats overfilled to the 2nd requester station thats still requesting because it is negative.

Are the requester and provider box signals even used?

I mean, what would they be for? its not even used as a minimum, as i have seen schedules with 1899 or something, when the lowest number for requesting and providing is 8k, mostly 16k even.

I have to test this, but if i just sent in the item type with a + or - treshold, i bet it would still setup a train to deliver, without even using the blue and red box signals.....
Its becoming more and mre frustrating and if its continuing that way i might not even continue my AB map because setting up 100 different schedules by hand is something ive done enough in vanilla.
Im am not your rolling wheel, I am the highway!

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

Re: Problem when not all wagons should be loaded

Post by jodokus31 »

HerpicusMcDerpington wrote:something else just popped up.

Lets say i have a normal setup, 2 stations with -16k for requesting, one with +16k (plus more) for providing.
I put something in one requester station by hand, so it goes positive.
This will set up a train to pick up from one requester station thats overfilled to the 2nd requester station thats still requesting because it is negative.
Stations can be both, requester and provider, even at the same time. If you put in a negative amount, it requests and if you put in a positive amount it provides.
If you have a requester with -16k, but have 17k items in it. Is provides 1k.
So, if the provide threshold is not overidden, it defaults to 1k. So it will create a delivery, if another station requests, as soon as it above 1k.
If you want your requester to only request, no matter whats in it, you can set a very big provide threshold, f.e. 1M

If you use bobs/angels, the warehouse is very useful for train stations, because they are 6 tiles wide. And its also very easy to request/provide multiple items at the same station. Here you can use the designs, which can be found in other threads with filterinserters and set filter option.

HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Re: Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

jodokus31 wrote: So, if the provide threshold is not overidden, it defaults to 1k. So it will create a delivery, if another station requests, as soon as it above 1k.
If you want your requester to only request, no matter whats in it, you can set a very big provide threshold, f.e. 1M
well, thats the point of my post, it IS overwritten by signals going in, using red and blue box signals, request and provide treshold, and im using only one them for all stations, there are no stations that use both. Maybe you have to set it to 0 for the one you dont want, if you not at any point want it to do what it cant (because inserters are facing the wrong direction)
Because right now it sends trains to requester stations to pick stuff up, which it cant.

but the last point is a good one, it at least tells me what i wanted to test is a built in feature with the 1k defaults


Still there is this creating of too big to be loaded schedules which i dont understand.
And yeah, angels warehouses are great for stations and in the end it doesnt really matter if i get 1k too much or whatever, its gianormous buffers.
I only want to truly understand LTN, because at the moment its not doing what im expecting and what i learned from reading the pinned post here and watching video tutorials.
Im am not your rolling wheel, I am the highway!

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

Re: Problem when not all wagons should be loaded

Post by jodokus31 »

HerpicusMcDerpington wrote:
jodokus31 wrote: So, if the provide threshold is not overidden, it defaults to 1k. So it will create a delivery, if another station requests, as soon as it above 1k.
If you want your requester to only request, no matter whats in it, you can set a very big provide threshold, f.e. 1M
well, thats the point of my post, it IS overwritten by signals going in, using red and blue box signals, request and provide treshold, and im using only one them for all stations, there are no stations that use both. Maybe you have to set it to 0 for the one you dont want, if you not at any point want it to do what it cant (because inserters are facing the wrong direction)
Because right now it sends trains to requester stations to pick stuff up, which it cant.
but the last point is a good one, it at least tells me what i wanted to test is a built in feature with the 1k defaults
On requester stations, you should set the provider threshold to +1M (or whatever big) and request threshold to +16k. 0 doesnt help, so far i know.
On provider stations, you should set the provider threshold to +16k.

The provider should contain more than 16k items.

the 1k default can also be overridden in the mod settings.
HerpicusMcDerpington wrote: Still there is this creating of too big to be loaded schedules which i dont understand.
The schedule is based on your train size, if you have 2 cargo wagons with 40 slots, then the max deliviery uses all slots -> 16000. (200 stack size)
With the locked slots per wagon signal you can reduce the max size. I have my stations set to 1 locked slot per wagon to prevent overload with stackinserters
HerpicusMcDerpington wrote: And yeah, angels warehouses are great for stations and in the end it doesnt really matter if i get 1k too much or whatever, its gianormous buffers.
I only want to truly understand LTN, because at the moment its not doing what im expecting and what i learned from reading the pinned post here and watching video tutorials.
I dont use the warehouses in this case as buffer. Its just easier to handle multiple items. 6 or 12 inserters per cargo wagon. And then i can pull off or feed in at least 6 different lanes with loaders from/to the factory.

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

Re: Problem when not all wagons should be loaded

Post by mrvn »

You seem to be thinking the request/provider limits are for trains or cargo sizes. They are not.

The limits determine when a station will be considered as provider or requester. It's the amount of items available or missing before a train is end.

The actual amount used then depends on the available trains carrying capacity, the reserved slots, the total amount available and total amount missing. So if one station has a provider limit of 8k, has 16k available but the requester is only missing 1089 items then 1089 items will be requested by the train. On the other hand if it missing 50k items it will send a train out to get 16k (2 cargo wagons, 8k in each). There is no way to tell LTN that you only load one good per wagon.

Instead what you need to do is be able to load and unload both goods to both wagons in the quantities specified by LTN. If one station provides both goods and the other requests both goods you might get a train for 4k item1 and 12k item2 or any other ratio including just one item.

For unloading that simply means unloading both goods from both wagons. Filter inserter into separate buffer chests will do. Or stuff it all into the same buffer chests and use filter inserters to remove the right items from the chests.

For loading you need to compute "amount requested - amount already in train" and use that as set-filter on the inserters. Again you need to buffer both items for both wagons. You also need to set the reserved slots to at least 1 or the filter inserters get stuck with goods in hand when the wagon is full and end up putting them in the next train (which might not want those items at all). A reserved slots of 1 means LTN will request only 7800 per wagon (15600 total) leaving the last slot in each wagon to stuff in some excess items. Better would be 2 reserved slots, or generally one per item for any multi item station. With stack inserters and items with low stack size you need even more.


As for your initial post: You don't have to do anything for cargo wagons vs. fluid wagons. LTN sees that a fluid wagon has 0 capacity for cargo and will never send such a train to your goods station and vice versa. The train composition is purely an output signal and only useful so you know where to refuel locomotives imho. Useless if all your trains are LCC and LFF. The locomotive is always first.

HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Re: Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

thank you mrvn, that was the best tutorial provided anywhere
best i could find so far is only ever talking about the optimal setup and doesnt provide any insight and what happens if you want to do something different and how it could behave

So, to summarize for myself. Blue/red boxes are useless?
I thought it would at least set a minimum to not run almost empty trains. If i set both to 8k, i thought it would be impossible to set schedules for like 1000.
Or is that from sending 2 trains at once, if it can fill up whats needed that way?

Reserved slots seems to be the way to go. if i set it to 41 slots for an 80 slot train, and inserters are only enabled for the right wagon to load (unload shouldnt even need to change filters) then it can only fill that wagon i want and leave immidiatly
Im am not your rolling wheel, I am the highway!

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

Re: Problem when not all wagons should be loaded

Post by mrvn »

Note that the reserved slots are per wagon. So setting it to 41 should mean no items can be transfered at all. Does that disable the station? Crash LTN?

To fill only one wagon in a 2 wagon train you could set it to 20. But then you might end up with only 10 stacks of item1 in wagon1 and 10 stacks of item2 in wagon2. Instead of 80 stacks total like you could carry. But if you never have trains for mixed goods then 20 will work.

Blue/red boxes aren't useless. They do prevent nearly empty trains but indirectly and only in combination. The minimum of the provider limit at the provider, the requester limit at the requester and the train cargo capacity (minus reserved slots) is used as for the train.

HerpicusMcDerpington
Inserter
Inserter
Posts: 32
Joined: Mon Dec 18, 2017 12:03 am
Contact:

Re: Problem when not all wagons should be loaded

Post by HerpicusMcDerpington »

mrvn wrote: To fill only one wagon in a 2 wagon train you could set it to 20. But then you might end up with only 10 stacks of item1 in wagon1 and 10 stacks of item2 in wagon2. Instead of 80 stacks total like you could carry. But if you never have trains for mixed goods then 20 will work.

aaaah, yes, that was not so thought through :) 20 will do
I wouldnt end up with items in both wagons tho, cos of inserter logic. It would work

I learned alot about it just by whining here, yet i dont even need that any more
I restarted cos i heavily screwd up my city block pattern, wouldnt need the setup in the new base ;)
Im am not your rolling wheel, I am the highway!

Post Reply

Return to “Logistic Train Network”