修复管道清洗算法流量单位取值bug
This commit is contained in:
@@ -345,7 +345,8 @@ def flushing_analysis(
|
||||
# status['setting'] = 0.1036 * pow(valve_k, -3.105)
|
||||
# cs.append(status)
|
||||
# set_status(new_name,cs)
|
||||
units = get_option(new_name)
|
||||
options = get_option(new_name)
|
||||
units = options["UNITS"]
|
||||
# step 2. set the emitter coefficient of drainage node or add flush flow to the drainage node
|
||||
emitter_demand = get_demand(new_name, drainage_node_ID)
|
||||
cs = ChangeSet()
|
||||
|
||||
@@ -1190,12 +1190,12 @@ def run_simulation(
|
||||
if modify_valve_opening[valve_name] == 0:
|
||||
valve_status["status"] = "CLOSED"
|
||||
valve_status["setting"] = 0
|
||||
if modify_valve_opening[valve_name] < 1:
|
||||
elif modify_valve_opening[valve_name] < 1:
|
||||
valve_status["status"] = "OPEN"
|
||||
valve_status["setting"] = 0.1036 * pow(
|
||||
modify_valve_opening[valve_name], -3.105
|
||||
)
|
||||
if modify_valve_opening[valve_name] == 1:
|
||||
elif modify_valve_opening[valve_name] == 1:
|
||||
valve_status["status"] = "OPEN"
|
||||
valve_status["setting"] = 0
|
||||
cs = ChangeSet()
|
||||
|
||||
Reference in New Issue
Block a user