Elevator Dispatch
A new office building is available, with a total + floor, there are four elevators, all elevators basic parameters are shown in the following table:
Elevator number |
Service Floors available |
Maximum number of passengers |
Maximum Load weight |
1 |
All floors |
10 |
Approx. |
2 |
Single layer |
10 |
Approx. |
3 |
Double |
20 |
Approx. |
4 |
All floors |
20 |
Kg |
the terms of use are as follows:
1, the floor number is 0~20, of which 0 is the basement layer;
2.elevators with floor restrictions are not docked in the response floor, such as a single double layer;
3, all elevators with unified button control
please design and implement an elevator control program according to the above requirements, if there is a graphical display is better.
I have the following ideas about this problem, the shortcomings of the trouble points out that I can better solve the problem
To solve the elevator scheduling problem, there are the following points: 1. Number of floors
2. Number of elevators
3. Lift Load
4. Number of passengers
5. Elevator dwell Time
6. Elevator Stay Floor
These are some of the problems I can think of now, now is to solve these problems, then my elevator scheduling can be said to solve. If you can, also need to add Help button, then elevator problem, the elevator people can ask outside for help.
So I'll design the elevator button.
Elevator interior Floor button: the elevator interior corresponding to each floor of the button to become a floor button, numbered -1,1,2,3,4 ... 20 of the buttons. When the passenger enters the elevator and presses the floor button, the button is grayed out, which means it is not available. This means that the passenger is going to the floor and the elevator will go to the corresponding layer. When the elevator arrives at the layer, the button recovery is ready to use the status.
Elevator interior Door Button: When the elevator reaches the passenger wants to go to a certain floor, passengers need to prepare to leave the elevator, when the elevator stops steady, passengers can press the door button, elevator doors open, let users leave. If the elevator to the passenger has pressed the floor, but no passengers press the door button, the elevator will automatically after 1 seconds after the shutdown automatically open the door.
Elevator door Close button: When all the passengers who want to take the elevator enter the elevator, ready to let the elevator start running, passengers need to press the closing button, so that the elevator doors closed, so that the elevator into the operating state. Set the automatic closing time for the elevator to 8 seconds.
Elevator Internal Help button: When the elevator problem, the passenger Press this button, then the monitoring room will have to show that the elevator has a problem, need help.
Elevator external up button: This button indicates a request to go upstairs, when this button is pressed, if the elevator reaches the floor where the button is pressed, and the elevator is running upward, then the elevator will stop and automatically open after the elevator stops and the request is answered and the request signal is canceled.
Elevator external down button: This button indicates downstairs request, when this button is pressed, if the elevator reaches the floor where the button is pressed, and the elevator is running downward, then the elevator will stop and open automatically after the elevator stops, and after this request is answered, cancel the request signal.
I now need to put these buttons after the algorithm to complete whether it is possible, I hope you can help think about, there is no shortage.
For the idea of elevator scheduling