Skip to content

Commit bcfd5c2

Browse files
committed
Convert type of monthly_peaks_load to avoid Any[] parse
1 parent 1466582 commit bcfd5c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

julia_src/http.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ function reopt(req::HTTP.Request)
9090
model_inputs = nothing
9191
# Catch handled/unhandled exceptions in data pre-processing, JuMP setup
9292
try
93+
# Convert monthly_peaks_kw to Vector{Float64} if present in ElectricLoad
94+
if haskey(d["ElectricLoad"], "monthly_peaks_kw")
95+
d["ElectricLoad"]["monthly_peaks_kw"] = convert(Vector{Float64}, d["ElectricLoad"]["monthly_peaks_kw"])
96+
end
9397
model_inputs = reoptjl.REoptInputs(d)
9498
@info "Successfully processed REopt inputs."
9599
catch e

0 commit comments

Comments
 (0)