Skip to content

[BUG] Sourcebus without neutral has wrong number of terminals  #421

@frederikgeth

Description

@frederikgeth

Describe the bug
Case studies with implicit neutral/without neutral still have four terminals for the source bus. This shouldn't happen. The problem appears in both the ENG and MATH datamodel.

Minimum Viable Example
From the unit tests, use 'case3_unbalanced.dss', which is a 3-wire (arguably Kron-reduced, as loads connect phase-to-ground) case study:

using PowerModelsDistribution
dss_file = "case3_unbalanced.dss"

data_eng = parse_file(dss_file, transformations=[transform_loops!]);
data_eng["voltage_source"]["source"]

data_math = transform_data_model(data_eng;kron_reduce=false, phase_project=false);
sourcebus = data_math["bus_lookup"]["sourcebus"]
data_math["bus"]["$sourcebus"]

Issue:

julia> length(data_eng["voltage_source"]["source"]["connections"])
4
julia> length(data_math["bus"]["$sourcebus"]["terminals"])
4

Expected behavior
In cases without neutral, the neutral should be absent in the terminal list. E.g. for a 3-phase 3-wire config, the bus properties vm, va, vmin, vmax, grounded should all be length-3, not 4.

System Information
We believe the problem to be OS-independent

Root cause?
The problem also pops up with phase-to-ground connected loads. It's likely that the root cause is that we don't tag if a case study is Kron-reduced or not. This may need to become a required input. parse_file probably needs a field is_kron_reduced to tag if the dss file is Kron-reduced already, whereas the current kron_reduce defines the application of the Kron's reduction transformation to the data being read in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions