Page 20 of 36

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

Posted: Tue Jan 23, 2018 5:37 pm
by hansjoachim
vanatteveldt
I have some ideas of how to do it dynamically, but I won't try it today.

Regarding the intersection. While that would increase throughput, it would increase throughput at a point that isn't a bottleneck. The current bottleneck is the merger, not all the part intersections. It would also break the deadlock prevention I made=)

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

Posted: Wed Jan 24, 2018 8:50 am
by Zijkhal
The problem to overcome I think would be to make sure trains that started slowing down for the intersection, but the circuit controlled light turned back green would not break the intersection due to that train arriving earlier than expected.

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

Posted: Thu Jan 25, 2018 1:22 pm
by mrvn
In 0.16 the fluid wagons where changed. I don't remember exactly but don't they now have the same weight as cargo wagons?

If so you could optimize for LLCCCC/LLFFFF for example. Otherwise you need to handle different speeds for cargo and fluid trains.

Also look at the previous posts about using a wait loop where the train never stops. You could keep all waiting trains at full speed.

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

Posted: Thu Jan 25, 2018 7:01 pm
by hansjoachim
I read it. The trains wont keep looping. Please show me how it can work?

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

Posted: Fri Jan 26, 2018 2:59 pm
by hansjoachim
Zijkhal wrote:The problem to overcome I think would be to make sure trains that started slowing down for the intersection, but the circuit controlled light turned back green would not break the intersection due to that train arriving earlier than expected.
Not sure I understand you correctly. The circuit network can't turn lights green. And the train do start to slow down if the light is red. If the light suddenly turn red they can instantly stop.

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

Posted: Sat Jan 27, 2018 8:27 am
by Zijkhal
hansjoachim wrote:
Zijkhal wrote:The problem to overcome I think would be to make sure trains that started slowing down for the intersection, but the circuit controlled light turned back green would not break the intersection due to that train arriving earlier than expected.
Not sure I understand you correctly. The circuit network can't turn lights green. And the train do start to slow down if the light is red. If the light suddenly turn red they can instantly stop.
When a train is crossing the intersection, the other lights it crosses are closed by circuit. Now, if a train starts slowing for that closed train signal, but just after it started slowing, the circuit controlled light was released, it would arrive to the intersection sooner than anticipated. Now, the trains would not collide, but this other train would stop where it was not supposed to be, thus it will take more time to clear the intersection, which could ripple through the entire intersection, drastically reducing throughput if not dealt with correctly. Ofc, I may be wrong, but I think it should be tested wether such a circuit-controlled intersection is susceptible to such mistiming, and wether it recovers from the mistiming.

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

Posted: Sun Feb 04, 2018 4:36 pm
by Mylon
How does a very large 4x4 intersection consisting of 4 separate 2x2 intersections perform? That is, can I bypass the need for complex intersections by regularly crosslinking and making a grid-like structure for my rails?

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

Posted: Sun Feb 04, 2018 10:42 pm
by hansjoachim
Hey
I made an smaller combinator intersection with around 125 in set 1 and 115 in set 2.
tested with 6 cars, supports 14 cars not tested

RHD 4 way 2 lane
https://pastebin.com/gLxbV1GR

This time it is symmetrical and only with signals that are needed

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

Posted: Sun Feb 04, 2018 10:49 pm
by hansjoachim
Zijkhal wrote:
hansjoachim wrote:
Zijkhal wrote:The problem to overcome I think would be to make sure trains that started slowing down for the intersection, but the circuit controlled light turned back green would not break the intersection due to that train arriving earlier than expected.
Not sure I understand you correctly. The circuit network can't turn lights green. And the train do start to slow down if the light is red. If the light suddenly turn red they can instantly stop.
When a train is crossing the intersection, the other lights it crosses are closed by circuit. Now, if a train starts slowing for that closed train signal, but just after it started slowing, the circuit controlled light was released, it would arrive to the intersection sooner than anticipated. Now, the trains would not collide, but this other train would stop where it was not supposed to be, thus it will take more time to clear the intersection, which could ripple through the entire intersection, drastically reducing throughput if not dealt with correctly. Ofc, I may be wrong, but I think it should be tested wether such a circuit-controlled intersection is susceptible to such mistiming, and wether it recovers from the mistiming.


Yeah, that is a big part of the challenge.
I am not sure such a merger will pay off in comparison to a merger that lets trains pass in batches. When the amount of trains per batch is very high the potential gains becomes quite low for a timing based merger.

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

Posted: Thu Mar 15, 2018 6:28 am
by sapog
these lights are superfluous, they complicate the ring, but they are useless

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

Posted: Thu Mar 15, 2018 5:30 pm
by hansjoachim
sapog wrote:these lights are superfluous, they complicate the ring, but they are useless
I agree
A pretty useless intersection none the less.

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

Posted: Fri Mar 16, 2018 12:18 am
by Jap2.0
hansjoachim wrote:
sapog wrote:these lights are superfluous, they complicate the ring, but they are useless
I agree
A pretty useless intersection none the less.
Are you sure? I haven't studied the intricacies of roundabouts, but it looks like it could increase throughput in cases such as where two trains come from the left, the first exiting down and the second exiting up. Would this allow the second to enter the roundabout before the first had fully exited?

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

