A parallel quadratic programming method for dynamic optimization problems