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 2023-04-20 14:42:43 -0600

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 2023-04-20 15:03:17 -0600

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 ( 2023-04-20 15:10:55 -0600 )

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: 2023-04-20 14:42:43 -0600

Seen: 210 times

Last updated: Apr 20 '23