Skip to content

Elevator moves while passengers enter the elevator #105

@adisib

Description

@adisib

An elevator can immediately leave a floor while picking up passengers, causing the passengers to fly into the elevator.

Video demonstration (occurs around 20s):
https://youtu.be/CwGfmZQaLBw

The console output is the current elevator queue when "stopped_at_floor" is fired.

Here I immediately queue up/down presses to summon the elevator, as well as elevator floor number presses to send people out. The queue then organizes itself as they are added, making sure not to add duplicates.

However, in the video demonstration, floor 0 gets added, either before the person at floor 2 presses the button to queue floor 0 when they aren't even in the elevator yet, or by the person who just entered the elevator and shouldn't be pressing the down button to summon it. The elevator then immediately moves away to the next floor in the queue after arriving, resulting in the person flying into it to enter.

I'm not sure what is causing the root problem and do not have a minimal working example yet.
However, the code used in the video demonstration can be found here:
http://pastebin.com/Qwebn09L

Firefox 48.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions