From e0d971510d88bde996f13f07bfa4559093d59d16 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Thu, 31 Aug 2023 19:23:07 -0600 Subject: [PATCH] don't add constraints if factor is 1.0 --- src/services_models/reserves.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services_models/reserves.jl b/src/services_models/reserves.jl index 1735b893a6..a2be43e5ea 100644 --- a/src/services_models/reserves.jl +++ b/src/services_models/reserves.jl @@ -160,6 +160,12 @@ function add_constraints!( V <: AbstractReservesFormulation, U <: Union{Vector{D}, IS.FlattenIteratorWrapper{D}}, } where {D <: PSY.Device} + max_participation_factor = PSY.max_participation_factor(service) + + if max_participation_factor >= 1.0 + return + end + time_steps = get_time_steps(container) service_name = PSY.get_name(service) cons = add_constraints_container!( @@ -171,7 +177,6 @@ function add_constraints!( meta = service_name, ) var_r = get_variable(container, ActivePowerReserveVariable(), SR, service_name) - max_participation_factor = PSY.max_participation_factor(service) jump_model = get_jump_model(container) requirement = PSY.get_requirement(service) ts_vector = get_time_series(container, service, "requirement")