4-way intersections: Throughput and deadlocks [image heavy]
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
I made it for this forum subtopic specific so that it won't make the list saddens me. If they don't get added I see no reason to make smaller versions.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
What if I make it less breakable, symetrical and cut signals where ever I can. Can it make the list then? I also have an idea to get it over 500 trains/min
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Just wondering,
This Thread and the one about 3-Way intersections is great!
But do we have a similar thread about 2+ line-exchanger? So if a train line a mining outpost and take the 1st lane, he could switch to the 2nd or 3rd lane along the way?
This Thread and the one about 3-Way intersections is great!
But do we have a similar thread about 2+ line-exchanger? So if a train line a mining outpost and take the 1st lane, he could switch to the 2nd or 3rd lane along the way?
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Hi Hans. That its the shizniz. Very cool.
Is it possible to provide us like a BP book with all the little individual peices so that one can construct their own railways?
Have not read all the posts, could you please also enligten us how it works maybe if you're keen to share? I would love touse this and make my own LHD blueprint set to use for my railways. Awesome job dude!
Is it possible to provide us like a BP book with all the little individual peices so that one can construct their own railways?
Have not read all the posts, could you please also enligten us how it works maybe if you're keen to share? I would love touse this and make my own LHD blueprint set to use for my railways. Awesome job dude!
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Hey BHaklauyt
I'd love to tell you how it works=)
I made a reddit post to explain almost everything
https://www.reddit.com/r/factorio/comme ... mbinatory/
Here is a blueprint book you can use to make your own. Including an intersection to learn from
https://pastebin.com/CbTetcsj
Please show how you did=) And if you need help I'd love to help!
I'd love to tell you how it works=)
I made a reddit post to explain almost everything
https://www.reddit.com/r/factorio/comme ... mbinatory/
Here is a blueprint book you can use to make your own. Including an intersection to learn from
https://pastebin.com/CbTetcsj
Please show how you did=) And if you need help I'd love to help!
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
You got this one that tallinu made:Elok wrote:Just wondering,
This Thread and the one about 3-Way intersections is great!
But do we have a similar thread about 2+ line-exchanger? So if a train line a mining outpost and take the 1st lane, he could switch to the 2nd or 3rd lane along the way?
viewtopic.php?f=194&t=46855&start=160#p296959
Re: 4-way intersections: Throughput and deadlocks [image heavy]
As mentioned in the OP, I'm working on updating this thread to be more in line with how the path-finding works now (or how it will work if my proposed changes get merged). I'm considering some of the suggestions sillyfly posted a while back, the efficiency metric seems kind of interesting, but I also wanted to ask if there are other things I should consider. Currently my plan looks something like this:
Try to get a section with some generic circuit optimisations, mergers/traffic lights/whatever, that can be applied to most designs without much hassle.
Change the deadlock ratings:
It also seems that there are ways of forcing currently B rated designs into unrecoverable positions, though the window is only a few pixels large. I'm sure if I should just ignore that or perhaps give an estimate of how likely either case is.
Add a separate category -still in this post, though- for intersections that use circuitry and move the few designs I've accepted that does there. As they can work pretty differently than normal intersections I feel like they really should be on their own ranking. Part of the reason is that many of the designs I'd like to add use optimisations that can be applied to all/most designs and I really don't feel like doing that much additional work to keep the list fair. Another reason for having them on their own list is that they have more/different things that could break, for example: how does it behave in low-/no-power situations? does it break/recover from signal contamination? things like that. Keeping them on the same list feels a bit like adding motorcycles to a bike design comparison
I should probably also impose some kind of lower limit for block sizes on single stretches of rails (this one's for you hans ). Current submissions seems to fit about two carts, and that is pretty reasonable IMO. In some places, right before crossings/ right after merges, smaller blocks may be motivated. For the most part though smaller blocks than two carts should only really need to be present before the first split or after the last merge. This is mostly to keep the performance hit from being too unreasonable.
Nothing's set in stone, but this is what I'm currently leaning at. If anyone has suggestions/feedback on for this, please share, I'd love to hear it.
Try to get a section with some generic circuit optimisations, mergers/traffic lights/whatever, that can be applied to most designs without much hassle.
Change the deadlock ratings:
- Will not deadlock
- Can deadlock on hard path changes (disabling stations, breaking rails, etc.)
- Can deadlock on soft path changes (trying to reserve a red signal, not sure if I should keep this one or just change the signalling of affected designs, surely won't keep it if my proposed changes are merged)
- Can deadlock in certain traffic situations (mostly heavy traffic/blocked outputs)
- Like D but so unstable that it does not survive throughput testing (not sure if I should keep this one, does not really feel useful)
It also seems that there are ways of forcing currently B rated designs into unrecoverable positions, though the window is only a few pixels large. I'm sure if I should just ignore that or perhaps give an estimate of how likely either case is.
Add a separate category -still in this post, though- for intersections that use circuitry and move the few designs I've accepted that does there. As they can work pretty differently than normal intersections I feel like they really should be on their own ranking. Part of the reason is that many of the designs I'd like to add use optimisations that can be applied to all/most designs and I really don't feel like doing that much additional work to keep the list fair. Another reason for having them on their own list is that they have more/different things that could break, for example: how does it behave in low-/no-power situations? does it break/recover from signal contamination? things like that. Keeping them on the same list feels a bit like adding motorcycles to a bike design comparison
I should probably also impose some kind of lower limit for block sizes on single stretches of rails (this one's for you hans ). Current submissions seems to fit about two carts, and that is pretty reasonable IMO. In some places, right before crossings/ right after merges, smaller blocks may be motivated. For the most part though smaller blocks than two carts should only really need to be present before the first split or after the last merge. This is mostly to keep the performance hit from being too unreasonable.
Nothing's set in stone, but this is what I'm currently leaning at. If anyone has suggestions/feedback on for this, please share, I'd love to hear it.
Hopefully my reasoning above for a second category is not too disappointing, I'd like to add some version of your design as you're really pushing the upper throughput limits. If I could make an additional request it would be to either add some alignment pieces in the middle that lines up with the cross in the new tester, or that you look into making a blueprint for only a quarter of the intersection that can be stamped down four times instead, just so that it's a bit easier to place.hansjoachim wrote:What if I make it less breakable, symetrical and cut signals where ever I can. Can it make the list then? I also have an idea to get it over 500 trains/min
As far as I know there is currently no such thread, modifying the test bench to do it shouldn't be too hard though. I will not be making such a thread, I'm behind enough on this one as it is, but if anyone wants to create such a thread I'd be happy to provide help and materials to get it started.Elok wrote:Just wondering,
This Thread and the one about 3-Way intersections is great!
But do we have a similar thread about 2+ line-exchanger? So if a train line a mining outpost and take the 1st lane, he could switch to the 2nd or 3rd lane along the way?
Re: 4-way intersections: Throughput and deadlocks [image heavy]
The 3 way intersection thread is over here: viewtopic.php?f=194&t=51450
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Thanks for the answer!Elok wrote:Just wondering,
This Thread and the one about 3-Way intersections is great!
But do we have a similar thread about 2+ line-exchanger? So if a train line a mining outpost and take the 1st lane, he could switch to the 2nd or 3rd lane along the way?
As far as I know there is currently no such thread, modifying the test bench to do it shouldn't be too hard though. I will not be making such a thread, I'm behind enough on this one as it is, but if anyone wants to create such a thread I'd be happy to provide help and materials to get it started.
More precisely, I'm wondering what I should add around those 4-way intersection :
- How should I design the rail tracks between two of those 4-way intersection? Should I simply put straith rail line with rail signal each X tiles?
- How should I connect my huge train stations of my main base to this 4-way intersection?
Last edited by Elok on Thu Jan 18, 2018 1:36 pm, edited 1 time in total.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
I think the safest way by far is to have one (or more) of the exits of an intersection be used for the train stops, allowing no through traffic.Elok wrote: - How should I connect my huge train stations of my main base to this 4-way intersection?
I guess it depends. If you dont use lane changers, you can manually fine tune how much traffic goes through each lane much easier. But that can be tedious. If you put lane changers, you leave all that work of balancing traffic across lanes to the train pathfinder, which has the benefit of scaling up well until a point, but in heavily congested areas lane changers could possibly result in lower throughput I'd imagine. Although I have to say that I have not used more than two lanes (one for each direction) in my games yet despite my railworld-y playstyle.Elok wrote: - How should I design the rail tracks between two of those 4-way intersection? Should I simply put straith rail line with rail signal each X tiles?
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Aaargha
I really like the new map! Great job!
Regarding deadlock rating
I don't really understand why it has all these categories. As all the none A intersection are basically wrongly made and should be fixed. All the intersection that players would pick from your post are in category A.
I think only the good intersections should be shown, or also have a list with intersection that must be fixed and a sentence with what is wrong with it.
I only see two reasons for picking a not secure intersection: Higher throughput or cheap
I think it would be easier to see what the advantage/disadvantage of an intersection is with a system like sillyfly proposed.
The efficiency is nice for users to understand how good an intersection is without having to remember what the max is for that number of lanes. I wouldn't want it to replace trains/min but rather be an addition. Trains/lane is different depending on breaking speed upgrade and length of trains, so efficiency would seem more accurate than it would be.
Merger
A god non combinator lane merger has a quite high throughput (a merger that merges on the same piece of track, unlike many of the mergers used) and I think few if any of the intersection would need a better lane merger than the best non combinator one.
I also think that the merger is a part of the intersection. As it can be placed at different points in intersections and it need to be made and signaled correctly and it can be source of a deadlock.
Combinator intersections
The work very differently indeed. They have different problems like the power situation and signal contamination. I agree that an evaluation of that should be added.
Also, I used a lot of time making the intersection so that it doesn't decompress trains if none crosses another. If a new intersection does decompress it should be a drawback. Unnecessary waiting time should also be checked. It should also say which train lengths it supports and what is the ideal train length. I would like to help evaluate new combinator based intersections.
I think they could be on the same list if a system like sillyfly is being used.
Regarding the number of signals.
It becomes manly a problem when the intersection is oversaturated. If it isn't oversaturated the UPS problem is less relevant. I think I could probably remove about 30-40% of the signals and have the same throughput, but about half of those should be there and allow a still very high throughput with trains with different number of cars.
Making a blueprint book to plot it down is a good idea!
I really like the new map! Great job!
Regarding deadlock rating
I don't really understand why it has all these categories. As all the none A intersection are basically wrongly made and should be fixed. All the intersection that players would pick from your post are in category A.
I think only the good intersections should be shown, or also have a list with intersection that must be fixed and a sentence with what is wrong with it.
I only see two reasons for picking a not secure intersection: Higher throughput or cheap
I think it would be easier to see what the advantage/disadvantage of an intersection is with a system like sillyfly proposed.
The efficiency is nice for users to understand how good an intersection is without having to remember what the max is for that number of lanes. I wouldn't want it to replace trains/min but rather be an addition. Trains/lane is different depending on breaking speed upgrade and length of trains, so efficiency would seem more accurate than it would be.
Merger
A god non combinator lane merger has a quite high throughput (a merger that merges on the same piece of track, unlike many of the mergers used) and I think few if any of the intersection would need a better lane merger than the best non combinator one.
I also think that the merger is a part of the intersection. As it can be placed at different points in intersections and it need to be made and signaled correctly and it can be source of a deadlock.
Combinator intersections
The work very differently indeed. They have different problems like the power situation and signal contamination. I agree that an evaluation of that should be added.
Also, I used a lot of time making the intersection so that it doesn't decompress trains if none crosses another. If a new intersection does decompress it should be a drawback. Unnecessary waiting time should also be checked. It should also say which train lengths it supports and what is the ideal train length. I would like to help evaluate new combinator based intersections.
I think they could be on the same list if a system like sillyfly is being used.
Regarding the number of signals.
It becomes manly a problem when the intersection is oversaturated. If it isn't oversaturated the UPS problem is less relevant. I think I could probably remove about 30-40% of the signals and have the same throughput, but about half of those should be there and allow a still very high throughput with trains with different number of cars.
Making a blueprint book to plot it down is a good idea!
Re: 4-way intersections: Throughput and deadlocks [image heavy]
I disagree with your point on deadlock ratings.
It's important that common intersection designs that aren't optimal are listed in the OP. That's the only way people are going to be able to see why roundabouts or some other insection isn't an ideal solution for a train network.
It's important that common intersection designs that aren't optimal are listed in the OP. That's the only way people are going to be able to see why roundabouts or some other insection isn't an ideal solution for a train network.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
You can keep a train driving in a loop if you throw a station in there with two path going from the loop to the station and use signals to constantly have it repath between the two path.hansjoachim wrote:I am not sure i follow. But in OpenTTD you can loop a train and keep it at a high speed untill the intersection is clear, you cant do that in factorio i think.vanatteveldt wrote:This one is a couple km above my head. However, would it be possible to design a simple 4-way intersection with timed signals and some room before/after the intersection to make sure crossing always happens at max speed? That might be a simple way to increase throuhput on 'normal' designs, no?hansjoachim wrote:... There are no chain signals at all, every rail crossing is done with combinator logic. ...
You can also only turn signals red and not green, just so that you know
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Good point Do we need multiple categories for that? Do you think that maybe two would suffice: safe or not safe and a sentence to tell what is wrong with itDivaya wrote:I disagree with your point on deadlock ratings.
It's important that common intersection designs that aren't optimal are listed in the OP. That's the only way people are going to be able to see why roundabouts or some other insection isn't an ideal solution for a train network.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Do you have a blueprint of that? Would you name the Station the same as the end station? How would you than add trains going to different areas? How would you add multiple ones?mrvn wrote:You can keep a train driving in a loop if you throw a station in there with two path going from the loop to the station and use signals to constantly have it repath between the two path.hansjoachim wrote:I am not sure i follow. But in OpenTTD you can loop a train and keep it at a high speed untill the intersection is clear, you cant do that in factorio i think.vanatteveldt wrote:This one is a couple km above my head. However, would it be possible to design a simple 4-way intersection with timed signals and some room before/after the intersection to make sure crossing always happens at max speed? That might be a simple way to increase throuhput on 'normal' designs, no?hansjoachim wrote:... There are no chain signals at all, every rail crossing is done with combinator logic. ...
You can also only turn signals red and not green, just so that you know
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Sorry, no blueprint. It's in the forum somewhere but I didn't find it with some quick searches.hansjoachim wrote:Do you have a blueprint of that? Would you name the Station the same as the end station? How would you than add trains going to different areas? How would you add multiple ones?mrvn wrote:You can keep a train driving in a loop if you throw a station in there with two path going from the loop to the station and use signals to constantly have it repath between the two path.hansjoachim wrote:I am not sure i follow. But in OpenTTD you can loop a train and keep it at a high speed untill the intersection is clear, you cant do that in factorio i think.vanatteveldt wrote:This one is a couple km above my head. However, would it be possible to design a simple 4-way intersection with timed signals and some room before/after the intersection to make sure crossing always happens at max speed? That might be a simple way to increase throuhput on 'normal' designs, no?hansjoachim wrote:... There are no chain signals at all, every rail crossing is done with combinator logic. ...
You can also only turn signals red and not green, just so that you know
I guess since the train already has a target station you might not need a station at all. The station is just there so the train drives on automatic. As for what to name it I have no idea what would work for a junction. The design was rather simple. The train is on a loop with 2 ways to the station, one near and one far along the loop. The signal on the near way is red so the path finding picks the far way. Once the train passes the split off for the near way the near and far paths swap places and you toggle the signals so the near way again is red and the far way is green and gets choosen.
For the junction case you would have to first split the rail going into the junction into all the ways the train can go. Then have the loop to keep the train running full speed while it waits for the way to open.
-
- Filter Inserter
- Posts: 947
- Joined: Wed Nov 25, 2015 11:44 am
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Sorry, what I meant is the following:hansjoachim wrote:I am not sure i follow. But in OpenTTD you can loop a train and keep it at a high speed untill the intersection is clear, you cant do that in factorio i think.vanatteveldt wrote:However, would it be possible to design a simple 4-way intersection with timed signals and some room before/after the intersection to make sure crossing always happens at max speed
You can also only turn signals red and not green, just so that you know
- In a normal intersection, a train will wait just before the intersection, and then slowly accelerate while blocking the intersection, meaning the intersection is blocked for a (relatively) long time.
- If you could somehow time trains to arrive just as the other train leaves the intersection, they traverse the intersection at full speed, increasing throughput
- As far as I follow your 'central crossing', you implement this by making sure one side waits until a bunch of trains from the other side passes, so less time is wasted waiting for the trains to accelerate and leave the box
- My question was: would it help to let the trains wait not right at the intersection but X tiles before, and then let them start accelerating just in time so they arrive at the intersection when it becomes free while already going fast(er)
Proof of concept:
Proof of concept
Train from the left is allowed to cross first. The bottom signal closes when the top train is on its way. Once the top train is getting closer to the intersection, the bottom signal is released, so the bottom train can start accelerating. It arrives at the intersection at high(er) speed just after the first train crosses, so it occupies the intersection only briefly. The timing can certainly be improved, I just hope this explains what I mean (note: Using fluid wagons and wood fuel to maximize acceleration time, for normal wagons and rocket fuel the distances will be shorter. )
Ideally, this would be combined with a batch mode, since I guess allowing multiple crossings is always more efficient (?)
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Mrvn
Neat. How would it work with multiple trains?
What if it isnt a loop and there is just a lane along the mainlane and it has many entry points. If it can enter it enters the main lane if it is full it drives to the next one, ideally so that it would use a bit more time to get there than the train on the main lane.
You don't even need combinators.
You just wire the main lane signal with the signal on the entry point and set it to red if the signal on the main lane is yellow or red.
Neat. How would it work with multiple trains?
What if it isnt a loop and there is just a lane along the mainlane and it has many entry points. If it can enter it enters the main lane if it is full it drives to the next one, ideally so that it would use a bit more time to get there than the train on the main lane.
You don't even need combinators.
You just wire the main lane signal with the signal on the entry point and set it to red if the signal on the main lane is yellow or red.
Last edited by hansjoachim on Tue Jan 23, 2018 5:24 pm, edited 1 time in total.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Vanatteveldt
Yeah, I see.
One of the problem when you let a batch of train pass before the next lane starts is that trains would enter the intersection at different speeds. You would have to make it compatible with the highest and lowest speed. Both for trains incomming in the waiting lane and in the active lane. If we can measure the speed of trains in all lanes we could start the trains at a quite optimal time.
I have an idea of how to meassure speed. Checking how many red lights are in an area. Like if it blocks 1 or 20 lights after for example 30 ticks. And in the waiting lane you could meassure with Checking how many yellow lights there are.
The timings would however depend on how high you have upgraded train braking speed. The trains try to adjust their speed so that they dont have to stop instantaneously and therefore we have some wiggle room
Yeah, I see.
One of the problem when you let a batch of train pass before the next lane starts is that trains would enter the intersection at different speeds. You would have to make it compatible with the highest and lowest speed. Both for trains incomming in the waiting lane and in the active lane. If we can measure the speed of trains in all lanes we could start the trains at a quite optimal time.
I have an idea of how to meassure speed. Checking how many red lights are in an area. Like if it blocks 1 or 20 lights after for example 30 ticks. And in the waiting lane you could meassure with Checking how many yellow lights there are.
The timings would however depend on how high you have upgraded train braking speed. The trains try to adjust their speed so that they dont have to stop instantaneously and therefore we have some wiggle room
-
- Filter Inserter
- Posts: 947
- Joined: Wed Nov 25, 2015 11:44 am
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
@hansjoachim: yeah, I was assuming one would optimize for a given situation (i.e. 2-4 trains with rocket fuel and fully upgraded braking). Doing this dynamically I wouldn't even know where to start.
Simplest addition to your setup might be to add a waiting signal say 5 tiles before the intersection, which is red as long as either the next signal is red or the penultimate signal for the crossing tracks is red. This gives the trains a bit of a head start before they reach the intersection if time right?
Simplest addition to your setup might be to add a waiting signal say 5 tiles before the intersection, which is red as long as either the next signal is red or the penultimate signal for the crossing tracks is red. This gives the trains a bit of a head start before they reach the intersection if time right?