Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin committed Jan 1, 2024
2 parents 4da2510 + 010b6ee commit bb1c116
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ PowerModels.jl Change Log
- Drop support for JuMP v0.22 and v0.23 (breaking)
- Drop support for JSON v0.18, v0.19, v0.20 (breaking)

### Staged
### v0.19.10
- Add support for ACP and DCP formulation in OPF with PST variables (#543,#875)
- Fix implementation of `calc_theta_delta_bounds` when conductor parameter is used (#870)
- Update tests for SCS v2.0

### v0.19.9
- Fix implementation of polynomial costs above quadratic
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "PowerModels"
uuid = "c36e90e8-916a-50a6-bd94-075b64ef4655"
authors = ["Carleton Coffrin"]
repo = "https://github.com/lanl-ansi/PowerModels.jl"
version = "0.19.9"
version = "0.19.10"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
Expand All @@ -22,7 +22,7 @@ JuMP = "1"
Juniper = "~0.9"
Memento = "~1.0, ~1.1, ~1.2, ~1.3, ~1.4"
NLsolve = "4.0"
SCS = "~1.1"
SCS = "~0.9, ~1.0, ~2.0"
julia = "1.6"

[extras]
Expand Down
18 changes: 9 additions & 9 deletions test/opf-var.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ end
# relaxed for cross platform compat with SCS v1.0.1
@test isapprox(result["objective"], 15402.05; atol = 2e1)
end
# issue with reaching ITERATION_LIMIT, SCS v2.0, JuMP v1.7
@testset "14-bus case" begin
data = build_current_data("../test/data/matpower/case14.m")
result = PowerModels._solve_opf_cl(data, SDPWRMPowerModel, sdp_solver)

@test result["termination_status"] == OPTIMAL || result["termination_status"] == ALMOST_OPTIMAL
#@test isapprox(result["objective"], 7505.33; atol = 1e0)
@test isapprox(result["objective"], 7637.95; atol = 1e0)
end
# issue with reaching ITERATION_LIMIT, SCS v2.0, JuMP v1.17
# @testset "14-bus case" begin
# data = build_current_data("../test/data/matpower/case14.m")
# result = PowerModels._solve_opf_cl(data, SDPWRMPowerModel, sdp_solver)

# @test result["termination_status"] == OPTIMAL || result["termination_status"] == ALMOST_OPTIMAL
# @test isapprox(result["objective"], 7505.33; atol = 1e0)
# #@test isapprox(result["objective"], 7637.95; atol = 1e0)
# end
end

end
Expand Down
9 changes: 5 additions & 4 deletions test/opf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,11 @@ end

@test haskey(result["solution"],"WR")
@test haskey(result["solution"],"WI")
@test isapprox(result["solution"]["bus"]["1"]["w"], 1.210, atol = 1e-2)
#@test isapprox(result["solution"]["bus"]["1"]["w"], 1.179, atol = 1e-2)
@test isapprox(result["solution"]["bus"]["1"]["w"], 1.209, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wr"], 0.941, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.284, atol = 1e-2)
#@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.269, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.284, atol = 1e-2)
end
@testset "5-bus asymmetric case" begin
result = run_opf("../test/data/matpower/case5_asym.m", SDPWRMPowerModel, sdp_solver)
Expand Down Expand Up @@ -955,6 +955,7 @@ end
result = run_opf("../test/data/matpower/case6.m", SDPWRMPowerModel, sdp_solver)

@test result["termination_status"] == OPTIMAL
#@test isapprox(result["objective"], 11580.8; atol = 1e1)
#@test isapprox(result["objective"], 11507.7; atol = 1e1)
@test isapprox(result["objective"], 11580.5; atol = 1e1)
end
Expand All @@ -976,11 +977,11 @@ end

@test haskey(result["solution"]["w_group"]["1"],"WR")
@test haskey(result["solution"]["w_group"]["1"],"WI")
@test isapprox(result["solution"]["bus"]["1"]["w"], 1.210, atol = 1e-2)
#@test isapprox(result["solution"]["bus"]["1"]["w"], 1.179, atol = 1e-2)
@test isapprox(result["solution"]["bus"]["1"]["w"], 1.209, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wr"], 0.941, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.284, atol = 1e-2)
#@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.269, atol = 1e-2)
@test isapprox(result["solution"]["branch"]["1"]["wi"], 0.284, atol = 1e-2)
end
@testset "5-bus with asymmetric line charge" begin
result = run_opf("../test/data/pti/case5_alc.raw", SparseSDPWRMPowerModel, sdp_solver)
Expand Down

0 comments on commit bb1c116

Please sign in to comment.