[Feature Request] Add an option so that only empty trains leave the depot

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
Soggs
Inserter
Inserter
Posts: 21
Joined: Fri Sep 28, 2018 6:53 pm
Contact:

[Feature Request] Add an option so that only empty trains leave the depot

Post by Soggs »

Right now the depot schedule condition is just x Seconds of Inactivity.

My request would be to add an toggle in the options so that the depot schedule is x Seconds of Inactivity AND Empty Cargo. This would in my opinion allow for a safer fail state where instead of getting polluted stations you get no deliveries at all. It would also make tracking problematic stations easier I think.

I hope that it is not too hard to implement in terms of schedule manipulation.

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

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by Optera »

Can already be done by enabling "read train inventory" on depot stops and a decider set to everything == 0 output isDepot = 1.
Additionally depots adhere to red and green signals if "Schedule circuit conditions" is enabled.

As for finding faulty stops it wouldn't help at all.
LTN wipes schedules on arrival at the depot (or when leaving requester). It's much better to lock trains with left over items in requesters with circuit conditions. (Don't forget turning off the stop as well)

Soggs
Inserter
Inserter
Posts: 21
Joined: Fri Sep 28, 2018 6:53 pm
Contact:

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by Soggs »

Whole reason I ask is trying to organize the mess LTN can become in multiplayer especially with people not being 100% on top of the nuances LTN. It only really became a problem when they changed the the fluid mixing prevention. Solid trains can easily be cleaned. Fluid trains just can become very very messy now especially when some minor amounts of fluids get stuck in random pumps. Liquid requesters used to be so elegant and easy. :(
Optera wrote:
Sat Aug 22, 2020 1:43 pm
Can already be done by enabling "read train inventory" on depot stops and a decider set to everything == 0 output isDepot = 1.
This does not seem to reliably work. If the train gets scheduled immediately upon arriving at the depot it will still leave the depot for its new route. I can provide a small save if you want to. It would be by far the most elegant solution.
Optera wrote:
Sat Aug 22, 2020 1:43 pm
Additionally depots adhere to red and green signals if "Schedule circuit conditions" is enabled.
It will probably come down to that but I can already foresee trains crowding around stations because somebody forgot to send a signal to the train.
Optera wrote:
Sat Aug 22, 2020 1:43 pm
As for finding faulty stops it wouldn't help at all.
LTN wipes schedules on arrival at the depot (or when leaving requester). It's much better to lock trains with left over items in requesters with circuit conditions. (Don't forget turning off the stop as well)
I know about the schedule wipe but the items still remain in the train so its at least easier to figure out based on the items which requester is messing up. The problem is really people messing up their requester, so I cannot guarantee they get held at the errand requester. I should probably try again to turn off station timeout and turn on wait for fully unload but from memory that just ended with people randomly sending trains back to depot instead of figuring out the problem because the pile up caused problems. Having all depots up to a standard is easier to control and enforce than checking each requester.


It is all trying to tread the line between keeping things simple, have people learn for the future, keeping my sanity and not just handing out blueprints.

TokMor
Inserter
Inserter
Posts: 30
Joined: Mon Jan 23, 2017 3:37 am
Contact:

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by TokMor »

Using LTM is difficult in MP, unless all people playing are train experts. What I find helps is having one person "in charge" of the train network who can make bulletproof designs and post a book into the game BPs for the other players to use. All players are going to have to follow whatever "rules" are put in place based on the stop designs to make sure the network doesn't all grid to a halt.

Also, if I were to request a feature along these lines, it would be that the schedule is not deleted at the depot when a train pulls into the depot station with stuff in it, and instead switched to manual so it won't move and so you can see where it's been.

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

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by Optera »

