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
07b16c59
Commit
07b16c59
authored
Aug 16, 2023
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周期读取路网数据更新
parent
01c5639d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
71 deletions
+4
-71
dispatcher.py
core/dispatcher.py
+2
-1
group.py
core/group.py
+2
-70
No files found.
core/dispatcher.py
View file @
07b16c59
...
...
@@ -48,7 +48,8 @@ class Dispatcher:
self
.
truck
.
truck_para_period_update
(
self
.
dump
,
self
.
excavator
)
self
.
truck
.
state_period_update
()
if
self
.
redispatch_active
:
self
.
topo
=
graph_construct
()
self
.
topo
=
Topo
()
self
.
topo
.
generate_topo_graph
()
else
:
self
.
topo
=
None
...
...
core/group.py
View file @
07b16c59
...
...
@@ -762,7 +762,7 @@ class GroupDispatcher:
truck_name
=
truck_uuid_to_name_dict
[
truck_id
]
# 获取车辆当前派车计划
if
truck_task
in
[
0
,
1
,
5
]:
if
truck_task
in
[
0
,
1
,
2
]:
excavator_index
=
int
(
truck_trip
[
1
])
dump_index
=
int
(
truck_trip
[
0
])
...
...
@@ -1214,6 +1214,7 @@ class GoThroughDispatcher:
def
__init__
(
self
,
group
:
Group
):
self
.
logger
=
get_logger
(
"zxt.GoThroughDispatcher"
)
self
.
group
=
group
self
.
gothrough_check_lanes
=
[]
def
update_lanes_info
(
self
):
...
...
@@ -1397,75 +1398,6 @@ class GoThroughDispatcher:
self
.
logger
.
error
(
es
)
return
# '''
# 2. 寻找车辆穿越装载区自动判定区域
# '''
# try:
# further_area_backtrack_node_id = further_entrance_node_id
# further_area_backtrack_lanes = []
# for truck_id in range(5):
# # 查询回溯路段对象
# item = session_postgre.query(Lane).filter_by(EndNodeId=further_area_backtrack_node_id).first()
# if item is None:
# break
# # 将路段Id加入回溯列表
# further_area_backtrack_lanes.append(str(item.Id))
# # 更新当前回溯节点
# further_area_backtrack_node_id = item.StartNodeId
#
# except Exception as es:
# self.logger.error("回溯近端装载路段异常")
# self.logger.error(es)
#
# try:
# lowest_common_ancestor = None
# closer_area_backtrack_node_id = closer_entrance_node_id
# closer_area_backtrack_lanes = []
# for truck_id in range(5):
# # 查询回溯路段对象
# item = session_postgre.query(Lane).filter_by(EndNodeId=closer_area_backtrack_node_id).first()
# if item is None:
# break
# # 若查询到共同祖先
# if str(item.Id) in further_area_backtrack_lanes:
# lowest_common_ancestor = item
# break
# # 将路段Id加入回溯列表
# closer_area_backtrack_lanes.append(str(item.Id))
# # 更新当前回溯节点
# closer_area_backtrack_node_id = item.StartNodeId
#
# # 交叉口路段
# cross_lane = str(lowest_common_ancestor.Id)
#
# except Exception as es:
# self.logger.error("回溯远端装载路段异常")
# self.logger.error(es)
# return
#
#
# self.logger.info("cross_lane")
# self.logger.info(cross_lane)
#
# # 截取远端入场点到交叉口的路段
# further_area_backtrack_lanes = further_area_backtrack_lanes[0:further_area_backtrack_lanes.index(cross_lane)]
#
# # 穿越装载区检查路段
# gothrough_check_lanes = [cross_lane]
#
# try:
# # 多回溯一个路段
# if lowest_common_ancestor.Length < 200:
# item = session_postgre.query(Lane).filter_by(EndNodeId=lowest_common_ancestor.StartNodeId).first()
# gothrough_check_lanes.append(item.Id)
#
# self.logger.info("gothrough_check_lanes")
# self.logger.info(gothrough_check_lanes)
#
# except Exception as es:
# self.logger.error("穿越装载区交叉口判断异常")
# self.logger.error(es)
'''
3. 调度判断逻辑
'''
...
...
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