Add EPANET2 input format

This commit is contained in:
WQY\qiong
2023-02-28 23:04:46 +08:00
parent 97c409535f
commit ee829c0731
23 changed files with 163 additions and 0 deletions

View File

@@ -34,6 +34,13 @@ def set_control(name: str, cs: ChangeSet) -> ChangeSet:
return execute_command(name, set_control_cmd(name, cs))
#--------------------------------------------------------------
# [EPANET2]
# LINK linkID setting IF NODE nodeID {BELOW/ABOVE} level
# LINK linkID setting AT TIME value (units)
# LINK linkID setting AT CLOCKTIME value (units)
# (0) (1) (2) (3) (4) (5) (6) (7)
#--------------------------------------------------------------
def inp_in_control(section: list[str]) -> ChangeSet:
if len(section) > 0:
return ChangeSet(g_update_prefix | {'type': 'control', 'controls' : section})