Drop demand & pattern from junction
This commit is contained in:
@@ -185,6 +185,8 @@ def _read_inp(file: dict[str, list[str]]) -> ChangeSet:
|
||||
coords = inp_in_coord(section)
|
||||
for s in ['JUNCTIONS', 'RESERVOIRS', 'TANKS']:
|
||||
for node in file_cs[s].operations:
|
||||
if node['type'] == 'demand':
|
||||
continue
|
||||
if node['id'] in coords:
|
||||
coord = coords[node['id']]
|
||||
node |= { 'x' : coord['x'], 'y' : coord['y'] }
|
||||
@@ -204,10 +206,6 @@ def _read_inp(file: dict[str, list[str]]) -> ChangeSet:
|
||||
elif name == 'END':
|
||||
pass # :)
|
||||
|
||||
# if demand section is empty, fill it with junction data
|
||||
demands_cs = fill_demand(file_cs['JUNCTIONS'], file_cs['DEMANDS'])
|
||||
file_cs['DEMANDS'].merge(demands_cs)
|
||||
|
||||
# release file
|
||||
file = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user