[Fixed] bad LTN output from inserters stuck with items

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

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

Re: [Fixed] bad LTN output from inserters stuck with items

Post by Optera »

changed topic to fixed
(as much as a mod can fix this without reprogramming inserter behavior)
mrvn
Smart Inserter
Smart Inserter
Posts: 5884
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [Fixed] bad LTN output from inserters stuck with items

Post by mrvn »

Unfortunately the global option is far from satisfactory.

1) If enabled then one can have trains with existing inventory and handle loading and unloading correctly. But multi-item stations then require locked slots because any items left in the inserters hand will be included as existing inventory on arriving trains.

2) If disabled then any existing inventory will be unloaded at self correcting multi-item stations because the LTN combinator does not include them.

Either choice breaks something. It would really be nicer if LTN could read the train content when the train arrives at the temporary stop or make the temporary stop without condition so the train never stops there. Have you tried that?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Fixed] bad LTN output from inserters stuck with items

Post by Optera »

Reading inventory before trains arrive at temp stops is way too much effort to fix this edge case.

Changing temp stops to waypoints has trains overshoot the stop.
salbris
Inserter
Inserter
Posts: 43
Joined: Sun May 24, 2015 4:50 am
Contact:

Re: [Fixed] bad LTN output from inserters stuck with items

Post by salbris »

I'm not sure exactly how any of this is programmed or what edge cases there are but wouldn't one simple fix to have an option to disable trains that enter a depot with some cargo?

Currently I'm am running into this issue every hour or so in my Space Ex K2 run and it's getting really exhausting. Seems to be caused by multi-item requesters but I'll find trains filled to the brim with stuff that was only requested in small amounts. Then it enters a depot sends me an error message and seconds later is being used for another route. If it stopped the train from leaving the depot that would fix my issue.
mrvn
Smart Inserter
Smart Inserter
Posts: 5884
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [Fixed] bad LTN output from inserters stuck with items

Post by mrvn »

It's easy to add a combinator to the depot stops that disable the depot if the train has cargo remaining. You can also add a speaker to notify you of the problem.

Problem then still is that you have to clean up the mess. Better than disabling trains with cargo at the depot is to simply unload them. At each depot also build a multi-item provider station with enough locked slots or a self correcting loader and unload any cargo from trains returning to the depot into the provider station. Trains at the depot wait for "5 seconds of inactivity" so while unloading they won't leave for the next delivery.

There are three common cases I've noticed why your trains would be returning to the depot with cargo:

1) Your multi-item providers don't have locked slots or correct for left over items loaded into the next train. That causes the wrong items to be placed into the delivery. If the requester then unloads with filter inserters then the extra items aren't unloaded and go to the depot.

2) You request more items than you can unload. The train then unloads as much as it can. If nothing then happens for a short while (200s I think) the train just leaves. You can turn that off in the map settings and have trains wait to be unloaded forever.

3) You have horrible network congestion or deadlocks causing trains to take too long to deliver their cargo (or you have yellow inserters loading items with stacksize 1000 so it takes forever). The delivery then runs into a timeout and LTN simply sends another train without first checking what happened to the old train. This then causes common case #2. Imho this case is a bug in LTN. You can increase the delivery timeout but I think you can't disable it, it doesn't mention it in the tooltip. Default timeout is 10 minutes.

And yes, I had perfectly fine deliveries take longer than 10 minutes to deliver items. This happens when you play with trains from the start where you only have burner (or yellow) inserters and no inserter bonuses.
Post Reply

Return to “Logistic Train Network”