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
777a0b16
Commit
777a0b16
authored
Jun 12, 2022
by
z5335534 Ao Guo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
info层再次修改
parent
93958978
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
5 deletions
+63
-5
tables.cpython-37.pyc
__pycache__/tables.cpython-37.pyc
+0
-0
dispatchInfo.cpython-37.pyc
data/__pycache__/dispatchInfo.cpython-37.pyc
+0
-0
dispatchInfo.py
data/dispatchInfo.py
+0
-0
tables.py
tables.py
+11
-5
test.py
test.py
+52
-0
No files found.
__pycache__/tables.cpython-37.pyc
View file @
777a0b16
No preview for this file type
data/__pycache__/dispatchInfo.cpython-37.pyc
View file @
777a0b16
No preview for this file type
data/dispatchInfo.py
View file @
777a0b16
This diff is collapsed.
Click to expand it.
tables.py
View file @
777a0b16
...
@@ -490,11 +490,13 @@ class DiggingWorkArea(Base):
...
@@ -490,11 +490,13 @@ class DiggingWorkArea(Base):
Id
=
Column
(
VARCHAR
(
50
),
primary_key
=
True
)
Id
=
Column
(
VARCHAR
(
50
),
primary_key
=
True
)
Material
=
Column
(
VARCHAR
(
36
))
Material
=
Column
(
VARCHAR
(
36
))
ExactorId
=
Column
(
VARCHAR
(
36
))
ExactorId
=
Column
(
VARCHAR
(
36
))
ExactorUuid
=
Column
(
VARCHAR
(
50
))
def
__init__
(
self
,
Id
,
Material
,
ExactorId
):
def
__init__
(
self
,
Id
,
Material
,
ExactorId
,
ExactorUuid
):
self
.
Id
=
Id
self
.
Id
=
Id
self
.
Material
=
Material
self
.
Material
=
Material
self
.
ExactorId
=
ExactorId
self
.
ExactorId
=
ExactorId
self
.
ExactorUuid
=
ExactorUuid
class
DispatchRule
(
Base
):
class
DispatchRule
(
Base
):
...
@@ -558,18 +560,22 @@ class DispatchMatch(Base):
...
@@ -558,18 +560,22 @@ class DispatchMatch(Base):
group_code
=
Column
(
VARCHAR
(
36
))
group_code
=
Column
(
VARCHAR
(
36
))
match_code
=
Column
(
VARCHAR
(
36
))
match_code
=
Column
(
VARCHAR
(
36
))
team_id
=
Column
(
VARCHAR
(
36
))
team_id
=
Column
(
VARCHAR
(
36
))
load_area_id
=
Column
(
VARCHAR
(
36
))
# excavator_id = Column(VARCHAR(36))
dump_id
=
Column
(
VARCHAR
(
36
))
exactor_id
=
Column
(
VARCHAR
(
36
))
unload_area_id
=
Column
(
VARCHAR
(
36
))
unload_area_id
=
Column
(
VARCHAR
(
36
))
excavator_id
=
Column
(
VARCHAR
(
36
))
def
__init__
(
self
,
id
,
group_type
,
group_code
,
match_code
,
team_id
,
unload_area_id
,
excavator
_id
):
def
__init__
(
self
,
id
,
group_type
,
group_code
,
match_code
,
team_id
,
load_area_id
,
dump_id
,
exactor_id
,
unload_area
_id
):
self
.
id
=
id
self
.
id
=
id
self
.
group_type
=
group_type
self
.
group_type
=
group_type
self
.
group_code
=
group_code
self
.
group_code
=
group_code
self
.
match_code
=
match_code
self
.
match_code
=
match_code
self
.
team_id
=
team_id
self
.
team_id
=
team_id
self
.
load_area_id
=
load_area_id
self
.
dump_id
=
dump_id
self
.
exactor_id
=
exactor_id
self
.
unload_area_id
=
unload_area_id
self
.
unload_area_id
=
unload_area_id
self
.
excavator_id
=
excavator_id
class
DispatchEquipment
(
Base
):
class
DispatchEquipment
(
Base
):
__tablename__
=
'sys_dispatch_equipment'
__tablename__
=
'sys_dispatch_equipment'
...
...
test.py
0 → 100644
View file @
777a0b16
from
static_data_process
import
*
from
settings
import
*
import
numpy
as
np
from
data.dispatchInfo
import
DispatchInfo
from
bidict
import
bidict
from
alg.algorithm
import
AlgorithmBase
if
__name__
==
'__main__'
:
# dynamic_excavator_set = set(update_autodisp_excavator())
# dynamic_excavator_num = len(dynamic_excavator_set)
#
# dynamic_dump_set = set(update_autodisp_dump())
# dynamic_dump_num = len(dynamic_dump_set)
# dynamic_excavator_list = []
# for item in (
# session_mysql.query(Dispatch).filter_by(isdeleted=0, isauto=1).all()
# ):
# dynamic_excavator_list.append(item.exactor_id)
# if len(dynamic_excavator_list) < 1:
# raise Exception("无动态派车计划可用-动态派车挖机/卸载设备集合读取异常")
# 更新数据库缓存
DispatchInfo
.
renew_set
()
DispatchInfo
.
update_device_group_structure
()
DispatchInfo
.
update_route_distance
()
#
DispatchInfo
.
update_group_mode
()
a
=
DispatchInfo
.
get_group_mode
(
'9bb14655-4fd5-49da-a31a-13f6ced88d6c'
)
a_excavator
=
DispatchInfo
.
get_excavator_dict
(
'9bb14655-4fd5-49da-a31a-13f6ced88d6c'
)
a_dump
=
DispatchInfo
.
get_dump_dict
(
'9bb14655-4fd5-49da-a31a-13f6ced88d6c'
)
a_truck
=
DispatchInfo
.
get_truck_set
(
'9bb14655-4fd5-49da-a31a-13f6ced88d6c'
)
bb
=
DispatchInfo
.
excavator_load_dict
cc
=
DispatchInfo
.
load_excavator_dict
# print(bb)
# print(cc)
hh
=
DispatchInfo
.
group_excavator_dict
print
(
hh
)
# print(a)
# print(a_excavator)
# print(a_dump)
# print(a_truck)
# for i in a_excavator:
# load = DispatchInfo.get_load_area(i)
# print(load)
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