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

Ask Your Question
0

Add dynamic user model from model library using python

asked Mar 9 '0

JohL gravatar image

I want to add a user model from the model library. What is the syntax to do this in a Python script?

2 answers

Sort by » oldest newest most voted
0

answered Mar 10 '0

perolofl gravatar image

Use add_plant_model to add a plant model (generator, exciter,governor,pss, etc) to the snapshot.

For example, to add a governor model:

psspy.add_plant_model(3011,'1',7,'TGOV1',0,"",0,[],[],7,[0.05,0.05,0.9,0.3,1.0,1.0,0.0])

It is easy to get the syntax by recording a python script while adding the model manually in the GUI with "Add/Replace Model"

link

Comments

Thak you for the reply! The models I want to add are listed in the model library but are not available to add via the GUI. The specific ones I am trying to add are generic renewable models (REGCAU1, REECAU1, REPCAU1).

JohL gravatar imageJohL (Mar 10 '0)

They are available in the GUI in the Wind Machine tab.

perolofl gravatar imageperolofl (Mar 10 '0)

They are not available to me there. Maybe this is due to my PSS/E version. I am using 33.12.1.

JohL gravatar imageJohL (Mar 10 '0)

I have the same version!

perolofl gravatar imageperolofl (Mar 10 '0)

Do you right-click in the cell and select "Add/Replace Model"? For wind generator model I see REGCAU1, WT1G1, WT2G1, WT3G1, WT4G1, WT4G2.

perolofl gravatar imageperolofl (Mar 10 '0)
0

answered Mar 9 '0

jconto gravatar image

From the API manual:

dllerr = psspy.addmodellibrary(udm_filename)

dlllerr would return "0" when the UDM was loaded correctly.

link

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: Mar 9 '0

Seen: 779 times

Last updated: Mar 10 '20