First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

How to grab island buses from tree() command?

asked Apr 20 '3

PSSPYUser gravatar image

Is there a way to save the island buses from the tree() command into an array?

1 answer

Sort by » oldest newest most voted
0

answered Apr 20 '3

perolofl gravatar image

Try this:

islandbuses = [j for i in psspy.treedat(999)['island_busnum'] for j in i]
link

Comments

Thanks that was exactly what I needed!

PSSPYUser gravatar imagePSSPYUser (Apr 20 '3)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Apr 20 '3

Seen: 209 times

Last updated: Apr 20 '23