Skip to content

Commit

Permalink
move population of city, year to populate electric load inputs for co…
Browse files Browse the repository at this point in the history
…oling defaults
  • Loading branch information
zolanaj committed Aug 29, 2023
1 parent 6ca5b8e commit 9702ba8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/core/simulated_load.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ function simulated_load(d::Dict)
throw(@error("Please supply a doe_reference_name and optional scaling parameters (annual_tonhour or monthly_tonhour)."))
end

city = get(d, "city", nothing)
if isnothing(city)
city = find_ashrae_zone_city(latitude, longitude)
end
year = doe_reference_name "" || blended_doe_reference_names String[] ? 2017 : 2022

elec_load_inputs = Dict{Symbol, Any}()
# Get the default cooling load (used when we want cooling load without annual_tonhour input) - using the cooling doe reference name
# Get the default electric load for the building(s), used for fractions
Expand All @@ -362,6 +368,7 @@ function simulated_load(d::Dict)
latitude=latitude,
longitude=longitude,
annual_kwh=nothing,
year=year,
monthly_totals_kwh=Real[]
)

Expand All @@ -377,11 +384,7 @@ function simulated_load(d::Dict)
cooling_load_inputs[:doe_reference_name] = cooling_doe_ref_name[1]
end

city = get(d, "city", nothing)
if isnothing(city)
city = find_ashrae_zone_city(latitude, longitude)
end
year = doe_reference_name "" || blended_doe_reference_names String[] ? 2017 : 2022


annual_tonhour = get(d, "annual_tonhour", nothing)
monthly_tonhour = get(d, "monthly_tonhour", Real[])
Expand Down

0 comments on commit 9702ba8

Please sign in to comment.