What am I doing wrong? for(elevator of elevators) { elevator.on('idle', () => { //do some logic with elevator }) } It only seems to run for the second elevator rather than both of them?
Elevator Saga: An elevator programming game (2015)
51–60 of 103 posts
Re: Elevator Saga: An elevator programming game (2015)
#52What am I doing wrong? for(elevator of elevators) { elevator.on('idle', () => { //do some logic with elevator }) } It only seems to run for the second elevator rather than both of them?
The other thread is the same answer but for a slightly different case
Re: Elevator Saga: An elevator programming game (2015)
#53I always wished elevator buttons could toggle. If you accidentally press the wrong floor, just press it again to cancel. This may not work in all situations, but in some situations, it could be a time saver.
There are not buttons in this style of elevator other than door open door close and call for help.
Re: Elevator Saga: An elevator programming game (2015)
#54During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
During COVID I think it's totally reasonable for any person to be able to set the elevator as "full" - if you're returning from travel and quarantining, immunocompromised, etc. you might not want to travel with anyone. Also, * Elevator door closes when it's not in use - may as well stay open, get some ventilation, and use slightly less energy!
Sadly, in an apartment building there are several people who are selfish. These types would use the feature to monopolize the elevator for moving.
> door closes - stay open?
Prob to reduce the time to travel to a floor. If the doors were open it would add another 15secs in addition to the travel time to reach the called floor.
Re: Elevator Saga: An elevator programming game (2015)
#55During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
Re: Elevator Saga: An elevator programming game (2015)
#56Made me remember an interesting anecdote: During my PhD at Purdue I had the good luck to take the Pattern Recognition (nowadays would be called ML) course from Prof. Fukunaga, one of the pioneers in the field ( https://en.m.wikipedia.org/wiki/Keinosuke_Fukunaga ). In one of his classes he mentioned that years ago a company came to him, requesting his expertise in optimizing movement of a bank of elevators. He thought…
Re: Elevator Saga: An elevator programming game (2015)
#57elevator.goToFloor(1); elevator.goToFloor(2); elevator.goToFloor(0);
That (or a slight variation) works for the first couple of levels. Then it gets harder.
The next level required no passenger to wait longer that a certain amount of time, and I would have had to trash half my program, so I quit for now.
Re: Elevator Saga: An elevator programming game (2015)
#58Earlier quoted context omitted.
>which floors the elevators idle at... I recently spent 4 months in hospital which left me with an amount of time to kill in an attempt to stay sane. One of the games was trying to get places I was technically allowed but really shouldn't have been ("sod your 'no public access' signs, in not public, I'm an inpatient!"). Being confined to a wheelchair made the game a bit more difficult. One day one of the ward staff m…
Hopefully you don’t have to spend the time again - but if you do it’s very easy to buy the fireman’s key on eBay. You didn’t hear that here.
And since this thread is about elevators, I have to also mention another video of theirs: https://www.youtube.com/watch?v=ZUvGfuLlZus
Re: Elevator Saga: An elevator programming game (2015)
#59Made me remember an interesting anecdote: During my PhD at Purdue I had the good luck to take the Pattern Recognition (nowadays would be called ML) course from Prof. Fukunaga, one of the pioneers in the field ( https://en.m.wikipedia.org/wiki/Keinosuke_Fukunaga ). In one of his classes he mentioned that years ago a company came to him, requesting his expertise in optimizing movement of a bank of elevators. He thought…
There is this anecdote in the text "Operations Research, An Introduction." by Hamdy Taha, which I consider to be a very good example of picking the right tools for the job. An OR group was hired to fix elevator wait times in an office building. After studying the problem they installed full-length mirrors at the entrance to the elevators. Complaints around elevator service disappeared as people were now engaged in wa…
Re: Elevator Saga: An elevator programming game (2015)
#60I wish my knowledge of JavaScript was more than “programming language that’s not Java” so I could actually play this.
Could anyone recommend an online introduction to JS so I can attempt to play this?
I’m more of a bash guy.