Skip to content

Commit c099a26

Browse files
committed
FIX: filename passed through OpenDssDataModel
Fixes bug where filename vector was not being passed through from Raw DSS to ENG.
1 parent 2bd61dc commit c099a26

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## staged
44

5+
- Fixed bug where filename vector was not being passed through from raw dss to eng data structs
56
- Fixed bug where controls for transformer banks with phases not starting with `1` would throw a parsing error due to the wrong conductor identifier `c`
67
- Fixed bug where `.` chars in dss object names would cause part of the name of the object to get dropped
78
- Fixed bug where `var(pm, :p)` and `var(pm, :q)` in the `IVRUPowerModel` formulation were being overwritten by transformer and switch variable functions

src/data_model/dss/structs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ end
12491249

12501250
"Parsed OpenDSS model struct"
12511251
Base.@kwdef mutable struct OpenDssDataModel <: DssModel
1252+
filename::Vector{String} = Vector{String}()
12521253
options::DssOptions = DssOptions()
12531254
circuit::Dict{String,DssCircuit} = Dict{String,DssCircuit}()
12541255
linecode::Dict{String,DssLinecode} = Dict{String,DssLinecode}()

src/data_model/transformations/dss2eng.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ function parse_opendss(
10231023
data_eng["settings"]["base_frequency"] = data_dss.options.defaultbasefrequency
10241024

10251025
# collect turns the Set into Array, making it serializable
1026-
data_eng["files"] = []#collect(data_dss["filename"])
1026+
data_eng["files"] = collect(data_dss["filename"])
10271027
else
10281028
error("Circuit not defined, not a valid circuit!")
10291029
end

src/data_model/transformations/rawdss2dss.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"""
33
function transform_data_model(::Type{DssModel}, raw_dss::OpenDssRawDataModel)::OpenDssDataModel
44
dss = OpenDssDataModel(;
5-
options = create_dss_object(DssOptions, raw_dss.options)
5+
options = create_dss_object(DssOptions, raw_dss.options),
6+
filename = raw_dss.filename
67
)
78

89
for (pn, property) in raw_dss

0 commit comments

Comments
 (0)