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

[BUG] function discover_voltage_zones not allowing to apply voltage bounds to a multinetwork test case #388

Closed
juanjospina opened this issue May 10, 2022 · 0 comments

Comments

@juanjospina
Copy link
Contributor

Describe the bug
There is a line of code in the function discover_voltage_zones(..) that is not allowing the user to apply voltage bounds to a multinetwork test case.

The problem is present in line 113 of file units.jl

@assert iseng(data_model) || ismath(data_model) "unsupported data model"

In a multinetwork test case, when the function _apply_voltage_bounds!(..) -> calc_voltage_bases(..) call discover_voltage_zones(..), the data passed in does not have the data_model key so the assertion always fails. This only happens when a multinetwork test case is used.

Minimum Viable Example

case3_balanced = parse_file("./PowerModelsDistribution.jl/test/data/opendss/case3_balanced.dss")
eng_ts = make_multinetwork(case3_balanced)
apply_voltage_bounds!(eng_ts; vm_lb=0.95, vm_ub=1.2)

This simple example will fail due to the assertion. If the assertion is commented out, then everything works correctly.

Expected behavior
The function apply_voltage_bounds!(..) should be able to apply the voltage bounds to all the buses in the multinetwork test case problem.

Screenshots
N/A.

System Information (please complete the following information):

  • OS: Ubuntu 20.04 LTS
  • Version: 0.14.3 (main-latest)

Additional context
Possible solutions:

  1. Remove the assert since may not be needed.
  2. Add an extra boolean argument (kwarg) that goes all the way from apply_voltage_bounds! -> _apply_voltage_bounds! -> calc_voltage_bases -> discover_voltage_zones. If it is true, then is mn and the assertion is skipped.

If there is a preference to one of these solutions, let me know so I can try to implement it and make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant