76 comments

[ 1.8 ms ] story [ 159 ms ] thread
this is the kind of esoreric topics I love, and come to HN for
Interesting video.

I've often wondered what the most optimal elevator algorithm is. Imagine a scenario where a single person calls an elevator to go down, and just as they get in, a group of five people on the floor above also call the elevator to go down. We all know that the elevator would go straight down and then come back up for the people who called the elevator too late.

The elevator could actually save time by letting the person on the lower floor board, going one floor up, and letting the group board before going back down. The algorithm could factor in the number of people waiting on each floor, the time taken to travel between floors, and how many people are already on the elevator into account to optimise its route.

With multiple elevator shafts there's even more things to think about. Could one shaft serve a lower set of floors while another shaft serves a higher set of floors to minimise 'wasted' time travelling up and down? Could the algorithm take into account the time of day and the ingress/egress of people from the building? Is there a specific floor that's 'hot' and could be prioritised?

I guess the two numbers to optimise for are wait time and travel time and there will be some tradeoffs.

edit: One more thought. Time taken to travel between floors is probably not even close to linear. The elevator has more time to accelerate for greater elevation changes.

> Could one shaft serve a lower set of floors while another shaft serves a higher set of floors to minimise 'wasted' time travelling up and down?

“Shafted” is how the guy already in the elevator would describe the elevator going up to get the group when he wants to go down.

:) maybe. The guy already in the elevator would surely benefit from this one day too.
What would be worse than that is being on a low floor needing to go to a high floor or vice versa and someone getting on and pressing all the floors inside the elevator so it has to stop at each and every floor.
If I remember the story correctly, the creator of Sim Tower[0] wondered the same, and discovered that the algorithms governing that were closely-guarded secrets. So he developed Sim Tower.

[0] https://en.wikipedia.org/wiki/SimTower

So, somewhat related. Is there a way to play Sim Tower nowadays? I regret that I never got that last star, and think about it once or twice a year.
Try https://infinitemac.org/

Pick a System Software/Mac OS version (you probably want something like 7.5), then choose the SimTower disc from the CD-ROMs drawer at the bottom of the screen.

This has blown my mind, thank you.

...but:

  The emulator encountered an error:

  Could not load disk chunk /CD-ROM/aHR0cHM6Ly9hcmNoaXZlLm9yZy9kb3dubG9hZC9TaW1Ub3dlck1hY09TL1NJTVRPV0VSLmJpbiNNT0RFMS8yMzUy/172097536-172228608.chunk#1313: HTTP status 500: ()
> algorithms governing that were closely-guarded secrets

Do many lifts have fancy algorithms in practice? I don't think I've ever had one go backwards to pick up a nearby floor, for example.

I suppose optimising where the lift loiters while empty is something I wouldn't really notice happening.

> algorithms governing that were closely-guarded secrets

[citation needed]

I am not sure how you derived that conclusion from the article. The passage seems to imply little else than a company spokesman declined to divulge proprietary information to some random dude who cold-called them.

I know Yoot Saito (creator of SimTower) from my time at Maxis, so I just gave him a cold call out of the blue and asked. ;) I caught him drinking Jack Daniels in a Japanese bar, but he had some time to chat.

He said he once did a big interview with BBC about SimTower (which would be worth looking up and watching if you can find it), and had a friend who worked in the elevator industry, who told him generally about how elevators worked, but much of it was secret and proprietary, so he had to come up with how they worked in the game himself, based on the general ideas he learned and his own experience and imagination.

He also said he's interested in releasing the original source code of SimTower as free open source software, like I did with the original SimCity Classic source code, so I volunteered to help him and find other people who could help. Anybody interested? ;)

https://news.ycombinator.com/item?id=13898895

nodesocket on March 17, 2017 | parent | context | favorite | on: Railroad Tycoon

Somewhat of a competitor, but any Sim Tower fans here? I was obsessed with everything Sim* but especially loved Sim Tower. Maxis was an amazing gaming company and actually my first entry into Macs. My friends dad had a Macintosh II, then classic, then LC, and I would spend hours playing games on them.

xxr on March 17, 2017 | next [–]

Interestingly, SimTower was published by Maxis but developed by OpenBook (later Vivarium), the Japanese developer that would later make Seaman for the Dreamcast.

DonHopkins on March 18, 2017 | parent | next [–]

Yoot Saito just presented a classic game postmortem of "Seaman" [1] at the recent GDC.

[1] https://web.archive.org/web/20170209192219/https://schedule....

Unfortunately I wasn't there to see it, but I saw him talk earlier about Seaman at GDC 2000, and it was fascinating to learn how he was able to pull off such an unprecedented original design, even supporting speech recognition on the Dreamcast!

Announcement: Yoot Saito is coming to GDC 2017 to present a Classic Game Postmortem of Seaman! [2]

[2] http://www.gdconf.com/news/yoot-saito-coming-gdc-2017-presen...

"Yutaka "Yoot" Saito, the talented game designer known for his idiosyncratic approach to game development, will be delivering a Classic Game Postmortem on his remarkable Dreamcast game 'Seaman' at GDC 2017! Saito's game development career took off in the early '90s when he created the game that was published by Maxis as 'SimTower', but it was after he founded his own studio Vivarium that he really came into his own. Under the Vivarium banner, Saito developed the groundbreaking virtual pet game 'Seaman' (lending his own face to the titular Seaman), its striking sequel 'Seaman 2', the pinball strategy game 'Odama', and the airport baggage management puzzle game 'Aero Porter'. Now, Saito is coming to GDC 2017 to speak at length about his work creating 'Seaman', a game that left an indelible mark on the fabric of both the game industry and pop culture at large. Don't miss it!"

I just found the video of his GDC 2017 talk: Classic Game Postmortem: 'Seaman'! [3]

[3] http://www.gdcvault.com/play/1024327/Classic-Game-Postmortem...

And here's a review and summary of his talk. [4]

[4]

> I am not sure how you derived that conclusion from the article.

I didn't. I was saying I was trying to remember the story.

You may enjoy this. I lose a couple of days to it every time I remember it: https://play.elevatorsaga.com/
This is amazing, thanks. If Zachtronics released a game like this I'd never be seen again.
> Could one shaft serve a lower set of floors while another shaft serves a higher set of floors to minimise 'wasted' time travelling up and down?

That's actually completely standard for very tall buildings, and of course the shafts that e.g. serve only the higher floors don't go all the way down, because the space used by elevators becomes an even bigger problem than the travel time as buildings get taller.

Another option to increase capacity is to have double-decker elevator cars that serve different floors.

There were discussions to put multiple cars in the same shaft. Obviously there are some complications.
What are you optimizing for? Median? Mean? 99th percentile?

Also, people will try to "beat" the algorithm, especially if they have to wait the same amount of time on a barely trafficked floor as people on the busy "hot" floor... kindof like how cars will zip back and forth in mild traffic jams trying to find the "faster" lane.

It's probably better to just have a simpler, predictable system.

The trouble is that the call button doesn't indicate how many people want to go in a given direction, just that there's more than zero with such a desire.

If you could get people to input perfect information about where they wanted to go (ideally on the way to the elevator lobby, before having arrived there), much greater optimization would be possible.

I was thinking about the problem more from a theoretical standpoint, but you could fit an elevator system with a 'people counter' on each floor.
Interestingly my building already require that information before using elevator. I wonder how efficient this building's lift actually becomes.
Most modern buildings (2008+) don't have up/down buttons anymore, instead they require each person to input the exact floor they want to go to on a keypad. It's called "destination dispatch".
This is true on the main landing, but often all the floors above just have simple up/down buttons and you select a floor once inside.
AI with a camera could give close to perfect information on how many boarded/left on each floor. Maybe it could even identify VIPs like medical personell and give them priority. Of course someone will eventually try to put a subscription model on it.
I've seen elevators exhibit queue starvation behaviors when everybody in the hotel is trying to leave for the same event on time
Concentrated harm and distributed benefit is a recipe to have a few vociferous complainers and many silent beneficiaries.

People who believe they've suffered a grave injustice will be much louder.

The best algorithm and least complaint-inducing algorithm are distinct.

(comment deleted)
> Concentrated harm and distributed benefit is a recipe to have a few vociferous complainers and many silent beneficiaries

A fascinating example of this with queuing humans is the Disney Fastpass system (1). I think the real design goal to avoid "complainers" is to try and optimize the wait time for your resource to avoid a bimodal distribution and try and spread it out for the average rider, rather than make wait times worse for the majority of people but better for the people who game the system.

(1) https://www.youtube.com/watch?v=9yjZpBq1XBE, yes this is an 1:45 long video on the history and a simulation of Disney parks, but its worth the payoff.

The "harm" in this case is potentially a few seconds added to an elevator ride. I think there is another psychological effect to consider. Once you've boarded an elevator, you're no longer really 'waiting'. Even if an elevator takes you on a longer trip than necessary it might not be as annoying as a longer elevator wait. And ultimately, elevators are not ran by democracy. If the algorithm benefits thousands of employees in an office then any complainers will probably be told to shove it by the office staff.

Nobody likes being stopped at a red traffic light but we all understand they're a necessary evil so we don't crash and kill ourselves.

Unless the C-levels complain, then the algorithm will be changed to make them happy.
On the other hand, drivers sometimes take absurd risks to save what amounts to a few seconds at most. You better believe people will complain if that wait is imposed on them after they get to the button first.
(comment deleted)
> With multiple elevator shafts there's even more things to think about. Could one shaft serve a lower set of floors while another shaft serves a higher set of floors to minimise 'wasted' time travelling up and down

Yes. This is done, that is they start from bottom floors and then just don't stop at lower floors. Thus not needing to accelerate or deaccelerate.

One more fun trick is double decker cars. That is one deck of elevator only stops at even or odd floors. This being easiest way to double capacity.

Easiest and fastest solution: Pater Noster lift.
Interesting idea but comically unsafe.
Perfectly safe. As long as you get off at the last floor of course, lest you end up in The Backrooms.
There was one at the university (in the UK) my Dad worked at that was used for years with zero incidents.

Lots of things from chain saws to hover mowers, or cars for that matter, are unsafe if not used with due regard for safety.

for 3 years i worked in a building with one. it was the best part of coming in in the morning and super fun. no accidents that i noticed in the time i was there.
The classic joke is to tell people "you go upside down at the top" and watch them come back down standing on their heads (its actually a mechanism which preserves the up direction as they circuit round)

Was popular in the UK university system: there were paternosters in Leeds uni and in Napier College Edinburgh in the 70s and 80s.

Hmm... about 15 seconds per floor (judging from Wikipedia video), times 118 floors = half hour to get to the top! I guess still faster than taking the stairs...
You can run it easily 10 times the speed :-)
“When we build a skyscraper like this, it lasts essentially forever”

What is the lifetime of a skyscraper? There will be a moment when we’ve lost the engineering calculations and procedures, right? It’s not like an airplane where a D-check means you defurbish and refurbish to control the sanity; and concrete has a limited duration.

With so many skyscrapers built in the recent years, will we see some topple and jolt under the pressure?

The lifespan is kind of a complex issue. I think generally they can last for a very long time if maintained. But that often the maintenance costs can exceed the point that it’s worth doing.

Australia has a situation where a lot of public housing buildings are 60+ years old and while still structurally sound, they require refurbishment to keep running well. But the problem is living and buildings standards have progressed so much since construction that even if they were restored to like new conditions, they would still be sub standard.

So it makes more sense to demolish and rebuild.

So, somewhat related. Is there a way to play Sim Tower nowadays? I regret that I never got that last star, and think about it once or twice a year.
I think your best bet would be a VirtualBox with Windows 95-XP on it or using DosBox. However there is an entire sub-reddit dedicated to the game where people have run it like 20 different ways.

https://www.reddit.com/r/SimTower/

In Australia (and I would imagine elsewhere) Apartment complexes have a body corporate which all owners are voting members of, and they have to vote two annual costs: the operating fund, and the sinking fund. the latter has to pay for building maintenance such as painting, and lifts. These are the two notoriously most expensive repairs in the life of a modern building: a complete re-cabling of a set of lifts for even only 10 floors is a million dollar spend.
Why so much? They're important cables, but surely not made of unobtainium and not that rare of a product with the amount of elevators in existence.
Labor, risk and expertise.
We had floods 2 years ago where I live. 20+ apartment complexes lost significant electrics for their lifts, and Thyssen and Otis had 6+mo back order supply issues.

Supply chain logistics behind things like lift parts, puts pressure on pricing. That and compliance. Every inch of a lift cable has to be checked and certified.

(comment deleted)
Reminded me of something I have been thinking about lately: a centralization-cost curve. The engineering problems that go into building things of a certain scale eventually become more expensive than simply breaking up the problem into smaller pieces. It may be much easier and cheaper to build 2 buildings 59 floors high compared to one 118-floor building, but not cheaper or easier compared to 118 one-floor buildings.

Example from tech: Amazon S3 and cloud services in general. They benefit from economies of scale, but only to a certain extent. And I have a hunch we are reaching hard limits on what AWS can handle. S3 in particular may be at a breaking point as I have noticed that the cost and speed of storing data there is now ridiculously bad.

I think this is generally agreed on. Most super tall buildings are heavily state funded and used more of a show piece demonstrating the prosperity and ability of the city. Commercially they just aren’t reasonable.

China for example has stopped building these super tall sky scrapers because it’s far more economical to build lots of 40 level buildings than a few 100+ level ones.

Interesting how these generally accepted principles among “real” engineers are still poorly understood by software engineers. I always knew something like Heroku could never work reliably at a certain scale. The limits and tradeoffs of building something like an S3 are rarely even discussed.
This doesn’t really seem to translate across at all. Widely in software it seems it really is easier and more cost efficient to have a few super platforms than thousands of small ones.

Like Facebook, Reddit, and Discord were able to absorb the hundreds of thousands of old school forums. And they still run faster and cheaper than the sum of all those individual run sites.

For buildings it’s tricky because the additional height and weight create lots of new problems.

Software engineers aren’t in the the same domain. s3 too hard to scale? Scale horizontally, have a directory service (DNS does perfectly fine!), and that’s a lot do the problem solved. It’s tantalisingly poetic and contrarian to try to draw more of a comparison here, but in a software systems context what you’re really talking about is decentralising your state, which is…WELL established as a scaling mechanic already.
I wonder how long the carbon fiber cable lasts? We've got 100+ years of experience with steel cabling, I wonder how carbon fiber compares. When it fails, it'll probably be by snapping. I hope there's lots of redundancy in place!
Multiple cables always. And it is basically epoxy coated flat piece. So I don't think failure model is that bad.
Unlike steel, there is a point at which carbon fiber will suddenly break like if it were glass, and this will happen without external warnings (micro-fractures non visible to human eyes).

In the video one can see in the cable what apparently seems to be metallic layers for this reason. Epoxy would only increase the stiffness and therefore the brittleness.

It is not my field, mere layman point of view then, but I can imagine that the revision of these cables would have to be based on ultrasonic or microscopic scanning to detect such unpredictable micro-fractures. I'm not sure if this cable would be suitable for a place with earthquakes or high winds.

Unfortunately this video just left me craving a 10x deeper version.