You are standing in front of a bank of elevators, smashing the UP button and screaming at whoever wrote the algorithm that is making you late for your meeting. It’s time to prove that you can write a better algorithm.
Your task is to write the control logic for elevators. Your code will be run against a fixed set of scenarios with varying numbers of elevators and floors. These scenarios will not be public until after the contest is over. However, you can assume that scenarios will follow standard elevator traffic patterns. (Hint: Elevator traffic isn’t entirely random.) Your score will be based on the following metrics:
- Average Wait Time
- Average Time To Destination
- Max Time to Destination
- Total Floors Travelled By Elevators
The total score will be determined by this formula. The lowest score wins.
AverageWaitTime*2 + AverageTimeToDestination*4 + Max Time To Destination*2 + TotalFloorsTravelled