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

REF: Remove loops over conductors from prob #181

Merged
merged 1 commit into from
Sep 24, 2019
Merged

Conversation

pseudocubic
Copy link
Collaborator

Removes any loops over conductors from the problem definitions to avoid confusing users. Loops over conductors, if needed, will happen inside of functions in src/core/constraint_templates.jl or src/core/variables.jl, particularly for those constraints/variables which merely call back to PowerModels.

Adds the following functions:

  • constraint_mc_storage_loss
  • constraint_mc_storage_thermal_limit
  • constraint_mc_thermal_limit_from
  • constraint_mc_thermal_limit_to
  • constraint_mc_voltage_magnitude_setpoint
  • constraint_mv_active_gen_setpoint
  • variable_mc_generation
  • variable_mc_generation_on_off

Fixes a multinetwork bug in ref_add_arcs_trans!

Adds an AbstractWModels version of constraint_mc_power_balance

Fixes multinetwork calls in constraint templates and variable constructors (conductor_ids should receive nw kwarg in multinetwork cases).

Multinetwork problem definition made to be internal, similar to how PowerModels does problem definitions in src/prob/test.jl, and updated unit test to use new function name.

No updates to unit tests were necessary.

Changelog updated

Removes any loops over conductors from the problem definitions to avoid confusing users. Loops over conductors, if needed, will happen inside of functions in `src/core/constraint_templates.jl` or `src/core/variables.jl`, particularly for those constraints/variables which merely call back to PowerModels.

Adds the following functions:

- constraint_mc_storage_loss
- constraint_mc_storage_thermal_limit
- constraint_mc_thermal_limit_from
- constraint_mc_thermal_limit_to
- constraint_mc_voltage_magnitude_setpoint
- constraint_mv_active_gen_setpoint
- variable_mc_generation
- variable_mc_generation_on_off

Fixes a multinetwork bug in `ref_add_arcs_trans!`

Adds an `AbstractWModels` version of `constraint_mc_power_balance`

Fixes multinetwork calls in constraint templates and variable constructors (`conductor_ids` should receive `nw` kwarg in multinetwork cases).

Multinetwork problem definition made to be internal, similar to how PowerModels does problem definitions in `src/prob/test.jl`, and updated unit test to use new function name.

No updates to unit tests were necessary.

Changelog updated
@pseudocubic pseudocubic added the Category: Problem Specifications Problem specification label Sep 24, 2019
@pseudocubic pseudocubic added this to the Release v0.6.0 milestone Sep 24, 2019
@pseudocubic pseudocubic self-assigned this Sep 24, 2019
@codecov
Copy link

codecov bot commented Sep 24, 2019

Codecov Report

Merging #181 into master will increase coverage by 0.1%.
The diff coverage is 89.44%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #181     +/-   ##
=========================================
+ Coverage   87.76%   87.87%   +0.1%     
=========================================
  Files          39       39             
  Lines        3914     3908      -6     
=========================================
- Hits         3435     3434      -1     
+ Misses        479      474      -5
Impacted Files Coverage Δ
src/prob/pf_bf.jl 0% <0%> (ø) ⬆️
src/prob/opf_lm.jl 0% <0%> (ø) ⬆️
src/core/ref.jl 87.14% <100%> (ø) ⬆️
src/prob/opf.jl 92.59% <100%> (-0.75%) ⬇️
src/prob/opf_bctr.jl 91.3% <100%> (-0.7%) ⬇️
src/prob/debug.jl 95.23% <100%> (-0.51%) ⬇️
src/core/variable.jl 100% <100%> (ø) ⬆️
src/core/constraint_template.jl 98.27% <100%> (+0.08%) ⬆️
src/prob/pf.jl 96% <100%> (-0.43%) ⬇️
src/prob/opf_oltc.jl 86.36% <100%> (-1.14%) ⬇️
... and 5 more

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 585aa57...f7aac33. Read the comment docs.

@pseudocubic pseudocubic merged commit 4df062b into master Sep 24, 2019
@pseudocubic pseudocubic deleted the ref/prob-defs branch September 24, 2019 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant