Commit 229caa7f authored by Allvey's avatar Allvey

修复锁定恢复BUG

parent bf68c9af
...@@ -469,9 +469,30 @@ class TruckInfo(WalkManage): ...@@ -469,9 +469,30 @@ class TruckInfo(WalkManage):
join(Equipment, EquipmentSpec.id == Equipment.equipment_spec). \ join(Equipment, EquipmentSpec.id == Equipment.equipment_spec). \
filter(Equipment.id == truck_id).first().max_speed filter(Equipment.id == truck_id).first().max_speed
def reset(self):
# 矿卡挖机绑定关系
self.truck_excavator_bind = {}
# 矿卡卸点绑定关系
self.truck_dump_bind = {}
# 矿卡挖机排斥关系
self.truck_excavator_exclude = {}
# 矿卡卸点排斥关系
self.truck_dump_exclude = {}
# 排斥关系modify
self.excavator_exclude_modify = np.full((dynamic_truck_num, dynamic_excavator_num), 0)
# 矿卡优先级
self.truck_priority = np.ones(self.dynamic_truck_num)
# 矿卡绑定物料
self.truck_material_bind = {}
# 矿卡绑定物料modify
self.dump_material_bind_modify = np.full((self.dynamic_truck_num, dynamic_excavator_num), 0)
self.excavator_material_bind_modify =np.zeros(self.dynamic_truck_num)
def para_period_update(self): def para_period_update(self):
# print("Para truck update!") # print("Para truck update!")
# 初始化参数
self.reset()
# 设备优先级启用 # 设备优先级启用
rule6 = session_mysql.query(DispatchRule).filter_by(id=6).first().disabled rule6 = session_mysql.query(DispatchRule).filter_by(id=6).first().disabled
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment