A collaborative optimization method for ship scheduling and berth allocation based on demand forecasting

Through a collaborative optimization method of ship scheduling and berth allocation based on demand forecasting, using multi-source data and multi-objective optimization models, the problem of real-time demand changes in existing technologies is solved, and the port operation efficiency and resource utilization are improved.

CN117332996BActive Publication Date: 2025-09-16SANYA SCI & EDUCATION INNOVATION PARK WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311631732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2025-09-16
Estimated Expiration
2043-12-01

AI Technical Summary

Technical Problem

Existing technologies fail to effectively respond to real-time demand changes in ship scheduling, resulting in low port operation efficiency and resource utilization, and are unable to adapt to the dynamically changing shipping environment and complex data situations.

Method used

A collaborative optimization method of ship scheduling and berth allocation based on demand forecasting is adopted. By collecting multi-source data in real time, a multi-objective collaborative optimization mathematical model is established. The ARMA, LSTM and XGBoost models are combined to predict traffic flow, and the ant colony algorithm is used to solve the optimal solution.

Benefits of technology

It improves the accuracy and flexibility of port transportation demand forecasting, reduces ship waiting time, and improves resource utilization and port production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117332996B_ABST
    Figure CN117332996B_ABST
Patent Text Reader

Abstract

The present invention provides a collaborative optimization method for ship scheduling and berth allocation based on demand forecasting, comprising the following steps: real-time collection of multi-source data, including real-time ship information, real-time cargo flow, and real-time berth information; obtaining historical cargo flow, training a prediction model based on the historical cargo flow, obtaining parameters of the prediction model, inputting the real-time cargo flow into the prediction model after setting parameters, obtaining three flow prediction sequences, and integrating the three flow prediction sequences to obtain cargo predicted flow; establishing a multi-objective collaborative optimization mathematical model for ship scheduling and berth allocation based on the real-time ship information, the predicted cargo flow, and the real-time berth information, the multi-objective collaborative optimization mathematical model including an objective function and constraints, the objective function including a cost minimization objective function and a total ship port time minimization objective function; solving the multi-objective collaborative optimization mathematical model to obtain an optimal solution for ship scheduling and berth allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of port ship scheduling algorithms, and in particular relates to a collaborative optimization method for ship scheduling and berth allocation based on demand forecasting. Background Art

[0002] In the areas of port management and shipping scheduling, effective ship scheduling optimization methods are crucial for improving port operational efficiency and resource utilization. Domestic waterway transportation organizations have always used a planning-based model, whereby plans are compiled in advance based on traffic forecasts to guide actual operations, maximizing the matching of capacity allocation with estimated demand. Demand forecasting and decision-making responses together constitute a demand response mechanism. Traditional port ship scheduling methods are primarily based on empirical rules and static plans. These methods are unable to adjust scheduling plans in a timely manner based on real-time demand changes, and are unable to adapt to the dynamically changing shipping environment and complex data landscape. With the continuous development of information technology, ports have accumulated a large amount of multi-source heterogeneous data, such as real-time vessel locations, cargo flows, and berth resources. Leveraging this data, combined with advanced data analysis and optimization techniques, can achieve more accurate and real-time ship scheduling optimization.

[0003] Existing technologies have achieved some success in optimizing ship scheduling. These include methods based on mathematical programming, genetic algorithms, and simulated annealing algorithms, primarily targeting port resource allocation and optimizing inter-port ship scheduling, and utilizing intelligent optimization algorithms to make scheduling decisions. For example, research has been conducted on the coordinated scheduling optimization of port resources using genetic algorithms, multi-agent distributed optimization algorithms, heuristic optimization algorithms, and improved dynamic genetic optimization algorithms. Various port scheduling operations and data resources have been integrated to develop a coastal port scheduling system solution. Focusing on the actual needs of ship scheduling, the problem of minimizing ship waiting time under limited waterway capacity has been studied. Scheduling optimization models aimed at minimizing ship berthing time, minimizing the total fleet dwell time, and maximizing the time interval between ship departures have also been studied. These existing technologies aim to reduce waiting time or optimize resource allocation, but they ignore the impact of demand uncertainty.

[0004] Port operations departments need to coordinate transport capacity under a demand-responsive mechanism, conduct real-time forecasting of transport demand, maximize passenger travel satisfaction, and rationally plan ship schedules. Furthermore, there is a strong correlation between ship arrivals, departures, and berthing during a voyage. Berth allocation and the navigational behavior of a group of ships influence each other. Improving the synergy between berth allocation and ship scheduling will help improve transport service quality, reduce wait times for ship services, and enhance port production efficiency. This allows for the development of highly real-time, efficient, and accurate port ship scheduling production plans. Summary of the Invention

[0005] The present invention proposes a collaborative optimization method for ship scheduling and berth allocation based on demand forecasting, which solves the problem that the existing technology does not take into account the real-time dynamic changes in demand.

[0006] To solve the above technical problems, the present invention provides a collaborative optimization method for ship scheduling and berth allocation based on demand forecasting, comprising the following steps:

[0007] Step S1: real-time collection of multi-source data, including real-time ship information, real-time cargo flow, and real-time berth information;

[0008] Step S2: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, obtain parameters of several prediction models, input the real-time cargo flow into the several prediction models with set parameters, obtain several flow prediction sequences, integrate the several flow prediction sequences to obtain cargo forecast flow, the prediction models include an autoregressive moving average model (ARMA), a long short-term memory network interval prediction model (LSTM), and a distributed gradient boosting library model (XGBoost);

[0009] Step S3: establishing a multi-objective collaborative optimization mathematical model for ship scheduling and berth allocation based on the real-time ship information, predicted cargo flow, and real-time berth information, wherein the multi-objective collaborative optimization mathematical model includes an objective function and constraints, wherein the objective function includes a cost minimization objective function and a total port time minimization objective function;

[0010] Step S4: Solve the multi-objective collaborative optimization mathematical model to obtain the optimal solution for ship scheduling and berth allocation.

[0011] Preferably, step S1 includes a data processing part, including the following steps:

[0012] Step S11: preprocessing the multi-source data, wherein the preprocessing includes data deduplication, missing value processing, and outlier processing;

[0013] Step S12: converting and standardizing the preprocessed data to obtain standardized data;

[0014] Step S13: integrating the standardized data, integrating data from different data sources into one data structure;

[0015] Step S14: Perform quality verification and control on the integrated data, and repair or eliminate data that does not meet the set quality standards.

[0016] Preferably, step S1 also includes data backup and data update parts. The data backup uses a database system to store the integrated data as a data file and manage and back up the data file; the data update uses a scheduled task or event trigger mechanism to update and synchronize the data.

[0017] Preferably, step S2 includes:

[0018] Step S21: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, and obtain parameters of several prediction models;

[0019] Step S22: setting a prediction model according to the parameters, inputting the real-time cargo flow into a plurality of prediction models after setting the parameters, and obtaining a plurality of flow prediction sequences;

[0020] Step S23: According to the error between several traffic prediction sequences and the true value of the traffic sequence, the output weight of the prediction model is obtained and the output weight is calculated. The expression is:

[0021] ;

[0022] Where, is the error between the output of the integrated model and the true value of each result;

[0023] Step S24: According to the output weights, several flow prediction sequences are integrated to obtain the cargo flow prediction. :

[0024] ;

[0025] Where, is the output result of the integrated model; is the output result of each sub-model, are the model parameters of each sub-model, ; is a trainable parameter.

[0026] Preferably, step S22 includes the following steps:

[0027] Step S221: Input the cargo flow into the autoregressive moving average model (ARMA) to obtain the first flow forecast sequence:

[0028] ;

[0029] Where, for cargo flow; are the model parameters of the ARMA model;

[0030] Step S222: Input the cargo flow into the long short-term memory network (LSTM) model to obtain the second flow prediction sequence:

[0031] ;

[0032] ;

[0033] Where RELU is the activation function; and is a trainable parameter; LSTM layer of the LSTM model; is the hidden layer parameter of the LSTM model;

[0034] Step S223: Input the cargo flow into the distributed gradient boosting library XGBoost model to obtain the third flow prediction sequence:

[0035] ;

[0036] Where, are the model parameters of the XGBoost model.

[0037] Preferably, the expression of the cost minimization objective function in step S3 is:

[0038] ;

[0039] ;

[0040] ;

[0041] Where, is the fuel consumption cost of the ship, of which, 、 and Non-mooring vessels i berth j The unit fuel consumption, mileage and unit fuel price of the total fuel consumption cost of the voyage; For the cost of allowance, Representative ship berthing berth j The allowance factor for flights; i Indicates the ship serial number, ; j Indicates the berth number. ; Indicates ship i berth j order; Indicates a non-mooring vessel i In order k berth j binary variables;

[0042] The expression of the objective function for minimizing the total time a ship spends in port is:

[0043] ;

[0044] Where, Non-mooring vessel i departure time; E i The time when the ship arrives at the port anchorage; C i For ships i Sailing time from anchorage to berth; The first berthing is completed and the ship needs to be moved i The time of shifting; To move the ship i The location information of the first stop; For the ship i The time of leaving the port at the end of the second berthing; To move the ship i The location information of the second stop.

[0045] Preferably, the constraints in step S3 include:

[0046] 1) Demand constraints:

[0047] ;

[0048] Where, The cargo flow forecast result; They are The lower and upper limits of demand are obtained through 95% confidence level statistics;

[0049] 2) Each berth can only berth one vessel in the same order:

[0050] ;

[0051] ;

[0052] ;

[0053] Where, Indicates k The order is j moored at the berth i The time of the ship's arrival at the port; M is a sufficiently large number; when i When the vessel is a vessel that needs to shift berths, =1, otherwise 0;

[0054] 3) When the ship i by k Order by j When berthed, the vessel i Arrival time:

[0055] ;

[0056] ;

[0057] Where, Indicates a moving vessel i During the first stop, k The order is j moored at the berth i The time of the ship's arrival at the port; To move the ship i The second port arrival time of

[0058] 4) When the ship i by k Order by j When berthed, the vessel i Departure time:

[0059] ;

[0060] ;

[0061] ;

[0062] 5) The vessel’s port entry time is greater than or equal to the vessel’s arrival time:

[0063] ;

[0064] ;

[0065] ;

[0066] ;

[0067] In the formula, when i When the target berth to which the ship is moving is an empty berth, =0, otherwise 1; D i For ships i berth shifting time;

[0068] 6) The relationship between the ship's departure time, port arrival time and working hours:

[0069] ;

[0070] ;

[0071] ;

[0072] ;

[0073] Where, A i For ships i working hours; For ships i Length of work in Hong Kong;

[0074] 7) The number of berthing times for non-transferring vessels is 1:

[0075] ;

[0076] 8) The number of berthing times for a shifting vessel is 1:

[0077] ;

[0078] 9) Berth length restrictions:

[0079] ;

[0080] Where, and Berthed vessels i Required berth length and actual berth length;

[0081] 10) The working hours of ships at the same berth do not overlap:

[0082] ;

