performance

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
zggz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Dec 07, 2017 6:40 pm
Contact:

performance

Post by zggz »

With LTN i have 17 fps. Without (until factories have resources for work) i have 30.

It's a base LTN problem or design of stations? or something else?

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

Re: performance

Post by Optera »

With so little information the only thing I can tell you is that my large test map runs at ~30 UPS in 0.15 and ~50 UPS in 0.16
LTN itself only needs ~0.5 UPS for ~300 stops and ~100 trains and at most 0.8 when all requester start up at once.

Here's a few things that will greatly affect LTN performance.

Signal processing:
Start optimizing with these, as they can utterly tank LTN performance.
  • Don't feed entire logistic network contents into LTN stops.
    Use signal filters to feed only items to request and provide into LTN stops.
  • Don't use both green and red wire inputs.
    Merging signals in lua is expensive. Merge signals to the green wire before feeding them to LTN stop inputs. The green wire has slightly better performance as LTN merges red onto green.
Delivery frequency:
Should only make a noticeable impact when 50+ stops default to 1k thresholds.
  • Make sure provide and request thresholds are set high enough to force full train loads and not just 2-3 stacks.
    This goes hand in hand with longer trains.
Number of parked trains:
Impact on performance becomes noticeable on medium (100 stop) networks.
  • Use few long trains instead of many short ones.
    Reducing the number of trains means fewer stat updates whenever a train enters or exits a stop. I recommend at least L-4C trains for items transported en mass like ores and plates.
    Long trains are also better for base game pathfinder performance.
  • Use Stacker depots.
    Each time a request is made LTN checks all trains parked at depots to find the best matching train.

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Dec 07, 2017 6:40 pm
Contact:

Re: performance

Post by zggz »

Use signal filters to feed only items to request and provide into LTN stops.
How make filter for provider items? Now i'm just set provide trueshhold >20k (for example)

240 depots stations and 100 trains 3l+5c (about 100) with depots everywhere. Wire - good, no other networks. Depots near providers.

I think i make something wrong. Because in chat i see when reguested not a full train but all trains loading full all time. Its good for me, but may be something wrong here.

My provider requester and depot stations on screen.
Attachments
Screenshot_23.png
Screenshot_23.png (522.71 KiB) Viewed 2377 times
Screenshot_22.png
Screenshot_22.png (405.93 KiB) Viewed 2377 times
Screenshot_21.png
Screenshot_21.png (1.14 MiB) Viewed 2377 times

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

Re: performance

Post by Optera »

The stops in your screenshots don't look like they need signal filters but here are the two filters I use myself:
Logistic to LTN blacklist filter: viewtopic.php?f=214&t=51073#p297650
Whitelist filter: viewtopic.php?f=214&t=51073&p=329294#p329294

Trains loading more than requested:
Use filter inserters as shown in the demo or design thread.

Post Reply

Return to “Logistic Train Network”