Elevator Riddle-Kevin James

Step 1- Go up or down to the First Call button received

Whenever stopped on a floor, open door for 15 seconds. If something is in the way of the door closing, keep them opened for 5 more seconds.

Step 2 – If a new Call button is pressed along the way to that first passenger, only stop if you have not already passed that floor AND if the passenger is heading in the same direction as the first passenger.

Step 3 – Once you have picked up the First Call passenger, take them to the destination on the floor button.

Step 4 – If the passenger is going down, stop at floors where the Call button has also been pressed Down along the way. If the button is not along the route, continue to drop off the current passengers.

Step 5 – When there is no more Floor buttons pressed from inside the elevator, repeat steps beginning at Step 1.

This entry was posted in Riddle. Bookmark the permalink.

3 Responses to Elevator Riddle-Kevin James

  1. davidbdale's avatar davidbdale says:

    These statements for the most part accurately describe the current situation, but they ARE NOT:
    A set of INSTRUCTIONS to an ignorant elevator that needs to be programmed to operate as desired.

    FOR EXAMPLE:
    1. When the UP BUTTON is lit on any floor above where the car is positioned, proceed immediately to that floor, not stopping at any intervening floor.

  2. davidbdale's avatar davidbdale says:

    Check out Sunflower828’s post. It’s closer to the ideal set of Instructions.

    Elevator Riddle- Sunflower828

  3. davidbdale's avatar davidbdale says:

    You made spectacular improvements since my Feedback, KevinJames, but the post was not in Feedback Please, so I didn’t notice until now.

    You clearly understand that the assignment is to write INSTRUCTIONS for the elevator, and that the ELEVATOR is your Ideal Reader.

    You don’t need help with that, but I wrote some sample INSTRUCTIONS to benefit your classmates. They might give you ideas for revision if you want a Regrade. Some examples in no particular order:

    —In response to any CALL button, PROCEED to that floor and OPEN the doors.
    —You have three modes: AT REST, GOING UP, GOING DOWN.
    —When you are GOING DOWN, IGNORE any GOING UP requests.

    Provisionally graded out of gratitude for your outstanding contribution to the project and your effort. You may still earn a Regrade by transforming your descriptions of elevator operations into INSTRUCTIONS written for the elevator (as if the Elevator were your reader and needed to be told how to operate).

Leave a comment