I have a train station layout with multiple train stops of the same name ("Iron Smelting"). I have combinators hooked up so that the signal leading to the lane with the least amount of ore will be green and the rest red which will always force the trains to unload at the station with the least amount of ore. Unless the station with the least amount of ore currently has a train at it, then they will turn the signal green going to the station with the second least amount of ore, etc.
This system worked flawlessly while I was running it with 8 lanes. But I have expanded it to 20 or so lanes and now every so often a train will get stuck at the chain signal seen in the pics. It will be working fine and randomly a train will get stuck there. As you can see from the pic, the chain signal is blue indicating that there is an open lane ahead and indeed you can see that bay N has a green signal. Why won't the train go? Thanks!
Why do trains get stuck at this chain signal?
-
- Inserter
- Posts: 47
- Joined: Tue Jul 19, 2016 1:35 pm
- Contact:
Why do trains get stuck at this chain signal?
- Attachments
-
- problem.jpg (313.45 KiB) Viewed 4097 times
-
- train problem 2.JPG (198.61 KiB) Viewed 4097 times
"I have come here to smelt iron ore and kick biter ass.....and I'm all out of iron ore." -me
- MalcolmCooks
- Filter Inserter
- Posts: 253
- Joined: Mon Apr 06, 2015 8:32 pm
- Contact:
Re: Why do trains get stuck at this chain signal?
see this topic for a solution: viewtopic.php?f=18&t=34321
Re: Why do trains get stuck at this chain signal?
Yeah, this is annoying
I hope they do a rework of train pathfinding
I hope they do a rework of train pathfinding
- MalcolmCooks
- Filter Inserter
- Posts: 253
- Joined: Mon Apr 06, 2015 8:32 pm
- Contact:
Re: Why do trains get stuck at this chain signal?
The fix could be as simple as having trains recalculate their path when they stop at a chain signal :/Fish wrote:Yeah, this is annoying
I hope they do a rework of train pathfinding
Re: Why do trains get stuck at this chain signal?
which will not work.MalcolmCooks wrote:The fix could be as simple as having trains recalculate their path when they stop at a chain signal :/Fish wrote:Yeah, this is annoying
I hope they do a rework of train pathfinding
mind that if there is multiple signals (crossing), after then you don't know which one of them will change color of signal you stop at. so what you want to recalculate? path to free station? but what if in that time comes other train, from different direction?
recalculation of path, whem you pass signal is one of best approaches you can have (unless you plan to make heuristic logic network).
-
- Inserter
- Posts: 47
- Joined: Tue Jul 19, 2016 1:35 pm
- Contact:
Re: Why do trains get stuck at this chain signal?
Thanks for the link, that sheds some light on what each train is "thinking". I didn't know any of that before. That faux chain signal doesn't quite work for my design though. I want the trains to pick the station which has the least amount of ore in its buffer in order to keep things balanced out, but they always pick whichever station they feel like even if I make the signal before the station go red and they have another route to get to a station where the signal is green. In fact even if you don't want to balance out the stations, how do you get a large amount of trains to unload simultaneously without having different station names? It seems to me that if you have more than 10 or so stations of the same name, the trains will just end up parking behind a station which is already unloading a train leaving multiple other stations empty and idle.MalcolmCooks wrote:see this topic for a solution: viewtopic.php?f=18&t=34321
Any thoughts? Solutions?
"I have come here to smelt iron ore and kick biter ass.....and I'm all out of iron ore." -me
-
- Inserter
- Posts: 47
- Joined: Tue Jul 19, 2016 1:35 pm
- Contact:
Re: Why do trains get stuck at this chain signal?
Ok, one thing I think I just found out is that trains seem to look for a route that is all green, however, they will treat a signal which you have artificially turned red via circuit conditions as a green light (yes, they will stop at it, but they don't factor it into their route planning)! They seem to treat a signal that is red because a train is in the way differently than a signal which you have set to red.
"I have come here to smelt iron ore and kick biter ass.....and I'm all out of iron ore." -me
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Why do trains get stuck at this chain signal?
Pretty sure the train has no idea why a signal is red. It might be if you're setting them both in the same tick? I would set the stations and faux-signal separately, let the faux-signal work based solely off the colour of the lights rather than any other logic.
Connect the faux-signal on say a green network, then you'll want to set up a separate circuit (connect the signals with red wires) across the loading bays that enables access to only an empty station with the least amount of ore. Easiest way is like a loading station, enable any station that is equal or less than average. To enable JUST one station, see this Reddit post, seems to do what you want, just remember to keep it separate from the faux-signal.
Connect the faux-signal on say a green network, then you'll want to set up a separate circuit (connect the signals with red wires) across the loading bays that enables access to only an empty station with the least amount of ore. Easiest way is like a loading station, enable any station that is equal or less than average. To enable JUST one station, see this Reddit post, seems to do what you want, just remember to keep it separate from the faux-signal.
Money might be the root of all evil, but ignorance is the heart.