Page 1 of 1

Question on Depot

Posted: Sat Jan 11, 2020 6:32 am
by Deathxxrenegade
Have a problem with the trains when it comes to the depot. Its the only thing I can't figure out how to stop....Screenshot included. Trains, after completing delivery.....tend to try to go to stations that already have trains....I have 76 depots and 58 trains. This blocks rails and screws stuff up until the train in the station moves, or I move it manually. How do I stop this from happening?

Re: Question on Depot

Posted: Sat Jan 11, 2020 6:50 am
by Optera
Wrong Forum. This is for LTN specific discussions only.

See https://wiki.factorio.com/Tutorial:Train_signals

Re: Question on Depot

Posted: Sat Jan 11, 2020 3:35 pm
by Greybeard_LXI
I can't answer the whole question, but part of the problem is incorrect use of signals.

The signal near the top locomotive is a rail signal. This should be a rail chain signal. The chain signal does not allow a train to enter the next block unless it can also leave the block. The rail signal just makes sure the train won't hit another train in the next block. There should also be another chain signal before the junction to prevent the middle train from entering the junction.

The entrance signals to the stations are chain signals. They should be rail signals. There should be enough room for your train at the station.

I'm not sure what the chain signals are doing on the top set of rail. I suspect you wanted rail signals so the trains could get closer together; what you have keeps extra room between them.

Re: Question on Depot

Posted: Sat Jan 11, 2020 9:43 pm
by boskid
Deathxxrenegade wrote:
Sat Jan 11, 2020 6:32 am
.....tend to try to go to stations that already have trains....
Today i was testing a lot of rails setups and explanation is quite simple. Train wants to go to this station because it was empty when train was pathfinding. After some time other train (that was also going for given train station) that was closer, reached train station and now second train is forced to wait. It should wait 5 seconds on signal and then repath. With plain train stops it is possible to, using CN, do some tricks to force other trains to repath as soon first train enters segment with train stop.

Re: Question on Depot

Posted: Sun Jan 12, 2020 8:26 am
by Nosferatu
It's like boskid describes. No matter how I redesigned the signaling once in a while a train got stuck for 5 seconds and blocked my main rail.
As a first step i redesigned the station entrance so that trains that got stuck will not immediately clog the main line.
Depot.jpg
Depot.jpg (1.72 MiB) Viewed 4740 times
I guess future depots will get a waiting area where new trains can overtake those that got stuck...

Re: Question on Depot

Posted: Mon Jan 13, 2020 11:54 pm
by Frightning
Congrats, you just learned part of why people use 'stackers' for busy rail stations.

Re: Question on Depot

Posted: Tue Jan 14, 2020 5:10 pm
by Nosferatu
I use LTN Mod to avoid those stackers... Guess I have to take some time to try those CN tricks to force reroute...

Re: Question on Depot

Posted: Tue Jan 14, 2020 5:41 pm
by boskid
If you want to check what i made for CN repath
stacker stop with repath

Re: Question on Depot

Posted: Sat Jan 18, 2020 5:08 pm
by Ezarkal
A quick fix would be to disable any train stop where a train is present with circuit networking.
There's no combinator needed. Just hook your train stop to a single power pole with a green or red wire, then set your train stop with the following circuit settings:

-Enable/disable
-Read stopped train
-Enable signal T = 0
-Output signal T


It's not a perfect solution, since no train will be called while there a train at your station, preventing you from building a buffer... but it should help a lot against clogging the main rails, without the need to rebuild each one of your depots with stackers.

Re: Question on Depot

Posted: Sun Jan 19, 2020 12:39 am
by Deathxxrenegade
Ezarkal wrote:
Sat Jan 18, 2020 5:08 pm
A quick fix would be to disable any train stop where a train is present with circuit networking.
There's no combinator needed. Just hook your train stop to a single power pole with a green or red wire, then set your train stop with the following circuit settings:

-Enable/disable
-Read stopped train
-Enable signal T = 0
-Output signal T


It's not a perfect solution, since no train will be called while there a train at your station, preventing you from building a buffer... but it should help a lot against clogging the main rails, without the need to rebuild each one of your depots with stackers.
I have tried that with LTN. But every time I have, the train never leaves after the station is turned off, even if its the only train to do an order.

Re: Question on Depot

Posted: Mon Jan 20, 2020 8:13 am
by Optera
Nosferatu wrote:
Sun Jan 12, 2020 8:26 am
It's like boskid describes. No matter how I redesigned the signaling once in a while a train got stuck for 5 seconds and blocked my main rail.
As a first step i redesigned the station entrance so that trains that got stuck will not immediately clog the main line.

Depot.jpg

I guess future depots will get a waiting area where new trains can overtake those that got stuck...
With that stacker design it's very likely trains park at signals long enough for train_waiting_at_signal_tick_multiplier_penalty to get larger than penalties of completely filled tracks.

See my post here about originally finding this behavior: viewtopic.php?p=382712#p382712
And my request to add an upper limit to train_waiting_at_signal_tick_multiplier_penalty: viewtopic.php?f=28&t=64564&p=395524

Currently the only real solution is to set train_waiting_at_signal_tick_multiplier_penalty = 0 with mods like Pathological.

Re: Question on Depot

Posted: Mon Jan 20, 2020 3:58 pm
by mrvn
Nosferatu wrote:
Sun Jan 12, 2020 8:26 am
It's like boskid describes. No matter how I redesigned the signaling once in a while a train got stuck for 5 seconds and blocked my main rail.
As a first step i redesigned the station entrance so that trains that got stuck will not immediately clog the main line.

Depot.jpg

I guess future depots will get a waiting area where new trains can overtake those that got stuck...
You can use a pass-through station at the exit of the stacker or entry to your stops so all paths go to a single station. Once the train reaches that station it decides where to go next, at which point no other train can get ahead of it and take the station it sees as free.

Alternatively you can use a circuit controlled signal to force a repath.

Re: Question on Depot

Posted: Mon Jan 20, 2020 11:26 pm
by Ezarkal
Deathxxrenegade wrote:
Sun Jan 19, 2020 12:39 am
Ezarkal wrote:
Sat Jan 18, 2020 5:08 pm
A quick fix would be to disable any train stop where a train is present with circuit networking.
There's no combinator needed. Just hook your train stop to a single power pole with a green or red wire, then set your train stop with the following circuit settings:

-Enable/disable
-Read stopped train
-Enable signal T = 0
-Output signal T


It's not a perfect solution, since no train will be called while there a train at your station, preventing you from building a buffer... but it should help a lot against clogging the main rails, without the need to rebuild each one of your depots with stackers.
I have tried that with LTN. But every time I have, the train never leaves after the station is turned off, even if its the only train to do an order.

I do have a setup so my trains leave when my stations are full. Link whatever storage you use to the input of a decider combinator next to your train stop. Set the combinator so whenever your storage reach a certain amount (whatever maximum you want it to hold), it outputs a signal to your train. (I personally use the checkmark). Then, when you setup your train, it's leave conditions should be "-when cargo is empty OR -when checkmark > 0"

I usually combine that with shutting my stations down when they are about 1 train from being full, so that no extra train will come and queue up while the last train finishes unloading. You could combine this system and the one shutting down your station while a train is present using an AND switch.