Many stations, one name
Many stations, one name
So I tried to read up a bunch on the topic and didn't find anything past last Dec/Jan time frame. Mostly ssilk and kovarex posting on the algorithm. It seems I'm not sure exactly how it works.
I thought if a train was going to a station name and there were, for example, three stations with that name it would (I would like it to operate this way):
1. Check to see which one(s) were unoccupied
2. Go to the nearest unoccupied one
3. If waiting at a red signal after a time it would search again for an open station
Apparently it seems the train has no knowledge of whether or not a station is in use but will check two blocks ahead to see if its current path is blocked or if another station is available. This means that if two stations with the same name are far apart it won't ever go to the farther one.
I have a situation with three stations. The closest one is always full, the second farthest one is a ways away but gets visited every once in a while. The third one never gets visited. I may have 4 or 5 trains waiting at the nearest station and they won't reroute or go to the further ones even if they are empty or the way is clear.
My current setup:
http://i.imgur.com/QVJBNHk.png
Can someone shed some light on exactly how these things are working?
Thank you very much!
I thought if a train was going to a station name and there were, for example, three stations with that name it would (I would like it to operate this way):
1. Check to see which one(s) were unoccupied
2. Go to the nearest unoccupied one
3. If waiting at a red signal after a time it would search again for an open station
Apparently it seems the train has no knowledge of whether or not a station is in use but will check two blocks ahead to see if its current path is blocked or if another station is available. This means that if two stations with the same name are far apart it won't ever go to the farther one.
I have a situation with three stations. The closest one is always full, the second farthest one is a ways away but gets visited every once in a while. The third one never gets visited. I may have 4 or 5 trains waiting at the nearest station and they won't reroute or go to the further ones even if they are empty or the way is clear.
My current setup:
http://i.imgur.com/QVJBNHk.png
Can someone shed some light on exactly how these things are working?
Thank you very much!
My Factorio playlist!
https://www.youtube.com/playlist?list=P ... EXjg46Irsk
https://www.youtube.com/playlist?list=P ... EXjg46Irsk
Re: Many stations, one name
Being able to name many stations with the same name is useful for unloading stations, where you have many trains going to the same location, and thus the chances of one or more stations being occupied are high, and it doesn't matter which station is used. In your case, the mines should be given unique names since a) they are far enough apart that the chance of multiple stations being occupied is low, and b) you need each station to be visited.
Re: Many stations, one name
From what i understand, the pathfinder for trains looks up all possible paths for a train to get to a station, and then assign each path a score. This score depends on lenght, red signals, and possibly other factors. Then, the train chooses the path with the best score.
For your situation, the closest mine will probably get the best score, and is therefor visited the most. Bottom line, trains to not choose which station to use randomly. (Somebody correct me if I'm wrong)
As stated before, having the same name to stations only works for stations very close to each other. Also, stations need to be able to handle uneven loading/unloading. This system works well if one unloading station is not enough any more. For mines, i think this solution is not really useful, for two reasons. The first one you already discovered. Trains will not go to the station that is furter away. The second problem with mines is their uneven loading capabilites. Some mines output more than others, especially if they start to run dry. If you manually assign trains to each mine, you can correlate mine output vs. trains used, and get much higher ressourece throughput.
Although i hate to say this, but i think in this case micromanagement is the way to go.
For your situation, the closest mine will probably get the best score, and is therefor visited the most. Bottom line, trains to not choose which station to use randomly. (Somebody correct me if I'm wrong)
As stated before, having the same name to stations only works for stations very close to each other. Also, stations need to be able to handle uneven loading/unloading. This system works well if one unloading station is not enough any more. For mines, i think this solution is not really useful, for two reasons. The first one you already discovered. Trains will not go to the station that is furter away. The second problem with mines is their uneven loading capabilites. Some mines output more than others, especially if they start to run dry. If you manually assign trains to each mine, you can correlate mine output vs. trains used, and get much higher ressourece throughput.
Although i hate to say this, but i think in this case micromanagement is the way to go.
Re: Many stations, one name
Reviving the dead here, but I hit this thread by google, looking for the exact same thing.
I'm playing a deathworld setup, base settings (so ore patches are frequent enough, but relatively tiny, especially with the exceptional resource demands).
micro-management of dropping in mines and stations is painful enough on its own ("here, let me collect that 500k of iron, because while it won't last very long, I definitely need it!"), but I'm setting up (and eventually ripping down) dozens of trains over and over again (single train per station, so I don't have to pay attention to bottlenecks as much, etc.).
Naming all stations "copper ore mine" "iron ore mine", or just "mine" (with smart inservers/bots/whatever) and designing trains around a round-robin setup would have been nice (and occurred to me last night, when I noticed the balancing of my unloading termination, with multiple lanes named the same looked somewhat random). I guess it's not to be? =(
I'm playing a deathworld setup, base settings (so ore patches are frequent enough, but relatively tiny, especially with the exceptional resource demands).
micro-management of dropping in mines and stations is painful enough on its own ("here, let me collect that 500k of iron, because while it won't last very long, I definitely need it!"), but I'm setting up (and eventually ripping down) dozens of trains over and over again (single train per station, so I don't have to pay attention to bottlenecks as much, etc.).
Naming all stations "copper ore mine" "iron ore mine", or just "mine" (with smart inservers/bots/whatever) and designing trains around a round-robin setup would have been nice (and occurred to me last night, when I noticed the balancing of my unloading termination, with multiple lanes named the same looked somewhat random). I guess it's not to be? =(
Re: Many stations, one name
i think the issues you have is that a Train that qued in an occupied trainstation dont have a chane to Bypass the Station to drive to a different one, a 2nd Option is to disable a transtation with logic so for a mining Station is there less then your Train can hold disable the station
Mining Drill Operator
Re: Many stations, one name
Curious, you can "disabnle a train station"? I've never tried wiring direct to it, I'll take a poke there, that's potentially brilliantShaymes wrote:i think the issues you have is that a Train that qued in an occupied trainstation dont have a chane to Bypass the Station to drive to a different one, a 2nd Option is to disable a transtation with logic so for a mining Station is there less then your Train can hold disable the station
Re: Many stations, one name
i dont test the train behavior if a train load/unload and the trainstation goes offline, maybe it need an OR logic from the trainstation railsignal like RED OR Condition
but in general you can setup something like this
but in general you can setup something like this
Mining Drill Operator
Re: Many stations, one name
Yeah, I ran across another thread, where the devs mentioned it was a new feature added in 0.15.Shaymes wrote:i dont test the train behavior if a train load/unload and the trainstation goes offline, maybe it need an OR logic from the trainstation railsignal like RED OR Condition
but in general you can setup something like this
I think I can work something clean with this, I am pleased
Re: Many stations, one name
Hrm,Shaymes wrote:i dont test the train behavior if a train load/unload and the trainstation goes offline, maybe it need an OR logic from the trainstation railsignal like RED OR Condition
but in general you can setup something like this
Ok, so I setup a "wait" station, generalized, in the middle of my rail network, with a half dozen tracks, all stations named "idle".
I ran red wire back to it from a test mine, and hooked up a set of combinators to read the contents of each cars worth of chests, and only turn the station on when there was enough ore to fill the car. Set the "send to train" option on the station at the mine, to send a signal to the circuit network to "release" the train, on signal "i" (for iron). So far, this works better than expected, train waits at the idle station, then shows up when there is enough ore...
Ok, so then I go and do the obvious, let's add 2-3 more trains to the tracks, let 'em sit at idle, and come in when there is ore. Sounds good, right?
The obvious problem then creeps up -- the first train gets in, starts loading, and the second/third/etc. pile behind, blocking my main rail corridor. I can't have enough space at every station to accommodate every train for in the network as an overflow/queue area, but I can't stop the "wait" area from releasing 'em all at once, they all get the same signal, and get waved on through.
I tried setting up a read signal, in the middle of the station, to set the iron value on red to -2.0M (thus making the boxes look empty, and to disable the station once a train was already in it), but the obvious thing happened. Train rolls up, station gets disabled on the spot, train rolls away....
you can set rail signal conditions as well as read 'em, but it has a warning, if a train stops for a red signal you've specified, it's probably just going to sit there, and not re-route...
So basically I've got a station that once it's got enough ore to fill the cars, it'll call every train in the empire, and they'll all clog the main corridor, then eventually pass-by (once the train exits, the station disables itself, and then go to the drop location empty handed). Also, of course the station will also promptly disble itself once the iron reserves in either group of chests falls below 2.0k, promptly tossing out the train that just started loading, though at least this one can be resolved with a few methods (timer, reading train contents back to a combinator and feeding it back in, etc.)
Thoughts/suggestions/etc?
Re: Many stations, one name
I have made a suggestion thread to add some features for this scenario to work. Take a look.
viewtopic.php?f=6&t=47695
viewtopic.php?f=6&t=47695
Re: Many stations, one name
You need to disable the station after train stops. Once the train has stopped at the station, it will only leave once it's departure criteria is met, and station disabling no longer matters.porcupine wrote:I tried setting up a read signal, in the middle of the station, to set the iron value on red to -2.0M (thus making the boxes look empty, and to disable the station once a train was already in it), but the obvious thing happened. Train rolls up, station gets disabled on the spot, train rolls away....
As it is, you're disabling the station while the train hasn't yet arrived, so it's switching to next station in it's list.
There was a thread which investigated how signals work in relation to train arrival, and IIRC it's possible to detect train arrival with tick precision if you place signals correctly.
Re: Many stations, one name
Ah ok, I hadn't seen that, good to know. Thanks!Lav wrote:You need to disable the station after train stops. Once the train has stopped at the station, it will only leave once it's departure criteria is met, and station disabling no longer matters.porcupine wrote:I tried setting up a read signal, in the middle of the station, to set the iron value on red to -2.0M (thus making the boxes look empty, and to disable the station once a train was already in it), but the obvious thing happened. Train rolls up, station gets disabled on the spot, train rolls away....
As it is, you're disabling the station while the train hasn't yet arrived, so it's switching to next station in it's list.
There was a thread which investigated how signals work in relation to train arrival, and IIRC it's possible to detect train arrival with tick precision if you place signals correctly.
I wired up to the [mine] station to use as a condition to prevent the station from closing once a train arrived (IE: to prevent stock from dipping < 4k ores say, and booting the train out of the station), by checking the qty of ores in the train, and preventing the station from disabling as long as there was a train with ores parked there. Sounds like that was unnecessary.
I don't think the same mechanism would help determine when the train stopped (to intentionally disable the station), since that condition would presumably vanish the second you disabled the station, leading it to flicker repeatedly.
I'm stuck trying to deal with the wait station. I was going to set it up as a single lane instead of many stations (should have seen that one earlier), where the back-log behind that lane simply holds many trains, and then count the trains leaving, weighed against the number of mines that were open, figured that'd be a straight-forward and clean way of doing it... Problem is, I can't figure out how to count trains (IE: if you go by the train signal's red light, it counts per tick, not per passing). Saw a potential solution, but the BP wouldn't convert to .15 properly, and there was no explanation as to how it worked really =\
Re: Many stations, one name
I'm not really that worried about blow-past to be honest, so I'm not sure if that'll help much.
I didn't have any clue how to use combinators this time yesterday, and was having trouble counting trains passed.
Here's where my idea sits now. All mines named the same, the mine having a 2 cargowagon loading spot, calls the train by pulse out the "I" (for iron) signal +1 (IE: send an iron train), and enabling the stop (other ores can use other letters). Red network connected between the "idle" station, and the mine/etc.
For the idle station, have a sensor (rail signal) [pulse] at the exit, "-i" to the "i" (iron) signal, to indicate a train has left. I was having issues with the pulse setup (right now, it pulses "-2" instead of "-1" when the light is red, but then goes to "1" when it's reset.
For anybody looking to do the same, maybe this BP string will be useful (or maybe somebody else will point out how I'm doin' it wrong, both are welcome!):
Code: Select all
0eNrFV9GuojAQ/Zc+buCGFlAu2d3E++Y3bDYEYdQmUEgpZo3h37cF5SoUterdfdEM055O55zOtAe0ymooOWUChQdEk4JVKPx1QBXdsDhT38S+BBQiKiBHFmJxriwe0ww1FqIshT8oxM1vCwETVFDo5rfGPmJ1vgIuB/Qzk5rvILVbAAuVRSXnFEwtJHFs10J79SehU8oh6Xy4sUaIpEeshATbbMUUptdhkkaD4vYoK7qxIZMrcprYZZHBGMk5AVlI5ol10VXKidUPh/R861Ra73Ik5UlNRWuSswiUjf1Lv0xjo4vS66PMIaV1fitQ8uZ3oeI3X4fnG+bO0YHMLsRgHwUzhjgF48hYLlj1NKDzHjSFhKbA7aTIV5TFouAabNxtcwRNWoYEL7JoBdt4R+VsOeWIGUlfSnvy1pRXIhoJfke5qNsdnXLVjrAVzZ0CKhGrY+MoIy9j3gYZop9ySlGLsjYAXXSQ5V7GVjMRrXmRR5RJDBSu46yCZkJ0Gw7AhrLDSkgWIhOqxGQou4Es3ZEsLf1CwX36DfrtxpyKbQ5CSvcasYa8fqI+Ry3EyfaSWxlIUYJktl0efXuA2iVqjMgLrteM+Y2S4g7915Tw/mKi302Jdv8P0ctLlu2vpVmT+MCEJXci29gxrOPaFoixYSEno0KuJ+u0wSQrKugT2Vazz91ziNPeJ3gNJkdlfp8qMTGV5bGx4H8sy8XrZflhJMv5pCz1fca9kwDXqK2bJf8lTX3x+pb+caWlt0J/hpaJMj3s7LcIvLOsY8+w0HhaFP+Ry503lMHsC2WwvC6D7w/IoL8umt/tJlrBlYvdbIpA08u691SNV/KeKPGD8t+z9YqLOB7Q9QMZZHb4FiNTqZwbPsbwWUp1eIHh2Zo16vi3z/Hw7PVuoR3wqjshnkd84jquGzTNXzrPaXE=
Re: Many stations, one name
Hrm, so I think I might be doing something wrong, spent a few hours trying to google/read the forums/etc. without avail.porcupine wrote:[...]
Here's where my idea sits now. All mines named the same, the mine having a 2 cargowagon loading spot, calls the train by pulse out the "I" (for iron) signal +1 (IE: send an iron train), and enabling the stop (other ores can use other letters). Red network connected between the "idle" station, and the mine/etc.
For the idle station, have a sensor (rail signal) [pulse] at the exit, "-i" to the "i" (iron) signal, to indicate a train has left. I was having issues with the pulse setup (right now, it pulses "-2" instead of "-1" when the light is red, but then goes to "1" when it's reset.
[...]
Is it possible to use combinators to store a variable, that can be both read, and written to (by its own variable name, IE: "i" for iron) on a single red network?
IE: have the mine push a pulse of "+1" to "i" to say "im ready, send me a train!", and the waiting depot to push a "-i" to "i" to say "a train just went out", where you're trying to effectively keep "i" at 0 (equilibrium, no extra trains out, no stations full waiting for pick-up)?
I mean, I guess the network doesn't need to know what "i" is technically, only the wait-area... But this has been dogging me all afternoon, I can't figure it out (and the crazy combinatormemory schemes people have come up are just way beyond my level at this point, hence I ask if I'm even understanding the possibilities properly)?
Re: Many stations, one name
Ok folks, I believe I've come up with a reasonably ellagant solution. This is how it looks. Red wire goes across the high voltage power poles next to my tracks, between the wait station, and the mines.
The wait station is a long track that goes nowhere (loops back on itself, not a route other trains want to take, somewhere near the "middle" of your mine area, enough to accommodate a dozen trains). There is a single station at the end, labeled "iron wait", and a lot of regular rail signals in between. Just before the "iron wait" station, this blueprint exists (with a buffer ~1 train length between it, and the nearest rail signal):
This is the storage of the iron train network status, along with a constant combinator you can flip on/off to flush a single train through at a time (IE: if anything goes awry). If that train you flush through can't find a station, don't worry, it'll fail, buzz past your ore delivery area, and get back into queue (might even be worth timering a flush every few minutes say, just in case!)
The red wire on the large power pole in this BP, needs to be wired into the rest of your red wire large power pole setup (that really should encompass your entire tracks). It uses the signal "i" for iron across the network, so you can adopt "c" for copper, "o" for coal, or what have you.
Next, the stations, this is the BP that seems to be working for me, it's the chest/combinator logic you probably want, the rest is likely fluff for most:
With this, you have a 2 cargo wagon loading iron ore station (with built in belt balancer/quick loading distribution). The bottom left combinators count, and when there's > 2k ores in each set of chests, they turn the station on, which in turn the pulse combinator at the top of the BP fires a signal down the red signal network, to which your wait area is connected, asking for a train to be released. Once a train arrives at the station, it turns the station off automatically (so any others en-route will automagically re-route on the spot), and starts loading. After it's done loading, when the train moves on, the station automatically opens (thanks 0.15.11 update!), and passes over the signal immediately past the station. When this turns red, if there's still enough ore in the chests to fill another car, it fires a signal back down to the wait area, to ask for another train.
As far as I can see this should solve the riddle, a few quick notes (for anybody who stumbles from scratch, etc.):
- You'll want to name all mines the same thing. IE: "iron mine"
- If you're using this for other ores, just pick letters for the other ores for their respective logic in the station/wait area logic blocks. They can travel down the same red wire this way.
- Red wire needs to exist connecting all mines using this setup, to the wait area.
- The wait area should be off to the side somewhere, where no trains will accidentally take it (tried mine cutting a shortcut, despite having over 20 stations in the wait area [which are supposed to add +300 tiles/ea to pathing], my stupid *@$#( sulphur train insists on taking this short cut (messing up the count).
- You want your wait area to contain more trains then you can normally use.
- You generally want to order your trains to, #1 - Pickup at mine, #2 - Drop-off at base/refinery/smelt, #3 - Go to wait area. You should probably do "full load" on the first, "full unload" on the second, and "wait 0 seconds" on the 3rd (the red light will stop 'em).
- The benefit/basis of this setup is pretty straight forward. You drop a number of trains in "wait", and then you never have to touch trains/schedules/etc. again. You create a new mine? Great, just name it, and walk away. Deleting a mine? Great, delete it and walk away.
Known sub-optimal behavior:
- Trains let out quickly/sequentially will all head to the same mine to pick up, and re-path when the first train enters and closes the station. This could happen repeatedly in larger bases (IE: forcing trains to just drive aimlessly, as the train before 'em snags the station they were after, etc.).
- Behavior above (in a saturated station network) could have the same impact for multiple trains being let out/flushed through (IE: never hitting the delivery/resetting to the wait station, since the "iron mine" is never globally closed, forcing the train to select the next condition).
- More to come!
Let me know what you think, hopefully somebody finds this useful (God knows I couldn't drop it until I figured this out... and hopefully it works as well as I think it does at first blush, given I still don't know combinators very well, and I think it's mostly beginners luck).
I've attached a pic of my wait area for reference (yes, it's short on trains, I've been testing more than anything).
The wait station is a long track that goes nowhere (loops back on itself, not a route other trains want to take, somewhere near the "middle" of your mine area, enough to accommodate a dozen trains). There is a single station at the end, labeled "iron wait", and a lot of regular rail signals in between. Just before the "iron wait" station, this blueprint exists (with a buffer ~1 train length between it, and the nearest rail signal):
Code: Select all
0eNrlXU2P20gO/S86LuyB6rvUwC6Quc15clsEDbetJML6C7IcbBD0f1/J7rhlSXQ9sp1kFnPpRrftJxZZrCJfkeVv2dP6WO7rattkD9+yarnbHrKHf3/LDtWn7WLd/a/5ui+zh6xqyk02y7aLTfdXvajW2fMsq7ar8r/Zg3qeJT/ycXFo5k292B72u7qZP5Xrpoegnz/MsnLbVE1VniU4/fH1cXvcPJV1+4gL0PJYfylX85MIs2y/O7Sf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+F7BwIL715HYN3uZDfAuGVkCEC4aU3tIPwRkjogPBWSOhQrjT8AoQbVZznQmxLAXkht2Kg9McFIbdCDjzCA9e3By5kNrBxeymzAcIrGTsAogvLi0B0I8vfQXQry+ZBdCfLvqnZ7L3wWNj83S4Smog9E9ke2kqhe60UULYXWBb4G1wkNGUbKjXj9mLguZyPwi3cUc7JroS7bNsOux5YB+nBFHHZmQ5KGGh4KI4Zfp0HoBLNVYkRBiSUGYO0HNxDW0KQHk6RJoS/821+vtMsUEBBOBciBSj1sIhpshAaipI35kLTQN+YocWdFgUlr5YeU1NFRvxv9bhMggIr5o2WOVtpWZ14bUFlleY6pMGC9NybVEJk5nWKOigadk0kE6UzUrtxn45gHrKn9bHc19W2G8eXsj6cHcHaNhU3uTHx+fl/Vewn/g==
The red wire on the large power pole in this BP, needs to be wired into the rest of your red wire large power pole setup (that really should encompass your entire tracks). It uses the signal "i" for iron across the network, so you can adopt "c" for copper, "o" for coal, or what have you.
Next, the stations, this is the BP that seems to be working for me, it's the chest/combinator logic you probably want, the rest is likely fluff for most:
Code: Select all
0eNrlXU2P20gO/S86LuyB6rvUwC6Quc15clsEDbetJML6C7IcbBD0f1/J7rhlSXQ9sp1kFnPpRrftJxZZrCJfkeVv2dP6WO7rattkD9+yarnbHrKHf3/LDtWn7WLd/a/5ui+zh6xqyk02y7aLTfdXvajW2fMsq7ar8r/Zg3qeJT/ycXFo5k292B72u7qZP5Xrpoegnz/MsnLbVE1VniU4/fH1cXvcPJV1+4gL0PJYfylX85MIs2y/O7Sf2W2757Y4c21m2df2t2plylZVXS7Pr5pOxAGmvmAeWsGqT58bEtW/oOprVD2BanBUi6NaHFXjqA5HzXFUD6OqiKMGHJVhrYijMqxV4KgMa6kch2WYSykYlmEuhXsXw1wK9y6GuRTDuxiosHdxjAU7F0dS2Lc4SoVdi2N/2LMYU1XDfsVxKw27FWcN0LBbcdYrDbsVZ23VsFtx9gENuxVnz9IeCzCo+MJPYcJuxdmzNexXnPhCw47FioVg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UGYO0HNxDW0KQHk6RJoS/821+vtMsUEBBOBciBSj1sIhpshAaipI35kLTQN+YocWdFgUlr5YeU1NFRvxv9bhMggIr5o2WOVtpWZ14bUFlleY6pMGC9NybVEJk5nWKOigadk0kE6UzUrtxn45gHrKn9bHc19W2G8eXsj6cHcHaNhU3uTHx+fl/Vewn/g==
As far as I can see this should solve the riddle, a few quick notes (for anybody who stumbles from scratch, etc.):
- You'll want to name all mines the same thing. IE: "iron mine"
- If you're using this for other ores, just pick letters for the other ores for their respective logic in the station/wait area logic blocks. They can travel down the same red wire this way.
- Red wire needs to exist connecting all mines using this setup, to the wait area.
- The wait area should be off to the side somewhere, where no trains will accidentally take it (tried mine cutting a shortcut, despite having over 20 stations in the wait area [which are supposed to add +300 tiles/ea to pathing], my stupid *@$#( sulphur train insists on taking this short cut (messing up the count).
- You want your wait area to contain more trains then you can normally use.
- You generally want to order your trains to, #1 - Pickup at mine, #2 - Drop-off at base/refinery/smelt, #3 - Go to wait area. You should probably do "full load" on the first, "full unload" on the second, and "wait 0 seconds" on the 3rd (the red light will stop 'em).
- The benefit/basis of this setup is pretty straight forward. You drop a number of trains in "wait", and then you never have to touch trains/schedules/etc. again. You create a new mine? Great, just name it, and walk away. Deleting a mine? Great, delete it and walk away.
Known sub-optimal behavior:
- Trains let out quickly/sequentially will all head to the same mine to pick up, and re-path when the first train enters and closes the station. This could happen repeatedly in larger bases (IE: forcing trains to just drive aimlessly, as the train before 'em snags the station they were after, etc.).
- Behavior above (in a saturated station network) could have the same impact for multiple trains being let out/flushed through (IE: never hitting the delivery/resetting to the wait station, since the "iron mine" is never globally closed, forcing the train to select the next condition).
- More to come!
Let me know what you think, hopefully somebody finds this useful (God knows I couldn't drop it until I figured this out... and hopefully it works as well as I think it does at first blush, given I still don't know combinators very well, and I think it's mostly beginners luck).
I've attached a pic of my wait area for reference (yes, it's short on trains, I've been testing more than anything).
- Attachments
-
- wait station layout (just to get an idea of spacing/etc. in case my description sucks)
- factorio.jpg (1.96 MiB) Viewed 21517 times
Last edited by porcupine on Wed May 17, 2017 7:25 am, edited 1 time in total.
Re: Many stations, one name
I was thinking about a setup with two chained stations and a single train depot.
Train depot only has one exit, so only one train can leave it at a time.
Two stations at resource pickup work in tandem and the trains at the depot are scheduled to visit both of them in order.
First station is disabled most of the time, but when there's enough resource collected to fill a train, it "flashes" it's enabled state for a single tick. This should allow a single train to path to the station, and when it gets disabled again, it will automatically switch to the next station in it's schedule, i.e. the actual resource pickup.
Second station is the actual resource pickup and it gets enabled when it has enough resource to fill a train.
Unfortunately this system may lock if two resource pickups get enabled at the same time (thus only allowing a single train to depart) or in close succession (making both departed trains route to the same resource pickup station instead of different ones). Hmm, I wonder if remote station enabling can be counted and stored in combinator memory...
Train depot only has one exit, so only one train can leave it at a time.
Two stations at resource pickup work in tandem and the trains at the depot are scheduled to visit both of them in order.
First station is disabled most of the time, but when there's enough resource collected to fill a train, it "flashes" it's enabled state for a single tick. This should allow a single train to path to the station, and when it gets disabled again, it will automatically switch to the next station in it's schedule, i.e. the actual resource pickup.
Second station is the actual resource pickup and it gets enabled when it has enough resource to fill a train.
Unfortunately this system may lock if two resource pickups get enabled at the same time (thus only allowing a single train to depart) or in close succession (making both departed trains route to the same resource pickup station instead of different ones). Hmm, I wonder if remote station enabling can be counted and stored in combinator memory...
Re: Many stations, one name
I'm not sure I understand the intent of this design? What would this accomplish exactly?Lav wrote:I was thinking about a setup with two chained stations and a single train depot.
Train depot only has one exit, so only one train can leave it at a time.
Two stations at resource pickup work in tandem and the trains at the depot are scheduled to visit both of them in order.
First station is disabled most of the time, but when there's enough resource collected to fill a train, it "flashes" it's enabled state for a single tick. This should allow a single train to path to the station, and when it gets disabled again, it will automatically switch to the next station in it's schedule, i.e. the actual resource pickup.
Second station is the actual resource pickup and it gets enabled when it has enough resource to fill a train.
Unfortunately this system may lock if two resource pickups get enabled at the same time (thus only allowing a single train to depart) or in close succession (making both departed trains route to the same resource pickup station instead of different ones). Hmm, I wonder if remote station enabling can be counted and stored in combinator memory...
If you're contemplating this as a signal to call a train, it won't work. When a station is disabled (IE: the first stations regular state), it'll simply be bypassed in the train's instruction/order. If the train was already at that station (IE: if you tried to turn the logic on its head, and maybe blip a wait station say, to hoof the train out), that also won't work, as noted by somebody previously in the thread (and I verified in my own setup), the train will just sit at that stop (regardless of being disabled) until its regularly scheduled behavior has completed (IE: inventory full, time waited, what have you).
Re: Many stations, one name
The idea was to summon the train, yes. And sure, it will skip the first station as it immediately gets disabled again. But then the train switches to the next station in it's schedule, i.e. the second one. Essentially, one station "summons" the train to another.
Re: Many stations, one name
Ok, but that's not that hard to do (IE: if you've got a single station, single route, then you can just use the new flag in the station circuit logic).Lav wrote:The idea was to summon the train, yes. And sure, it will skip the first station as it immediately gets disabled again. But then the train switches to the next station in it's schedule, i.e. the second one. Essentially, one station "summons" the train to another.
How would a station becoming enabled "summon" a train is what I guess I don't get... I mean what would your wait condition be on the train side?