Skip to content

Commit

Permalink
fix warning threshold for wholesale benefit
Browse files Browse the repository at this point in the history
  • Loading branch information
zolanaj committed Sep 17, 2024
1 parent 5084565 commit 9c1fd7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/results/electric_utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function add_electric_utility_results(m::JuMP.AbstractModel, p::AbstractInputs,

# add a warning if the WHL benefit is the max benefit
if :WHL in p.s.electric_tariff.export_bins
if sum(value.(m[Symbol("WHL_benefit"*_n)])) - 10*sum([ld*rate for (ld,rate) in zip(p.s.electric_load.loads_kw, p.s.electric_tariff.export_rates[:WHL])]) / value(m[Symbol("WHL_benefit"*_n)]) <= 1e-3
if abs(sum(value.(m[Symbol("WHL_benefit"*_n)])) - 10*sum([ld*rate for (ld,rate) in zip(p.s.electric_load.loads_kw, p.s.electric_tariff.export_rates[:WHL])]) / value(m[Symbol("WHL_benefit"*_n)])) <= 1e-3
@warn """Wholesale benefit is at the maximum allowable by the model; the problem is likely unbounded without this
limit in place. Check the inputs to ensure that there are practical limits for max system sizes and that
the wholesale and retail electricity rates are accurate."""
Expand Down

0 comments on commit 9c1fd7b

Please sign in to comment.