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] Type of storage qs_ub and qs_lb inconsistent with documentation #379

Closed
wfvining-snl opened this issue Feb 18, 2022 · 0 comments
Closed
Assignees
Labels

Comments

@wfvining-snl
Copy link

Describe the bug
The type of the qs_lb and qs_ub attributes of the storage element are inconsistent between the documentation and the create_storage() function. In the docs it is Real, but create_storage requires Vector{<:Real}.

Storage loaded from an OpenDSS model matches the types in the documentation, resulting in a storage element that has a single value for qs_lb and qs_ub respectively (as opposed to a vector).

Minimum Viable Example

model = parse_file("ieee13nodeckt.dss")
add_storage!(model, "s671", "671", [1, 2, 3, 4], 
             qs_lb=-15.0, 
             qs_ub=15.0,
             energy=100.0,
             charge_ub=100.0,
             discharge_ub=100.0)

Results in:

ERROR: TypeError: in keyword argument qs_lb, expected Union{Missing, Vector{<:Real}}, got a value of type Float64
Stacktrace:
 [1] add_storage!(data_eng::Dict{String, Any}, id::String, bus::String, connections::Vector{Int64}; kwargs::Base.Pairs{Symbol, Float64, NTuple{5, Symbol}, NamedTuple{(:qs_lb, :qs_ub, :energy, :charge_ub, :discharge_ub), NTuple{5, Float64}}})
   @ PowerModelsDistribution C:\...\data_model\components.jl:913
 [2] top-level scope
   @ REPL[35]:1

Expected behavior
Should add a new storage device to the model with minimum reactive power -15 kVAR and maximum 15 kVAR.

System Information (please complete the following information):

  • OS: Windows
  • Version: v0.14.1
@pseudocubic pseudocubic self-assigned this Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants