Last active
November 15, 2019 13:59
-
-
Save rankitranjan/6e81564acc32bc53d5ed8dbec5b3c79c to your computer and use it in GitHub Desktop.
question1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think from personal observation that most of them do: | |
1) Start going in the direction of the first button pressed, keep track of which direction we're going | |
2) When a floor is reached and that button was pressed, stop and open the doors, mark the buttons for this floor as | |
not pressed anymore. | |
3) If there are still more floors that we need to visit that are in the same direction, keep going in that direction. | |
If not and there are still floors we need to visit, move in that direction. (with help of cameras we can avoid this | |
scenario, if lift is empty), If not then we're done and will start at 1 when a button is pressed again. | |
Note that many elevators have buttons "I want to go up" and "I want to go down" next to the doors instead of a | |
single button. The algorithm only needs a small change: in 2, if the only button pressed for that floor is one of the | |
buttons next to the door, only stop and open the doors if we are going in that direction. Possibly keep the button | |
pressed if the doors open because of a button pressed inside the elevator and it is going in the wrong direction. | |
You never have to figure out an entire path, just in which direction to go next. | |
=> With the help of cameras we can decide, which lift is nearby to passenger to serve and which direction is lift | |
is going. Based on this observstion we can find which lift need to go and serve the passenger. By this way we can | |
minimize the passenger waiting time and serving time. | |
Use case: | |
Lift Calls: This use case includes several scenarios, which will be described in detail in later sections of | |
this paper. These scenarios includes that the elevator receives lift/car calls from the passengers once the camera | |
verifies the object, turns on or turns off the light of lift/car call buttons, updates the record of lift/car calls | |
stored in system controlling parts, etc. | |
Move/Stop the Car: The main function of an elevator will include the changing of driving speed, how to make the | |
decision of stop, and driving directions of the lift/car. | |
Indicating Moving Direction: The elevator should have this mechanism to let the passengers know the current | |
moving direction of the car such that the passenger might decide whether to enter the car or not. | |
Indicating Car Position: Similarly, the elevator should let the passengers know whether his/her destination floor | |
is reached so that the passenger may decide to leave the lift. | |
Open/Close the Doors: The elevator should be able to open and close the doors for the passengers to get in and out | |
of the car. The functional areas of this use case should also enable the passengers to make door reversals when | |
the doors are closing and the passenger wants to get in the car. | |
Trigger Emergency Brake: There is safety mechanism within the car to make sure that an unsafe state is not | |
transiently generated. | |
Classes/Objects: | |
ElevatorControl: The central controlling object in the elevator system. ElevatorControl communicates and controls | |
all other objects in the system. | |
Door: There are two doors in the system, the “god” object — the ElevatorControl — command the doors to open and close. | |
Car/Lift: The car is being controlled to move up and down (in different speeds), to make stops at floors when necessary. | |
Button: The ElevatorControl class also controls the button class, which further generalizes two subclasses Car | |
Call Button. The control object communicates with the Button objects, get the information whether a button is pressed | |
and in turn controls the illumination of Button lights. | |
Indicator: There are two kinds of indicators in the system, the CarPositionIndicator and the CarDirectionIndicator | |
(i.e. the CarLantern). The indicators are controlled to show the information about the current position and moving | |
direction of the car. | |
Safety: Whenever an emergency happens, the ElevatorControl commands the Safety | |
DoorControl: controls the action of DoorMotor. DoorMotor can be commanded to open, close, or make a door reversal. | |
DriveControl: controls the elevator Drive, which acts as the main motor moving the car up and down, and stopping at | |
floors when necessary. | |
LanternControl: are in the number of two, CarPositionIndicator and the CarDirectionIndicator. | |
CarButtonControl: is one for each floor and all locate in the lift/car. The CarButtonControl accepts CarCallButton | |
calls and is in charge of turning on/off the corresponding lift/car call lights. | |
CarPositionIndicator: gives value to the CarPositionIndicator so that the passengers might know the current position | |
of the lift/car. | |
Dispatcher: does not control actual elevator components, but it is important in the software system. There is one Dispatcher for | |
each lift/car, whose main function is to calculate the target moving direction and destination for the lift/car, as well | |
as to maintain the opening time for the doors. The Dispatcher interacts with nearly all the control objects in | |
the system except for LanternControl. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment