Page 1 of 1

Automatic Train Cyclotron

Posted: Sun Oct 07, 2018 9:20 pm
by quyxkh
Load it up, zoom all the way out, and watch: trains enter the loop if they're too slow and don't leave until they're going fast enough. All three trains, the 1-3, the 1-10 and the 1-16 have the same schedule. Simple wiring per switch, the signal-chainsignal-signal gizmo looks much more generally useful.
Automatic Train Cyclotron.zip
(1.26 MiB) Downloaded 167 times
Screenshot from 2018-10-07 14-18-15.jpg
Screenshot from 2018-10-07 14-18-15.jpg (46.46 KiB) Viewed 6929 times

Re: Automatic Train Cyclotron

Posted: Wed Oct 10, 2018 8:10 pm
by herkalurk
So what is this for?

Re: Automatic Train Cyclotron

Posted: Wed Oct 10, 2018 8:21 pm
by quyxkh
You can use it to make slow lanes, also to get the long-distance trains up to speed so they can run through biter territory.

Re: Automatic Train Cyclotron

Posted: Wed Oct 10, 2018 10:09 pm
by nosports
herkalurk wrote:
Wed Oct 10, 2018 8:10 pm
So what is this for?
Stupid question :lol:

Because we can :mrgreen:

Re: Automatic Train Cyclotron

Posted: Sun Oct 14, 2018 4:27 pm
by hansjoachim
So what are the drawbacks? Does it work as in OpenTTD? Have you used it in a large network?

Re: Automatic Train Cyclotron

Posted: Sun Oct 14, 2018 5:00 pm
by hansjoachim
I couldn't get it to work properly. Some trains reentered the mainline at a very low speed, trains entered the cyclotron while at full speed.

Re: Automatic Train Cyclotron

Posted: Sun Oct 14, 2018 6:16 pm
by quyxkh
The only way I know to get trains leaving that loop going slow is if they're going _so_ slowly their braking point doesn't reach the loop-exit signal before they've committed to it, and the only way I know to make that happen is if the loop's in danger of becoming so congested no train can reserve enough braking distance to reach exit speed. I count that as a fail-soft, a feature. You _can_ get all three trains in the save into that loop, the two long trains slow the short one down, wait long enough you'll see that happen and they successfully negotiate it.

There's necessarily some variability in how fast a train has to be going to bypass the loop, if you turn on braking point displays and slow it down you can see how the gadget operates: when the switch's entry signal goes yellow, there's a configurable ten-tick delay before the high-speed switch exit blocks, forcing any train that hasn't reserved it by then to reroute. But the sampling only happens once per tick, so take the train's speed and mark out a ruler with braking point samples at that many meters' interval, slide that along the path and you can get a one-sample variance, and the 3-wagon train in the save is right on the edge, if it departs from the far stop it always gets up enough speed to take the straight path.

But a borderline case like that will surely be accelerating, so it'll immediately take the high-speed exit, having traveled an extra, what, five meters? <Shrug> Okay.

I don't see how to get trains traveling at full speed to take the slow-train exit at all, full speed is 1.38 m/tick, 298+km/hr, there' s just no way to fit enough braking-point samples that far apart in a 10-meter sampling interval, can you post a autosave with a train about to enter the loop while at full speed?


Edit: ah: if the fast train sets its path while a slow train is entering the loop, then the high-speed switch exit is blocked (to force the slow train to enter the loop) and the farther-away train will reserve a path around that too -- but since it never hits any red signals on its way, that's the path it continues to follow. As I understand it, OpenTTD trains are forever repathing. Factorio trains don't do that, they repath when the train's got some reason to stop enroute, or when rails get built or destroyed or the like.

Re: Automatic Train Cyclotron

Posted: Sun Oct 14, 2018 9:00 pm
by quyxkh
Last note: to keep fast trains from _ever_ entering the slow loop you have to make sure their last pathing attempt before reaching the switch entry was done with the high-speed switch exit clear. I'd make that happen in the sample save by just wiring the switch exit chain signal to the train stops and add "red=0" to the trains' departure conditions, that'll work for a simple startup cyclotron, to keep from clogging a main line with slow, slowly-accelerating trains, but if multiple bypasses are possible you'll need to force a repath enroute, the only reliable way I've found is kinda ugly but here it is:
Force a repath, small (~1%) speed hit
Force a repath, small (~1%) speed hit
snap@T1342347=880x528+39.75+39,z2.jpg (28.31 KiB) Viewed 6740 times


You need the multiple combinators because of the speed variability problem, you can't be sure how many ticks after the train reserves the entry signal it'll try to reserve the exit signal, so this one just goes all brute-force on its ass, it fires off a clock on entry, then when the middle signal's reserved it closes the exit until the clock counts back down to zero. The longer you make the blocks the more precise you can get, but the more vulnerable you are to acceleration making the train reserve the exit before you can get it closed at all. Who knew Heisenberg would be relevant in a puzzle about coal-fired trains on alien planets?

So anyway, that'll cause any train to brake anywhere from 1 to 3 ticks in my tests, nothing simpler I tried has that nice ploppable quality to it. Adding that 1-3-tick stutterstep braking to the save above is enough to push the short train into slow-path territory every time, I did put some time into that save to show the different behaviors you can get, anyway, you have to move the stops farther away from the switch to let it carry more speed into the switch.

Re: Automatic Train Cyclotron

Posted: Sun Oct 21, 2018 10:13 pm
by Hyenna
quyxkh wrote:
Wed Oct 10, 2018 8:21 pm
You can use it to make slow lanes, also to get the long-distance trains up to speed so they can run through biter territory.
Im using chain signals in non protected/biter territoy and place some protected areas (where the longest train fit in) with regular traffic light in the entrance and regular signals in protected areas (on straight lanes). So the train can reserve the full path to next protected area.

Re: Automatic Train Cyclotron

Posted: Mon Jun 14, 2021 6:39 pm
by quyxkh
Here's a force-a-repath version suitable for use in LHD setups, it's all inline with the signals and relies on external power so it all fits in a 2m gap:

snap@T2736267=848x224+919.5+0.5,z2.jpg
snap@T2736267=848x224+919.5+0.5,z2.jpg (19.83 KiB) Viewed 4160 times