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
197d83a2
Commit
197d83a2
authored
Sep 01, 2023
by
Allvey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志及异常处理优化
parent
5a5ae936
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
186 deletions
+23
-186
algorithm.py
alg/algorithm.py
+5
-2
group.py
core/group.py
+5
-171
para_config.py
data/para_config.py
+2
-2
static_data_process.py
data/static_data_process.py
+9
-9
dump.py
equipment/dump.py
+1
-1
truck.py
equipment/truck.py
+1
-1
No files found.
alg/algorithm.py
View file @
197d83a2
...
...
@@ -250,12 +250,12 @@ class ExpectedTime(AlgorithmBase):
# get truck located group_excavators id (uuid) from truck trip
if
int
(
trip
[
1
])
<
0
or
int
(
trip
[
1
])
>=
len
(
DeviceMap
.
excavator_index_to_uuid_dict
):
raise
CoreException
(
105
,
f
'车辆 {truck_id} 行程驶往 {int(trip[1])} 号挖机越界'
)
raise
Exception
(
f
'车辆 {truck_id} 行程驶往 {int(trip[1])} 号挖机越界'
)
excavator_id
=
DeviceMap
.
excavator_index_to_uuid_dict
[
int
(
trip
[
1
])]
# get group_excavators index (int) within group from group's excavator_group_index
if
excavator_id
not
in
self
.
group
.
excavator_uuid_index_dict
:
raise
Core
Exception
(
106
,
f
'挖机 {excavator_id} 不存在于分组 {self.group.name} excavator_uuid_index_dict'
)
raise
Exception
(
106
,
f
'挖机 {excavator_id} 不存在于分组 {self.group.name} excavator_uuid_index_dict'
)
excavator_group_index
=
self
.
group
.
excavator_uuid_index_dict
[
excavator_id
]
# get travelling time (List) to each group_dumps
...
...
@@ -288,6 +288,7 @@ class ExpectedTime(AlgorithmBase):
except
Exception
as
es
:
self
.
logger
.
error
(
"矿卡空载调度异常"
)
self
.
logger
.
error
(
es
)
self
.
logger
.
error
(
es
.
__traceback__
.
tb_lineno
)
transport_value
=
np
.
zeros
(
group_dynamic_unload_area_num
)
elif
task
in
[
3
,
4
,
5
]:
...
...
@@ -316,6 +317,8 @@ class ExpectedTime(AlgorithmBase):
group_excavator_avl_time_ls
[
excavator_index
]
=
excavator_val_time
[
excavator_id
]
# get truck located group_dumps id (uuid) from truck trip
if
int
(
trip
[
1
])
<
0
or
int
(
trip
[
1
])
>=
len
(
DeviceMap
.
dump_index_to_uuid_dict
):
raise
Exception
(
f
'车辆 {truck_id} 行程驶往 {int(trip[1])} 号卸点越界'
)
dump_id
=
DeviceMap
.
dump_index_to_uuid_dict
[
int
(
trip
[
1
])]
# get unload area id (uuid) from DispatchInfo dump_id to group_unload_areas mapping
...
...
core/group.py
View file @
197d83a2
This diff is collapsed.
Click to expand it.
data/para_config.py
View file @
197d83a2
...
...
@@ -294,8 +294,8 @@ def global_period_para_update():
# 矿卡集合
truck_set
=
set
(
update_total_truck
())
logger
.
info
(
"group_trucks"
)
logger
.
info
(
truck_set
)
#
logger.info("group_trucks")
#
logger.info(truck_set)
# 固定派车矿卡集合
fixed_truck_set
=
set
(
update_fixdisp_truck
())
...
...
data/static_data_process.py
View file @
197d83a2
...
...
@@ -203,13 +203,13 @@ def update_deveices_map(unload_area_uuid_to_index_dict, load_area_uuid_to_index_
session_postgre
.
rollback
()
session_mysql
.
rollback
()
logger
.
info
(
"excavator_index_to_load_area_index_dict"
)
logger
.
info
(
excavator_index_to_load_area_index_dict
)
logger
.
info
(
"load_area_uuid_to_index_dict"
)
logger
.
info
(
load_area_uuid_to_index_dict
)
logger
.
info
(
"static_excavator_uuid_to_index_dict"
)
logger
.
info
(
excavator_uuid_to_index_dict
)
#
logger.info("excavator_index_to_load_area_index_dict")
#
logger.info(excavator_index_to_load_area_index_dict)
#
#
logger.info("load_area_uuid_to_index_dict")
#
logger.info(load_area_uuid_to_index_dict)
#
logger.info("static_excavator_uuid_to_index_dict")
#
logger.info(excavator_uuid_to_index_dict)
return
{
"excavator_uuid_to_index_dict"
:
excavator_uuid_to_index_dict
,
...
...
@@ -234,8 +234,8 @@ def build_truck_uuid_index_map(dynamic_truck_set):
truck_index_to_uuid_dict
[
truck_num
]
=
truck_id
truck_num
=
truck_num
+
1
logger
.
info
(
"static_data_process.py-truck_uuid_to_index_dict"
)
logger
.
info
(
truck_uuid_to_index_dict
)
#
logger.info("static_data_process.py-truck_uuid_to_index_dict")
#
logger.info(truck_uuid_to_index_dict)
return
{
"truck_uuid_to_index_dict"
:
truck_uuid_to_index_dict
,
...
...
equipment/dump.py
View file @
197d83a2
...
...
@@ -175,7 +175,7 @@ class DumpInfo(WalkManage):
if
unload_ability
<
200
:
self
.
dump_strength
[
dump_index
]
=
200
raise
Exception
(
"卸载点卸载能力异常
"
)
self
.
logger
.
warning
(
"卸载点卸载能力异常 < 200
"
)
else
:
self
.
dump_strength
[
dump_index
]
=
unload_ability
# 卸载设备最大卸载能力,单位吨/小时
else
:
...
...
equipment/truck.py
View file @
197d83a2
...
...
@@ -599,7 +599,7 @@ class TruckInfo(WalkManage):
if
item
.
bind_list
is
not
None
:
for
truck_name
in
json
.
loads
(
item
.
bind_list
):
if
truck_name
not
in
truck_name_to_uuid_dict
:
self
.
logger
.
error
(
f
'truck_name_to_uuid_dict (db2) 不存在 {truck_name}'
)
self
.
logger
.
warning
(
f
'truck_name_to_uuid_dict (db2) 不存在 {truck_name}'
)
continue
self
.
truck_excavator_bind
[
truck_name_to_uuid_dict
[
truck_name
]
...
...
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