mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 22:15:04 +00:00
添加了run column和filter through的protocol,亲测能跑
This commit is contained in:
@@ -8,7 +8,8 @@ def is_integrated_pump(node_name):
|
||||
|
||||
def find_connected_pump(G, valve_node):
|
||||
for neighbor in G.neighbors(valve_node):
|
||||
if "pump" in G.nodes[neighbor]["class"]:
|
||||
node_class = G.nodes[neighbor].get("class") or "" # 防止 None
|
||||
if "pump" in node_class:
|
||||
return neighbor
|
||||
raise ValueError(f"未找到与阀 {valve_node} 唯一相连的泵节点")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user