Skip to content

Comment on Undo codes for Japanese elevator floor buttonsparent

Comments

Not supposedly, for some definition of “better scheduling.”. Elevator scheduling is hard. It isn’t even clear what to optimize for. It certainly isn’t only #persons/hour or #person-floors/hour, as that could leave people stranded forever at some floors (example: why would an elevator ever make the long journey for the 10th floor to pick up passengers if it always has passengers waiting to move between doors 2 and 3?). “First come, first served” is fair, but may be too inefficient.

Simple example: the single elevator in a building is empty and heading up to the 10th floor to pick up people heading down. If there’s a button press “I want to go up” on floor 3 while the elevator passes floor 2, should the elevator stop at floor 3 to pick up passengers? Probably not, as the passengers might want to go to the 20th floor, and it would be unfair to those on the 10th floor for the elevator to go up to the 20th floor before picking them up.

(corollary: if you see an elevator going in the direction you want to go pass the floor you’re waiting on, that’s not necessarily a bug in the scheduler)

If, on the other hand, there’s a button press “bring me to the 10th floor”, the elevator could stop at floor 3, pick up passengers, drop them off at the 10th floor, pick up those waiting there and go down. That means those waiting on floor 10 have to wait a bit longer for the extra stop on floor 3, but efficiency in #persons/hour or #person-floors/hour goes up.

It's probably more important for the elevator to behave predictably. Assuming everyone waiting for the elevator knows where it is at

1. it should always stop if it's going in the direction you want to go.

2. All people inside the elevator must be dropped off before changing direction

Those two combined means people will sometimes have to be dropped off at a floor they don’t want to go to. Are there elevators that do that? I’ve never seen one.

I guess that may be because it would require the elevator to inform the passengers “we’re at floor ten now. Everybody for floors ten and up, get out”, _and_ the passengers would have to hear that _and_ they would have to listen. It also may mean some floors sometimes get too busy with waiting passengers.

I worked for a few years in a building with these, and after seeing so many apparently inefficient passenger movements, I wondered if useage balancing for maintenance is at least in part what they optimize for?

why would an elevator ever make the long journey for the 10th floor to pick up passengers if it always has passengers waiting to move between doors 2 and 3?

It's not that hard. One creates a cost function for each floor. The cost for a floor is the time spent since the button for that floor was pushed. The elevator goes for the floor with the highest cost.

It's the same idea with traffic lights. Have a cost function which is the wait time for each car. Minimize it. Of course, traffic lights never do this, resulting in grossly inefficient light changes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.