[0083] Where, and are respectively the set of ships and the set of ship berthing sequences; and Ships and A binary variable indicating whether the first or second docking, 、 and Ships First arrival time, departure time and berthing time, and Indicates a moving vessel and In order and berth j binary decision variables;

[0084] 11) The ship's entry and exit times must comply with the port's waterway entry and exit times:

[0085] ;

[0086] ;

[0087] Where, The sailing time required for the ship to enter / leave the port, is the modulo operation;

[0088] 12) The ship's entry and exit times must be within the safe navigation time interval:

[0089] ;

[0090] ;

[0091] Where, ; and Represents ships respectively and in order berth j Arrival time; To move the ship A binary variable indicating whether the target berth is an empty berth; and Transfer ship The first and second port arrival times; H The time interval for safe navigation of ships.

[0092] Preferably, in step S4, a weighted method is used to convert the multi-objective problem into a single-objective problem, and the objective function value of the single-objective problem is The expression is:

[0093] ;

[0094] Where, 、 Sub-objective functions and the weight assigned; The objective function is to minimize the cost; The objective function is to minimize the total time a ship spends in port.

[0095] Preferably, in step S4, the ant colony algorithm is used to solve the multi-objective collaborative optimization mathematical model, including:

[0096] Step S41: Ship real-time information includes ship voyage information, and berth real-time information includes arrival ship information and berth attribute information. i Assigned to berth j The probability of berth j Assign the ship with the highest probability and calculate the objective function value of the assignment scheme , calculate the ship i About berth allocation j The expression for the probability of a voyage is:

[0097] ;

[0098] Where, τ ( i,j ) is a ship i Assigned to berth j The probability of pheromone concentration; L g A collection of currently available ships;

[0099] Step S42: Berth j Randomly select a new ship and calculate the objective function value of the new solution , when the objective function value of the new solution is less than that of the existing solution, the new solution is retained, otherwise the existing solution is retained;

[0100] Step S43: Repeat steps S41 to S42 until all berths are assigned ships;

[0101] Step S44: Determine whether the current search times have reached the set search times. When the iterative search times are equal to the set search times, output the optimal allocation plan; otherwise, update and volatilize the pheromone concentration, and repeat steps S41 to S43 until the set search times are reached.

[0102] Preferably, the method for updating and volatilizing the pheromone concentration in step S44 includes:

[0103] Step S441: Update pheromone concentration τ ( i,j ):

[0104] ;

[0105] ;

[0106] In the above formula, τ [( i,j )]2 and τ [( i,j )]1 are the pheromone concentrations before and after iteration respectively; △τ m ( i,j ) for ants m the increment in the concentration of released pheromones; Ants m The objective function value of the constructed scheduling and berth allocation scheme; is a constant.

[0107] Step S442: After all pheromone concentrations are updated, the pheromone concentration is volatilized:

[0108] ;

[0109] Where, ρ To set the pheromone volatility coefficient.

[0110] The benefits of the present invention include at least:

[0111] 1. Previous port transport demand forecasting methods mostly used historical data for prediction and could not make real-time predictions that took into account demand uncertainty based on changes in real-time port ticket sales. The real-time integrated forecasting model proposed in this invention not only performs demand analysis based on real-time port ticket sales data, but also integrates ARMA, Xgboost and an improved interval prediction LSTM model. Compared with traditional single-type forecasting models, it has stronger fault tolerance and stronger recognition of demand fluctuation patterns, reduces the impact of port transport demand volatility on model prediction accuracy, and improves the performance of the real-time forecasting model.

[0112] 2. Previous port ship scheduling technologies were mainly based on scheduling experience rules and historical static data. They were unable to adjust the scheduling plan in a timely manner according to real-time demand changes, the navigation status of ships in one-way channels, and the status of port berth resources. They were unable to adapt to the dynamically changing shipping environment and complex data conditions, and had poor synergy between the multi-objective optimization of ship scheduling and berth allocation. The method proposed in the present invention introduces constraints such as the selection of one-way channel navigation rules, berth priority rules, and real-time demand based on constraints such as ship capacity, loading and unloading equipment utilization, and port usage fees. It can comprehensively consider multiple constraints to solve the optimal ship scheduling plan, thus solving the problem of consistent multi-objective solution of ship scheduling and berth allocation. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0114] Figure 2 A data collection method according to an embodiment of the present invention;

[0115] Figure 3 A schematic diagram of a prediction model flow chart of an embodiment of the present invention;

[0116] Figure 4Schematic diagram of a long short-term memory network interval prediction model LSTM according to an embodiment of the present invention;

[0117] Figure 5 The LSTM prediction result of the long short-term memory network interval prediction model in the embodiment of the present invention;

[0118] Figure 6 This is a schematic diagram of berth distribution according to an embodiment of the present invention;

[0119] Figure 7 Schematic diagram of a time axis discretization simulation algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0120] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.

[0121] like Figure 1 As shown, an embodiment of the present invention provides a method for collaborative optimization of ship scheduling and berth allocation based on demand forecasting, comprising the following steps:

[0122] Step S1: Real-time collection of multi-source data, including real-time ship information, real-time cargo flow, and real-time berth information. In order to adapt and integrate the formats and interfaces of different data sources and establish a unified data processing framework, the embodiment of the present invention adopts the following method to process multi-source data:

[0123] 1) Data source determination: Determine the data sources that need to be collected and integrated, such as ship location data, ship scheduling data, ticket sales data, port berth and turning water resource data, etc.

