How to call/change DYR file values from python
Trying to call values from dyr file via python. and also trying to change the .dyr file values from python before running into dynamic simulations. looked up the dyradd, dyrnew, and dyda.
Trying to call values from dyr file via python. and also trying to change the .dyr file values from python before running into dynamic simulations. looked up the dyradd, dyrnew, and dyda.
I'm going to assume you want to change the dynamic data values in memory after reading the dyr file?
Under the "Dynamic Simulation Operation" there's "changecon", "changeicon" etc. method that allow you to change values if you know the array index value of the value you want to change.
In order to find the indexes, use the "mind"-ending functions e.g. windmind for wind models.
PS. If you want to read the values, use "Single Element Data" section's "dsrval", "dsival" etc.
For synchronous machines , use: MDLIND Use this API to return plant-related model starting array indices and status.