From c8845f159486dae58cd20b383b7316333b76e5bd Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Tue, 2 Jan 2024 17:11:16 -0700 Subject: [PATCH] fix tests --- src/devices_models/devices/common/add_to_expression.jl | 6 +++--- test/test_utils/mock_operation_models.jl | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/devices_models/devices/common/add_to_expression.jl b/src/devices_models/devices/common/add_to_expression.jl index f37e4e729c..31340271dd 100644 --- a/src/devices_models/devices/common/add_to_expression.jl +++ b/src/devices_models/devices/common/add_to_expression.jl @@ -383,7 +383,7 @@ function add_to_expression!( ::Type{U}, devices::IS.FlattenIteratorWrapper{V}, ::DeviceModel{V, W}, - ::NetworkModel{X}, + network_model::NetworkModel{X}, ) where { T <: ActivePowerBalance, U <: FlowActivePowerToFromVariable, @@ -415,7 +415,7 @@ function add_to_expression!( ::Type{U}, devices::IS.FlattenIteratorWrapper{V}, ::DeviceModel{V, W}, - ::NetworkModel{X}, + network_model::NetworkModel{X}, ) where { T <: SystemBalanceExpressions, U <: OnVariable, @@ -429,7 +429,7 @@ function add_to_expression!( for d in devices, t in get_time_steps(container) name = PSY.get_name(d) bus_no_ = PSY.get_number(PSY.get_bus(d)) - PNM.get_mapped_bus_number(radial_branches, bus_no_) + bus_no = PNM.get_mapped_bus_number(radial_branches, bus_no_) _add_to_jump_expression!( expression[bus_no, t], variable[name, t], diff --git a/test/test_utils/mock_operation_models.jl b/test/test_utils/mock_operation_models.jl index a41128efb5..759684109c 100644 --- a/test/test_utils/mock_operation_models.jl +++ b/test/test_utils/mock_operation_models.jl @@ -117,6 +117,7 @@ function mock_construct_device!( PSI.get_network_formulation(template), PSI.get_network_model(template).subnetworks, PSI.get_system(problem), + Dict{Int64, Set{Int64}}(), ) if PSI.validate_available_devices(model, PSI.get_system(problem)) PSI.construct_device!(