Bilinear delta formulation-based OptimizationContainer test#40
Bilinear delta formulation-based OptimizationContainer test#40luke-kiernan wants to merge 11 commits intomainfrom
OptimizationContainer test#40Conversation
implement `create_mock_test_network` and start constructing optimizat…
There was a problem hiding this comment.
A few small things. But the bigger concern: when I run this, I get that the objective value is 0.0. I suspect it's due to the fact that you're making the power at the loads a variable, not a fixed quantity. If that isn't it, then I'd suggest taking a detailed look at the constraints and objective function for a super small case, like 2 nodes and 2 tranches.
| gen_nodes = Vector{MockThermalGen}() | ||
| dem_nodes = Vector{MockLoad}() |
There was a problem hiding this comment.
Confusing name choices: these store components, not buses.
| gen_nodes = Vector{MockThermalGen}() | |
| dem_nodes = Vector{MockLoad}() | |
| generators = Vector{MockThermalGen}() | |
| loads = Vector{MockLoad}() |
And replace throughout.
| ) | ||
| end | ||
| end | ||
| for i in 1:(N ÷ 2) |
There was a problem hiding this comment.
The unicode divide symbol looks awfully like a minus at a glance.
| for i in 1:(N ÷ 2) | |
| for i in 1:div(N, 2) |
Same throughout: could find-and-replace.
| edges[all_names[perm[i + 1]]] = [all_names[perm[i]]] | ||
| end | ||
| for _ in 1:(N ÷ 3) | ||
| i, j = shuffle(1:N)[1:2] |
There was a problem hiding this comment.
Nitpick: why generate a full shuffle of N elements if you're just going to take the first 2 anyway?
| ) = 0.8 | ||
| IOM.get_variable_upper_bound( | ||
| ::Type{VoltageVariable}, | ||
| c::Union{Type{MockThermalGen}, Type{MockLoad}}, |
There was a problem hiding this comment.
Nitpick: unused argument. Same for lower bound too.
| c::Union{Type{MockThermalGen}, Type{MockLoad}}, | |
| ::Union{Type{MockThermalGen}, Type{MockLoad}}, |
| for (v, n) in Iterators.product(vars, nodes) | ||
| add_variables!(container, v, n, TestDeviceFormulation()) | ||
| end |
There was a problem hiding this comment.
The power consumption at loads is a known quantity, not a variable.
No description provided.