How to optimize railsetup
- planetmaker
- Fast Inserter
- Posts: 188
- Joined: Mon Jan 21, 2019 9:30 am
- Contact:
How to optimize railsetup
Consider the setup as in the screenshot:
one train is waiting at the entrance to the station complex while there are accessible free stations. Is there a way to make it favour the non-occopied but open stations instead of waiting for an occupied one? The difference is the open, but un-occupied are behind a circuit-controlled closed station. I consider this a bit strange behaviour on behalf of the path finder... alas.
More combinators and closing station as soon as one train is loading might be an option but is not my preferred solution as it costs space which I don't have.
one train is waiting at the entrance to the station complex while there are accessible free stations. Is there a way to make it favour the non-occopied but open stations instead of waiting for an occupied one? The difference is the open, but un-occupied are behind a circuit-controlled closed station. I consider this a bit strange behaviour on behalf of the path finder... alas.
More combinators and closing station as soon as one train is loading might be an option but is not my preferred solution as it costs space which I don't have.
Re: How to optimize railsetup
IIRC trains choose their routes based on “percieved distances”, and it measures that percieved distance based on the number of signals (rail and chain) it must pass, picking the shortest distance.
Things like trains occupying a station add a certain amount of weight, or “percieved distance” to the calculation. So do circuit-closed stations. In fact, I believe that circuit-closed stations add the most to that distance calculation.
I understand what you are trying to do, to load the train directly from the miners, and to account for the fact that different wagon spaces will have different depletion times for the overall mine. I just don’t know what you should do about it. I tried it once, and at a very low Mining Productivity level did not care for it. I have personally scrapped the idea, but if you can get it to work well, more power to you.
Things like trains occupying a station add a certain amount of weight, or “percieved distance” to the calculation. So do circuit-closed stations. In fact, I believe that circuit-closed stations add the most to that distance calculation.
I understand what you are trying to do, to load the train directly from the miners, and to account for the fact that different wagon spaces will have different depletion times for the overall mine. I just don’t know what you should do about it. I tried it once, and at a very low Mining Productivity level did not care for it. I have personally scrapped the idea, but if you can get it to work well, more power to you.
- 5thHorseman
- Smart Inserter
- Posts: 1193
- Joined: Fri Jun 10, 2016 11:21 pm
- Contact:
Re: How to optimize railsetup
This is just a thought. I've never used this particular setup but I have had multiple stations with the same name at the same outpost.
Try putting a station right where your train is waiting. Name it "Enter [iron ore]" or something. Have all trains path to it with no conditions, then "[iron ore] pickup". They should pick an unused station at that time, no?
If that doesn't work, maybe disable stations based on if a train is at them.
If that doesn't work, try both together
Try putting a station right where your train is waiting. Name it "Enter [iron ore]" or something. Have all trains path to it with no conditions, then "[iron ore] pickup". They should pick an unused station at that time, no?
If that doesn't work, maybe disable stations based on if a train is at them.
If that doesn't work, try both together
Re: How to optimize railsetup
Think this is the same issue? Quote from Friday Facts #331 - 0.18.0 release & Train pathfinder changes
See the daily™ struggles with my Factory! https://www.twitch.tv/repetitivebeats
Re: How to optimize railsetup
Quoting https://wiki.factorio.com/Railway/Train_path_finding
Maybe try closing the other stations as soon as a train arrives. (I've never used such a setup, but from memory of other forum threads closing a station as soon as a train arrives shouldn't result in the just arrived train having to leave). With only one open station, the train will hopefully use that despite the penalty.
My guess is that penalty will result in a train preferring to wait for an open but occupied train station to be available rather than pass a train stop that is closed. (I'm not certain that a closed station applies that penalty, but I think it probably does).When the path includes a train stop that is not the destination -> Add a penalty of 2000.
Maybe try closing the other stations as soon as a train arrives. (I've never used such a setup, but from memory of other forum threads closing a station as soon as a train arrives shouldn't result in the just arrived train having to leave). With only one open station, the train will hopefully use that despite the penalty.
Re: How to optimize railsetup
No my post in FF331 was a reference to an issue with stackers here: viewtopic.php?p=382712#p382712
What's happening in the op is the train waiting would have to pass through closed stops getting to open stops so it prefers the occupied stop.
For this setup to work 4 closed stops must have less penalty than one occupied open stop.
My Mods: mods.factorio.com
Re: How to optimize railsetup
How about enabling a waypoint stations shortly after a switch instead, so the path behind it gets a bonus (i.e. decreased penalty)? I'm using that method in my game to enforce certain routes. The station needs to be enabled only until the train has crossed the switch: Trains come in from the left and stop at the station with the yellow box. The station on the bottom right is open by default (overflow). I use combinator logic to determine which exit should be opened. The signal behind that switch is set to green, the signals behind all other exits are set to red. The "Node" stations immediately behind those signals are enabled when the signal in front of them is green. The waypoint will always be the closest station of that name the train can reach, so it actually chooses that path. Once the head of the train has passed the signal, it will turn red, so the waypoint station will be disabled again and the train moves on to the next station behind it, without coming to a halt.Zavian wrote: ↑Fri Mar 20, 2020 9:29 pm My guess is that penalty will result in a train preferring to wait for an open but occupied train station to be available rather than pass a train stop that is closed. (I'm not certain that a closed station applies that penalty, but I think it probably does).
Maybe try closing the other stations as soon as a train arrives.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to optimize railsetup
Just try to use both signals before each junction. Chain+regular like this:
I've made some tests trying to solve another problem, but conclusions may be helpful and in your case.
I've made some tests trying to solve another problem, but conclusions may be helpful and in your case.
Re: How to optimize railsetup
Deactivating a station immediately makes a train leave (if it has more stations on its schedule).
Re: How to optimize railsetup
Very smart ideaPi-C wrote: ↑Sat Mar 21, 2020 12:26 pm How about enabling a waypoint stations shortly after a switch instead, ... The "Node" stations immediately behind those signals are enabled when the signal in front of them is green. ... Once the head of the train has passed the signal, it will turn red, so the waypoint station will be disabled again and the train moves on to the next station behind it
I also had the idea for nodes stations on each track that are active if one station after them is active. But linking those node stations directly to the entrance signal of that track is just too smart.
"Not coming to a halt" also happens if there are no conditions set for that station in the trains schedule.
One thing that comes to my mind is the following: If there is more than one "PICKUP" station activated on one track, the trains will always go for the right most one of those stations, I think. Emptying the ore patch from right to left.
Re: How to optimize railsetup
That wouldn't work in my game: All my stations have the same name, and all trains have the same schedule (goto station, wait for X seconds inactivity + circuit signal "green"). Routing is completely done via circuit network. To be frank, I don't know how it will behave with lots of trains, I've just concentrated on the logic part, neglecting most of my factory during that time. Couldn't continue playing even if I had the time because the one mod crucial to my setup still crashes reliably whenever I touch a locomotive.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!