电梯.网络资料(Elevator. Network information).doc
文本预览下载声明
电梯.网络资料(Elevator. Network information)
mark
Personally, the elevator cant smart Aleck make too many optimization, otherwise it will be the elevator scold, they feel you this elevator is not regular, because they dont understand you the complex algorithm.
Rules:
1. Call the elevator for idle state. If multiple idle elevators are idle, the most recent ones are called.
This is the only rule with multiple ladders.
If A ladder is in the process of picking up A passengers armour, ladder B passes by the floor of the passengers armour before A arrives, and the direction is in line with the one, then the A rides B and the ladder stops automatically.
1. Come and go
Dont look at the distance, see the sequence. Whoever comes first, whoever comes first, gets the first. Passengers can be in and out of the respective floors.
Dont swerve halfway.
If the elevator starts upward, it should go to the highest floor request (inside and outside), and the same logic begins. In other words, never let a passenger turn in an elevator (go up, down, or vice versa).
When there is no one in the ladder, the lamp automatically dies.
For example, if I go up to the 12th floor, you go up to the sixth floor, but I and you are out on the 6th floor, the elevator should stop on the 6th floor, and the 12 lights will go out automatically. (assuming no other requests)
The problem is not complicated.
I can use [0] to throw a board brick [0] to report management TOP
shan_ghost
Rating:
9 / f. : 06-06-21 12:42:24 ha ha, the upstairs summary is good. Its much clearer.
Im going to make a general design that I do. Its not a graphical interface, including comment 1000 code.
1. Elevator (or elevator module, if used in c)
This class is responsible for individual elevator control.
Interface: 1. Emergency alarm (this feature is not to be said)
Locking (the elevator is unusable)
3. Unlock (to clear the elevator)
4. Set the parking floors
5. Cancel the berth (the two modules are called by the user button)
6. The consumpti
显示全部