First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
answered Sep 26 '16
Get the maximum bus number and add one would probably the easiest way: max(psspy.abusint(flag=2, string='NUMBER')[1][0])+1
max(psspy.abusint(flag=2, string='NUMBER')[1][0])+1