[0124] 2) Internal / external data collection: Data collection plan such as Figure 2 As shown in the figure below. Based on the demand for historical data for transportation flow analysis and forecasting, data is collected, organized, and visualized. This data includes internal and basic data such as ticketing data, loading data, calendar data, and time data. Additionally, external data interfaces are set up to access external data, including traffic data, operator data, and other data sources, if available. Python libraries such as requests, urllib, or dedicated API libraries are used to retrieve the required data from various data sources. Data is retrieved through HTTP requests or API calls and saved as raw data files or structured data objects.

[0125] 3) Data Preprocessing: Use the Pandas library for data preprocessing. Use Pandas' data cleaning and transformation capabilities, including data deduplication, missing value processing, and outlier detection and processing. For example, use the drop_duplicates method to remove duplicate data, the fillna method to fill missing values, and conditional statements and numerical operations to filter and correct outliers.

[0126] 4) Data Conversion and Standardization: Use the Pandas and NumPy libraries to convert and standardize data as needed. For example, use Pandas' date and time processing functions to convert and format timestamps, and use NumPy's numerical operations and array manipulation to process and standardize numerical data.

[0127] 5) Data Integration: Use the Pandas library for data integration and merging. Merge and join data based on key or index relationships, integrating data from different data sources into a single data structure, such as a DataFrame. Use methods such as merge and join to merge data, and perform operations such as column renaming, data filtering, and sorting as needed.

[0128] 6) Data Storage and Management: Choose an appropriate database system or file format to store the integrated data. Use Python's SQLAlchemy library for database connections and operations, or use Pandas' to_csv and to_excel methods to save data in formats such as CSV and Excel. Also, use Python file management libraries such as os and shutil to manage and back up data files.

[0129] 7) Data Update and Synchronization: Based on the update frequency of the data source, use scheduled tasks or event-triggered mechanisms to update and synchronize data. Use Python scheduled task libraries such as APScheduler or the operating system's scheduled task tools to regularly trigger the data collection and update process to ensure data timeliness.

[0130] 8) Data Quality Control: Use Python libraries such as Pandas and NumPy to perform quality control and validation on the integrated data. Use Pandas data validation features such as assert statements and conditional statements to check data consistency, completeness, and accuracy, and perform data repair or exclusion as needed.

[0131] Step S2: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, obtain parameters of several prediction models, input the real-time cargo flow into several prediction models with set parameters, obtain several flow prediction sequences, integrate several flow prediction sequences to obtain cargo prediction flow, such as Figure 3 The figure shows the prediction model of the present invention, including the autoregressive moving average model ARMA, the long short-term memory network interval prediction model LSTM and the distributed gradient boosting library model XGBoost.

[0132] Interval forecasting is an effective approach to addressing the real-time uncertainty of forecasts. Interval forecasting effectively addresses the dependency issues inherent in point forecasting models, providing upper and lower bounds for the flow distribution range, quantifying forecast uncertainty, and improving the reliability of port transport flow forecasts. Furthermore, based on the screening of demand-influencing indicators, and considering that neural networks can effectively handle nonlinear data, ARMA can better handle linear problems, and XGBoost can exploit the attributes of different dimensions within multidimensional variables, a multivariate weighted combination forecasting model was constructed. By combining models at different levels, the model's generalization capabilities and forecast accuracy are significantly improved, addressing practical challenges in flow forecasting.

[0133] Specifically, step S2 includes the following steps:

[0134] Step S21: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, and obtain parameters of several prediction models.

[0135] Step S22: setting a prediction model according to parameters, inputting the real-time cargo flow into a number of prediction models after setting parameters, and obtaining a number of flow prediction sequences.

[0136] Step S22 includes the following steps:

[0137] Step S221: Input the cargo flow into the autoregressive moving average model (ARMA) to obtain the first flow forecast sequence:

[0138] ;

[0139] Where, for cargo flow; are the model parameters of the ARMA model.

[0140] Step S222: The present invention improves the LSTM (Long Short-Term Memory) neural network output layer structure and constructs an LSTM interval prediction model, the structure of which is as follows: Figure 4 As shown in the figure, a deep learning architecture is adopted, which consists of three parts: the LSTM layer for extracting traffic time series features, the fully connected layer, and the output layer for intervals. The LSTM layer can be simply expressed as:

[0141] ;

[0142] is the hidden layer parameter of the LSTM model.

[0143] After several layers of feature extraction modules, a final hidden representation is obtained , this final hidden representation is passed through a fully connected feedforward neural network module, and the cargo flow is input into the LSTM model to obtain the second flow prediction sequence:

[0144] ;

[0145] Where RELU is the activation function; and is a trainable parameter.

[0146] Step S223: Input the cargo flow into the distributed gradient boosting library XGBoost model to obtain the third flow prediction sequence:

[0147] ;

[0148] Where, are the model parameters of the XGBoost model.

[0149] Step S23: According to the error between several traffic prediction sequences and the true value of the traffic sequence, the output weight of the prediction model is obtained, wherein the true value of the traffic sequence is given in the model training stage, and the output weight is calculated. The expression is:

[0150] ;

[0151] Where, is the error between the output of the integrated model and the true value of each result.

[0152] Step S24: According to the output weights, several flow prediction sequences are integrated to obtain the cargo flow prediction. :

[0153] ;

[0154] Where, is the output result of the integrated model; is the output result of each sub-model, are the model parameters of each sub-model, ; It is a trainable parameter, and the overall prediction performance of the model is improved by training this parameter.

