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
13 days ago
0.14 - 2.0
269K
Trains Circuit network

b Fuel station resets schedule

4 months ago
(updated 4 months ago)

I've had some wonky train deliveries this game, and I just caught one of the trains at it. It seems to be caused by the fueling station which is acting like a depot and assigning a new schedule to my trains. Here is the order of events:
Train goes to fill up on coal (this is where I depleted its fuel to trigger refueling)
Full of coal, train heads to the temporary stop at coal unloading
At the temp stop (before unloading) the refueling interrupt triggers and the train diverts to my fuel station
On arrival at the fuel station the schedule clears and the train refuels. The refuel station is assigned to the schedule as if it were a depot, and the train (still full of coal) is assigned a new schedule.

My refuel station is only that, the signals on its combinator are 1. stop is fuel station, 2. encoded network ID, 3. limit trains, and 4. solid fuel 20.
Am I missing something?

3 months ago

can you share a screen shot or a save? The fuel station should only show as a temporary stop and the train should be sent back to the depot after refueling.

Do you have other mods loaded?

3 months ago
(updated 3 months ago)

While I was recreating a simple save for this, I identified part of the problem.

Here's a mockup. To recreate:
1 - Start the train. It will go load up on coal.
2 - While it is loading coal, remove two stacks of fuel from the locomotive
3 - The train will try to refuel before unloading, and reset its depot to the refueling station name

https://drive.google.com/file/d/1cmzRaHQeymbY22zOOlt1aL3ol2CJnLev/view?usp=sharing

Now, here's how we got here -
For my refuel depot, I pasted in one of my standard LTN depot blueprints (you can see three of them in the save). Then I went to its combinator and deleted the depot signal, and added in the refuel signal to make it a refueling station. Somehow, the refueling LTN station still has a little bit of an idea that it is a depot too. If I delete the LTN station and rebuild it, connecting it back to the same combinator, everything works fine.

3 months ago

will take a look. Thanks for sharing a save

a month ago

Just wanted to say thanks for the solution, Spacey42. As you said, I just had to rebuild the station and the trains started to leave the fuel station instead of staying there.

21 days ago

So I could reproduce this (arrive at temp stop, then send to refuel, then reset the schedule).

It is a bug, I have a fix; the good news is that it is easily fixable.

Here is an assumption: This refueler, at some point in its past, was a depot and then repurposed as a refueler.

When the state of the station changes (depot -> refueler), it added "this is a refueler" to the internal status but did not reset the "this is a depot" bit. So when the train arrives, the "I am a depot" bit actually wins and so the schedule is reset and the train is "stuck" in the "depot".

This will be fixed in the next release. There will actually be two fixes:

  • there will be no refueling scheduled if the current stop is a temporary stop without a station
  • if a station changes from depot to fuel station, it will be correctly updated

Thank you for the bug report and the reproducer; It took me a while to get back to LTN. I plan to release this weekend or early next week.

14 days ago

This is fixed in 2.4.x

14 days ago

Thank you!

2 days ago
(updated 2 days ago)

hi, I found this topic because I've experienced the same problem. I checked, my LTN version is 2.4.2, which should have the fix.

In my case the result is the same as Spacey reported, my trains get stuck at the refuel station, with their original train schedule gone, which was only "go to depot".

however my case is weird... I forgot to actually enable the option in the settings for probably the last 20h.

After finally noticing it and turning on the setting the trains actually are sent to the refuel station and get stuck the same as mentioned above. However... my refuel station is no longer wired to the constant combinator giving the "refuel station" signal, I probably disconnected that by accident in the beginning.
I didn't notice that my refuel station wasn't working for so long because I use nuclear trains, their initial fuel lasts for a long time.

After that I tried removing the station and combinator, placing it again and hooked up the wire and it turned light blue (it was green lamp before). I noticed that the trains get a new refuel interrupt added to their schedule after entering a depot. However its never triggering, even when I manually remove all fuel.
I tested this by removing fuel while they were waiting in depot, and removing fuel on a train in the process of making a delivery. They dont go refueling anymore.
I can manually click on the refuel interrupt and it works fine.

So in short:
- Forgot to enable refuel station, but placed a refuel station, but accidentally disconnected the wire after some time, all while the setting was disabled.
- Enabled refuel station setting. Trains get send to the station despite not being hooked up to the combinator. Get stuck the same way as described above (no interrupts created in their schedule).
- Creating a new refuel station now adds interrupts to the trains, the station now has a light blue lamp, but the trains now never visit the refuel station.

Edit: Did some more testing, trains refuse to go to the refuel station. out of the 30 trains 10 got their fuel removed. Not a single one ever went for fuel and 5 of them ran out of fuel and stopped.
Removed the fuel from a further 10. I reset their schedule completely and readded the Depot station. 3 of them ran out of fuel after a while, however a single one of them did go refuel at some point. (cant keep my eyes on 20 trains zipping around the base at once...). I don't know why one did it correctly and the rest is still refusing. It is one of those that got their schedule reset, easy to identify because the "old" ones still got a wait timer of 5s and the new ones got 2s automatically added (i changed that in the settings some while ago).

Edit2: I cant recreate the one train that actually refueled. Here is a savegame.
https://drive.google.com/file/d/11-8Ehd5mRE4O3X_5S9JiSZfCKDSBbYLu/
This save is after I enabled the refuel station setting but not yet wired or replaced the refuel station.
The refuel station is called "(UranFuelCell_Icon) LTN Refuel". If you load the savegame one train is already on its way to that station and arrives within 15seconds, having lost its schedule already and driving to the not-wired LTN Refuel Station. If you wire the station to its constant combinator you can observe how the trains get their interrupt added upon arriving in a depot. but they never go refuel.

My modlist has a mod in the top left that allows you to speed up or slow down time.

Edit3: found hidden in the github page that refuel stations need a fuel-item in its signal. Adding the uran fuel cell signal now actually sends most trains trains to visit the station to refuel properly now. Some still refuse and will run out of fuel...
Also this doesn't explain why trains randomly decide to go refuel despite the station not being set up properly (no fuel signal), or why the train try to reach a a LTN Refuel station thats not even hooked up to a constant combinator. and why their schedule gets wiped.

New response