Fast and efficient gradient projection algorithm for dynamic generation dispatching