Skip to content

Commit

Permalink
fix single variable solution reporting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin committed Feb 5, 2020
1 parent e9072e3 commit 34fc002
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ PowerModels.jl Change Log
### Staged
- nothing

### v0.14.3
- Fixed solution reporting bug with individual variables

### v0.14.2
- Fixed solution reporting bug when component status did not match bus status

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.14.2"
version = "0.14.3"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
Expand Down
4 changes: 4 additions & 0 deletions src/core/solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ function Base.haskey(cont::JuMP.Containers.DenseAxisArray, key)
return isassigned(cont,key)
end

function Base.haskey(cont::JuMP.VariableRef, key::Int)
return (key == 1)
end

"adds values based on JuMP variables"
function add_setpoint!(
sol,
Expand Down

0 comments on commit 34fc002

Please sign in to comment.