In a building there are some lifts
Optimize the allocation of lifts
Answers
so sorry don't know the answer
Answer:
In a building, there are some lifts. Optimize the allocation of lifts. Say there are N requests and M lifts. Minimize the maximum request waiting time. Rules of lift allocation
1) One needs to assign indexes to lifts. i.e. decide lift #1, lift #2, lift #3, etc apriori.
2) Since all N requests are known apriori decide the initial (at time t = 0) location of lift such that it will help in minimizing waiting time.
3) Even if all the N requests time are known apriori, other than initial time, i.e. t = 0, the waiting lifts cannot be moved towards the target floor until the request is actually issued.
4) After a request is issued for optimality calculation, even a lift is in transit it can be considered for serving that request.
5) If at any moment, more than one lift can serve the request with the same waiting time, give preference to the lift with a lower index. i.e. If Lift #2 and Lift #4 can serve a particular request in 2 seconds, then prefer Lift #2 over Lift #4.
6) Neglect the time required to get in and get out of a lift.
7) Once a lift starts serving a request it would not stop in between. If would finally stop at the destination of that request.
8) The speed of the lift is 1 floor/second. Constraints 0 <= T <= 86400. 0 <= S, D <= 100. 1 <= N, M <= 1000