Skip to content

Commit

Permalink
fix make sub hr time step export rates work
Browse files Browse the repository at this point in the history
  • Loading branch information
hdunham committed Dec 17, 2024
1 parent 156d035 commit 5fc1160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/electric_tariff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Check length of e and upsample if length(e) != N
"""
function create_export_rate(e::AbstractArray{<:Real, 1}, N::Int, ts_per_hour::Int=1)
Ne = length(e)
if Ne != Int(N/ts_per_hour) || Ne != N
if Ne != Int(N/ts_per_hour) && Ne != N
throw(@error("Export rates do not have correct number of entries. Must be $(N) or $(Int(N/ts_per_hour))."))
end
if Ne != N # upsample
Expand Down

0 comments on commit 5fc1160

Please sign in to comment.