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
1
Merge Requests
1
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
c1e8ddcd
Commit
c1e8ddcd
authored
Jun 04, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis写入异常捕获
parent
3bd77b30
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
dispatcher.py
dispatcher.py
+14
-6
excavator.py
equipment/excavator.py
+5
-3
path_plannner.py
path_plan/path_plannner.py
+0
-2
No files found.
dispatcher.py
View file @
c1e8ddcd
...
...
@@ -215,6 +215,14 @@ class Dispatcher(WalkManage):
# # 计算理想车流
# opt_goto_dump_traffic_flow, opt_goto_excavator_traffic_flow = traffic_flow_plan(self.truck)
self
.
logger
.
info
(
"卸点物料修正"
)
self
.
logger
.
info
(
self
.
truck
.
dump_material_bind_modify
)
self
.
logger
.
info
(
"挖机物料修正"
)
self
.
logger
.
info
(
self
.
truck
.
excavator_material_bind_modify
)
self
.
logger
.
info
(
"挖机优先级修正"
)
self
.
logger
.
info
(
self
.
excavator
.
excavator_priority_coefficient
)
truck_uuid_to_name_dict
=
get_value
(
"truck_uuid_to_name_dict"
)
self
.
logger
.
info
(
f
"========== 调度矿卡 {truck_id} {truck_index} {truck_uuid_to_name_dict[truck_id]} =========="
)
...
...
@@ -314,8 +322,8 @@ class Dispatcher(WalkManage):
if
truck_id
in
self
.
truck
.
truck_material_bind
:
self
.
logger
.
info
(
f
'物料类型 {self.truck.truck_material_bind[truck_id]}'
)
# self.logger.info(f'驶往卸点的运输成本 {self.cost_to_dump}')
self
.
logger
.
info
(
"卸点物料修正"
)
self
.
logger
.
info
(
self
.
truck
.
dump_material_bind_modify
)
#
self.logger.info("卸点物料修正")
#
self.logger.info(self.truck.dump_material_bind_modify)
except
Exception
as
es
:
self
.
logger
.
info
(
"矿卡行程信息异常"
)
...
...
@@ -394,10 +402,10 @@ class Dispatcher(WalkManage):
self
.
logger
.
info
(
self
.
truck
.
truck_material_bind
[
truck_id
])
# self.logger.info("驶往挖机的运输成本")
# self.logger.info(self.cost_to_excavator)
self
.
logger
.
info
(
"挖机物料修正"
)
self
.
logger
.
info
(
self
.
truck
.
excavator_material_bind_modify
)
self
.
logger
.
info
(
"挖机优先级修正"
)
self
.
logger
.
info
(
self
.
excavator
.
excavator_priority_coefficient
)
#
self.logger.info("挖机物料修正")
#
self.logger.info(self.truck.excavator_material_bind_modify)
#
self.logger.info("挖机优先级修正")
#
self.logger.info(self.excavator.excavator_priority_coefficient)
except
Exception
as
es
:
self
.
logger
.
info
(
"矿卡行程信息异常"
)
self
.
logger
.
info
(
es
)
...
...
equipment/excavator.py
View file @
c1e8ddcd
...
...
@@ -78,11 +78,11 @@ class ExcavatorInfo(WalkManage):
# except Exception as es:
# self.logger.error(f"挖机 {excavator_id} 装载时间信息缺失, 已设为默认值(1min)")
# self.logger.error(es)
self
.
loading_time
[
self
.
excavator_uuid_to_index_dict
[
excavator_id
]]
=
1.00
self
.
logger
.
info
(
"loading_time"
)
self
.
logger
.
info
(
self
.
loading_time
)
self
.
logger
.
info
(
"excavator_uuid_to_index_dict"
)
self
.
logger
.
info
(
self
.
excavator_uuid_to_index_dict
)
self
.
loading_time
[
self
.
excavator_uuid_to_index_dict
[
excavator_id
]]
=
1.00
# 更新挖机设备出入时间
def
update_excavator_entrance_exit_time
(
self
):
...
...
@@ -147,8 +147,6 @@ class ExcavatorInfo(WalkManage):
for
excavator_id
in
get_value
(
"dynamic_excavator_set"
):
try
:
item
=
session_mysql
.
query
(
Equipment
)
.
filter_by
(
id
=
excavator_id
)
.
first
()
self
.
logger
.
info
(
"excavator_priority_coefficient"
)
self
.
logger
.
info
(
self
.
excavator_priority_coefficient
)
self
.
excavator_priority_coefficient
[
self
.
excavator_uuid_to_index_dict
[
excavator_id
]]
=
item
.
priority
+
1
# 物料优先级控制
...
...
@@ -170,6 +168,10 @@ class ExcavatorInfo(WalkManage):
self
.
logger
.
error
(
es
)
session_postgre
.
rollback
()
session_mysql
.
rollback
()
self
.
logger
.
info
(
"excavator_priority_coefficient"
)
self
.
logger
.
info
(
self
.
excavator_priority_coefficient
)
def
update_mining_ability
(
self
):
try
:
try
:
...
...
path_plan/path_plannner.py
View file @
c1e8ddcd
...
...
@@ -280,8 +280,6 @@ class PathPlanner(WalkManage):
for
j
in
range
(
get_value
(
"dynamic_excavator_num"
)):
load_area_index
=
self
.
excavator_index_to_load_area_index_dict
[
j
]
unload_area_index
=
self
.
dump_index_to_unload_area_index_dict
[
i
]
logger
.
info
(
"cost_to_excavator"
)
logger
.
info
(
self
.
cost_to_excavator
)
# self.cost_to_excavator[i][j] = self.cost_to_load_area[unload_area_index][load_area_index] / walk_weight[i][j] + group_walk_available[i][j]
self
.
cost_to_excavator
[
i
][
j
]
=
self
.
cost_to_load_area
[
unload_area_index
][
load_area_index
]
/
\
walk_to_excavator_weight
[
i
][
j
]
...
...
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