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
68e15802
Commit
68e15802
authored
Jul 20, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
720Bug修复
parent
0298ee18
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
dispatcher.py
core/dispatcher.py
+11
-3
group.py
core/group.py
+1
-1
No files found.
core/dispatcher.py
View file @
68e15802
...
@@ -15,6 +15,7 @@ from para_config import DeviceMap, get_value, global_period_para_update
...
@@ -15,6 +15,7 @@ from para_config import DeviceMap, get_value, global_period_para_update
from
equipment
import
TruckInfo
,
ExcavatorInfo
,
DumpInfo
from
equipment
import
TruckInfo
,
ExcavatorInfo
,
DumpInfo
from
core.schedule
import
PreSchedule
from
core.schedule
import
PreSchedule
import
json
import
json
import
uuid
import
numpy
as
np
import
numpy
as
np
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
,
timedelta
...
@@ -149,7 +150,8 @@ class DispatchSubmission:
...
@@ -149,7 +150,8 @@ class DispatchSubmission:
# 其余调度信息写入
# 其余调度信息写入
try
:
try
:
record
[
"dispatchId"
]
=
item
.
id
# record["dispatchId"] = item.id
record
[
"dispatchId"
]
=
str
(
uuid
.
uuid1
())
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"dumpId"
]
=
item
.
dump_id
record
[
"dumpId"
]
=
item
.
dump_id
...
@@ -195,7 +197,8 @@ class DispatchSubmission:
...
@@ -195,7 +197,8 @@ class DispatchSubmission:
# 调度信息写入
# 调度信息写入
try
:
try
:
record
[
"dispatchId"
]
=
item
.
id
# record["dispatchId"] = item.id
record
[
"dispatchId"
]
=
str
(
uuid
.
uuid1
())
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"dumpId"
]
=
item
.
dump_id
record
[
"dumpId"
]
=
item
.
dump_id
...
@@ -246,7 +249,8 @@ class DispatchSubmission:
...
@@ -246,7 +249,8 @@ class DispatchSubmission:
# 调度信息写入
# 调度信息写入
try
:
try
:
record
[
"dispatchId"
]
=
item
.
id
# record["dispatchId"] = item.id
record
[
"dispatchId"
]
=
str
(
uuid
.
uuid1
())
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"exactorId"
]
=
item
.
exactor_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"loadAreaId"
]
=
item
.
load_area_id
record
[
"dumpId"
]
=
item
.
dump_id
record
[
"dumpId"
]
=
item
.
dump_id
...
@@ -285,6 +289,10 @@ class DispatchSubmission:
...
@@ -285,6 +289,10 @@ class DispatchSubmission:
:param dispatch_plan_dict: (Dict)
:param dispatch_plan_dict: (Dict)
:return: None
:return: None
"""
"""
self
.
logger
.
info
(
"dispatch_plan_dict"
)
self
.
logger
.
info
(
dispatch_plan_dict
)
for
truck_id
,
dispatch_plan
in
dispatch_plan_dict
.
items
():
for
truck_id
,
dispatch_plan
in
dispatch_plan_dict
.
items
():
self
.
logger
.
info
(
f
'======================================= 调度车辆 ======================================='
)
self
.
logger
.
info
(
f
'======================================= 调度车辆 ======================================='
)
self
.
logger
.
info
(
f
'矿车编号 {get_value("truck_uuid_to_name_dict")[truck_id]} {truck_id}'
)
self
.
logger
.
info
(
f
'矿车编号 {get_value("truck_uuid_to_name_dict")[truck_id]} {truck_id}'
)
...
...
core/group.py
View file @
68e15802
...
@@ -221,7 +221,7 @@ class Group:
...
@@ -221,7 +221,7 @@ class Group:
min_index
=
np
.
argmin
(
next_unload_area_value
)
min_index
=
np
.
argmin
(
next_unload_area_value
)
next_unload_area_id
=
self
.
unload_area_uuid_index_dict
.
inverse
[
min_index
]
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
]]
next_excavator_id
=
get_value
(
"excavator_
index_to_uuid
_dict"
)[
truck_trip
[
-
1
]]
truck_dispatch
[
i
]
=
[
next_excavator_id
,
next_unload_area_id
]
truck_dispatch
[
i
]
=
[
next_excavator_id
,
next_unload_area_id
]
except
Exception
as
es
:
except
Exception
as
es
:
...
...
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