Skip to content

Commit

Permalink
merge latest changes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin committed Aug 30, 2019
2 parents eb61672 + 27353b6 commit ad400f7
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 21 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ os:
- linux
- osx
julia:
- 1.0
- 1.1
- 1.2
- nightly
matrix:
allow_failures:
- julia: nightly
script:
- julia --project -e 'import Pkg; Pkg.build(); Pkg.instantiate()'
- julia --project -e 'import Pkg; Pkg.test(coverage=true);'
after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
codecov: true
jobs:
include:
- stage: "Documentation"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ PowerModels.jl Change Log
### Staged
- nothing

### v0.12.5
- Update to InfrastructureModels v0.3 and JuMP v0.20
- Fixed power balance duals in w-space formulations (#591)
- Dropped CI on Julia v1.0

### v0.12.4
- Fixed support for data without an explicit switch section
- Fixed support for single values in add_setpoint! and add_dual!
Expand Down
20 changes: 13 additions & 7 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BenchmarkTools]]
deps = ["JSON", "Printf", "Statistics", "Test"]
git-tree-sha1 = "5d1dd8577643ba9014574cd40d9c028cd5e4b85a"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "0.4.2"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
Expand Down Expand Up @@ -77,9 +83,9 @@ version = "0.10.3"

[[InfrastructureModels]]
deps = ["JuMP", "Memento"]
git-tree-sha1 = "59a44201fc4e7641012354d60f0eb14d7968bd7a"
git-tree-sha1 = "4739474cbd631b821dba4253c05150f1d1880d22"
uuid = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
version = "0.3.1"
version = "0.3.2"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand All @@ -93,9 +99,9 @@ version = "0.21.0"

[[JuMP]]
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "a37fdb14ee3a04b4df44c20a73da89c57035bdf2"
git-tree-sha1 = "a970a86abc924f2c126cdb4978a5e8923d0e7b22"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.19.2"
version = "0.20.0"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
Expand All @@ -115,10 +121,10 @@ deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MathOptInterface]]
deps = ["Compat", "Unicode"]
git-tree-sha1 = "5d3de69c9220610d0336ab45d3eb8b6ac7a7c807"
deps = ["BenchmarkTools", "LinearAlgebra", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
git-tree-sha1 = "5e6e36e2f01efbc62b3f8bf68c8cf82035e2c6a6"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.8.4"
version = "0.9.1"

[[Memento]]
deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"]
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Cbc = ">= 0.4"
InfrastructureModels = "~0.3.1"
Ipopt = ">= 0.4"
JSON = ">= 0.18"
JuMP = "~0.19.1"
JuMP = "~0.19.1, ~0.20"
Juniper = ">= 0.4"
MathOptInterface = "~0.8"
MathOptInterface = "~0.8, ~0.9"
Memento = "~0.10, ~0.11, ~0.12"
SCS = ">= 0.4"
julia = "^1"
Expand Down
2 changes: 0 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
2 changes: 1 addition & 1 deletion docs/src/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ These templates should be defined over `AbstractPowerModel` and should not refer
## Voltage Constraints

```@docs
constraint_voltage
constraint_model_voltage
constraint_model_voltage_on_off
constraint_model_voltage_ne
```
Expand Down
2 changes: 1 addition & 1 deletion docs/src/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ which utilizes the following (internal) functions:

```@docs
build_ref
buspair_parameters
buspair_parameters!
```
2 changes: 1 addition & 1 deletion docs/src/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ This section provides an overview of the some of the utility functions that are
To improve the quality of the convex relaxations available in PowerModels and also to obtain tightened bounds on the voltage-magnitude and phase-angle difference variables, an optimization-based bound-tightening algorithm is made available as a function in PowerModels.

```@docs
run_obbt_opf
run_obbt_opf!
```
2 changes: 1 addition & 1 deletion src/io/matpower.jl
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ function _matpower_to_powermodels!(mp_data::Dict{String,<:Any})
# use once available
InfrastructureModels.arrays_to_dicts!(pm_data)

for optional in ["dcline", "load", "shunt", "storage"]
for optional in ["dcline", "load", "shunt", "storage", "switch"]
if length(pm_data[optional]) == 0
pm_data[optional] = Dict{String,Any}()
end
Expand Down
22 changes: 22 additions & 0 deletions test/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,28 @@ end
@test isapprox(branch["mu_sm_to"], 0.0; atol = 1e-2)
end
end


result = run_opf("../test/data/matpower/case5.m", SOCWRPowerModel, ipopt_solver, setting = settings)
@testset "5 bus - kcl duals soc qp" begin
for (i, bus) in result["solution"]["bus"]
@test bus["lam_kcl_r"] <= -2900.00
@test bus["lam_kcl_r"] >= -3100.00
@test bus["lam_kcl_i"] <= 0.001
@test bus["lam_kcl_i"] >= -5.000
end
end

result = run_opf("../test/data/matpower/case5.m", SOCWRConicPowerModel, scs_solver, setting = settings)
@testset "5 bus - kcl duals soc conic" begin
for (i, bus) in result["solution"]["bus"]
@test bus["lam_kcl_r"] <= -2900.00
@test bus["lam_kcl_r"] >= -3100.00
@test bus["lam_kcl_i"] <= 0.001
@test bus["lam_kcl_i"] >= -5.000
end
end

end


Expand Down

0 comments on commit ad400f7

Please sign in to comment.