Skip to content

Commit 5c1cab2

Browse files
authored
Remove Inf Bounds (#639)
closes #630 * skip variable add bounds when Inf * add tests for no inf bounds in opf models * add note to changelog * update package deps
1 parent bfe08dd commit 5c1cab2

File tree

9 files changed

+294
-155
lines changed

9 files changed

+294
-155
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ PowerModels.jl Change Log
22
=========================
33

44
### Staged
5+
- Remove `Inf` bounds from variables (#630)
56
- Removal of unused functions in `solution.jl`: `get_solution`, `add_generator_power_setpoint`, `add_storage_setpoint`, `add_branch_flow_setpoint`, `add_dcline_flow_setpoint` (breaking) (#637)
67

78
### v0.13.1

Manifest.toml

+19-27
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
1010
version = "0.4.3"
1111

1212
[[BinDeps]]
13-
deps = ["Compat", "Libdl", "SHA", "URIParser"]
14-
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
13+
deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"]
14+
git-tree-sha1 = "66158ad56b4bf6cc8413b37d0b7bc52402682764"
1515
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
16-
version = "0.8.10"
16+
version = "1.0.0"
1717

1818
[[BinaryProvider]]
1919
deps = ["Libdl", "SHA"]
@@ -33,12 +33,6 @@ git-tree-sha1 = "efdaf19ab11c7889334ca247ff4c9f7c322817b0"
3333
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
3434
version = "0.2.0"
3535

36-
[[Compat]]
37-
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
38-
git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
39-
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
40-
version = "2.2.0"
41-
4236
[[DataStructures]]
4337
deps = ["InteractiveUtils", "OrderedCollections"]
4438
git-tree-sha1 = "a1b652fb77ae8ca7ea328fa7ba5aa151036e5c10"
@@ -49,21 +43,17 @@ version = "0.17.6"
4943
deps = ["Printf"]
5044
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
5145

52-
[[DelimitedFiles]]
53-
deps = ["Mmap"]
54-
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
55-
5646
[[DiffResults]]
57-
deps = ["Compat", "StaticArrays"]
58-
git-tree-sha1 = "34a4a1e8be7bc99bc9c611b895b5baf37a80584c"
47+
deps = ["StaticArrays"]
48+
git-tree-sha1 = "da24935df8e0c6cf28de340b958f6aac88eaa0cc"
5949
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
60-
version = "0.0.4"
50+
version = "1.0.2"
6151

6252
[[DiffRules]]
6353
deps = ["NaNMath", "Random", "SpecialFunctions"]
64-
git-tree-sha1 = "f734b5f6bc9c909027ef99f6d91d5d9e4b111eed"
54+
git-tree-sha1 = "10dca52cf6d4a62d82528262921daf63b99704a2"
6555
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
66-
version = "0.1.0"
56+
version = "1.0.0"
6757

6858
[[Distributed]]
6959
deps = ["Random", "Serialization", "Sockets"]
@@ -77,9 +67,9 @@ version = "0.9.5"
7767

7868
[[ForwardDiff]]
7969
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
80-
git-tree-sha1 = "da46ac97b17793eba44ff366dc6cb70f1238a738"
70+
git-tree-sha1 = "840700059391d36e2498d89c2e82c08f261f2a2a"
8171
uuid = "f6369f11-7733-5829-9624-2563aa707210"
82-
version = "0.10.7"
72+
version = "0.10.8"
8373

8474
[[InfrastructureModels]]
8575
deps = ["JuMP", "Memento"]
@@ -121,10 +111,10 @@ deps = ["Base64"]
121111
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
122112

123113
[[MathOptInterface]]
124-
deps = ["BenchmarkTools", "LinearAlgebra", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
125-
git-tree-sha1 = "78427dcc212e0c0ad9658049bc56a50303ad9737"
114+
deps = ["BenchmarkTools", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
115+
git-tree-sha1 = "026c2e55361bc3fdc3287a563e27f32ec4853549"
126116
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
127-
version = "0.9.7"
117+
version = "0.9.8"
128118

129119
[[Memento]]
130120
deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"]
@@ -140,6 +130,12 @@ git-tree-sha1 = "bd2623f8b728af988d2afec53d611acb621f3bc4"
140130
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
141131
version = "0.7.0"
142132

133+
[[MutableArithmetics]]
134+
deps = ["LinearAlgebra", "SparseArrays", "Test"]
135+
git-tree-sha1 = "fa3483f453a97a8d442810ca939165bf0b370d2e"
136+
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
137+
version = "0.1.1"
138+
143139
[[NaNMath]]
144140
git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
145141
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
@@ -179,10 +175,6 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
179175
[[Serialization]]
180176
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
181177

182-
[[SharedArrays]]
183-
deps = ["Distributed", "Mmap", "Random", "Serialization"]
184-
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
185-
186178
[[Sockets]]
187179
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
188180

src/core/ref.jl

+1-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ function ref_calc_branch_flow_bounds(branches, buses, conductor::Int=1)
8686
flow_lb[i] = max(flow_lb[i], -branch["c_rating_a"][conductor]*m_vmax)
8787
flow_ub[i] = min(flow_ub[i], branch["c_rating_a"][conductor]*m_vmax)
8888
end
89-
9089
end
9190

9291
return flow_lb, flow_ub
@@ -154,7 +153,6 @@ function ref_calc_voltage_product_bounds(buspairs, conductor::Int=1)
154153
wi_max[bp] = buspair["vm_fr_max"]*buspair["vm_to_max"]*sin(buspair["angmax"])
155154
wi_min[bp] = buspair["vm_fr_max"]*buspair["vm_to_max"]*sin(buspair["angmin"])
156155
end
157-
158156
end
159157

160158
return wr_min, wr_max, wi_min, wi_max
@@ -163,7 +161,7 @@ end
163161

164162
"computes storage bounds"
165163
function ref_calc_storage_injection_bounds(storage, buses, conductor::Int=1)
166-
injection_lb = Dict()
164+
injection_lb = Dict()
167165
injection_ub = Dict()
168166

169167
for (i, strg) in storage

0 commit comments

Comments
 (0)