From 228ff3cb0cb81da05714d0fa20b107f6eafd6578 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Thu, 1 Aug 2024 12:07:16 -0600 Subject: [PATCH] add missing methods --- .../device_constructors/branch_constructor.jl | 14 +++++++++++++- src/devices_models/devices/area_interchange.jl | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/devices_models/device_constructors/branch_constructor.jl b/src/devices_models/device_constructors/branch_constructor.jl index d0cdf897b..92b8b1b6a 100644 --- a/src/devices_models/device_constructors/branch_constructor.jl +++ b/src/devices_models/device_constructors/branch_constructor.jl @@ -886,6 +886,18 @@ function construct_device!( return end +function construct_device!( + container::OptimizationContainer, + sys::PSY.System, + ::ModelConstructStage, + model::DeviceModel{PSY.AreaInterchange, StaticBranchUnbounded}, + network_model::NetworkModel{T}, +) where {T <: PM.AbstractActivePowerModel} + devices = get_available_components(model, sys) + add_feedforward_constraints!(container, model, devices) + return +end + function construct_device!( container::OptimizationContainer, sys::PSY.System, @@ -957,7 +969,7 @@ function construct_device!( ::ModelConstructStage, model::DeviceModel{PSY.AreaInterchange, StaticBranch}, network_model::NetworkModel{T}, -) where {T <: AreaBalancePowerModel} +) where {T <: PM.AbstractActivePowerModel} devices = get_available_components(model, sys) add_constraints!(container, FlowLimitConstraint, devices, model, network_model) add_feedforward_constraints!(container, model, devices) diff --git a/src/devices_models/devices/area_interchange.jl b/src/devices_models/devices/area_interchange.jl index 8e5160c9f..ac763f3f1 100644 --- a/src/devices_models/devices/area_interchange.jl +++ b/src/devices_models/devices/area_interchange.jl @@ -2,7 +2,9 @@ get_multiplier_value(::FromToFlowLimitParameter, d::PSY.AreaInterchange, ::AbstractBranchFormulation) = -1.0 * PSY.get_from_to_flow_limit(d) get_multiplier_value(::ToFromFlowLimitParameter, d::PSY.AreaInterchange, ::AbstractBranchFormulation) = PSY.get_to_from_flow_limit(d) -get_parameter_multiplier(::FixValueParameter, ::PSY.AreaInterchange, ::StaticBranch) = 1.0 +get_parameter_multiplier(::FixValueParameter, ::PSY.AreaInterchange, ::AbstractBranchFormulation) = 1.0 +get_parameter_multiplier(::LowerBoundValueParameter, ::PSY.AreaInterchange, ::AbstractBranchFormulation) = 1.0 +get_parameter_multiplier(::UpperBoundValueParameter, ::PSY.AreaInterchange, ::AbstractBranchFormulation) = 1.0 get_initial_conditions_device_model( ::OperationModel,