Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
  • Loading branch information
hdunham committed Jul 26, 2023
1 parent 8cd7974 commit f82349a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/core/urdb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,10 @@ function parse_urdb_energy_costs(d::Dict, year::Int; time_steps_per_hour=1, bigM
else
tier_use = tier
end
if non_kwh_units
rate = rate_average
total_rate = rate
else
rate = get(d["energyratestructure"][period][tier_use], "rate", 0)
total_rate = rate + get(d["energyratestructure"][period][tier_use], "adj", 0)
end

total_rate = non_kwh_units ?
rate_average :
(get(d["energyratestructure"][period][tier_use], "rate", 0) +
get(d["energyratestructure"][period][tier_use], "adj", 0))
sell = get(d["energyratestructure"][period][tier_use], "sell", 0)

for step in range(1, stop=time_steps_per_hour) # repeat hourly rates intrahour
Expand Down

0 comments on commit f82349a

Please sign in to comment.