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

Ask Your Question
0

Change the value of loads (load_chng_4) in Python

asked Feb 23 '17

Anna gravatar image

Hi!

I have created a for loop in Python to simulate the load flow in PSS/E for every hour during one year. The only thing that changes in input is the load values (P) and hence I'm using a function that includes:

psspy.loadchng4(node,name,[i,i,i,i,i,i],[ P, f,f,f,f,_f])

However, when I am running the script it complains that _f is not definied. I thought that it would be the default values or the values that I have already given to it. The only thing I want to change for every load during every iteration is the active power. How can I solve this?

Thanks for all the help I can get!

1 answer

Sort by » oldest newest most voted
0

answered Feb 23 '17

EBahr gravatar image

If you add the following at the top of your code it should work correctly.

_i, _f = psspy.getbatdefaults()

link

Comments

Thank you!

Anna gravatar imageAnna (Feb 24 '17)

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

Stats

Asked: Feb 23 '17

Seen: 567 times

Last updated: Feb 23 '17