Fix failing test due to wrong solution.jl input of reserve shortfall

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

@ -2,7 +2,7 @@ name = "UnitCommitment"
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
authors = ["Santos Xavier, Alinson <axavier@anl.gov>"]
repo = "https://github.com/ANL-CEEESA/UnitCommitment.jl"
version = "0.2.2"
version = "0.2.3"
[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

@ -51,9 +51,12 @@ 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)"] = OrderedDict(
t =>
(instance.shortfall_penalty[t] >= 0) ?
round(value(model[:reserve_shortfall][t]), digits = 5) : 0.0 for
t in 1:instance.time
)
sol["Net injection (MW)"] =
timeseries(model[:net_injection], instance.buses)
sol["Load curtail (MW)"] = timeseries(model[:curtail], instance.buses)

Loading…
Cancel
Save