A parallel algorithm for the optimal power flows problem