﻿ 改进遗传算法在锚泊系统张力优化中的应用
 舰船科学技术  2018, Vol. 40 Issue (3): 66-70 PDF

Application of improved genetic algorithm in tension optimization in mooring system
LI Ye, CHEN Hong-wei
School of Electronics and Information, Jiangsu University of Science and Technology, Zhenjiang 212003, China
Abstract: In order to make the mooring system reasonably adjust the tensions to ensure the operation of ship’s safety and positioning requirements according to environment conditions, the tension optimization allocation is necessary. In this paper, tension optimization model of chains and genetic algorithm theory are studied. To overcome the genetic algorithm’s premature convergence, slow convergence speed and the bad population diversity the measures of cross matching strategy of individual similarity, adaptive adjustment of crossover and mutation probability, nonlinear programming; quantum encoding, rotation gate dynamic adjustment, adaptive quantum mutation and catastrophe are adopted to improve algorithms. Finally, the improved algorithms are applied to simulate in tension optimization of a 1 000 t emergency salvage crane ship’s mooring system, the results show that the methods’ global optimum capability and convergence rate are obviously improved, and verify the tension optimizing allocation algorithms that are reasonable and effective.
Key words: mooring positioning     tension optimizing     improved genetic algorithm     individual similarity     quantum computation
0 引　言

