Need help with train station
Need help with train station
So I made a train station with two stops that have the same name for better traffic flow. I'm wondering if there is a way to signal to my trains to go to stop A then stop B, switching between the two to prevent one of the stops from receiving over 80% of the traffic. I tried doing some circuit network voodoo but got lost in my own tangled mess and couldn't get the result that I'm looking for.
Re: Need help with train station
first of all put a chain signal before the junction
no yes yes no yes no yes yes
-
- Filter Inserter
- Posts: 814
- Joined: Fri Apr 29, 2016 5:27 pm
- Contact:
Re: Need help with train station
I don't know enough about 0.13 circuit network to give a full solution, but provided there is a means of knowing that a train has arrived at either stop. Then with an S-R latch, you can create a system to make the trains have to alternate by forcing the signals red in an alternating fashion. The way it works, is that the latch basically has two states. One of which would make the top signal red, (and presumably the bottom signal green), and the other would have the bottom signal red (and presumably top signal green). So the a trains pulls up to the stop and voila, the signal behind it is now forced red, making the next train goto the top station when it arrives, and then the reverse happens (top signal now forced red, bottom may become green again), and the next train will goto bottom station, etc.
If you are unfamiliar with how to create an S-R latch with the circuit network, I believe people have posted about how to do it here (I've never actually made one myself; so I'm not sure I could do it right without having to fuss with it for a bit).
If you are unfamiliar with how to create an S-R latch with the circuit network, I believe people have posted about how to do it here (I've never actually made one myself; so I'm not sure I could do it right without having to fuss with it for a bit).
-
- Inserter
- Posts: 25
- Joined: Thu Jun 30, 2016 4:15 pm
- Contact:
Re: Need help with train station
Great question and help from Frightning! I would use gates for detection signal, place one on each end of a station and only switching a signal when both are open, so it can't be messed up by player walking to one of the gates. As for how to set up combinators, I unfortunately have to go to work now and will not get to that until later today, but you can check tutorial Combinators 101, all the basic parts are described there.
Re: Need help with train station
Well I have some good news and some bad news. Good news I got an SR latch to properly signal. The detector I'm using is a rail signal
working latch
Now my train is stuck waiting for the signals to change so it can go right back to the bottom stop of the station. 
problem
Can i signal the stop to act occupied while the latch is on so trains route to the upper stop?Re: Need help with train station
This is a known issue with train pathfinding. We might see it fixed in .14 but I highly doubt it will be fixed in any .13 release.
Re: Need help with train station
I think when the train has decided to go to either station it will go there. Blocking its path with rail signals won't make it change its mind. So the suggested approach with rail signals will not work.
You should consider install the mod "SmartTrains". It gives you the ability to send a train directly to a target station. Then you can create a decider logic which will send the trains to the unloading stations in a balanced fashion (for example by always picking the station with fewer material in the buffer).
Of course this can become complex very quickly.
I'm pretty sure there is no way to force the game to distribute your trains evenly. The pathfinder does not care about which station has been visited more often. It will simply pick the closest free station when it plots the course.
You should consider install the mod "SmartTrains". It gives you the ability to send a train directly to a target station. Then you can create a decider logic which will send the trains to the unloading stations in a balanced fashion (for example by always picking the station with fewer material in the buffer).
Of course this can become complex very quickly.
I'm pretty sure there is no way to force the game to distribute your trains evenly. The pathfinder does not care about which station has been visited more often. It will simply pick the closest free station when it plots the course.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
-
- Inserter
- Posts: 25
- Joined: Thu Jun 30, 2016 4:15 pm
- Contact:
Re: Need help with train station
I get annoyed by this bug so I made a workaround, described here. Works reasonably well in 0.13 without mods and is customizeable for any number of stations.
-
- Fast Inserter
- Posts: 122
- Joined: Fri Jun 17, 2016 8:17 pm
- Contact:
Re: Need help with train station
Could you work around this by having a staging station? Inline with both stations (with an appropriate train-buffer feeding it), you force every train to hit that one first (with a trivial condition so it doesn't stay there). That way it should initialize pathfinding once it's already there; you just have to make sure your latch/switching circuitry doesn't change between train arrival at staging and train arrival at final.siggboy wrote:I think when the train has decided to go to either station it will go there. Blocking its path with rail signals won't make it change its mind. So the suggested approach with rail signals will not work.
-
- Inserter
- Posts: 25
- Joined: Thu Jun 30, 2016 4:15 pm
- Contact:
Re: Need help with train station
Just tested it to be sure, it doesn't work. Even with staging station connected to circuit network and allowing trains to continue only if switching is done, they just choose nearest station and wait indefinitely for signal to allow them there. So far only successful way I tried is blocking the way with another train.zebediah49 wrote:Could you work around this by having a staging station? Inline with both stations (with an appropriate train-buffer feeding it), you force every train to hit that one first (with a trivial condition so it doesn't stay there). That way it should initialize pathfinding once it's already there; you just have to make sure your latch/switching circuitry doesn't change between train arrival at staging and train arrival at final.siggboy wrote:I think when the train has decided to go to either station it will go there. Blocking its path with rail signals won't make it change its mind. So the suggested approach with rail signals will not work.