Added docs for shortfall and set default to -1, indicating no penalty.

This commit is contained in:
Aleksandr Kazachkov
2021-07-23 16:50:04 -04:00
parent 7a03f4bbb0
commit ea35c3ffcc
3 changed files with 7 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ function _from_json(json; repair = true)
)
shortfall_penalty = timeseries(
json["Parameters"]["Reserve shortfall penalty (\$/MW)"],
default = [0.0 for t in 1:T],
default = [-1.0 for t in 1:T],
)
# Read buses

View File

@@ -39,12 +39,12 @@ function _add_reserve_eqs!(model::JuMP.Model)::Nothing
eq_min_reserve[t] = @constraint(
model,
sum(model[:reserve][g.name, t] for g in instance.units) + (
shortfall_penalty > 1e-7 ? model[:reserve_shortfall][t] : 0.0
shortfall_penalty > -1e-7 ? model[:reserve_shortfall][t] : 0.0
) >= instance.reserves.spinning[t]
)
# Account for shortfall contribution to objective
if shortfall_penalty > 1e-7
if shortfall_penalty > -1e-7
add_to_expression!(
model.obj,
shortfall_penalty,