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
b93d0b4a
Commit
b93d0b4a
authored
Jun 24, 2025
by
Allvey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加穿越装载区距离判断,增加配置文件因子(暂时未启用)
parent
9930df8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
31 deletions
+40
-31
config.json
config.json
+2
-1
group.py
core/group.py
+36
-28
versiontag.py
versiontag.py
+2
-2
No files found.
config.json
View file @
b93d0b4a
...
...
@@ -28,7 +28,8 @@
},
"gothrough"
:
{
"closer_area_name"
:
"哈装测试"
,
"further_area_name"
:
"哈装2"
"further_area_name"
:
"哈装2"
,
"factor"
:
0.6
},
"geom"
:
{
"redispatch_minimal_distance"
:
40
...
...
core/group.py
View file @
b93d0b4a
...
...
@@ -562,40 +562,46 @@ class GroupDispatcher:
self
.
logger
.
info
(
"穿越装载区调度开启"
)
# 更新判定路段区域
self
.
gothroghdispatcher
.
update_lanes_info
()
try
:
# 获取近端装载区入场点经纬度信息
excavator_prise_location
=
get_excavator_prise_location
(
self
.
gothroghdispatcher
.
closer_excavator_id
)
# 获取车辆经纬度信息
truck_prise_location
=
self
.
group
.
truck
.
truck_current_prise_location
[
truck_id
]
except
Exception
as
es
:
self
.
logger
.
error
(
"挖机或车辆经纬信息未知"
)
self
.
logger
.
error
(
es
)
excavator_prise_location
=
[
-
1
,
-
1
]
truck_prise_location
=
[
-
1
,
-
1
]
self
.
logger
.
info
(
f
'挖机经纬度信息 {excavator_prise_location}'
)
self
.
logger
.
info
(
f
'车辆经纬度信息 {truck_prise_location}'
)
cross_lane
=
self
.
gothroghdispatcher
.
update_lanes_info
()
from
haversine
import
haversine
# 获取车辆经纬度信息
truck_prise_location
=
self
.
group
.
truck
.
truck_current_prise_location
[
truck_id
]
truck_to_entrance_point_dis
=
haversine
(
excavator_prise_location
,
truck_prise_location
)
self
.
logger
.
info
(
f
'车辆到近端装载区入场点距离 {truck_to_entrance_point_dis}
'
)
if
not
is_close_to_cross
(
cross_lane
,
truck_prise_location
):
self
.
logger
.
info
(
f
'距离过近无法触发穿越装载区调度
'
)
# 若车辆到入场点距离大于指定阈值
if
excavator_prise_location
[
0
]
!=
-
1
and
\
truck_prise_location
[
0
]
!=
-
1
and
\
haversine
(
excavator_prise_location
,
truck_prise_location
)
>
0.001
and
\
truck_locate
in
self
.
gothroghdispatcher
.
closer_area_backtrack_lanes
[
0
:
2
]:
try
:
self
.
logger
.
info
(
"触发穿越装载区调度"
)
planned
=
self
.
gothroghdispatcher
.
redispatch_request
(
request_truck_id
=
truck_id
,
truck
=
self
.
group
.
truck
,
truck_dispatch
=
truck_dispatch
,
truck_info
=
truck_info
)
self
.
logger
.
info
(
f
'穿越装载区调度成功? {planned}'
)
# 获取近端装载区入场点经纬度信息
excavator_prise_location
=
get_excavator_prise_location
(
self
.
gothroghdispatcher
.
closer_excavator_id
)
# 获取车辆经纬度信息
truck_prise_location
=
self
.
group
.
truck
.
truck_current_prise_location
[
truck_id
]
except
Exception
as
es
:
self
.
logger
.
error
(
"
穿越调度失败
"
)
self
.
logger
.
error
(
"
挖机或车辆经纬信息未知
"
)
self
.
logger
.
error
(
es
)
excavator_prise_location
=
[
-
1
,
-
1
]
truck_prise_location
=
[
-
1
,
-
1
]
self
.
logger
.
info
(
f
'挖机经纬度信息 {excavator_prise_location}'
)
self
.
logger
.
info
(
f
'车辆经纬度信息 {truck_prise_location}'
)
from
haversine
import
haversine
truck_to_entrance_point_dis
=
haversine
(
excavator_prise_location
,
truck_prise_location
)
self
.
logger
.
info
(
f
'车辆到近端装载区入场点距离 {truck_to_entrance_point_dis}'
)
# 若车辆到入场点距离大于指定阈值
if
excavator_prise_location
[
0
]
!=
-
1
and
\
truck_prise_location
[
0
]
!=
-
1
and
\
haversine
(
excavator_prise_location
,
truck_prise_location
)
>
0.001
and
\
truck_locate
in
self
.
gothroghdispatcher
.
closer_area_backtrack_lanes
[
0
:
2
]:
try
:
self
.
logger
.
info
(
"触发穿越装载区调度"
)
planned
=
self
.
gothroghdispatcher
.
redispatch_request
(
request_truck_id
=
truck_id
,
truck
=
self
.
group
.
truck
,
truck_dispatch
=
truck_dispatch
,
truck_info
=
truck_info
)
self
.
logger
.
info
(
f
'穿越装载区调度成功? {planned}'
)
except
Exception
as
es
:
self
.
logger
.
error
(
"穿越调度失败"
)
self
.
logger
.
error
(
es
)
# 未触发穿越装载区调度, 判断是否开启二次调度
if
not
planned
and
self
.
group
.
topo
is
not
None
and
truck_locate
is
not
None
:
...
...
@@ -1306,6 +1312,8 @@ class GoThroughDispatcher:
self
.
logger
.
info
(
"cross_lane"
)
self
.
logger
.
info
(
cross_lane
)
return
cross_lane
# 截取远端入场点到交叉口的路段
# self.further_area_backtrack_lanes = self.further_area_backtrack_lanes[
# 0:self.further_area_backtrack_lanes.index(cross_lane)]
...
...
versiontag.py
View file @
b93d0b4a
...
...
@@ -6,4 +6,4 @@
# @File : versiontag.py.py
# @Software: PyCharm
VERSION_TAG
=
'78'
\ No newline at end of file
VERSION_TAG
=
'79'
\ No newline at end of file
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