-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update data collection objects in dynamic simulation #214
Comments
I've started adding some code for generators. @jainmilan can you give me some variables that you want current values for? |
In #176, I asked for a way to get the current value of voltage at each bus, not just generators and loads. Does/will this issue cover that ability? |
This will probably work for you, but it might be better to add some accessors to the the DSFullBus class so you can access the values directly. Using this method, you will need to update the data collections on all buses and branches (by calling a function in the factory class), then accessing the data collection object for each bus and finally getting the variable you want. We are developing this functionality to create a python interface so the dynamic simulation can work with another code, but it may not be the optimal way for all applications to get this data. |
This is on my todo list, along with Python methods. It should be done this week. |
Both DS and HADREC applications now have an |
@bjpalmer, I'm investigating why I think Also, it appears that other simulation state queries only work on @jainmilan, I'm pretty sure this is why we get |
We looked at this last week. It seemed to me that the generator objects were not getting created by the calculation and therefore nothing was getting copied to the data collections. The basis for this assumption was that no |
I've been running the 9-bus case with However, I'm complaining about load values. The network is queried as follows: def network_analytics_dump(ds_app):
nbus = ds_app.totalBuses()
for bus in range(nbus):
print(bus,
ds_app.getBusInfoInt(bus, "BUS_NUMBER"),
ds_app.getBusInfoString(bus, "BUS_NAME"),
ds_app.getBusInfoInt(bus, "BUS_TYPE"),
ds_app.numGenerators(bus),
ds_app.numLoads(bus),
ds_app.getBusInfoReal(bus, "BUS_VOLTAGE_MAG"))
for g in range(ds_app.numGenerators(bus)):
print(" gen: ", g,
ds_app.getBusInfoInt(bus, "GENERATOR_NUMBER", g),
ds_app.getBusInfoString(bus, "GENERATOR_ID", g),
ds_app.getBusInfoReal(bus, "GENERATOR_PG", g),
ds_app.getBusInfoReal(bus, "GENERATOR_QG", g),
ds_app.getBusInfoReal(bus, "GENERATOR_PG_CURRENT", g),
ds_app.getBusInfoReal(bus, "GENERATOR_QG_CURRENT", g),
)
for l in range(ds_app.numLoads(bus)):
print("load: ", l,
ds_app.getBusInfoInt(bus, "LOAD_NUMBER", l),
ds_app.getBusInfoString(bus, "LOAD_ID", l),
ds_app.getBusInfoReal(bus, "LOAD_PL", l),
ds_app.getBusInfoReal(bus, "LOAD_QL", l),
ds_app.getBusInfoReal(bus, "LOAD_PL_CURRENT", l),
ds_app.getBusInfoReal(bus, "LOAD_QL_CURRENT", l)
) The results of this query are as follows:
The lines starting with |
@jainmilan, were we looking at the same input problem that @wperkins is describing? If you dump out the data collections, do you see a |
So, there can be loads without a |
Those loads are static. We could query them, although I don't know if there is much point in doing it more than once. @jainmilan, @abhyshr, @yliu250, this is a domain question. |
I think it's an API consistency question. @jainmilan needs to be able query all load P/Q's at arbitrary points in the simulation. He would first need to figure out what loads have a Also, are we sure that loads without a Also, based on my reading of |
@jainmilan, @wperkins, @abhyshr, @yliu250, I modified the updateData function so that it will always produce a value. GridPACK/src/applications/modules/dynamic_simulation_full_y/dsf_components.cpp Lines 1291 to 1322 in db1594d
|
@wperkins @abhyshr @yliu250 @bjpalmer I am trying to access the from and to p and q values using Lines 44 to 56 in 14db522
|
I don't think you are going to get anything using that format. The |
I restructured the code a bit so that the evaluation of the branch flows is in a separate function (evaluateBranchFlow) that is then called inside the branch updateData function before storing data in the data collection. |
Add functionality to update values in the data collection objects for buses and branches in dynamic simulation. These values can then be queried and extracted by other applications.
The text was updated successfully, but these errors were encountered: