Automating Ac Power Flow Simulations