mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
Ran JuliaFormatter
This commit is contained in:
@@ -51,9 +51,9 @@ function solution(model::JuMP.Model)::OrderedDict
|
|||||||
sol["Switch on"] = timeseries(model[:switch_on], instance.units)
|
sol["Switch on"] = timeseries(model[:switch_on], instance.units)
|
||||||
sol["Switch off"] = timeseries(model[:switch_off], instance.units)
|
sol["Switch off"] = timeseries(model[:switch_off], instance.units)
|
||||||
sol["Reserve (MW)"] = timeseries(model[:reserve], instance.units)
|
sol["Reserve (MW)"] = timeseries(model[:reserve], instance.units)
|
||||||
sol["Reserve shortfall (MW)"] = (model[:instance].shortfall_penalty[t] >= 0) ?
|
sol["Reserve shortfall (MW)"] =
|
||||||
model[:reserve_shortfall] :
|
(model[:instance].shortfall_penalty[t] >= 0) ?
|
||||||
[0 for t in 1:T]
|
model[:reserve_shortfall] : [0 for t in 1:T]
|
||||||
sol["Net injection (MW)"] =
|
sol["Net injection (MW)"] =
|
||||||
timeseries(model[:net_injection], instance.buses)
|
timeseries(model[:net_injection], instance.buses)
|
||||||
sol["Load curtail (MW)"] = timeseries(model[:curtail], 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
|
# Verify spinning reserves
|
||||||
reserve =
|
reserve =
|
||||||
sum(solution["Reserve (MW)"][g.name][t] for g in instance.units)
|
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
|
solution["Reserve shortfall (MW)"][t] : 0
|
||||||
|
|
||||||
if reserve + reserve_shortfall < instance.reserves.spinning[t] - tol
|
if reserve + reserve_shortfall < instance.reserves.spinning[t] - tol
|
||||||
|
|||||||
Reference in New Issue
Block a user