Efficient elevator strategy

687 Views Asked by At

Suppose an institution building has 12 floors and there are a total of 8 lifts. Now lets say a situation arises at peak times where almost all the lifts are crowded and people randomly enter any lift, so a person going for 12th floor has to wait through all the floors most of the times. Some efficient strategy has to be designed rather than just stopping each lift at each call.

What I want is to design two combinations of 4 lifts which would only stop at specific floors with a constraint that each of the lifts has to stop at floors 1 and 2. What I have designed is that 4 of the lifts would respond only to floor numbers 1,2,3,4,5,6,7 and not on other floors, while the other 4 lifts would respond only to floor numbers 1,2,8,9,10,11,12 and not on other floors.

How can I know that this is the best solution, if at all this is? And if not, then what is the best solution?