[Grid+LTN+random ores] train optimization advice needed

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

User avatar
Trblz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Thu Sep 21, 2017 1:23 am
Contact:

[Grid+LTN+random ores] train optimization advice needed

Post by Trblz »

I need some advice how to setup trains with LTN in the following scenario based on multiplayer map from fMMO

* the world is grid based with voids as borders
* the ores are random seeded within a grid: 1 block can have 8M Iron ore, 1M copper, 3M uranium etc mixed in it. There are NO pure ore patches.
* throughput between grids is limited to 8 lanes - trying to avoid massive bot networks.
* playing as Vanilla as possible, LTN is the only exception.
* ore trains are in the 2-4-2 setup - 16k ores load max

This is a ore push scenario: ore loading stations need to be emptied of unwanted ores to prevent blockage for wanted ores.

Here's an example of the ore loading currently:
Image

This setup works but it requires a massive (bot based) ore sorter, ore storage and even ore destruction (mainly uranium, stone and coal)

Now I want to introduce LTN to setup/solve these issues and move towards a 1k SPM factory.
In the new setup I want to have specialized ore trains. This means most ore patches (w/o uranium) will have 4 ore loading stations - one for each ores. This still means it's an ore-push scenario as mentioned before.

I have two train networks in mind but I would like to hear your view on these designs:

<Scen#1> Ore push to storage / Mining loading -> Ore Storage -> Ore Smelting


Image

Ore is picked up at loading station <A>, moved to massive ore storage <B> and based on demand to the unloading stations <C>
To prevent trains going from <A> to <C> directly I could setup different LTN Encoded Network ID - one for A>B and one for B>C

LTN Settings <A loading>: Encoded Network ID=1, Provide Threshold=16000
LTN Settings <B unloading>: Encoded Network ID=1, Provide Threshold=16000
LTN Settings <B loading>: Encoded Network ID=2, Provide Threshold=16000
LTN Settings <C unloading>: Encoded Network ID=2, Provide Threshold=16000
and for all: Provider/Requester priority=0 (default), train size=8

Problem with this design is the bottleneck of 8 lanes at <B> - only 8 lanes available for unloading and for loading.

<Scen#2> Ore push to smelting, excess to storage


Image

LTN Settings <A loading>: Provider priority=0, Provide Threshold=16000
LTN Settings <B unloading>: Requester priority=-100, Provide Threshold=16000
LTN Settings <B loading>: Provider priority=-100, Provide Threshold=16000
LTN Settings <C unloading>: Requester priority=0, Provide Threshold=16000
and for all Encoded Network ID=default, train size=8

When ore is picked up at loading station [A] it prefers to go to ore smelting <C>. If there is no/not enough demand at <C>, the ore goes to storage <B>
However if I leave the LTN as-is, I will create a loop from <B unloading> to <B loading>

Problem here is that ore could loop at <B> if there is no demand at <C>. This is unlikely to happen with iron and copper but very likely for the other ores.
To solve this my idea is to add circuit logic to toggle <B loading> and <B unloading> so that only one is active at the same time.

Before I change my train stations (8 ore patches >= 32 stations, another 20 stations for ore loading and 10 more for storage), i would like to here some feedback.

Question #1: can the priorities be negative? I used negative numbers as I only have a handful of storage locations and many other train stations.
Question #2: will Scen#2 work as i expect with these settings and/or did i make a mistake here?
Bonus question: how else could i do the setup?
My Mod list: Necormant co-author
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Grid+LTN+random ores] train optimization advice needed

Post by Optera »

My ocd hurts so bad seeing this station ....
1) Use filter inserter to load the train
2) use zuri loader to keep contents in chests balanced
3) don't slap useless splitters and belt balancers everywhere

It'd also be much cleaner to filter ores with splitters on the miner side and have only ore below a threshold sent through those 8 belts to the station.


But personally I'd use bots here, as they are the best option for performance and simplicity.
Mine directly into active provider chests and have a big storage chests on the train station side of the void.
Build a provider normal provider, but instead of steel chests use requester chests set to constantly request 500 of each ore.


As for your questions:
1) yes priorities can be anything from -2147483648 to 2147483647
2) changing priorities can work, but i would recommend making control signals static.
LTN polls stations spread over 60 ticks for performance, so you are very likely to end up with one cycle of mixed priorities.
Bonus) See above.
User avatar
Trblz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Thu Sep 21, 2017 1:23 am
Contact:

Re: [Grid+LTN+random ores] train optimization advice needed

Post by Trblz »

"My ocd hurts so bad seeing this station ...."

don't worry, that was more an illustration of the grid and the ore mess.
But personally I'd use bots here, as they are the best option for performance and simplicity.
Mine directly into active provider chests and have a big storage chests on the train station side of the void.
Build a provider normal provider, but instead of steel chests use requester chests set to constantly request 500 of each ore.
a bot network works fine and will simplify things for sure.
As for your questions:
1) yes priorities can be anything from -2147483648 to 2147483647
2) changing priorities can work, but i would recommend making control signals static.
LTN polls stations spread over 60 ticks for performance, so you are very likely to end up with one cycle of mixed priorities.
Bonus) See above.
B loading and B unloading won't be active at the same time. Without priorities, how do you ensure that ores go to C and not also to B?
My Mod list: Necormant co-author
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Grid+LTN+random ores] train optimization advice needed

Post by Optera »

Trblz wrote: Thu Nov 29, 2018 7:51 pm B loading and B unloading won't be active at the same time. Without priorities, how do you ensure that ores go to C and not also to B?
Different network IDs are the best way to ensure stations are never matched.

However I don't see how A > B > C would be any better than a direct A > C and A > B distribution.

Here's how I'd set LTN up to handle shipping:
I'd make a dedicated station to dump excess ore. I assume that's why you ship to B first.
With pure vanilla values a 2L4C train has a capacity of 8k so that'll be the threshold for ore stations to maximize train throughput.

Miner A:
provide threshold = 8k
Locked Slots per Wagon = 1 (prevent stuck inserter)

Normal Consumer C:
request -20k ore (or however large a buffer you feel comfortable with)
request threshold -8k

Dump B:
constantly request -8k
request priority -1
Disable Warnings 1 (turn off provide warnings for this requester otherwise it'll be annoying)

This setups will have A constantly fill up with ore until 8k at which point they will be shipped to B as if it was an triggered active provider chest unless C requests some ore.

You can add any number of Miners, dumps and consumers with the same settings and LTN will sort them out.
The only way for this to break would be if miners outproduce dump+consumer.
User avatar
Trblz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Thu Sep 21, 2017 1:23 am
Contact:

Re: [Grid+LTN+random ores] train optimization advice needed

Post by Trblz »

Optera wrote: Thu Nov 29, 2018 8:09 pm Different network IDs are the best way to ensure stations are never matched.

However I don't see how A > B > C would be any better than a direct A > C and A > B distribution.
B will be unloading - buffer - loading; the buffer has a max throughput of 8 lines of ore. B will mainly be used for stone, coal and uranium - nuke warhead ready in case of full.
Here's how I'd set LTN up to handle shipping:
I'd make a dedicated station to dump excess ore. I assume that's why you ship to B first.
With pure vanilla values a 2L4C train has a capacity of 8k so that'll be the threshold for ore stations to maximize train throughput.

Miner A:
provide threshold = 8k
Locked Slots per Wagon = 1 (prevent stuck inserter)

Normal Consumer C:
request -20k ore (or however large a buffer you feel comfortable with)
request threshold -8k

Dump B:
constantly request -8k
request priority -1
Disable Warnings 1 (turn off provide warnings for this requester otherwise it'll be annoying)

This setups will have A constantly fill up with ore until 8k at which point they will be shipped to B as if it was an triggered active provider chest unless C requests some ore.

You can add any number of Miners, dumps and consumers with the same settings and LTN will sort them out.
The only way for this to break would be if miners outproduce dump+consumer.
Awesome - i will give this setup a try. :D
My Mod list: Necormant co-author
Post Reply

Return to “Logistic Train Network”