Skip to content

Commit

Permalink
QC-OTS tests and changelog (#196)
Browse files Browse the repository at this point in the history
* Bug fix on QC-OTS formulation

``relaxation_product_on_off(pm.model, vm_fr[i], vm_to[j], vv[l], z[l])`` to ``relaxation_product_on_off(pm.model, vm_fr[l], vm_to[l], vv[l], z[l])``
  • Loading branch information
kaarthiksundar authored and ccoffrin committed Nov 15, 2017
1 parent d5f39ab commit d3d23bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PowerModels.jl Change Log
=================

### Staged
- Fixed bug in QC-OTS formulation
- Added lambda-based convex hull relaxation scheme for trilinear products
- Added QCWRTri Power Flow formulation

Expand Down
2 changes: 1 addition & 1 deletion src/form/wr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ function constraint_voltage_on_off{T <: QCWRForm}(pm::GenericPowerModel{T}, n::I

relaxation_sin_on_off(pm.model, td[l], si[l], z[l], td_max)
relaxation_cos_on_off(pm.model, td[l], cs[l], z[l], td_max)
relaxation_product_on_off(pm.model, vm_fr[i], vm_to[j], vv[l], z[l])
relaxation_product_on_off(pm.model, vm_fr[l], vm_to[l], vv[l], z[l])
relaxation_product_on_off(pm.model, vv[l], cs[l], wr[l], z[l])
relaxation_product_on_off(pm.model, vv[l], si[l], wi[l], z[l])

Expand Down
4 changes: 2 additions & 2 deletions test/ots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ end
check_br_status(result["solution"])

@test result["status"] == :Optimal
@test isapprox(result["objective"], 15001.6; atol = 1e0)
@test isapprox(result["objective"], 14999.7; atol = 1e0)
end
@testset "5-bus asymmetric case" begin
result = run_ots("../test/data/case5_asym.m", QCWRPowerModel, pajarito_solver)

check_br_status(result["solution"])

@test result["status"] == :Optimal
@test isapprox(result["objective"], 15009.4; atol = 1e0)
@test isapprox(result["objective"], 14999.7; atol = 1e0)
end
@testset "6-bus case" begin
result = run_ots("../test/data/case6.m", QCWRPowerModel, pajarito_solver)
Expand Down

0 comments on commit d3d23bb

Please sign in to comment.