Agent-assisted optimization method for hull shape design based on transfer learning

By adopting the agent-assisted quantum particle swarm optimization method of transfer learning in the hull shape design, and using the two-stage TrAdaBoost.R2 to build the agent model and online update strategy, the problem of low efficiency of data-driven optimization in high-dimensional hull design is solved and high efficiency is achieved. optimization process and good algorithm performance.

CN118013647BActive Publication Date: 2024-09-10JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410335062.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2024-09-10
Estimated Expiration
2044-03-22

AI Technical Summary

Technical Problem

In hull shape design, it is difficult for existing technologies to efficiently solve high-dimensional problems, and the expensive data-driven optimization process is time-consuming and costly, especially when using group-based heuristic algorithms. Offline agent-assisted optimization methods are used in Poor performance on high-dimensional problems.

Method used

The agent-assisted quantum particle swarm optimization (TLSA-QPSO) method based on transfer learning is used to build the agent model through the two-stage TrAdaBoost.R2, combined with the online agent update strategy and particle migration scheme, to reduce the number of CFD simulations and improve the agent fitting degree and Optimize efficiency.

Benefits of technology

It effectively reduces the CFD simulation overhead and improves the convergence speed of the optimization process and the quality of solutions. It has good versatility and can be applied to different types of hull shape design problems, especially in high-dimensional problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118013647B
    Figure CN118013647B
Patent Text Reader

Abstract

An agent-assisted optimization method for hull shape design based on transfer learning belongs to the field of ship design. Firstly, a surrogate model is constructed by implementing a two-stage TrAdaBoost.R2 transfer learning algorithm using samples of two different types of hull shape parameter representations. The two parameter representations are based on ship scale coefficients (used as source domain) and geometric parameters (used as target domain), respectively. Secondly, a surrogate model update strategy is proposed to periodically add the two CFD simulation positions with the current best estimated fitness value and the maximum uncertainty to the target domain, respectively, to reconstruct the surrogate model. Finally, an improved quantum particle swarm optimization (QPSO) algorithm combined with a particle migration scheme is adopted as the optimizer to make it better adapt to the reconstruction of the surrogate model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of ship design and provides a transfer learning-based agent-assisted quantum particle swarm optimization (TLSA-QPSO) method. Background Art

[0002] With the development of computer technology, computer-aided design methods have been widely used in many industrial fields. In the field of ship design, simulation-based design (SBD) has gradually replaced physical experiment-based methods such as ship model experiments in recent years and played an important role. The SBD method combines numerical simulation techniques such as computational fluid dynamics (CFD) with optimization techniques to find a set of optimal design parameters for a specific ship so that the ship can achieve a satisfactory performance. Compared with methods based on physical experiments, the SBD method is indeed cheaper and more time-saving. However, a single CFD simulation is still very time-consuming, and it may take a lot of time to evaluate candidates using CFD technology during the optimization process. This kind of optimization that can only be performed based on data collected from expensive physical experiments, real events, or complex numerical simulations is called data-driven expensive optimization. Compared with expensive optimization that can be evaluated by analytical mathematical functions, data-driven expensive optimization is obviously affected by more factors and may therefore be more expensive or computationally more expensive. Moreover, this phenomenon is more serious when using population-based heuristic algorithms such as genetic algorithms (GA) and particle swarm optimization (PSO) as optimizers, although these search algorithms are effective for the typical "black box" problem - hull shape design. In order to improve the efficiency of solving data-driven expensive optimization problems, surrogate-assisted optimization (SAO) algorithms are proposed. The SAO algorithm first constructs one or more surrogates based on samples in the feasible region to capture the fitness landscape of the problem, and then uses low-cost surrogates to replace the time-consuming evaluation in the optimization process. A large number of studies have used offline SAO, in which the surrogate model does not change, so there is no need for expensive evaluation during the search process. However, offline SAO is only applicable to problems with few dimensions so that the entire landscape can be easily captured. The offline SAO method only modifies one or two parts of the hull to make the dimensionality of such problems small. However, a relatively large number of samples still need to be collected in advance to ensure that the surrogate model is reliable in all feasible regions, otherwise the optimization process is likely to be misled. Therefore, the expensive sampling still makes the entire hull shape design process relatively expensive. Online SAO, a method in which the surrogate model is continuously updated during the optimization process, may be a feasible way to overcome the shortcomings of offline SAO. However, there are several key points in designing online SAO to reduce the total number of collected samples and effectively solve the relatively high-dimensional hull shape design problem. The first is to make the fidelity of the initially constructed surrogate model as high as possible, even if the dimension of the problem is relatively high. The second is to make the surrogate model update process better match the algorithm's search process to achieve effective optimization, and the third is to promptly eliminate the misleading of the candidates by the previously constructed surrogate model.

