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

pull/16/head
Aleksandr Kazachkov 4 years ago
parent 7a03f4bbb0
commit ea35c3ffcc

@ -28,13 +28,14 @@ Each section is described in detail below. For a complete example, see [case14](
### Parameters ### Parameters
This section describes system-wide parameters, such as power balance penalties, optimization parameters, such as the length of the planning horizon and the time. This section describes system-wide parameters, such as power balance and reserve shortfall penalties, and optimization parameters, such as the length of the planning horizon and the time.
| Key | Description | Default | Time series? | Key | Description | Default | Time series?
| :----------------------------- | :------------------------------------------------ | :------: | :------------: | :----------------------------- | :------------------------------------------------ | :------: | :------------:
| `Time horizon (h)` | Length of the planning horizon (in hours). | Required | N | `Time horizon (h)` | Length of the planning horizon (in hours). | Required | N
| `Time step (min)` | Length of each time step (in minutes). Must be a divisor of 60 (e.g. 60, 30, 20, 15, etc). | `60` | N | `Time step (min)` | Length of each time step (in minutes). Must be a divisor of 60 (e.g. 60, 30, 20, 15, etc). | `60` | N
| `Power balance penalty ($/MW)` | Penalty for system-wide shortage or surplus in production (in $/MW). This is charged per time step. For example, if there is a shortage of 1 MW for three time steps, three times this amount will be charged. | `1000.0` | Y | `Power balance penalty ($/MW)` | Penalty for system-wide shortage or surplus in production (in $/MW). This is charged per time step. For example, if there is a shortage of 1 MW for three time steps, three times this amount will be charged. | `1000.0` | Y
| `Reserve shortfall penalty (\$/MW)` | Penalty for system-wide shortage in meeting reserve requirements (in $/MW). This is charged per time step. Negative value implies no penalty. | `-1` | Y
#### Example #### Example
@ -43,6 +44,7 @@ This section describes system-wide parameters, such as power balance penalties,
"Parameters": { "Parameters": {
"Time horizon (h)": 4, "Time horizon (h)": 4,
"Power balance penalty ($/MW)": 1000.0 "Power balance penalty ($/MW)": 1000.0
"Reserve shortfall penalty ($/MW)": -1.0
} }
} }
``` ```

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

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

Loading…
Cancel
Save