Skip to content

Commit

Permalink
Merge pull request #1159 from NREL-Sienna/rh/fix_unbounded_hvdc_model
Browse files Browse the repository at this point in the history
Fix Unbounded HVDC model for Copperplate
  • Loading branch information
jd-lara authored Oct 11, 2024
2 parents 2095cf1 + 7002474 commit a0626bb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/devices_models/device_constructors/branch_constructor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,37 @@ function construct_device!(
return
end

function construct_device!(
container::OptimizationContainer,
sys::PSY.System,
::ArgumentConstructStage,
model::DeviceModel{T, HVDCTwoTerminalUnbounded},
network_model::NetworkModel{CopperPlatePowerModel},
) where {T <: TwoTerminalHVDCTypes}
devices = get_available_components(model, sys)
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded())
add_to_expression!(
container,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
network_model,
)
return
end

function construct_device!(
container::OptimizationContainer,
sys::PSY.System,
::ModelConstructStage,
device_model::DeviceModel{<:TwoTerminalHVDCTypes, HVDCTwoTerminalUnbounded},
::NetworkModel{CopperPlatePowerModel},
)
add_constraint_dual!(container, sys, device_model)
return
end

# Repeated method to avoid ambiguity between HVDCTwoTerminalUnbounded and HVDCTwoTerminalLossless
function construct_device!(
container::OptimizationContainer,
Expand Down

0 comments on commit a0626bb

Please sign in to comment.