Skip to content

Commit

Permalink
don't add constraints if factor is 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 1, 2023
1 parent a6b2bcf commit e0d9715
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services_models/reserves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand All @@ -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")
Expand Down

0 comments on commit e0d9715

Please sign in to comment.