Posted: Fri Mar 16, 2018 8:16 am
by Aeternus
I disagree. Roundabout intersections are useful in low to mid volume traffic with shorter trains (less then the length of the roundel - if the train length is greater then the roundels capacity you risk a pathing glitch causing the train to rearend itself). It allows trains to turn around, useful in dual-rail-as-bus setup. A roundabout is practically deadlock proof.

To improve throughput on this roundabout however I do recommend a corner bypass rail so traffic turning left doesn't even enter the roundel. In my base I use this configuration a lot, 'though for troughput purposes, I try to limit it to a threeway intersection instead of fourways.

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

Posted: Fri Mar 16, 2018 6:04 pm
by hansjoachim
Jap2.0 wrote:
hansjoachim wrote:
sapog wrote:these lights are superfluous, they complicate the ring, but they are useless
I agree
A pretty useless intersection none the less.
Are you sure? I haven't studied the intricacies of roundabouts, but it looks like it could increase throughput in cases such as where two trains come from the left, the first exiting down and the second exiting up. Would this allow the second to enter the roundabout before the first had fully exited?
No, the second train would still need to wait for the first train to exit the intersection.
Aeternus wrote:I disagree. Roundabout intersections are useful in low to mid volume traffic with shorter trains (less then the length of the roundel - if the train length is greater then the roundels capacity you risk a pathing glitch causing the train to rearend itself). It allows trains to turn around, useful in dual-rail-as-bus setup. A roundabout is practically deadlock proof.
In a game with unlimited resources there are so many way better intersections that I'd skip that intersection in every game.
Aeternus wrote: To improve throughput on this roundabout however I do recommend a corner bypass rail so traffic turning left doesn't even enter the roundel. In my base I use this configuration a lot, 'though for troughput purposes, I try to limit it to a threeway intersection instead of fourways.
Sure that makes it better

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

Posted: Mon Mar 19, 2018 10:38 am
by mrvn
The roundabout is the most simple intersection that allows a train coming from anywhere to go everywhere. Most other intersections don't allow turning back.

There are 2 problems with the roundabout (or anything that potentially has a 270° turn) though:

1) The game is buggy and will sometimes re-path trains inside the roundabout into a 270° turn. This crosses their own way so the chain signals inside the roundabout prevent the train from moving. The player has to go there and drive the train off the roundabout manually.

2) Without chain signals inside the roundabout (which avoids the bug in 1 at the cost of throughput) this limits the length of trains because they
simply drive into them self if a re-path to a 270° turn happens.

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

Posted: Mon Mar 19, 2018 11:51 am
by vanatteveldt
In my current game I have about 20 roundabouts, used by a single train of length 1 -- no way I'm going to hike all the way to the other end of monkey island my base, AGAIN. :-D

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

Posted: Wed Mar 21, 2018 5:46 pm
by 0mega
How about a 4x4 with an outer roundabout and inner cross? I use something like this. Sometimes I see train going back and forth between two roundabouts though, not sure if it has to do with design or if trains in general have trouble to get a head in navigating?
outer_roundabout.png
outer_roundabout.png (1.89 MiB) Viewed 7272 times

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

Posted: Wed Mar 21, 2018 8:39 pm
by hansjoachim
All these areas prevent trains from going in opposite directions. They need to be spaced out

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

Posted: Thu Mar 22, 2018 9:43 am
by mrvn
hansjoachim wrote:All these areas prevent trains from going in opposite directions. They need to be spaced out
The chain signals on the diagonals of the circle are also pointless. The outer circle still suffers from the game in the bug of re-pathing sometimes making a 270° turn. The game really should never re-path inside a chain signal block but they only fixed that for some uncommon cases.


The reason why you see trains going between 2 roundabouts is due to the pathing algorithm. A red signal has a higher cost than a green one so while another train is on the track the train wants to take it is often cheaper to turn around and take the longer way around through the other roundabout. Of cause by the time the train has turned around and reached the other roundabout the whole situation has changed and it might even do the same again, turn around and use the first roundabout. Could repeat forever with a train never reaching it's destination.

After watching a lot of trains drive in a congested more-or-less grid layout I'm coming to the conclusion that less is more. Don't give the path finding too many options. You want a more of a tree structure with only one clear way from point A to point B. Make the loops in your rail networks so big that taking alternative paths that much more expensive that a single train in the way doesn't instantly add detours.

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

Posted: Mon Mar 26, 2018 10:51 am
by dood
mrvn wrote:1) The game is buggy and will sometimes re-path trains inside the roundabout into a 270° turn. This crosses their own way so the chain signals inside the roundabout prevent the train from moving. The player has to go there and drive the train off the roundabout manually.
Really?
I suppose this could happen with this one too?

Image

I've been running dozens of trains with lengths of 8-12 wagons through this for months now and not once have I seen one path into itself.