[0003] The present invention proposes a transfer learning-based agent-assisted quantum particle swarm optimization (TLSA-QPSO) method to solve the hull shape design problem. Compared with most existing SAOs for hull shape design, based on the new hull parameter representation, TLSA-QPSO can use two-stage TrAdaBoost.R2 to construct an agent. Combined with the online agent update strategy and particle transfer scheme, TLSA-QPSO can obtain a good agent fit with only a small number of samples for CFD simulation during the entire optimization process. This can effectively save computing time and achieve good algorithm performance, especially for relatively high-dimensional problems. In addition, the method also has good versatility. As shown in the experimental results, it can be applied to the optimization of various hulls, and can be used to optimize a specific part of the hull when samples are collected only in a certain part of the hull. Summary of the invention

[0004] This paper proposes a transfer learning-based surrogate-assisted quantum particle swarm optimization (TLSA-QPSO) method for the hull shape design problem. Firstly, a surrogate model is constructed by implementing a two-stage TrAdaBoost.R2 transfer learning algorithm using samples of two different types of hull shape parameter representations. The two parameter representations are based on the ship scale coefficient (used as the source domain) and the geometric parameters (used as the target domain), respectively. Secondly, we propose a surrogate model update strategy that periodically adds the two CFD simulation positions with the current best estimated fitness value and the maximum uncertainty to the target domain, respectively, to reconstruct the surrogate model. Finally, an improved quantum particle swarm optimization (QPSO) algorithm combined with a particle migration scheme is adopted as the optimizer to make it better adapt to the reconstruction of the surrogate model.

[0005] The technical solution of the present invention:

[0006] The agent-assisted optimization method for hull shape design based on transfer learning has the following steps:

[0007] Step 1: The input of the agent-assisted optimization method for hull shape design includes: source domain data DS consisting of a public ship model experimental dataset, unlabeled samples S1 consisting of a target domain ship type dataset, f(·) is used to represent the expensive function or CFD simulation calculation process, the feature space dimension D of the target domain data, the number of particles M in the particle swarm optimization process, and the number of iterations T in the continuous optimization process. The samples in the source domain data DS are labeled and only contain one type of parameter, the ship scale coefficient; the unlabeled samples in the target domain ship type data set include two types of parameters, the ship scale coefficient and the geometric parameters.

[0008] Step 2: Use f(·) to calculate the total resistance coefficient C of different ship type samples in the target domain ship type dataset T That is, f(S1) to Unlabeled samples S1 to And the total drag coefficient C T Constructing the complete target domain data DT0, the dimension of the target domain data feature space is D = D g +D d , where the feature space based on geometric parameters is D g Dimension, the feature space based on the hull scale coefficient is D d dimension.

[0009] Step 3: Construct an initial proxy model based on DS and DT0 Initialize the particle swarm optimization round n in step 6 to 0. The two-stage TrAdaBoost.R2 algorithm based on TrAdaBoost and AdaBoost.R2 is used to adjust the weights of the samples in two stages. In the first stage, only the weights of the source instances are gradually adjusted downward until a lower limit is reached, which is determined by F-fold cross validation. In the second stage, the weights of the target instances are updated in the normal way in the AdaBoost.R2 algorithm, and the weights of the source instances remain unchanged.

