Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
[compat]
Documenter = "0.27"
Gumbo = "0.8"
Pluto = "0.19"
Pluto = "0.19, 0.20"
18 changes: 18 additions & 0 deletions src/PowerModelsDistribution.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module PowerModelsDistribution
# test change
# File path utilities
import Glob
import FilePaths
Expand Down Expand Up @@ -49,6 +50,23 @@ module PowerModelsDistribution

Logging.global_logger(_LOGGER)
end

const _PKG_ROOT = dirname(dirname(pathof(PowerModelsDistribution)))
const CASE3B = joinpath(
_PKG_ROOT,
"test",
"data",
"opendss",
"case3_balanced.dss",
)

const CASE3U = joinpath(
_PKG_ROOT,
"test",
"data",
"opendss",
"case3_unbalanced.dss",
)

include("core/base.jl")
include("core/types.jl")
Expand Down
2 changes: 1 addition & 1 deletion test/en_opf_bounds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function calc_sol_pmd(data_math, form; optimizer=ipopt_solver)
pm = instantiate_mc_model(data_math, form, build_mc_opf)
res = optimize_model!(pm, optimizer=optimizer)
@test res["termination_status"] == LOCALLY_SOLVED
@test res["termination_status"] ∈ [LOCALLY_SOLVED, ALMOST_LOCALLY_SOLVED]
sol_pmd = transform_solution(res["solution"], data_math, make_si=true)
return sol_pmd
end
Expand Down
8 changes: 4 additions & 4 deletions test/opf_bf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@

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

@test result["termination_status"] == LOCALLY_SOLVED
@test result["primal_status"] == FEASIBLE_POINT

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

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

@testset "3-bus unbalanced fbs opf_bf with switch" begin
Expand Down
Loading