A method for ship fuel consumption prediction and speed optimization based on stacking ensemble learning
Through the stacking integrated learning model combined with multiple machine learning algorithms, the problem of poor generalization ability of a single model is solved, more accurate ship fuel consumption prediction and speed optimization are achieved, significantly reducing ship fuel consumption and supporting the realization of carbon emission reduction goals.
Patent Information
- Application Number
- CN202411117053.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-15
AI Technical Summary
The existing ship fuel consumption prediction technology uses a single model, which is susceptible to noise, has poor generalization capabilities, and is difficult to accurately optimize the speed, resulting in poor prediction results and unable to effectively reduce carbon emissions.
Using a stacking ensemble learning method, combining K-nearest neighbor algorithm, support vector machine and random forest model, fuel consumption prediction is carried out through stacking ensemble learning model, and an optimization model with ship speed as the decision variable is established, and different flight segments are determined through dynamic planning. Optimal speed to reduce fuel consumption.
It improves the accuracy and generalization ability of fuel consumption prediction, can optimize the speed more accurately, significantly reduce ship fuel consumption, is suitable for actual ship operations, and supports the realization of carbon emission reduction targets.
Smart Images

Figure CN118643277B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ships and proposes a ship fuel consumption prediction and speed optimization method based on stacking ensemble learning. Background Art
[0002] As the basic infrastructure supporting global trade, maritime transport accounts for more than 80% of the world's total trade. As the volume of transport increases, the pollution emitted by ships is also increasing. The International Maritime Organization has implemented the regulations outlined in Annex VI of the International Convention for the Prevention of Pollution from Ships (MARPOL), which came into effect on November 1, 2022. Subsequently, the calculation and reporting of the Existing Ship Energy Efficiency Index (EEXI) and Carbon Intensity Index (CII) became mandatory from January 1, 2023. In addition, a short-term target of reducing the carbon intensity of shipping by 40% by 2030 and a long-term target of reducing it by 50% by 2050 have been set. Therefore, it is of great significance to study measures to reduce carbon emissions from ships. Issues such as the implementation of ship emission reduction measures such as ship emission control areas and the increase in ship fuel prices have also prompted the shipping industry to take measures to improve energy efficiency and thus reduce emissions.
[0003] As artificial intelligence and machine learning become increasingly important in promoting sustainable development, optimization techniques that combine sensor data and machine learning algorithms are gaining more and more attention in smart ships and energy-efficient systems. Existing ship fuel consumption prediction technologies use a single fuel consumption prediction model, which is easily affected by noise and leads to poor prediction results. The single model performs poorly on data outside the training set, that is, the generalization ability is poor. In addition, the poor generalization ability and prediction results of the single model cannot accurately optimize the ship speed and are difficult to use in actual ship operations.
[0004] From the perspective of ships, optimizing speed is an efficient way to improve energy efficiency. Speed is directly related to the operating conditions of ships. In the past few years, the optimization of speed of various types of ships has been widely studied and remarkable results have been achieved. Relevant studies have shown that for every 1% reduction in speed, emissions can be reduced by 2.7%. Early speed optimization only considered the speed limit of each section and then planned the optimal speed. With the gradual deepening of research, speed optimization technology no longer blindly reduces speed, but seeks the most profitable or lowest emission navigation strategy under the constraints of policies and markets. Data-driven methods can study the spatiotemporal characteristics of inland waterways by adding sensors to ships, analyzing changes in the external environment, and optimizing navigation speed. Compared with traditional speed optimization methods, emerging data-driven methods based on machine learning have the advantages of high accuracy and good optimization effect. Data-driven methods based on machine learning are increasingly used in ship speed optimization. Summary of the invention
[0005] According to the technical problems raised above, a method for ship fuel consumption prediction and speed optimization based on stacking ensemble learning is provided, comprising the following steps:
[0006] Obtain historical fuel consumption data of the ship and data on factors affecting fuel consumption;
[0007] Preprocess the fuel consumption data and data on factors affecting fuel consumption, and divide the preprocessed data into training data and test data in proportion;
[0008] A stacking ensemble learning model is built based on training data to predict ship fuel consumption;
[0009] The processed data of factors affecting fuel consumption are input into the stacking ensemble learning model to predict the fuel consumption of ships.
[0010] Evaluate the prediction results of the stacking ensemble learning model;
[0011] Establish a ship speed optimization model with ship speed as the decision variable and minimum ship fuel consumption as the goal;
[0012] Discretize the ship speed optimization model;
[0013] Based on the constraints of the ship speed optimization model, the discretized ship speed optimization model is solved to determine the optimal ship speed in different sections, the ship fuel consumption at the optimal ship speed in different sections, and the fuel consumption savings.
[0014] Further: the process of constructing the stacking ensemble learning model based on the training data is as follows:
[0015] The K-nearest neighbor algorithm model, the support vector machine model, and the random forest model are trained simultaneously, and the parameters of the K-nearest neighbor algorithm model, the support vector machine model, and the random forest model are adjusted to obtain the trained K-nearest neighbor algorithm model, the support vector machine model, and the random forest model;
[0016] The prediction results of the trained K-nearest neighbor algorithm model, the trained support vector machine model, and the trained random forest model are merged, and the merged data is input into the meta-learner model to obtain the stacking ensemble learning model.
[0017] Furthermore: the K-nearest neighbor algorithm model, SVM model, and random forest model are trained simultaneously based on the training data using a five-fold cross-validation method to train the model.
[0018] Furthermore: the meta-learner adopts the Ridge regression algorithm.
[0019] Further:
[0020] The ship speed optimization model adopts the objective function formula as follows:
[0021]
[0022] Indicates the total number of flight segments; Indicates Fuel consumption of ships in this segment; Indicates The distance travelled by the ship in the above mentioned sections; Indicates The average sailing speed of the section.
[0023] Further: the process of discretizing the ship speed optimization model is as follows:
[0024] The navigation speed is discretized at intervals of 0.1, and the specific formula is as follows:
[0025]
[0026]
[0027] Adding a binary decision variable ,like is the minimum fuel consumption speed corresponding to the 𝑖th segment. ;otherwise
[0028] The objective function of the discretized ship speed optimization model is changed to.
[0029]
[0030] in: Indicates Section speed, Indicates the total number of flight segments. Indicates The number of discrete points after the segment velocity is discretized, represents the fuel consumption prediction model, i Indicates The sea state data of the section; i Indicates The distance travelled by the ship.
[0031] Further: The constraints of the ship speed optimization model include:
[0032] Constraint 1: Ensure that Segment start time For the Segment end time ; Indicates that the ship is sailing to The total travel time consumed by the flight segment; Indicates that the ship is sailing to The total travel time consumed by the flight segment, Indicates The distance travelled by the ship;
[0033]
[0034] Constraint 2: Ensure the total time it takes for the ship to reach its destination Do not exceed the maximum allowed time ;
[0035]
[0036] Constraint 3: Ensure the selected ship's sailing speed Within the prescribed range: here and Respectively represent The minimum and maximum speeds allowed for the section;
[0037]
[0038] Constraint 4: Ensure the ship's sailing speed in each section non-negative;
[0039]
[0040] Constraint 5: Ensure the sailing time of each segment of the ship non-negative;
[0041]
[0042] Constraint 6: Ensure binary decision variables Values are within the specified range:
[0043]
[0044] Constraint 7: Ensure that each segment has only one corresponding optimal speed that minimizes the fuel consumption of the ship, that is:
[0045]
[0046] in: Indicates from 1 to the total number of flight segments The set of natural numbers between Indicates The distance travelled by the ship Indicates The number of discrete points after the segment velocity is discretized.
[0047] The present invention provides a ship fuel consumption prediction and speed optimization method based on stacking ensemble learning. The present invention combines three basic models, namely K-nearest neighbor algorithm (K-Nearest Neighbor), SVM (Support Vector Machine) and random forest, to establish a stacking ensemble learning model, which improves the prediction accuracy of the fuel consumption prediction model while improving the generalization ability and anti-interference ability of the model.
[0048] The stacking ensemble learning method was developed to improve the prediction accuracy and generalization ability of the model. The advantage of stacking ensemble learning is that it can capture the advantages of multiple learners, so it has stronger prediction and generalization capabilities, can adapt to more complex tasks, can fit nonlinear relationships, and is more robust. The stacking ensemble learning model is used to accurately predict ship fuel consumption, make decisions based on speed, perform dynamic planning with the goal of minimizing ship fuel consumption, find the optimal ship speed for different sections, reduce ship fuel consumption, and guide actual ship operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0050] Figure 1 is a flow chart of the method;
[0051] Figure 2 It is a detailed process diagram of the method;
[0052] Figure 3 This is the stacking ensemble learning model training set flow chart;
[0053] Figure 4 This is the flow chart of the test set of the stacking ensemble learning model;
[0054] Figure 5 This is a comparison chart between the predicted value and the actual value of the stacking ensemble learning model;
[0055] Figure 6 This is a comparison chart of the average speed of each segment before and after the optimization of Flight 159. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] like Figure 1 , Figure 2 As shown, a method for predicting ship fuel consumption and optimizing speed based on stacking ensemble learning includes the following steps:
[0059] S1: Obtain historical fuel consumption data of the ship and data on factors affecting fuel consumption;
[0060] S2: preprocessing the fuel consumption data and the data of factors affecting fuel consumption, and dividing the preprocessed data into training data and test data according to a proportion;
[0061] S3: Building a stacking ensemble learning model based on training data for predicting ship fuel consumption;
[0062] S4: Input the processed data of factors affecting fuel consumption into the stacking ensemble learning model to predict the fuel consumption of the ship;
[0063] S5: Evaluate the prediction results of the stacking ensemble learning model;
[0064] S6: Establishing a ship speed optimization model with ship speed as the decision variable and minimum ship fuel consumption as the goal;
[0065] S7: discretizing the ship speed optimization model;
[0066] S8: Based on the constraints of the ship speed optimization model, the discretized ship speed optimization model is solved to determine the optimal ship speed for different sections, the ship fuel consumption for the optimal ship speed for different sections, and the fuel consumption savings.
[0067] Steps S1 / S2 / S3 / S4 / S5 / S6 / S7 / S8 are executed in sequence;
[0068] Furthermore, the factors affecting fuel consumption include ship draft, trim, speed, wind direction, wind speed, heel and other factors;
[0069] Obtain the historical fuel consumption data of the ship and the data of factors affecting fuel consumption, collect the ship's fuel consumption data by installing a fuel meter on the ship, and confirm the remaining fuel consumption of the ship through the ship's noon report;
[0070] Collect data on factors affecting fuel consumption. By installing a variety of sensors on the ship, obtain data on factors affecting fuel consumption; ship draft, trim, speed, wind direction, wind speed, heel and other influencing factors, as shown in Table 1:
[0071] Table 1. Factors affecting fuel consumption
[0072]
[0073] Furthermore, the process of preprocessing the fuel consumption data and the data of factors affecting fuel consumption is as follows:
[0074] S21: Delete all characteristic data in the empty row of data and delete the data that exceeds 20% of the actual performance of the ship;
[0075] S22: Delete abnormal data. The abnormal data is deleted according to the 3σ principle. Data exceeding 3σ is regarded as abnormal data and deleted.
[0076] S23: Unify the data frequency, perform operations such as data segmentation and raising and lowering the acquisition frequency, and unify the data frequency. The average values of the fuel consumption data and the fuel consumption influencing factor data are used as input data of the subsequent fuel consumption prediction model.
[0077] S24: Data normalization is performed using the z-score calculation method. The normalization formula is as follows:
[0078]
[0079] in, Each influencing factor is Observations, is the standard deviation, is the average value, is the standardized value, is the number of observations for each influencing factor
[0080] Furthermore, the process of constructing a stacking ensemble learning model based on training data is as follows:
[0081] The ship’s draft, trim, speed, wind direction, wind speed, and heel are taken as independent variables, and the ship’s fuel consumption is taken as the dependent variable.
[0082] The data set is divided into two parts: training set and test set. The test set accounts for 20% of the data set and the training set accounts for 80% of the data set.
[0083] Based on the training data, the K-nearest neighbor algorithm model, support vector machine model, and random forest model are trained simultaneously; including the following:
[0084] The preprocessed data is used as input to train the K-Nearest Neighbor (K-Nearest Neighbor) algorithm model to obtain a trained K-Nearest Neighbor algorithm model;
[0085] The core of the K-nearest neighbor algorithm is to determine which category the new sample belongs to based on the categories of the K sample points closest to it. The distance formula between two sample points in the data is as follows:
[0086]
[0087] When p=1, it is Manhattan distance, and when p=2, the distance is Euclidean distance;
[0088] The preprocessed data is used as input to train the SVM (Support Vector Machine) model to obtain the SVM model.
[0089] Train the random forest (random forest) model, input the processed data, and train the random forest model.
[0090] In addition, the fuel consumption prediction algorithms used for comparison include Adaboost, extreme gradient boosting XGBoost, linear regression LR, ridge regression RR, least absolute shrinkage, and selection operator regression LASSO.
[0091] The training of the K-nearest neighbor algorithm model, the support vector machine model, and the random forest model adopts a five-fold cross validation method;
[0092] The parameters of the K-nearest neighbor algorithm model, SVM model, and random forest model are adjusted as follows:
[0093] Tuning parameters for the K-nearest neighbor algorithm include: 'n_neighbors', 'weights', 'algorithm', 'leaf_size';
[0094] Tuning parameters of the SVM algorithm include: 'C', 'kernel', 'gamma';
[0095] Tuning parameters for random forest include: 'max_features', 'n_estimators', 'max_depth', 'min_samples_split', 'min_samples_leaf;
[0096] The tuning parameters of each fuel consumption prediction model are as follows:
[0097] Table 2. Parameters of each model
[0098]
[0099] Stacking ensemble learning training set;
[0100] like Figure 3 As shown in Figure 1, one fold is selected from the five folds as the test set of the base model, and the remaining four folds are used as the training set of the base model. The trained model predicts the data in the base test set to obtain a prediction matrix. This process is repeated for all k-fold data, and the prediction results are merged to obtain the prediction matrix of model 1. Similarly, we can obtain the prediction matrices of model 2 and model 3.
[0101] The meta-learner is a model that makes predictions based on the predictions of the base models. Therefore, its training data is not the original data, but the predicted data based on the base models. The predicted data from each model is combined as the training data for the meta-learner.
[0102] Select the Ridge regression algorithm as the meta-learner;
[0103] The Ridge regression equation can be obtained by adding L1 regularization, as follows:
[0104]
[0105] here represents the coefficient vector of ridge regression, that is, the optimal regression coefficient, is the actual output value of observation i, is the intercept term, is the regression coefficient of the jth feature, is the jth eigenvalue of observation i.
[0106] Here, the regularization hyperparameter λ>0 controls the amount of shrinkage applied to the coefficients.
[0107] Stacking ensemble learning test set;
[0108] like Figure 4 As shown in Figure 1, the stacking ensemble learning test set is slightly different from the training data, and requires an additional step to average the prediction results. By using the model trained from the cross-validation of the base model to predict the meta-test set, we obtain k prediction matrices. These k prediction matrices are averaged to obtain the prediction matrix of the base model. By combining the prediction results of each model, we obtain the test set of the meta-learner.
[0109] Finally, the trained meta-learner is used to predict the test set, and the final prediction result of the test set is obtained by using the Stacking method. The comparison between the predicted value and the actual value is shown in the figure below. Figure 5 shown.
[0110] Furthermore, the prediction results of the stacking ensemble learning model are evaluated;
[0111] Using RMSE, R 2 , MAE is used as a model evaluation indicator to judge the prediction results of the model.
[0112] The RMSE formula is as follows
[0113]
[0114] here, represents the actual observed value of the nth sample, represents the predicted value of the nth sample;
[0115] R 2 The formula is as follows:
[0116]
[0117] here, represents the actual value of the nth observation data, Represents the predicted value of the nth observation data, that is, the value predicted by the regression model, representing all observation data N represents the sample size, that is, the total number of observations.
[0118] The MAE formula is as follows:
[0119]
[0120] here represents the actual value of the nth observation data, It represents the predicted value of the nth observation data, that is, the value predicted by the model, and N represents the number of samples, that is, the total number of observation data.
[0121] The smaller the RMSE and MAE values are, the more accurate the prediction results of the fuel consumption prediction model are. 2 The closer the value is to 1, the better the model fit is and the higher the prediction accuracy of the model is.
[0122] Table 3. Overview of 𝑅2 and RMSE results of fuel consumption prediction model
[0123]
[0124] Table 3 shows that the prediction results of stacking ensemble learning are the best, and its 𝑅2 and RMSE are better than other models. Its training set 𝑅2 value is 17.49% higher than SVR, 14.87% higher than K-nearest neighbor algorithm, and 0.4% higher than random forest. Its RMSE is 93.16% lower than SVR, 92.08% lower than K-nearest neighbor algorithm, and 53.83% lower than random forest.
[0125] Furthermore, the process of establishing a ship speed optimization model with ship speed as the decision variable and minimum ship fuel consumption as the goal is as follows:
[0126] A dynamic programming model is established with the goal of minimizing the total fuel consumption of the ship and the navigation speed as the main decision variable. The route is divided into multiple segments, and the navigation distance is calculated according to the longitude and latitude of the ship. The navigation distance is divided by the ship speed and then multiplied by the ship's fuel consumption to obtain the total consumption, which is the objective function of the model. The objective function formula is as follows:
[0127]
[0128] Indicates the total number of flight segments; Indicates Fuel consumption of ships in this segment; Indicates The distance travelled by the ship in the above mentioned sections; Indicates Average sailing speed of the section;
[0129] The process of discretizing the ship speed optimization model is as follows:
[0130] The navigation speed is discretized at intervals of 0.1, and the specific formula is as follows:
[0131]
[0132]
[0133] Indicates The average sailing speed of the segment, add a binary decision variable ,like It is The minimum fuel consumption speed corresponding to the flight segment is ;otherwise ,
[0134] The objective function of the discretized ship speed optimization model is changed to.
[0135]
[0136] in: Indicates Section speed, Indicates the total number of flight segments. Indicates The number of discrete points after the segment velocity is discretized, represents the fuel consumption prediction model, i Indicates The sea state data of the section; i Indicates The distance travelled by the ship.
[0137] Further: The constraints of the ship speed optimization model include:
[0138] Constraint 1: Ensure that Segment start time For the Segment end time ;here Indicates that the ship is sailing to The total travel time consumed by the flight segment, here Indicates that the ship is sailing to The total travel time consumed by the flight segment, Indicates The distance travelled by the ship;
[0139]
[0140] Constraint 2: Ensure the total time it takes for the ship to reach its destination Do not exceed the maximum allowed time ;
[0141]
[0142] Constraint 3: Ensure the selected ship's sailing speed Within the prescribed range: here and Respectively represent The minimum and maximum speeds allowed for the section;
[0143]
[0144] Constraint 4: Ensure the ship's sailing speed in each section non-negative;
[0145]
[0146] Constraint 5: Ensure the sailing time of each segment of the ship non-negative;
[0147]
[0148] Constraint 6: Ensure binary decision variables Values are within the specified range:
[0149]
[0150] Constraint 7: Ensure that each segment has only one corresponding optimal speed that minimizes the fuel consumption of the ship, that is:
[0151]
[0152] in: Indicates from 1 to the total number of flight segments The set of natural numbers between Indicates The distance travelled by the ship Indicates The number of discrete points after the segment velocity is discretized.
[0153] The gurobi solver is used to solve the discretized ship speed optimization model;
[0154] The initial voyage information is shown in Table 4, and the optimization results are shown in Table 5, where speed represents the average speed of each voyage. Figure 6 shown.
[0155] Table 4. Fuel consumption information before optimization
[0156]
[0157] Table 5. Fuel consumption information after optimization
[0158]
[0159] As can be seen from Table 5, after speed optimization, the total fuel consumption of each voyage has been reduced. The fuel saving effect of voyages 23, 76, 128, 133, and 200 was significant, with a reduction of 6.78%, 6.29%, 10.88%, 6.39%, and 7.41% respectively. The fuel savings of voyages 159 and 186 were relatively low, with a reduction of 0.76% and 4.26% respectively. Compared with the methods in the prior art, the present invention can reduce the fuel consumption of ships without modifying the hull structure and installing auxiliary facilities, and reasonably plan the sailing speed, which is helpful for the energy efficiency management and energy saving and emission reduction of ships.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for ship fuel consumption prediction and speed optimization based on stacking ensemble learning, characterized in that: The steps include: Obtain historical fuel consumption data of the ship and data on factors affecting fuel consumption; Preprocess the fuel consumption data and data on factors affecting fuel consumption, and divide the preprocessed data into training data and test data in proportion; A stacking ensemble learning model is built based on training data to predict ship fuel consumption; The processed data of factors affecting fuel consumption are input into the stacking ensemble learning model to predict the fuel consumption of ships. Evaluate the prediction results of the stacking ensemble learning model; Establish a ship speed optimization model with ship speed as the decision variable and minimum ship fuel consumption as the goal; Discretize the ship speed optimization model; Based on the constraints of the ship speed optimization model, the discretized ship speed optimization model is solved to determine the optimal ship speed in different sections, the ship fuel consumption of the optimal ship speed in different sections, and the fuel consumption savings; The process of building a stacking ensemble learning model based on training data is as follows: The K-nearest neighbor algorithm model, the support vector machine model, and the random forest model are trained simultaneously, and the parameters of the K-nearest neighbor algorithm model, the support vector machine model, and the random forest model are adjusted to obtain the trained K-nearest neighbor algorithm model, the support vector machine model, and the random forest model; The prediction results of the trained K-nearest neighbor algorithm model, the trained support vector machine model, and the trained random forest model are merged, and the merged data is input into the meta-learner model to obtain the stacking ensemble learning model; The ship speed optimization model adopts the objective function formula as follows: n represents the total number of flight segments; FC i represents the fuel consumption of the ship in the i-th section; L i V represents the distance traveled by the ship in the i-th segment; i represents the average sailing speed of the i-th segment; The process of discretizing the ship speed optimization model is as follows: The navigation speed is discretized at intervals of 0.1, and the specific formula is as follows: V i1 =V i min V i2 =V i1 +0.1,…V ij =V i max Add binary decision variable y ij , if V ij If y is the minimum fuel consumption speed corresponding to the i-th flight segment, then ij =1; otherwise y ij =0; The objective function of the discretized ship speed optimization model is changed to: Where: V i1 —V ij represents the jth speed of the i-th segment, n represents the total number of segments, j represents the number of discrete points after the i-th segment speed is discretized, f() represents the fuel consumption prediction model, C i Indicates the sea state data of the i-th section; L i represents the distance travelled by the ship in the i-th segment; The constraints of the ship speed optimization model include: Constraint 1: Ensure that the start time of the i+1th segment is T i+1 is the time T at which the i-th segment ends i ; T i T represents the total travel time consumed by the ship to the i-th segment; i+1 It represents the total time consumed by the ship to travel to the i+1th leg, L i represents the sailing distance of the ship in the i-th segment; Constraint 2: Ensure that the total time T taken for the ship to reach its destination n+1 Not exceeding the maximum allowed time T max ; T n+1 ≤T max Constraint 3: Ensure that the selected ship's sailing speed V i Within the specified range: Here V i min and V i max They represent the minimum and maximum navigation speeds allowed in the i-th segment respectively; In i min ≤V i ≤V i max Constraint 4: Ensure the ship's navigation speed V in each section i non-negative; V i ≥0 Constraint 5: Ensure the sailing time T of each segment of the ship i non-negative; T i ≥0 Constraint 6: Ensure that the binary decision variable y ij Values are within the specified range: Constraint 7: Ensure that each segment has only one corresponding optimal speed that minimizes the fuel consumption of the ship, that is: Where: I represents a natural number set from 1 to the total number of flight segments n, L i represents the ship's travel distance in the i-th segment, and j represents the number of discrete points after the speed of the i-th segment is discretized.
2. According to claim 1, a method for predicting ship fuel consumption and optimizing speed based on stacking ensemble learning, characterized in that: The K-nearest neighbor algorithm model, support vector machine model, and random forest model are trained simultaneously based on the training data using a five-fold cross validation method to train the models.
3. According to claim 1, a method for predicting ship fuel consumption and optimizing speed based on stacking ensemble learning, characterized in that: The meta-learner adopts the Ridge regression algorithm.