[0010] Step 4: Initialize each particle X n,i,0 , and evaluate the fitness value through the proxy model

[0011] Step 5: Initialize the individual optimal position P of each particle n,i,0 And find the global optimal position G n,0 .

[0012] Step 6: Determine whether |f(G n,T )-f(G n-1,T )|>ε, where ε is the set threshold accuracy, which is used to determine the fitness value f(G n,T ) and the fitness value f(G n-1,T ), when the difference is greater than ε, loop through steps 7 to 16, otherwise output the optimization result G n,T .

[0013] Step 7: Loop from 1 to T for the number of iterations t, loop from 1 to M for the particles i, and loop from 1 to D for the particle components j.

[0014] Step 8: Update particle X in the loop of step 7 n,i,t+1 The particle update process is implemented using the QPSO algorithm. The position of the i-th particle in the t-th iteration can be expressed as Then, the jth component of each particle should be calculated according to the equation Update, where is the local attractor of each particle, p i,n Each dimension of Given, the shrinkage-expansion coefficient α is designed to control the convergence speed of the QPSO algorithm, is the average of the pbest positions of all particles, and are two different random numbers in the interval (0,1).

[0015] Step 9: In the loop of step 7, evaluate the fitness value after updating the particles using step 8 in each round And update P n,i,t and G n,t . The individual best (pbest) position of each particle is P n,i,t Records the best previous position found by particle i since initialization, the global best (gbest) position G n,t is the best position among all individual best positions in the current iteration.

[0016] Step 10: Find out from all particles The particle with the largest difference between and f(·) is the particle with the largest uncertainty X umax particles. Compared with other particles, umax Add to DT n+1 The fitting accuracy of the agent to the group distribution area can be significantly improved.

[0017] Step 11: Calculate f(G n,T ) and f(x umax ).

[0018] Step 12: Update DT n+1 =DT n ∩G n,T ∩X umax . Choose to join DT n G n,T Mainly because its actual fitness value f(G n,T )(i.e. G n,T The CFD simulation results) are likely to be all f(X n,i,T ) and f(P n,i,T ). Therefore, by n,T Add to DT n+1 , it is possible to improve the fitting accuracy of the optimal solution area. n,T It is indeed a good f(G n,T ), then the updated can further increase the probability of finding a high-quality solution. Can promptly eliminate the n,T This is misleading because the search behavior of particles in the QPSO algorithm is greatly affected by the gbest position.

[0019] Step 13: Based on DS and DT n+1 Building a proxy model

[0020] Step 14: Using the Formula Calculate the number of particles M that need to be transferred tr .in is the sum of all instance weights of DS, for DT after construction n The sum of all instance weights.

[0021] Step 15: Calculation And sort the results, select the M with the smallest result tr Particles are retained and migrated to particle group X n+1,0 .

[0022] Step 16: Reinitialize the remaining MMs tr Particles to X n+1,0 , let n=n+1.

[0023] Step 17: After the loop of step 6 is completed, output the final solution G n,T and its fitness value f(G n,T ).

[0024] Beneficial effects of the present invention:

[0025] 1. Due to the application of transfer learning methods, only a small number of samples are needed to build a high-fidelity agent, and only two samples need to be added each time the agent is updated, which effectively reduces the CFD simulation overhead.

[0026] 2. Due to the implementation of the agent update strategy and particle transfer scheme, the misleading information brought by the previously constructed agents can be eliminated in time, making the final solution converge quickly and of good quality.

[0027] 3. The additional knowledge in the dataset of the source domain enables the agent to better capture the complex fitness landscape. With an effective optimizer, TLSA-QPSO can solve relatively high-dimensional problems well.

[0028] 4. The proposed online SAO based on transfer learning, agent update strategy and improved optimizer has good versatility and can be applied to different types of hull shape design problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1Schematic diagram of the extended source domain and target domain feature space.

[0030] Figure 2 A particle transfer scheme designed for the agent-based updating process.

[0031] Figure 3 Flowchart of the ship design process using the TLSA-QPSO algorithm.

[0032] Figure 4 This is the original KCS ship geometry diagram.

[0033] Figure 5 Schematic diagram of the control nodes of the FFD method for hull geometry reconstruction, where a is a schematic diagram of the global deformation control nodes and b is a schematic diagram of the local deformation control nodes.

[0034] Figure 6 Optimized for KCS hull shape and f(G n,T )’s change curve.

[0035] Figure 7 Figure 2 shows the front view, bow and stern diagrams of the KCS hull after preliminary design and optimization, where a is the initial hull front view, b is the optimized hull front view, c is the initial bow diagram, d is the optimized bow diagram, e is the initial stern diagram, and f is the optimized stern diagram.

[0036] Figure 8 It is the mean square error variation diagram of RBF-Tr and RBF-con in the entire feasible space.

[0037] Fig. 9 For RBF-Tr and RBF-con in G 12,T The mean square error variation plot for a small surrounding area.

[0038] Fig.10 Optimized hull shape for JBC and KVLCC2 and f(G n,T ), where a is the change curve diagram of JBC hull optimization, and b is the change curve diagram of KVLCC2 hull optimization. DETAILED DESCRIPTION

[0039] In order to evaluate the effectiveness of the proposed method, the minimum resistance ship design was carried out for the container ship KCS. The specific process from hull geometry representation to hull optimization was described in detail, and ablation experiments were carried out as well as comparisons with other ship type optimization methods. In addition, resistance optimization designs were carried out for the Japanese bulk carrier JBC and the Korean very large crude oil tanker KVLCC2, verifying the versatility of the method proposed in this invention for different ships.

[0040] KCS ship geometry representation and hull optimization - KCS is one of the benchmark ships for studying ship performance. It is a container ship with a bulbous bow developed by the Korea Research Institute of Ships and Ocean Engineering (KRISO). Figure 4 The geometry of the KCS container ship is shown, and the main features of the original KCS are shown in Table 1. In order to achieve a lower overall resistance coefficient C at a fixed speed T , the entire ship type of KCS has been optimized.

[0041] Table 1 Characteristic parameters of the original KCS ship type

[0042]

[0043] The FFD method is used to reconstruct the hull geometry based on the original KCS for overall or partial deformation. The basic idea of ​​FFD is to embed the deformed area of ​​the hull into a regularly subdivided parallelepiped 3D lattice. Then the scalar function of the 3D space generated by the Bezier polynomial can be defined as:

[0044]

[0045] Among them B i,a ,B j,b and B k,c are the normalized Bernstein basis functions in the s, t, and u directions, respectively, and P i,j,k is the vector of the control node in the s, t, and u directions. SX(s,t,u) is a point on the surface of the hull with local coordinates (s,t,u). If you move the control node, you change P i,j,k , the shape of the hull will be deformed. Then, by changing the new P i,j,k Substituting into the scalar function, the coordinates of any point on the deformed hull surface can be calculated. Therefore, if we need to minimize the resistance of KCS by modifying the hull geometry based on FFD, we should first determine all control nodes P 1 ,P 2 ,…,P R , and then by selecting each control node P r The corresponding displacement variable p r,s ,p r,t and p r,u To form the design space. A two-stage hull geometry reconstruction method is used to deform the entire hull, including global deformation in the first stage and local deformation in the second stage. The global deformation aims to change the width and depth of the hull by setting eight control nodes, such as Figure 5 In order to ensure the Froude number remains unchanged, the length of the hull does not change, where g is the gravitational acceleration. In order to effectively reduce the number of design variables, we group the displacement variables of the control nodes that need to be moved, and the changes of all variables in each group are consistent. Specifically, {p 1,s ,p 2,s ,p 5,s ,p 6,s} is a group used to change the width of the hull, and its displacement value is determined by X 5 =Δp 1,s =Δp 2,s =Δp 5,s =Δp 6,s Indicates. 6 =Δp 2,u =Δp 3,u =Δp 6,u =Δp 7,u and X 7 =Δp 1,u =Δp 4,u =Δp 5,u =Δp 8,u The local deformation further fine-tunes the bow and stern of the KCS based on the hull shape generated by the global deformation. Eight control nodes are set at the bow and stern respectively, and Figure 5 Two nodes in the same group can move along the s, t, or u directions, so their displacements in the same direction can correspond to the same variable X j Therefore, these sixteen control nodes correspond to a total of twenty-four design variables X j ,j∈{8,9,…,31}. X j With Δp r,dir The relationship between is given by the following formula:

