Ask Your Question

Add dynamic user model from model library using python

asked 2020-03-09 09:19:22 -0500

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2020-03-10 01:53:08 -0500

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:


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

edit flag offensive delete link more


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 ( 2020-03-10 01:58:36 -0500 )edit

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

perolofl gravatar imageperolofl ( 2020-03-10 02:02:52 -0500 )edit

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 ( 2020-03-10 02:16:16 -0500 )edit

I have the same version!

perolofl gravatar imageperolofl ( 2020-03-10 03:20:28 -0500 )edit

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 ( 2020-03-10 03:24:00 -0500 )edit

answered 2020-03-09 09:50:46 -0500

jconto gravatar image

From the API manual:

dllerr = psspy.addmodellibrary(udm_filename)

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2020-03-09 09:19:22 -0500

Seen: 128 times

Last updated: Mar 10