Soggs wrote:
Sat Aug 22, 2020 3:44 pm
This does not seem to reliably work. If the train gets scheduled immediately upon arriving at the depot it will still leave the depot for its new route. I can provide a small save if you want to. It would be by far the most elegant solution.
Yes, there is a very tight 1-2 ticks window before self locking depots like that can register residue.
With fluids there's another issue where 0.4 will get rounded down to 0. For that reason fluid trains already have an empty condition at requesters so they get stuck where the problem is.
TokMor wrote:
Sun Aug 23, 2020 1:43 am
Also, if I were to request a feature along these lines, it would be that the schedule is not deleted at the depot when a train pulls into the depot station with stuff in it, and instead switched to manual so it won't move and so you can see where it's been.
You can't make LTN fool proof, players sending trains with left overs back to depot would also just flip manual trains back to auto.
The most sane way is an alert containing provider, requester, scheduled delivery and actual cargo whenever trains get loaded incorrectly. LTNM already provides that. We could make it into its own mod or move that functionality to LTN.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by ssilk »

This happened to me lately, when I reorganized my Fluid stations. Just some requester stations removed. (Luckily I had a circuit at my depot, that checks, if trains are empty on arrival and stops them.)

Well, I could have stopped delivery before, but I need to wait then half an hour, until all remaining trains arrive. I needed to remove them quickly. And after removing I had forgotten the station name :roll: , so I could not find them.

A good solution would be, if LTN looks at the depot, if there is remaining cargo In the trains. And if yes, it tries to deliver it, directly. Aka find a station where that cargo is required. If there is no destination it waits a while (5 mins?) and if nothing deliverable it gives an alarm.

Another solution would be to add in the moment of removing a destination, where that cargo is required, even if not all would fit in yet. Would be +1 better; it really solves a problem with heavy occupied stations, because chance is high, that it will fit, when train arrives.

I thought to alternatives when removing stations, and the only other solution (kind of) would be, if it could not be mined/destructed, or gives a fat warning, until no train targets anymore (sounds simple)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by Optera »

Preventing trains from getting dispatched while not empty would require storing non empty trains in a second table to available trains on arrival at a depot. To make them available I'd have to regularly poll their inventories to see if they are empty.
ssilk wrote:
Sun Aug 23, 2020 5:55 am
A good solution would be, if LTN looks at the depot, if there is remaining cargo In the trains. And if yes, it tries to deliver it, directly. Aka find a station where that cargo is required. If there is no destination it waits a while (5 mins?) and if nothing deliverable it gives an alarm.

Another solution would be to add in the moment of removing a destination, where that cargo is required, even if not all would fit in yet. Would be +1 better; it really solves a problem with heavy occupied stations, because chance is high, that it will fit, when train arrives.
That's massive overhead for little gain. Just place a normal provider next to depots with high priority for the same effect.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by ssilk »

Optera wrote:
Sun Aug 23, 2020 8:09 am
Preventing trains from getting dispatched while not empty would require storing non empty trains in a second table to available trains on arrival at a depot. To make them available I'd have to regularly poll their inventories to see if they are empty.
Hm. The list should be normally empty. If not I guess there should be in very rare cases more than 5 inside. Or the player made a huge error :) that might happen, yes. But in any case it should be enough to check one train per second, if there are items/fluids left in train.

I’m sure this alarm will help newbies to fix bugs in their system early. Or to avoid completely messing up the LTN system, especially with fluids.

Important: do not delete the schedule, before it is empty, because that helps to find the buggy stations. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

waltermundt
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed May 24, 2017 4:55 am
Contact:

Re: [Feature Request] Add an option so that only empty trains leave the depot

Post by waltermundt »

I hooked a looped combinator to a signal placed after each of my depot stops to force the signal to red as soon as a non-empty train arrives and keep it that way until the combinator is manually removed. Even if the train immediately gets a new schedule assigned and tries to depart, all it takes is one tick of cargo signal coming off the stop to lock the exit, so this seems to work reliably. Once I've manually addressed the problem, I just remove the combinator and hit ctrl-Z to replace it and all the wires. A different-color wire leading from the output of all the combinators of the depot stops in a given spot to a programmable speaker gives me a global alert if any of the stops are blocked so I can check it out right away.

Post Reply

Return to “Logistic Train Network”