Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
integrated-scheduling
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
Commits
f253bc25
Commit
f253bc25
authored
Sep 17, 2021
by
Allvey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复锁定恢复BUG
parent
3c2d53dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
truck.py
equipment/truck.py
+22
-0
realtime_dispatch.py
realtime_dispatch.py
+0
-22
No files found.
equipment/truck.py
View file @
f253bc25
...
@@ -459,8 +459,30 @@ class TruckInfo(WalkManage):
...
@@ -459,8 +459,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
):
# 初始化参数
self
.
reset
()
# 设备优先级启用
# 设备优先级启用
rule6
=
session_mysql
.
query
(
DispatchRule
)
.
filter_by
(
id
=
6
)
.
first
()
.
disabled
rule6
=
session_mysql
.
query
(
DispatchRule
)
.
filter_by
(
id
=
6
)
.
first
()
.
disabled
...
...
realtime_dispatch.py
View file @
f253bc25
...
@@ -214,10 +214,6 @@ class Dispatcher(WalkManage):
...
@@ -214,10 +214,6 @@ class Dispatcher(WalkManage):
# 更新实际交通流
# 更新实际交通流
def
update_actual_traffic_flow
(
self
):
def
update_actual_traffic_flow
(
self
):
loading_time
=
self
.
excavator
.
get_loading_time
()
unloading_time
=
self
.
dump
.
get_unloading_time
()
loading_task_time
=
self
.
excavator
.
get_loading_task_time
()
loading_task_time
=
self
.
excavator
.
get_loading_task_time
()
unloading_task_time
=
self
.
dump
.
get_unloading_task_time
()
unloading_task_time
=
self
.
dump
.
get_unloading_task_time
()
...
@@ -229,24 +225,6 @@ class Dispatcher(WalkManage):
...
@@ -229,24 +225,6 @@ class Dispatcher(WalkManage):
dynamic_dump_num
=
self
.
dump
.
get_dump_num
()
dynamic_dump_num
=
self
.
dump
.
get_dump_num
()
dynamic_excavator_num
=
self
.
excavator
.
get_excavator_num
()
dynamic_excavator_num
=
self
.
excavator
.
get_excavator_num
()
# for item in session_mysql.query(EquipmentPair).filter(EquipmentPair.createtime >= self.start_time).all():
# dump_index = self.dump_uuid_to_index_dict[item.dump_id]
# excavator_index = self.excavator_uuid_to_index_dict[item.exactor_id]
# task = truck_current_task[item.truck_id]
# if task in heavy_task_set:
# self.goto_dump_truck_num[dump_index][excavator_index] = \
# self.goto_dump_truck_num[dump_index][excavator_index] + 1
# self.actual_goto_dump_traffic_flow[dump_index][excavator_index] = \
# self.actual_goto_dump_traffic_flow[dump_index][excavator_index] + float(
# payload[self.truck_uuid_to_index_dict[item.truck_id]])
# if task in empty_task_set or task == -2:
# self.goto_excavator_truck_num[dump_index][excavator_index] = \
# self.goto_excavator_truck_num[dump_index][excavator_index] + 1
# print(item.truck_id)
# self.actual_goto_excavator_traffic_flow[dump_index][excavator_index] = \
# self.actual_goto_excavator_traffic_flow[dump_index][excavator_index] + float(
# payload[self.truck_uuid_to_index_dict[item.truck_id]])
self
.
goto_dump_truck_num
=
np
.
zeros
((
dynamic_excavator_num
,
dynamic_dump_num
))
self
.
goto_dump_truck_num
=
np
.
zeros
((
dynamic_excavator_num
,
dynamic_dump_num
))
self
.
actual_goto_dump_traffic_flow
=
np
.
zeros
(
self
.
actual_goto_dump_traffic_flow
=
np
.
zeros
(
(
dynamic_excavator_num
,
dynamic_dump_num
)
(
dynamic_excavator_num
,
dynamic_dump_num
)
...
...
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