Elevators
电梯
HN 851 分 · 215 条评论 · 作者 Jrh0203 · 来源 john.fun · HN 讨论
【摘要】
Elevators are far more complex than they appear, with sophisticated algorithms determining how they respond to button presses.
电梯远比表面看起来复杂,其响应按钮按下的方式依赖于精密的算法。
The simplest algorithm is SCAN (patented in 1961), where the elevator travels from the lobby to the top floor and back, stopping along the way. The LOOK algorithm improves on this by only traveling as high as the highest requested floor before reversing.
⋯ 继续阅读请登录会员 ⋯