Merge pull request #12 from mtanneau/mt/FixDuplicateStartup

Fix duplicated startup constraint
feature/net-injection
Alinson S. Xavier 4 years ago committed by GitHub
commit 4daf38906d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,14 +12,14 @@ function _add_startup_cost_eqs!(
S = length(g.startup_categories) S = length(g.startup_categories)
startup = model[:startup] startup = model[:startup]
for t in 1:model[:instance].time for t in 1:model[:instance].time
for s in 1:S
# If unit is switching on, we must choose a startup category # If unit is switching on, we must choose a startup category
eq_startup_choose[g.name, t, s] = @constraint( eq_startup_choose[g.name, t] = @constraint(
model, model,
model[:switch_on][g.name, t] == model[:switch_on][g.name, t] ==
sum(startup[g.name, t, s] for s in 1:S) sum(startup[g.name, t, s] for s in 1:S)
) )
for s in 1:S
# If unit has not switched off in the last `delay` time periods, startup category is forbidden. # If unit has not switched off in the last `delay` time periods, startup category is forbidden.
# The last startup category is always allowed. # The last startup category is always allowed.
if s < S if s < S

Loading…
Cancel
Save