fix parse_file and _rename_network_components! to support matlab files#27
fix parse_file and _rename_network_components! to support matlab files#27niwq15 wants to merge 3 commits intolanl-ansi:mainfrom
Conversation
|
Hi @niwq15. Thanks for the PR. A few points to keep in mind. PowerModelsITD relies heavily on PowerModelsDistribution.jl (PMD) for handling distribution system data. PMD officially supports OpenDSS ".dss" files, and MATPOWER files have been mostly used at the beginning for debugging, considering that MATPOWER is useful for balanced transmission system, and not really that useful for unbalanced distribution systems. See how PMD 'artificially' creates multiconductor the distribution system via the function However if this new addition does not break the codebase, we could consider adding it for general support. A few suggested changes for facilitating the merging of the PR are:
These changes will help expedite the merging process. Thanks. |
|
Hi @juanjospina Thank you for the feedback! I have pushed the requested changes addressing the formatting and naming issues. For the unit tests, I updated
|
Pull Request (PR) for Distribution Network Data with MATPOWER Files
When using PowerModelsITD to parse MATLAB (.m) distribution network files, there were issues preventing direct conversion. Specifically:
parse_filedid not handle the format of certain components correctly. For example.data["name"]in MATPOWER files is often in the format of SubString{String} rather than String._rename_network_components!did not handle the format of certain components correctly. For example, for load/shunt components,source_idcan be aVector{Any}, which caused the error:These made it impossible to load MATLAB-based distribution networks directly.
Changes
_rename_network_components!to safely handlesource_id,bus, and related fields when they areVector{Any}, numbers, or strings.Testing
.mdistribution files can now be loaded viaparse_files(pm_file, pmd_files, boundary_file)without errors.Notes