Commit 68e15802 authored by 张晓彤's avatar 张晓彤

720Bug修复

parent 0298ee18
......@@ -15,6 +15,7 @@ from para_config import DeviceMap, get_value, global_period_para_update
from equipment import TruckInfo, ExcavatorInfo, DumpInfo
from core.schedule import PreSchedule
import json
import uuid
import numpy as np
from datetime import datetime, timedelta
......@@ -149,7 +150,8 @@ class DispatchSubmission:
# 其余调度信息写入
try:
record["dispatchId"] = item.id
# record["dispatchId"] = item.id
record["dispatchId"] = str(uuid.uuid1())
record["exactorId"] = item.exactor_id
record["loadAreaId"] = item.load_area_id
record["dumpId"] = item.dump_id
......@@ -195,7 +197,8 @@ class DispatchSubmission:
# 调度信息写入
try:
record["dispatchId"] = item.id
# record["dispatchId"] = item.id
record["dispatchId"] = str(uuid.uuid1())
record["exactorId"] = item.exactor_id
record["loadAreaId"] = item.load_area_id
record["dumpId"] = item.dump_id
......@@ -246,7 +249,8 @@ class DispatchSubmission:
# 调度信息写入
try:
record["dispatchId"] = item.id
# record["dispatchId"] = item.id
record["dispatchId"] = str(uuid.uuid1())
record["exactorId"] = item.exactor_id
record["loadAreaId"] = item.load_area_id
record["dumpId"] = item.dump_id
......@@ -285,6 +289,10 @@ class DispatchSubmission:
:param dispatch_plan_dict: (Dict)
:return: None
"""
self.logger.info("dispatch_plan_dict")
self.logger.info(dispatch_plan_dict)
for truck_id, dispatch_plan in dispatch_plan_dict.items():
self.logger.info(f'======================================= 调度车辆 =======================================')
self.logger.info(f'矿车编号 {get_value("truck_uuid_to_name_dict")[truck_id]} {truck_id}')
......
......@@ -221,7 +221,7 @@ class Group:
min_index = np.argmin(next_unload_area_value)
next_unload_area_id = self.unload_area_uuid_index_dict.inverse[min_index]
# next_excavator_id = self.excavator_uuid_index_dict.inverse[truck_trip[-1]]
next_excavator_id = get_value("excavator_uuid_index_dict")[truck_trip[-1]]
next_excavator_id = get_value("excavator_index_to_uuid_dict")[truck_trip[-1]]
truck_dispatch[i] = [next_excavator_id, next_unload_area_id]
except Exception as es:
......
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