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.1
287K
Trains Circuit network

g 2.6 massive performance degradation

8 months ago

our factory has 750 trains and 3700 LTN stations.

in 2.5.1 when LTN is assigning routes the scripts time in the debug shows 0.49-1.0
in 2.5.0 it goes up to over 100 and drops our UPS from 50 -> 7.

8 months ago

try Increasing the update frequency in mod settings.

4 months ago

I assume you mean "in 2.6.0". The biggest change in 2.6.x and beyond that could cause this is that LTN now uses the train manager to determine paths between stations. This creates much more exact estimates for routes but it may affect performance. The suggestion of changing frequency is good but to dig further into this I would actually need a save.

a month ago

I'm having the same issue. Every time trains are deployed, I get a MASSIVE UPS drop to as low as 1UPS for 5 sec or so. The amount and time depends on how many trains are deployed, I think. I have a Pyanodons save so, if you want it to test, let me know your prefered method.

a month ago

“Need a save”. Otherwise there is nothing for me to profile.

a month ago

“Need a save”. Otherwise there is nothing for me to profile.

Sorry I wasn't clear. What's your prefered method to provide the save?

a month ago

google drive or some file service where I can download it.

a month ago

google drive or some file service where I can download it.

Here's the link. I'm running a research for you so trains deploy. The spawn area has armor and 25 bots if you need them. Let me know if you're not able to download the save and also let me know when you're running the save so I can delete the file from the drive. Thanks and good luck hunting for the issue!

https://drive.google.com/file/d/1iIcrTW1d-V-jN13h0e6Ag8Ipq-F9h1jW/view?usp=sharing

a month ago

First, thanks for the save. This is a pretty decent sized one with > 1,600 stations and 270 trains.

I did some performance measuring and some tweaks to the code and I can run this save on my somewhat aged M2Max Macbook Pro at consistently 60 FPS. There are some "hiccups" that are not related to LTN (I think py Alien Life has some heavy activity).

Some of my notes:

  • All major updates will only go to the LTN 3.x series which is for Factorio 2.1. I tested your map with Factorio 2.1 and it worked fine.
  • LTN Manager, when it processes updates, can take a lot of time. I saw some UPS drops with LTN Manager that went away when I disabled it.
  • For the next release, I split out the update and ticker settings. I am running with ticker = 2 (every other tick), update 4 stations per tick and schedule up to two requests per tick and that seems to work well with this map
  • There were two bugs that I backported to 2.0 so there are some improvements for people still on 2.0
  • The piece that I was most suspicious of (the route calculation) takes some time but not as much as I thought. I did some major improvements around route caching but it bought me less than I thought.
  • There was a surprising amount of performance improvements in the stop-events and stop-updates.
a month ago

Thanks for the update. I'll remove LTN manager ASAP and see how things operate. I just noticed the LTN 3.2 version and will download that after testing the removal of LTN Manager. Thanks!

New response