CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
211 stars 110 forks source link

Fix bug in pandapower interface #302

Closed jinningwang closed 2 years ago

jinningwang commented 2 years ago

Fix bug in pandapower interface: 1) to_pandapower 1) fix the bug of device_mva when creating generator 1) auto rename device if duplicates of names exist 1) verification: a) align bus angle with slack bus, b) add user-defined tolerance 1) refactor to_pandapower with multiple sub-functions 1) refactor to_pandapower with multiple conditions: a) no dynamic devices, b) one StaticGen to many SynGen or DG 1) make_link_table: refactor make_link_table with new sub-functions 1) test_pandapower: refactor test with multiple cases 1) runopp_map: include DG in the results

jinningwang commented 2 years ago

I have tested the interface with pjm, kundur, ieee14, ieee39, and wecc. The conversion with npcc run into an error, WIP.

codecov[bot] commented 2 years ago

Codecov Report

Merging #302 (21e02ae) into develop (9eafa80) will increase coverage by 0.07%. The diff coverage is 95.41%.

@@             Coverage Diff             @@
##           develop     #302      +/-   ##
===========================================
+ Coverage    78.01%   78.09%   +0.07%     
===========================================
  Files          158      158              
  Lines        13462    13508      +46     
===========================================
+ Hits         10503    10549      +46     
  Misses        2959     2959              
Impacted Files Coverage Δ
andes/interop/pandapower.py 88.62% <94.39%> (+2.57%) :arrow_up:
tests/test_pandapower.py 95.00% <100.00%> (+1.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9eafa80...21e02ae. Read the comment docs.

jinningwang commented 2 years ago

Hantao,

The interface is improved with all those bug fixes and refactoring. It looks good to me now, please let me know if you have any further concerns or comments.

Regards, Jinning

jinningwang commented 2 years ago

Hantao,

The ACOPF of the converted 39-bus case from ANDES runs into divergence error, as we discussed yesterday. The error is detected to be caused by large line limits. In the converted case, the limit is 99999.0, which is also the default value in the interface. I decreased the default value to 100.

Similar to the generator controllable option, I plan to add an option for user-defined line limits. It should be a quick job, and I plan to do it by the end of this week. Let us keep this PR open till I finish that.

Regards, Jinning

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information