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
ab16d8ce
Commit
ab16d8ce
authored
Jun 24, 2022
by
z5335534 Ao Guo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Good so far
parent
b9fd0034
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
147 deletions
+0
-147
algorithm.py
tmp/alg/algorithm.py
+0
-42
group.py
tmp/core/group.py
+0
-60
dispatchInfo.py
tmp/data/dispatchInfo.py
+0
-45
No files found.
tmp/alg/algorithm.py
deleted
100644 → 0
View file @
b9fd0034
#!E:\Pycharm Projects\Waytous
# -*- coding: utf-8 -*-
# @Time : 2022/5/30 16:32
# @Author : Opfer
# @Site :
# @File : alg.py
# @Software: PyCharm
class
AlgorithmBase
:
"""
Base class for dispatch alg.
"""
def
__init__
(
self
):
pass
class
Congestion
(
AlgorithmBase
):
"""
class for congestion alg.
"""
def
__init__
(
self
,
group
):
super
()
.
__init__
()
self
.
group
=
group
def
solve
(
self
):
pass
class
ExpectedTime
(
AlgorithmBase
):
"""
class for expected traveling time alg.
"""
def
__init__
(
self
,
group
):
super
()
.
__init__
()
self
.
group
=
group
def
solve
(
self
):
pass
tmp/core/group.py
deleted
100644 → 0
View file @
b9fd0034
#!E:\Pycharm Projects\Waytous
# -*- coding: utf-8 -*-
# @Time : 2022/5/30 15:35
# @Author : Opfer
# @Site :
# @File : group.py
# @Software: PyCharm
from
data.dispatchInfo
import
DispatchInfo
from
bidict
import
bidict
from
alg.algorithm
import
AlgorithmBase
class
Group
:
"""
class for group instance.
"""
def
__init__
(
self
,
group_id
):
""" Generate a group obj.
:param group_id: (uuid) group_id
"""
self
.
group_id
=
group_id
# group devices
self
.
excavator_dict
=
{}
# excavator_id -> unload_area_id
self
.
dump_dict
=
{}
# dump_id -> load_area_id
self
.
truck_set
=
set
()
# truck_id
# road network info.
self
.
to_excavator_distance
=
None
self
.
to_dump_distance
=
None
self
.
park_to_excavator_distance
=
None
self
.
to_excavator_congestion
=
None
self
.
to_dump_congestion
=
None
self
.
park_to_excavator_congestion
=
None
# device map
self
.
truck_uuid_index_dict
=
bidict
()
self
.
excavator_uuid_index_dict
=
bidict
()
self
.
dump_uuid_index_dict
=
bidict
()
def
update_xx_
(
self
):
"""
update above parameters.
:return:
"""
pass
def
group_dispatch
(
self
,
solver
):
"""
Receive a alg obj. and output dispatch plan for trucks in this group.
:param solver:
:return:
dispatch plan: Dict({truck_id: match_id})
"""
assert
isinstance
(
solver
,
AlgorithmBase
)
s
=
solver
(
self
)
# algorithm init
return
s
.
solve
()
# algorithm solve
tmp/data/dispatchInfo.py
deleted
100644 → 0
View file @
b9fd0034
#!E:\Pycharm Projects\Waytous
# -*- coding: utf-8 -*-
# @Time : 2022/5/30 14:45
# @Author : Opfer
# @Site :
# @File : dispatchInfo.py
# @Software: PyCharm
class
DispatchInfo
:
"""
class for dispatch group info.
"""
# dispatch groups
group_num
=
1
group_set
=
set
()
# device group structure
group_unload_area_dict
=
{}
# team_id -> dict {[unload_area_id, unload_area_id], [unload_area_id, unload_area_id], ...}
group_excavator_dict
=
{}
# team_id -> dict {[excavator_id, load_area_id], ...}
group_truck_dict
=
{}
# team_id -> dict {truck_id, ...}
unload_area_group_dict
=
{}
# unload_area_id -> team_id
excavator_group_dict
=
{}
# excavator_id -> team_id
truck_group_dict
=
{}
# truck_id -> team_id
# group feature
group_mode
=
{}
@classmethod
def
update_device_group_structure
(
cls
):
pass
@classmethod
def
update_group_mode
(
cls
):
pass
@classmethod
def
dispatch_group_init
(
cls
):
"""
update basic paras (group_set, dict, num ...)
:return:
"""
pass
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