We should not dump REGION/BOUND/REGION_NODES to v2 inp file

This commit is contained in:
DingZQ
2025-02-05 16:01:18 +08:00
parent 08a4d4d2bb
commit 8751347103
2 changed files with 19 additions and 1 deletions

View File

@@ -53,7 +53,13 @@ def dump_inp(project: str, inp: str, version: str = '3'):
file = open(path, mode='w',encoding="UTF-8")
for name in section_name:
# REGION, BOUND, REGION_NODES 在 epanet v2 中没有,是我们自己定制的
# v2 需要去掉我们自己定制的 section
sections = section_names_for_epanetv2
if version == '3':
sections = section_name
for name in sections:
if name == TITLE:
file.write(f'[{name}]\n')
else: