Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
integrated-scheduling-v3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
虢奥
integrated-scheduling-v3
Commits
88ffe739
Commit
88ffe739
authored
May 16, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控与计划不一致-解决异常
parent
23931c85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
12 deletions
+40
-12
dispatcher.py
dispatcher.py
+40
-12
No files found.
dispatcher.py
View file @
88ffe739
...
...
@@ -613,19 +613,19 @@ class Dispatcher(WalkManage):
self
.
logger
.
error
(
'error03'
)
self
.
logger
.
error
(
es
)
#
try:
# 调用调度函数,得到最优目的地序号
target_eq_index
=
self
.
truck_schedule
(
self
.
truck
.
truck_index_to_uuid_dict
[
truck_index
])
try
:
# 调用调度函数,得到最优目的地序号
target_eq_index
=
self
.
truck_schedule
(
self
.
truck
.
truck_index_to_uuid_dict
[
truck_index
])
#
except Exception as es:
# self.logger.error('error04
')
#
self.logger.error(es)
#
self.logger.error("truck_index,uuid")
#
self.logger.error(truck_index)
#
self.logger.error(self.truck.truck_index_to_uuid_dict[truck_index])
except
Exception
as
es
:
self
.
logger
.
error
(
'调度算法计算异常
'
)
self
.
logger
.
error
(
es
)
self
.
logger
.
error
(
"truck_index,uuid"
)
self
.
logger
.
error
(
truck_index
)
self
.
logger
.
error
(
self
.
truck
.
truck_index_to_uuid_dict
[
truck_index
])
# self.logger.
("target_eq_index")
# self.logger.error
(target_eq_index)
self
.
logger
.
info
(
"target_eq_index"
)
self
.
logger
.
info
(
target_eq_index
)
try
:
# 写入Seq序列
Seq
[
truck_index
][
1
]
=
target_eq_index
...
...
@@ -666,7 +666,17 @@ class Dispatcher(WalkManage):
truck_id
=
truck_id
,
group_id
=
group_id
,
isauto
=
1
,
isdeleted
=
0
,
)
.
first
())
if
item
is
None
:
raise
Exception
(
"调度计划表与实时监控不匹配"
)
except
Exception
as
es
:
self
.
logger
.
error
(
es
)
item
=
(
session_mysql
.
query
(
Dispatch
)
.
filter_by
(
truck_id
=
truck_id
,
# group_id=group_id,
isauto
=
1
,
isdeleted
=
0
,
)
.
first
())
try
:
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"dumpId"
]
=
item
.
dump_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
...
...
@@ -689,6 +699,16 @@ class Dispatcher(WalkManage):
truck_id
=
truck_id
,
group_id
=
group_id
,
isauto
=
1
,
isdeleted
=
0
,
)
.
first
())
if
item
is
None
:
raise
Exception
(
"调度计划表与实时监控不匹配"
)
except
Exception
as
es
:
self
.
logger
.
error
(
es
)
item
=
(
session_mysql
.
query
(
Dispatch
)
.
filter_by
(
truck_id
=
truck_id
,
# group_id=group_id,
isauto
=
1
,
isdeleted
=
0
,
)
.
first
())
try
:
record
[
"exactorId"
]
=
self
.
excavator
.
excavator_index_to_uuid_dict
[
Seq
[
i
][
1
]]
record
[
"dumpId"
]
=
item
.
dump_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
...
...
@@ -712,6 +732,9 @@ class Dispatcher(WalkManage):
group_id
=
group_id
,
isauto
=
1
,
isdeleted
=
0
)
.
first
())
if
item
is
None
:
raise
Exception
(
"调度计划表与实时监控不匹配"
)
self
.
logger
.
info
(
Seq
)
self
.
logger
.
info
(
Seq
[
i
][
1
])
self
.
logger
.
info
(
DeviceMap
.
excavator_index_to_uuid_dict
[
Seq
[
i
][
1
]])
...
...
@@ -719,7 +742,12 @@ class Dispatcher(WalkManage):
self
.
logger
.
info
(
"item"
)
print
(
item
.
id
,
item
.
truck_id
,
item
.
exactor_id
,
item
.
dump_id
)
except
Exception
as
es
:
self
.
logger
.
error
(
"调度结果写入异常-矿卡故障或备停区-调度计划读取异常"
)
self
.
logger
.
error
(
es
)
item
=
(
session_mysql
.
query
(
Dispatch
)
.
filter_by
(
truck_id
=
truck_id
,
# group_id=group_id,
isauto
=
1
,
isdeleted
=
0
)
.
first
())
try
:
record
[
"exactorId"
]
=
item
.
exactor_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment