﻿ 基于贝叶斯分类器的船舶型材优化设计
 舰船科学技术  2024, Vol. 46 Issue (10): 75-82    DOI: 10.3404/j.issn.1672-7649.2024.10.013 PDF

Optimal design of ship profiles based on bayesian classifier
LIU Jun-jie, WANG Jun, LIANG Xiao-feng, WANG Jian
Key Laboratory of Marine Intelligent Equipment and System of Ministry of Education,Shanghai Jiao Tong University, Shanghai 200240, China
Abstract: The lightweight design of ship structure is important to improve the ship's carrying capacity and achieve greater economic benefits. In response to the problem that the constraints are not expressed explicitly when the traditional optimization design method builds the optimization model, a Bayesian classifier-based optimization design method for ship profiles is proposed. Firstly, a Bayesian classifier is constructed based on Bayesian theory and kernel density estimation method, and then the Bayesian classifier is used to solve the problem instead of implicit constraint function, and finally the optimization design problem of T profile is verified as an example, and the optimization results are compared with the solution results in the case that the constraints can be expressed explicitly. The deviation of the objective function of Bayesian classifier based on single constraint is less than 2%, and the deviation of the objective function of Bayesian classifier solved based on multiple constraints is around 8%, and different Bayesian classifier design methods will have an impact on the accuracy of the optimization solution results. The use of Bayesian classifier to make decision boundary can replace the actual boundary for optimization solution, which verifies the feasibility of Bayesian classifier-driven solver seeking, and provides a new idea to solve the problem of constraint without explicit expression.
Key words: ship structure     optimization design     bayesian classifier
0 引　言

1 贝叶斯基分类器基础

1）条件概率公式

AB 是2个随机事件，发生的概率分别用$P(A)$$P(B)表示，且满足：P (A) ≠0，P (B) ≠0，记事件A发生的条件下事件 B 发生的概率为P(B|\boldsymbol A)，则有条件概率公式：  P(B|A) = \frac{{P(AB)}}{{P(A)}} 。 (1) 式中，P(AB) 为事件 A 和事件 B 同时发生的概率，称之为联合概率，也可记为 P(A·B)$$ P(A \cap B)$

2）全概率公式

 $P(A)={\displaystyle \sum _{i=1}^{n}P({B}_{i})·P(A|{B}_{i})} 。$ (2)

3）贝叶斯公式

 $P({B}_{i}|A)=\frac{P(A|{B}_{i})·P({B}_{i})}{{\displaystyle \sum _{i=1}^{n}P(A|{B}_{i})·P({B}_{i})}} 。$ (3)

 图 1 朴素贝叶斯分类器模型示意图 Fig. 1 Schematic diagram of naive bayes classifier model
