|
35 | 35 | r = optimize_switches!(args)
|
36 | 36 |
|
37 | 37 | @test all(_r["termination_status"] == OPTIMAL for (n,_r) in r)
|
38 |
| - @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 176.86; atol=1) |
| 38 | + @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 118.30; atol=1) |
39 | 39 | end
|
40 | 40 |
|
41 | 41 | @testset "test rolling-horizon optimal switching - lindistflow - traditional" begin
|
|
53 | 53 | r = optimize_switches!(args)
|
54 | 54 |
|
55 | 55 | @test all(_r["termination_status"] == OPTIMAL for (n,_r) in r)
|
56 |
| - @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 176.86; atol=1) |
| 56 | + @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 118.30; atol=1) |
57 | 57 | end
|
58 | 58 |
|
59 | 59 | @testset "test rolling-horizon optimal switching - nfa - block" begin
|
|
69 | 69 | r = optimize_switches!(args)
|
70 | 70 |
|
71 | 71 | @test all(_r["termination_status"] == OPTIMAL for (n,_r) in r)
|
72 |
| - @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 109.94; atol=1) |
| 72 | + @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 108.75; atol=1) |
73 | 73 | end
|
74 | 74 |
|
75 | 75 | @testset "test rolling-horizon optimal switching - nfa - traditional" begin
|
|
85 | 85 | r = optimize_switches!(args)
|
86 | 86 |
|
87 | 87 | @test all(_r["termination_status"] == OPTIMAL for (n,_r) in r)
|
88 |
| - @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 109.94; atol=1) |
| 88 | + @test isapprox(sum(Float64[_r["objective"] for _r in values(r)]), 108.85; atol=1) |
89 | 89 | end
|
90 | 90 | end
|
91 | 91 |
|
|
102 | 102 | r = optimize_switches!(args)
|
103 | 103 |
|
104 | 104 | @test first(r).second["termination_status"] == OPTIMAL
|
105 |
| - @test isapprox(r["1"]["objective"], 82.06; atol=1) |
| 105 | + @test isapprox(r["1"]["objective"], 80.47; atol=1) |
106 | 106 | end
|
107 | 107 |
|
108 | 108 | @testset "test full-lookahead optimal switching - lindistflow - traditional" begin
|
|
138 | 138 | r = optimize_switches!(args)
|
139 | 139 |
|
140 | 140 | @test first(r).second["termination_status"] == OPTIMAL
|
141 |
| - @test isapprox(r["1"]["objective"], 80.64; atol=1) |
| 141 | + @test isapprox(r["1"]["objective"], 79.46; atol=1) |
142 | 142 | end
|
143 | 143 |
|
144 | 144 | @testset "test full-lookahead optimal switching - lindistflow - traditional - radial-disabled - inverter-disabled" begin
|
|
155 | 155 | r = optimize_switches!(args)
|
156 | 156 |
|
157 | 157 | @test first(r).second["termination_status"] == OPTIMAL
|
158 |
| - @test isapprox(r["1"]["objective"], 80.65; atol=1) |
| 158 | + @test isapprox(r["1"]["objective"], 79.46; atol=1) |
159 | 159 | end
|
160 | 160 |
|
161 | 161 | @testset "test full-lookahead optimal switching - nfa - block" begin
|
|
170 | 170 | r = optimize_switches!(args)
|
171 | 171 |
|
172 | 172 | @test first(r).second["termination_status"] == OPTIMAL
|
173 |
| - @test isapprox(r["1"]["objective"], 72.52; atol=1) |
| 173 | + @test isapprox(r["1"]["objective"], 71.32; atol=1) |
174 | 174 | end
|
175 | 175 |
|
176 | 176 | @testset "test full-lookahead optimal switching - nfa - traditional" begin
|
|
185 | 185 | r = optimize_switches!(args)
|
186 | 186 |
|
187 | 187 | @test first(r).second["termination_status"] == OPTIMAL
|
188 |
| - @test isapprox(r["1"]["objective"], 72.52; atol=1) |
| 188 | + @test isapprox(r["1"]["objective"], 71.32; atol=1) |
189 | 189 | end
|
190 | 190 |
|
191 | 191 | @testset "test robust switching - lindistflow - block" begin
|
|
244 | 244 | r = solve_block_mld(eng_s, LPUBFDiagPowerModel, solver)
|
245 | 245 |
|
246 | 246 | @test r["solution"]["switch"]["680675"]["state"] == OPEN
|
247 |
| - @test r["solution"]["switch"]["671692"]["state"] == OPEN |
| 247 | + @test r["solution"]["switch"]["671692"]["state"] == CLOSED |
248 | 248 | @test length(filter(x->x.second["state"]==OPEN, r["solution"]["switch"])) == 2
|
249 | 249 | @test r["objective"] < 1.0
|
250 | 250 |
|
|
253 | 253 |
|
254 | 254 | r = solve_block_mld(eng_s, LPUBFDiagPowerModel, solver)
|
255 | 255 |
|
256 |
| - @test r["solution"]["switch"]["680675"]["state"] == OPEN |
| 256 | + @test r["solution"]["switch"]["680675"]["state"] == CLOSED |
257 | 257 | @test r["solution"]["switch"]["671692"]["state"] == OPEN
|
258 | 258 | @test length(filter(x->x.second["state"]==OPEN, r["solution"]["switch"])) == 2
|
259 | 259 | @test r["objective"] < 1.0
|
|
0 commit comments