-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
People not getting on elevator #18
Comments
I noticed it too. I think it's because the users (passengers) will only enter an elevator upon the "entrance_available" event emitted by elevators. This event is triggered when an elevator "arrives" on a floor, not necessarily from another floor. So if the elevator is just standing still on a floor, it doesn't emit any events, and the user doesn't get on. Not sure how to best solve it. |
My solution calls goToFloor(), regardless of whether or not the elevator is currently on that floor (assuming that it's not already going there). This approach seems to prevent any idle elevators. |
I didn't notice this yesterday, now I do. Maybe the elevator is not opening its door and that's why people don't get in? :) |
+1 |
It seems like there are certain cases where people will not get on elevators.
This is the simplest way to reproduce it that I've found:
Adding
elevator.goToFloor(0);
to the idle event will make them get on.The text was updated successfully, but these errors were encountered: