OUTDATED 0.13 trains using multiple stations of the same name

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

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

OUTDATED 0.13 trains using multiple stations of the same name

Post by Hammerchief »

EDIT: Bug preventing proper train pathfinding on tracks with signals controlled by combinators was fixed in 0.13.16 and 0.13.17. Now it works perfectly with just signals and combinators, do not use that transverse train workaround.


Problem with train pathfinding in 0.13 is that they don't really use multiple train stations of the same name. Only in case first station is occupied they consider going to another one, which is bad. I want all those stations used evenly! Not even signals controled by circuit network can change that behavior, trains will just wait for signal to change, ignoring another free station. This bug is reported, but can't we do something before it gets fixed (hopefully) in 0.14? Yes, we can! If station must be occupied for train to consider another path, well, we will get it occupied:
factorio_0.13_multistation_1.jpg
factorio_0.13_multistation_1.jpg (187.08 KiB) Viewed 2680 times
At the bottom I have four stations of the same name. Since trains always use closest one avaible, it's enough to gradually close stations from top as they get used. The train used to close way to stations have 4 stops, for each station one.

factorio_0.13_multistation_2.jpg
factorio_0.13_multistation_2.jpg (116.07 KiB) Viewed 2680 times
To know which station should be opened I watch signals ahead of stations for yellow signal. By the way, all things connected by red cable is in the same network, I will call it red. Arithmetic combinator is used just to make incoming yellow signal appear as just one tick long to next decider. Thus upper decider (his input is red network and green cable from arithmetic combinator) outputs signal "I" for one tick when any train signal becomes yellow. And bottom decider counts this changes, reseting when there already was train in all stations.

factorio_0.13_multistation_3.jpg
factorio_0.13_multistation_3.jpg (151.5 KiB) Viewed 2680 times
Each train signal have same settings, outputing it's state to red network and reading input from its personal decider conected by green cable. This deciders watches "I" signal in red network and if this signal matches his station, it will send "O" signal to signal light, allowing it to turn green. Deciders have condition "I"=0, "I"=2, "I"=3, ... from upper station down.
Controlling those signals would be enough if trains listen to them, but since they don't, turning signals red just helps keep trains from entering incorrect stations when controling train is moving up.

factorio_0.13_multistation_4.jpg
factorio_0.13_multistation_4.jpg (142.33 KiB) Viewed 2680 times
Closing train waits in each stop until "I" signal increases, then will move and close way to another station. It will wait at first stop if "I" = 0, on second if "I" = 1 and so on.
I added conditon for lower value of "I" too, becouse especialy in last stop could happen that another train arrives in it's station before closing train finishes movement. In that case "I" signal already got reset, yet closing train still wait for it to become 4.


More stations can be easily added, should you need it.
And drawbacks? When incoming trains arrive in quick succession, it may happen that one of them will stand still at the chain signal before whole station and wait about 30 seconds before continuing. But there are ways to mitigate that, for example setting up timer conected to another signal, which will give closing train enough time to move up to his first station, or use looped closing train so there would be no long moments before first station gets open.
Last edited by ssilk on Wed Sep 14, 2016 9:19 am, edited 2 times in total.
Reason: changed topic cause fixed issue
User avatar
Azraelle
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Apr 17, 2016 5:37 am
Contact:

Re: 0.13 trains using multiple stations of the same name

Post by Azraelle »

If your trains aren't using all the stations, then you don't have enough trains / enough need to justify the extra stations. Any situation that I can imagine that would warrant train stations sharing a name, it wouldn't matter which station they used, as long as at least one was available when needed.

Just seems like, if you want all the stations used, name them differently and dedicate a train to each one.

Still, this is a rather creative way to force the situation.
Post Reply

Return to “Show your Creations”