One Cool Day Job: Building Algorithms For Elevators
McGruber writes "The Wall Street Journal has an article about Theresa Christy, a mathematician who develops algorithms for Otis Elevator Company, the world's largest manufacturer and maintainer of people-moving products including elevators, escalators and moving walkways. As an Otis research fellow, Ms. Christy writes strings of code that allow elevators to do essentially the greatest good for the most people — including the building's owner, who has to allocate considerable space for the concrete shafts that house the cars. Her work often involves watching computer simulation programs that replay elevator decision-making. 'I feel like I get paid to play videogames. I watch the simulation, and I see what happens, and I try to improve the score I am getting,' she says."
I've been looking for a more sophisticated follow-up to SimTower for a while now. I'd buy Otis Elevator Tycoon.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
https://en.wikipedia.org/wiki/Elevator_algorithm
* Thought that might "pique" a few folks' interests...
APK
P.S.=> However - I'd wager that MOST of you know about this though... Especially the "hardware heads" into hard disk drives!
... apk
I expect the job has its ups and downs just like any other.
I'm guessing that the hardest part of the job is writing code that does not crash, possibly leaving elevator riders stranded between floors, or going up when they want to go down. Over the years Otis must have developed a pretty good elevator usage simulator that plays through millions of possible elevator use scenarios, and tries to find one that either crashes or confuses the system. If yes, the developers responsible for that "possibility simulator" should have been named in the article alongside "The Elevator Algorithm Lady". They should have gotten some credit where credit is due...
Why did the chicken cross the road? Because Elon Musk put an AI chip in its head.
If(weight in elevator if(almost every floor pressed)
{
emit_audio_tone("Hey kid cut that out, people's lives might be at stake because you're playing in a place you shouldn't be playing.");
call_security("Kid pressed all the elevator floor again, go embarrass him to his parents.");
clear_all_floor_buttons();
}
God spoke to me
Was a mathematician really needed for this job:
During the recent $550 million upgrade of the Empire State Building, Ms. Christy was asked whether she could help get more people up to the observation deck. She said she couldn't get more people into a car but could move them up more quickly. So she increased the elevators' speed by 20%, to 20 feet per second. Now the cars can rise 80 floors in about 48 seconds, 10 seconds faster than before.
Isn't making the elevator go faster a job for an engineer? Does one really need to be a mathematician to know that a faster elevator moves people faster?
It certainly doesn't when it's expressed in feet per second.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
http://www.modelint.com/download.html
Executable UML The Models are the Code:
Elevator Case Study
http://www.amazon.com/Executable-UML-A-Case-Study/dp/0970804407
... say "I feel like I get paid to play videogames." That basically says "please cut my salary by $30,000.00"...
... when elevators can move in more than one plane: 10 PRINT CHR$ (205.5 + RND (1)); : GOTO 10
It must have been something you assimilated. . . .
What do you mean improve the score?
You mean the programmers aren't even capable of solving the problem of finding the best solution?
Even if it's NP-complete, it's not like there are so many elevators that you can't find the best solution in reasonable time.
one certain Aerosmith song on it.
https://app.box.com/WitthoftResume Code: https://github.com/cellocgw
Rumour has it that Otis have (or at least had) a UK office in the town of Reading (for our American cousins, the town is pronounced "Redding").
Their receptionist answered the phone with "Hello, Otis Reading?"
Multiple forced door closings when people hold the door open to chat.
Second most needed optimization:
Give me an ETA so I know when I'd be better off taking the stairs.
Most annoying feature that needs to be removed (some elevators):
If you'd manually hold the door for someone (those door open buttons are hard to find in a hurry sometimes. I believe there's even a paper on it), the door would then close v_e_r_y s_l_o_w_l_y while beeping reproachfully at you. The last thing I need first thing in the morning is passive-aggressiveness from a machine.
They have a built-in weight sensor, how come they don't know when they're full? At rush hour, elevators are always full and they still stop on every fucking floor because especially at rush hour, there are always people waiting outside. And of course nobody can get in and nobody wants to get out. That's hardly an optimization conundrum, it's sheer stupidity.
In the article she says the main goal is to minimize waiting time. But isn't the time you spend in the elevator also waiting time, and isn't that much less comfortable than waiting outside? So the primary goal should be to minimize the length of a ride, not to minimize pre-boarding waiting time. If the waiting time before the elevator arrives exceeds 20 seconds or (more realistically) 5 minutes and you're not disabled, you can still choose to take the stairs, which means you're doing something for your health and the others have a faster ride, win-win.
An ELEVATOR PROGRAM written without the use of a LOOP, VARIABLES, and without very complicated SYNTAX.
You will most commonly find it in large urban areas like NY and Chicago. In the Midwest where I worked in the elevator business, it's rarely a requested feature because folks aren't in such a rush in general.
"Do the Right Thing. It will gratify some people and astound the rest." - Mark Twain
single floor runs and for multi-floor runs. Yes, the faster the car is running, the longer the slowdown distance since smooth acceleration and deceleration are desirable.
"Do the Right Thing. It will gratify some people and astound the rest." - Mark Twain
We rate elevator speeds in feet per minute. A typical small hydraulic elevator will run 100 FPM. A high-rise express car may get up to 1,500 FPM.
"Do the Right Thing. It will gratify some people and astound the rest." - Mark Twain
Does it also simulate who farted?
Custom electronics and digital signage for your business: www.evcircuits.com
I don't think there's any intelligent code running the elevators in my building.
I live in a 14 floor apartment building. I frequently come home in the evenings to see both elevators just chilling idle on the 14th floor....
It makes me want tear my hair out.
The elevators in the high rises I work in don't seem to have these problems. The building I specificlaly work in most of the time has 6 elevators though so its less of an issue though.
You can tell how powerful someone is by the magnitude of the crime they can commit and be able to get away with.
Those that do, are usually set at around 75% of rated capacity. When load weighting is activated, the car should ignore hall calls, but, obviously, cannot ignore car calls.
"Do the Right Thing. It will gratify some people and astound the rest." - Mark Twain
Yes, pre-microprocessor, relay logic elevator controllers. I see lots of them that were put in 40+ years ago still working and doing their job after all these years.
"Do the Right Thing. It will gratify some people and astound the rest." - Mark Twain
I'd like to hear her comments on people that press the up and down buttons when they simply want to go down. It irritates the hell out of me because I believe this practice increases the average travel time for people already on the elevator as well as the impatient double-button-pusher himself.
For example, say someone on floor 6 (who wants to go to the ground floor) presses both buttons and then gets on while the elevator is on its way up. The extra delay caused by the unnecessary stop at floor 6 means, statistically speaking, that people on floors 7 and up will have more time to summon the elevator before it reaches its highest floor and eventually descends to floor 6 again on its way to the bottom.
When the double-button-pusher issues their goofy "Oh, I'll just get on for the ride ... " comment, I frown menacingly and stare at them for the duration of the trip.
I just read about someone who did his dissertation on elevator dispatching algorithms here. The full dissertation is here: Heuristics in dynamic scheduling: a practical framework with a case study in elevator dispatching.
Is that the resting place of the diskdrive head probably doesn't vary (like you describe for start of workday, lunch, & of course, quitting time - moving it to the most optimal spots during certain daily time periods).
Afaik? The HDD tends to try to keep the read-write heads in the CENTER of the disk (or rather, center of the filemass (moved to outermost fastest tracks with defraggers for fastest access/seek due to larger rotational diameters)).
You can't "move" the MFT$ (master file table) & certain other system files during usermode after all!
(At least NOT during usermode access to accomodate for times it *MIGHT* be different for differing work patterns (say you work @ home, & do your work the 1st 8 hours you wake up, & then the rest is family usage, your leisure, etc./et al)).
However, with NTFS & probably other modern filesystems?
MFT$ is placed in the MIDDLE of the "filemass" though for "optimality", since it's needed for file accesses of any kind (time of access stampings too, etc.) & then binary search patterns (like NTFS uses in b-tree seeks) do the rest!
I find this algorithm pretty amazing & VERY "common-sense", & that elevator algorithm & its variants, do one hell of a good job on QUEUEING UP REQUESTS, & then issuing them in the order the disk drive head passes over the areas concerned, in the most efficient order possible.
1 of its variants use 2 buffers (1 = currently being serviced requests, & 2 = upcoming requests to service): THIS seems like the smartest way to go about it imo @ least.
* Anyhow/anyways - I didn't think you were being a jerk, I hope you feel the same way regarding myself...
(Actually? I thought you offered some decent enough points, but you MUST ADMIT, the algorithms here are AMAZINGLY similar & I didn't SAY they were the "exact same" either)
Plus - I'd wager since the one for HDD's is named "Elevator Algorithm", the harddisk folks GOT THE IDEA from folks like this lady!
APK
P.S.=> Lastly - Sorry: Not "graduate level student"/postgrad/postdoc etc., in CSC!
I got the AAS 60 credit hours outta the way & went to work in the field as a programmer back in 1994 onwards!
(I've been "chipping away @ the stone" since then, & am 90/120 credit hours into the B.S. in CSC currently, taking coursework here and there as time & money permit)...
... apk
The lift (UK speak for elevator) I have at work is reasonably sensible - there's only 4 floors in the building, so it tends to keep one lift on the ground floor and one on the 4th floor when idle. However, I had a few fun things happen:
* All the lights went out in the lift as I was travelling in it, but it did get to the right floor and open the door.
* The computerised voice announced "floor five" one day, which is creepy when I got off at the top (4th) floor!
* The lift voice frequently says "please mind the doors" and then does nothing for 5 seconds before repeating the phrase again and only then begins closing the doors! Other times, it'll start closing the doors as soon you press the button and half-way through the closing it then pipes up "please mind the doors".
* I've had the alarm test for the building go while I've been in the lift and the voice announced "fireman has taken control of the lift and it's returning to the ground floor", which at least it duly did.
I think the only thing I would say is regularly unpleasant is that the lifts we have are quite small and I suspect several of our staff avoid them because of claustrophobia (it's easy to avoid them if there's only 4 floors of course).
The elevators in my building are user-hostile. Door closing delays set so short that if the first person isn't fast, they'll close after the stream of people leave but before the first person enters. And while they won't actually cut you in half (that I know of), they will give you a bruise if you go in while they're closing. One elevator goes both up and down from the lobby but has no indicator for which way it's going. The annoying door beeper has no delay; it beeps whenever anyone is in the doorway. They frequently break down. All in all, exactly what you'd expect from NYC elevators.
Which brings me to my ideal retirement job. I'd love to maintain the software.... for escalators.
Elevator pseudocode is the heart of many a CS course. And CS courses were promised to be devoid of practical application.
Another constraint that she may be considering is power efficiency - there may be tradeoffs between minimal wait time, etc. and power consumption, and the electricity cost for lifting an elevator car many times a day is not going to be negligible.
fencepost
just a little off
They need to release some kind of upgrade for existing elevators. At my office building of 35 floors with Otis elevators. When an elevator is already stopped at a certain floor. Instead of opening the door immediately when you press a button, the elevator leaves immediately and you need to wait forever for another elevator to arrive since the other elevators think you've already left. The solution is then to press both up and down buttons, irritating the hell out of every one in the building.
I like to think that when the elevator doesn't show signs of coming to my floor, and I repeatedly push the button, that someone on a different floor and moving too slowly is caught in the doors :)
I love when I see third world people push the down button when they want to go up!
Organization: alphabetical, sometimes numerical or messy
I wonder if she has ever had to deal with people using her elevators to kill people? And does it call her Mom? https://www.youtube.com/watch?v=UKBKjepmsOE
* Saw this a year or two ago -- a two-storey elevator car:
o Double the carrying capacity
o Stops at adjacent floors, e.g in the Empire State Building, would open its two sets of doors at floors 1 and 2. Close all doors, haul up to observation deck floor and , open doors.
+ In this scenario, everyone has to walk one flight of stairs: Either at the bottom or at the top when going up, and likewise when going down.
* Heck, even a triple-storey elevator car could make sense at the ESB where there is no optimization to do. One shaft, 3x the capacity.
* Again, not my idea, but not Otis' either.
you are hilarious. the ladies must love you.
They're made by Otis and their decision making is horrible. I'm on the third floor and I've seen the car come from the basement when there's two closer to me. On occasion there's one on the same floor!
Chewbacon
The Bible is like Wikipedia: written by a bunch of people and verifiable by questionable sources.
It's the same concept. If drive manufacturers add more actuators, the algorithms need to change. Unless you make a lot of assumptions, a read is queued and the thread blocks. Meanwhile the next task queues a read. Unless you are doing priority queueing and probably even then, you have no idea where the sector needed for the next read is. No point in defragmenting the disk unless it's some single threaded, single user system. So you do the reads in an order that is most efficient for the passengers (tasks) and the elevator (performance, energy efficiency, etc).
Meth kills.
If they could sense that they were empty, with 100% accuracy, you could drive them a lot faster when heading to a call. Hmm, free-fall lifts. Restaurant on top floor, that could be fun.
Why would an elevator in this situation not come down from 5 to 4 if you want to go up? In "park" the software should select the closest elevator, in the absolute sense.
The directional info from the buttons should only be used when the elevator is in use and it matters whether the elevator is going up or down. If, in that case, you call an elevator and don't get in this results in a useless extra delay for those in the elevator.
Well, I might have a way, but it only works on a semi spherical planet in a vacuum.