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
864a0c90
Commit
864a0c90
authored
Apr 14, 2022
by
张晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve conflict
parent
ee682a93
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
102 deletions
+8
-102
integrated-scheduling-v3.iml
.idea/integrated-scheduling-v3.iml
+8
-0
config.json
config.json
+0
-4
group_control.py
group_control/group_control.py
+0
-5
realtime_dispatch.py
realtime_dispatch.py
+0
-11
settings.py
settings.py
+0
-36
tables.py
tables.py
+0
-46
No files found.
.idea/integrated-scheduling-v3.iml
View file @
864a0c90
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<component
name=
"NewModuleRootManager"
>
<<<<<<
< HEAD
<content
url=
"file://$MODULE_DIR$"
/>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7 (diapatch) (2)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7 (diapatch) (2)"
jdkType=
"Python SDK"
/>
=======
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$"
isTestSource=
"false"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7 (waytous)"
jdkType=
"Python SDK"
/>
>>>>>>> bdb62c7 (增加等待时间算法-修复部分BUG)
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</component>
</module>
</module>
\ No newline at end of file
config.json
View file @
864a0c90
{
{
"para"
:
{
"para"
:
{
<<<<<<<
HEAD
"log_path"
:
"/Users/guoao/Desktop/work_log/wek33/integrated-scheduling-v3-master/dispatch"
,
"log_path"
:
"/Users/guoao/Desktop/work_log/wek33/integrated-scheduling-v3-master/dispatch"
,
=======
"log_path"
:
"E:
\\
Pycharm Projects
\\
Waytous
\\
"
,
>>>>>>>
4905484
(添加等待时间算法,修复部分BUG)
"empty_speed"
:
25
,
"empty_speed"
:
25
,
"heavy_speed"
:
22
,
"heavy_speed"
:
22
,
"dump_target_mass"
:
5000
,
"dump_target_mass"
:
5000
,
...
...
group_control/group_control.py
View file @
864a0c90
...
@@ -427,11 +427,6 @@ class Group(WalkManage):
...
@@ -427,11 +427,6 @@ class Group(WalkManage):
self
.
update_device_group
()
self
.
update_device_group
()
self
.
update_group_device_map
()
self
.
update_group_device_map
()
self
.
update_group_walk_cost
()
self
.
update_group_walk_cost
()
<<<<<<<
HEAD
self
.
update_group_truck_flow
(
topo
)
=======
# self.update_group_truck_flow()
>>>>>>>
4905484
(
添加等待时间算法,修复部分
BUG
)
self
.
update_modify
()
self
.
update_modify
()
def
get_diaptch_truck_group
(
self
):
def
get_diaptch_truck_group
(
self
):
...
...
realtime_dispatch.py
View file @
864a0c90
...
@@ -21,16 +21,9 @@ from dispatcher import Dispatcher, PreSchedule
...
@@ -21,16 +21,9 @@ from dispatcher import Dispatcher, PreSchedule
def
process
(
dispatcher
):
def
process
(
dispatcher
):
# try:
# try:
<<<<<<<
HEAD
# 更新周期参数
logger
.
info
(
"#####################################周期更新开始#####################################"
)
period_para_update
()
=======
# 更新周期参数
# 更新周期参数
logger
.
info
(
"#####################################周期更新开始#####################################"
)
logger
.
info
(
"#####################################周期更新开始#####################################"
)
>>>>>>>
4905484
(
添加等待时间算法,修复部分
BUG
)
if
get_value
(
"dynamic_dump_num"
)
*
get_value
(
"dynamic_excavator_num"
)
==
0
:
if
get_value
(
"dynamic_dump_num"
)
*
get_value
(
"dynamic_excavator_num"
)
==
0
:
raise
Exception
(
"无动态派车计划可用"
)
raise
Exception
(
"无动态派车计划可用"
)
return
return
...
@@ -47,11 +40,7 @@ def process(dispatcher):
...
@@ -47,11 +40,7 @@ def process(dispatcher):
session_postgre
.
flush
()
session_postgre
.
flush
()
# 周期更新
# 周期更新
<<<<<<<
HEAD
dispatcher
.
dispatcher_period_update
(
topo
)
=======
dispatcher
.
dispatcher_period_update
()
dispatcher
.
dispatcher_period_update
()
>>>>>>>
4905484
(
添加等待时间算法,修复部分
BUG
)
# try:
# try:
...
...
settings.py
View file @
864a0c90
...
@@ -47,41 +47,6 @@ dump_target_mass = para_config["dump_target_mass"]
...
@@ -47,41 +47,6 @@ dump_target_mass = para_config["dump_target_mass"]
# 挖机目标装载量
# 挖机目标装载量
excavator_target_mass
=
para_config
[
"excavator_target_mass"
]
excavator_target_mass
=
para_config
[
"excavator_target_mass"
]
<<<<<<<
HEAD
# def set_log():
#
# # 创建日志
# ########################################################################################################################
# # 日志存储地址
# log_path = para_config["log_path"]
#
# # 创建日志目录
#
# if not os.path.exists(log_path):
# os.mkdir(log_path)
# # logging初始化工作
# logging.basicConfig()
#
# logger = logging.getLogger("zxt")
# logger.setLevel(logging.INFO)
#
#
# # timefilehandler = logging.handlers.TimedRotatingFileHandler(log_path + "/dispatch.log", when='M', interval=1, backupCount=60)
# filehandler = logging.handlers.RotatingFileHandler(log_path + "/dispatch.log", maxBytes=3*1024*1024, backupCount=10)
# # filehandler = logging.handlers.RotatingFileHandler("./Logs/dispatch.log", maxBytes=3 * 1024 * 1024, backupCount=10)
# # 设置后缀名称,跟strftime的格式一样
# filehandler.suffix = "%Y-%m-%d_%H-%M.log"
#
# formatter = logging.Formatter("%(asctime)s - %(name)s: %(levelname)s %(filename)s %(message)s")
# filehandler.setFormatter(formatter)
# logger.addHandler(filehandler)
#
#
# def get_logger(module_name):
# logger = logging.getLogger(module_name)
# return logger
=======
def
set_log
():
def
set_log
():
# 创建日志
# 创建日志
...
@@ -114,7 +79,6 @@ def set_log():
...
@@ -114,7 +79,6 @@ def set_log():
def
get_logger
(
module_name
):
def
get_logger
(
module_name
):
logger
=
logging
.
getLogger
(
module_name
)
logger
=
logging
.
getLogger
(
module_name
)
return
logger
return
logger
>>>>>>>
4905484
(
添加等待时间算法,修复部分
BUG
)
# 连接reids
# 连接reids
...
...
tables.py
View file @
864a0c90
...
@@ -39,52 +39,6 @@ with open(json_file) as f:
...
@@ -39,52 +39,6 @@ with open(json_file) as f:
with
open
(
json_file
)
as
f
:
with
open
(
json_file
)
as
f
:
postgre_config
=
json
.
load
(
f
)[
"postgresql"
]
postgre_config
=
json
.
load
(
f
)[
"postgresql"
]
<<<<<<<
HEAD
with
open
(
json_file
)
as
f
:
redis_config
=
json
.
load
(
f
)[
"redis"
]
def
set_log
():
# 创建日志
########################################################################################################################
# 日志存储地址
log_path
=
para_config
[
"log_path"
]
# 创建日志目录
if
not
os
.
path
.
exists
(
log_path
):
os
.
mkdir
(
log_path
)
# logging初始化工作
logging
.
basicConfig
()
logger
=
logging
.
getLogger
(
"zxt"
)
logger
.
setLevel
(
logging
.
INFO
)
# timefilehandler = logging.handlers.TimedRotatingFileHandler(log_path + "/dispatch.log", when='M', interval=1, backupCount=60)
filehandler
=
logging
.
handlers
.
RotatingFileHandler
(
log_path
+
"/dispatch.log"
,
maxBytes
=
3
*
1024
*
1024
,
backupCount
=
10
)
# filehandler = logging.handlers.RotatingFileHandler("./Logs/dispatch.log", maxBytes=3 * 1024 * 1024, backupCount=10)
# 设置后缀名称,跟strftime的格式一样
filehandler
.
suffix
=
"
%
Y-
%
m-
%
d_
%
H-
%
M.log"
formatter
=
logging
.
Formatter
(
"
%(asctime)
s -
%(name)
s:
%(levelname)
s
%(filename)
s
%(message)
s"
)
filehandler
.
setFormatter
(
formatter
)
logger
.
addHandler
(
filehandler
)
def
get_logger
(
module_name
):
logger
=
logging
.
getLogger
(
module_name
)
return
logger
json_file
=
"config.json"
logger
=
get_logger
(
"zxt.tables"
)
=======
# logger = get_logger("zxt.tables")
>>>>>>>
4905484
(
添加等待时间算法,修复部分
BUG
)
# # 创建对象的基类:
# # 创建对象的基类:
# Base = declarative_base()
# Base = declarative_base()
#
#
...
...
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