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
0298ee18
Commit
0298ee18
authored
Jul 20, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 group bug
parent
c6d3e92b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
group.py
core/group.py
+12
-7
para_config.py
para_config.py
+10
-0
No files found.
core/group.py
View file @
0298ee18
...
...
@@ -20,6 +20,7 @@ from bidict import bidict
from
alg.algorithm
import
AlgorithmBase
import
numpy
as
np
# from settings import get_logger
from
para_config
import
get_value
class
CurrentTruck
:
""" class for the information of current dispatching truck.
...
...
@@ -194,7 +195,7 @@ class Group:
self
.
truck_info_list
[
i
]
=
truck_info
# 全智能模式
if
self
.
group_mode
==
1
:
if
truck_task
in
[
-
2
,
2
,
3
,
4
]:
if
truck_task
in
[
-
2
,
3
,
4
,
5
]:
try
:
next_excavator_value
=
s
.
solve
(
truck_info
)
...
...
@@ -205,20 +206,22 @@ class Group:
if
truck_task
==
-
2
:
next_unload_area_id
=
"Park"
else
:
next_unload_area_id
=
self
.
unload_area_uuid_index_dict
.
inverse
[
truck_trip
[
-
1
]]
dump_id
=
get_value
(
"dump_index_to_uuid_dict"
)[
truck_trip
[
-
1
]]
next_unload_area_id
=
get_value
(
"dump_uuid_to_unload_area_uuid_dict"
)[
dump_id
]
truck_dispatch
[
i
]
=
[
next_excavator_id
,
next_unload_area_id
]
except
Exception
as
es
:
self
.
logger
.
error
(
"重载车辆全智能模式-计算异常"
)
self
.
logger
.
error
(
es
)
if
truck_task
in
[
0
,
1
,
5
]:
if
truck_task
in
[
0
,
1
,
2
]:
try
:
next_unload_area_value
=
s
.
solve
(
truck_info
)
min_index
=
np
.
argmin
(
next_unload_area_value
)
next_unload_area_id
=
self
.
unload_area_uuid_index_dict
.
inverse
[
min_index
]
next_excavator_id
=
self
.
excavator_uuid_index_dict
.
inverse
[
truck_trip
[
-
1
]]
# next_excavator_id = self.excavator_uuid_index_dict.inverse[truck_trip[-1]]
next_excavator_id
=
get_value
(
"excavator_uuid_index_dict"
)[
truck_trip
[
-
1
]]
truck_dispatch
[
i
]
=
[
next_excavator_id
,
next_unload_area_id
]
except
Exception
as
es
:
...
...
@@ -227,7 +230,7 @@ class Group:
truck_dispatch
[
i
]
=
[
None
,
None
]
# 空车智能模式
elif
self
.
group_mode
==
2
:
if
truck_task
in
[
-
2
,
2
,
3
,
4
]:
if
truck_task
in
[
-
2
,
3
,
4
,
5
]:
try
:
next_excavator_value
=
s
.
solve
(
truck_info
)
...
...
@@ -237,13 +240,15 @@ class Group:
if
truck_task
==
-
2
:
next_unload_area_id
=
"Park"
else
:
next_unload_area_id
=
self
.
unload_area_uuid_index_dict
.
inverse
[
truck_trip
[
-
1
]]
# next_unload_area_id = self.unload_area_uuid_index_dict.inverse[truck_trip[-1]]
dump_id
=
get_value
(
"dump_index_to_uuid_dict"
)[
truck_trip
[
-
1
]]
next_unload_area_id
=
get_value
(
"dump_uuid_to_unload_area_uuid_dict"
)[
dump_id
]
truck_dispatch
[
i
]
=
[
next_excavator_id
,
next_unload_area_id
]
except
Exception
as
es
:
self
.
logger
.
error
(
"重载车辆空车智能模式-计算异常"
)
self
.
logger
.
error
(
es
)
if
truck_task
in
[
0
,
1
,
5
]:
if
truck_task
in
[
0
,
1
,
2
]:
try
:
truck_dispatch
[
i
]
=
DispatchInfo
.
get_truck_match
(
i
)
except
Exception
as
es
:
...
...
para_config.py
View file @
0298ee18
...
...
@@ -516,6 +516,16 @@ def global_period_para_update():
global_dict
[
"distance_park_to_excavator"
]
=
WalkManage
.
distance_park_to_excavator
global_dict
[
"distance_to_dump"
]
=
WalkManage
.
distance_to_dump
global_dict
[
"dump_uuid_to_index_dict"
]
=
WalkManage
.
dump_uuid_to_index_dict
global_dict
[
"dump_index_to_uuid_dict"
]
=
WalkManage
.
dump_index_to_uuid_dict
global_dict
[
"excavator_uuid_to_index_dict"
]
=
WalkManage
.
excavator_uuid_to_index_dict
global_dict
[
"excavator_index_to_uuid_dict"
]
=
WalkManage
.
excavator_index_to_uuid_dict
global_dict
[
"dump_uuid_to_unload_area_uuid_dict"
]
=
WalkManage
.
dump_uuid_to_unload_area_uuid_dict
global_dict
[
"excavator_uuid_to_load_area_uuid_dict"
]
=
WalkManage
.
excavator_uuid_to_load_area_uuid_dict
# logger.info("walk_manage_para")
# logger.info("distance_to_excavator")
# logger.info(walk_manage.distance_to_excavator)
...
...
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