From 7002474c5114176d959a9f03376d92758a491175 Mon Sep 17 00:00:00 2001 From: rodrigomha Date: Thu, 10 Oct 2024 15:18:16 -0700 Subject: [PATCH] add variable to Copperplate model --- .../device_constructors/branch_constructor.jl | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/devices_models/device_constructors/branch_constructor.jl b/src/devices_models/device_constructors/branch_constructor.jl index 8230cef82..2991efc59 100644 --- a/src/devices_models/device_constructors/branch_constructor.jl +++ b/src/devices_models/device_constructors/branch_constructor.jl @@ -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,