Multiple train depots

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Multiple train depots

Post by Mmmmmmorten »

Hi - love the mod (saves me a LOT of trains running about and standing at off-load parking doing nothing)

Still building my base, aiming for 4800 sppm and takes a LOT of building. I have several depots for trains of different sizes and my main ore / plate train is 6-12 and I have a train depot for these called "Depot 18x" with 15 stops - all named the same according to the LTN manual.

Now.. I see that even with the train saving LTN does I will need more than 15 trains of this size and I need a new depot at a different location.
Can this depot be named the same and work with LTN or do I have to name it "Deport 18x #2" or similar?

Thanks!

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

Re: Multiple train depots

Post by Optera »

Stops can be named whatever you want.
I only use names like "Depot 2L-6C" since they are more sensible than "ugabuga".

boran_blok
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Mar 01, 2019 7:56 am
Contact:

Re: Multiple train depots

Post by boran_blok »

I would name this depot differently.

In my experience if you have two depots with the same name trains might end up all trying to go to the nearest depot and then overflow onto the main tracks when there is no more space.

We solved this by making sure each train had a depot, so my 1-4-1 Main depot has 19 trains, and my 1-4-1 chipsfactory depot has 12 trains. There is no overlap, and no trains waiting for depot space this way.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Multiple train depots

Post by GrumpyJoe »

What the above post says.
Same name will work, since trains themself work like in vanilla and look up themself where they need to go, according to their schedule.
LTN "only" sets and resets these schedules at the depot(s), it has nothing to do with pathfinding.
But that can lead to a jam at either of the depot intakes.

Also, if you want to seperate them logically, like depot #1 is for west side of the base, #2 for east (or something like that), i´d start looking into network IDs

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Multiple train depots

Post by Mmmmmmorten »

All great suggestions... and I was worried about same name depots, so I did not do that...

