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
0265c73d
Commit
0265c73d
authored
Oct 26, 2023
by
虢奥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
穿越装载区策略优化
parent
aa9a59ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
group.py
core/group.py
+1
-1
area_analysis.py
util/area_analysis.py
+8
-2
No files found.
core/group.py
View file @
0265c73d
...
@@ -605,7 +605,7 @@ class GroupDispatcher:
...
@@ -605,7 +605,7 @@ class GroupDispatcher:
if
excavator_prise_location
[
0
]
!=
-
1
and
\
if
excavator_prise_location
[
0
]
!=
-
1
and
\
truck_prise_location
[
0
]
!=
-
1
and
\
truck_prise_location
[
0
]
!=
-
1
and
\
haversine
(
excavator_prise_location
,
truck_prise_location
)
>
0.0
7
0
and
\
haversine
(
excavator_prise_location
,
truck_prise_location
)
>
0.0
4
0
and
\
truck_locate
in
self
.
gothroghdispatcher
.
closer_area_backtrack_lanes
:
truck_locate
in
self
.
gothroghdispatcher
.
closer_area_backtrack_lanes
:
self
.
gothroghdispatcher
.
redispatch_request
(
request_truck_id
=
truck_id
,
truck
=
self
.
group
.
truck
,
truck_dispatch
=
truck_dispatch
)
self
.
gothroghdispatcher
.
redispatch_request
(
request_truck_id
=
truck_id
,
truck
=
self
.
group
.
truck
,
truck_dispatch
=
truck_dispatch
)
...
...
util/area_analysis.py
View file @
0265c73d
...
@@ -52,6 +52,8 @@ def area_choose(excavators_id, closer_area_id, further_area_id, further_lane_set
...
@@ -52,6 +52,8 @@ def area_choose(excavators_id, closer_area_id, further_area_id, further_lane_set
logger
.
info
(
f
"输入的closer_lane_set{closer_lane_set}"
)
logger
.
info
(
f
"输入的closer_lane_set{closer_lane_set}"
)
closer_lane_set_nearest
=
[
closer_lane_set
[
0
]]
closer_lane_set_nearest
=
[
closer_lane_set
[
0
]]
# 前往装载的车的数量
arrival_truck_num
=
len
(
arrival_truck_set
)
# 统计不同状态车辆数量
# 统计不同状态车辆数量
goto_closer_area_num
=
0
goto_closer_area_num
=
0
goto_further_area_num
=
0
goto_further_area_num
=
0
...
@@ -115,9 +117,13 @@ def area_choose(excavators_id, closer_area_id, further_area_id, further_lane_set
...
@@ -115,9 +117,13 @@ def area_choose(excavators_id, closer_area_id, further_area_id, further_lane_set
logger
.
info
(
"近端挖机空闲, 调度车辆前往近端装载区"
)
logger
.
info
(
"近端挖机空闲, 调度车辆前往近端装载区"
)
target_excavator
=
DispatchInfo
.
load_excavator_dict
[
closer_area_id
]
target_excavator
=
DispatchInfo
.
load_excavator_dict
[
closer_area_id
]
# truck_dispatch_to_redis(request_truck_id, group_id, DispatchInfo.load_excavator_dict[closer_area_id])
# truck_dispatch_to_redis(request_truck_id, group_id, DispatchInfo.load_excavator_dict[closer_area_id])
# 远端挖机空闲
# 近端挖机不空闲但是远端挖机已满载
elif
closer_excavator_state
!=
0
and
goto_further_area_num
>=
int
(
10
/
14
*
arrival_truck_num
):
logger
.
info
(
"远端挖机满载, 调度车辆前往近端装载区"
)
target_excavator
=
DispatchInfo
.
load_excavator_dict
[
closer_area_id
]
# 近端挖机满载,只能派往远端挖机
else
:
else
:
logger
.
info
(
"近端挖机
占用
, 调度车辆前往远端装载区"
)
logger
.
info
(
"近端挖机
满载
, 调度车辆前往远端装载区"
)
target_excavator
=
DispatchInfo
.
load_excavator_dict
[
further_area_id
]
target_excavator
=
DispatchInfo
.
load_excavator_dict
[
further_area_id
]
# truck_dispatch_to_redis(request_truck_id, group_id, DispatchInfo.load_excavator_dict[further_area_id])
# truck_dispatch_to_redis(request_truck_id, group_id, DispatchInfo.load_excavator_dict[further_area_id])
...
...
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