Power system planning and analysis