Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Impulse Elevators - What I've learned and requesting advice/confirmation testing  (Read 12145 times)

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

EDIT2: Modified this post to remove rambling and make it more pure science /EDIT2

Alright, my first question is to make sure that I haven't completely misunderstood something: Has anyone gotten an impulse elevator over 8zs to work properly?  I can get short ones to work.  It's when you start getting some serious columns going that it goes horribly wrong.  I've tried to keep up with all the minecart science threads but I just haven't seen one that goes into the issues I've had.  If there is one please tell me and I'll move this experimentation and testing over to that thread.

I use Phoebius, btw.

This all started when a 90z impulse elevator just refuses to work after the first 8-10Zs by derailing into the wall and rolling back (and rocking horsing if you don't have an escape hatch on the impulse ramp), and I've set out to figure out why.

Warning, this is SERIOUSLY long, and I go through my testing methodology so that those with enough interest can poke holes/offer advice for anything I wasn't thorough enough with.  Skip to the end if you want to just review my findings.

EDIT: Sorry, I rambled a bit.  This was written out in pieces over the course of hours, and at one point when I was overtired.  I'll try to clean it up later, when I'm not pressed for time.[/EDIT]



Alright, let's start with some basics from my initial minecart science center.  Version is current, using LNP R22.  I should mention I have no idea how, in DFHack, to check mincart speeds, friction, or anything similar.  All 'facts' are observations, usually repeatable.  I will mention if they were not (some of this is happening while I write this, other items are things that caused said testing).

A few local defintions:
Impulse Turn: An S shaped set of ramps where you derail onto the first one for speed, and then go up the second one in a curve.
De-Skidder: An impulse ramp along the main track after leaving a series of impulse turns to get the cart to continue down the rails.  The cart is still using floor skid (or possible ceiling/wall, not sure) at this time, which leads to the usage of a Re-Railer.
Re-Railer: The final impulse ramp after an impulse turn series to get the cart back to following the tracks. 

1z Test:

Cart is pushed in from west, no impulse ramps as speed kickers prior to the impulse turn.  It hits a carved impulse ramp facing NE, then turns upwards on a NW.


When it enters the upper level, it derails.  I should say it really more skids than derails, but it acts like floor friction, thus, I need a rerailer impulse ramp.  Further testing later proves that this cart actually is skidding across the ceiling from a derail.


Multiple tests were performed to confirm that the cart constantly stopped at the same location with no variance.  The rerailer was placed here and the cart was able to continue on without issue, including un-walled turns, confirming it was re-railed.

Multi-z Test:
Next test was to perform a multi-z test.  Please forgive the trees growing in the middle of the track, this test required some fluid mechanics to clear the cart after a few mishaps with railway carvings and a cart that was causing voluminous injuries while I attempted to remove it.  The aquifer was tapped to free the cart.  Ignore the brush, mud messes up tracks badly and I rebuilt it after I took the screenshots.  The ramps are in the right places even if they're not in the pics.

It was used a few times while I performed various failed tests.  I'll discuss those after.

In the Multi-Z test, I was having a problem even with a Re-Railer.  The construction was simple enough, a series of impulse turns up 5 z-Levels:


But I was having problems sticking the landing.  I finally realized I needed a deskidder AND a Re-Railer:


The first ramp just kind of skidded the cart along at a more controlled pace, and then the Re-Railer could get to work afterwards. 

Now, to try to combat needing this, I tried a few things: 
First, I built the final ramp as a single up ramp up, trying to burn off some speed from the impulse.  It's not enough. 

Next, I finally deduced that maybe I just had too much speed in the impulse elevator so that the cart was launching itself after.  You'll notice some constructed walls at +5.  I was wondering if the straightened ramp was the problem, so I tested a level down after a turn.  No significant difference, still needed dual impulses for continued travel, but with a minor variation. 

Now, some testing was interrupted by a giant woodpecker, so I just went back and reran the track (after some rebuilding), to confirm that the impulse elevator was still functional (with a load of granite in it) with the 'extra' up ramp at the tail.  It worked exactly the same with the granite in the cart, with no spillage.  On the impulse elevator the cart is moving ~100,000 Urists, at one tic/square.  Once it hits the top, it stops nearly dead on the deskidder, and takes ~6 tics to move to the next square, slows to the re-railer, and then moves at ~25,000 Urists through the turns (and makes the wallless turn on the rails) to the track stop in the lower right, load intact.

So, I'm up to learning two things now about impulse elevators.  First, you need to rerail the cart after departing the elevator.  Second, you need to skip a few impulses, or speed gets out of hand.

Begin Megaproject, the magma forge ore dumper with cart return.  I didn't THINK it was a mega-project at the time, and then my miners took ages digging the system out.  And then the headaches began.    >:(

After an automated stockpile dump at a low track stop and a bit of maneuvers, getting back up needs to happen in 3 stages.  The first stage will be getting back over my magma forge, because it's directly below the area I want to use to elevator up past the 3rd and 2nd caverns.  Then after some maneuvers it goes up a huge # of Zs, to right under the first cavern layer.  Manevuer from there to an unbroken passage up through the first cavern layer, then to the cart return area.  I'll document the cart return elsewhere.

So first it's a short hop up, a mere 6 Z-levels, similar to the one in the minecart testing area, detailed above in the multi-z test.  Without the extra speed burnoff straight ramp, it was worse.  Two deskidders and then finally a rerailer would work.  No joy.  This didn't look good for Woody.  If he'd only gone to the police, this would never have... wait, wrong show.

I unbuilt the impulse ramps, recarved the track, and removed the impulse ramp on Z+4 and just carved it as a straight connector on ramped ground towards Z+5.  I got a rollback, didn't make it to z+5.  Repeat at +5, putting the impulse back at +4... and still no good, another rollback.  Keep in mind this was not a directly up ramp after the impulse turn, but a flat track to simply connect it to the next curved ramp up.

So why did it work before in the testing facility with one 'unimpulsed' level but not here?  Out of curiousity I observed speed for the two systems on entry.  Entry speed to this elevator is 6 tics/square, roughly 16,500 Urists.  Entry speed at the testing center was... 5 tics/square, with a 6 in front, so figure 19,000 Urists?  A mere 3,000 might make the difference but it's unlikely.  I triple check all the ramps, yep, nothing random.  So, it's most likely not speed.  The impulse turn system brings the cart into the 100k range for speed almost instantly, it's just not enough of a variation.

The only signficant design difference is that at the testing facility, it goes up two ramps in a row, once on the curve and then immediately into another straight ramp to the next Z-level.  Wondering if having the ramps in a row make the difference, I flatten the ramp connecting Z+4's upward turn to Z+5's straight ramp to Z+6.  I'm expecting a flying derail, but I'm curious.

Yup.  It's in flight...  I think.  It hit the flat track at 1tic/square, same as up the elevator, basically skipping it.  There's no speed loss there.  Then it hit the ramp going to Z+6 and rolled backwards in 3 tics.  Okay, so that won't work.  A little redesign and I use a two-ramp in a row system again between z+4 and z+6, similar to the multi-Z design final riser.

That's the trick.  I'm now getting nearly the exact same results as I did in the testing center.  So the problem at z+4 possibly wasn't that it didn't have the speed, but that I was catching flight, landing on the far ramp, stopping dead, and then doing the rollback.  More testing. 

Back in the minecart testing facility...

I want to find out where an impulse elevator gets enough speed to not need a booster on a particular level.  I start with two tests, a Z+1 ramp and a Z+2 ramp.  With a single impulse turn it's got enough speed from a push to go up Z+2.  Interestingly, a dual impulse turn still only has enough to push past one single straight, to Z+3.

In the images below you'll see the test setup.  The bright blue dots are where the carts would stop continuing up the continous ramps after the impulse turn. The ramps continued up further for curiousity, as you can see at z+3 for the single z, but were unnecessary.  They would then slide back down, and on the impulse pop up into the 'safety trap' to avoid rocking horses.



So, my original understanding was poor.  On an impulse elevator a single Z of Impulse Turns are enough to start a critical speed concern that amplifies with continued impulse turns.  My next test is to start playing with the Z+1 for consistency.  It was consistent in where it would stop, but I'm trying to get a consistent, non-derailing impulse elevator going.  For that, I need to know what it was going to do on Z+2 after the track straightened.

The Z+2 test showed that I still have derailment at Z+2 off a single impulse turn + immediate up ramp, as the cart will travel 4 blocks down and then stall out. 



Now, I'm pretty sure a re-railer would work here, but I can't seem to get it to stick on its own consistently.  There are two places I'm thinking about taking this testing.  The first is entry speed, but that would really only matter to a single Z Impulse Riser, so not necessary useful for my final goal.  The other is to see how bad things get over multiple Zs where I skip every other Impulse Riser.  The second one is going to take some time to rebuild out into my existing Impulse Elevator.  It was built when I thought I knew what as going on from the wiki.



Drop Chute
For those who are curious about how the drop chute works:

It drops from Z:111 straight down to Z:-14.  There is no ore loss on landing, but it does take a little trickery to get the cart going again.  The cart needs to land on a ramp, and terminal velocity for a wooden minecart in freefall is 9 squares/5 tics, so it's possible to skip the ramp's impulse, so you need a Multi-Z catch ramp.  When the cart hits the first ramp at speeds where it wants to skip the tile because of free fall speeds, it'll move along the track towards the next tile, and stop dead if you don't. 

The Yellow X tracks the initial drop chute hole for the ramp for reference.



After such a high speed catch I installed a high then a medium track stop to keep the thing from derailing at down-ramps and bouncing off walls as it maneuvers towards the low friction track stop automatic dumper.  From there it continues into the rising impulse system.



TL;DR

More testing needs to be done, but it would appear a long Z impulse elevator doesn't work as described in the wiki.  The cart builds up far too much speed during the elevator and derails itself along the way, smashing into a wall and then going into a rocking horse if you haven't built safety outlets at the impulse side.

A single Z impulse riser has enough energy to push a cart up 2 Zs worth of ramps, and still derails when it goes to flat track.  Rerailers will help with this process but an impulse elevator is meant to be tight.  Testing needs to continue to be done with how often to skip an impulse riser to allow for more controlled elevation of the cart.

Short hops (6-8 Zs) can be managed by using a de-skidder and a re-railer impulse ramp to get the cart back on track (pardon the pun) with a standard impulse elevator.   Make sure your last Z is a straight up ramp (non-impulse risered) from the last curve to burn off speed or you have to do more work than is necessary.

Drop Chutes work fine, no spillage, with large items like rocks and with water in a cart.  I haven't tested multi-Z carts with smaller items, like sandbags, to see if small things fall out.

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

Alright, so, I've got a functional 99 Z ( -10 through 89) impulse cart elevator functioning, and here's how:

First, the elevator has to be built in a particular pattern otherwise your speed build up gets out of hand within just a few Zs.  The use of a straight ramp handles the majority of it, and a flat turn will rerail you like nobody's business, even in the cases where I needed a deskidder and a re-railer above, a turn does most of the work, as long as you control your speed a bit.

So, the construction of the main spiral looks like this:


This was in my testing facility, so I dropped in a long runner with some walls carved out to make sure I was rerailed and at controlled speeds on exit:



Now, this required a little tweaking at the top of the 99 Z elevator.  I had to put in a track stop with high friction to keep the cart from skipping over the curve just after the ramp.  This is because the way it's built it ended on a direct impulse ramp -> ramp so it never bled off speed.  It only spends a tic or two on it (dropping about 20k in speed) but that's enough to allow for a rerail:



I currently have a five cart drop/return system working through this system with no issues (now that I worked out some bugs in my cart returns).   The entire system from z:111 down to z:-16 and back up takes approximately 50 seconds at an average FPS of 27 or so, barring holding patterns in the cart return.  This saves me 400 steps, on average, per ore hauled.  The 100 or so down to get a wheelbarrow, the 150 up to get the ore, and the 150 back down to drop it off.  It's actually higher but I'm just rounding things off.  There is no power used anywhere in the entire system.  Shutting off the system can get a little hairy because of that, so if you're going to follow this pattern make sure you dig out shunts above your impulse ramps in case you get a rocking horse.

Larix

  • Bay Watcher
    • View Profile

I'll have to look at this a bit closer, but my tests say you don't need any fancy layouts, just make a two-wide ramp stretch all the way up to where you want to go:

Code: [Select]
####
#▲▼#
#▲▼#
####

West is up, east is down - and just engrave a SW track corner on the northern and NW on the southern ramps, all the way up. The carts will track-jump up from the lower z-level, accelerate because there's a 'down' direction available (towards the neighbouring ramp) and bounce up to the next level. The cart goes up at a leisurely 6 steps per level or so, and it seems to keep this pace over pretty much any distance you care for.

I suspect that carts stopping after going up a level actually bumped into the ceiling - i.e. they jumped and tried to go to the next higher level. This can be avoided to some degree by putting a _flat_ floor track corner directly behind the ramp exit - unless the cart goes really fast, it will follow the corner and lose the vertical component of its movement. Your idea of putting a ramp on the track there probably does the same thing - the ramp acceleration counts as a downward component and cancels out the attempt of the cart to get airborne.

Running a cart up ramps at very high speeds always causes trouble, at sufficient speed, carts will rise in free flight for up to 24 z-levels. You'll have to do some serious re-railing to hold them on the desired level. Using a simple non-impulse solution like the two-wide ramp is a lot less flashy than keeping a 200k fast cart on the ground, but pretty much controls itself.
« Last Edit: August 04, 2013, 09:37:46 am by Larix »
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile

TL,DR...yet

Quote
Alright, let's start with some basics from my initial minecart science center.  Version is current, using LNP R22.  I should mention I have no idea how, in DFHack, to check mincart speeds, friction, or anything similar.  All 'facts' are observations, usually repeatable.  I will mention if they were not (some of this is happening while I write this, other items are things that caused said testing).

add to dfhack.init:

Code: [Select]
#minecart watcher
keybinding add Shift-X devel/watch-minecarts

pause the game, press shift-x and it will print the speed, coordinates, etc. of a cart to the dfhack console, if the cart is not in the air. step one, repeat... If you want more automation you need to install autohotkey, because I couldn't macro the script ingame. You'll get an output like this:
Code: [Select]
?? distance distance + speed friction ?? Z level ??
0 16 -68,8602 0 0 59 153 54
0 16,4999 0,4999 0,4999 0,4999 59 153 0
0 16,9998 0,4999 0,4999 0 59 153 0
0 17,4996 0,4998 0,4998 -0,0001 59 153 0
0 17,9993 0,4997 0,4997 -0,0001 59 153 0
0 18,4989 0,4996 0,4996 -0,0001 59 153 0
0 18,8524 0,3535 0,4995 -0,0001 59 152 -1
0 19,24015 0,38775 0,5484 0,0489 59 152 0
Unfortunately the script needs a clean/new fort to work, in older forts it produces an error message.

Di

  • Bay Watcher
    • View Profile

When you're doing something dwarfy it's all about trial and error and nothing can help you.
The design you're using has all the wonkiness of both the turning ramps and impulse ramps, I believe only with trial and error you will achieve success in  this case.
I myself have given up the hopes of understanding how minecarts work. All those fractional tiles, tiles that are affecting cart before it moves over them an so on. Though I could recommend using more linear setups. For example in my current fort I have a cart ascending 13-level straight slope after a long accelerator. And I only had to add a pair of track stops to tune it's speed on after reaching the top. (The amount of stops used to limit its speed on the way down is another story though.)
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

West is up, east is down - and just engrave a SW track corner on the northern and NW on the southern ramps, all the way up. The carts will track-jump up from the lower z-level, accelerate because there's a 'down' direction available (towards the neighbouring ramp) and bounce up to the next level. The cart goes up at a leisurely 6 steps per level or so, and it seems to keep this pace over pretty much any distance you care for.
So, basically, it just rocks back and forth in the U until it gets enough oomph to go to the next level, rinse repeat?  Intersting.  Have you managed to spiral this design or is it really only useful in a ramp scenario?  My big concern for this project is repeatability in a small space to get through cavern layers.

Quote
I suspect that carts stopping after going up a level actually bumped into the ceiling - i.e. they jumped and tried to go to the next higher level. This can be avoided to some degree by putting a _flat_ floor track corner directly behind the ramp exit - unless the cart goes really fast, it will follow the corner and lose the vertical component of its movement.
I'm not entirely sure what you mean there.  Can you extrapolate slightly?  I think I get it but it's just not clicking.

add to dfhack.init:

Code: [Select]
#minecart watcher
keybinding add Shift-X devel/watch-minecarts
AH, thank you!

Quote
Unfortunately the script needs a clean/new fort to work, in older forts it produces an error message.
Craaaap.  Queue the launching of a new experimental fort shortly.  Dangit, took forever to map the caverns on this one.  Or do you mean it just has to be a 34.11 fort?

When you're doing something dwarfy it's all about trial and error and nothing can help you.
In general, I agree.  What I'm hoping to do is nail down the methodology for both myself and others in the future... barring Toady fixing the impulse bug.  Hopefully that's not as high on the list as, say, clothing problems.

Quote
I myself have given up the hopes of understanding how minecarts work. All those fractional tiles, tiles that are affecting cart before it moves over them an so on.
I'm not that deep into the understanding myself, particularly at the level of how much distance the tile before adds to the current tile and the like.  I understand just enough to get myself in trouble.  From there, observable repeatable reaction is more valuable to me than finite understanding at this point... because I don't have the finite understanding and really don't have the will to go try and drill it into my thick bearded skull.  Thus, minecart testing centers!

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile

AH, thank you!

Quote
Unfortunately the script needs a clean/new fort to work, in older forts it produces an error message.
Craaaap.  Queue the launching of a new experimental fort shortly.  Dangit, took forever to map the caverns on this one.  Or do you mean it just has to be a 34.11 fort?

No. :( I'm using a clean embark with invaders off and only the necessary workshops, minimum dwarves as a minecart testfort. If you build too much, after a while something interferes with the script, and then it can't find the moving cart and just shows an error message. New forts work.

EDIT: An extra tip: I noticed that track_upramp_track_upramp_track configurations are more efficient for travelling up then a track_up_up_track config: this way a cart will teleport from the middle of the ramps to the middle of the middle tiles after it, taking only ~half friction on the upramps. I don't know how stable a system built like this would be, especially at high speeds, but it's worth a try. This quirk works on the boundaries of ramps and straight tracks afaik.
« Last Edit: August 04, 2013, 04:40:38 pm by fricy »
Logged

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

EDIT: An extra tip: I noticed that track_upramp_track_upramp_track configurations are more efficient for travelling up then a track_up_up_track config: this way a cart will teleport from the middle of the ramps to the middle of the middle tiles after it, taking only ~half friction on the upramps. I don't know how stable a system built like this would be, especially at high speeds, but it's worth a try. This quirk works on the boundaries of ramps and straight tracks afaik.

Um, huh?  Not sure I follow your building designations.

Why is it teleporting, also?  Once we get to details like that I get pretty lost, and need to refer to my minecarts for dummies book.

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile

EDIT: An extra tip: I noticed that track_upramp_track_upramp_track configurations are more efficient for travelling up then a track_up_up_track config: this way a cart will teleport from the middle of the ramps to the middle of the middle tiles after it, taking only ~half friction on the upramps. I don't know how stable a system built like this would be, especially at high speeds, but it's worth a try. This quirk works on the boundaries of ramps and straight tracks afaik.

Um, huh?  Not sure I follow your building designations.

Why is it teleporting, also?  Once we get to details like that I get pretty lost, and need to refer to my minecarts for dummies book.

Teleporting's moving more than one tile per tick, which happens with minecarts accelerated hugely by ramps. I believe it was noted in original minecart science thread to be capable of going through walls, not sure if that's been fixed since introduction of the carts.

I believe they're saying upramp then flat track and upramp after that, instead of upramp after upramps.
Logged

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

Sorry, I wasn't very clear about my question.  I know once you hit significant speed (~150,000 Urists I think) you start skipping tiles.  It's the mid-square teleport that has me confused.

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

I believe I've found the answer.  It's working quite nicely for 6-10 z lifts anyway, I need to still build out the main ramp tower.  There's a couple of quirks involved.  First, if the track turns (even without a wall) after coming up an impulse turn and second ramp, the cart sticks and does not derail/skid in any way.  Next, an impulse turn/ramp up/turn/repeat works consistently and at a significant speed.  So it's impulse ramp->Corner Ramp->Straight Ramp->Rampless Turn-> Repeat.

I'll screenshot and whatnot here in a bit after I test the primary elevator, so I can do it all at one time.

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile

Yeah, sorry about the confusion, it's not the high speed teleporting/tile skipping I'm talking about, but another quirk I found while testing ramps:

When moving from a ramp to a straight track section, the cart moves regularly on the first half of the ramp, then it will just move in one tick from the middle point of the ramp to the middle point of the next flat track, so it skips taking friction for half a ramp and half a track, that's why I say it more effective at moving up.
Of course on down ramps/impulse ramps the effect is the opposite, and when going above 100k speed there's a friction penalty of 4900 for this tick, so it's only useful with slower speed. Plus when you place a track stop on the first regular track after a ramp, it will only work on the last half of that tile.
« Last Edit: August 05, 2013, 12:42:39 am by fricy »
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile

I think it's worth sharing, and a bump:

I developed my previous tip a bit further: If you build the ramp system the way up proposed (up, tile, up, tile, up, etc), AND enter the first ramp with a speed that's between 70k and 100k the cart will only slow down by 20 friction per z level. Zero ramp friction this way, in theory you could go up 1500z levels with a single acceleration.
Tested on 7 z levels. Little bit of explanation can be found here.

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

Oh, sorry, I need to get screenshots in here.  I've got a 90+ Z impulse elevator working with no issues.  Just needs a track stop at the top to get it back to reasonable speeds.  Been busy with work lately so I haven't sat down with it.

Short version:

Z0:
Flat Curve -> Impulse Ramp -> Curved Ramp

Z+1:
Straight ramp

Z+2: Repeat Z0

Goes up cleanly in a 3x3.  Dig out escape dumps for the cart in case of a bad track carve above each impulse ramp to avoid rocking horses.  Pics to come.

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile

Please see the 2nd post that I'd reserved earlier.  All images and methodology to build a functional impulse elevator are there.
Pages: [1] 2