-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jd/hvdc model #1003
Jd/hvdc model #1003
Conversation
…ulations.jl into jd/hvdc_model
@@ -27,6 +27,7 @@ const JuMPVariableMatrix = DenseAxisArray{ | |||
const JuMPFloatArray = DenseAxisArray{Float64} | |||
const JuMPVariableArray = DenseAxisArray{JuMP.VariableRef} | |||
|
|||
const TwoTerminalHVDCTypes = Union{PSY.TwoTerminalHVDCLine, PSY.TwoTerminalVSCDCLine} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an abstract type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is much value in an additional abstraction in PSY for this.
devices = | ||
get_available_components(T, sys, get_attribute(model, "filter_function")) | ||
add_constraints!(container, FlowRateConstraint, devices, model, network_model) | ||
add_constraint_dual!(container, sys, model) | ||
return | ||
end | ||
|
||
# Repeated method to avoid ambiguity between HVDCP2PUnbounded and HVDCP2PLossless | ||
# Repeated method to avoid ambiguity between HVDCTwoTerminalUnbounded and HVDCTwoTerminalLossless |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth refactoring to make each duplicate function call a common function such that no logic is duplicated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would still cause the same issue because the arguments will still be ambiguous
src/feedforward/feedforwards.jl
Outdated
@@ -26,7 +26,7 @@ function attach_feedforward!( | |||
ff_ = T(; | |||
component_type = get_component_type(ff), | |||
source = get_entry_type(get_optimization_container_key(ff)), | |||
affected_values = [get_entry_type(get_optimization_container_key(ff))], | |||
affected_values = affected_values = get_entry_type.(get_affected_values(ff)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
affected_values = affected_values = get_entry_type.(get_affected_values(ff)), | |
affected_values = affected_values = | |
get_entry_type.(get_affected_values(ff)), |
closes #926
closes #917