Train Multiplexing Math
Posted: Tue Jan 16, 2018 10:58 pm
I'm working on a super-mega base! Though, this may be better suited for the Math Stack Exchange forums. I mainly want people to check my math.
I have a bunch of train lines going between mines and furnaces. However, the line that goes to the iron furnace might not be the line that goes to all of the iron lines. Rather, lines that go to furnaces have only 1 type of cargo, whereas lines that go to the mines have each type of cargo. I don't want to spam line changers everywhere, as that would reduce the efficiency of the pathfinding algorithm methinks. Instead, I figured that a multiplexer would be the best idea. Each line going to a furnace area needs to be fully saturated with trains for my setup to work (furnaces are designed to handle a train per line every few seconds).
Assuming that there are 10 lines to mines and 10 lines to furnaces, what is the average amount of "collisions" that a multiplexer would experience at each level, a level being a point of crossing? The extension of the question also becomes how many extra lines are placed in such that the multiplexor does not become the bottleneck.
A train is equally likely to start on any line and end on any line. Therefore, for each given input, each given output is equally likely. Find the number of crossings to get to each line from a given line, and divide it by 10 (the total number of lines). For instance, line number 2 would have 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 37. Divide by the number of lines to get each lines average number of crossings. Then sum those averages, and divide by the number of lines again to get the average number of crossings of all lines. I got 2.0625 as a result.
I personally have 16 input and 16 output lines, the same procedure comes out to 5.29 average crossings (meaning that I will split the lines into 6 lines to handle the slowed down rate, for a total width of 96 lines, one direction).
Does this seem right to everyone?
I have a bunch of train lines going between mines and furnaces. However, the line that goes to the iron furnace might not be the line that goes to all of the iron lines. Rather, lines that go to furnaces have only 1 type of cargo, whereas lines that go to the mines have each type of cargo. I don't want to spam line changers everywhere, as that would reduce the efficiency of the pathfinding algorithm methinks. Instead, I figured that a multiplexer would be the best idea. Each line going to a furnace area needs to be fully saturated with trains for my setup to work (furnaces are designed to handle a train per line every few seconds).
Assuming that there are 10 lines to mines and 10 lines to furnaces, what is the average amount of "collisions" that a multiplexer would experience at each level, a level being a point of crossing? The extension of the question also becomes how many extra lines are placed in such that the multiplexor does not become the bottleneck.
A train is equally likely to start on any line and end on any line. Therefore, for each given input, each given output is equally likely. Find the number of crossings to get to each line from a given line, and divide it by 10 (the total number of lines). For instance, line number 2 would have 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 37. Divide by the number of lines to get each lines average number of crossings. Then sum those averages, and divide by the number of lines again to get the average number of crossings of all lines. I got 2.0625 as a result.
I personally have 16 input and 16 output lines, the same procedure comes out to 5.29 average crossings (meaning that I will split the lines into 6 lines to handle the slowed down rate, for a total width of 96 lines, one direction).
Does this seem right to everyone?