Skip to content

Commit

Permalink
Merge pull request #247 from NREL/monthly-sim-load
Browse files Browse the repository at this point in the history
Fix syntax error for length conditional
  • Loading branch information
Bill-Becker authored Aug 10, 2023
2 parents 91dddc4 + 470d853 commit 4af4f45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/simulated_load.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ function simulated_load(d::Dict)
# Monthly loads (default is empty list)
monthly_totals_kwh = get(d, "monthly_totals_kwh", Real[])
if !isempty(monthly_totals_kwh)
if length(monthly_totals_kwh != 12)
if length(monthly_totals_kwh) != 12
throw(@error("monthly_totals_kwh must contain a value for each of the 12 months"))
end
end
bad_index = []
for (i, kwh) in enumerate(monthly_totals_kwh)
if isnothing(kwh)
Expand Down Expand Up @@ -398,7 +398,7 @@ function simulated_load(d::Dict)
# Monthly loads (default is empty list)
monthly_tonhour = get(d, "monthly_tonhour", Real[])
if !isempty(monthly_tonhour)
if length(monthly_tonhour != 12)
if length(monthly_tonhour) != 12
throw(@error("monthly_tonhour must contain a value for each of the 12 months"))
end
bad_index = []
Expand Down

0 comments on commit 4af4f45

Please sign in to comment.