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
2f1f9dca
Commit
2f1f9dca
authored
Nov 18, 2021
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复行程异常BUG
parent
b6c1a234
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
39 deletions
+39
-39
realtime_dispatch.py
realtime_dispatch.py
+39
-39
No files found.
realtime_dispatch.py
View file @
2f1f9dca
...
@@ -1316,46 +1316,46 @@ class Group(WalkManage):
...
@@ -1316,46 +1316,46 @@ class Group(WalkManage):
# 下面三个函数保证程序定期执行,不用管他
# 下面三个函数保证程序定期执行,不用管他
def
process
(
dispatcher
):
def
process
(
dispatcher
):
# try:
try
:
# 更新周期参数
# 更新周期参数
logger
.
info
(
"#####################################周期更新开始#####################################"
)
logger
.
info
(
"#####################################周期更新开始#####################################"
)
period_para_update
()
period_para_update
()
if
get_value
(
"dynamic_dump_num"
)
*
get_value
(
"dynamic_excavator_num"
)
==
0
:
if
get_value
(
"dynamic_dump_num"
)
*
get_value
(
"dynamic_excavator_num"
)
==
0
:
raise
Exception
(
"无动态派车计划可用"
)
raise
Exception
(
"无动态派车计划可用"
)
return
return
if
get_value
(
"dynamic_truck_num"
)
==
0
:
if
get_value
(
"dynamic_truck_num"
)
==
0
:
raise
Exception
(
"无动态派车可用矿卡"
)
raise
Exception
(
"无动态派车可用矿卡"
)
return
return
# para_process(dispatcher)
# para_process(dispatcher)
#
#
# state_process(dispatcher)
# state_process(dispatcher)
# 清空数据库缓存
# 清空数据库缓存
session_mysql
.
commit
()
session_mysql
.
commit
()
session_mysql
.
flush
()
session_mysql
.
flush
()
# 清空数据库缓存
# 清空数据库缓存
session_postgre
.
commit
()
session_postgre
.
commit
()
session_postgre
.
flush
()
session_postgre
.
flush
()
#
#
# # 周期更新
# # 周期更新
# dispatcher.para_period_update()
# dispatcher.para_period_update()
# 周期更新
# 周期更新
dispatcher
.
dispatcher_period_update
()
dispatcher
.
dispatcher_period_update
()
# 参数重置
# 参数重置
dispatcher
.
sim_para_reset
()
dispatcher
.
sim_para_reset
()
# try:
# 调度计算
dispatcher
.
schedule_construct
()
# except Exception as es:
# try:
# logger.error("更新不及时")
# logger.error(es)
# 调度计算
dispatcher
.
schedule_construct
()
except
Exception
as
es
:
logger
.
error
(
"更新不及时"
)
logger
.
error
(
es
)
logger
.
info
(
"#####################################周期更新结束#####################################"
)
logger
.
info
(
"#####################################周期更新结束#####################################"
)
...
...
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