1 锚链张力优化模型

 $\min {\kern 1pt} {\kern 1pt} {\kern 1pt} F = {\sum\limits_{i = 1}^8 {{\kern 1pt} \sum\limits_{j = 1}^8 {({T_i} - {T_j})^2} } }\text{。}$ (1)

 图 1 锚泊系统布置方式 Fig. 1 Mooring system layout
 $\left\{ \begin{gathered} \sum\limits_{i = 1}^8 {{T_i}\cos {\phi _i} = {F_{{x}}}}, \; \hfill \\ \sum\limits_{i = 1}^8 {{T_i}\sin {\phi _i} = {F_{{y}}}}, \hfill \\ \sum\limits_{i = 1}^8 {{T_i}{d_i}( - \cos {\phi _i}\sin {\theta _i} + \sin {\phi _i}\cos {\theta _i}) = N}\text{。} \hfill \\ \end{gathered} \right.\;\;\;\;\;\;\;\;\;\;\;\;\;$ (2)
 ${T_{\min }} \leqslant {T_i} \leqslant {T_{{{max}}}},1 \leqslant i \leqslant {{8}},$ (3)

2 改进遗传算法

2.1 改进遗传算法1（IGA1） 2.1.1 算法改进思路

2.1.2 个体相似度与交叉配对策略

1）个体相似度

 $\begin{split} \cos \theta =& \frac{{({{{X}}_i},{{{X}}_j})}}{{\left| {\left| {{{{X}}_i}} \right|} \right|\;\left| {\left| {{{{X}}_j}} \right|} \right|}} = \frac{{{{{X}}_j}^{{T}}{{{X}}_i}}}{{\sqrt {{{{X}}_i}^{{T}}{{{X}}_i}} \sqrt {{{{X}}_j}^{{T}}{{{X}}_j}} }}=\\ & \frac{{\sum\limits_{k = 1}^m {{x_{ik}}{x_{jk}}} }}{{\sqrt {(\sum\limits_{k = 1}^m {{x_{ik}}^2} )(\sum\limits_{k = 1}^m {{x_{jk}}^2} )} }}, \end{split}$ (4)
 $S({{{X}}_i},{{{X}}_j}) = \frac{{1 + \cos \theta }}{2} \in \left[ {0,1} \right]\text{。}$ (5)

2）交叉配对策略

2.1.3 交叉、变异自适应操作的改进

 ${p_{{c}}} = \left\{ \begin{array}{l}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{0.9^{{\kern 1pt} \alpha }}\;\;\;\;\;\;\;\;,\alpha < 1\text{且}{U_a} > {U_b},\\{p_{{{c1}}}} - \displaystyle\frac{{({p_{{{c1}}}} - {p_{{{c2}}}})(f - {f_{{{min}}}})}}{{{f_{{{max}}}} - {f_{{{min}}}}}},\text{其他}\text{。}\end{array} \right.$ (6)
 ${p_{{m}}} = \left\{ \begin{array}{l}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{0.15^\alpha }\;\;\;\;\;\;\;\;\;\;,\alpha < 1\text{且}{U_a} > {U_b},\\{p_{{{m1}}}} - \displaystyle\frac{{({p_{{{m1}}}} - {p_{{{m2}}}})(f' - {f_{\min }})}}{{{f_{{{max}}}} - {f_{{{min}}}}}},\text{其他}\text{。}\end{array} \right.$ (7)
2.1.4 非线性规划

1）初始化种群数 $N$ ，编码长度 $L$ ${P_{c{{max}}}} = {P_{{{c1}}}}$ ${P_{c{{min}}}} = {P_{{{c2}}}}$ ${P_{m{{max}}}} = {P_{{{m1}}}}$ ${P_{{m{ min}}}} = {P_{{{m2}}}}$ ，迭代结束条件等参数；

2）产生满足式（3）约束边界的 $N$ 个均匀分布的个体为初始种群；

3）计算个体适应度；

4）根据个体相似度交叉配对策略，选出父代配对交叉个体，以式（6）和式（7）式交叉和变异率进行操作形成子代个体新种群；

5）判断是否需要非线性寻优。若否，进入步骤6；若是，将得到满足约束的结果作为非线性寻优的初始条件进行局部搜索，并让得到的最优值作为新的种群进行全局搜索；

6）判断进化是否终止。若否，返回步骤3。

2.2 改进遗传算法2（IGA2）

2.2.1 量子比特编码

 $\left| \varphi \right\rangle = \alpha \;\left| {\;0\;} \right\rangle \beta \;\left| {\;1\;} \right\rangle,$ (8)

 ${{{q}}_j}^t = \left[ \begin{gathered} {\alpha _{11}}^t \cdots {\alpha _{1c}}^t{\alpha _{21}}^t \cdots {\alpha _{2c}}^t \cdots {\alpha _{m1}}^t \cdots {\alpha _{mc}}^t\; \hfill \\ {\beta _{11}}^t \cdots \;{\beta _{1c}}^t{\beta _{21}}^t \cdots {\beta _{2c}}^t \cdots {\beta _{m1}}^t \cdots {\beta _{mc}}^t\; \hfill \\ \end{gathered} \right]\;,$ (9)

2.2.2 旋转门动态调整策略

 ${{U}}({\theta _i}) = \left[ \begin{gathered} \cos ({\theta _i}) \hfill \\ \sin ({\theta _i}) \hfill \\ \end{gathered} \right.\;\;\left. \begin{gathered} - \sin ({\theta _i}) \hfill \\ \;\;\cos ({\theta _i}) \hfill \\ \end{gathered} \right]\;\;,{\theta _i} = s({\alpha _i},{\beta _i}) * \Delta {\theta _i},$ (10)

 $\Delta \theta = {\theta _{\min }} + \frac{{{f_{{x}}} - {f_{\min }}}}{{{f_{\min }}}} \times ({\theta _{\max }} - {\theta _{\min }}),$ (11)

2.2.3 量子变异与灾变

 ${P_m} = \left\{ \begin{array}{l}\quad 1,\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; f' > {f_{avg}},\\{P_0} + \frac{{f' - {f_{\min }}}}{{{f_{avg}} - {f_{\min }}}},f' < {f_{avg}}{\text{且}}f' \ne {f_{\min }},\\\quad {P_0},\;\;\;\;\;\;\;\;\;\;\;\; f' = {f_{\min }}\text{。}\end{array} \right.$ (12)

3 仿真与分析 3.1 参数选取

GA初始参数：种群数100，最大代数200，代沟0.9，染色体长度20；交叉和变异率分别为0.7,0.01；IGA1初始参数： ${P_{c{{max}}}}$ = 0.9， ${P_{c{{min}}}}$ = 0.4， ${P_{m{{max}}}}$ = 0.1， ${P_{m{{min}}}}$ = 0.01，其他参数同GA。IGA2初始参数：种群数100，染色体长度20，最大代数200。

3.2 仿真结果及分析

 图 2 张力优化算法进化过程 Fig. 2 Evolution process of tension optimization algorithm

IGA1算法依据相似度选择交叉配对个体，提高了算法操作效率和搜索空间，使得算法在10～20代能快速收敛。GA算法在60～65代停滞于局部最优，但IGA1算法由于非线性规划局部搜索作用使之很快找到全局最优解。IGA2算法由于动态旋转门始终保持最优解进化的方向，并在适当的时机进行灾变，提高了收敛速度，加快了全局和局部搜索过程。

4 结　语

 [1] BERNTSEN P I B, AAMOOM, LEIRA B J. Ensuring mooring line integrity by dynamic positioning: controller design and experimental tests[J]. Automatic, 2009, 45(5): 1285–1290. [2] 王雪, 陆晶. 船舶操控及锚泊过程的运动数学建模研究[J]. 舰船科学技术, 2016, 06: 13–15. WANG Xue, LU Jing. Study on mathematical modeling of ship motion control and mooring process[J]. Ship Science and Technology, 2016, 06: 13–15. [3] JI S W, CHOI M S, KIM Y B. A study on position mooring system design for the vessel moored by mooring lines[J]. IEEE/ASME Transactions on Mechatronics, 2015, 20(6): 2824–2831. [4] CHOUBEY N S, KHARAT M U. Approaches for handling premature convergence in CFG induction using GA[J]. Soft Computing in Industrial Application, 2011, 96: 55–56. [5] SERKAN BEKIROGLU, TAYFUN DEDE, YUSUF AYVAZ. Implementation of different encoding types on structural optimization based on adaptive genetic algorithm [J]. Finite Elements in Analysis and Design, 2009, 45(11): 826–835. [6] 李小青, 张文祥. 基于退火免疫遗传算法的测试用例生成研究[J]. 计算机仿真, 2008, 25(5): 171–174. LI Xiao-qing, ZHANG Wen-xiang. Test case generation based on annealing immune genetic algorithm[J]. Computer Simulation, 2008, 25(5): 171–174. http://d.wanfangdata.com.cn/Periodical_jsjfz200805044.aspx [7] 任子武, 伞冶. 自适应遗传算法的改进及在系统辨识中的应用研究[J]. 系统仿真学报, 2006, 18(1): 41–6. REN Zi-wu, SANYe. Improved adaptive genetic algorithm and its application research in parameter identification[J]. Journal of System Simulation, 2006, 18(1): 41–6. [8] 齐鸣, 严传续, 孟宏斌, 等. 船舶锚泊系统扰动力平衡计算[J]. 中国造船, 2012, 53(3): 158–164. QI Ming, YAN Chuan-xu, MENG Hong-bin, et al. Balance calculation on disturbing force of mooring system for vessel[J]. Shipbuilding of China, 2012, 53(3): 158–164. http://www.cqvip.com/QK/90375X/201203/43258668.html [9] SHAFIEEFAR M, REZVANI A. Mooring optimization of floating platforms using a genetic algorithm[J]. Ocean Engineering, 2007, 34(10): 1413–1421. [10] 金鸿章, 苏晓宇, 于安才, 等. 基于锚链切换的平台自动锚泊定位系统设计[J]. 电机与控制学报, 2014, 18(5): 93–98. JIN Hong-zhang, SU Xiao-yu, YU An-cai, et al. Design of automatic mooring positioning system based on mooring line switch[J]. Electric Machines and Control, 2014, 18(5): 93–98. [11] 严传续, 钱宏, 项军毅, 等. 铺管船锚泊定位系统优化设计研究[J]. 中国造船, 2010, 51(1): 83–93. YAN Chuan-xu, QIAN Hong, XIANG Jun-yi, et al. Study on design optimization of mooring positioning system for pipe laying vessel[J]. Shipbuilding of China, 2010, 51(1): 83–93. http://d.wanfangdata.com.cn/Periodical_zgzc201001011.aspx [12] 田小梅, 郑金华, 李合军. 基于父个体相似度的自适应遗传算法[J]. 计算机工程与应用, 2005, 18(3): 61–63. TIAN Xiao-mei, ZHENG Jin-hua, LI He-jun. Adaptive genetic algorithm based on parents’ similarity[J]. Computer Engineering and Applications, 2005, 18(3): 61–63. http://www.cqvip.com/QK/91690X/200518/15889223.html [13] 刘建文, 丁洁玉, 潘坤, 等. 基于个体相似度的改进自适应遗传算法研究[J]. 青岛大学学报(工程技术版), 2016, 31(1): 16–19. LIU Jian-wen, DING Jie-yu, PAN Kun, et al. Improved adaptive genetic algorithm based on individual similarity[J]. Journal of Qingdao University(E&T), 2016, 31(1): 16–19. [14] 陈超. 自适应遗传算法的改进研究及其应用[D]. 广州: 华南理工大学, 2011. [15] 胡宽, 常新龙, 宋笔锋, 等. 求解含等式约束化问题的遗传算法[J]. 上海交通大学学报, 2011, 45(1): 92–97. HU Kuan, CHANG Xin-long, SONG Bi-feng, et al. Genetic algorithm to solve optimization problem with equality constrains[J]. Journal of Shanghai Jiao Tong University, 2011, 45(1): 92–97. [16] HAN Kuk-Hyun, KIM Jong-Hwan. On the analysis of the quantum-inspired evolutiongary algorithm with a single individual[C]//IEEE Congress on Evolutionary Compution Shetaton Vancouver Wall Centre Hotel, Vancouver, BC, Canada, 2006: 9172.