Need help with train station

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Otheleo
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jul 31, 2016 7:17 pm
Contact:

Need help with train station

Post by Otheleo »

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.
20160731134844_1.jpg
20160731134844_1.jpg (810.16 KiB) Viewed 3233 times

kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: Need help with train station

Post by kinnom »

first of all put a chain signal before the junction
no yes yes no yes no yes yes

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Need help with train station

Post by Frightning »

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).

Hammerchief
Inserter
Inserter
Posts: 24
Joined: Thu Jun 30, 2016 4:15 pm
Contact:

Re: Need help with train station

Post by Hammerchief »

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.

Otheleo
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jul 31, 2016 7:17 pm
Contact:

Re: Need help with train station

Post by Otheleo »

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?

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Need help with train station

Post by Nexela »

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.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Need help with train station

Post by siggboy »

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.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

Hammerchief
Inserter
Inserter
Posts: 24
Joined: Thu Jun 30, 2016 4:15 pm
Contact:

Re: Need help with train station

Post by Hammerchief »

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.

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: Need help with train station

Post by zebediah49 »

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.
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.

Hammerchief
Inserter
Inserter
Posts: 24
Joined: Thu Jun 30, 2016 4:15 pm
Contact:

Re: Need help with train station

Post by Hammerchief »

zebediah49 wrote:
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.
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.
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.

Post Reply

Return to “Gameplay Help”