2 基于贝叶斯分类器的船舶结构优化设计 2.1 船舶结构优化设计问题

 $\begin{gathered} {\boldsymbol {X}} = {\text{ }}{\left[ {{x_1},{x_2},...,{x_D}} \right]^{\text{T}}} ，\\ {\text{min }}f({\boldsymbol {X}}). \\ {\text{s}}{\text{.t}}{\text{. }}\left\{ \begin{gathered} {h_i}({\boldsymbol {X}}) = 0,{\text{ }}i = 1,2, \cdots ,p ，\\ {{g} _j}({\boldsymbol {X}}) \leqslant 0,{\text{ }}j = 1,2, \cdots ,q ，\\ {{\boldsymbol {X}}_{{L}}} \leqslant {\boldsymbol {X}} \leqslant {{\boldsymbol {X}}_{{U}}} 。\\ \end{gathered} \right. \\ \end{gathered}$ (4)

2.2 基于贝叶斯分类器的船舶结构优化设计

 $P({C}_{i}|X)=\frac{P(X|{C}_{i})\cdot P({C}_{i})}{P(X)}=\frac{P(X|{C}_{i})\cdot P({C}_{i})}{{\displaystyle \sum _{k=1}^{2}P(X|{C}_{k})\cdot P({C}_{k})}} 。$ (5)

 $P({C_k}) \cong \frac{{{N_k} + 1}}{{N + 2}}{\text{ }}。$ (6)

 $P({\boldsymbol {X}}|{C_k}) = \mathop \prod \limits_{i = 1}^D \frac{1}{{{N_k}}}\sum\limits_{j = 1}^{{N_k}} {\frac{1}{{{\sigma _{i,k}}\sqrt {2{\text{π }}} }}{\text{ }}} {\text{e}}^{ - \frac{{{{({x_i} - \hat x_i^j)}^2}}}{{2\sigma _{i,k}^2}}} 。$ (7)

 ${\displaystyle\sigma _{i,k}} = \frac{{0.4}}{{\sqrt N }} 。$ (8)

 $\hat x_i^j = \displaystyle\frac{{x_i^j - {x_{{i}}}_{{\text{,}}\min }}}{{{x_i}_{,\max } - {x_i}_{,\min }}} 。$ (9)

3 优化模型

 图 2 T 型材的剖面示意图 Fig. 2 Cross-sectional view of the T profile

 $\begin{gathered} \min {\text{ }}f = {b_1}{t_1} + ht ，\\ s.t.{\text{ }}\left\{ \begin{gathered} W \geqslant 1.205 \times {10^6} ，\\ {\text{ }}ht - 1.5{b_1}{t_1} \geqslant 0 ，\\ {\text{ }}10 - {b_1}/{t_1} \geqslant 0 ，\\ {\text{ 7}}0 - h/t \geqslant 0 ，\\ {\text{ }}100{\text{ mm}} \leqslant {b_1} \leqslant 300{\text{ mm}} ，\\ {\text{ }}8{\text{ mm}} \leqslant {t_1} \leqslant 18{\text{ mm}} ，\\ {\text{ 300 mm}} \leqslant h \leqslant 600{\text{ mm}} ，\\ 4{\text{ mm}} \leqslant t \leqslant 12{\text{ mm}}。\\ \end{gathered} \right. \\ \end{gathered}$ (10)

4 数值计算与结果分析

4.1 基于单约束条件的贝叶斯分类器

 图 3 实际边界与决策边界 Fig. 3 Actual boundary and decision boundary

4.2 基于多约束条件的贝叶斯分类器

 图 4 2种构造分类器的方法求解偏差对比 Fig. 4 Comparison of solutions using two methods for constructing classifiers

 图 5 线性约束条件创建决策边界的过程 Fig. 5 The process of creating decision boundaries with linear constraints
5 结　语

1）本文提出的基于贝叶斯分类器的船舶结构优化方法为一种可行的优化设计方法，贝叶斯分类器可在优化模型难以得到显式约束函数的情况下，进行优化求解，即代替隐式约束函数。

2）在贝叶斯分类器的构造方法上，对单个约束条件单独构造贝叶斯分类器的效果比合并若干约束条件构造贝叶斯分类器的效果更佳。

 [1] 韩余贺. 船舶结构优化设计方法[J]. 科学与财富, 2019(25): 19. HAN Y H. Ship structure optimization design method[J]. Science and Wealth, 2019(25): 19. [2] 刘博斌. 关于船舶结构优化设计的若干思考[J]. 船舶物资与市场, 2021, 29(1): 31-32. [3] 王理冬, 汪光阳, 程泽凯, 等. 贝叶斯网络的发展与展望[J]. 安徽工业大学学报(自然科学版), 2006, 23(2): 195-198. WANG L D, WANG G Y, CHENG Z K, et al. Development and prospect of bayesian networks[J]. Journal of Anhui University of Technology (Natural Science Edition), 2006, 23(2): 195-198. [4] 董立岩, 苑森淼, 刘光远, 等. 基于贝叶斯分类器的图像分类[J]. 吉林大学学报(理学版), 2007, 45(2): 249-253. DONG L Y, YUAN S M, LIU G Y, et al. Image classification based on bayesian classifier[J]. Journal of Jilin University (Science Edition), 2007, 45(2): 249-253. DOI:10.3321/j.issn:1671-5489.2007.02.020 [5] 华玲, 唐韬, 卿粼波, 等. 基于朴素贝叶斯分类的DVC-HEVC快速转码[J]. 太赫兹科学与电子信息学报, 2020, 18(2): 235-240. HUA L, TANG T, QING S B, et al. DVC-HEVC fast transcoding based on naive bayes classification[J]. Journal of Terahertz Science and Electronic Information Technology, 2020, 18(2): 235-240. [6] 齐奔, 梁金刚, 张立国, 等. 基于贝叶斯分类器的核电厂事故诊断方法研究[J]. 原子能科学技术, 2022, 56(3): 512-519. QI B, LIANG J G, ZHANG L G, et al. Research on accident diagnosis method of nuclear power plant based on bayesian classifier[J]. Atomic Energy Science and Technology, 2022, 56(3): 512-519. [7] 王辉, 李玉亮, 王莉. 完全贝叶斯分类器在经济数据分类中的应用[J]. 东北师大学报(自然科学版), 2019, 51(4): 65-69. WANG H, LI Y L, WANG L. Application of complete bayesian classifier in economic data classification[J]. Journal of Northeast Normal University(Natural Science Edition), 2019, 51(4): 65-69. [8] 郑宏. 贝叶斯分类器在汽车发动机喷射故障诊断中的应用研究[D]. 重庆: 重庆大学, 2011. [9] 张晓莉. 朴素贝叶斯分类器及其改进算法研究[D]. 青岛: 山东科技大学, 2020. [10] PEARL J. Probabilistic reasoning in intelligent systems: networks of plausible inference[J]. Computer Science Artificial Intelligence, 1988, 70(2): 1022-1027. [11] 崔世亮, 刘广斌. 基于专家系统的船舶结构优化设计[J]. 船舶物资与市场, 2022(5): 24-26. [12] 邵伟. 基于鲁棒性的船舶结构优化设计研究[D]. 镇江: 江苏科技大学, 2012. [13] DAVID W, CAROLYN C S. Bayesian network classifiers for set-based collaborative design[J]. Journal of Mechanical Design, 2012, 134(7): 1-14. DOI:10.1115/1.4006323