Skip to content

Commit c554007

Browse files
committed
parse json into dicts instead of objects
1 parent 34cc32a commit c554007

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/en_pf_native_validation.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@info "running explicit neutral power flow tests with native julia power flow solver"
22

33

4-
function conductor_correction!(data_eng)
4+
function conductor_correction!(data_eng::EngineeringModel)
55
nw = data_eng
66
if neutral_idx nw["conductor_ids"]
77
filter!(e -> e neutral_idx, nw["conductor_ids"])
@@ -45,7 +45,7 @@ end
4545

4646

4747

48-
function sourcebus_voltage_vector_correction!(data_math::Dict{String,Any}; explicit_neutral=true)
48+
function sourcebus_voltage_vector_correction!(data_math::MathematicalModel; explicit_neutral=true)
4949
if haskey(data_math, "multinetwork")
5050
for (n, nw) in data_math["nw"]
5151
for (i, bus) in data_math["nw"]["bus"]
@@ -255,7 +255,7 @@ filter!(e -> e ≠ "case3_balanced_battery_3ph", cases)
255255

256256
# obtain solution from dss
257257
sol_dss = open("$solution_dir/$case.json", "r") do f
258-
JSON.parse(f)
258+
Dict{String, Any}(JSON.parse(f))
259259
end
260260

261261
sol_pmd = transform_solution(res["solution"], data_math, make_si=true)
@@ -285,7 +285,7 @@ filter!(e -> e ≠ "case3_balanced_battery_3ph", cases)
285285
res = compute_mc_pf(pfd)
286286

287287
sol_dss = open("$solution_dir/$case.json", "r") do f
288-
JSON.parse(f)
288+
Dict{String, Any}(JSON.parse(f))
289289
end
290290

291291
sol_pmd = transform_solution(res["solution"], data_math, make_si=true)
@@ -323,7 +323,7 @@ cases = ["test_trans_dy_3w", "test_trans_yy_3w", "ut_trans_3w_dyy_1", "ut_trans_
323323

324324
# obtain solution from dss
325325
sol_dss = open("$solution_dir/$case.json", "r") do f
326-
JSON.parse(f)
326+
Dict{String, Any}(JSON.parse(f))
327327
end
328328

329329
sol_pmd = transform_solution(res["solution"], data_math, make_si=true)
@@ -388,7 +388,7 @@ solution_dir = "data/opendss_solutions"
388388
@test res["termination_status"]["10"] == PF_CONVERGED
389389

390390
sol_dss = open("$solution_dir/$case.json", "r") do f
391-
JSON.parse(f)
391+
Dict{String, Any}(JSON.parse(f))
392392
end
393393

394394
sol_pmd = transform_solution(res["solution"], data_math, make_si=true)

0 commit comments

Comments
 (0)