LTN - Logistic Train Network

by Optera

Adds logistic-train-stops acting as anchor points for building a fully automated, train logistic network. It can handle all possible train configuration. Just send all trains to depots and LTN will pick the best suitable train for a job. LTN cuts the amount of rolling stock required to run a megabase down to 30% or less. With cargo ships installed also adds a logistic port for ships.

Content
a month ago
0.14 - 2.0
259K
Trains Circuit network

b LTN deploys more trains than limit set

a month ago

I have Factorio 2.0.43 and latest LTN installed. I have setup a depot with 10 stations (all same name), a station for mining (provider) and smelting (requester). Requester has <0 items (lesser than full train, then dispatch one). All provider stations have now train limit set. I tried first generic station setting (non-LTN) and then LTN's own "limit trains". I also set both provider and limit to ore's quality (is that needed?).

The mining (provider) stations have a limit of 3 trains (I tried even 1 only), requester has no limit set. My depot contains 10 trains and once I enable LTN dispatcher, all are scheduled, then realize that that the depot is full and first dispatched train is waiting inside the station with a few items loaded to free space for train behind it. Then randomly (?) all schedules are getting reset (sometimes only stations, temporary positions remain) and move with ore (or any other item) to the depot (residue) where I have active provider chests so the bots can clear the depot.

I don't know what I'm doing wrong here?

a month ago

I have removed 7 trains so only 3 remain on the rails. LTN cannot now deploy more trains than maximum (maybe 5 can lineup for a single stations). Now LTN has deployed a train to a requester station and then wants to pickup items there ... ???

a month ago

LTN is now often reschedule trains, which cause them to fail delivery and bring items to the depot (which overloads it slowly over time). This happens during the train is moving. Can this dynamic reassigning be deactivated somewhere?

a month ago

I think I found the culprit. The mod utility-combinators has reset the global storage table to their own keys. I changed that to setting keys in it and now LTN isn't behaving weirdly.

a day ago
(updated a day ago)

Make sure that all of your trains that you are using in LTN are NOT in a train group. I repeat they must NOT be in a train group or bad things will happen if they are, as in exactly what you are describing. You probably have confusing "train returned to depot, delivery failed" errors in the chat log while watching the train actively driving elsewhere on the rails. Took me waaay to long to figure that one out. I thought LTN was broken, period. Then I discovered I somehow assign all the trains to the group "eaaaaaasdw". I must have clicked it, hit e to close the train window then spammed movement keys. Then copy-n-pasted the train settings to all my other ones that were bound for the depot.

Now LTN has deployed a train to a requester station and then wants to pickup items there ... ???

You need to set the "Provider Threshold" really high say 1billion on all of your requesters stations. Otherwise they will use the default threshold of 1k. So whenever a requester has more than the provider threshold it becomes a provider. There is also a "requester threshold" if you want to set that to higher than 1k so train will haul larger batches and with less frequency. Also make sure the amount you a requesting is greater than the request threshold. Otherwise the station will never request anything.

The mod utility-combinators has reset the global storage table to their own keys. I changed that to setting keys in it and now LTN isn't behaving weirdly.

All mods are sandboxed from each other once the game loaded. The storage global variable in particular is for mods to persist data between save/load cycles. If you renamed the variable everywhere in utility-combinators you might break that mod in odd ways. If for some reason that table isn't sandboxed that is a Factorio bug. Even the current docs say that it is unique to each mod. https://lua-api.factorio.com/latest/auxiliary/storage.html

a day ago
(updated a day ago)

...Oops. I hit quote myself instead of edit and there doesn't seem to be a delete message option.

New response