Add dynamic user model from model library using python
I want to add a user model from the model library. What is the syntax to do this in a Python script?
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
I want to add a user model from the model library. What is the syntax to do this in a Python script?
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"
From the API manual:
dllerr = psspy.addmodellibrary(udm_filename)
dlllerr would return "0" when the UDM was loaded correctly.
Asked: 2020-03-09 09:19:22 -0600
Seen: 762 times
Last updated: Mar 10 '20