Compare commits
5 Commits
master
...
codechange
Author | SHA1 | Date |
---|---|---|
![]() |
65d0ef32a4 | |
![]() |
75bbd439e9 | |
![]() |
68f3fe56a1 | |
![]() |
a48cd146f8 | |
![]() |
85a7e606aa |
|
@ -2,3 +2,4 @@
|
|||
__pycache__
|
||||
TODO.md
|
||||
script.py
|
||||
.idea
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'MainWindow_map.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.1
|
||||
# Created by: PyQt5 UI code generator 5.12.3
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
@ -110,6 +109,13 @@ class Ui_MainWindow(object):
|
|||
self.pushButton_stop.setFont(font)
|
||||
self.pushButton_stop.setObjectName("pushButton_stop")
|
||||
self.verticalLayout_2.addWidget(self.pushButton_stop)
|
||||
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("宋体")
|
||||
font.setPointSize(12)
|
||||
self.pushButton.setFont(font)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.verticalLayout_2.addWidget(self.pushButton)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||
self.horizontalLayout.setStretch(0, 1)
|
||||
self.horizontalLayout.setStretch(1, 1)
|
||||
|
@ -151,4 +157,5 @@ class Ui_MainWindow(object):
|
|||
self.label_4.setText(_translate("MainWindow", "算法选择"))
|
||||
self.pushButton_run.setText(_translate("MainWindow", "运行"))
|
||||
self.pushButton_stop.setText(_translate("MainWindow", "停止"))
|
||||
self.pushButton.setText(_translate("MainWindow", "退出程序"))
|
||||
self.label_show.setText(_translate("MainWindow", "<html><head/><body><p><br/></p></body></html>"))
|
||||
|
|
|
@ -183,6 +183,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>宋体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>退出程序</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
125
README.md
|
@ -6,7 +6,8 @@ SeAI Palette集智调色板是面向集群网络的多节点智能协同路径
|
|||
|
||||
软件界面简单,易学已用,包含参数的输入选择,程序的运行,算法结果的展示等,源代码公开,算法可修改。
|
||||
|
||||
开发人员:H.P. Yu、K. Wang、J. Li、H.T. Li、Z.Q. Wang、Z.Y. Zhao、L.F. Zhang、G. Chen、X.D. Yang
|
||||
开发人员:H.P. Yu、K. Wang、J. Li、H.T. Li、Z.Q. Wang、Z.Y. Zhao、L.F. Zhang、G. Chen
|
||||
|
||||
|
||||
## 1. 开发环境配置
|
||||
运行以下命令:
|
||||
|
@ -21,125 +22,9 @@ conda env create -f create_env.yaml
|
|||
```python
|
||||
python main_tt.py
|
||||
```
|
||||
## 3. 问题定义和仿真设计
|
||||
1)环境设计
|
||||
|
||||
环境依赖方面,仿真平台主要基于Python平台实现。具体地,物理仿真引擎使用的是Pymunk,并将物理仿真结果Pygame渲染成可视化结果。此外,在数值计算方面主要使用了Numpy工具包。
|
||||
|
||||
为保证实验结果综合客观,仿真平台包含了三张虚构的海图。
|
||||
|
||||
2)方案设计
|
||||
|
||||
主要考虑了三种方案:
|
||||
|
||||
单AUV全覆盖路径规划,即只规划单个AUV的全覆盖路径;
|
||||
|
||||
多AUV全覆盖路径规划,即需要同时规划多个AUV相互配合情况下的全覆盖路径;
|
||||
|
||||
需要充电的单/多AUV路径规划,即在上面两种方案的基础上,额外考虑AUV的充电的需要,AUV可根据能量情况自行前往充电桩进行充电,降低人工打捞充电带来的巨大运维成本。
|
||||
|
||||
针对以上三种方案,分别设计了仿真实验测试在不同目标覆盖率下,AUV使用不同算法巡航海域所需的总时间以及重复航行区域的大小。
|
||||
|
||||
## 4. 使用算法
|
||||
|
||||
* 栅格法
|
||||
* 牛耕法
|
||||
* 内螺旋法
|
||||
* 贪心法
|
||||
|
||||
## 5. 软硬件运行平台
|
||||
|
||||
(1)配置要求
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>组件</th>
|
||||
<th>配置</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>系统 </td>
|
||||
<td>Windows 10 家庭中文版 20H2 64位</td>
|
||||
<td>扩展支持Linux和Mac系统</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>处理器</td>
|
||||
<td>处理器类型:
|
||||
酷睿i3兼容处理器或速度更快的处理器
|
||||
处理器速度:
|
||||
最低:1.0GHz
|
||||
建议:2.0GHz或更快
|
||||
</td>
|
||||
<td>不支持ARM、IA64等芯片处理器</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>内存</td>
|
||||
<td>RAM 16.0 GB (15.7 GB 可用)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>显卡</td>
|
||||
<td>最小:核心显卡
|
||||
推荐:GTX1060或同类型显卡
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>硬盘</td>
|
||||
<td>500G</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<td>显示器</td>
|
||||
<td>3840×2160像素,高分屏</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<td>软件</td>
|
||||
<td>Anaconda3 2020及以上</td>
|
||||
<td>Python3.7及以上,需手动安装包</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
(2)手动部署搭建及运行
|
||||
推荐的安装步骤如下:
|
||||
安装Anaconda3-2020.02-Windows-x86_64或以上版本;
|
||||
手动安装pygame、pymunk、pyyaml、numpy、easydict和pyqt,安装方式推荐参考如下:
|
||||
```
|
||||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygame==2.0.1
|
||||
```
|
||||
将软件模块文件夹拷贝到电脑中(以D盘为例,路径为D:\island-multi_ships)
|
||||
|
||||
## 6. 模块详细设计
|
||||
(1)界面设计
|
||||
界面总体设计如下:
|
||||
|
||||

|
||||
|
||||
为了操作简便,主界面只分为功能选择区和信息输出区以及“运行”、“停止”按钮。功能选择区涵盖“地图选择”、“最低覆盖率”、“AUV数量”、“区域划分方向”、“算法选择”、“是否渲染”、“考虑固定节点”、“是否需要充电”和与之相关联的“AUV电池容量”。
|
||||
信息输出区主要包含当前运行的相关信息,包括状态标志、运行完成标志、步数、重复步数、重复率等。
|
||||
|
||||
(2)地图0演示
|
||||
采用“牛耕法”,最低覆盖率100%,AUV数量为1,运行结果如下,步数2373,重复步数60,重复率2.40%。
|
||||
|
||||

|
||||
|
||||
当“是否渲染”选择“否”时,物理引擎图形不展示,程序后台静默运行后自动输出相关状态及结果信息。
|
||||
|
||||

|
||||
|
||||
|
||||
当AUV数量为3时,使用的步数大大减少,仅需要706步,重复步数为38,重复率1.52%。
|
||||

|
||||

|
||||
|
||||
算法选择“贪心法”,使用的步数705,重复步数33,重复率1.32%,和“牛耕法”相同。
|
||||
|
||||
当考虑充电时,设置电池容量为100,使用的步数964,重复步数709,重复率28.36%。
|
||||
|
||||
## 7. 其他说明
|
||||
|
||||
* 程序输出的说明
|
||||
## 3. 一些说明
|
||||
1. 程序输出的说明
|
||||
|
||||
程序运行结束后会在命令行输出类似于下面的结果:
|
||||
```
|
||||
|
@ -151,7 +36,7 @@ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygame==2.0.1
|
|||
```
|
||||
分别为使用的步数,重复的步数和重复率。
|
||||
|
||||
* 关于渲染结果的说明
|
||||
2. 关于渲染结果的说明
|
||||
|
||||
渲染中不同移动节点负责的区域用不同颜色标记,每个区域颜色越深表示该区域被重复走的次数越多。
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
pygame==2.0.1
|
||||
pymunk==6.0.0
|
||||
pyyaml==5.4.1
|
||||
numpy==1.20.3
|
||||
easydict==1.9
|
|
@ -9,3 +9,4 @@ dependencies:
|
|||
- pyyaml==5.4.1
|
||||
- numpy==1.20.3
|
||||
- easydict==1.9
|
||||
- pyqt == 5.15.4
|
||||
|
|
|
@ -12,8 +12,6 @@ class mywindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
super(mywindow, self).__init__()
|
||||
self.setupUi(self)
|
||||
|
||||
# 界面初始化
|
||||
|
||||
self.comboBox_map.addItems(['地图0', '地图1', '地图2'])
|
||||
|
||||
self.comboBox_algo.addItems(['野火法+牛耕法', '野火法+内螺旋法', '野火法+贪心法'])
|
||||
|
@ -124,6 +122,5 @@ class mywindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
if __name__ == '__main__':
|
||||
app = QApplication(sys.argv)
|
||||
window = mywindow()
|
||||
# window.showMaximized()
|
||||
window.show()
|
||||
sys.exit(app.exec_())
|
||||
|
|
BIN
pic2/3.png
Before Width: | Height: | Size: 28 KiB |
BIN
pic2/4.jpg
Before Width: | Height: | Size: 17 KiB |
BIN
pic2/40.png
Before Width: | Height: | Size: 1.5 MiB |
BIN
pic2/5.jpg
Before Width: | Height: | Size: 13 KiB |
BIN
pic2/6.png
Before Width: | Height: | Size: 74 KiB |
BIN
pic2/7.jpg
Before Width: | Height: | Size: 16 KiB |
BIN
pic2/8.jpg
Before Width: | Height: | Size: 13 KiB |
BIN
pic2/9.jpg
Before Width: | Height: | Size: 14 KiB |
BIN
pic2/9.png
Before Width: | Height: | Size: 74 KiB |