Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@temcdrm
Copy link
Collaborator

@temcdrm temcdrm commented Jun 27, 2018

The December 2017 pull request broke the "pf" and "opf" solutions because some floating point solution values, e.g. bus voltage magnitudes and angles, were truncated to integer. Symptoms include inf and nan loss values, along with per-unit voltages less than 1.000 being truncated to zero. Tested that "pf" and "opf" solutions are giving the same answers as before using the current versions of numpy and scipy, with these changes. What other regression tests should be done? Should there be a test suite?

We have an upcoming release of TESP that depends on this fix to PYPOWER, so please expedite this merge if possible. As we continue to rely on PYPOWER directly, I'm willing to set up a test suite if that would help.

@rwl
Copy link
Owner

rwl commented Jun 28, 2018

Sorry that #47 wasn't reviewed more closely. It is clearly wrong. We should probably revert the change to printf.py too:

https://github.com/rwl/PYPOWER/pull/47/files#diff-530991037f09461f59b571431c1c7221R150

Ideally, we would test against the results from MATPOWER directly. We could have a MATLAB script that writes out .mat files for each test case. These could then be read using scipy.io:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html

There is already a Travis CI config that shows how to setup MATPOWER to run on GNU Octave:

https://github.com/MATPOWER/matpower/blob/master/.travis.yml

As a collaborator you should have the permissions required to merge this kind of change yourself. I trust you to do that. You should also be able to create new releases:

https://github.com/rwl/PYPOWER/releases/new

The CI/CD pipeline should take care of pushing the new version to PyPI. I'm happy to do it too, but at least you know you are not dependent upon me.

@rwl rwl merged commit ba8b338 into master Jun 28, 2018
thedavidneufeld pushed a commit to Optimization-at-Lethbridge/PYPOWER that referenced this pull request Jul 10, 2024
Reverting `.astype(int)` errors introduced in rwl#47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants