So You Think You Can Program an Elevator
31–40 of 118 posts
Re: So You Think You Can Program an Elevator
#32A project during my graduate work was to solve this problem. You can read my write up, which includes pseudo-code for the best algorithm I found[1]. Long story short: a simple, rules-based algorithm defeated my best efforts at having multiple elevators working together to coordinate their action. [1]: https://clarkmoody.com/Moody_AgentBasedElevatorControl.pdf
Re: So You Think You Can Program an Elevator
#33Instead of writing just a dummy program we built an actual elevator using servo motors and asked students to code using different logic
1. Single elevator 2. Double elevator 2. Double elevator with various kinds of optimizations (reduce the energy used v/s reduce the time for each passenger).
All had to be done using embedded C on an ATMEGA processor.
Then we let students do the exact same coding using Esterel where you essentially represent everything as the state diagram.
It was so much fun for bother teachers as well as students because when you deal with real hardware suddenly the scope of problems goes beyond merely getting the logic right.
Re: So You Think You Can Program an Elevator
#34Re: So You Think You Can Program an Elevator
#35This was was posed as the the first homework assignment in my first undergrad CS class (15 years ago). I don't think a single person managed to do it. It's a classic example of a problem that you think is appropriate to throw at new programmers but find out it goes terribly wrong because the hard part is designing a suitable state machine first. If you just start coding without a full model that covers all the edge c…
Re: So You Think You Can Program an Elevator
#36Re: So You Think You Can Program an Elevator
#37Re: So You Think You Can Program an Elevator
#38This is both cool and disappointing. I'm sure this is more challenging than it looks, and it's cool to see emergent complexity from a (seemingly) simply set of conditions to satisfy. However, the reason I think about elevator programming isn't to make an elevator behave the way they do today. It's to make an elevator behave better than they do today. For example: * I don't want an elevator to close and reopen its doo…
Re: So You Think You Can Program an Elevator
#39This is both cool and disappointing. I'm sure this is more challenging than it looks, and it's cool to see emergent complexity from a (seemingly) simply set of conditions to satisfy. However, the reason I think about elevator programming isn't to make an elevator behave the way they do today. It's to make an elevator behave better than they do today. For example: * I don't want an elevator to close and reopen its doo…
Also, there might be more than one criteria to optimize for.. shortest travel time? fewest moves?