The temperature difference between the inside and outside of your bed causes you to wake up 20 minutes later than usual.
You quickly wash your face and brush your teeth, and hail an online taxi while putting on your shoes. \
You run into the building as soon as you get off the bus after being stuck in traffic for a long time because you will be late for work in 5 minutes.
Fortunately, there are two elevators going up from -2, and you breathe a sigh of relief, thinking you’ll be at your floor in 3 minutes.
You look at the numbers next to the elevator buttons:
-2, -1, 2, 3, 4… . The elevators are full on floor -1…
Drought of drought dead, waterlogging waterlogging dead, which ** designed elevator…
This has happened more than once. Maybe there are 10 elevators running in the elevator, but you wait for 10 minutes and you don’t get them. The elevator countless times from you in that floor through, is non-stop, as if added to the blacklist.
You can’t help but ponder whether it’s a distortion of human nature or a stupid design of the elevator. How exactly are elevators scheduled to meet the demands of different floors?
The same painful experience and meditation eventually became this article: How is the elevator scheduled?
(Easy to read, no math or code involved, please feel free to eat)
There are four basic logic in elevator scheduling, and the fourth logic is mostly used at present. In order to realize the optimal efficiency of single elevator operation, many factors should be considered. And more elevator operation, it will increase the richness and complexity of logic.
The following will introduce:
-
4 kinds of logic for elevator operation
-
How can an elevator operate most efficiently* * * * * * * *
-
How can multiple elevators operate efficiently
4 kinds of logic for elevator operation
1. First come, first served ****
According to the order of passengers’ requests, that is, who presses the elevator first, who is served first. * * * *
Advantages: ************ Fair, fair and open, and each passenger’s request can be processed in turn, no one passenger’s request will not be satisfied for a long time.
Disadvantages: ************ efficiency is very low, meet peak, all queue up, scold a designer together.
Available: No \
2. Shortest priority ****
Service according to the shortest distance. That is, whoever is closest to the elevator serves first. * * * *
Advantages: ************ who is close to the service, compared with scheme 1 to reduce empty running.
Disadvantages: ************ floor is more partial of the students, such as the top of the small partner downstairs to have lunch, and so on the elevator for an hour, but also did not wait.
Available: No
3. Round-trip cycle between the top and bottom layer ****
Runs back and forth between the bottom layer and the top layer, responding to requests in the same direction. That is, up and down the cycle back and forth, there is a way to take, go to the top or bottom and then turn around. A bus is like a bus. **********(1-> 20,20 ->1, so cycle, along the way to bring)
Advantages: ************ a direction, a trip away.
Disadvantages: ************ the elevator must turn back to the end, and the same bus, empty cars must go to the end of the station.
Available: Yes
4. Round-trip between the top and bottom layers (according to the top and bottom layers of the request)****
Is a top and bottom return improvement, between the highest and lowest floors requested by the user. That is, back and forth, up and down, at the highest level of the user’s request, you can turn around. (Similar to 3, except if no one is going to the 20th floor, for example, in this elevator, the highest person is going to the 19th floor, and no one is going higher, then you can turn around and go down at the 19th floor.)
Advantages: ************ on the basis of top and bottom reversion, considering the actual situation, do not have to go to the top/bottom. \
Disadvantages: ************ has to go through requests one at a time, still a bit rigid.
Available or not: Yes, elevators are mostly this logic right now.
The above is the most basic elevator operation logic, in fact, here we have understood the current elevator operation of the general logic, that is, the above scheme 4.
But here we continue to explore optimization points, such as the following two scenarios:
- There is only one elevator, the elevator rises to the 4th floor, passengers go out, the elevator becomes empty, then the 3rd floor and the 20th floor users press “up” at the same time, the elevator should return to take the 3rd floor users, or continue to go up?
- There are two elevators, one from the 20th floor down, one from the first floor to the second floor. A user pressed “down” on the 2nd floor. Which elevator should I assign the task to?
How can an elevator operate most efficiently
1. What is the most efficient scheme?
First define “most efficient” : the shortest total time spent by all users & no one has an extremely bad experience. Total time spent by all users =sum(waiting time of each user + riding time)
That is, the most efficient scheme is to let the algorithm choose the plan with min(sum(waiting time + ride time)). By adding the corresponding time to each small step of taking the elevator, the algorithm can quickly predict the options, the time consuming of each option and the optimal solution. \
2. Is plan 4 commonly used at present the most efficient?
As mentioned above, the elevator is currently widely used in the operation scheme is scheme 4, the elevator up and down the cycle, every time along the way with. Let’s check that plan 4 is not the most efficient.
Take the previous example:
“There is only one elevator, the elevator rises to the 4th floor, passengers go out, the elevator becomes empty, then the 3rd floor and the 20th floor users press” up “at the same time, the elevator should return to take the 3rd floor users, or continue to go up?
– Scheme 4 preferentially processes the requests in the same direction, and the requests from users at the upper 20 layers are processed first. The waiting time of users at the upper 20 layers is very long.
But the shortest total time would be to go back and take the three and go up. In this way, the waiting time of layer 20 users is increased by a little while that of layer 3 users is shortened by a large amount and the total time is greatly shortened.
It can be seen that plan 4 is not the highest, and the highest plan is the one with the shortest total time: choose the plan with min(sum(waiting time + ride time))
3. Why not use the most efficient solution?
Because of this scheme, the elevator would often turn around to pick up people, which would lead to a strange experience for the occupants. For example, I took the elevator from the 1st floor to the 30th floor. When I reached the 10th floor, I received a request from someone on the 9th floor to go up. The elevator returned to the 9th floor and picked up someone to continue going up. My experience is 1->10->9->30. Isn’t that weird?
And the elevator frequently changes direction, will make the occupant difficult to predict the elevator behavior, for the elevator order and safety have interference.
Therefore, at present, the elevator is not generally used for optimal efficiency, but for overall optimal efficiency and experience: the elevator runs in one direction every time, takes along the way, and can only turn around after reaching the highest level of user request.
How can multiple elevators operate efficiently
First, the logic is similar, the elevator runs one direction at a time, along the way, after reaching the highest level of the user request, can turn around. ******** the difference is that not all on the way to take their own, because it is a number of elevators work together, some things do not necessarily need to start their own hands, can be handed over to brothers solidarity and cooperation.
Multi-elevator control, the industry called “group control elevator scheduling”. Group control elevator scheduling is affected by more factors and therefore has more complex logic.
The following content, this article is a more basic introduction to popular science, if you are interested in in-depth inquiry related information.
1. The main objective of teamwork elevator scheduling
Reduce the average waiting time of passengers, reduce the average time of passengers taking the elevator, and reduce the energy consumption of the system
2. Common concept of human flow pattern ****
- Upward rush hour traffic: The main flow direction is upward, such as the company elevator in the morning rush hour.
- Descending peak traffic mode: The main flow direction is descending, such as the company elevator in the evening rush hour.
- Two-way traffic mode: the main flow direction is to a certain floor/from a certain floor. For example, the meeting room of the general assembly is on the 4th floor, and the stream of people from the 4th floor flows into the 4th floor when the meeting is over.
- Four-way traffic mode: the main flow direction is to a certain floor 2 / from a certain floor 2. At lunch time, for example, people flow to the restaurants on the first and second floors.
- Balanced layer to layer traffic pattern: the number of ascending and descending passengers is equal, and the traffic between layers is equal.
- Idle traffic mode: a large number of elevators are empty, such as holidays, late at night, etc.
3. Common scheduling algorithms ****
1) Elevator group control scheduling based on expert system ****
The rules are established with the experience knowledge of experts, and the best route is selected by comparing various possible scheduling paths. That is, listen to the experts. * * * *
Advantages: Rational use of experience-based knowledge that has not yet formed a scientific system.
Cons: Reliance on experts.
2) Fuzzy logic elevator group control scheduling ****
Fuzzy boundary objects and problems are summarized into a series of control rules expressed in the form of “IF” THEN “production. That is, listen to the experts, but this is a rule the experts also feel vague about.
Advantages: Help computers imitate the reasoning ability of the human brain, simplify complex problems.
Disadvantages: No learning function, dependent on experts.
3) Neural network-based group scheduling ****
Artificial neural network is introduced to make the system have self-learning ability. Using nonlinear and learning methods to establish a suitable model, high-speed reasoning, short and long term prediction of elevator traffic. That is, algorithms can learn to evolve based on the situation.
Advantages: Learning ability, can better adapt to the actual situation.
Disadvantages: some logic fuzzy to learn.
4) Fuzzy neural network scheduling ****
Fuzzy neural network combines neural network with fuzzy logic, which overcomes the shortcomings of artificial neural network structure which is difficult to determine and fuzzy logic has no self-learning function. That is, some automatic learning is difficult to structure, using fuzzy logic rules learning.
Advantages: Learning the relative importance of fuzzy rules to realize the optimization of rules.
This paper introduces the basic logic of single elevator scheduling and the common concepts and algorithms of multiple elevator scheduling, only about the science of fur, interested friends can continue to explore ~
Thanks for reading ****
For more AI information and technical guidance, welcome to our official account
Previous articles:
- Ali Cloud AI White Paper, understanding the current situation and future of Artificial intelligence in China, full score recommendation
- The world’s first “living robot” has a programmable form and an evolutionary algorithm
- AI Ramble: How far are we from realizing the Robot of Wu Zhu Shu in “Celebrating Years”?
Click on it with your friendsCopy the code