Skip to content

Commit

Permalink
Avoid updating Site outdoor air input with nothing/null
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Becker committed Sep 10, 2024
1 parent f8b5b63 commit 3276d77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions julia_src/http.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,20 @@ function reopt(req::HTTP.Request)
chiller_dict = Dict(key=>getfield(model_inputs.s.existing_chiller, key) for key in inputs_with_defaults_from_chiller)
else
chiller_dict = Dict()
end
end
if !isnothing(model_inputs.s.site.outdoor_air_temperature_degF)
site_dict = Dict(:outdoor_air_temperature_degF => model_inputs.s.site.outdoor_air_temperature_degF)
else
site_dict = Dict()
end
inputs_with_defaults_set_in_julia = Dict(
"Financial" => Dict(key=>getfield(model_inputs.s.financial, key) for key in inputs_with_defaults_from_easiur),
"ElectricUtility" => Dict(key=>getfield(model_inputs.s.electric_utility, key) for key in inputs_with_defaults_from_avert_or_cambium),
"CHP" => chp_dict,
"SteamTurbine" => steamturbine_dict,
"GHP" => ghp_dict,
"ExistingChiller" => chiller_dict,
"Site" => Dict(key=>getfield(model_inputs.s.site, key) for key in [:outdoor_air_temperature_degF]),
"Site" => site_dict,
)
catch e
@error "Something went wrong in REopt optimization!" exception=(e, catch_backtrace())
Expand Down

0 comments on commit 3276d77

Please sign in to comment.