Skip to content

Commit e87e42a

Browse files
committed
change tests from term status to initial point
1 parent 1640ffa commit e87e42a

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

src/PowerModelsDistribution.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ module PowerModelsDistribution
5050

5151
Logging.global_logger(_LOGGER)
5252
end
53+
54+
const _PKG_ROOT = dirname(dirname(pathof(PowerModelsDistribution)))
55+
const CASE3B = joinpath(
56+
_PKG_ROOT,
57+
"test",
58+
"data",
59+
"opendss",
60+
"case3_balanced.dss",
61+
)
62+
63+
const CASE3U = joinpath(
64+
_PKG_ROOT,
65+
"test",
66+
"data",
67+
"opendss",
68+
"case3_unbalanced.dss",
69+
)
5370

5471
include("core/base.jl")
5572
include("core/types.jl")

test/opf_bf.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040

4141
result = solve_mc_opf(data, LPUBFDiagPowerModel, ipopt_solver; solution_processors=[sol_data_model!])
4242

43-
@test_broken result["termination_status"] == LOCALLY_SOLVED
43+
@test result["primal_status"] == FEASIBLE_POINT
4444

4545
@test isapprox(sum(result["solution"]["voltage_source"]["source"]["pg"]), 40.26874; atol=1)
46-
@test isapprox(sum(result["solution"]["voltage_source"]["source"]["qg"]), 17.1721; atol=1)
46+
@test isapprox(sum(result["solution"]["voltage_source"]["source"]["qg"]), 17.1721; atol=1)
4747

4848
vbase = case3_unbalanced_delta_loads["settings"]["vbases_default"]["sourcebus"]
49-
@test all(isapprox.(result["solution"]["bus"]["primary"]["vm"] ./ vbase, [0.98514,0.98945,0.98929]; atol=5e-2))
50-
@test all(isapprox.(result["solution"]["bus"]["loadbus"]["vm"] ./ vbase, [0.97007,0.97949,0.97916]; atol=5e-2))
49+
@test all(isapprox.(result["solution"]["bus"]["primary"]["vm"] ./ vbase, [0.98514, 0.98945, 0.98929]; atol=5e-2))
50+
@test all(isapprox.(result["solution"]["bus"]["loadbus"]["vm"] ./ vbase, [0.97007, 0.97949, 0.97916]; atol=5e-2))
5151
end
5252

5353
@testset "3-bus unbalanced fbs opf_bf with switch" begin

0 commit comments

Comments
 (0)