-
Notifications
You must be signed in to change notification settings - Fork 43
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
Data Model Abstraction Refactor #272
Conversation
commit 089d810 Author: Sander Claeys <[email protected]> Date: Wed Jan 22 20:22:01 2020 -0700 parser working commit 63676a6 Author: Sander Claeys <[email protected]> Date: Fri Jan 17 12:25:00 2020 -0700 parser rewrite init commit 0e7358f Author: Sander Claeys <[email protected]> Date: Fri Jan 17 10:32:18 2020 -0700 pu prototyped commit efa631d Author: Sander Claeys <[email protected]> Date: Thu Jan 16 20:52:24 2020 -0700 _calc_vbase moved and improved commit d5e668b Author: Sander Claeys <[email protected]> Date: Thu Jan 16 19:47:32 2020 -0700 moved transformer decomposition commit 786570d Author: Sander Claeys <[email protected]> Date: Thu Jan 16 15:06:01 2020 -0700 mappings prototype commit 110de04 Author: Sander Claeys <[email protected]> Date: Wed Jan 15 12:52:43 2020 -0700 update commit d1b889a Author: Sander Claeys <[email protected]> Date: Tue Jan 14 09:26:26 2020 -0700 user-facing data model prototype
* ADD: Buscoord parsing into PMD data structure Adds automatic parsing of buscoords (if present) into the PMD data structure, under the fields `lon` and `lat`. Adds unit test using existing opendss test files and updates changelog. Removes `buscoords.dat` from test data files, it does not seem to be used. Closes #245 * FIX: Backwards compatibility with Julia 1.0 `range(start, stop; step=)` is not available in Julia 1.0
fixes bugs in multinetwork processing and running ADD: multinetwork problem example
storage and switch were missing
This PR is ready for review/merge. I will leave this open until the end of next Tuesday May 12 for comments. If you have any changes that you think should be made before merge that would be breaking please make them before this time. |
I will go through the PR this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments, I may do another pass later after running the code
FIX: spelling errors REF: linecode requires rs/xs, lines require either linecode or rs/xs REF: DROOP to FREQUENCYDROOP ADD: vm bounds to _1to1_maps constant ADD: convert_rad2deg kwarg to transform_solution
Adds helper function to easily instantiate an engineering model and documentation to explain how it works Unit tests added and updates changelog
I added several figures, but they won't display until this is merged in master (@pseudocubic can you check that the path is correct? I followd the logo as an example) |
Changed to relative image references and built docs to check they are working Updated markdown file syntax Changed PMD to PowerModelsDistribution in all docstrings Change PMs to PowerModels in all docstrings Removed PDF files (don't seem to be linked anywhere)
[skip ci]
constraint_mc_load_setpoint in constraint_template was not passing the report kwarg to the wye and delta variants, fixed Closes #274
Addresses review comments
This PR contains the result of a refactor of the default user-facing data model in PowerModelsDistribution to a new
ENGINEERING
data modelA merge of this PR will result in the v0.9.0 release of PowerModelsDistribution
What is the New Data Model
We have designed a data model that more closely matches the engineering realities of a distribution network, that allows for easy transformation and visualization of the case and includes more component types than are represented in the original (and still existing under the hood)
MATHEMATICAL
data model with which previous users will be familiar.The new data model is documented in detail in the documentation, including all of the currently supported component types are their individual fields, the types of values, and any defaults we might assume.
Why Do We Need a New Data Model?
In distribution networks the variety of components in a standard network is much more diverse than in a traditional transmission network, and their mathematical representations are comparatively complex. For example, in order to represent n-winding multiphase transformers with loss models we have to represent a single transformer with a large number of lines, buses, and lossless 2-winding transformers, which previously users have found confusing when attempting to compare their parsed network to the originating file. To simplify the user experience, and to introduce the ability to easily make transformations of the networks, we formulated the
ENGINEERING
data model.How Does It Work?
For the most part, the commands that you were using before will not change appreciably.
parse_file
is still the standard way to import data,run_mc_
commands will still run problem specifications, and PowerModel types should not be different at all. The workflow for most users should be identical; although there are now some intermediate steps to building the JuMP model from the default data dictionary, these steps should be largely invisible to the user unless they want to expose them. Users should experience the following workflow by default:parse_file
returnsENGINEERING
data model ->run_mc_{}
runs optimization problem and returns result inENGINEERING
model formatWhat is happening behind the scenes is the following:
parse_file
returnsENGINEERING
data model ->run_mc_{}
converts toMATHEMATICAL
data model in per-unit, builds JuMP model, runs optimization, converts results inMATHEMATICAL
model format to SI units and converts back toENGINEERING
format.We have exposed to the user the functions that do these conversions if they wish to use them, and have provided examples in Jupyter Notebooks in the
/examples
folder that demonstrates both of these types of workflows.If the user experience is the same, what changed besides the default model?
There were a multitude of changes that happened in order to support the functionality for this new data model, as well as some other changes that address concerns and comments of users
run_mc_opf_iv
andrun_mc_opf_bf
are eliminated in favor of having users userun_mc_opf
only, and redirecting to the appropriate problem definitions using multiple dispatch. The only variants that should continue to exist are truly unique problem specifications, e.g.run_mc_opf_oltc
orrun_mc_mld
, etc.MATHEMATICAL
model, are consistent across the packageModel
,add_bus!
, etc., rather than rely solely on dss inputs (see notebook in/examples
)parse_dss
originally followed a similar parsing pattern asparse_pti
in PowerModels, parsing component dictionaries into Vectors. Instead, we now parse into a structure that is much closer to the final data structures that users utilize, in order to make debugging and future parsing easierFeature X that I want isn't in the new data model
Definitely make a new Github Issue. We view any additions to the data model to be additive and therefore not a breaking change, which means we can make rapid releases containing those additions without any problem.
Related Issues
Closes #221
Closes #256
Closes #260
Closes #242
Closes #245
Closes #33
Closes #249
Closes #253
Closes #193
Closes #257
Closes #246
Closes #248
Closes #247
Closes #252
Closes #175
Closes #251
Closes #234
Closes #238
Closes #240
Closes #236
Closes #237
Closes #230
Closes #239
Closes #243
Closes #227
Closes #264
Closes #235
Closes #56
Closes #274