Skip to content

Commit

Permalink
Merge branch 'master' into obbt
Browse files Browse the repository at this point in the history
  • Loading branch information
tasseff authored Aug 21, 2020
2 parents 86d796b + b6d734d commit cb38a01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/io/epanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ function epanet_to_watermodels!(data::Dict{String,<:Any}; import_all::Bool = fal

for (i, junction) in data["junction"]
if isapprox(junction["demand"], 0.0, atol=1.0e-7)
# copy source_id to the corresponding node before deleting the junction
nodekey = string(junction["node"])
data["node"][nodekey]["source_id"] = junction["source_id"]
delete!(data["junction"], i)
haskey(data, "time_series") && delete!(data["time_series"]["junction"], i)
end
Expand Down

0 comments on commit cb38a01

Please sign in to comment.