Ran JuliaFormatter

pull/16/head
Aleksandr Kazachkov 4 years ago
parent 718d6af96b
commit 2d48c84f1a

@ -51,9 +51,9 @@ function solution(model::JuMP.Model)::OrderedDict
sol["Switch on"] = timeseries(model[:switch_on], instance.units)
sol["Switch off"] = timeseries(model[:switch_off], instance.units)
sol["Reserve (MW)"] = timeseries(model[:reserve], instance.units)
sol["Reserve shortfall (MW)"] = (model[:instance].shortfall_penalty[t] >= 0) ?
model[:reserve_shortfall] :
[0 for t in 1:T]
sol["Reserve shortfall (MW)"] =
(model[:instance].shortfall_penalty[t] >= 0) ?
model[:reserve_shortfall] : [0 for t in 1:T]
sol["Net injection (MW)"] =
timeseries(model[:net_injection], instance.buses)
sol["Load curtail (MW)"] = timeseries(model[:curtail], instance.buses)

@ -324,7 +324,8 @@ function _validate_reserve_and_demand(instance, solution, tol = 0.01)
# Verify spinning reserves
reserve =
sum(solution["Reserve (MW)"][g.name][t] for g in instance.units)
reserve_shortfall = (instance.shortfall_penalty[t] >= 0) ?
reserve_shortfall =
(instance.shortfall_penalty[t] >= 0) ?
solution["Reserve shortfall (MW)"][t] : 0
if reserve + reserve_shortfall < instance.reserves.spinning[t] - tol

Loading…
Cancel
Save