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
4c78fd78
Commit
4c78fd78
authored
Jul 15, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
7-15更新 1.数据更新同步 2.添加挖机可用时间-异常捕获
parent
73d461b0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
12 deletions
+37
-12
config.json
config.json
+1
-1
schedule.py
core/schedule.py
+36
-11
truck.py
equipment/truck.py
+0
-0
No files found.
config.json
View file @
4c78fd78
{
{
"para"
:
{
"para"
:
{
"log_path"
:
"
/Users/guoao/Desktop/work_log/Logs
"
,
"log_path"
:
"
./Logs/
"
,
"empty_speed"
:
17
,
"empty_speed"
:
17
,
"heavy_speed"
:
17
,
"heavy_speed"
:
17
,
"dump_target_mass"
:
5000
,
"dump_target_mass"
:
5000
,
...
...
core/schedule.py
View file @
4c78fd78
...
@@ -142,18 +142,43 @@ class PreSchedule:
...
@@ -142,18 +142,43 @@ class PreSchedule:
tmp
=
reach_ls
[
np
.
lexsort
(
reach_ls
[:,
::
-
1
]
.
T
)]
tmp
=
reach_ls
[
np
.
lexsort
(
reach_ls
[:,
::
-
1
]
.
T
)]
for
i
in
range
(
len
(
tmp
)):
for
i
in
range
(
len
(
tmp
)):
excavator_index
=
int
(
tmp
[
i
][
2
])
try
:
excavator_id
=
self
.
excavator
.
excavator_index_to_uuid_dict
[
excavator_index
]
self
.
excavator_avl_time
[
excavator_index
]
=
(
max
(
tmp
[
i
][
0
],
self
.
excavator_avl_time
[
excavator_index
])
+
loading_task_time
[
excavator_index
]
)
self
.
excavator_avl_time_dict
[
excavator_id
]
=
self
.
excavator_avl_time
[
excavator_index
]
truck_index
=
int
(
tmp
[
i
][
1
])
excavator_index
=
int
(
tmp
[
i
][
2
])
truck_id
=
self
.
truck
.
truck_index_to_uuid_dict
[
truck_index
]
excavator_id
=
self
.
excavator
.
excavator_index_to_uuid_dict
[
excavator_index
]
self
.
truck_avl_time
[
truck_index
]
=
self
.
excavator_avl_time
[
excavator_index
]
self
.
truck_avl_time_dict
[
truck_id
]
=
self
.
truck_avl_time
[
truck_index
]
except
Exception
as
es
:
self
.
logger
.
error
(
"excavator_error_1"
)
self
.
logger
.
error
(
es
)
try
:
self
.
excavator_avl_time
[
excavator_index
]
=
(
max
(
tmp
[
i
][
0
],
self
.
excavator_avl_time
[
excavator_index
])
+
loading_task_time
[
excavator_index
]
)
self
.
excavator_avl_time_dict
[
excavator_id
]
=
self
.
excavator_avl_time
[
excavator_index
]
except
Exception
as
es
:
self
.
logger
.
error
(
"excavator_error_2"
)
self
.
logger
.
error
(
es
)
try
:
truck_index
=
int
(
tmp
[
i
][
1
])
truck_id
=
self
.
truck
.
truck_index_to_uuid_dict
[
truck_index
]
except
Exception
as
es
:
self
.
logger
.
error
(
"excavator_error_3"
)
self
.
logger
.
error
(
es
)
try
:
self
.
truck_avl_time
[
truck_index
]
=
self
.
excavator_avl_time
[
excavator_index
]
self
.
truck_avl_time_dict
[
truck_id
]
=
self
.
truck_avl_time
[
truck_index
]
except
Exception
as
es
:
self
.
logger
.
error
(
"excavator_error_4"
)
self
.
logger
.
error
(
es
)
# # 若挖机可用时间严重偏离,进行修正
# # 若挖机可用时间严重偏离,进行修正
# if abs(self.excavator_avl_time[excavator_index] - now) > 60:
# if abs(self.excavator_avl_time[excavator_index] - now) > 60:
...
...
equipment/truck.py
View file @
4c78fd78
This diff is collapsed.
Click to expand it.
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