Still building my 4800 sppm base (need a LOT of iron and copper plate and that, and certain other processed goods, will all be transported wherever it needs to go by 6-12-0 train. With some places needing refill every 1min 39 seconds (only 48.000 items with 100 stack on 12 wagon train) the need for trains increase. Just copper requires 14 trains to mostly be active all the time...

Playing with robots this time so doing smelting directly at ore site and onto train and since they only smelt 31k a min I need 14 of them constantly supplying copper plate.

My concern with this is that the smelters are all over the map (where the biggest ore sites are) - How does LTN choose a train for a request of copper plate? If I have 4 depots ("Depot x18 #1" through "Depot x18 #4) all with 15 parking space for 6-12-0 trains (or smaller) - where does LTN take a train from? Closest to a mine in time (know i tracks time some?) , closest to requester or just random next train in line at any Depot?

LTN has saved my A LOT of trains out on the tracks traveling (and sitting at parking lots with goods), but how do I minimize travel time with LTN from Depot to Provider to Requester in this scenario?
Or am I doing something wrong with my setup?

I am after all only an Old noob :geek:

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

Re: Multiple train depots

Post by Optera »

Mmmmmmorten wrote:
Wed Apr 03, 2019 2:50 am
My concern with this is that the smelters are all over the map (where the biggest ore sites are) - How does LTN choose a train for a request of copper plate? If I have 4 depots ("Depot x18 #1" through "Depot x18 #4) all with 15 parking space for 6-12-0 trains (or smaller) - where does LTN take a train from? Closest to a mine in time (know i tracks time some?) , closest to requester or just random next train in line at any Depot?

LTN has saved my A LOT of trains out on the tracks traveling (and sitting at parking lots with goods), but how do I minimize travel time with LTN from Depot to Provider to Requester in this scenario?
Or am I doing something wrong with my setup?
If all depots have the same train configuration and network id LTN will pick the closest (crow flies) to the selected provider.
However that provider can be on the other side of the map from the requester.


To optimize LTN in large networks you should assign each depot its own network id.
"Depot x18 #1": Network id 1
"Depot x18 #2": Network id 2
"Depot x18 #3": Network id 4
"Depot x18 #4": Network id 8

Assign stations serviced by only one depot the same id and station serviced by more the added ids of depots.

boran_blok
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Mar 01, 2019 7:56 am
Contact:

Re: Multiple train depots

Post by boran_blok »

Your question is very valid, and one I have as well, ideally it should take a train from the depot nearest to the provider, as this gives the lowest time to delivery, but overall travel time will still be the same (depot -> provider -> consumer -> depot)

For best efficiency I'd like to be able to close depots this way you could have them the same name and have something like this:

provider depot -> provider -> consumer -> consumer depot and save on the return trip back to the original depot.

This does entail that at the consumer there have to be goods that need to be moved to the provider or some other location again, or that depot becomes rather useless.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Multiple train depots

Post by Mmmmmmorten »

Optera wrote:
Wed Apr 03, 2019 6:14 am

To optimize LTN in large networks you should assign each depot its own network id.
"Depot x18 #1": Network id 1
"Depot x18 #2": Network id 2
"Depot x18 #3": Network id 4
"Depot x18 #4": Network id 8

Assign stations serviced by only one depot the same id and station serviced by more the added ids of depots.
Ahhh... OK Now we are talking.. So I need to map out locations based on... hmm.. depot location I guess...?

I.E. my green circuit plant consume 170.000 copper plate every minute with 4 unload station (needs 3,54 trains every minute) so if I set the closest depot and the closest, say 8 copper mine/smelters to the same network - all trains in this depot will only deliver copper to this one plant...

Nice, this might work - have too look at the map a bit...

Can a provider or requester be member of more than one network?

Following you ID logic I should put my Inner City (starter town) on it's own ID so my 2-4-0 trains there do not mix with the larger base? Hmm.. I use min/max 18 on all stations so guess it's limited that way, but would make sense to have it on it's own network if following you logic.

/less confused
:geek:

boran_blok
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Mar 01, 2019 7:56 am
Contact:

Re: Multiple train depots

Post by boran_blok »

The network ID is a binary flag.

that means network 1 is 0000 0001, network 2 is 0000 0010 and network 3 is both network 1 and 2 as it is 0000 0011

lets say we add network 8 (0000 1000) then a station in network 11 is in 1, 2 and 8 (0000 1011)

I used 8 bits in my sample, but Factorio uses a 32 bit number, so you can have 32 different networks, and any depot or station can be part of any combination of these 32.

This is also why without any network set LTN issues messages with network ffff ffff (the hexadecimal representation of all 1's) as without a network set a station is part of all networks.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Multiple train depots

Post by GrumpyJoe »

Mmmmmmorten wrote:
Wed Apr 03, 2019 6:32 am


Ahhh... OK Now we are talking.. So I need to map out locations based on... hmm.. depot location I guess...?


dont forget that you dont HAVE TO make all stops LTN.
After some time, i moved to mines->smelters trains setup as vanilla stations, as that should be a mostly constant flow of the same thing. And the smallest stack size, which sucks.

that assumes that you have smelters seperated from miners, which you said are at the same place.
I dont know how rich the ore fields are, but at some point they´ll be empty.
If you start placing factories and depots strategicly, you may as well do that for smelters too, and change the supply of ore according to ore patch spawns and output.

User avatar
Mmmmmmorten
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Mar 30, 2019 6:04 pm
Contact:

Re: Multiple train depots

Post by Mmmmmmorten »

GrumpyJoe wrote:
Wed Apr 03, 2019 10:13 am

dont forget that you dont HAVE TO make all stops LTN.
The blasphemy!!! :o Isn't that automatic ban from LTN and 10 min in the shame corner? :P

You do have a point that should be included in the design. Don't have the parking lot size I should for old style deliveries :? and will have to look into that possibility... The train time alone (number of trains needed) that LTN saves here is huge, but does come with other issues as time to deliver etc. (Comment to my own text: Not only amount of trains.. my fuel trains - got two that deliver nuke fuel - are 1-1-1 trains and run around like angry mosquitoes. Pre LTN they waited a few min on a station and moved to next parking-lot. Post LTN I fuel at depot and my fuel trains have not had a trip for over 2 days! This does two very significant things: save trains on track and significantly lowers the change that one of them will run over my sorry old ass....)

My last build in 0.16 was 2400 and all belt and I proved that I know how to mine and smelt ore - but thought it got really tedious to always go delete old depleted mines - open new ones and re-route trains. Sometimes it took a few days before I noticed 4 trains doing nothing but wait for ore at an empty site...
This time I planned on robotized mega-city and have the biggest, richest ore sites you can get - so my smallest (not counting inner city) is 319 million ore and the largest 1,5 G (so far) :mrgreen:
Would not have tried the ore & smelter on site combo with smaller ore sites as that would be total waste of resources and time. One ore/smelter site takes almost 800 modules 3's and they take for-ever to make since I do it on my inner city bus this time instead of builder town (in-between city).

I do tend to over-plan and over-think stuff. I build everything and flip a switch to start it all and expect it to work flawlessly... Not always the case (read: never), but LTN is new to me and a new uncertainty factor in the build.

/old dude
:geek:

Post Reply

Return to “Logistic Train Network”