Unusual elevator algorithm
I don't see any optimisation problem, no need for any greedy algorithm, nothing. 

You described the behaviour of the elevator. All you need to do is to simulate that behaviour and count the number of movements.