Skip to content

Bilinear delta formulation-based OptimizationContainer test#40

Draft
luke-kiernan wants to merge 11 commits intomainfrom
ac/network_benchmark
Draft

Bilinear delta formulation-based OptimizationContainer test#40
luke-kiernan wants to merge 11 commits intomainfrom
ac/network_benchmark

Conversation

@luke-kiernan
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

@luke-kiernan luke-kiernan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +115 to +116
gen_nodes = Vector{MockThermalGen}()
dem_nodes = Vector{MockLoad}()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusing name choices: these store components, not buses.

Suggested change
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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unicode divide symbol looks awfully like a minus at a glance.

Suggested change
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]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: unused argument. Same for lower bound too.

Suggested change
c::Union{Type{MockThermalGen}, Type{MockLoad}},
::Union{Type{MockThermalGen}, Type{MockLoad}},

Comment on lines +142 to +144
for (v, n) in Iterators.product(vars, nodes)
add_variables!(container, v, n, TestDeviceFormulation())
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The power consumption at loads is a known quantity, not a variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants