Top
Best
New

Posted by Jrh0203 8 hours ago

Elevators(john.fun)
738 points | 191 commentspage 4
danso 3 hours ago|
Oh wow, this is perfect reading for me. One of my first college career fair questions was "Tell me how you would program an elevator". Forgot what sad attempt at an answer I gave, but I pretty much thought about that algorithm every time I've ever waited for the elevator. Which was pretty much daily when living in NY.
cush 4 hours ago||
This is a fun simulation to play with. One variable I appreciate in efficient elevators is how the doors work. Usually they don't let you press the button to open a closing door - effectively delaying an already departing car
hypercube33 4 hours ago|
There are some awesome hacker talks about elevators on YouTube worth checking out
coop57 7 hours ago||
You have no idea how excited I was to see this article today. I've long been fascinated with elevators and the algorithms that control them. Thank you!
tegling 5 hours ago||
One case not covered, I believe I saw at London Heathrow was where 4 cars essentially moved people across only 2 floors. With only 1 centralized button, only 1-point-something car was effectively moving people on average, because people had to wait for the currently filled car to have its doors closed and starting to move, before hitting the button to call the next car to pick them up. Imaging 100-200 people in line and, often, overly eager would-be elevator passengers hitting the button too early. Thus leading to halting the just filled car and doing an additional full open and close doors cycle. Fun stuff!
tomduncalf 1 hour ago|
Ha I know the exact ones you mean well, going to the train from terminal 5? I couldn’t have told you what was up with them but they seem very inefficient and there’s always a queue! Thanks for explaining
jp191919 7 hours ago||
Reminds of something I haven't thought about in a very long time... SimTower
efavdb 6 hours ago||
I recently wrote an article about this problem, and detail one reasonable algo for minimizing wait time. (Doesn’t consider concept of cars being full though, interesting addition)

https://jslandy.com/elevators/

reader9274 6 hours ago||
I feel like most cases of wait times are due to elevators "waiting" empty in the wrong floor. They either all wait in the bottom floor, or all wait where they were last left at. Would be better if their waiting floors were distributed throughout the floors so that first response is fast.
Sohcahtoa82 6 hours ago||
In the middle or end of the day, yes. In the morning, waiting on the bottom floor is the best.

Unless you're a hotel. Then the timing is flipped: Wait in a distributed manner in the morning/mid-day, gather on the floor in the evening.

cruffle_duffle 6 hours ago||
The problem is that in the morning the “last stop” for the elevator might be the lobby not a mid floor. And so it would have to move itself back up without any passengers or calls to upper floors. Basically “optimistically” moving itself back up. And I wonder if some (most?) control systems don’t do that because of… well I dunno. Lots of elevators have pretty old or basic control systems in them. Maybe predate caring about energy and many also probably aren’t strictly smart enough to be concerned about wear factors and stuff.

It could also be that you and I simply aren’t privy to what is actually happening “the instant” you are waiting for the elevator.

…which makes me wonder how often the firmware in these get updated. Assuming it’s not just a pile of ancient relays and stuff. And if, when they do get updated, the algorithms get improved. Or if the algorithm is something that gets sold to the building and “upgrading” is an actual purchase.

Anyway, I could get a little LLM buddy to look it all up but where is the fun in that?

dbcurtis 6 hours ago|||
Most systems to that. Empty-cab strategy is a programming option in the controller. If all cabs are idle (very rare) they are typically spread out.
rubslopes 6 hours ago||
Yes! I always thought that, when unused, elevators should distribute themselves along the floors, weighted by the floors that use them the most.
JoshTriplett 5 hours ago||
> This counterintuitive result is all thanks to the rebalancing step where every 5 seconds, the system re-optimizes each elevator's path. The kiosk enforces rigidity, you must get in the assigned elevator.

Sounds like destination dispatch would work better if it didn't tell you which elevator to get into until the elevator arrived.

EDIT: already being discussed in the thread at https://news.ycombinator.com/item?id=49125423

clarkmoody 7 hours ago||
One of the most frustrating assignments[1] (2011) in my computer science education was trying to build a better mousetrap for elevator control.

[1]: https://clarkmoody.com/Moody_AgentBasedElevatorControl.pdf

SoftTalker 6 hours ago|
Disk drive read/write algorithms have a lot in common with elevator algorithms. At least they did in the days of physical heads moving across a platter.
oxag3n 5 hours ago|
User experience is not always correlated with metrics targeted by engineers.

I visit a building sometimes with destination dispatch elevators, and with low exposure across multiple years I'm confused every time the elevator I need to take is open behind me.

I once used the paternoster lift in Germany, beats any elevator algorithm efficiency because it's a non-stop "conveyor" with no doors. I still get nightmares about that elevator.

More comments...