Skip to content
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

Feature: Support for PowerModelsDistribution ENGINEERING data models (breaking) #13

Merged
merged 20 commits into from
Jun 30, 2020

Conversation

pseudocubic
Copy link
Collaborator

This includes a substantial rewrite of PowerModelsAnalytics to make it more agnostic to the type of Infrastructure network that is attempting to be plotted. A lot was attempted to be abstracted away in order to allow the user to provide custom specifications for things like nodes, edges, sources, demands, etc., without having to write new functions to plot those types of Infrastructure networks. That being said, this is only currently tested with PowerModels and PowerModelsDistribution.

This PR specifically adds support for the PowerModelsDistribution ENGINEERING data model, as well as maintaining support for the MATHEMATICAL model (which is used by both PowerModels and PowerModelsDistribution).

Many function kwargs were changed to make them more generic to the type of network, and default values were moved in many cases to src/core/options.jl so it wasn't any longer necessary to monitor many functions across several files to keep them in sync.

The load-block variants of the plot and build graph function was removed in favor of using the kwarg block_graph=true, mainly because the amount of code replication was huge and it was easier to condense down into a single function once the functions were refactored to make them more agnostic to the type of network.

An equivalent of plot_load_summary called plot_source_demand_summary specifically for the ENGINEERING model was added. It has some abstractions in it already and may be able to be adapted for other types of Infrastructure networks later, but focuses right now on power.

@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #13 into master will decrease coverage by 0.40%.
The diff coverage is 54.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
- Coverage   35.80%   35.40%   -0.41%     
==========================================
  Files          11       11              
  Lines         458      627     +169     
==========================================
+ Hits          164      222      +58     
- Misses        294      405     +111     
Impacted Files Coverage Δ
src/PowerModelsAnalytics.jl 100.00% <ø> (ø)
src/layouts/networkx.jl 100.00% <ø> (ø)
src/plots/analytics.jl 0.00% <0.00%> (ø)
src/plots/graph.jl 0.00% <0.00%> (ø)
src/plots/networks.jl 0.00% <0.00%> (ø)
src/layouts/common.jl 40.00% <33.33%> (ø)
src/core/data.jl 73.33% <74.57%> (+2.74%) ⬆️
src/graph/common.jl 76.43% <76.43%> (-17.97%) ⬇️
src/core/types.jl 100.00% <100.00%> (ø)

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 b0bc719...f132252. Read the comment docs.

@pseudocubic pseudocubic self-assigned this Jun 30, 2020
@pseudocubic pseudocubic added the enhancement New feature or request label Jun 30, 2020
@pseudocubic pseudocubic merged commit f8c91cf into master Jun 30, 2020
@pseudocubic pseudocubic deleted the feature-pmd-eng-model branch June 30, 2020 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant