Skip to content

Commit

Permalink
Update to JuMP v0.19 (#507)
Browse files Browse the repository at this point in the history
Updates for JuMP v0.19 / MOI
Changes "solver" to "optimizer" everywhere to be consistent with JuMP/MOI language.
Updates documentation to use `with_optimizer()` syntax convention.
* `norm(x) <= t` --> `[t, x...] in SecondOrderCone()`
* `getupperbound` --> `upper_bound`
* `getlowerbound` --> `lower_bound`
* `lowerbound`, `upperbound`, and `basename` in `@variable` to `lower_bound`, `upper_bound` and `base_name`, respectively
* `start=0.0` added to `@variable` calls with no start value
* `Variable` --> `VariableRef`
* `@SDconstraint(pm, [] >= 0` --> use `@constraint(pm, [] in PSDCone())`
  • Loading branch information
ccoffrin authored May 13, 2019
1 parent 457fd38 commit 5fbe8c1
Show file tree
Hide file tree
Showing 50 changed files with 787 additions and 525 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ julia:
matrix:
allow_failures:
- julia: nightly
addons:
apt_packages:
- gfortran
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())'
jobs:
Expand Down
5 changes: 5 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.10.0
- Update to JuMP v0.19/MathOptInterface

### v0.9.8
- Added a test network with dangling buses, case5_db.m
- Fixed voltage bound persistence bug in acr formulation (#497)
Expand All @@ -27,6 +30,8 @@ PowerModels.jl Change Log
- Added generator on/off constraints
- Added opf model with unit commitment (#475)
- Fixed multiconductor support for ACR formulation
- Removed support for Julia versions < 1.0
- Update syntax to be compatible with JuMP v0.19 / MathOptInterface

### v0.9.4
- Added all error messages to memento log
Expand Down
26 changes: 10 additions & 16 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ version = "0.10.3"

[[InfrastructureModels]]
deps = ["JuMP", "Memento"]
git-tree-sha1 = "6f8198d3088666e7638a58914dc3f3be8504b0cf"
git-tree-sha1 = "ec3f1ba27dbfd29a93f3c520ee189ce32deec049"
uuid = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
version = "0.0.16"
version = "0.2.0"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand All @@ -92,10 +92,10 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.20.0"

[[JuMP]]
deps = ["Calculus", "Compat", "ForwardDiff", "Libdl", "MathProgBase", "Pkg", "ReverseDiffSparse", "Serialization"]
git-tree-sha1 = "3bd8e52f7aeb2736a8e1b0d8ae8d01c2c85fea24"
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "5df42febdee8ac7db9de66c712e439a6ff06459d"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.18.5"
version = "0.19.1"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
Expand All @@ -114,11 +114,11 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MathProgBase]]
deps = ["Compat"]
git-tree-sha1 = "3bf2e534e635df810e5f4b4f1a8b6de9004a0d53"
uuid = "fdba3010-5040-5b88-9595-932c9decdf73"
version = "0.7.7"
[[MathOptInterface]]
deps = ["Compat", "Unicode"]
git-tree-sha1 = "5d3de69c9220610d0336ab45d3eb8b6ac7a7c807"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.8.4"

[[Memento]]
deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"]
Expand Down Expand Up @@ -169,12 +169,6 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[ReverseDiffSparse]]
deps = ["Calculus", "Compat", "DataStructures", "ForwardDiff", "MathProgBase", "NaNMath"]
git-tree-sha1 = "cbbc2c710abea5cfe71459ce4711d80a212aac5a"
uuid = "89212889-6d3f-5f97-b412-7825138f6c9c"
version = "0.8.6"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

Expand Down
15 changes: 7 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@ name = "PowerModels"
uuid = "c36e90e8-916a-50a6-bd94-075b64ef4655"
authors = ["Carleton Coffrin"]
repo = "https://github.com/lanl-ansi/PowerModels.jl"
version = "0.9.8"
version = "0.10.0"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
Cbc = ">= 0.4"
InfrastructureModels = "< 0.2"
InfrastructureModels = "^0.2"
Ipopt = ">= 0.4"
JuMP = "< 0.19"
Juniper = "< 0.4"
JuMP = "^0.19.1"
Juniper = ">= 0.4"
MathOptInterface = "^0.8"
Memento = "~0.10, ~0.11, ^0.12"
Pavito = "^0.1"
SCS = ">= 0.4"
julia = "^1"

[extras]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
Juniper = "2ddba703-00a4-53a7-87a5-e8b9971dde84"
MathProgBase = "fdba3010-5040-5b88-9595-932c9decdf73"
Pavito = "cd433a01-47d1-575d-afb7-6db927ee8d8f"
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "MathProgBase", "Ipopt", "SCS", "Cbc", "Juniper", "Pavito"]
test = ["Test", "Ipopt", "SCS", "Cbc", "Juniper"]
1 change: 0 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Manifest.toml

246 changes: 246 additions & 0 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "SHA"]
git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.4"

[[Calculus]]
deps = ["Compat"]
git-tree-sha1 = "f60954495a7afcee4136f78d1d60350abd37a409"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.4.1"

[[CommonSubexpressions]]
deps = ["Test"]
git-tree-sha1 = "efdaf19ab11c7889334ca247ff4c9f7c322817b0"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.2.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.1.0"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections", "Random", "Serialization", "Test"]
git-tree-sha1 = "ca971f03e146cf144a9e2f2ce59674f5bf0e8038"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.15.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[DiffResults]]
deps = ["Compat", "StaticArrays"]
git-tree-sha1 = "34a4a1e8be7bc99bc9c611b895b5baf37a80584c"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "0.0.4"

[[DiffRules]]
deps = ["Random", "Test"]
git-tree-sha1 = "dc0869fb2f5b23466b32ea799bd82c76480167f7"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "0.0.10"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "4d30e889c9f106a51ffa4791a88ffd4765bf20c3"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.7.0"

[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"]
git-tree-sha1 = "13a6d15102410d8e70146533b759fc48d844a1d0"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.22.3"

[[EzXML]]
deps = ["BinaryProvider", "Libdl", "Pkg", "Printf", "Test"]
git-tree-sha1 = "ad00b79cca4bb3eabb4209217859c553af4401f5"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "0.9.1"

[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "InteractiveUtils", "LinearAlgebra", "NaNMath", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "Test"]
git-tree-sha1 = "4c4d727f1b7e0092134fabfab6396b8945c1ea5b"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.3"

[[InfrastructureModels]]
deps = ["JuMP", "Memento"]
git-tree-sha1 = "ec3f1ba27dbfd29a93f3c520ee189ce32deec049"
repo-rev = "moi-2"
repo-url = "https://github.com/lanl-ansi/InfrastructureModels.jl.git"
uuid = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
version = "0.2.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JSON]]
deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"]
git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.20.0"

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

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MathOptInterface]]
deps = ["Compat", "Unicode"]
git-tree-sha1 = "5d3de69c9220610d0336ab45d3eb8b6ac7a7c807"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.8.4"

[[Memento]]
deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"]
git-tree-sha1 = "090463b13da88689e5eae6468a6f531a21392175"
uuid = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
version = "0.12.1"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Mocking]]
deps = ["Compat", "Dates"]
git-tree-sha1 = "4bf69aaf823b119b034e091e16b18311aa191663"
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.5.7"

[[NaNMath]]
deps = ["Compat"]
git-tree-sha1 = "ce3b85e484a5d4c71dd5316215069311135fa9f2"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.2"

[[Nullables]]
deps = ["Compat"]
git-tree-sha1 = "ae1a63457e14554df2159b0b028f48536125092d"
uuid = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd"
version = "0.0.8"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"]
git-tree-sha1 = "0b45dc2e45ed77f445617b99ff2adf0f5b0f23ea"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.7.2"

[[StaticArrays]]
deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"]
git-tree-sha1 = "3841b39ed5f047db1162627bf5f80a9cd3e39ae2"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "0.10.3"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Syslogs]]
deps = ["Compat", "Nullables"]
git-tree-sha1 = "d3e512a044cc8873c741d88758f8e1888c7c47d3"
uuid = "cea106d9-e007-5e6c-ad93-58fe2094e9c4"
version = "0.2.0"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TimeZones]]
deps = ["Dates", "EzXML", "Mocking", "Printf", "Serialization", "Test", "Unicode"]
git-tree-sha1 = "fdf5d2136d16498cb67d648cedd33b83c599e0c5"
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
version = "0.9.0"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
3 changes: 1 addition & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ using Documenter, PowerModels

makedocs(
modules = [PowerModels],
format = :html,
format = Documenter.HTML(analytics = "UA-367975-10"),
sitename = "PowerModels",
authors = "Carleton Coffrin, Russell Bent, and contributors.",
analytics = "UA-367975-10",
pages = [
"Home" => "index.md",
"Manual" => [
Expand Down
Loading

0 comments on commit 5fbe8c1

Please sign in to comment.