Skip to content

Commit

Permalink
Merge pull request #847 from lanl-ansi/fix-output-api-test
Browse files Browse the repository at this point in the history
Fix Solution Test for Infeasible Models
  • Loading branch information
ccoffrin authored Dec 1, 2022
2 parents cbce397 + 3a17fa6 commit 15b2544
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ PowerModels.jl Change Log
=========================

### Staged
- nothing

### v0.19.7
- Improve linear algebra test robustness (#827)
- Fix `make_multinetwork` and add test (#823)
- Fix SDP solution reporting consistency (#833)
- Fix solution output test for infeasible models

### v0.19.6
- Add specialized version of `sol_component_fixed` for PowerModels (#821)
Expand Down
2 changes: 1 addition & 1 deletion 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.6"
version = "0.19.7"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
Expand Down
5 changes: 4 additions & 1 deletion test/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

@test haskey(result, "optimizer") == true
@test haskey(result, "termination_status") == true
@test result["termination_status"] == LOCALLY_SOLVED
@test haskey(result, "primal_status") == true
@test result["primal_status"] == FEASIBLE_POINT
@test haskey(result, "dual_status") == true
@test haskey(result, "objective") == true
@test haskey(result, "objective_lb") == true
Expand Down Expand Up @@ -33,12 +35,13 @@

@test haskey(result, "optimizer")
@test haskey(result, "termination_status")
@test result["termination_status"] == INFEASIBLE
@test haskey(result, "primal_status")
@test result["primal_status"] == NO_SOLUTION
@test haskey(result, "dual_status")
@test haskey(result, "solve_time")
@test haskey(result, "solution")
@test !isnan(result["solve_time"])
@test length(result["solution"]) == 0
end
end

Expand Down

0 comments on commit 15b2544

Please sign in to comment.