590
590
result = run_opf (" ../test/data/matpower/case3.m" , SOCWRConicPowerModel, sdp_solver)
591
591
592
592
@test result[" termination_status" ] == OPTIMAL
593
- @test isapprox (result[" objective" ], 5736.94 ; atol = 2e0 )
594
- # @test isapprox(result["objective"], 5747.37; atol = 2e0)
593
+ # @test isapprox(result["objective"], 5736.94; atol = 2e0)
594
+ @test isapprox (result[" objective" ], 5747.37 ; atol = 2e0 )
595
595
end
596
596
@testset " 5-bus transformer swap case" begin
597
597
result = run_opf (" ../test/data/matpower/case5.m" , SOCWRConicPowerModel, sdp_solver)
@@ -621,31 +621,31 @@ end
621
621
result = run_opf (" ../test/data/matpower/case5_npg.m" , SOCWRConicPowerModel, sdp_solver)
622
622
623
623
@test result[" termination_status" ] == OPTIMAL
624
- @test isapprox (result[" objective" ], 3551.71 ; atol = 40 )
625
- # @test isapprox(result["objective"], 3602.11; atol = 40)
624
+ # @test isapprox(result["objective"], 3551.71; atol = 40)
625
+ @test isapprox (result[" objective" ], 3602.11 ; atol = 40 )
626
626
end
627
627
@testset " 5-bus with pwl costs" begin
628
628
result = run_opf (" ../test/data/matpower/case5_pwlc.m" , SOCWRConicPowerModel, sdp_solver)
629
629
630
630
@test result[" termination_status" ] == OPTIMAL
631
- @test isapprox (result[" objective" ], 42889 ; atol = 1e0 )
632
- # @test isapprox(result["objective"], 42906; atol = 1e0)
631
+ # @test isapprox(result["objective"], 42889; atol = 1e0)
632
+ @test isapprox (result[" objective" ], 42906 ; atol = 1e0 )
633
633
end
634
634
@testset " 6-bus case" begin
635
635
result = run_opf (" ../test/data/matpower/case6.m" , SOCWRConicPowerModel, sdp_solver)
636
636
637
637
@test result[" termination_status" ] == OPTIMAL
638
638
# @test isapprox(result["objective"], 11472.2; atol = 3e0)
639
- @test isapprox (result[" objective" ], 11451.5 ; atol = 3e0 )
640
- # @test isapprox(result["objective"], 11473.4; atol = 3e0)
639
+ # @test isapprox(result["objective"], 11451.5; atol = 3e0)
640
+ @test isapprox (result[" objective" ], 11473.4 ; atol = 3e0 )
641
641
end
642
642
@testset " 24-bus rts case" begin
643
643
result = run_opf (" ../test/data/matpower/case24.m" , SOCWRConicPowerModel, sdp_solver)
644
644
645
645
@test result[" termination_status" ] == OPTIMAL
646
646
# @test isapprox(result["objective"], 70693.9; atol = 1e0)
647
- @test isapprox (result[" objective" ], 70670.0 ; atol = 1e0 )
648
- # @test isapprox(result["objective"], 70683.5; atol = 1e0)
647
+ # @test isapprox(result["objective"], 70670.0; atol = 1e0)
648
+ @test isapprox (result[" objective" ], 70683.5 ; atol = 1e0 )
649
649
end
650
650
@testset " 14-bus variable bounds" begin
651
651
pm = instantiate_model (" ../test/data/matpower/case14.m" , SOCWRConicPowerModel, PowerModels. build_opf)
@@ -906,14 +906,16 @@ end
906
906
result = run_opf (" ../test/data/matpower/case3.m" , SDPWRMPowerModel, sdp_solver)
907
907
908
908
@test result[" termination_status" ] == OPTIMAL
909
- @test isapprox (result[" objective" ], 5818.00 ; atol = 1e1 )
910
- # @test isapprox(result["objective"], 5852.51; atol = 1e1)
909
+ # @test isapprox(result["objective"], 5818.00; atol = 1e1)
910
+ @test isapprox (result[" objective" ], 5852.51 ; atol = 1e1 )
911
911
912
912
@test haskey (result[" solution" ]," WR" )
913
913
@test haskey (result[" solution" ]," WI" )
914
- @test isapprox (result[" solution" ][" bus" ][" 1" ][" w" ], 1.179 , atol = 1e-2 )
914
+ # @test isapprox(result["solution"]["bus"]["1"]["w"], 1.179, atol = 1e-2)
915
+ @test isapprox (result[" solution" ][" bus" ][" 1" ][" w" ], 1.209 , atol = 1e-2 )
915
916
@test isapprox (result[" solution" ][" branch" ][" 1" ][" wr" ], 0.941 , atol = 1e-2 )
916
- @test isapprox (result[" solution" ][" branch" ][" 1" ][" wi" ], 0.269 , atol = 1e-2 )
917
+ # @test isapprox(result["solution"]["branch"]["1"]["wi"], 0.269, atol = 1e-2)
918
+ @test isapprox (result[" solution" ][" branch" ][" 1" ][" wi" ], 0.284 , atol = 1e-2 )
917
919
end
918
920
@testset " 5-bus asymmetric case" begin
919
921
result = run_opf (" ../test/data/matpower/case5_asym.m" , SDPWRMPowerModel, sdp_solver)
938
940
939
941
@test result[" termination_status" ] == OPTIMAL
940
942
# @test isapprox(result["objective"], 6827.34; atol = 1e0)
941
- @test isapprox (result[" objective" ], 6735.17 ; atol = 1e0 )
942
- # @test isapprox(result["objective"], 6827.71; atol = 1e0)
943
+ # @test isapprox(result["objective"], 6735.17; atol = 1e0)
944
+ @test isapprox (result[" objective" ], 6827.71 ; atol = 1e0 )
943
945
end
944
946
# too slow for unit tests
945
947
# @testset "14-bus case" begin
953
955
954
956
@test result[" termination_status" ] == OPTIMAL
955
957
# @test isapprox(result["objective"], 11580.8; atol = 1e1)
956
- @test isapprox (result[" objective" ], 11507.7 ; atol = 1e1 )
957
- # @test isapprox(result["objective"], 11580.5; atol = 1e1)
958
+ # @test isapprox(result["objective"], 11507.7; atol = 1e1)
959
+ @test isapprox (result[" objective" ], 11580.5 ; atol = 1e1 )
958
960
end
959
961
@testset " 14-bus variable bounds" begin
960
962
pm = instantiate_model (" ../test/data/matpower/case14.m" , SDPWRMPowerModel, PowerModels. build_opf)
@@ -969,14 +971,16 @@ end
969
971
970
972
@test result[" termination_status" ] == OPTIMAL
971
973
# @test isapprox(result["objective"], 5851.23; atol = 1e1)
972
- @test isapprox (result[" objective" ], 5818.00 ; atol = 1e1 )
973
- # @test isapprox(result["objective"], 5852.51; atol = 1e1)
974
+ # @test isapprox(result["objective"], 5818.00; atol = 1e1)
975
+ @test isapprox (result[" objective" ], 5852.51 ; atol = 1e1 )
974
976
975
977
@test haskey (result[" solution" ][" w_group" ][" 1" ]," WR" )
976
978
@test haskey (result[" solution" ][" w_group" ][" 1" ]," WI" )
977
- @test isapprox (result[" solution" ][" bus" ][" 1" ][" w" ], 1.179 , atol = 1e-2 )
979
+ # @test isapprox(result["solution"]["bus"]["1"]["w"], 1.179, atol = 1e-2)
980
+ @test isapprox (result[" solution" ][" bus" ][" 1" ][" w" ], 1.209 , atol = 1e-2 )
978
981
@test isapprox (result[" solution" ][" branch" ][" 1" ][" wr" ], 0.941 , atol = 1e-2 )
979
- @test isapprox (result[" solution" ][" branch" ][" 1" ][" wi" ], 0.269 , atol = 1e-2 )
982
+ # @test isapprox(result["solution"]["branch"]["1"]["wi"], 0.269, atol = 1e-2)
983
+ @test isapprox (result[" solution" ][" branch" ][" 1" ][" wi" ], 0.284 , atol = 1e-2 )
980
984
end
981
985
@testset " 5-bus with asymmetric line charge" begin
982
986
result = run_opf (" ../test/data/pti/case5_alc.raw" , SparseSDPWRMPowerModel, sdp_solver)
0 commit comments