Ship construction cost efficient prediction method based on CGPINNS
By adopting the CGPINNS model in ship construction cost prediction, combining the central differential method and physical information neural network, the problems of insufficient accuracy and error accumulation in the existing technology are solved, and more efficient and accurate construction cost prediction is achieved, which is suitable for complex ship design and diversified construction processes.
Patent Information
- Application Number
- CN202510282461.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-10
AI Technical Summary
The prior art has problems such as insufficient accuracy, accumulation of errors and insufficiently accurate portrayal of complex physical relationships in the prediction of ship construction costs, especially when facing complex ship design and diversified construction processes.
Using a method based on the central differential enhancement physical information neural network (CGPINNS), the physical laws and large amounts of actual data in ship construction are deeply integrated, and the derivative terms in gradient calculation are replaced by the central differential method to build an efficient and accurate ship construction cost prediction system.
It significantly improves the accuracy of cost prediction, reduces numerical oscillation errors, makes the prediction results more physical and reasonable, enhances the generalization ability of the model, is more adaptable, and can predict construction costs more accurately.
Smart Images

Figure CN120125304A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of shipbuilding technology and artificial intelligence technology, and particularly relates to an efficient shipbuilding cost prediction method based on CGPINNS. Background Art
[0002] In the shipbuilding industry, accurate cost prediction is of great significance for project success. Traditional prediction methods, such as those based on empirical formulas and statistical analysis of historical data, have obvious deficiencies when faced with complex shipbuilding. Modern ship designs are becoming increasingly complex, and new materials and advanced processes are emerging continuously. These methods are difficult to accurately grasp the complex relationships among numerous factors, resulting in large cost prediction deviations and putting enterprises at risk of budget out-of-control and profit loss.
[0003] Although machine learning technology has been applied to the field of cost prediction, ordinary machine learning models, such as support vector machines and random forests, have many problems. They are difficult to integrate the physical laws and professional knowledge in shipbuilding, are highly dependent on data, and their prediction performance drops significantly when the data is insufficient or noisy. At the same time, such models often simply regard cost prediction as a regression problem, ignoring the impact of physical principles on costs, and the prediction results lack physical rationality.
[0004] The physics-informed neural network (PINNS) attempts to integrate physical laws into neural networks, reducing the dependence on a large amount of data to a certain extent and improving the generalization ability of the model. However, traditional PINNS has poor accuracy in high-precision shipbuilding cost prediction, error accumulation is likely to occur in the calculation process, and complex physical relationships are not accurately characterized. Although the gradient-enhanced physics-informed neural network (GPINNS) improves the accuracy by introducing gradient information, it is still troubled by numerical instability and error accumulation when calculating the first-order derivative and cannot meet the high requirements of shipbuilding cost prediction. The central difference-enhanced physics-informed neural network (CGPINNS) can effectively reduce numerical oscillation errors by using the central difference method to replace the derivative term in gradient calculation, improve the prediction accuracy while integrating physical information, enhance the generalization ability of the model, and provide a more reliable solution for shipbuilding cost prediction. Summary of the Invention
[0005] The purpose of the present invention is to solve the drawbacks existing in the prior art, and to propose an efficient shipbuilding cost prediction method based on CGPINNS. This method uses the central difference-enhanced physics-informed neural network (CGPINNS) technology to deeply integrate the physical laws in shipbuilding with a large amount of actual data, and constructs an efficient and accurate shipbuilding cost prediction system, aiming to provide an innovative cost prediction solution for the shipbuilding industry and help enterprises enhance their market competitiveness.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] An efficient prediction method for ship construction cost based on CGPINNS, comprising the following steps:
[0008] Step 1: Data collection: Comprehensively collect various types of data related to ship construction to provide a basis for subsequent prediction work; in terms of ship design parameters, it covers ship types (such as bulk carriers, container ships, oil tankers, etc.), dimensions (length, width, molded depth, etc.), structural complexity (such as hull structure form, cabin layout, etc.), speed requirements, etc.; the collection of construction material information includes material types (steel, aluminum alloy, composite materials, etc.), usage amounts (material usage amounts in different parts), price fluctuation trends (obtained through market research and price indices); construction process data involves welding processes (welding methods, welding quality requirements), assembly processes (section assembly sequence, precision control requirements), coating process complexity (coating types, number of coating layers, etc.); labor cost data includes the working hours and wage standards of different types of workers (such as welders, fitters, painters, etc.); in addition, a large amount of historical construction cost data is collected, including the actual cost details of various ships built in the past, providing rich samples for model training;
[0009] Step 2: Data preprocessing. The collected data often has various problems and needs to be cleaned, denoised, and normalized through a preprocessing module to improve data quality and provide a good data basis for subsequent model training;
[0010] Step 3: CGPINNS model construction module: Construct a gradient-enhanced physics-informed neural network model based on central differences; first, determine the physical equations involved in ship construction cost prediction, such as according to the beam theory in ship structural mechanics, which can be used to analyze the influence of hull structural strength on material selection and usage amounts, and strength calculation formulas in material mechanics (such as the tensile strength and compressive strength formulas of materials, used to evaluate the applicability and usage requirements of materials in ship construction), etc.; then, use the central difference method to replace the derivative terms in gradient calculation to improve model accuracy; when constructing the loss function, include physical equation residual loss, boundary condition loss, initial condition loss, and central difference gradient residual loss, etc.; finally, build a neural network structure, and determine the number of hidden layers and the number of neurons according to the actual needs of ship construction cost prediction, such as constructing a neural network with 3 - 5 hidden layers, and each hidden layer contains 32 - 128 neurons to fully learn the complex relationship between data features and physical laws;
[0011] Step 4: Model Training Module: Use the preprocessed data to train the constructed CGPINNS model; Before the training starts, initialize the model parameters, including the weights and biases of the neural network. Usually, random initialization is adopted, but a reasonable initialization range will be set according to experience to ensure that the model can learn normally in the initial stage of training; Select an optimization algorithm with an adaptive learning rate, such as the Adam algorithm. This algorithm can dynamically adjust the learning rate according to the training situation of the model, accelerate the convergence speed in the initial stage of training, avoid over-adjustment when approaching the optimal solution, improve the training efficiency, and avoid falling into local optimal solutions; Set the maximum number of iterations for training, such as 20000 - 50000 times. During the training process, record the value of the loss function of the model every 100 - 500 iterations and observe the change trend of the loss function.
[0012] Step 5: Result Evaluation and Feedback Module: Compare and evaluate the prediction results with the actual construction cost, and use indicators such as the mean squared error (MSE), mean absolute error (MAE), and coefficient of determination (R 2 ) to measure the accuracy of the prediction; MAPE shows the prediction error in the form of a percentage, intuitively reflecting the relative error size between the predicted value and the actual value; According to the evaluation results, if the prediction error exceeds the set threshold (such as MSE exceeding a certain preset value, MAE exceeding a certain percentage, etc.), the system will feedback to the data acquisition module and the model training module; The data acquisition module will collect more construction data of similar ships, especially the data related to the factors with larger prediction errors; The model training module will then readjust the model parameters, such as adjusting the hidden layer structure of the neural network, the hyperparameters of the optimization algorithm, or improving the model structure to further improve the prediction accuracy.
[0013] Preferably, in Step 2, data cleaning mainly identifies and removes outliers and error records in the data; In ship construction data, outliers may be caused by measurement errors, data entry errors, etc. For numerical data, a statistics-based method is used to detect and process outliers. The commonly used method is the Z-score method. For a data set X = {x 1 , x 2 , …, x n}, where the Z-score of each data point x i is defined as:
[0014]
[0015] where Z i is the Z-score method, μ is the mean of the data set, σ is the standard deviation of the data set, x i is the data point in the data set. If |Z i | > 3, then x i is considered an outlier.
[0016] In actual operation, these outliers can be deleted or corrected according to other reasonable data. For categorical data, by setting reasonable value ranges and logical rules, data that does not meet the requirements is removed, such as unreasonable category names in ship type records, etc.;
[0017] Next, the denoising operation adopts an advanced filtering algorithm to reduce the noise interference in the data and improve the stability of the data; here we use the wavelet filtering algorithm, which has the characteristics of multi-resolution analysis and can decompose and reconstruct the signal at different scales;
[0018] Finally, map the data of different dimensions to a unified scale range. For numerical data, the maximum-minimum normalization method is adopted to map the data to the interval [0,1]. For the data set X = {x 1 , x 2 , …, x n}, the normalized value {x n '} calculation formula is:
[0019]
[0020] where x i ' is the normalized value, X is the data set, max(X) is the maximum value of the data set, and min(X) is the minimum value of the data set.
[0021] For categorical data, such as ship type, material type, etc., the one-hot encoding method is adopted for processing. Assuming that the categorical variable has m different values, then each value can be represented by a binary vector of length m, where only one position is 1 and the rest are 0. Through normalization processing, the training convergence speed of the model can be accelerated, and the stability and prediction accuracy of the model can be improved.
[0022] Preferably, in step 3, adopting the Euler-Bernoulli beam theory can significantly improve the convergence speed of the calculation process, reach the exact solution faster, and thus further improve the overall calculation efficiency. Consider a micro-section beam with a length of dx, which bends under the action of the bending moment M; according to the plane section assumption, after the micro-section beam deforms, one side of its fibers is stretched, the other side is compressed, and there is a layer of fibers in the middle that neither elongates nor shortens, that is, the neutral layer, and the intersection line of the neutral layer and the cross-section is the neutral axis; let the distance from the neutral axis to the stress point to be calculated be y, and the moment of inertia of the beam section be I;
[0023] According to Hooke's law σ = Eε, combined with geometric relations, the bending normal stress formula is derived;
[0024] For a pure bending beam, the curvature of the beam Also, because the strain Substitute into to obtain
[0025] Then, according to Hooke's law σ = Eε, the beam theory is finally obtained as:
[0026]
[0027] where σ is the stress, E is the elastic modulus of the material, ε is the strain, and ρ is the radius of curvature of the beam after bending.
[0028] Preferably, in step 3, the central difference method is used to replace the gradient calculation. The CGPINNS model adopts the central difference method, which significantly improves the accuracy and stability of the gradient calculation;
[0029] For the first-order partial derivative, the central difference approximation formula is:
[0030]
[0031] For the second-order partial derivative, the central difference approximation formula is:
[0032]
[0033] where h is the step size, u is a two-dimensional function, and x, y are the coordinate variables in the two-dimensional space, representing different dimensions.
[0034] In the calculation process, the selection of the step size h is very crucial. If h is too large, although the calculation speed will increase, it will lead to an increase in the approximation error; if h is too small, although the accuracy will improve, it will increase the computational amount and may introduce rounding errors. Therefore, it is necessary to select an appropriate step size through a combination of experimental and theoretical analysis according to the specific physical equations and data characteristics. At the same time, in order to further improve the computational efficiency and accuracy, an adaptive step size strategy can be adopted, that is, the step size is dynamically adjusted according to the physical characteristics and data changes in different regions during the calculation process.
[0035] Preferably, in step 3, the construction of the loss function is one of the core links of the CGPINNS model. It comprehensively considers factors such as the constraints of physical equations, boundary conditions, initial conditions, and central difference gradient residuals to ensure that the model can accurately learn the complex relationship between shipbuilding costs and various influencing factors. The formula of the loss function is:
[0036]
[0037] where ω f 、ω b 、ωi is the central difference related weight for the in - region point set loss, boundary point set loss, and initial condition loss. L is the total loss function of the central difference enhanced physics - informed neural network, and ω ci is the weight coefficient for the i - th central difference related loss L ci , L f , L b , L c correspond to the in - region point set loss, boundary point set loss, and initial condition loss respectively. θ is the neural network parameter, and T ci is the set of sampling points;
[0038] Next, each loss is further refined. The in - region point set loss L f aims to measure the deviation between the model prediction result and the physical equation at the data points within the region; for the physical equation the in - region point set loss is expressed as: where N f is the number of data points within the region, and u n and its derivative are the predicted values of the model at the n - th data point;
[0039] The boundary condition loss L b is used to ensure that the model prediction result satisfies the boundary conditions of the physical problem. In hull structure analysis, the boundary conditions may include that the displacement at the fixed boundary is zero, or the stress at the free boundary is zero, etc.; assuming the boundary condition is ( represents the derivative of u along the boundary normal), then where N b is the number of boundary data points, and u m and its derivative are the predicted values of the model at the m - th data point;
[0040] The central difference gradient residual loss L ci is a unique loss term of the CGPINNS model, which is used to constrain the consistency between the gradient obtained by central difference calculation and the physical equation;
[0041] Taking the gradient in the x - direction as an example, N cx is the number of data points used to calculate the central difference gradient residual in the x - direction, and u p and its derivative are the predicted values of the model at the p - th data point, and h is the step size.
[0042] Preferably, in step 4, through continuous iterative training, the loss function of the model is minimized, so that the model learns the internal law between the ship construction cost and various influencing factors, thereby realizing the accurate prediction of the ship construction cost. After completing the parameter initialization and optimization algorithm selection, the iterative training of the model starts; the Adam algorithm is optimized as:
[0043]
[0044] m t = β 1 m t-1 + (1 - β 1 )g t
[0045]
[0046] where t is the current iteration number, α is the learning rate, β 1 and β 2 are the exponential decay rates, g t is the gradient, is the gradient operator, J is the Jordan matrix, ε' is a constant, θ' t is the parameter after the t-th iteration, θ' t-1 is the parameter updated at the (t - 1)-th iteration, m t is the first moment estimate at the t-th iteration, m t-1 is the first moment estimate at the (t - 1)-th iteration, is the corrected first moment estimate at the t-th iteration, v t is the second moment estimate at the t-th iteration, is the corrected second moment estimate at the t-th iteration, is the square of the gradient, β 1 t is the t-th power of the exponential decay rate β 1 of is the t-th power of the exponential decay rate β 2 of
[0047] Preferably, in step 5, MSE comprehensively measures the deviation degree between the prediction result and the true value by calculating the average of the sum of squares of the differences between the predicted value and the actual value; MAE directly calculates the average of the absolute values of the differences between the predicted value and the actual value, more intuitively reflecting the average deviation size between the predicted value and the actual value, and is not affected by the amplification of the error square; MAPE shows the prediction error in the form of a percentage, and can more intuitively reflect the relative error size between the predicted value and the actual value;
[0048] The calculation formula of the mean square error (MSE) is:
[0049] The calculation formula of the mean absolute error (MAE) is:
[0050] The calculation formula of the coefficient of determination (R 2 ) is:
[0051] Mean Absolute Percentage Error (MAPE), whose calculation formula is:
[0052] where n is the number of samples, is the predicted value, and y i is the actual value, is the average value of the actual values.
[0053] By adopting the above technical solutions: it aims to fill the gap in the existing shipbuilding cost prediction technology. On the one hand, it accurately predicts the shipbuilding cost, provides accurate cost data for enterprises, helps enterprises formulate scientific and reasonable budget plans in the project planning stage, avoids budget overruns, and ensures project profitability. On the other hand, by integrating the physical laws in the shipbuilding process with the data-driven CGPINNS model, it improves the model's ability to capture the relationships of complex factors, making the prediction results more physically meaningful and reasonable. In addition, this method can also enhance the generalization ability of the model, adapt to new ship designs and construction processes, provide stable and reliable cost prediction services for enterprises in the face of diverse construction requirements, and comprehensively improve the market competitiveness and project management level of shipbuilding enterprises.
[0054] Compared with the existing technology, the present invention has the following beneficial effects:
[0055] 1. Compared with traditional shipbuilding cost prediction methods and prediction models based on PINNS and GPINNS, the CGPINNS model adopted by the present invention utilizes the symmetric characteristics of central difference, effectively reduces the numerical oscillation error, and can more accurately capture the complex relationships between shipbuilding cost and various influencing factors, thereby significantly improving the accuracy of cost prediction. Through experimental verification with a large amount of shipbuilding data, the prediction results of this method are significantly lower than those of traditional methods and other neural network models in terms of indicators such as L 2 relative error, providing more reliable cost prediction data for shipbuilding enterprises.
[0056] 2. The present invention integrates the physical laws in the shipbuilding process into the neural network model, enabling the model to not only learn data features but also make predictions following physical principles. This makes the prediction results more physically meaningful and reasonable. For example, when considering the influence of ship structure strength on material selection and usage, the model can perform more accurate cost estimation based on physical equations, avoiding unreasonable predictions caused by simply relying on data.
[0057] 3. By combining physical information with data-driven approaches, the present invention reduces the dependence on a large amount of training data and improves the generalization ability of the model. When faced with new ship design or construction processes, this method can more accurately predict construction costs based on the understanding of physical laws and the knowledge learned, with stronger adaptability, effectively reducing the prediction risks caused by insufficient data or data biases.
[0058] 4. The cost prediction results and confidence intervals provided by the present invention can help shipbuilding enterprises formulate more scientific budget plans, reasonably arrange resources, and identify potential cost risks in advance during the project planning stage, providing strong support for the enterprises' decision-making and contributing to improving the economic efficiency and market competitiveness of the enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a flow chart of the present invention;
[0060] Figure 2 is a three-dimensional schematic diagram of three key design parameters of a ship and the corresponding construction costs in an embodiment of the present invention;
[0061] Figure 3 is a data graph of the loss function for 200 iterations in an embodiment of the present invention;
[0062] Figure 4 is a schematic diagram of evaluation indicators of MSE, MAE, R 2 and MAPE when the number of ship samples is taken as 100 in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0063] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, and thus make a clearer definition of the protection scope of the present invention. The embodiments described in the present invention are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0064] An efficient method for predicting ship construction costs based on CGPINNS includes the following steps:
[0065] Step 1: Data collection: Comprehensively collect various types of data related to shipbuilding to provide a basis for subsequent prediction work; in terms of ship design parameters, it covers ship types (such as bulk carriers, container ships, tankers, etc.), dimensions (length, width, depth, etc.), structural complexity (such as hull structure form, cabin layout, etc.), speed requirements, etc.; the collection of construction material information includes material types (steel, aluminum alloy, composite materials, etc.), usage (material usage in different parts), price fluctuation trends (obtained through market research and price indices); construction process data involves welding processes (welding methods, welding quality requirements), assembly processes (section assembly sequence, precision control requirements), coating process complexity (coating types, number of coating layers, etc.); labor cost data includes the working hours and wage standards of different types of workers (such as welders, fitters, painters, etc.); in addition, a large amount of historical construction cost data is also collected, including the actual cost details of various ships built in the past, providing rich samples for model training;
[0066] Step 2: Data preprocessing. The collected data often has various problems and needs to be cleaned, denoised, and normalized through a preprocessing module to improve data quality and provide a good data foundation for subsequent model training;
[0067] Step 3: CGPINNS model construction module: Construct a gradient-enhanced physics-informed neural network model based on central differences; first, determine the physical equations involved in ship construction cost prediction, such as according to the beam theory in ship structural mechanics, which can be used to analyze the influence of hull structural strength on material selection and usage, and the strength calculation formulas in material mechanics (such as the tensile strength and compressive strength formulas of materials, used to evaluate the applicability and usage requirements of materials in shipbuilding); then, use the central difference method to replace the derivative terms in gradient calculation to improve model accuracy; when constructing the loss function, include physical equation residual loss, boundary condition loss, initial condition loss, and central difference gradient residual loss, etc.; finally, build a neural network structure, and determine the number of hidden layers and the number of neurons according to the actual needs of ship construction cost prediction, such as constructing a neural network with 3 - 5 hidden layers, each hidden layer containing 32 - 128 neurons, to fully learn the complex relationship between data features and physical laws;
[0068] Step 4: Model Training Module: Use the preprocessed data to train the constructed CGPINNS model; before the training starts, initialize the model parameters, including the weights and biases of the neural network, usually using random initialization, but a reasonable initialization range will be set according to experience to ensure that the model can learn normally in the initial stage of training; select an optimization algorithm with an adaptive learning rate, such as the Adam algorithm, which can dynamically adjust the learning rate according to the training situation of the model, accelerate the convergence speed in the initial stage of training, avoid over-adjustment when approaching the optimal solution, improve the training efficiency, and avoid falling into local optimal solutions; set the maximum number of iterations for training, such as 20,000 - 50,000 times. During the training process, record the value of the loss function of the model every 100 - 500 iterations and observe the change trend of the loss function.
[0069] Step 5: Result Evaluation and Feedback Module: Compare and evaluate the prediction results with the actual construction costs, and use indicators such as mean squared error (MSE), mean absolute error (MAE), and coefficient of determination (R 2 ) to measure the accuracy of the prediction; according to the evaluation results, if the prediction error exceeds the set threshold (such as MSE exceeding a certain preset value, MAE exceeding a certain percentage, etc.), the system will feedback to the data collection module and the model training module; the data collection module will collect more construction data of similar ships, especially data related to factors with large prediction errors; the model training module will then readjust the model parameters, such as adjusting the hidden layer structure of the neural network, the hyperparameters of the optimization algorithm, or improving the model structure to further improve the prediction accuracy.
[0070] Specifically, in Step 2, data cleaning mainly identifies and removes outliers and error records in the data; in ship construction data, outliers may be caused by measurement errors, data entry errors, etc. For numerical data, a statistics-based method is used to detect and process outliers, and the commonly used is the Z-score method. For a dataset X = {x 1 , x 2 , …, x n}, where the Z-score of each data point x i is defined as:
[0071]
[0072] where Z i is the Z-score method, μ is the mean of the dataset, σ is the standard deviation of the dataset, and x i is the data point in the dataset. If |Z i | > 3, then x iare outliers; in actual operation, we can delete these outliers or correct them according to other reasonable data. For categorical data, by setting reasonable value ranges and logical rules, data that does not meet the requirements is removed, such as unreasonable category names in ship type records, etc.;
[0073] Next, the denoising operation uses an advanced filtering algorithm to reduce the noise interference in the data and improve the data stability; here we use the wavelet filtering algorithm, which has the characteristics of multi-resolution analysis and can decompose and reconstruct the signal at different scales;
[0074] Finally, map the data of different dimensions to a unified scale range. For numerical data, the maximum-minimum normalization method is used to map the data to the interval [0,1]. For the data set X = {x 1 , x 2 , …, x n}, the normalized value {x n '} calculation formula is:
[0075]
[0076] where x i ' is the normalized value, X is the data set, max(X) is the maximum value of the data set, and min(X) is the minimum value of the data set.
[0077] For categorical data, such as ship type, material type, etc., the one-hot encoding method is used for processing. Assume that the categorical variable has m different values, then each value can be represented by a binary vector of length m, where only one position is 1 and the rest are 0. Through normalization processing, the training convergence speed of the model can be accelerated, and the stability and prediction accuracy of the model can be improved.
[0078] Specifically, in step 3, using the Euler-Bernoulli beam theory can significantly improve the convergence speed of the calculation process, reach the accurate solution faster, and thus further improve the overall calculation efficiency. Consider a micro-section beam with a length of dx, which bends under the action of the bending moment M; according to the plane section assumption, after the micro-section beam deforms, one side of its fibers is stretched, the other side is compressed, and there is a layer of fibers in the middle that neither elongates nor shortens, that is, the neutral layer, and the intersection line of the neutral layer and the cross-section is the neutral axis; let the distance from the neutral axis to the stress point to be found be y, and the moment of inertia of the beam section be I;
[0079] According to Hooke's law σ = Eε, combined with geometric relations, the bending normal stress formula is derived;
[0080] For a pure bending beam, the curvature of the beam Also, because of the strain Substitute into to obtain
[0081] Then, according to Hooke's law σ = Eε, the beam theory is finally obtained as follows:
[0082]
[0083] where σ is the stress, E is the elastic modulus of the material, ε is the strain, and ρ is the radius of curvature of the beam after bending.
[0084] Specifically, in step 3, the central difference method is used to replace the gradient calculation. The CGPINNS model adopts the central difference method, which significantly improves the accuracy and stability of the gradient calculation;
[0085] For the first-order partial derivative, the central difference approximation formula is:
[0086]
[0087] For the second-order partial derivative, the central difference approximation formula is:
[0088]
[0089] where h is the step size, u is a two-dimensional function, and x, y are the coordinate variables in the two-dimensional space, representing different dimensions.
[0090] During the calculation process, the selection of the step size h is very crucial. If h is too large, although the calculation speed will increase, the approximation error will increase; if h is too small, although the accuracy will improve, the calculation amount will increase, and rounding errors may be introduced. Therefore, it is necessary to select an appropriate step size through a combination of experimental and theoretical analysis according to the specific physical equations and data characteristics. At the same time, to further improve the calculation efficiency and accuracy, an adaptive step size strategy can be adopted, that is, the step size is dynamically adjusted according to the physical characteristics and data changes in different regions during the calculation process.
[0091] Specifically, in step 3, the construction of the loss function is one of the core links of the CGPINNS model. It comprehensively considers factors such as the constraints of physical equations, boundary conditions, initial conditions, and central difference gradient residuals to ensure that the model can accurately learn the complex relationship between the shipbuilding cost and various influencing factors. The formula of the loss function is:
[0092]
[0093] where ω f 、ω b 、ω iis the central difference related weight for the in - region point set loss, boundary point set loss, and initial condition loss. \(L\) is the total loss function of the central difference enhanced physics - informed neural network, \(\omega\) ci is the weight coefficient for the \(i\) - th central difference related loss \(L\) ci , \(L\) f , \(L\) b , \(L\) c correspond to the in - region point set loss, boundary point set loss, and initial condition loss respectively. \(\theta\) is the neural network parameter, \(T\) ci is the set of sampling points;
[0094] Next, further refine each loss. The in - region point set loss \(L\) f aims to measure the deviation between the model prediction result and the physical equation at the data points within the region; for the physical equation the in - region point set loss is expressed as: where \(N\) f is the number of data points within the region, \(u\) n and its derivative are the predicted values of the model at the \(n\) - th data point;
[0095] The boundary condition loss \(L\) b is used to ensure that the model prediction result satisfies the boundary conditions of the physical problem. In hull structure analysis, the boundary conditions may include that the displacement at the fixed boundary is zero, or the stress at the free boundary is zero, etc.; assuming the boundary condition is ( represents the derivative of \(u\) along the boundary normal), then where \(N\) b is the number of boundary data points, \(u\) m and its derivative are the predicted values of the model at the \(m\) - th data point;
[0096] The central difference gradient residual loss \(L\) ci is a unique loss term of the CGPINNS model, which is used to constrain the consistency between the gradient obtained by central difference and the physical equation;
[0097] Taking the gradient in the \(x\) - direction as an example, \(N\) cx is the number of data points used to calculate the central difference gradient residual in the \(x\) - direction, \(u\) p and its derivative are the predicted values of the model at the \(p\) - th data point, and \(h\) is the step size.
[0098] Specifically, in step 4, through continuous iterative training, minimize the loss function of the model, so that the model learns the internal law between the ship construction cost and various influencing factors, thereby realizing the accurate prediction of the ship construction cost. After completing the parameter initialization and optimization algorithm selection, start the iterative training of the model; the Adam algorithm is optimized as:
[0099]
[0100] m t = β 1 m t-1 + (1 - β 1 )g t
[0101]
[0102] where t is the current iteration number, α is the learning rate, β 1 and β 2 are the exponential decay rates, g t is the gradient, is the gradient operator, J is the Jordan matrix, ε' is a constant, θ' t is the parameter after the t-th iteration, θ' t-1 is the parameter updated at the (t - 1)-th iteration, m t is the first moment estimate at the t-th iteration, m t-1 is the first moment estimate at the (t - 1)-th iteration, is the corrected first moment estimate at the t-th iteration, v t is the second moment estimate at the t-th iteration, is the corrected second moment estimate at the t-th iteration, is the square of the gradient, β 1 t is the t-th power of the exponential decay rate β 1 of β, is the t-th power of the exponential decay rate of β 2 of β.
[0103] Specifically, in step 5, the MSE comprehensively measures the deviation degree between the prediction result and the true value by calculating the average of the sum of squares of the differences between the predicted value and the actual value; the MAE directly calculates the average of the absolute values of the differences between the predicted value and the actual value, more intuitively reflecting the average deviation size between the predicted value and the actual value, and is not affected by the amplification of the error square; the MAPE shows the prediction error in the form of a percentage, and can more intuitively reflect the relative error size between the predicted value and the actual value;
[0104] The calculation formula of the mean squared error (MSE) is:
[0105] The calculation formula of the mean absolute error (MAE) is:
[0106] The calculation formula of the coefficient of determination (R 2 ) is:
[0107] Mean Absolute Percentage Error (MAPE), whose calculation formula is:
[0108] where n is the number of samples, is the predicted value, y i is the actual value, is the average value of the actual values.
[0109] Example:
[0110] As Figure 1 shown, an efficient prediction method for ship construction cost based on CGPINNs includes the following steps:
[0111] Step 1: Data collection: Comprehensively collect various types of data related to ship construction to provide a basis for subsequent prediction work. In terms of ship design parameters, it covers ship type, size, structural complexity, speed requirements, etc. The collection of construction material information includes material types, usage amounts, and price fluctuation trends. The construction process data involves welding process, assembly process, and painting process complexity. In the present invention, as Figure 2 shows a three-dimensional schematic diagram of three key design parameters (length, width, and depth) of a ship and the corresponding construction cost.
[0112] Step 2: Data preprocessing. The collected data often has various problems and needs to be cleaned, denoised, and normalized through a preprocessing module to improve data quality and provide a good data foundation for subsequent model training.
[0113] Step 3: Build a gradient-enhanced physics-informed neural network model based on central difference. As Figure 3 is set to 200 iterations to show the change process of each part of the loss. The formula of the loss function is:
[0114]
[0115] Next, further refine each loss. The in-region point set loss L f is designed to measure the deviation between the model prediction result and the physical equation at the data points in the region. For the physical equation The in-region point set loss is expressed as:
[0116] The boundary condition loss L b is used to ensure that the model prediction result satisfies the boundary conditions of the physical problem. In the hull structure analysis, the boundary conditions may include that the displacement at the fixed boundary is zero, or the stress at the free boundary is zero, etc. Assuming the boundary condition is ( represents the derivative of u along the normal direction of the boundary), then where N bis the number of boundary data points.
[0117] Central difference gradient residual loss L ci is a loss term specific to the CGPINNS model, which is used to constrain the consistency between the gradient obtained by central difference calculation and the physical equation.
[0118] Taking the gradient in the x direction as an example, , N cx is the number of data points used to calculate the central difference gradient residual in the x direction, u p and its derivative are the predicted values of the model at the p-th data point, and h is the step size.
[0119] Step 4: Through continuous iterative training, minimize the loss function of the model so that the model learns the internal law between the shipbuilding cost and various influencing factors, thereby achieving accurate prediction of the shipbuilding cost. After completing the parameter initialization and optimization algorithm selection, start the iterative training of the model. The Adam algorithm is optimized as:
[0120]
[0121] m t = β 1 m t-1 +(1 - β 1 )g t
[0122]
[0123] where t is the current iteration number, α is the learning rate, β 1 and β 2 are the exponential decay rates, g t is the gradient, is the gradient operator, J is the Jordan matrix, ε' is a constant, θ' t is the parameter after the t-th iteration, θ' t-1 is the parameter updated at the (t - 1)-th iteration, m t is the first moment estimate at the t-th iteration, m t-1 is the first moment estimate at the (t - 1)-th iteration, is the corrected first moment estimate at the t-th iteration, v t is the second moment estimate at the t-th iteration, is the corrected second moment estimate at the t-th iteration, is the square of the gradient, β 1 t is the t-th power of the exponential decay rate β 1 of, is the β 2 of the exponential decay rate to the t-th power.
[0124] Step 5: MSE comprehensively measures the deviation degree between the prediction result and the true value by calculating the average of the sum of squares of the differences between the predicted value and the actual value. MAE directly calculates the average of the absolute values of the differences between the predicted value and the actual value, which more intuitively reflects the average deviation size between the predicted value and the actual value and is not affected by the magnification of the error square. MAPE shows the prediction error in the form of a percentage, which can more intuitively reflect the relative error size between the predicted value and the actual value.
[0125] The calculation formula for the mean squared error (MSE) is:
[0126] The calculation formula for the mean absolute error (MAE) is:
[0127] The coefficient of determination (R 2 )'s calculation formula is:
[0128] The mean absolute percentage error (MAPE), its calculation formula is:
[0129] where n is the number of samples, is the predicted value, y i is the actual value, is the average value of the actual values.
[0130] As Figure 4 shown, when the number of ship samples is taken as 100, calculate the four evaluation indexes of MSE, MAE, R 2 and MAPE, and judge the error size according to the comparison result between the evaluation index and the threshold.
[0131] To sum up, the present invention uses the central difference enhanced physics-informed neural network (CGPINNS) technology to deeply integrate the physical laws in shipbuilding with a large amount of actual data, and constructs an efficient and accurate shipbuilding cost prediction system, aiming to provide an innovative cost prediction solution for the shipbuilding industry and help enterprises improve their market competitiveness.
[0132] The descriptions and practices disclosed in the present invention are easy to think and understand for those of ordinary skill in the art. And without departing from the principle of the present invention, several improvements and refinements can be made. Therefore, the modifications or improvements made without deviating from the spirit of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An efficient prediction method for shipbuilding cost based on CGPINNS, characterized in that: The steps include: Step 1: Data collection: Comprehensively collect all kinds of data related to ship construction to provide a basis for subsequent prediction work; in terms of ship design parameters, it covers ship type, size, structural complexity, and speed requirements; the collection of construction material information includes material type, quantity, and price fluctuation trend; construction process data involves welding process, assembly process, and painting process complexity; labor cost data includes working hours and wage standards for different types of work; in addition, historical construction cost data is also collected, including the actual cost details of various types of ships built in the past, to provide rich samples for model training; Step 2: Data preprocessing: The collected data is cleaned, denoised and normalized through the preprocessing module to improve data quality and provide a good data foundation for subsequent model training; Step 3: CGPINNS model construction module: Construct a gradient-enhanced physical information neural network model based on central difference; first, determine the physical equations involved in ship construction cost prediction, such as the beam theory in ship structural mechanics, which can be used to analyze the influence of hull structure strength on material selection and dosage, and the strength calculation formula in material mechanics; then, use the central difference method to replace the derivative term in the gradient calculation to improve the model accuracy; when constructing the loss function, include the physical equation residual loss, boundary condition loss, initial condition loss and central difference gradient residual loss; finally, build a neural network structure, and determine the number of hidden layers and neurons according to the actual needs of ship construction cost prediction, such as constructing a neural network with 3-5 hidden layers, each hidden layer containing 32-128 neurons, to fully learn the complex relationship between data features and physical laws; Step 4: Model training module: Use the preprocessed data to train the constructed CGPINNS model; before the training starts, initialize the model parameters, including the weights and biases of the neural network, and select an optimization algorithm with adaptive learning rate, such as the Adam algorithm, which can dynamically adjust the learning rate according to the training situation of the model, accelerate the convergence speed in the early stage of training, avoid over-adjustment when approaching the optimal solution, improve training efficiency, and avoid falling into the local optimal solution; set the maximum number of training iterations, such as 20,000-50,000 times. During the training process, record the loss function value of the model every 100-500 iterations, and observe the change trend of the loss function; Step 5: Result evaluation and feedback module: Compare and evaluate the predicted results with the actual construction cost, using mean square error (MSE), mean absolute error (MAE), and determination coefficient (R) 2 The indicator measures the accuracy of the prediction. MAPE displays the prediction error in the form of a percentage. Based on the evaluation results, if the prediction error exceeds the set threshold, the system will provide feedback to the data acquisition module and the model training module; The data acquisition module collects construction data of similar ships; The model training module readjusts the model parameters, such as adjusting the hidden layer structure of the neural network, optimizing the hyperparameters of the algorithm, or improving the model structure to further improve the prediction accuracy.
2. According to claim 1, a highly efficient prediction method for shipbuilding cost based on CGPINNS is characterized in that: In step 2, data cleaning is to identify and remove outliers and erroneous records in the data; in the shipbuilding data, for numerical data, a statistical method is used to detect and process outliers. The Z-score method is used for a data set X = {x1, x2, …, x n }, where each data point x i The Z-score is defined as: Among them, Z i is the Z-score method, μ is the mean of the data set, σ is the standard deviation of the data set, x i is a data point in the data set. If |Z i |>3, then x i is an outlier; Next, the denoising operation uses a filtering algorithm to reduce noise interference in the data and improve the stability of the data; Finally, the data of different dimensions are mapped to a unified scale range. For numerical data, the maximum-minimum normalization method is used to map the data to the [0,1] interval. For the data set X = {x1, x2, …, x n }, the normalized value {x n '}The calculation formula is: Among them, x i ' is the normalized value, X is the data set, max(X) is the maximum value of the data set, and min(X) is the minimum value of the data set.
3. The method for efficiently predicting shipbuilding cost based on CGPINNS according to claim 1 is characterized in that: In step 3, the use of beam theory can significantly improve the convergence speed of the calculation process, achieve an accurate solution, and improve the overall calculation efficiency. Consider a micro-segment beam with a length of dx, which bends under the action of the bending moment M. According to the plane section hypothesis, after the micro-segment beam is deformed, the fibers on one side are stretched and the other side is compressed. There is a fiber layer in the middle that is neither elongated nor shortened, that is, the neutral layer. The intersection of the neutral layer and the cross section is the neutral axis. Let the distance from the neutral axis to the desired stress point be y, and the section moment of inertia of the beam be I. According to Hooke's law σ=Eε, the bending normal stress formula is derived in combination with geometric relations; For a purely curved beam, the curvature of the beam is Because of the strain Will Substitution In, can be obtained According to Hooke's law σ=Eε, the beam theory is finally obtained as: Among them, σ is stress, E is the elastic modulus of the material, ε is strain, and ρ is the radius of curvature after the beam is bent.
4. The method for efficiently predicting shipbuilding cost based on CGPINNS according to claim 1 is characterized in that: In step 3, the central difference method is used to replace the gradient calculation. The CGPINNS model adopts the central difference method to significantly improve the accuracy and stability of the gradient calculation. For the first-order partial derivative, the central difference approximation formula is: For the second-order partial derivatives, the central difference approximation formula is: Among them, h is the step size, u is a two-dimensional function, and x and y are coordinate variables in two-dimensional space, representing different dimensions.
5. The method for efficiently predicting shipbuilding cost based on CGPINNS according to claim 1 is characterized in that: In step 3, the formula of the loss function is: Among them, ω f ,ω b ,ω i is the central difference related weight of the point set loss in the region, the boundary point set loss and the initial condition loss, L is the total loss function of the central difference enhanced physical information neural network, ω ci is the i-th central difference related loss L ci The weight coefficient, L f , L b , L c They correspond to the point set loss in the region, the boundary point set loss and the initial condition loss respectively. θ is the neural network parameter, T ci is the set of sampling points; Next, the losses are further refined, and the point set loss L in the region f Aims to measure the deviation between the model prediction results and the physical equations at the data points in the region; for the physical equations The point set loss in the region is expressed as: Where N f is the number of data points in the region, u n and its derivative is the model's prediction at the nth data point; Boundary condition loss L b It is used to ensure that the model prediction results meet the boundary conditions of the physical problem. In the hull structure analysis, the boundary conditions include zero displacement at the fixed boundary or zero stress at the free boundary. Assume that the boundary conditions are represents the derivative of u along the boundary normal, then Where N b is the number of boundary data points, u m and its derivative is the model's prediction at the mth data point; Central difference gradient residual loss L ci It is the loss term of the CGPINNS model, which is used to constrain the consistency between the gradient calculated by the central difference and the physical equation; Taking the gradient in the x direction as an example, N cx is the number of data points used to calculate the residual of the central difference gradient in the x direction, u p and its derivative are the predicted values of the model at the pth data point, and h is the step size.
6. The method for efficiently predicting shipbuilding cost based on CGPINNS according to claim 1 is characterized in that: In step 4, by continuously iterative training, the loss function of the model is minimized, so that the model can learn the inherent laws between the ship construction cost and various influencing factors, thereby realizing accurate prediction of the ship construction cost. After completing parameter initialization and optimization algorithm selection, the model iterative training begins; the Adam algorithm is optimized as follows: m t =β1m t-1 +(1-β1)g t Among them, t is the current iteration number, α is the learning rate, β1 and β2 are exponential decay rates, and g t is the gradient, ▽ θ is the gradient operator, J is the Jordan matrix, ε' is a constant, θ' t is the parameter after the tth iteration, θ' t-1 is the updated parameter at the t-1th iteration, m t is the first-order moment estimate at the tth iteration, m t-1 is the first-order moment estimate at the t-1th iteration, is the modified first-order moment estimate at the tth iteration, v t The second-order moment estimate at the tth iteration, is the modified second-order moment estimate of the t-th iteration, is the square of the gradient, β1 t is the exponential decay rate β1 to the power of t, is the exponential decay rate of β2 raised to the power of t.
7. The method for efficiently predicting shipbuilding cost based on CGPINNS according to claim 1 is characterized in that: In step 5, MSE comprehensively measures the degree of deviation between the prediction result and the true value by calculating the average of the sum of squares of the difference between the predicted value and the actual value; MAE directly calculates the average of the absolute value of the difference between the predicted value and the actual value; MAPE displays the prediction error in the form of percentage to reflect the relative error between the predicted value and the actual value; The calculation formula for mean square error MSE is: The calculation formula for the mean absolute error MAE is: Coefficient of determination R 2 The calculation formula is: The mean absolute percentage error MAPE is calculated as follows: Where n is the number of samples, is the predicted value, y i is the actual value, is the average of the actual values.
Citation Information
Cited By
Composite material mechanical property prediction method based on data mining
CN121565323A