[0155] Prediction effect Figure 5As shown in the figure, traffic flow is predicted for the next 50 moments based on traffic flow data and compared with the actual values. It can be seen that, in terms of trend, the predicted values ​​reflect the overall changing trend of the actual values, which demonstrates the ensemble model's accurate extraction of trend characteristics. In terms of time values, the predicted values ​​have a small error around the actual values, and the overall time points are relatively close to the actual values. The prediction accuracy is particularly high at relatively close times, demonstrating the ensemble model's accurate extraction of fine-grained traffic flow characteristics. Overall, the ensemble model's prediction results are consistent with traffic trend and time-varying characteristics, improving the accuracy of future traffic demand forecasts.

[0156] Step S3: Based on the real-time information of ships, the predicted cargo flow and the real-time information of berths, a multi-objective collaborative optimization mathematical model for ship scheduling and berth allocation is established. The multi-objective collaborative optimization mathematical model includes an objective function and constraints. The objective function includes a cost minimization objective function and a ship's total port time minimization objective function, such as Figure 6 Shown is a berth diagram.

[0157] Construct a multi-objective collaborative optimization mathematical model of dynamic ship scheduling and berth allocation under the demand response mechanism, such as Figure 7 As shown in the figure, the time calculation for intelligent ship scheduling uses a discretized simulation algorithm, discretizing the actual continuous navigation operation into events with time points. These events are divided into time points: unberthing, arriving at the start of a one-way lane, starting to pass through the one-way lane, ending the one-way lane, and starting to enter the berth. These events are used to fully describe the different states of the entire ship's navigation.

[0158] Specifically, since a scheduling plan needs to be formulated according to demand and a berth allocation plan needs to be formulated based on the scheduling plan, two objective functions are formed, including the cost minimization objective function and the total port time minimization objective function.

[0159] The expression of the cost minimization objective function is:

[0160] ;

[0161] ;

[0162] ;

[0163] Where, is the fuel consumption cost of the ship, of which, 、 and Non-mooring vessels i berth j The unit fuel consumption, mileage and unit fuel price of the total fuel consumption cost of the voyage; For the cost of allowance, Representative ship berthing berthj The allowance factor for flights; i Indicates the ship serial number, ; j Indicates the berth number. ; Indicates ship i berth j order; Indicates a non-mooring vessel i In order k berth j binary variable.

[0164] The expression of the objective function for minimizing the total time a ship spends in port is:

[0165] ;

[0166] Where, Non-mooring vessel i The departure time of ; E i The time when the ship arrives at the port anchorage, E i >0; C i For ships i Sailing time from anchorage to berth, C i >0; The first berthing is completed and the ship needs to be moved i The shifting time, >0; To move the ship i The first stop location information, if ship i berths at berth j in order k, then =1, otherwise =0; For the ship i The second berthing ends and the time of leaving the port, >0; To move the ship i The second stop location information, if ship i k The order is j If the vessel is moored at a berth, =1, otherwise =0.

[0167] Constraints include:

[0168] 1) Demand constraints:

[0169] ;

[0170] Where, The cargo flow forecast result; They are The lower and upper limits of demand are obtained through statistics at the 95% confidence level.

[0171] 2) Each berth can only berth one vessel in the same order:

[0172] ;

[0173] ;

[0174] ;

[0175] Where, Indicates k The order is j moored at the berth i The time the ship arrives at the port, >0; M is a sufficiently large number; when i When the vessel is a vessel that needs to shift berths, =1 if the value is set to true, otherwise 0.

[0176] 3) When the ship i by k Order by j When berthed, the vessel i Arrival time:

[0177] ;

[0178] ;

[0179] Where, Indicates a moving vessel i During the first stop, k The order is j moored at the berth i The time the ship arrives at the port, >0; To move the ship i The second arrival time of >0.

[0180] 4) When the ship i by k Order by j When berthed, the vessel i Departure time:

[0181] ;

[0182] ;

[0183] .

[0184] 5) The vessel’s port entry time is greater than or equal to the vessel’s arrival time:

[0185] ;

[0186] ;

[0187] ;

[0188] ;

[0189] In the formula, when i When the target berth to which the ship is moving is an empty berth, =0, otherwise 1; D i For ships i berthing time.

[0190] 6) The relationship between the ship's departure time, port arrival time and working hours:

[0191] ;

[0192] ;

[0193] ;

[0194] ;

[0195] Where, A i For ships i working hours, A i >0; For ships i Length of work in Hong Kong.

[0196] 7) The number of berthing times for non-transferring vessels is 1:

[0197] .

[0198] 8) The number of berthing times for a shifting vessel is 1:

[0199] .

[0200] 9) Berth length restrictions:

[0201] ;

[0202] Where, and Berthed vesselsi Required berth length and actual berth length.

[0203] 10) The working hours of ships at the same berth do not overlap:

[0204] ;

[0205] Where, and are respectively the set of ships and the set of ship berthing sequences; and Ships and A binary variable indicating whether the first or second docking, 、 and Ships First arrival time, departure time and berthing time, and Indicates a moving vessel and In order and berth j binary decision variables.

[0206] 11) The ship's entry and exit times must comply with the port's waterway entry and exit times:

[0207] ;

[0208] ;

[0209] Where, The sailing time required for the ship to enter / leave the port, It is a modulo operation.

[0210] 12) The ship's entry and exit times must be within the safe navigation time interval:

[0211] ;

[0212] ;

[0213] Where, ; and Represents ships respectively and in order berth j Arrival time, To move the ship A binary variable indicating whether the target berth is an empty berth, and Transfer ship The first and second port arrival times, H The time interval for safe navigation of ships.

[0214] Step S4: Using the ant colony algorithm to solve the multi-objective collaborative optimization mathematical model, the optimal solution for ship scheduling and berth allocation is obtained.

[0215] Specifically, in practical applications, based on the importance of each optimization goal, a weighted method is used to convert the multi-objective problem into a single-objective problem. The objective function value of the single-objective problem is The expression is:

[0216] ;

[0217] Where, 、 Sub-objective functions and The weights assigned are set differently by experts according to the needs of ship scheduling in different ports. In the embodiment of the present invention, the two weight values ​​are 0.6 and 0.4 respectively; The objective function is to minimize the cost; The objective function is to minimize the total time a ship spends in port.

[0218] The ant colony algorithm solves the problem by dynamically updating the corresponding pheromone concentration based on the quality of the feasible solution represented by the ant colony during the iterative stepping process, so that the ant colony prioritizes the path with higher pheromone concentration and better target value when stepping, and then the feasible solution gradually converges to the optimal solution. It includes the following steps:

[0219] Step S41: For the ship scheduling problem, assuming that the ant colony has M Ants, among them ants m Reached g stage, in each of the previous stages h (h=1, 2...., g-1), for berths j , select Ship i Allocate to this berth. g Stage 1, Ship i Assigned to a berth j The probability is:

[0220] ;

[0221] Where, τ ( i,j ) is a ship i Assigned to berth j The probability of pheromone concentration;L g A collection of currently available ships.

[0222] Since some ships have been assigned to No. g -1 berth, and it is necessary to avoid berth operation time conflicts, therefore, L g Some of the ships in will not be available for allocation to berth scheduling. L g Depends on the ant's previous search path.

[0223] Step S42: In order to improve the search efficiency, the neighborhood search technology is introduced to find the berth j Randomly assign a new ship and calculate the objective function value of the new solution , when the objective function value of the new solution is less than the objective function value of the existing solution, the new solution is retained, otherwise the existing solution is retained.

[0224] Step S43: Repeat steps S41 to S42 until all ships to be berthed are allocated berths.

[0225] Step S44: Determine whether the iterative search times have reached the set search times. When the iterative search times are equal to the set search times, output the optimal allocation plan; otherwise, update and volatilize the pheromone concentration, and repeat steps S41 to S43 until the set search times are reached.

[0226] Methods for updating and volatilizing pheromone concentrations include:

[0227] Step S441: Update pheromone concentration τ ( i,j ):

[0228] ;

[0229] ;

[0230] In the above formula, τ [( i,j )]2 and τ [( i,j )]1 are the pheromone concentrations before and after iteration respectively; △τ m ( i,j ) for ants m the increment in the concentration of released pheromones; Ants m The objective function value of the constructed scheduling and berth allocation scheme; is a constant.

[0231] Step S442: After all pheromone concentrations are updated, the pheromone concentration is volatilized:

[0232] ;

[0233] Where, ρ To set the pheromone volatility coefficient, take the value as 0.2.

[0234] Taking a certain solution of a certain port as an example, the ship scheduling and berth allocation optimization solution is carried out, and the solution results are shown in Table 1.

[0235] The optimal allocation scheme of the embodiment of Table

[0236] Voyage number Berth allocation Ship Code Departure time Arriving at a one-way channel Leaving a one-way channel Arrival outside the destination port berth 1 5 B1 00:47 01:04 01:43 01:49 02:05 2 14 B2 00:50 01:07 01:46 01:52 02:08 3 11 B3 00:53 01:10 01:49 01:55 02:11 4 7 D1 01:37 01:54 02:33 02:39 02:55 5 13 D2 01:40 01:57 02:36 02:42 02:58 6 9 D3 01:43 02:00 02:39 02:45 03:01 7 8 F1 02:27 02:44 03:23 03:29 03:45 8 12 F2 02:30 02:47 03:26 03:32 03:48 9 10 F3 02:33 02:50 03:29 03:35 03:51 10 5 A1 03:17 03:34 04:13 04:19 04:35 11 14 A2 03:20 03:37 04:16 04:22 04:38 12 11 A3 03:23 03:40 04:19 04:25 04:41 13 7 C1 04:07 04:24 05:03 05:09 05:25 14 13 C2 04:10 04:27 05:06 05:12 05:28 15 9 C3 04:13 04:30 05:09 05:15 05:31 16 8 E1 04:57 05:14 05:53 05:59 06:15 17 12 E2 05:00 05:17 05:56 06:02 06:18 18 10 E3 05:03 05:20 05:59 06:05 06:21 19 5 G1 05:47 06:04 06:43 06:49 07:05 20 14 G2 05:50 06:07 06:46 06:52 07:08 21 11 G3 05:53 06:10 06:49 06:55 07:11

[0237] This invention proposes a collaborative optimization method for real-time ship scheduling and berth allocation based on demand forecasting. This method aims to overcome the limitations of traditional methods, which cannot account for dynamic changes in real-time demand. This method reduces passenger queuing time and vessel resource consumption, improves resource utilization in port shipping, and enhances the efficient and sustainable operation of shipping. Therefore, this invention has important practical significance and application prospects, and will help promote the modernization and intelligent development of port and shipping management.

[0238] The technical features of the above embodiments may be combined in any manner. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. Only preferred embodiments of the present invention are presented. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the present invention. As long as there are no contradictions in the combination of these technical features, they should be considered to be within the scope of this specification.

[0239] It should be noted that those skilled in the art may make various modifications and improvements without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be based on the appended claims.

Claims

1. A collaborative optimization method for ship scheduling and berth allocation based on demand forecasting, characterized in that: The following steps are involved: Step S1: real-time collection of multi-source data, including real-time ship information, real-time cargo flow, and real-time berth information; Step S2: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, obtain parameters of several prediction models, input the real-time cargo flow into the several prediction models with set parameters, obtain several flow prediction sequences, integrate the several flow prediction sequences to obtain cargo forecast flow, the prediction models include an autoregressive moving average model (ARMA), a long short-term memory network interval prediction model (LSTM), and a distributed gradient boosting library model (XGBoost); Step S3: establishing a multi-objective collaborative optimization mathematical model for ship scheduling and berth allocation based on the real-time ship information, predicted cargo flow, and real-time berth information, wherein the multi-objective collaborative optimization mathematical model includes an objective function and constraints, wherein the objective function includes a cost minimization objective function and a total port time minimization objective function; The expression of the cost minimization objective function is: minC=C1+C2; C1=∑ i ∑ j ∑ k c i d j p f x ijk ; C2=∑ i ∑ j ∑ k c j x ijk ; In the formula, C1 is the fuel consumption cost of the ship, and c i d j and p f are the unit fuel consumption, mileage and unit fuel price of the total fuel consumption cost of the voyage of non-transferring ship i at berth j; C2 is the allowance cost, γ j represents the allowance coefficient for the flight of the ship berthing at berth j; i represents the ship number, i∈[1,L]; j represents the berth number, j∈[1,L]; k represents the order of ship i berthing at berth j; x ijk A binary variable indicating that the non-transferring ship i docks at berth j in order k; The expression of the objective function for minimizing the total time a ship spends in port is: minG=∑ i ∑ j ∑ k {[z ijk -(E i -C i )×x ijk ]+[n ijk -E i ×f ijk ]+[o ijk -n ijk +C i ×s ijk ]}; Where z ijk is the departure time of non-transferring vessel i; E i The time when the ship arrives at the port anchorage; C i is the sailing time of ship i from anchorage to berth; n ijk The first berthing is completed and the berthing time of ship i needs to be moved; f ijk is the position information of the first berthing of the ship i that needs to be moved; ijk The time when ship i leaves the port after the second berthing; ijk The second berthing position information of the ship i that needs to be moved; The constraints include: 1) Demand constraints: L≤∑ i F i ≤U; Where, F i is the cargo flow prediction result; L and U are F i The lower and upper limits of demand are obtained through 95% confidence level statistics; 2) Each berth can only berth one vessel in the same order: f ijk ≤M×g i ; s ijk ≤M×g i ; and ijk ≤M×x ijk ; Where y ijk represents the arrival time of ship i berthing at berth j in order k; M is a sufficiently large number; when ship i is a ship that needs to be moved, g i =1, otherwise 0; 3) When ship i berths at berth j in order k, the time of ship i entering the port is: t ijk ≤M×f ijk ; in ijk ≤M×s ijk ; Where, t ijk u represents the arrival time of ship i berthing at berth j in order k when the shifting ship i berths for the first time; ijk is the second port entry time of ship i that needs to be shifted; 4) When ship i berths at berth j in order k, the departure time of ship i is: With ijk ≤M×x ijk ; n ijk ≤M×f ijk ; the ijk ≤M×s ijk ; 5) The vessel’s port entry time is greater than or equal to the vessel’s port arrival time: and ijk ≤E i ×x ijk ; t ijk ≤E i ×f ijk ; (1-p i )×u ijk ≥(∑ j ∑ k n ijk +D i )×s ijk ×(1-p i ); p i ×u ijk ≥(∑ j ∑ k n ijk +C i )×s ijk ×p i ; In the formula, when the target berth for ship i is an empty berth, p i =0, otherwise 1; D i is the shifting time of ship i; 6) The relationship between the ship's departure time, port arrival time and working hours: z ijk ≥y ijk +(C i +A i )×x ijk ; n ijk ≥t ijk +(C i +q i )×f ijk ; (1-p i )×o ijk ≥[∑ j ∑ k n ijk +(A i -q i )×s ijk ]×(1-p i ); p i ×o ijk ≥[u ijk +(C i +A i )×s ijk ]×p i ; Where A i is the working time of ship i; q i is the working hours of ship i in port; 7) The number of berthing times for non-transferring vessels is 1: ∑ j ∑ k x ijk =1-g i ; 8) The number of berthing times for a shifting vessel is 1: ∑ j ∑ k f ijk =g i ; 9) Berth length restrictions: ∑ k x ijk ×b i <l i ; Where b i and l i are the required berth length and actual berth length of ship i, respectively; 10) The working hours of ships at the same berth do not overlap: (1-g i1 )×(1-g i2 )×(y i2jk2 -z i1jk1 -C i1 )≥M(x i1jk1 +x i2jk2 -2); Where, i1,i2∈SV and i1≠i2, k1,k2∈SR and k2>k1, SV and SR are the sets of ships and the order of ship berthing respectively; g i1 and g i2 are binary variables indicating whether ships i1 and i2 are berthing for the first and second time, respectively. i2jk2 、z i1jk1 and C i1 are the first arrival time, departure time and berthing time of ship i1, respectively, i1jk1 and x i2jk2 represents the binary decision variable for the shifting ships i1 and i2 to dock at berth j in the order k1 and k2 respectively; 11) The ship's entry and exit times must comply with the port's waterway entry and exit times: 0≤(t ijk mod(2T))×(1-p i )≤(1-p i )×T; p i T≤(n ijk mod(2T))×p i ≤(2T-C i )×p i ; Where T is the sailing time required for the ship to enter / leave the port, and mod is the modulo operation; 12) The ship's entry and exit times must be within the safe navigation time interval of the waterway: |∑ j ∑ k and i1jk -∑ j ∑ k and i2jk |≥H; p i2 ×|∑ j ∑ k t i1jk -∑ j ∑ k u i2jk |≥H×p i2 ; Where, i1∈SV, i2∈SV, and i1≠i2; y i1jk and y i2jk are the arrival times of ships i1 and i2 at berth j in order k; p i2 is a binary variable indicating whether the target berth of the mobile ship i2 is an empty berth; i1jk and μ i2jk are the first and second port entry times of the berthing ship i2 respectively; H is the safe navigation time interval of the ship; Step S4: Solve the multi-objective collaborative optimization mathematical model to obtain the optimal solution for ship scheduling and berth allocation.