[0046]

[0047] In addition, both global deformation and local deformation need to meet certain specifications. During the global deformation process, the ratio of the hull size coefficient should change within the following range: L / B∈[6.0,7.5], B / H∈[2.7,3.8], D p / H∈[1.5,2.0]. Before and after local deformation, the displacement volume and the water-immersed surface area S W The maximum variation of must not exceed ±1%. In order to ensure that the hull geometry reconstruction can satisfy the above constraints in a simple way, similar to many ship design methods, Table 2 restricts the value range of all design variables related to FFD.

[0048] Table 2 Range of KCS ship type design variables

[0049]

[0050]

[0051] As for the dataset used as the source domain for transfer learning, the 60 series (S60) ship dataset is selected. According to the ship design standards of the samples in this dataset, C B The range was from 0.6 to 0.8, the L / B range was from 5.5 to 8.5, and the B / H was 2.5, 3, or 3.5. Then, experiments were conducted on these ship types. range from 0.9 to 1.6 to obtain the corresponding C T value. Therefore, L / B, B / H and C B They constitute the hull size coefficient part of the new representation of the hull, corresponding to X 1 ,X 2 ,X 3 and X 4 , so D d =4. The total dimension of the problem is D = D d +D g = 31, which is a relatively high value and poses a challenge to the performance of the optimization method used.

[0052] After determining the definitions and value ranges of all design variables, Latin hypercube sampling (LHS) was used to generate N(DT0) = 15 samples in the feasible space. The flow field was processed using FLUENT software and the C of the vessel represented by each sample was calculated. T , then DT0 can be formed. Considering the dual factors of accuracy and computational time, we chose a medium grid for CFD simulation. The inlet and outlet of the flow field are set as pressure inlet and pressure outlet, respectively. The governing equations used are unsteady two-phase fluid-incompressible Reynolds-averaged Navier-Stokes (RANS) equations. The k-omega shear stress transport (SST) model is used for turbulence closure, and the volume flow (VOF) method is applied to capture the free surface height. For the two-stage TrAdaBoost.R2 algorithm, the settings used are: the number of steps is 30, the maximum number of boosting iterations is 30, and the number of folds for cross-validation is 10. The base learner in the two-stage TrAdaBoost.R2 is an RBF network, so the agent constructed is the RBF model. The nearest neighbor number k used for uncertainty calculation is 3. For the QPSO algorithm, the number of particles M is 30, the number of iterations T of the continuous optimization process is set to 200, and α is set to decrease linearly from 1.0 to 0.5. The variable ε that determines whether TLSA-QPSO is terminated is set to 10 -6 .

[0053] Figure 6 The KCS full hull optimization process by implementing the TLSA-QPSO method is described. and f(G n,T ). In the initial stage, due to the relatively small number of modeling samples and the relatively large dimension, The fidelity is not high, so and f(G n,T ). In addition, The value of fluctuates greatly because the agent changes significantly at each rebuild during this period. However, due to the particle transfer scheme, G with poor CFD simulation results n,T may be discarded, thus eliminating the misleading of the previous agent in time. Therefore, this leads to f(G n,T ), indicating that the entire group quickly adjusts its search direction to explore the area with a smaller actual fitness value. After the algorithm performs several such operations, the search area of ​​the group is unlikely to change significantly. Then, based on the agent update strategy, the proposed method focuses on improving the fitting accuracy in this area. Therefore, Less fluctuation, its reliability is getting higher and higher. In the later stage, f(G n,T )and The changes in f(G n,T )and The difference between them is relatively small. In this case, terminating the optimization process in time to prevent collecting too many samples can not only effectively reduce the overhead of CFD simulation but also prevent overfitting.

