How to make trains NOT drive THROUGH a station?
How to make trains NOT drive THROUGH a station?
I have a part in a multiplayer game where trains keep getting stuck. The train system had to grow into the remaining space in part of the base so I didn't have much choice in the design. Here is the problem:
I have a main track going through the base. From that one track branches off and splits in 3 allowing for 2 trains to sit on each track (for a total of 6). Then it merges again and enters a copper plate unloading station. Last it merges the main track again at a point after the split. Now what sometimes happens is that a iron plate train takes a turn into the station and then has to sit behind all the copper plate trains until they have all be unloaded and left. Only then it can drive through the copper unload station and keep going.
What I think happens is that the iron plate train does a path finding when the main track is blocked by a passing train while the copper plates station is free with a fully empty waiting bay. So the main track has a red signal while the station is green all the way. Problem is that by the time the iron plate train arrives the copper plate station has filled up again causing the blockage.
Normally my fix is to have the station exit before the entry, thereby making any path through the station longer than any other. But I can't do that here. Is there any way to use signals to make trains not drive through the station? I can't use just chain signals due to the waiting bays.
I have a main track going through the base. From that one track branches off and splits in 3 allowing for 2 trains to sit on each track (for a total of 6). Then it merges again and enters a copper plate unloading station. Last it merges the main track again at a point after the split. Now what sometimes happens is that a iron plate train takes a turn into the station and then has to sit behind all the copper plate trains until they have all be unloaded and left. Only then it can drive through the copper unload station and keep going.
What I think happens is that the iron plate train does a path finding when the main track is blocked by a passing train while the copper plates station is free with a fully empty waiting bay. So the main track has a red signal while the station is green all the way. Problem is that by the time the iron plate train arrives the copper plate station has filled up again causing the blockage.
Normally my fix is to have the station exit before the entry, thereby making any path through the station longer than any other. But I can't do that here. Is there any way to use signals to make trains not drive through the station? I can't use just chain signals due to the waiting bays.
Re: How to make trains NOT drive THROUGH a station?
My preferred solution is setting up the stations at my base in such way that trains that doesnt belong there cant path through other stations.
A possible solution is creating a waypoint station parallel to the copper ore waiting bays then iron ore trains no longer path through copper ore station. Its not ideal because the train will slow down to stop briefly at the station.
A possible solution is creating a waypoint station parallel to the copper ore waiting bays then iron ore trains no longer path through copper ore station. Its not ideal because the train will slow down to stop briefly at the station.
Re: How to make trains NOT drive THROUGH a station?
Plus a lot of trains drive through there, potentially all of them. So lots of trains to alter for the extra station. And then they WILL drive through there even if they didn't before.
I think an extra way point is way out of the question. It would create a massive choke point. in an already congested area.
I think an extra way point is way out of the question. It would create a massive choke point. in an already congested area.
Re: How to make trains NOT drive THROUGH a station?
I think the best advice here is:
- you should always have one track to bypass the station.
This is obviusly not a real "solution" but, you know, a 5secs delayed train because of a usless loop around the station is better then one delayed due to 2min waiting other trains to be unloaded.
So, you can get your time thinking about a solution without killing your Iron Plate supply throughput.
In the rare case the Iron Plate train will find red on the mainline and chose to enter the station, it could transit on the bypass track.
Anyway, try to post a screenshot if you can, to have the particular case in exam.
- you should always have one track to bypass the station.
This is obviusly not a real "solution" but, you know, a 5secs delayed train because of a usless loop around the station is better then one delayed due to 2min waiting other trains to be unloaded.
So, you can get your time thinking about a solution without killing your Iron Plate supply throughput.
In the rare case the Iron Plate train will find red on the mainline and chose to enter the station, it could transit on the bypass track.
Anyway, try to post a screenshot if you can, to have the particular case in exam.
Rome, Italy, Europe, Planet Earth, Solar System, Local Interstellar Cloud, Local Bubble, Orion–Cygnus Arm, Milky Way, Known Universe
(forgive me for eventually bad english, i'm trying my best)
(forgive me for eventually bad english, i'm trying my best)
Re: How to make trains NOT drive THROUGH a station?
To my knowledge, the way pathfinding works, trains calculate distance by amount of blocks between signals, if you just put more signals on certain route, trains will think it's longer and be less likely to take it.
The only other solution I can think of (other than totally rebuilding entire network) is using lots of circuitry with blocking signals, but that would break pathfinding for trains that are meant to go to that station, it would require really tons of circuitry to work properly.
The only other solution I can think of (other than totally rebuilding entire network) is using lots of circuitry with blocking signals, but that would break pathfinding for trains that are meant to go to that station, it would require really tons of circuitry to work properly.
Re: How to make trains NOT drive THROUGH a station?
The trains is stuck behind the copper plate train in the waiting bay. The waiting bay is 2 trains deep and 3 tracks wide. So a bypass to the station would not fully work. It still has to wait to get to the start of the waiting bay.paouk wrote:I think the best advice here is:
- you should always have one track to bypass the station.
This is obviusly not a real "solution" but, you know, a 5secs delayed train because of a usless loop around the station is better then one delayed due to 2min waiting other trains to be unloaded.
So, you can get your time thinking about a solution without killing your Iron Plate supply throughput.
In the rare case the Iron Plate train will find red on the mainline and chose to enter the station, it could transit on the bypass track.
Anyway, try to post a screenshot if you can, to have the particular case in exam.
(ignoring the fact that I have no space for the bypass there)
Re: How to make trains NOT drive THROUGH a station?
But they also count red signals to be more expensive than green ones. And I think the path finding will always use a green path no matter how expensive if the alternative is a red one.Avezo wrote:To my knowledge, the way pathfinding works, trains calculate distance by amount of blocks between signals, if you just put more signals on certain route, trains will think it's longer and be less likely to take it.
The only other solution I can think of (other than totally rebuilding entire network) is using lots of circuitry with blocking signals, but that would break pathfinding for trains that are meant to go to that station, it would require really tons of circuitry to work properly.
As said I think the problem is that the path finding picks a path when it makes sense but when the train actually arrives things have changed. Some trick to make it repath at the right point would probably solve the issue.
Maybe a kind of air lock. Two signals where second is always red when the first is green.
Re: How to make trains NOT drive THROUGH a station?
Personally i think redesigning is the best way to solve your issue reliable without causing other issues or having downsides. The airlock idea doesnt prevent an iron ore train entering the airlock and thus the station. Another solution is setting the station entry signal to red when the main route is red so trains have no other option then to wait in front of the intersection. The downsides is that a copper ore train also has to wait until the main track has cleared and it still doenst guarantee that a iron ore train never enters the station, maybe in combination with a airlock makes the chance very small.
Re: How to make trains NOT drive THROUGH a station?
Fix: place more stations on the branches you wish to be not pass-through. (I use "_" as name for such stations)
Watch changelogs, it was one of the better and more discussed changes in the 0.15 threads.
Rant: wonderfully wrong solutions ITT I mean - obviously, the design is just wrong, but OP has obviously already realized that, and is looking for hotfix. Because rebuilding major parts of train system is just not trivial or fast. And you all keep spamming the thread without a solution ... And even repeat same thing again and again. Please don't.
In general: for reasons above (poor post quality err I mean insane amounts of hardly filterable spam on these forums) I'd advise to ask questions on reddit weekly question thread in r/factorio.
Watch changelogs, it was one of the better and more discussed changes in the 0.15 threads.
Rant: wonderfully wrong solutions ITT I mean - obviously, the design is just wrong, but OP has obviously already realized that, and is looking for hotfix. Because rebuilding major parts of train system is just not trivial or fast. And you all keep spamming the thread without a solution ... And even repeat same thing again and again. Please don't.
In general: for reasons above (poor post quality err I mean insane amounts of hardly filterable spam on these forums) I'd advise to ask questions on reddit weekly question thread in r/factorio.
Re: How to make trains NOT drive THROUGH a station?
The airlock would have to be on the main track just before the copper branch of. So the iron ore train enters the airlock, stops at the red signal, the signal goes green and it picks a path. If at that time the copper station is free it might still go through there but that would be OK since the stations would really be free.twepy wrote:Personally i think redesigning is the best way to solve your issue reliable without causing other issues or having downsides. The airlock idea doesnt prevent an iron ore train entering the airlock and thus the station. Another solution is setting the station entry signal to red when the main route is red so trains have no other option then to wait in front of the intersection. The downsides is that a copper ore train also has to wait until the main track has cleared and it still doenst guarantee that a iron ore train never enters the station, maybe in combination with a airlock makes the chance very small.
Re: How to make trains NOT drive THROUGH a station?
There are a few things you can do to help the situation: One solution would be to place extra train stops on the copper unloading branch as Tev suggests, you may need to place a few for it to work though. Also, if possible, place them after the copper unloading station so that they don't affect the pathfinding of the copper trains heading to the unload station.
Another part of the problem is, as you've noted, that the iron train does not check its path again early enough. The airlock idea should make sure that the train updates its path but from your description it sounds a bit bulky and stopping the trains on the main line is not ideal either. You could try the simple circuit setup below, just place it on the main line and it will cause any train that reserves the blocks it makes to update their paths. It's been reliable so far, the only problem it might have is if the trains are moving really slowly, but then they've recently updated their paths anyway. The idea is that we show the train a red signal for one tick which is enough to make it update its path but not noticeably affect its speed.
Another part of the problem is, as you've noted, that the iron train does not check its path again early enough. The airlock idea should make sure that the train updates its path but from your description it sounds a bit bulky and stopping the trains on the main line is not ideal either. You could try the simple circuit setup below, just place it on the main line and it will cause any train that reserves the blocks it makes to update their paths. It's been reliable so far, the only problem it might have is if the trains are moving really slowly, but then they've recently updated their paths anyway. The idea is that we show the train a red signal for one tick which is enough to make it update its path but not noticeably affect its speed.
Path changer
Re: How to make trains NOT drive THROUGH a station?
I can't try that blueprint string now but it sounds like you reduced the airlock to a single signal and wired it up so when it turns yellow it goes red for a single tick. This will cause the train to break for one tick and then repath and continue. Which indeed should not be noticeable.aaargha wrote:There are a few things you can do to help the situation: One solution would be to place extra train stops on the copper unloading branch as Tev suggests, you may need to place a few for it to work though. Also, if possible, place them after the copper unloading station so that they don't affect the pathfinding of the copper trains heading to the unload station.
Another part of the problem is, as you've noted, that the iron train does not check its path again early enough. The airlock idea should make sure that the train updates its path but from your description it sounds a bit bulky and stopping the trains on the main line is not ideal either. You could try the simple circuit setup below, just place it on the main line and it will cause any train that reserves the blocks it makes to update their paths. It's been reliable so far, the only problem it might have is if the trains are moving really slowly, but then they've recently updated their paths anyway. The idea is that we show the train a red signal for one tick which is enough to make it update its path but not noticeably affect its speed.
Meanwhile I placed a bunch of dummy train stops at the copper station and haven't seen a iron train stuck again. But I will try the signal thing too, probably tonight if everybody shows up to continue the game.