This pull request includes some very minor bug fixes that are probably due to recent changes in pandas and networkx that cropped up when trying to execute 'read_matpower()'.
This is great! Thanks for making the PR! I think we need to add some tests that run on Travis. I can do that as a separate PR. Let me test this on my local machines and then I'll merge it.
Hi @kdheepak
This pull request includes some very minor bug fixes that are probably due to recent changes in pandas and networkx that cropped up when trying to execute 'read_matpower()'.
For https://github.com/power-system-simulation-toolbox/psst/commit/7112324002d2ba8c0ddecdc4bcf7916cf447b767
I changed the
within=NonNegativeReals
towithin=Reals
for line 51 ofgenerators.py
as you requested.Also, on lines 87 and 90 of
model/__init__.py
you hadHowever,
to_dict()
no longer allows theorient
keyword for Series (although it does for DataFrames)For https://github.com/power-system-simulation-toolbox/psst/commit/a1c90d1b634dcc4090553e532bbde327e46e4164 I could not read
case2383wp
because it contained -Inf and Inf in the Qmin and Qmax, which raised anOverflowError
instead of aValueError
so I added a check for that.With https://github.com/power-system-simulation-toolbox/psst/commit/a1c90d1b634dcc4090553e532bbde327e46e4164 For some reason networkx no longer allows directly referencing edge attributes by key, so in order to access an edge attribute you have to go through the
attr_dict
first.Lastly, for https://github.com/power-system-simulation-toolbox/psst/commit/315fc0f03d801428f4818d91ab326f173da54bcc
model/__init__.py
the idiom
only works if load_df is None. If
load_df
is a dataframe, then this statement generates aValueError
becauseSo to fix this, I explicitly check to see if the dataframe is None and then only perform the assignment if it is.