Artificial neural network for reactive power optimization