Re: Single rail train network
Posted: Thu Jul 13, 2017 6:47 pm
how cheap depends on the world.
Wrong. You can have a million bypasses (what you showed isn't a waiting bay) and a million stations and just 4 trains can deadlock. It's a problem of a series of trains forming a loop all waiting on the next train. With trains going 2 ways the minimum number of trains to block is determined by the 2 stations closest together (with a train stopping at both), not the overall size of the network.Optera wrote:If you only use block signals at the entrance to a safe waiting bay and chain signals everywhere else it can't deadlock unless you have more trains than waiting areas.mrvn wrote:It is simple to deadlock. Example: You have 2 trains in stations. You have 2 trains trying to reach the same 2 stations sitting in the last bypass before those stations. You have trains in every other bypass between those two stations. Minimum for this is 4 trains total.Optera wrote:Rule of thumb for train networks in factorio:
Use block signals only at entrances to blocks safe for trains to wait and chain signals everywhere else.
Adhering to that rule i see no way a single track setup would ever deadlock. Throughput will be terrible though.
But it's the basic problem of having more trains trying to reach a station than can fit in that station. Waiting bays will solve this.
Having single lines going to an outpost also has the advantage that you naturally limit the number of trains going to that outpost. So you can name every iron mine station "iron mine" and the signaling will prevent all trains going to the same station and instead spread to all mines. If you signal them correctly that is.vanatteveldt wrote:I expect that it might even make sense to have lines going out to outposts be single track. If you use large trains (say 8 wagons) the frequency can be fairly low anyway, and have no waiting bays at all between outpost and trunk line.
(I guess the real problem is that laying track is simply so cheap that you might as well just double track everything...)
While a fair pet peeve, I think if someone asks "how do I do X" and X is really bad idea, "X is a really bad idea" is a fair answer.Xtrafresh wrote:Pet peeve time: OP asks HOW to accomplish a certain task, and the forums erupt in a discussion about why it's a bad idea
Someone who has random urges to make mog juice isn't exactly going to care about the cost effectiveness of obtaining it.5thHorseman wrote:While a fair pet peeve, I think if someone asks "how do I do X" and X is really bad idea, "X is a really bad idea" is a fair answer.Xtrafresh wrote:Pet peeve time: OP asks HOW to accomplish a certain task, and the forums erupt in a discussion about why it's a bad idea
Except, of course, that it's not universally a bad idea. It's a bad idea for megabases, high throughput, high train counts. It's an excellent idea for long train lines with very few trains, especially if your resources for building tracks are limited (e.g. early game marathon mode).5thHorseman wrote:While a fair pet peeve, I think if someone asks "how do I do X" and X is really bad idea, "X is a really bad idea" is a fair answer.Xtrafresh wrote:Pet peeve time: OP asks HOW to accomplish a certain task, and the forums erupt in a discussion about why it's a bad idea
Can you post a screenshot of how this deadlock happens?mrvn wrote:
Wrong. You can have a million bypasses (what you showed isn't a waiting bay) and a million stations and just 4 trains can deadlock. It's a problem of a series of trains forming a loop all waiting on the next train. With trains going 2 ways the minimum number of trains to block is determined by the 2 stations closest together (with a train stopping at both), not the overall size of the network.
i.e., networks.Selvek wrote:It's a bad idea for megabases, high throughput, high train counts.
i.e., not a network.It's an excellent idea for long train lines with very few trains
I did, and will make sure to keep doing so in the future.If you're going to assert that "X is a really bad idea" make sure you think about (and write about) the assumptions you're making when deciding it's a bad idea.
You can build it yourself. Just have 2 stations A and B with a single bypass in between them and add 4 trains with A and B as destinations. You get one train at each station and 2 in the bypass and then its a deadlock.Selvek wrote:Can you post a screenshot of how this deadlock happens?mrvn wrote:
Wrong. You can have a million bypasses (what you showed isn't a waiting bay) and a million stations and just 4 trains can deadlock. It's a problem of a series of trains forming a loop all waiting on the next train. With trains going 2 ways the minimum number of trains to block is determined by the 2 stations closest together (with a train stopping at both), not the overall size of the network.
That's 4 waiting bays blocked by 4 trains, not a million waiting bays blocked by 4 trains.mrvn wrote:You can build it yourself. Just have 2 stations A and B with a single bypass in between them and add 4 trains with A and B as destinations. You get one train at each station and 2 in the bypass and then its a deadlock.Selvek wrote:Can you post a screenshot of how this deadlock happens?mrvn wrote:
Wrong. You can have a million bypasses (what you showed isn't a waiting bay) and a million stations and just 4 trains can deadlock. It's a problem of a series of trains forming a loop all waiting on the next train. With trains going 2 ways the minimum number of trains to block is determined by the 2 stations closest together (with a train stopping at both), not the overall size of the network.
I didn't say you can only have 2 stations or that one bypass. Just somewhere in you fast rail network have such a constelation.Optera wrote:That's 4 waiting bays blocked by 4 trains, not a million waiting bays blocked by 4 trains.mrvn wrote:You can build it yourself. Just have 2 stations A and B with a single bypass in between them and add 4 trains with A and B as destinations. You get one train at each station and 2 in the bypass and then its a deadlock.Selvek wrote:Can you post a screenshot of how this deadlock happens?mrvn wrote:
Wrong. You can have a million bypasses (what you showed isn't a waiting bay) and a million stations and just 4 trains can deadlock. It's a problem of a series of trains forming a loop all waiting on the next train. With trains going 2 ways the minimum number of trains to block is determined by the 2 stations closest together (with a train stopping at both), not the overall size of the network.
For trains to move on such a simplistic train line: train capacity = waiting bays - 1.
If you have too many trains for your stations then some will stay in bypasses and block the flow. It doesn't matter how many bypasses you have they will be stuck and prevent any train from passing them. With enough bypasses they will not deadlock but will slow down the throughput to be useless. On the other hand if you never have more trains going to a station than the station can hold (including stacks aka waiting bays) then you don't need as many bypassed between stations. For 4 trains 2 bypasses are enough to prevent deadlocks. Bu if no 2 trains have the same destination then 0 bypasses is deadlock free too.PacifyerGrey wrote:I did state that at every straight segment of your system you got to have N-1 bypasses where N is a number of trains passing through this segment.
This means that for 1 bypass you can only use 2 trains. For 4 trains you got to add 3 bypasses.
Or you can add a multistop station at every end with number of stops equal to the number of trains. In this case it won't deadlock ever but trains will be mostly waiting. Adding Optera's bypasses will increase throughput.
You are right about the purpose of the bypass.mrvn wrote:If you have too many trains for your stations then some will stay in bypasses and block the flow. It doesn't matter how many bypasses you have they will be stuck and prevent any train from passing them. With enough bypasses they will not deadlock but will slow down the throughput to be useless. On the other hand if you never have more trains going to a station than the station can hold (including stacks aka waiting bays) then you don't need as many bypassed between stations. For 4 trains 2 bypasses are enough to prevent deadlocks. Bu if no 2 trains have the same destination then 0 bypasses is deadlock free too.PacifyerGrey wrote:I did state that at every straight segment of your system you got to have N-1 bypasses where N is a number of trains passing through this segment.
This means that for 1 bypass you can only use 2 trains. For 4 trains you got to add 3 bypasses.
Or you can add a multistop station at every end with number of stops equal to the number of trains. In this case it won't deadlock ever but trains will be mostly waiting. Adding Optera's bypasses will increase throughput.
The idea of the bypass is not to buffer trains waiting to enter a station but to let trains going in opposite direction pass each other. You don't even need one bypass per pair of stations. Every couple of stations is enough. Can limit the throughput though.
Network: "a group or system of interconnected people or things"5thHorseman wrote:i.e., networks.Selvek wrote:It's a bad idea for megabases, high throughput, high train counts.
i.e., not a network.It's an excellent idea for long train lines with very few trains
I did, and will make sure to keep doing so in the future.If you're going to assert that "X is a really bad idea" make sure you think about (and write about) the assumptions you're making when deciding it's a bad idea.
I think the first reply pretty much nailed it that you'll find once you start adding bypasses to resolve problems you'll find yourself having 2 or more tracks =p And somewhat unintuitively, you'll actually need far more bidirectional tracks to support the equivalent function of a dedicated 2 unidirection track system.Jarin wrote:So I've been looking through rail network tutorials, and have a pretty solid grasp on the basics, but every guide and discussion seems to work on the assumption that you have one rail going each direction, requiring two full tracks to any destination. I'm trying to make a fully operational train network that can handle multiple trains, but using only one track; with bypasses for trains going opposite directions. Are there any discussions or guides out there on this topic? Search has been failing me (or I've been failing it; whatever).
I wholeheartedly apologize for assuming the OP wanted a fully operational train network that can handle multiple trains, but using only one track. I don't know where I got that. Maybe from this:Selvek wrote:Network: "a group or system of interconnected people or things"
The word "network" makes no assumptions about the number of interconnected things, or their density... so I'm not sure I follow your logic. Also, I'm sorry if I missed a post where you explained your assumptions, but I've been looking and I still can't find it!
I now see that for me, "Multiple" means dozens of trains supplying many stations in a fully functional base, but you're right he probably just wants 2 or 3 trains going back and forth to a remote outpost that he's networking into his main base where the actual work is being done. I will refrain from juxtaposing my own biased interpretation any further.Jarin wrote:I'm trying to make a fully operational train network that can handle multiple trains, but using only one track
Ok. Fair enough.5thHorseman wrote:I wholeheartedly apologize for assuming the OP wanted a fully operational train network that can handle multiple trains, but using only one track. I don't know where I got that. Maybe from this:Selvek wrote:Network: "a group or system of interconnected people or things"
The word "network" makes no assumptions about the number of interconnected things, or their density... so I'm not sure I follow your logic. Also, I'm sorry if I missed a post where you explained your assumptions, but I've been looking and I still can't find it!
I now see that for me, "Multiple" means dozens of trains supplying many stations in a fully functional base, but you're right he probably just wants 2 or 3 trains going back and forth to a remote outpost that he's networking into his main base where the actual work is being done. I will refrain from juxtaposing my own biased interpretation any further.Jarin wrote:I'm trying to make a fully operational train network that can handle multiple trains, but using only one track