[0054] In the above optimization process, a total of 12 proxy updates occurred (i.e., n = 12), so a total of N (DT 12 ) = 39 samples, i.e. 39 CFD simulations were performed. The values ​​of the 27 geometric parameters of the final solution are shown in Table 3. Table 4 shows a comparison of some main characteristics of the initial and optimized KCS hulls. T It is 2.9948, a decrease of 16.71% from the initial value. Figure 7 The front view, bow and stern of the initial and optimized KCS hull are shown. It can be seen that the bulbous bow of the optimized KCS is slightly longer and the bottom area of ​​the stern is slimmer than that of the initial one.

[0055] Table 3 All geometric parameter values ​​of the final solution

[0056]

[0057]

[0058] Table 4 Comparison of main features of initial KCS hull and optimal KCS hull

[0059]

[0060] Ablation experiment - To illustrate the effectiveness of transfer learning methods in achieving this goal, we first compare the mean square error (MSE) of the RBF model constructed by the TrAdaBoost.R2 algorithm (hereinafter referred to as RBF-Tr) with the MSE of the RBF model constructed without transfer learning (hereinafter referred to as RBF-con) when the number of training samples increases. The results are recorded in Figure 8 The samples used for RBF-Tr modeling are consistent with the samples in the previous article, while the samples used for RBF-con modeling are collected according to the LHS standard. To ensure the fairness of the comparison, an additional thirty samples were collected as a validation set in the entire feasible space using the LHS method and CFD simulation. Figure 8 , it can be clearly seen that the MSE of RBF-con decreases rapidly with the increase in the number of samples, but it is not lower than the MSE of the initial RBF-Tr until the number of samples is greater than 31. In addition, the MSE of RBF-Tr always remains smaller than the MSE of RBF-con. These observations emphasize that for modeling agents with the same fidelity, the TrAdaBoost.R2 algorithm can effectively reduce the number of samples that need to be collected relative to modeling methods without transfer learning. It is worth noting that having high agent fidelity at the beginning of the search process can significantly reduce the potential misleading of the optimization process, allowing the algorithm to quickly focus the search on areas where the optimal solution may be found.

[0061] However, although the MSE of RBF-Tr is not very large at the beginning, due to the additional knowledge from the source domain and the effectiveness of TrAdaBoost.R2, its decrease is not significant as the number of samples increases. This is reasonable because the additional samples added according to the proposed proxy update strategy are located in the current search area of ​​the group instead of being uniformly distributed, so the fidelity improvement of RBF-Tr on the entire landscape may not be very significant. However, the help of transfer learning may cause the added samples to be of high quality. Therefore, the TLSA-QPSO method can more effectively improve the fitting accuracy in the area where the proposed method may find the optimal solution than the LHS-based method. In other words, this sample addition process can enable the proposed method to eventually find a high-quality solution without adding too many samples in the entire feasible region, indirectly reducing the total number of samples that need to be collected to find a satisfactory solution. To demonstrate this, Fig. 9 Compared with the G finally found around 12,TThe MSE values ​​of RBF-Tr and RBF-con in a small area around. In this experiment, LHS and CFD methods were used to calculate the MSE values ​​of RBF-Tr and RBF-con in a small area around G. 12,T Ten additional samples were collected as a validation set within 10% of the entire feasible region centered on . For this small region, the fitting accuracy of RBF-Tr continues to improve with the increase in the number of samples, while the MSE of RBF-Tr is always much lower than that of RBF-con. This means that such a proxy update strategy is very effective in improving the fitting accuracy of areas where the optimal solution may exist. Therefore, when not many samples are collected, TLSA-QPSO has a high probability of eventually finding an ideal solution, which many offline SAO algorithms based on LHS may not be able to do.

[0062] Comparative Analysis of Different Methods for KCS Ship Design - In order to demonstrate the advantages of the proposed method, the KCS ship optimization results obtained by TLSA-QPSO are compared with those of two other SAO methods, both of which are state-of-the-art solvers for the ship design problem. In addition, an offline version of the proposed method is applied as a competitor. In this method, a surrogate is constructed using a two-stage TrAdaBoost.R2 before the optimization process begins, and then the QPSO algorithm is utilized to find a solution without updating the surrogate. For fairness in the comparison, N = 40 modeling samples were collected for all three compared methods using the LHS and CFD methods, which is almost equal to the number of samples collected by TLSA-QPSO. Except for sampling, the settings of all other compared methods are the same as those in the corresponding references or the settings of the proposed method.

[0063] The statistical results are recorded in Table 5. It can be observed that the CFD simulation results of the proposed method are significantly better than those of the other three competitors. In addition, the estimated C T The prediction error also shows that the TLSA-QPSO method can obtain better fitting accuracy in the area around the gbest finally found. In addition, the offline version of the proposed method is slightly better than the other two comparison methods, but worse than the online version. This once again proves the effectiveness of the transfer learning method as well as the agent update strategy. In addition, Table 5 also lists the results of the three comparison methods when N = 80 samples. It can be seen that even if the number of samples is doubled, the results and prediction errors obtained by the three comparison methods are still not as good as those obtained by TLSA-QPSO. This shows that compared with the state-of-the-art methods, TLSA-QPSO can obtain better problem-solving capabilities with fewer modeling samples in ship design problems with relatively high dimensions.

[0064] Table 5 Statistical results of TLSA-QPSO and other three comparison methods

[0065]

[0066] Ship form optimization for minimum resistance of two other ships - In order to demonstrate the versatility of the proposed method for different types of ships, the Japanese Bulk Carrier (JBC) and the Korean Very Large Crude Carrier (KVLCC2) were selected for resistance minimization. The two ships were model-scaled to save CFD simulation time. The optimization process was the same as that in KCS. The geometric reconstruction and representation of the hull form and the parameter settings also refer to the settings of the KCS ship form. In order to ensure that the two ships can meet the corresponding constraints during the global and local deformation processes, Table 6 shows the value ranges of the design variables of the two ships, which are related to the geometric parameters of the hull.

[0067] Table 6 Design variable value ranges based on geometric parameters of JBC and KVLCC2

[0068]

[0069]

[0070] During the optimization process of JBC and KVLCC2 hull, f(G n,T )and The changes are shown in Fig.10 a and Fig.10 In b, TLSA-QPSO terminates when n=13 and n=10, respectively. This means that no matter whether the scale of the ship design problem is relatively simple or complex, TLSA-QPSO can converge quickly, thereby effectively reducing the number of samples that need to be simulated by CFD. Tables 7 and 8 show that the C T Compared with the optimized JBC and KVLCC2 hulls, the C T The reductions were 8.77% and 10.52% respectively. All of these verify the effectiveness and versatility of the proposed hull design method for different ships.

[0071] Table 7 Comparison of main features of the preliminary design and optimized JBC hull

[0072]

[0073] Table 8 Comparison of the main features of the KVLCC2 hull after preliminary design and optimization

[0074]

Claims

