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
a9c7933a
Commit
a9c7933a
authored
Nov 29, 2023
by
虢奥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加二次调度
parent
9a5b62cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
config.json
config.json
+0
-1
group.py
core/group.py
+23
-4
No files found.
config.json
View file @
a9c7933a
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
},
},
"mysql"
:
{
"mysql"
:
{
"host"
:
"172.16.0.51"
,
"host"
:
"172.16.0.51"
,
"port"
:
"3306"
,
"user"
:
"root"
,
"user"
:
"root"
,
"password"
:
"Huituo@123"
,
"password"
:
"Huituo@123"
,
"database"
:
"ht_zhunneng"
"database"
:
"ht_zhunneng"
...
...
core/group.py
View file @
a9c7933a
...
@@ -583,6 +583,7 @@ class GroupDispatcher:
...
@@ -583,6 +583,7 @@ class GroupDispatcher:
# 车辆位于装载区内, 调度车辆前往卸载区
# 车辆位于装载区内, 调度车辆前往卸载区
elif
truck_task
in
[
0
,
1
,
2
]:
elif
truck_task
in
[
0
,
1
,
2
]:
# 判断是否开启穿越装载区调度
if
truck_task
==
0
and
self
.
gothrough_active
and
truck_locate
is
not
None
:
if
truck_task
==
0
and
self
.
gothrough_active
and
truck_locate
is
not
None
:
self
.
logger
.
info
(
"穿越装载区调度开启"
)
self
.
logger
.
info
(
"穿越装载区调度开启"
)
self
.
gothroghdispatcher
.
update_lanes_info
()
self
.
gothroghdispatcher
.
update_lanes_info
()
...
@@ -605,16 +606,34 @@ class GroupDispatcher:
...
@@ -605,16 +606,34 @@ 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
1
0
and
\
haversine
(
excavator_prise_location
,
truck_prise_location
)
>
0.0
0
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
)
# 判断是否开启二次调度
elif
self
.
group
.
topo
is
not
None
and
truck_locate
is
not
None
:
self
.
logger
.
info
(
"潜在二次调度车辆状态"
)
# 车辆当前位于交叉路口前,且排队等待
self
.
logger
.
info
(
f
'车辆 {truck_name}'
)
self
.
logger
.
info
(
f
'车辆位置 {truck_locate}'
)
self
.
logger
.
info
(
f
'车辆状态 {self.group.truck.truck_current_state[truck_id]}'
)
self
.
logger
.
info
(
f
'车辆临时 {truck_is_temp}'
)
self
.
logger
.
info
(
self
.
group
.
topo
.
cross_bf_lanes
)
self
.
logger
.
info
(
self
.
group
.
truck
.
truck_current_state
)
if
(
truck_locate
in
self
.
group
.
topo
.
cross_bf_lanes
)
and
(
not
truck_is_temp
):
self
.
logger
.
info
(
"触发二次调度"
)
try
:
truck_info
.
redispatch
=
\
self
.
redispatcher
.
redispatch_to_excavator
(
truck_id
,
truck_dispatch
,
truck_locate
,
truck_trip
,
truck_info
)
except
Exception
as
es
:
self
.
logger
.
error
(
"二次调度至装载点失败"
)
self
.
logger
.
error
(
es
)
# 穿越调度和二次调度均不触发,正常空载调度
else
:
else
:
self
.
logger
.
info
(
"正常空载行驶,执行空载周期调度"
)
self
.
logger
.
info
(
"正常空载行驶,执行空载周期调度"
)
self
.
empty_period_dispatch
(
s
,
truck_dispatch
,
truck_id
,
truck_info
,
truck_trip
)
self
.
empty_period_dispatch
(
s
,
truck_dispatch
,
truck_id
,
truck_info
,
truck_trip
)
else
:
self
.
logger
.
info
(
"装载区内,执行空载周期调度"
)
self
.
empty_period_dispatch
(
s
,
truck_dispatch
,
truck_id
,
truck_info
,
truck_trip
)
# TODO:车辆在空载状态是否应该如何计算,是计算下一次卸载区还是继续计算当前最优挖机
# TODO:车辆在空载状态是否应该如何计算,是计算下一次卸载区还是继续计算当前最优挖机
...
...
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