Add update demand into batch command

This commit is contained in:
WQY\qiong
2022-10-21 23:27:17 +08:00
parent b15348f857
commit 2341d7f675

View File

@@ -5,6 +5,7 @@ from .s4_tanks import *
from .s5_pipes import *
from .s6_pumps import *
from .s7_valves import *
from .s9_demands import *
def execute_add_command(name: str, cs: ChangeSet) -> ChangeSet:
@@ -43,6 +44,8 @@ def execute_update_command(name: str, cs: ChangeSet) -> ChangeSet:
return set_pump(name, cs)
elif type == VALVE:
return set_valve(name, cs)
elif type == 'demand':
return set_demand(name, cs)
return ChangeSet()