1. An agent-assisted optimization method for hull shape design based on transfer learning, characterized in that: Here are the steps: Step 1: The input of the agent-assisted optimization method for hull shape design includes: source domain data DS consisting of a public ship model experimental dataset, unlabeled samples S1 consisting of a target domain ship type dataset, f(·) is used to represent the expensive function or CFD simulation calculation process, the feature space dimension D of the target domain data, the number of particles M in the particle swarm optimization process, and the number of iterations T in the continuous optimization process; the samples in the source domain data DS are labeled and only contain one type of parameter, the ship scale coefficient; the unlabeled samples in the target domain ship type data set include two types of parameters, the ship scale coefficient and the geometric parameters; Step 2: Use f(·) to calculate the total resistance coefficient C of different ship type samples in the target domain ship type dataset T f(S1) to Unlabeled samples S1 to And the total drag coefficient C T Constructing the complete target domain data DT0, the dimension of the target domain data feature space is D = D g +D d , where the feature space based on geometric parameters is D g Dimension, the feature space based on the hull scale coefficient is D d dimension; Step 3: Construct an initial proxy model based on DS and DT0 Initialize the particle swarm optimization round n in step 6 to 0; the proxy model The two-stage TrAdaBoost.R2 algorithm based on TrAdaBoost and AdaBoost.R2 is used to adjust the weights of the samples in two stages. In the first stage, only the weights of the source instances are gradually adjusted downward until a lower limit is reached, which is determined by F-fold cross validation. In the second stage, the weights of the target instances are updated in the normal way in the AdaBoost.R2 algorithm, and the weights of the source instances remain unchanged. Step 4: Initialize each particle X n,i,0 , and evaluate the fitness value through the proxy model Step 5: Initialize the individual optimal position P of each particle n,i,0 And find the global optimal position G n,0 ; Step 6: Determine whether |f(G n,T )-f(G n-1,T )|>ε, where ε is the set threshold accuracy, which is used to determine the fitness value f(G n,T ) and the fitness value f(G n-1,T ), when the difference is greater than ε, loop through steps 7 to 16, otherwise output the optimization result G n,T ; Step 7: loop from 1 to T for the number of iterations t, loop from 1 to M for the particle i, and loop from 1 to D for the particle component j; Step 8: Update particle X in the loop of step 7 n,i,t+1 ; The particle update process is implemented using the QPSO algorithm, and the position of the i-th particle in the t-th iteration is expressed as Then, the jth component of each particle should be calculated according to the equation Update, where is the local attractor of each particle, p i,n Each dimension of Given, the shrinkage-expansion coefficient α is designed to control the convergence speed of the QPSO algorithm, is the average of the pbest positions of all particles, and are two different random numbers in the interval (0,1); Step 9: In the loop of step 7, evaluate the fitness value after updating the particles using step 8 in each round And update P n,i,t and G n,t ; The individual best pbest position of each particle is P n,i,t Records the best previous position found by particle i since initialization, the global best gbest position G n,t is the best position among all individual best positions in the current iteration; Step 10: Find out from all particles The particle with the largest difference between and f(·) is the particle with the largest uncertainty X umax particles; compared with other particles, X umax Add to DT n+1 Can significantly improve the fitting accuracy of the agent to the group distribution area; Step 11: Calculate f(G n,T ) and f(X umax ); Step 12: Update DT n+1 =DT n ∩G n,T ∩X umax ; Choose to join DT n G n,T Because its actual fitness value f(G n,T ) is all f(X n,i,T ) and f(P n,i,T ), where the actual fitness value f(G n,T ) is G n,T CFD simulation results; therefore, by n,T Add to DT n+1 , to improve the fitting accuracy of the optimal solution area; if G n,T It is indeed a good f(G n,T ), then the updated further increases the probability of finding a high-quality solution; on the contrary, Timely elimination of G n,T The misleading information is caused because the search behavior of particles in the QPSO algorithm is greatly affected by the position of gbest; Step 13: Based on DS and DT n+1 Building a proxy model Step 14: Using the Formula Calculate the number of particles M that need to be transferred tr ;in is the sum of all instance weights of DS, for DT after construction n The sum of all instance weights; Step 15: Calculation And sort the results, select the M with the smallest result tr Particles are retained and migrated to particle group X n+1,0 ; Step 16: Reinitialize the remaining MMs tr Particles to X n+1,0 , let n = n + 1; Step 17: After the loop of step 6 is completed, output the final solution G n,T and its fitness value f(C n,T ).