From 2d48c84f1aa74257a96a8e0fc13ebfbd26ee6ce9 Mon Sep 17 00:00:00 2001 From: Aleksandr Kazachkov Date: Fri, 23 Jul 2021 22:57:16 -0400 Subject: [PATCH] Ran JuliaFormatter --- src/solution/solution.jl | 6 +++--- src/validation/validate.jl | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/solution/solution.jl b/src/solution/solution.jl index 419fe40..06844ab 100644 --- a/src/solution/solution.jl +++ b/src/solution/solution.jl @@ -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) diff --git a/src/validation/validate.jl b/src/validation/validate.jl index d55a460..d342ef9 100644 --- a/src/validation/validate.jl +++ b/src/validation/validate.jl @@ -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