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] Calling solve_mc_pf on a four-wire case study #434

Closed
frederikgeth opened this issue May 23, 2023 · 1 comment
Closed

[BUG] Calling solve_mc_pf on a four-wire case study #434

frederikgeth opened this issue May 23, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@frederikgeth
Copy link
Collaborator

Describe the bug
Calling solve_mc_pf on a four-wire case study results in a very unhelpful error message:

ERROR: real current decision variables appear to be missing for branch components
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] _check_var_keys(vars::Dict{Tuple{Int64, Int64, Int64}, Any}, keys::Vector{Tuple{Tuple{Int64, Int64, Int64}, Vector{Int64}}}, var_name::String, comp_name::String)
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/core/base.jl:67
  [3] constraint_mc_current_balance(pm::IVRENPowerModel, nw::Int64, i::Int64, terminals::Vector{Int64}, grounded::Vector{Bool}, bus_arcs::Vector{Tuple{Tuple{Int64, Int64, Int64}, Vector{Int64}}}, bus_arcs_sw::Vector{Tuple{Tuple{Int64, Int64, Int64}, Vector{Int64}}}, bus_arcs_trans::Vector{Tuple{Tuple{Int64, Int64, Int64}, Vector{Int64}}}, bus_gens::Vector{Tuple{Int64, Vector{Int64}}}, bus_storage::Vector{Tuple{Int64, Vector{Int64}}}, bus_loads::Vector{Tuple{Int64, Vector{Int64}}}, bus_shunts::Vector{Tuple{Int64, Vector{Int64}}})
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/form/en_shared.jl:118
  [4] constraint_mc_current_balance(pm::IVRENPowerModel, i::Int64; nw::Int64)
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/core/constraint_template.jl:393
  [5] constraint_mc_current_balance
    @ ~/.julia/packages/PowerModelsDistribution/dInzf/src/core/constraint_template.jl:384 [inlined]
  [6] build_mc_pf(pm::IVRENPowerModel)
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/pf.jl:102
  [7] instantiate_model(data::Dict{String, Any}, model_type::Type, build_method::typeof(build_mc_pf), ref_add_core!::typeof(ref_add_core!), global_keys::Set{String}, it::Symbol; ref_extensions::Vector{Function}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ InfrastructureModels ~/.julia/packages/InfrastructureModels/cRxlZ/src/core/base.jl:370
  [8] instantiate_mc_model(data::Dict{String, Any}, model_type::Type, build_method::typeof(build_mc_pf); ref_extensions::Vector{Function}, multinetwork::Bool, global_keys::Set{String}, eng2math_extensions::Vector{Function}, eng2math_passthrough::Dict{String, Vector{String}}, make_pu_extensions::Vector{Function}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/common.jl:119
  [9] _solve_mc_model(data::Dict{String, Any}, model_type::Type, optimizer::MathOptInterface.OptimizerWithAttributes, build_method::typeof(build_mc_pf); multinetwork::Bool, ref_extensions::Vector{Function}, solution_processors::Vector{Function}, relax_integrality::Bool, kwargs::Base.Pairs{Symbol, Set{String}, Tuple{Symbol}, NamedTuple{(:global_keys,), Tuple{Set{String}}}})
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/common.jl:37
 [10] solve_mc_model(data::Dict{String, Any}, model_type::Type, optimizer::MathOptInterface.OptimizerWithAttributes, build_mc::typeof(build_mc_pf); ref_extensions::Vector{Function}, multinetwork::Bool, global_keys::Set{String}, eng2math_extensions::Vector{Function}, eng2math_passthrough::Dict{String, Vector{String}}, make_pu_extensions::Vector{Function}, map_math2eng_extensions::Dict{String, Function}, make_si::Bool, make_si_extensions::Vector{Function}, dimensionalize_math_extensions::Dict{String, Dict{String, Vector{String}}}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/common.jl:194
 [11] solve_mc_model(data::Dict{String, Any}, model_type::Type, optimizer::MathOptInterface.OptimizerWithAttributes, build_mc::Function)
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/common.jl:184
 [12] #solve_mc_pf#3582
    @ ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/pf.jl:3 [inlined]
 [13] solve_mc_pf(data::Dict{String, Any}, model_type::Type, solver::MathOptInterface.OptimizerWithAttributes)
    @ PowerModelsDistribution ~/.julia/packages/PowerModelsDistribution/dInzf/src/prob/pf.jl:3
 [14] top-level scope

Minimum Viable Example

using Ipopt, JuMP, PowerModelsDistribution
solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer)
path = "/Users/frederikgeth/.julia/packages/PowerModelsDistribution/BxWoM/test/data/en_validation_case_data/test_load_1ph_wye_cp.dss"
data = PowerModelsDistribution.parse_file(path, transformations = [remove_all_bounds!, transform_loops!])
form = PowerModelsDistribution.IVRENPowerModel
results = PowerModelsDistribution.solve_mc_pf(data, form, solver)

Expected behavior
Power flow should run, I believe the explicit neutral power flow problem specification is missing.
Note that solve_mc_opf does correctly calculate the power flow for data instantiated from OpenDSS files.

Copy link

stale bot commented Nov 19, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 19, 2023
@stale stale bot closed this as completed Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant