4-way intersections: Throughput and deadlocks [image heavy]

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

@gyro2death: Still working on that deadlock reproduction.
Joshwoo70 wrote:Coukd you test this roundabout in this blueprint book? cheers. https://pastebin.com/uEEtJMrL
Added as "Doubleabout". Though I did a major revision of the signalling to make it work, the submitted signalling may deadlock in regular traffic. The reason that the throughput is so low is that every entrance and exit to the inner roundabout connects with the outer one and it's impossible to separate them with signals, so for anything but right turns you effectively only have one roundabout to work with. It's possible to get around this by increasing the distance between the roundabouts.

Anyway if you want to be sourced for it please submit a link to the post as I'm pretty sure I've seen many variants of this one around.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

gyro2death wrote:SUCCESS! A TRUE COMPACT CELTIC KNOT!

Had to make its radius two rails longer than the absolute minimum and 1 rail longer then my own "Symmetrical Compact". However its still smaller then the compact you have listed in the main page and looks far better.

Looks like someone else is going to need to rename their 'Compact Celtic Knot' as I have truly made the compact version now! And if I'm right it should even have a small bit better throughput unless I screwed up a signal. Should be good for RHD and LHD though I could only test RHD on my setup. Anyways please and thank you for testing!
Added as "Super compact Celtic knot"

As I was testing it and building the LHD variant I noticed that it's actually possible to signal it in such a way that it cannot deadlock (though to be fair, the deadlock that was possible needed at least 5 trains, 4 of which needed to change path in the intersection), so that's the one I added in the OP. It was also a slight throughput boost, the way you had signalled it had 36 for set 1 and 39 for set 2. The reason for the throughput being worse was that even though the overall length of the intersection was shorter than "Compact Celtic Knot" the distance from the first chain signal to exit rail signal, effective length, was actually longer.
gyro2death
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 29, 2016 3:14 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by gyro2death »

aaargha wrote:
gyro2death wrote:SUCCESS! A TRUE COMPACT CELTIC KNOT!

Had to make its radius two rails longer than the absolute minimum and 1 rail longer then my own "Symmetrical Compact". However its still smaller then the compact you have listed in the main page and looks far better.

Looks like someone else is going to need to rename their 'Compact Celtic Knot' as I have truly made the compact version now! And if I'm right it should even have a small bit better throughput unless I screwed up a signal. Should be good for RHD and LHD though I could only test RHD on my setup. Anyways please and thank you for testing!
Added as "Super compact Celtic knot"

As I was testing it and building the LHD variant I noticed that it's actually possible to signal it in such a way that it cannot deadlock (though to be fair, the deadlock that was possible needed at least 5 trains, 4 of which needed to change path in the intersection), so that's the one I added in the OP. It was also a slight throughput boost, the way you had signaled it had 36 for set 1 and 39 for set 2. The reason for the throughput being worse was that even though the overall length of the intersection was shorter than "Compact Celtic Knot" the distance from the first chain signal to exit rail signal, effective length, was actually longer.
First great job, however, you missed a signal. S-W left hand turn uses a chain signal instead of a rail signal in the LHD version. Second, WOW, after looking at your LHD variation and I'm officially jealous. The left turns with no chain signals are a thing of beauty and I can't see how it could be replicated in the RHD version. Also can't believe I didn't think about moving up the chain signals, have to think of that for future build options.

Curious if your tested version was with the errant rail signal and if that will affect performance (it should). Let me know if you retest what the results are.
gyro2death
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 29, 2016 3:14 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by gyro2death »

Edit: I was silly and messed up a signal in my own RHD version I've made. Also only the LHD can be considered super compact since it's now a 3 radius increase on the RHD which is equal to the original Compact Celtic Knot.
Edit 2: Okay, now I feel even more silly. On my previous edit, I had a non-symmetrical split on the N-S that made a chain signal being unable to be placed. This would only affect E-W and subsequent N-S trains but still would lower the throughput. Hope you haven't tested yet...sorry!
Edit 3: Okay, final edit. I've added a rail signal before the input splits, as this will allow trains waiting to start just a bit sooner, should help with throughput. I've also added a 3rd version, a version of the compact Celtic knot with the extra signal I added to my own designs. Mostly curious if it benefits as well as its run up is longer then my designs. Many thanks if you actually test these all for me. If you ever do release your map and mod of this I'll totally be downloading it.

Okay so new version of the "Super Compact Celtic Knot" with both LHD and RHD version's listed (though LHD is just yours). The RHD is 1 radius larger due to LHD being superior for signaling this intersection. I tried but can't find any way around it.

I've added an additional exit rail signal to the RHD design to allow for faster clearing of for trains waiting on right hand turns. This comes from looking at the normal Celtic Knot design, which on this more compact scale can't be used for the LHD version sadly. However the smaller size of the LHD will likely balance out on throughput. Though I'm not sure if you can test the LHD and RHD version separately but I would enjoy knowing the difference it makes or doesn't make if its the case.

LHD (Your version with corrected signals and extra input signal)

Code: Select all

0eNqlWk1v2zoQ/CuBTi1gBVx+iJSv7aHAe7d3LIrCcYRWgCMbjhy8IMh/rxQ7jp2sqhn5FNgJJ0NyZ7+4T9nNaldttnXTZvOnrF6um/ts/v0pu69/NYtV/137uKmyeVa31V02y5rFXf9pu6hX2fMsq5vb6v9sLs8zZclDvW133TfHVfu/yO3JSkut9CcrnbryrzT9849ZVjVt3dbVfpsvHx5/Nru7m2rb7eO4crnbPlS3+QvALNus77s166b/Rx1OHmbZY/dDQod9W2+r5f6Xoaf0DtK+7aHt0H79bodA/QE0PSswDmM2QMwriB4l9ldegd5eocEULBkVJdJkvAaTWDIqSgnaUrkHKc9vTBREMfD+0oGZOUeNGqrQqPYc1WmovN1b7RTFnYk5X/5e1E1+kP0HLHv9KgC5DiocbfU6q3DOaohPOOMzfhWwDAZuQnNAEllQA5girJG8t9oeNgH7L2nU92Q1W7QGlKLbY8Zx52nRSCGqugsN0mI2lb8ZubkG/LwFQ4e+eTWkeSoYIccZWFm+u3argRYYTd0Bq4YES2nIPNXjTCxqGheoRcOPHG4pjB+ow+NP7/4VptqhOlRKESdqJwWN9F5OmkydI10/hgrHpYGT1QzLBexkB0xA89CuAJ1UH/AOqNdAluwiiJsGYTW/4hJjCLnjOJcMuBnE1uTrDUV8GFxTnMczPjnkBH5cdB7P+Po8B0V1OKrHUT3tyRDUQKcvauXgC84jOuDK4ch1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4RyfHNutVas6ctUKIKl1uqgAqh7IF5VpNWAU03PAVNAYpqacKiliBJvU93WuUObEcE2JvhrbEp47izVYJIXEkDcmi2AGDtMjgY4XYapzc5MuWrs6UDb5HNpgkbIhpma7MAB3FlTpcGhPA8VTRNjODmSpZTs7EKpjOzsQqmc7OxBqYAfZus5AIsWfoJBzc6gE5KfkszovDhLNCDWSSqobrTmnK+IQ/iFWGAES4k5cBUHsSAsOovZzqDDcvBHrqbEGBBnIpgu09Eg2XSDQRDZdINBMNl0gUFAk8U6YjkYNaqycYesxMIMVJxwps5zNqOq0J3uhQPacoxrtNSA7hNURokGqTARVR6hGqrvJUdqiVIqOykddAmdt5EZlZ7oZ8SyaVf0ENkHc0dOTJmAALV5YVER7JN6eJYADPeHIYxBRGAountDdq3IAVDvRSycylA8+siwS0c6ITzSsRTZDJlWWUlDQiyel4Yj8SgI7a8LUzqyoD5HJSbCkiBrRH0pwLCpyOQ+eEuCJHvLASl91UakE8qWJEkziRNOCtEZCPke3JFDvXwIphT1WwqpnZyTV44gcWyKqMjpI3Y+V7qqDYfHDHlW/LEb2haLCOwLRMxdDQW6GMZC7u2AZK3AtvEASSSV4CQY8OA5kUjA2GdlJUeEFI1ykcBpGSHP017nkgy4BfsGsBOWgTnrf9y6d17gA4fTKAlfCrDmujL9Guzcdbz68vzmquslt022++/tx2ayuvi9my8l0ffW96dbt9OrP+WJ99cdfP3982/zlU7N62FVD721IwUe7qRL/A/w/6ec=
Alternate Compact Celtic Knot (RHD) with extra signal

Code: Select all

0eNqlW8tu40YQ/BWDpywgGdPzpm+LzSFAbskxWASyTHgJUA/ItBHD8L9HWsm0VmqKVdTJkOwp9/T0a7pr3or75rlab+plW9y9FfV8tXwq7v55K57qx+Ws2X3Xvq6r4q6o22pRTIrlbLH7tJnVTfE+KerlQ/VfcSfvE2XJS71pn7ffdKv2fzF1RysttdIfrXTUyq9HK/3790lRLdu6rav9bn9+eP13+by4rzbb7XSr58+bl+ph+nO7k2K9etquWS13/2+L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xVC3pK4ShaZaYkq28QIUzyKGa0UDkVQInsPh8gBJCjfNAy6pYxtEkKR0yxxCDWyDCEKNFOsm6byWRA3GEuD6kkd1hxxE+pCSmbrpez6iPxAdEYeUImKFSZthuCEi1pIDZp2egpMeCBO0nhouQNsNZJ8FkjOSfRYINJF9Fgg0k30WCBQcLX3WS2fzBPWsnGGjJTBhFSdUF6cEsrsjJ0ukGriLU+oD10VHXUxThmoNKBdCVa9aQLpI+mxGNg5SjLohI3hY4wq9ABV6rmQn+RkyAk9PmIAZtniaZIRQl8TbMSSuBF2pPJvFEIqh4EQJXbtqJeADOc/PmAYiOxZEuDLiEw1rEVtg++cIAUl8OcbCxEA+HFhCH0StDsKiGoRabUnGNsJolMCyywXpCJwyJgbpPdIz5ZEQRtGFzlmiaoIILK9cZ8hKoNh8glx+Atnm65Os5OjfgjSmIskpRxjVEoV8O3DOf9eFtdTVWfR7ZGTfGfW8HIieshTkDo4THi5LFrn3B+fqVwMMTnP4UJz+Ciay/tADw86Tet4IJfKtUR8M+9ZIf5MlR4wF+N1ZH5SD+u1dV7SH2C04NeHyzgL3+sAqmf/7ZP9c8+7odeekaGb3VbP97mvTVpvlrK1u/n5eV5ubb6vFejZvb75VTVvPb/5crtqb3/764/cv2zUv1eZpn068tyEFH+02XvwPcbj41Q==

Image
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

gyro2death wrote:First great job, however, you missed a signal. S-W left hand turn uses a chain signal instead of a rail signal in the LHD version. Second, WOW, after looking at your LHD variation and I'm officially jealous. The left turns with no chain signals are a thing of beauty and I can't see how it could be replicated in the RHD version. Also can't believe I didn't think about moving up the chain signals, have to think of that for future build options.

Curious if your tested version was with the errant rail signal and if that will affect performance (it should). Let me know if you retest what the results are.
Yeah, for most intersections the LHD and RHD variants are pretty much the same but, when there is a difference I find that most of the time the LHD version can be signalled a bit cleaner, plenty of exceptions to that though.

I had only tested the RHD version so no difference there.
gyro2death wrote:Edit: I was silly and messed up a signal in my own RHD version I've made. Also only the LHD can be considered super compact since it's now a 3 radius increase on the RHD which is equal to the original Compact Celtic Knot.
Edit 2: Okay, now I feel even more silly. On my previous edit, I had a non-symmetrical split on the N-S that made a chain signal being unable to be placed. This would only affect E-W and subsequent N-S trains but still would lower the throughput. Hope you haven't tested yet...sorry!
Edit 3: Okay, final edit. I've added a rail signal before the input splits, as this will allow trains waiting to start just a bit sooner, should help with throughput. I've also added a 3rd version, a version of the compact Celtic knot with the extra signal I added to my own designs. Mostly curious if it benefits as well as its run up is longer then my designs. Many thanks if you actually test these all for me. If you ever do release your map and mod of this I'll totally be downloading it.

Okay so new version of the "Super Compact Celtic Knot" with both LHD and RHD version's listed (though LHD is just yours). The RHD is 1 radius larger due to LHD being superior for signaling this intersection. I tried but can't find any way around it.

I've added an additional exit rail signal to the RHD design to allow for faster clearing of for trains waiting on right hand turns. This comes from looking at the normal Celtic Knot design, which on this more compact scale can't be used for the LHD version sadly. However the smaller size of the LHD will likely balance out on throughput. Though I'm not sure if you can test the LHD and RHD version separately but I would enjoy knowing the difference it makes or doesn't make if its the case.
I don't think there will be any major differences when looking at them and I'm honestly not sure if my testing is exact enough to measure it, with the trains being random and all. I may look closer at this later but for now I will prioritize working on releasing the mod and then the save file with the test setup for people to use.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

The mod I'm using to spawn trains is now available here.

If you have any questions/feedback about the mod please use that thread so we can keep this one on track ;)
gyro2death
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 29, 2016 3:14 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by gyro2death »

aaargha wrote:The mod I'm using to spawn trains is now available here.

If you have any questions/feedback about the mod please use that thread so we can keep this one on track ;)
Can't you give a updated BP for the train counter? The one linked in the OP is outdated and the experimental 0.15 conversion doesn't work.
FrodoOf9Fingers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sat Apr 29, 2017 11:13 pm
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by FrodoOf9Fingers »

Finding the throughput of intersections is great, but...

There's a limit for one track systems. Do we know what the limit is for a single lane of traffic for a 2-4 train? Once we get to 2 lanes and more, what designs work best, and what's the throughput lane. 3 lanes? 4? Is there a soft cap to the effectiveness of increasing the number of tracks?

We have so much to do....

Anyone get close to representing this with a mathematical model (I'm guessing calculus mixed with linear algebra here).
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by DaveMcW »

The most efficient way to design a 2-lane network, is to split it into two 1-lane networks.

You do get a throughput boost for 2, 3, 4+ lanes, but it has harsh diminishing returns.
pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by pieppiep »

FrodoOf9Fingers wrote:Finding the throughput of intersections is great, but...

There's a limit for one track systems. Do we know what the limit is for a single lane of traffic for a 2-4 train? Once we get to 2 lanes and more, what designs work best, and what's the throughput lane. 3 lanes? 4? Is there a soft cap to the effectiveness of increasing the number of tracks?

We have so much to do....

Anyone get close to representing this with a mathematical model (I'm guessing calculus mixed with linear algebra here).
First small attempt to get some numbers just before I have to go to work.

Make a scenario in the map editor, go to the folder and create a control.lua with the following code,

Code: Select all

global.x = 0
global.y = 0

script.on_event(defines.events.on_tick, function (event)
	if (event.tick % 60) == 0 then
		local player = game.players[1]
		local position = player.position
		if position.x == global.x and position.y ~= global.y then
			player.print("Distance = " .. math.abs(position.y - global.y))
		elseif position.x ~= global.x and position.y == global.y then
			player.print("Distance = " .. math.abs(position.x - global.x))
		end
		global.x = position.x
		global.y = position.y
	end
end)
No diagonals, only in seconds (60 ticks) you've moved straight horizontal or vertical this prints the difference in your position in tiles.

When filling a train with fuel and running at max speed,
wood -> 259.2 km/h with distance 72 -> tile length = 259.2 * 1000 / 3600 / 72 = 1 meter
solid fuel -> 272.2 km/h with distance 75.6015625 -> tile length = 272.2 * 1000 / 3600 / 75.6015625 = 1.00 meter
rocket fuel -> 298.1 km/h with distance 82.80078125 -> tile length = 298.1 * 1000 / 3600 / 82.80078125 = 1.00 meter
So tile length 1 meter is confirmed.

The absolute maximum throughput for one lane would be an infinite long train running at max speed. It won't be possible to achieve this, but then we know at least some upper limit.
A train wagon or locomotive is 6 tiles long with 1 tile between, so 7 meter total.
With rocket fuel this gives 7 / 298100 * 3600 = 0.084535 seconds per wagon.
In 15 minutes that gives us 15*60 / 0.084535 = 10646 wagon/locomotives throughput.

Now that I see that number I doubt this little test is very usefull :P
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

gyro2death wrote:Can't you give a updated BP for the train counter? The one linked in the OP is outdated and the experimental 0.15 conversion doesn't work.
Huh, guess they need to get their site together, foreman handles it just fine. Anyway, 0.15 string below, also added it to the OP.

Code: Select all

0eNrNmstu6zYQhl+l4LKQWpK6xDHQvkE37dkVgUFLdEwcXQyKCpoGfvdSUuzEtqToJ42DboJIIoej+WY4w7HeyLZo5UGrypD1G1FZXTVk/fcbadRzJYrunnk9SLImysiSBKQSZXdV1Fld1ka9SHIMiKpy+Q9Zs+NTQGRllFFykNJfvG6qttxKbQec5wutzL6URmWhFbRVlTC1tuIPdWNn11W3sJUY8l+SgLzaf5hdxipndF1stnIvXpQdbwd9CNrYx3k/ueke7JRuzObmNV6UNq29c9ZkGBF+I8MCjRGdKaKU0oDUB6nFoA751U6pW3NoAaF/kONxEFvJ7KwZ6/48aymrzzZSOVmndqzSWatMf8mPT3Y274ZrmV8PXnXWHhXDL8VYLJ0aNzQ4TIPdm8acUzWyEwEZ25/YnyAxdk0suHicgEBHOUUwJ/qjoqZ7i4u4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K/6lg==
pieppiep wrote:When filling a train with fuel and running at max speed,
wood -> 259.2 km/h with distance 72 -> tile length = 259.2 * 1000 / 3600 / 72 = 1 meter
solid fuel -> 272.2 km/h with distance 75.6015625 -> tile length = 272.2 * 1000 / 3600 / 75.6015625 = 1.00 meter
rocket fuel -> 298.1 km/h with distance 82.80078125 -> tile length = 298.1 * 1000 / 3600 / 82.80078125 = 1.00 meter
So tile length 1 meter is confirmed.
Neato.
pieppiep wrote:The absolute maximum throughput for one lane would be an infinite long train running at max speed. It won't be possible to achieve this, but then we know at least some upper limit.
A train wagon or locomotive is 6 tiles long with 1 tile between, so 7 meter total.
With rocket fuel this gives 7 / 298100 * 3600 = 0.084535 seconds per wagon.
In 15 minutes that gives us 15*60 / 0.084535 = 10646 wagon/locomotives throughput.

Now that I see that number I doubt this little test is very usefull :P
So if we had 2-4 trains running back to back (no signals) we could theoretically get a throughput of (60/0.084535)/6 = 118.3 trains per minute for each input lane? As the current tester can do about 24 trains per minute we're reaching about 20.3% of the theoretical maximum? It might be possible to, maybe, double that with parallel acceleration, but it's not like that really matters at the moment as the current best (throughput per lane) intersection, Cross, can only handle about 60/(24 * 4) = 0.646 or 65% of that traffic.
pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by pieppiep »

aaargha wrote:Now that I see that number I doubt this little test is very usefull :P
So if we had 2-4 trains running back to back (no signals) we could theoretically get a throughput of (60/0.084535)/6 = 118.3 trains per minute for each input lane? As the current tester can do about 24 trains per minute we're reaching about 20.3% of the theoretical maximum? It might be possible to, maybe, double that with parallel acceleration, but it's not like that really matters at the moment as the current best (throughput per lane) intersection, Cross, can only handle about 60/(24 * 4) = 0.646 or 65% of that traffic.[/quote]
Cross, with 60 trains per minute, has 4 input/4 output lanes so 15 trains per minute for each lane.
So about 12.5% traffic.
If you extend the output lanes you would roughly see a train every 8 trains length.
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by orzelek »

I believe there was a nice concept in some of megabases.

Trains would run on single direction mutli lane loop. That would allow you to increase throughput at the cost of need to have more trains potentially (size of whole loop would be your roundabout).

I never built big enough base to try it tho :)
gyro2death
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 29, 2016 3:14 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by gyro2death »

aaargha wrote:
gyro2death wrote:Can't you give a updated BP for the train counter? The one linked in the OP is outdated and the experimental 0.15 conversion doesn't work.
Huh, guess they need to get their site together, foreman handles it just fine. Anyway, 0.15 string below, also added it to the OP.

Code: Select all

0eNrNmstu6zYQhl+l4LKQWpK6xDHQvkE37dkVgUFLdEwcXQyKCpoGfvdSUuzEtqToJ42DboJIIoej+WY4w7HeyLZo5UGrypD1G1FZXTVk/fcbadRzJYrunnk9SLImysiSBKQSZXdV1Fld1ka9SHIMiKpy+Q9Zs+NTQGRllFFykNJfvG6qttxKbQec5wutzL6URmWhFbRVlTC1tuIPdWNn11W3sJUY8l+SgLzaf5hdxipndF1stnIvXpQdbwd9CNrYx3k/ueke7JRuzObmNV6UNq29c9ZkGBF+I8MCjRGdKaKU0oDUB6nFoA751U6pW3NoAaF/kONxEFvJ7KwZ6/48aymrzzZSOVmndqzSWatMf8mPT3Y274ZrmV8PXnXWHhXDL8VYLJ0aNzQ4TIPdm8acUzWyEwEZ25/YnyAxdk0suHicgEBHOUUwJ/qjoqZ7i4u4Cdklg58dGPRCpyiM2O1x1qrxsmCIz1rkMlO51LMW/tLA70LubF3aXZQHoXut1uT3GevOhVZWH16tam1lNjtdlxtVWRFkvRNFIwHDRzfePbEhfSI0+jxZxiiBGLG7Mro0pxaqCN/HzBL67b6EjG4RQOm1XS93J0YniSXz+1p8n0SVzOu3MI+lkFuEvPcKG8FW5VzpwYyDrf6HTvJFvXIPL/mCQro0yh9mveDGF6fEsGXUH0btPJ0Lb4DzceCntbOibuSZR781fiimpfioTDpzB90rb5wg1lpUz9Jtbm9Al6keVekUkNV5mVLmqi1DWVjx2tYqh7qQ0zl0AOPmq3x+x7h+zG63rbE3eVzmWuwHeZajgwws3dP5dIQuLKkYPau0E40JVdVIbeTInhydUvXSXfm0fFnn1jC7zaeSM7qy5V7YQ0Qnw2rXnExqN+Ls++Ykud82lxv2L+KzuU7Y6uNo3Bjrdc97E3bON7Khxb2p+JXLjcnki2XyxTKjpTLpYpHxUpHLtUyWipwwpvV8o4r3Jsa1sR4GX42P50X24l+hc1t2VJmWRoa6W5F0ik3MjTzmco+5zH0udZ/qsarHy3rY2Alt6uEW6Y1bnCbNDefYcAYNp9BoTDamOGYVJ/snHuwSjF2CsUswdgnELoHYJRC7BGKXuLOLPdjFGLsYYxdj7GKIXQyxiyF2McQudmcXebCLMHYRxi7C2EUQuwhiF0HsIohd5M6Oe7DjGDuOseMYOw6x4xA7DrHjEDvuzo55sGMYO4axYxg7BrFjEDsGsWMQO+bMjrqjoxA5CoGjEDeKYKMINYpAowgz6ozMI9qwYMNiDQs1KNKgQIPiDAoz9yjzSG5YbsNSG5bZoMQG5TUorUFZzT2pedSSWCmJVZJYIQnVkVAZCVWRUBHpXkN6HN2wkxt2cMPObdCxDTq1QYc26MzmfmTz6JRgjRKsT4K1SaAuCdQkgXokUIvEvUPi0ZhM3dvVqXu3OnVvVqfOverUuVWdOneqU+dG9dJe51MwfJSw/vSdZ0AKsZWFvfdNC1X91H9A0P8s9yJ1M/zsFsc8SVePdLU6Hv8DCK/6lg==
pieppiep wrote:When filling a train with fuel and running at max speed,
wood -> 259.2 km/h with distance 72 -> tile length = 259.2 * 1000 / 3600 / 72 = 1 meter
solid fuel -> 272.2 km/h with distance 75.6015625 -> tile length = 272.2 * 1000 / 3600 / 75.6015625 = 1.00 meter
rocket fuel -> 298.1 km/h with distance 82.80078125 -> tile length = 298.1 * 1000 / 3600 / 82.80078125 = 1.00 meter
So tile length 1 meter is confirmed.
Neato.
pieppiep wrote:The absolute maximum throughput for one lane would be an infinite long train running at max speed. It won't be possible to achieve this, but then we know at least some upper limit.
A train wagon or locomotive is 6 tiles long with 1 tile between, so 7 meter total.
With rocket fuel this gives 7 / 298100 * 3600 = 0.084535 seconds per wagon.
In 15 minutes that gives us 15*60 / 0.084535 = 10646 wagon/locomotives throughput.

Now that I see that number I doubt this little test is very usefull :P
So if we had 2-4 trains running back to back (no signals) we could theoretically get a throughput of (60/0.084535)/6 = 118.3 trains per minute for each input lane? As the current tester can do about 24 trains per minute we're reaching about 20.3% of the theoretical maximum? It might be possible to, maybe, double that with parallel acceleration, but it's not like that really matters at the moment as the current best (throughput per lane) intersection, Cross, can only handle about 60/(24 * 4) = 0.646 or 65% of that traffic.
Can you add another full example or save of the train copying mechanism? I've attempted to build it exactly as in the screenshots down to every option but it doesn't generate trains. :( On the b right side the new train counter and reset work perfectly so thanks for that.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

orzelek wrote:I believe there was a nice concept in some of megabases.

Trains would run on single direction mutli lane loop. That would allow you to increase throughput at the cost of need to have more trains potentially (size of whole loop would be your roundabout).

I never built big enough base to try it tho :)
But, but... intersections? :)

While interesting it sounds a bit impractical IMO, at least if it's applied to the whole network. It might work well for some high throughput parts, but I'm guessing it's usually not applied to all the mining outposts.
gyro2death wrote:Can you add another full example or save of the train copying mechanism? I've attempted to build it exactly as in the screenshots down to every option but it doesn't generate trains. :( On the b right side the new train counter and reset work perfectly so thanks for that.
I added a save file to the basic auto example that should work. If you're still having trouble after trying it, upload a save with your setup and I'll take a look. If you manage to figure it out please let me know what the problem was, it should probably be explained better in the post.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

Savefile for the map with the test setup can now be found here.
User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by db48x »

Nice. I just used your map to test an intersection. I tested the 4-lane variant of the Cross intersection, as posted to imgur by tallinu at http://imgur.com/a/CxXxd, and got 55 trains/minute over 15 minutes. As I had suspected, the modifications to make it a 4-lane intersections make it worse than the 2-lane Cross, which was measured at 58 trains/minute.

Image

Image

Edit: Oh, and I was testing with profile 1, so equal probability for trains to go in all directions.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by aaargha »

db48x wrote:Nice. I just used your map to test an intersection. I tested the 4-lane variant of the Cross intersection, as posted to imgur by tallinu at http://imgur.com/a/CxXxd, and got 55 trains/minute over 15 minutes. As I had suspected, the modifications to make it a 4-lane intersections make it worse than the 2-lane Cross, which was measured at 58 trains/minute.

Edit: Oh, and I was testing with profile 1, so equal probability for trains to go in all directions.
I've been meaning to test the ones in that album, or at least the windmill one, since I was linked it a few days ago.

I'd have guessed that it would perform about the same in 2-lane and 4-lane configurations, which I guess it kinda does, though from your screenshot it kind of looks like the entry/exit part is incorrectly implemented, the train in the outer lane looks like it's waiting in the wrong spot and blocking the inner train from using straight/left turn parts, but it's pretty hard to tell from the map view.
User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by db48x »

I copied what was in the album precisely, but I noticed the same thing.
gyro2death
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 29, 2016 3:14 am
Contact:

Re: 4-way intersection testing: Throughput and deadlocks

Post by gyro2death »

aaargha wrote:
gyro2death wrote:Can you add another full example or save of the train copying mechanism? I've attempted to build it exactly as in the screenshots down to every option but it doesn't generate trains. :( On the b right side the new train counter and reset work perfectly so thanks for that.
I added a save file to the basic auto example that should work. If you're still having trouble after trying it, upload a save with your setup and I'll take a look. If you manage to figure it out please let me know what the problem was, it should probably be explained better in the post.
Okay figured it out. I think your base BP string should contain the 3 rail signals and the wire needed to start the thing (with the spawning stop conditioned only to enable when the signal is green).

Second the key here lies in how to name the stops and assign stops between the trains.

IMO you have 3 stops and two trains.

First stop is the "train" stop, which is where your train to be used for testing stops at, the condition for leaving must also never be met. It's second stop is the place you want it to go on the main track network after i spawns at the...

Second stop, which is the "starting" stop. This is where trains will spawn from, and where you'll want to assign your second train without fuel to go to. It only needs to be sent to this starting stop and nothing else needs to be set.

The third and final stop is the end goal. Pretty simple.

I got hung up on figuring out the stop mechanics of which train I was to assign to where. And setting up the rail signals and configuring the stop to be 'enable disabled'. I thought I was missing a setting on the train selection stop.

Side note, your testing map works great and I can now see why you thought adding a rail signal at the start wouldn't help, however, most train networks don't have rail signals every wagon length so it does help in that case. I created my own slight train testing map before I started using your save and found out that different intersections have a 'lane bias' which allows for traffic to flow out through certain lanes more often, which resulted in a network of 24 trains being nearly completely stuck behind 2 of the 4 intersections after nearly 12 minutes. This is something yours doesn't simulate as trains don't have to try to reenter the intersection. This ended up slowing the throughput in my own test down due to trains not coming from the other intersections as frequently since they ended up being empty. Overall though I find your testing map amazingly flexible for different trains of any length and setup as well as RHD and LHD all in one. Marvelous design work.
Locked

Return to “Railway Setups”