2. The collaborative optimization method for ship scheduling and berth allocation based on demand forecasting according to claim 1 is characterized by: Step S1 includes a data processing part, including the following steps: Step S11: preprocessing the multi-source data, wherein the preprocessing includes data deduplication, missing value processing, and outlier processing; Step S12: converting and standardizing the preprocessed data to obtain standardized data; Step S13: integrating the standardized data, integrating data from different data sources into one data structure; Step S14: Perform quality verification and control on the integrated data, and repair or eliminate data that does not meet the set quality standards.

3. The collaborative optimization method for ship scheduling and berth allocation based on demand forecasting according to claim 2 is characterized by: Step S1 also includes data backup and data update parts. The data backup uses a database system to store the integrated data as a data file and manage and back up the data file; the data update uses a scheduled task or event trigger mechanism to update and synchronize the data.

4. The method for collaborative optimization of ship scheduling and berth allocation based on demand forecasting according to claim 1, characterized in that: Step S2 includes: Step S21: Obtain historical cargo flow, train several prediction models based on the historical cargo flow, and obtain parameters of several prediction models; Step S22: setting a prediction model according to the parameters, inputting the real-time cargo flow into a plurality of prediction models after setting the parameters, and obtaining a plurality of flow prediction sequences; Step S23: According to the error between several traffic prediction sequences and the true value of the traffic sequence, the output weight of the prediction model is obtained, and the output weight μ is calculated. b The expression is: Where, e b is the error between the output of the integrated model and the true value of each result; Step S24: According to the output weights, several flow prediction sequences are integrated to obtain the cargo prediction flow F: Where F is the output result of the integrated model; b is the output result of each sub-model, μ b are the model parameters of each sub-model, b = 1, 2, 3; η is a trainable parameter.

5. The method for collaborative optimization of ship scheduling and berth allocation based on demand forecasting according to claim 4, characterized in that: Step S22 includes the following steps: Step S221: Input the cargo flow into the autoregressive moving average model (ARMA) to obtain the first flow forecast sequence: ∮1=ARMA(v,μ1); Where v is the cargo flow; μ1 is the model parameter of the ARMA model; Step S222: Input the cargo flow into the long short-term memory network (LSTM) model to obtain the second flow prediction sequence: Where RELU is the activation function; W t and b y is a trainable parameter; is the LSTM layer of the LSTM model; μ2 is the hidden layer parameter of the LSTM model; Step S223: Input the cargo flow into the distributed gradient boosting library XGBoost model to obtain the third flow prediction sequence: ∮3=XGBoost(ν,μ3); Where μ3 is the model parameter of the XGBoost model.

6. The method for collaborative optimization of ship scheduling and berth allocation based on demand forecasting according to claim 1, characterized in that: In step S4, a weighted method is used to convert the multi-objective problem into a single-objective problem. The expression of the objective function value Θ of the single-objective problem is: Θ=ω1C+ω2G; Where ω1 and ω2 are the weights assigned to the objective functions C and G respectively; C is the cost minimization objective function; G is the objective function for minimizing the total time the ship is in port.

7. The collaborative optimization method for ship scheduling and berth allocation based on demand forecasting according to claim 6 is characterized by: In step S4, the ant colony algorithm is used to solve the multi-objective collaborative optimization mathematical model, including: Step S41: Real-time ship information includes ship voyage information, and real-time berth information includes arriving ship information and berth attribute information. The probability of ship i being assigned to berth j is calculated, and the ship with the highest probability is assigned to berth j. The objective function value Θ of the assignment scheme is calculated. The expression for calculating the probability of ship i being assigned to berth j is: Where, τ(i,j) is the pheromone concentration of the probability that ship i is assigned to berth j; L g A collection of currently available ships; Step S42: randomly select a new ship for berth j and calculate the objective function value Θ of the new solution. If the objective function value of the new solution is less than the objective function value of the existing solution, the new solution is retained; otherwise, the existing solution is retained. Step S43: Repeat steps S41 to S42 until all berths are assigned ships; Step S44: Determine whether the iterative search times have reached the set search times. When the iterative search times are equal to the set search times, output the optimal allocation plan; otherwise, update and volatilize the pheromone concentration, and repeat steps S41 to S43 until the set search times are reached.

8. The method for collaborative optimization of ship scheduling and berth allocation based on demand forecasting according to claim 7, characterized in that: The method for updating and volatilizing the pheromone concentration in step S44 includes: Step S441: Update pheromone concentration τ(i,j): In the above formula, τ[(i,j)]2 and τ[(i,j)]1 are the pheromone concentrations before and after iteration respectively; △τ m (i, j) is the increment of pheromone concentration released by ant m; Θ m is the objective function value of the scheduling and berth allocation scheme constructed by ant m; Q is a constant; Step S442: After all pheromone concentrations are updated, the pheromone concentration is volatilized: [τ(i,j)]2←(1-ρ)[τ(i,j)]1; Where ρ is the set pheromone volatility coefficient.

Citation Information

Patent Citations

  • Self-adaptive time domain MPC ship-shore collaborative energy-saving collision-preventing berthing method and system

    CN115808879A

  • Computer system, and method for estimating time ship arrives in port

    WO2022091377A1