Simulation-based method for evaluating the carrying capacity of a ship to be locked
By constructing simulation models and various algorithms, the waiting capacity of ship locks is accurately evaluated, solving the problem that existing methods cannot accurately reflect actual operation. This optimizes ship lock scheduling, reduces waiting time and backlog, and promotes the efficient development of inland waterway transportation.
Patent Information
- Application Number
- CN202510235709.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-02-28
AI Technical Summary
Existing methods for evaluating the waiting capacity of ship locks rely on experience or simplified models, which cannot accurately reflect the actual operating conditions. This leads to prolonged waiting times and serious backlog problems for ships, making effective scheduling and management impossible.
A simulation-based method for evaluating the waiting capacity of ships in locks is adopted. By constructing a simulation model, agent-based modeling and simulation algorithms, hidden Markov models (HMMs), genetic algorithms, and Petri net models are used, combined with dynamic time warping distance and simulated annealing algorithms, to accurately evaluate the waiting capacity of locks and reasonably adjust the navigation frequency and evacuation of ships.
It enables accurate assessment of the lock waiting capacity, optimizes scheduling efficiency, reduces vessel waiting time, alleviates backlog problems, provides a scientific basis for decision-making, and improves inland waterway shipping efficiency.
Smart Images

Figure CN120145554B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lock waiting capacity, and in particular to a simulation-based method for evaluating the lock waiting capacity of ships. Background Technology
[0002] The insufficient throughput capacity of the dam hub to meet the demand for vessel passage leads to a large number of vessels waiting at the locks in the upstream and downstream waters. This exacerbates the contradiction between throughput capacity and passage demand, resulting in prolonged waiting times for many vessels in the lock's navigation scheduling area. Following the "first-come, first-served" navigation scheduling principle, vessels arriving later must wait for earlier vessels of the same type to pass through the locks. Therefore, the increased number of waiting vessels directly leads to longer waiting times. With the development of inland waterway shipping, the frequency of lock usage is constantly increasing, exacerbating the problem of vessel backlog. Existing methods for evaluating lock waiting capacity largely rely on experience or simplified models, failing to accurately reflect actual operating conditions and lacking adaptability to complex working conditions. Summary of the Invention
[0003] The main objective of this invention is to provide a simulation-based method for evaluating the waiting capacity of ships at locks. By establishing a simulation model, the waiting capacity of locks under different operating conditions can be accurately evaluated, providing a scientific basis for lock scheduling and management.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a simulation-based method for evaluating the waiting capacity of ships in locks, the method comprising:
[0005] S1. Collect lock operation data and preprocess the collected data;
[0006] S2. Based on the actual structure and operating rules of the lock, a model is constructed using agent-based modeling and simulation algorithms;
[0007] S3. Calculate the average daily parameters of vessels passing through the lock, the demand for passing through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity based on the collected data.
[0008] S4. Select historical lock operation data as verification samples, and adjust the model parameters by comparing the simulation results in S2 with the actual data in S3.
[0009] S5. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions, analyze the ship backlog, evaluate the lock waiting capacity, and adjust the lock navigation frequency reasonably based on the evaluation results.
[0010] S6. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions. Based on the number of ships waiting to pass through the lock under different working conditions, when the number of ships waiting to pass through the lock exceeds the carrying capacity, take timely measures to evacuate the ships waiting to pass through the lock.
[0011] In the preferred scheme, the lock operation data includes the type, number, tonnage, and passage time of the vessels.
[0012] In the preferred embodiment, the preprocessing step in step S1 includes:
[0013] A cluster-based outlier detection algorithm is used to identify and remove erroneous data and outliers. This algorithm uses a similarity measure between data points to identify data points that are far from the cluster as outliers.
[0014] A quantile-based normalization algorithm is used to normalize the data, mapping data of different magnitudes to a unified interval, thus providing accurate data for subsequent modeling.
[0015] In the preferred scheme, the simulation modeling in step S2 includes: a ship generation module, a scheduling module, and a lock passage module;
[0016] Ship generation module: Using a ship arrival prediction algorithm based on HMM model, it predicts the probability of ship arrival at different time periods based on the characteristics of ship arrival time series in historical data, and then randomly generates ship arrival events, where HMM is Hidden Markov Model;
[0017] Scheduling module: An optimized scheduling algorithm based on genetic algorithm is used to determine the gate passage priority;
[0018] Lock passage module: Utilizes a Petri net-based modeling algorithm for ship lock passage to accurately describe the complex process and resource consumption of ships entering and exiting the lock.
[0019] In the preferred scheme, the simulation modeling steps are as follows:
[0020] Ship generation module: Cleans historical ship arrival time series data, divides it into time intervals, and counts the number of ship arrivals within each interval; determines the number of states in the HMM model. Initialize the state transition probability matrix Observation probability matrix and initial state probability vector The HMM was trained using the Baum-Welch algorithm, and the forward variables were calculated. :
[0021] ;
[0022] ;
[0023] Backward variables :
[0024] ;
[0025] ;
[0026] Auxiliary variables :
[0027] ;
[0028] :
[0029] ;
[0030] And update the model parameters accordingly. , , Continue until the model parameters converge; use the trained HMM to predict the number of ships arriving at the next moment, and generate ship arrival events using a random number generator.
[0031] Scheduling module: Uses integer encoding to encode the ship scheduling plan into a format with a length equal to the number of ships. An integer array; randomly generated An initial scheduling scheme is used as the population; a fitness function is defined. :
[0032] ;
[0033] Calculate the fitness value for each scheduling scheme, where , , The weighting coefficients and , For the first The arrival time of the ship, For the first The service hours of the ship For the first Priority adjustment time for each ship; using a roulette wheel selection method, based on selection probability. :
[0034] ;
[0035] Select individuals, among whom For the first The fitness value of each individual; two individuals are randomly selected from the new population as parents, and crossover is performed using a partially matched crossover method. Then, individuals in the next generation population are subjected to mutation probabilities. The mutation operation is performed using the exchange mutation method; the fitness calculation, selection, crossover and mutation operations are repeated until the termination condition of maximum number of iterations or population fitness value convergence is met, and the optimal ship scheduling order is obtained.
[0036] Lock passage module: Based on the actual structure and operating rules of the lock, determine the locations, transitions, and connections of the Petri net; set initial location markers; define transition triggering rules and change the number of location markers according to the rules; construct a reachability graph for resource utilization analysis; define performance indicators and calculate the average waiting time. :
[0037] ;
[0038] in For the first The waiting time of the ships in the waiting area To count the total number of ships passing through the lock within a given time period; to calculate the lock utilization rate. :
[0039] ;
[0040] in To calculate the total duration of the time period, For a moment The lock's operational status and usage. During free time To evaluate the efficiency of the lock passage process.
[0041] In the preferred scheme, step S3, which involves calculating the average daily parameters of vessels passing through the lock, the demand for passage through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity, is as follows:
[0042] Calculate the average daily demand for vessels passing through the locks: If the number of vessels passing through the locks year-round is M2, then the average daily demand for vessels passing through the locks is... voyages, Let be the lock passage cycle for the j-th vessel; the number of newly added vessels waiting to pass through the lock on day i is . The total number of ships waiting to pass through the lock is The ship passage capacity on day i is The maintenance period of 1 day resulted in an increase in the lock passage cycle for subsequent ships. On day i, the demand for ships passing through the two dam locks is [number]. Shipments;
[0043] Estimate the demand for passage through the lock and the number of vessels waiting to pass: (The following is a list of numbers and likely related to The demand for passage through the gate , No. The number of newly added waiting vessels at the lock , No. Number of ships waiting to pass through locks ;
[0044] In the formula For the gate passage demand on day i, Let be the number of ships waiting to pass through the lock on day i. This represents the number of newly added vessels waiting to pass through the lock on day i.
[0045] in For seasonal factors of gate passage demand, For the first The ship's ability to pass through the sky, For the first Number of ships waiting to pass through the locks per day The iterative convergence condition is ;
[0046] Calculating the lock's throughput capacity: For multi-line locks, where the total throughput capacity is... The number of locks that did not stop navigation was , No. The lock's throughput capacity , of which The daily number of lock operations for the non-stop navigation locks is On average, the number of ships passing through each lock is [number]. , This is the relevant correction factor.
[0047] In the preferred embodiment, the model verification step in step S4, based on the calculated data described above, is as follows:
[0048] A similarity metric method based on dynamic time warping distance was used to compare simulation results with actual data;
[0049] If the similarity does not meet the preset threshold, the model parameters are adjusted using the simulated annealing algorithm and the model is re-verified until the model accuracy meets the standard.
[0050] Simulated annealing algorithm searches for the global optimum in the solution space by simulating the physical annealing process, thus avoiding getting trapped in local optima.
[0051] In the preferred embodiment, the model verification step in step S4 is as follows:
[0052] Data preparation and simulation operation: Select representative time period data covering various operating conditions from the historical lock operation database as verification samples, input them into the constructed simulation model, run the model and record the simulation output results such as the ship passage time series and the daily waiting ship number series;
[0053] Similarity metric based on dynamic time warping distance: for simulated and actual ship lock passage time series , Construct the distance matrix , Initialize the cumulative distance matrix , , hour , hour , and hour DTW distance ; Calculate the DTW distance between the simulated and actual sequences of ships waiting to enter the lock using the same method; set a similarity threshold. If the calculated DTW distance is greater than If the similarity requirement is not met, then the similarity is deemed not to be satisfactory.
[0054] Model parameter adjustment based on simulated annealing algorithm: Determine the model parameters that need to be adjusted;
[0055] Among them, the average interval between ship arrivals Standard deviation Shape parameters of gate passage time distribution Scale parameters ;
[0056] Define the objective function ,in It is the DTW distance between the simulated and actual ship lock passage times. It is the DTW distance between the simulated and actual number of ships waiting in the lock. , It is a weighting coefficient and ;
[0057] Set initial temperature Cooling coefficient and termination temperature At the current temperature Next, randomly generate new model parameter values and calculate the objective function values under the new and old parameters. , Calculate the acceptance probability ,like or random number Less than If the new parameter value is not found, the new value will be accepted; otherwise, the current value will be retained. The temperature will be lowered. ,when Stop iteration; rerun the simulation model with the adjusted parameters, recalculate the DTW distance and compare it with the threshold. If the simulation results do not meet the requirements, adjustments are made until the similarity between the simulation results and the actual data reaches a preset threshold.
[0058] In the preferred scheme, the steps of analyzing the backlog of ships and assessing the lock waiting capacity include iterative calculation of the number of ships waiting to pass through and evaluation of the waiting capacity.
[0059] Iterative calculation of the number of vessels waiting to pass through the lock: Given the number of vessels waiting to pass through the lock and the lock passage demand data, the formula for estimating the number of vessels waiting to pass through the lock is iteratively calculated to estimate the number of vessels waiting to pass through the lock at a certain time.
[0060] Evaluation of lock holding capacity: Different working conditions are set in the verified simulation model to simulate the impact of different maintenance durations and different frequencies and durations of severe weather on the lock.
[0061] A method combining Latin hypercube sampling and Bayesian network was used to repeatedly simulate each working condition to obtain a large amount of sample data.
[0062] Latin hypercube sampling can reduce the number of samplings while ensuring sample representativeness, while Bayesian networks are used to analyze the causal relationship between various operating conditions and the number of ships backlogged.
[0063] By analyzing the changing trends, peak values, and average statistical characteristics of the number of backlogged ships in these data, the waiting capacity of the locks under different operating conditions can be assessed, providing a basis for decision-making in lock scheduling and management.
[0064] In the preferred scheme, the steps for evaluating the lock's waiting capacity are as follows:
[0065] Iterative calculation of the number of vessels waiting to enter the lock: Determine the initial number of vessels waiting to enter the lock. Number of ships passing through the locks year-round Seasonal factors of gate passage demand The lock passage cycle for each vessel Daily number of lock cycles for each lock that is not currently in operation within the multi-line lock system. Average number of ships passing through each lock and correction factor ;
[0066] According to the formula Calculate the first The demand for passage through the gate on that day, among which The maintenance work will increase the number of days required for ships to pass through the locks later. For relevant parameters; based on the formula Calculate the first The number of newly added vessels waiting to pass through the locks, of which , The number of locks that did not stop navigation; according to the formula from Start iterative calculations until the preset period is reached, and obtain the number of ships waiting to pass through the lock each day during that period;
[0067] Waiting capacity assessment: Determine the operating factors affecting the waiting capacity of the lock;
[0068] Among them, the maintenance time of the lock Frequency of severe weather Duration of severe weather The range of values for each factor is divided into: There are three non-overlapping intervals, each with a probability of . Sample values are randomly drawn from each interval to form One sample point;
[0069] Based on knowledge and experience of lock operation, determine the correlation between various operating conditions and the number of ships in backlog. A Bayesian network is constructed based on the causal relationship structure. Using historical data and sampled data, the conditional probability distribution of each node in the Bayesian network is calculated using maximum likelihood estimation or Bayesian estimation methods. ;
[0070] The sample points obtained from the sampling are sequentially input into the verified simulation model. The simulation model is run multiple times for each sample point and the number of ships backlog is recorded.
[0071] The statistical characteristics of the changing trend, peak value, and mean value of the number of ships backlogged in each simulation are calculated. Bayesian network analysis is used to analyze the degree of influence of various operating conditions on the number of ships backlogged. The waiting capacity of the lock under different operating conditions is comprehensively evaluated to provide a basis for decision-making for lock scheduling and management.
[0072] This invention provides a simulation-based method for evaluating the waiting capacity of ships in locks. This method, by constructing a simulation model and employing various algorithms, achieves accurate assessment of the waiting capacity of locks, and has significant advantages in lock operation and management.
[0073] In the data processing and model building phase, comprehensive lock operation data was collected and preprocessed, and agent-based modeling and simulation algorithms were used to build the model. Specifically, the ship generation module utilizes a ship arrival prediction algorithm based on Hidden Markov Models (HMMs) to accurately capture the time-series characteristics of ship arrivals and randomly generate ship arrival events, which is more realistic than traditional methods. The scheduling module employs an optimization scheduling algorithm based on genetic algorithms, comprehensively considering multiple factors to determine lock passage priorities and iteratively finding the optimal scheduling order, effectively improving lock scheduling efficiency. The lock passage module utilizes a Petri net-based ship passage process modeling algorithm to clearly depict the ship passage process and resource occupancy, providing strong support for analyzing the lock's operational status.
[0074] In the model validation and parameter adjustment stages, historical lock operation data was selected as validation samples. A similarity measurement method based on dynamic time warping (DTW) distance was used to compare the simulation results with the actual data. This effectively addresses the issue of inconsistent time series lengths and accurately measures the degree of similarity between the two. If the similarity does not meet the preset threshold, the model parameters are adjusted using a simulated annealing algorithm to avoid getting trapped in local optima, ensuring model accuracy and enabling the model to more accurately reflect the actual operation of the lock.
[0075] In evaluating the lock's waiting capacity, an iterative method for calculating the number of vessels waiting to pass through the lock accurately estimates the number of vessels waiting at a given time by using formulas that consider various practical factors. A method combining Latin hypercube sampling and Bayesian networks is employed to simulate different operating conditions. Latin hypercube sampling reduces the number of samplings while ensuring sample representativeness, while Bayesian networks are used to analyze the causal relationship between various operating conditions and the number of vessels in the backlog. By analyzing the statistical characteristics of the changing trends, peak values, and mean values of the number of vessels in the backlog from a large sample dataset, the lock's waiting capacity under different operating conditions can be comprehensively evaluated. This provides a scientific and reliable basis for lock scheduling and management, helps to rationally arrange lock maintenance plans, cope with the impact of severe weather, improve the overall operating efficiency of the lock, alleviate vessel backlog problems, and promote the efficient development of inland waterway transportation. Attached Figure Description
[0076] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0077] Figure 1 This is a main view structural diagram of the cleaning process of this invention; Detailed Implementation
[0078] Example 1
[0079] like Figure 1 As shown, a simulation-based method for evaluating the waiting capacity of ships in locks is proposed. This method includes:
[0080] S1. Collect lock operation data and preprocess the collected data;
[0081] S2. Based on the actual structure and operating rules of the lock, a model is constructed using agent-based modeling and simulation algorithms;
[0082] S3. Calculate the average daily parameters of vessels passing through the lock, the demand for passing through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity based on the collected data.
[0083] S4. Select historical lock operation data as verification samples, and adjust the model parameters by comparing the simulation results in S2 with the actual data in S3.
[0084] S5. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions, analyze the ship backlog, evaluate the lock waiting capacity, and adjust the lock navigation frequency reasonably based on the evaluation results.
[0085] S6. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions. Based on the number of ships waiting to pass through the lock under different working conditions, when the number of ships waiting to pass through the lock exceeds the carrying capacity, take timely measures to evacuate the ships waiting to pass through the lock.
[0086] The simulation-based method for evaluating the waiting capacity of locks provided by this invention has significant advantages in lock operation and management.
[0087] Accurate Assessment and Prediction: During the data processing and model building phases, comprehensive lock operation data is collected and preprocessed. Agent-based modeling and simulation algorithms are used to construct the model. The ship generation module utilizes a ship arrival prediction algorithm based on Hidden Markov Models (HMMs) to accurately capture the time-series characteristics of ship arrivals and randomly generate ship arrival events, which is more realistic than traditional methods. The scheduling module employs an optimization scheduling algorithm based on genetic algorithms, comprehensively considering multiple factors to determine lock passage priorities and iteratively finding the optimal scheduling order to improve lock scheduling efficiency. The lock passage module utilizes a Petri net-based ship passage process modeling algorithm to clearly depict the ship passage process and resource occupancy, providing strong support for analyzing the lock's operational status. The model constructed using these algorithms, combined with model validation and parameter adjustment, can accurately assess the lock's waiting capacity and effectively predict the capacity change trends under different operating conditions.
[0088] Optimizing navigation scheduling: In the model validation and parameter adjustment stages, historical lock operation data is selected as validation samples. A similarity measurement method based on Dynamic Time Warping (DTW) distance is used to compare simulation results with actual data, effectively handling the problem of inconsistent time series lengths and accurately measuring the degree of similarity between the two. If the similarity does not meet the preset threshold, simulated annealing algorithm is used to adjust model parameters to avoid getting trapped in local optima, ensuring model accuracy and enabling the model to more accurately reflect the actual operation of the lock. Based on accurate evaluation and prediction results, the lock navigation frequency can be reasonably adjusted to maximize navigation efficiency and reduce vessel waiting time and backlog while ensuring the safe operation of the lock.
[0089] Scientific Decision Support: In evaluating the lock's waiting capacity, an iterative method for calculating the number of vessels waiting to pass through the lock is employed. This method uses formulas that consider various practical factors to perform iterative calculations, accurately estimating the number of vessels waiting to pass through at a given time. A combination of Latin hypercube sampling and Bayesian networks is used to simulate different operating conditions. Latin hypercube sampling reduces the number of sampling iterations while ensuring sample representativeness, while Bayesian networks are used to analyze the causal relationship between various operating condition factors and the number of vessels in the queue. By analyzing the statistical characteristics of the changing trends, peak values, and mean values of the number of vessels in the queue from a large sample dataset, the lock's waiting capacity under different operating conditions is comprehensively evaluated. This provides a scientific and reliable basis for lock scheduling and management, helping to rationally plan lock maintenance, cope with the impact of severe weather, and promote the efficient development of inland waterway transportation.
[0090] In the preferred scheme, the lock operation data includes the type, number, tonnage, and passage time of the vessels.
[0091] In the preferred embodiment, the preprocessing step in step S1 includes:
[0092] A cluster-based outlier detection algorithm is used to identify and remove erroneous data and outliers. This algorithm uses a similarity measure between data points to identify data points that are far from the cluster as outliers.
[0093] A quantile-based normalization algorithm is used to normalize the data, mapping data of different magnitudes to a unified interval, thus providing accurate data for subsequent modeling.
[0094] Example 2
[0095] Further explanation in conjunction with Example 1, such as Figure 1 The structure shown in step S2 includes the following simulation modeling: ship generation module, scheduling module, and lock passage module.
[0096] Ship generation module: Using a ship arrival prediction algorithm based on HMM model, it predicts the probability of ship arrival at different time periods based on the characteristics of ship arrival time series in historical data, and then randomly generates ship arrival events, where HMM is Hidden Markov Model;
[0097] Scheduling module: An optimized scheduling algorithm based on genetic algorithm is used to determine the gate passage priority;
[0098] Lock passage module: Utilizes a Petri net-based modeling algorithm for ship lock passage to accurately describe the complex process and resource consumption of ships entering and exiting the lock.
[0099] In the preferred scheme, the simulation modeling steps are as follows:
[0100] Ship generation module: Cleans historical ship arrival time series data, divides it into time intervals, and counts the number of ship arrivals within each interval; determines the number of states in the HMM model. Initialize the state transition probability matrix Observation probability matrix and initial state probability vector The HMM was trained using the Baum-Welch algorithm, and the forward variables were calculated. :
[0101] ;
[0102] ;
[0103] Backward variables :
[0104] ;
[0105] ;
[0106] Auxiliary variables :
[0107] ;
[0108] :
[0109] ;
[0110] And update the model parameters accordingly. , , Continue until the model parameters converge; use the trained HMM to predict the number of ships arriving at the next moment, and generate ship arrival events using a random number generator.
[0111] Scheduling module: Uses integer encoding to encode the ship scheduling plan into a format with a length equal to the number of ships. An integer array; randomly generated An initial scheduling scheme is used as the population; a fitness function is defined. :
[0112] ;
[0113] Calculate the fitness value for each scheduling scheme, where , , The weighting coefficients and , For the first The arrival time of the ship, For the first The service hours of the ship For the first Priority adjustment time for each ship; using a roulette wheel selection method, based on selection probability. :
[0114] ;
[0115] Select individuals, among whom For the first The fitness value of each individual; two individuals are randomly selected from the new population as parents, and crossover is performed using a partially matched crossover method. Then, individuals in the next generation population are subjected to mutation probabilities. The mutation operation is performed using the exchange mutation method; the fitness calculation, selection, crossover and mutation operations are repeated until the termination condition of maximum number of iterations or population fitness value convergence is met, and the optimal ship scheduling order is obtained.
[0116] Lock passage module: Based on the actual structure and operating rules of the lock, determine the locations, transitions, and connections of the Petri net; set initial location markers; define transition triggering rules and change the number of location markers according to the rules; construct a reachability graph for resource utilization analysis; define performance indicators and calculate the average waiting time. :
[0117] ;
[0118] in For the first The waiting time of the ships in the waiting area To count the total number of ships passing through the lock within a given time period; to calculate the lock utilization rate. :
[0119] ;
[0120] in To calculate the total duration of the time period, For a moment The lock's operational status and usage. During free time To evaluate the efficiency of the lock passage process.
[0121] Detailed algorithm for step S2:
[0122] 1. Ship Generation Module
[0123] Data preprocessing: Clean the historical ship arrival time series data to remove outliers and erroneous data. Divide the time series into certain time intervals (e.g., 1 hour) and count the number of ships arriving in each interval.
[0124] Model initialization: Determine the number of states in the Hidden Markov Model (HMM) Assuming that the arrival status of ships is divided into three states: "low flow", "medium flow", and "high flow", that is... Initialize the state transition probability matrix. , Indicates from state Transition to state The probability, ,like:
[0125] ;
[0126] Initialize the observation probability matrix , Indicates the state The number of ships arriving observed below is The probability, , The possible number of arriving ships is determined through statistical analysis of historical data. Specifically, it is assumed that under "low flow" conditions, the probability of observing 0 ships arriving is 0.8, the probability of 1 ship arriving is 0.2, etc. An initial state probability vector is initialized. , Indicates the initial state. The probability, Assume that the probability of being in a "low flow" state is 0.6, the probability of being in a "medium flow" state is 0.3, and the probability of being in a "high flow" state is 0.1.
[0127] Model Training: The HMM was trained using the Baum-Welch algorithm. This algorithm is an iterative algorithm based on expectation-maximization (EM), which continuously updates the model parameters. , and This maximizes the probability that the model will generate the observed data. In each iteration, the forward variables are calculated first. and backward variables .
[0128] Forward variables:
[0129] ;
[0130] ;
[0131] in, It is a moment The number of ships arriving observed. It is the length of the time series. The forward variable is used to calculate the time series at time 1. In state And observed the front The probability of each data point.
[0132] Backward variables:
[0133] ;
[0134] ;
[0135] The backward variable is used to calculate at time t. In state And observed from arrive The probability of the data.
[0136] Calculate auxiliary variables based on forward and backward variables. and :
[0137] ;
[0138] ;
[0139] Indicates at time In state The probability, Indicates at time From state Transition to state The probability of [the outcome]. The model parameters are updated using these auxiliary variables:
[0140] ;
[0141] ;
[0142] ;
[0143] Repeat the above training steps until the model parameters converge, that is, the parameter changes are less than a certain preset threshold.
[0144] Ship Arrival Prediction and Generation: Using a trained Hidden Markov Model (HMM), the state at the next moment is predicted based on the current state and state transition probabilities. Then, the number of ships arriving at the next moment is predicted based on the observation probability matrix. For example, if the current state is "medium flow," the state transition probability matrix predicts a high probability of transitioning to "high flow" at the next moment. Combining this with the observation probability matrix for the "high flow" state, it is predicted that three ships may arrive at the next moment. Based on the prediction results, a random number generator is used to generate ship arrival events. Assuming three ships are predicted to arrive at the next moment, a uniformly distributed random number generator is used to generate three ship arrival time points within a certain time range.
[0145] The formulas for calculating forward and backward variables in the Baum-Welch algorithm are used to calculate the probability of being in different states at different times, providing a basis for subsequent updates to model parameters. Auxiliary variables... and The calculation formula is used to statistically determine the probabilities of different states and state transitions, and then update the state transition probability matrix. Observation probability matrix and initial state probability vector This allows the model to more accurately reflect the characteristics of ship arrival time series. Finally, by using the predicted number of ship arrivals and a random number generator, the random generation of ship arrival events based on the Hidden Markov Model (HMM) is achieved.
[0146] 2. Scheduling Module
[0147] Algorithm Steps: Encoding Scheme Design: Encode the ship scheduling scheme using integer encoding. Assume there are a total of A ship, using a length of An integer array represents the scheduling order, where each element is a ship number, and each number appears only once in the array. For example, there are 5 ships, and the code [3, 1, 4, 2, 5] indicates that the 3rd ship is the first to pass through the lock, the 1st ship is the second, and so on.
[0148] Population initialization: Randomly generated An initial scheduling scheme is used as the population. For population size, such as Each scheduling scheme is an array of integers that conforms to the encoding rules.
[0149] Fitness calculation: Define a fitness function to evaluate the merits of each scheduling scheme. Consider factors such as ship type, tonnage, and arrival time to construct the fitness function. :
[0150] ;
[0151] in, It is the first The arrival time of the ship, It is the first Service time per ship (related to ship type and tonnage, with large cargo ships having longer service times and small passenger ships having shorter service times). It is the first The priority adjustment time for each ship (can be determined based on factors such as the urgency of the cargo being transported by the ship). , , These are weighting coefficients, determined through analysis of historical data and expert experience, and Calculate the fitness value for each scheduling scheme; a lower fitness value indicates a better scheduling scheme.
[0152] Selection operation: Individuals are selected from the population using the roulette wheel selection method. The selection probability of each individual is calculated. :
[0153] ;
[0154] in, It is the first The fitness value of each individual is used. Based on the selection probability, a random number generator is used to select individuals. Individuals with lower fitness values have a higher probability of being selected. The selected individuals are then placed into the new population.
[0155] Crossover operation: Two individuals are randomly selected from the new population as parents, and the partial matching crossover (PMX) method is used for crossover. Specifically, parent individuals A = [1, 2, 3, 4, 5] and B = [5, 4, 3, 2, 1] are selected. Two crossover points are randomly chosen, assuming they are 2 and 4. The portions of the two parent individuals between these crossover points are swapped, resulting in offspring individuals A' and B'. Then, by resolving conflicts (ensuring that each ship number appears only once in the offspring), the final offspring individuals are obtained. These offspring individuals are then added to the next generation of the population.
[0156] Mutation operation: Mutation operations are performed on individuals in the next generation of the population, using a crossover mutation method. A certain mutation probability is applied. (like Select an individual, randomly select two positions from the individual, and swap the ship numbers at these two positions. For example, if the individual is [1, 2, 3, 4, 5], and positions 2 and 4 are selected for mutation, the mutated individual will be [1, 4, 3, 2, 5].
[0157] Iterative optimization: Repeatedly calculate fitness, select, crossover, and mutate until a termination condition is met. The termination condition can be the maximum number of iterations (e.g., 100 iterations) or the convergence of the population's fitness values (e.g., the change in the optimal fitness value of the population is less than a certain threshold for 10 consecutive generations). The optimal individual obtained at the end is the optimal ship scheduling order.
[0158] fitness function By comprehensively considering factors such as ship arrival time, service time, and priority adjustment time, and weighting different factors using weighting coefficients, the advantages and disadvantages of scheduling schemes can be fully evaluated. A probability calculation formula is selected. The fitness value determines the probability of each individual being selected, thus implementing a fitness-based selection operation. This ensures that better scheduling schemes have a higher probability of being selected for the next generation of the population. These formulas work together, and through iterative optimization using a genetic algorithm, the optimal ship scheduling order is found, achieving efficient scheduling.
[0159] 3. Gate crossing module
[0160] Algorithm Steps: Petri Net Model Construction: Based on the actual structure and operating rules of the lock, determine the elements of the Petri net. Define places, such as "ship waiting area," "lock idle," and "ship passing through the lock," representing the position or resource status of ships in different states. Define transitions, such as "ship entering the lock" and "ship leaving the lock," representing state transition events. Determine the connection relationships between places and transitions, and draw the Petri net model. Set an initial token for each place, representing the number of ships or resource status in each state at the initial moment. The initial token for the "ship waiting area" place is 0, and the initial token for the "lock idle" place is 1, indicating that the lock is initially idle and there are no ships waiting.
[0161] State transition rules: The triggering rules for transitions are defined according to the lock operation logic. Specifically, the "Vessel Entering Lock" transition can be triggered when there is a vessel in the "Vessel Waiting Area" (marked in the storage area) and the "Lock Idle" (marked in the storage area). After the transition is triggered, the number of marks in the storage areas changes according to preset rules. For example, if the "Vessel Entering Lock" transition is triggered, the number of marks in the "Vessel Waiting Area" storage area decreases by 1, the number of marks in the "Lock Idle" storage area decreases by 1, and the number of marks in the "Vessel Passing Through Lock" storage area increases by 1, indicating that a vessel has entered the lock from the waiting area and begun passing through.
[0162] Resource occupancy analysis: Reachability analysis using Petri nets is employed to study the occupancy of lock resources. A reachability graph is a directed graph describing all possible states of a Petri net. By constructing the reachability graph, the occupancy status of lock resources (such as lock chamber space and equipment) at different times can be analyzed. Specifically, the reachability graph can determine how many ships are currently using lock resources and how many are waiting to use them at a given time.
[0163] Performance metric calculation: Define performance metrics to evaluate the efficiency of the lock passage process. This includes calculating the average waiting time. :
[0164] ;
[0165] in, It is the first The waiting time of the ships in the waiting area This represents the total number of vessels passing through the locks within a given time period. By simulating the Petri net model, the waiting time for each vessel is recorded, and the average waiting time is calculated. Lock utilization rate can also be calculated. :
[0166] ;
[0167] in, It is the total duration of the statistical period. It is a moment The lock's operational status (in use) During free time By simulating the Petri net model at different time periods, the usage time of the locks is statistically analyzed, thereby calculating the lock utilization rate.
[0168] Average waiting time formula The lock utilization rate is used to measure the average waiting time of ships in the lock waiting area, reflecting the impact of lock scheduling on ship waiting time, and is one of the important indicators for evaluating lock operating efficiency. Lock utilization rate formula This method is used to calculate the utilization rate of locks over a certain period of time, providing a clear picture of the lock resource utilization and helping to analyze whether lock resources are being fully utilized or experiencing over-congestion. Through Petri net models and these formulas, the complex process of ships entering and exiting locks and the resource consumption can be accurately described, providing a basis for optimizing lock operation.
[0169] Example 3
[0170] Further explanation in conjunction with Example 1, such as Figure 1 The structure shown in the figure, step S3, involves calculating the average daily parameters of vessels passing through the lock, the demand for passage through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity.
[0171] Calculate the average daily demand for vessels passing through the locks: If the number of vessels passing through the locks year-round is M2, then the average daily demand for vessels passing through the locks is... voyages, Let be the lock passage cycle for the j-th vessel; the number of newly added vessels waiting to pass through the lock on day i is . The total number of ships waiting to pass through the lock is The ship passage capacity on day i is The maintenance period of 1 day resulted in an increase in the lock passage cycle for subsequent ships. On day i, the demand for ships passing through the two dam locks is [number]. Shipments;
[0172] Estimate the demand for passage through the lock and the number of vessels waiting to pass: (The following is a list of numbers and likely related to The demand for passage through the gate , No. The number of newly added waiting vessels at the lock , No. Number of ships waiting to pass through locks ;
[0173] In the formula For the gate passage demand on day i, Let be the number of ships waiting to pass through the lock on day i. This represents the number of newly added vessels waiting to pass through the lock on day i.
[0174] in For seasonal factors of gate passage demand, For the first The ship's ability to pass through the sky, For the first Number of ships waiting to pass through the locks per day The iterative convergence condition is ;
[0175] Calculating the lock's throughput capacity: For multi-line locks, where the total throughput capacity is... The number of locks that did not stop navigation was , No. The lock's throughput capacity , of which The daily number of lock operations for the non-stop navigation locks is On average, the number of ships passing through each lock is [number]. , This is the relevant correction factor.
[0176] In the preferred embodiment, the model verification step in step S4, based on the calculated data described above, is as follows:
[0177] A similarity metric method based on dynamic time warping distance was used to compare simulation results with actual data;
[0178] If the similarity does not meet the preset threshold, the model parameters are adjusted using the simulated annealing algorithm and the model is re-verified until the model accuracy meets the standard.
[0179] Simulated annealing algorithm searches for the global optimum in the solution space by simulating the physical annealing process, thus avoiding getting trapped in local optima.
[0180] Assuming the number of vessels passing through the locks year-round is M2, then the average daily demand for vessels passing through the locks is... (ships) Let be the lock passage cycle for the j-th vessel. Let the number of newly added vessels waiting to pass through the lock on day i be . The total number of ships waiting to pass through the lock is The ship passage capacity on day i is The maintenance period of 1 day resulted in an increase in the lock passage cycle for subsequent ships. On day i, the demand for ships passing through the two dam locks is [number]. Shipments.
[0181] According to the operational principles of ship locks, the total number of vessels waiting to pass through on a given day is equal to the sum of the number of vessels waiting to pass through on the previous day and the difference between the current day's demand and the available capacity. Taking into account factors such as the selected period (season), the demand for passage through the locks and the number of vessels waiting to pass through on day i can be estimated using the following formula:
[0182] (1)
[0183] In the formula For the gate passage demand on day i, Let be the number of ships waiting to pass through the lock on day i. This represents the number of newly added vessels waiting to pass through the lock on day i. Let M be the ship passage capacity on day i, M be the number of ships passing through the lock throughout the year, and g be the seasonal factor of lock passage demand.
[0184] It can be seen from equation (1) that the number of ships waiting to pass through the lock The iterative convergence condition is This means that when the ship passage capacity is comparable to the lock passage demand, the number of ships waiting to pass through the lock will stabilize at a certain value.
[0185] 3. Given the initial conditions, iteratively calculate equation (1) to estimate the number of ships waiting to enter the lock at a certain time. The multi-line lock has a total of L lines, and the number of locks not currently in operation is L-1, where the daily number of lock operations for the k-th lock not currently in operation is... On average, the number of ships passing through each lock is [number]. Then the lock throughput capacity on day i can be expressed as (2).
[0186] (2).
[0187] Example 4
[0188] Further explanation in conjunction with Example 1, such as Figure 1 The model verification step in step S4 of the structure shown is as follows:
[0189] Data preparation and simulation operation: Select representative time period data covering various operating conditions from the historical lock operation database as verification samples, input them into the constructed simulation model, run the model and record the simulation output results such as the ship passage time series and the daily waiting ship number series;
[0190] Similarity metric based on dynamic time warping distance: for simulated and actual ship lock passage time series , Construct the distance matrix , Initialize the cumulative distance matrix , , hour , hour , and hour DTW distance ; Calculate the DTW distance between the simulated and actual sequences of ships waiting to enter the lock using the same method; set a similarity threshold. If the calculated DTW distance is greater than If the similarity requirement is not met, then the similarity is deemed not to be satisfactory.
[0191] Model parameter adjustment based on simulated annealing algorithm: Determine the model parameters that need to be adjusted;
[0192] Among them, the average interval between ship arrivals Standard deviation Shape parameters of gate passage time distribution Scale parameters ;
[0193] Define the objective function ,in It is the DTW distance between the simulated and actual ship lock passage times. It is the DTW distance between the simulated and actual number of ships waiting in the lock. , It is a weighting coefficient and ;
[0194] Set initial temperature Cooling coefficient and termination temperature At the current temperature Next, randomly generate new model parameter values and calculate the objective function values under the new and old parameters. , Calculate the acceptance probability ,like or random number Less than If the new parameter value is not found, the new value will be accepted; otherwise, the current value will be retained. The temperature will be lowered. ,when Stop iteration; rerun the simulation model with the adjusted parameters, recalculate the DTW distance and compare it with the threshold. If the simulation results do not meet the requirements, adjustments are made until the similarity between the simulation results and the actual data reaches a preset threshold.
[0195] Step S4 Explanation:
[0196] 1. Data preparation and simulation execution
[0197] Representative time periods are selected from the historical lock operation database as validation samples to ensure coverage of various operating conditions, including different seasons and flow rates. This data should include key information such as vessel passage time, daily waiting vessel count, and actual vessel passage number. The prepared historical data is then input into the simulation model built in step S2. The simulation model is run to simulate the lock's operation during the corresponding historical time periods, and the simulation output, including the vessel passage time series and the daily waiting vessel count series, is recorded.
[0198] This step mainly involves data processing and model execution, without the application of specific mathematical formulas. Its purpose is to provide simulation data for subsequent comparative analysis, comparing it with actual historical data to evaluate the accuracy of the model.
[0199] 2. Similarity measure based on Dynamic Time Warping (DTW) distance
[0200] For the simulated ship lock passage time series Ship lock passage time series in actual historical data ( and (may differ), build a Distance matrix ,in , indicating the first in the simulation sequence The time point and the th time in the actual sequence The absolute value of the difference at each time point. Initialize a Cumulative distance matrix , ,for , ;for , .for and , DTW distance The DTW distance between the simulated sequence of vessels waiting to enter the lock and the actual sequence of vessels waiting to enter the lock is calculated using the same method. A similarity threshold is then set. (Where $0.5$ can be adjusted according to the actual situation), if the calculated DTW distance is greater than If the simulation results do not meet the requirements for similarity with the actual data, the model parameters need to be adjusted.
[0201] Off-matrix Calculation formula Used to measure the degree of difference between corresponding time points in two time series. Cumulative distance matrix The calculation formula, using the concept of dynamic programming, progressively calculates the minimum cumulative distance from the starting point to the current point while considering different path choices. The final DTW distance is then calculated. It can comprehensively reflect the overall similarity of two time series on the time axis, and can effectively measure even if their lengths are different, helping to determine the degree of matching between simulation results and actual data.
[0202] 3. Model parameter tuning based on simulated annealing algorithm
[0203] Identify the model parameters that need adjustment, such as the mean of ship arrival intervals. and standard deviation Shape parameters of gate passage time distribution and scale parameters (Assuming the gate passage time follows a Weibull distribution), etc. Define the objective function. Based on DTW distance, ,in It is the DTW distance between the simulated and actual ship lock passage times. It is the DTW distance between the simulated and actual number of ships waiting in the lock. and It is the weighting coefficient (where , (Set according to the degree of attention paid to different indicators), and Set the initial temperature. (e.g., $100), cooling coefficient (e.g., $0.95) and termination temperature (like At the current temperature Next, a new set of model parameter values is randomly generated, and the objective function values of the simulation results and actual data under the new parameters are calculated. and the objective function value under the current parameters Calculate the acceptance probability. ,like or random number Less than If the new parameter values are found, accept them; otherwise, retain the current parameter values. Lower the temperature. ,when Stop the iteration when the time is right; the model parameters obtained at this point are the adjusted parameters. Rerun the simulation model using the adjusted parameters, and recalculate the DTW distance and threshold. If the simulation still does not meet the requirements, the parameters of the simulated annealing algorithm will be adjusted until the similarity between the simulation results and the actual data reaches the preset threshold.
[0204] objective function By using weighted DTW distance, which comprehensively considers two key indicators—vessel passage time and the number of vessels waiting to pass through the lock—the model can fully assess the degree of difference between the model and actual data. Acceptance probability formula. Based on the Boltzmann distribution, in the early stages of the algorithm, a higher temperature... This ensures that even if a new solution is worse, there is a certain probability of acceptance, avoiding getting trapped in local optima. As the temperature decreases, the probability of accepting a worse solution gradually decreases, and the algorithm gradually converges to the global optimum or a near-global optimum. By continuously adjusting the model parameters and evaluating the objective function value, the model more accurately reflects the actual operation of the lock.
[0205] Example 5
[0206] Further explanation in conjunction with Example 1, such as Figure 1 The structure shown is analyzed to assess the ship backlog situation and evaluate the lock waiting capacity. The steps include iterative calculation of the number of ships waiting to pass and evaluation of the waiting capacity.
[0207] Iterative calculation of the number of vessels waiting to pass through the lock: Given the number of vessels waiting to pass through the lock and the lock passage demand data, the formula for estimating the number of vessels waiting to pass through the lock is iteratively calculated to estimate the number of vessels waiting to pass through the lock at a certain time.
[0208] Evaluation of lock holding capacity: Different working conditions are set in the verified simulation model to simulate the impact of different maintenance durations and different frequencies and durations of severe weather on the lock.
[0209] A method combining Latin hypercube sampling and Bayesian network was used to repeatedly simulate each working condition to obtain a large amount of sample data.
[0210] Latin hypercube sampling can reduce the number of samplings while ensuring sample representativeness, while Bayesian networks are used to analyze the causal relationship between various operating conditions and the number of ships backlogged.
[0211] By analyzing the changing trends, peak values, and average statistical characteristics of the number of backlogged ships in these data, the waiting capacity of the locks under different operating conditions can be assessed, providing a basis for decision-making in lock scheduling and management.
[0212] In the preferred scheme, the steps for evaluating the lock's waiting capacity are as follows:
[0213] Iterative calculation of the number of vessels waiting to enter the lock: Determine the initial number of vessels waiting to enter the lock. Number of ships passing through the locks year-round Seasonal factors of gate passage demand The lock passage cycle for each vessel Daily number of lock cycles for each lock that is not currently in operation within the multi-line lock system. Average number of ships passing through each lock and correction factor ;
[0214] According to the formula Calculate the first The demand for passage through the gate on that day, among which The maintenance work will increase the number of days required for ships to pass through the locks later. For relevant parameters; based on the formula Calculate the first The number of newly added vessels waiting to pass through the locks, of which , The number of locks that did not stop navigation; according to the formula from Start iterative calculations until the preset period is reached, and obtain the number of ships waiting to pass through the lock each day during that period;
[0215] Waiting capacity assessment: Determine the operating factors affecting the waiting capacity of the lock;
[0216] Among them, the maintenance time of the lock Frequency of severe weather Duration of severe weather The range of values for each factor is divided into: There are three non-overlapping intervals, each with a probability of . Sample values are randomly drawn from each interval to form One sample point;
[0217] Based on knowledge and experience of lock operation, determine the correlation between various operating conditions and the number of ships in backlog. A Bayesian network is constructed based on the causal relationship structure. Using historical data and sampled data, the conditional probability distribution of each node in the Bayesian network is calculated using maximum likelihood estimation or Bayesian estimation methods. ;
[0218] The sample points obtained from the sampling are sequentially input into the verified simulation model. The simulation model is run multiple times for each sample point and the number of ships backlog is recorded.
[0219] The statistical characteristics of the changing trend, peak value, and mean value of the number of ships backlogged in each simulation are calculated. Bayesian network analysis is used to analyze the degree of influence of various operating conditions on the number of ships backlogged. The waiting capacity of the lock under different operating conditions is comprehensively evaluated to provide a basis for decision-making for lock scheduling and management.
[0220] Step S5 Explanation
[0221] 1. Iteratively calculate the number of ships waiting to enter the lock.
[0222] Practical steps of the algorithm: Define the initial conditions, including the initial number of ships waiting to enter the lock. Number of ships passing through the locks year-round And the seasonal factor of gate passage demand determined based on historical data and actual conditions. The lock passage cycle for each vessel ( At the same time, determine the parameters required to calculate the lock's throughput capacity, such as the daily number of lock cycles for each lock that is not currently in operation within a multi-line lock system. Average number of ships passing through each lock ( ), and possible correction factors .
[0223] Based on the formula in the document, the first The demand for passage through the gate The calculation formula is:
[0224] ;
[0225] in, This indicates the number of days that the maintenance caused to increase the lock passage period for ships in the later period (if there is no maintenance, this item is 0). These are relevant parameters (related to the calculation parameters of lock passage capacity). This formula comprehensively considers the ship passage cycle, seasonal factors, and possible maintenance impacts to calculate the ship passage demand for the day.
[0226] No. The number of newly added waiting vessels at the lock The calculation formula is:
[0227] ;
[0228] in, For the first The ship's ability to pass through the sky, ( , representing the number of locks that are not currently closed. This formula calculates the number of newly added vessels waiting to pass through the locks that day by using the difference between lock demand and lock capacity.
[0229] No. Number of ships waiting to pass through locks The calculation formula is:
[0230] ;
[0231] from Initially, iterative calculations are performed using the formula described above. In each iteration, the number of ships waiting to enter the lock, obtained from the previous iteration, is used. And the newly calculated number of additional vessels waiting to pass through the lock Calculate the current number of ships waiting to pass through the lock. The calculation continues iteratively until a preset period (such as one month, one quarter, etc.) is reached. (day), to obtain the number of ships waiting at the lock on each day during that period. .
[0232] The three formulas mentioned above are interconnected and together enable the iterative calculation of the number of ships waiting to pass through the lock. The calculation formula comprehensively considers various factors that affect the gate passage demand, providing a basis for subsequent calculations; The formula intuitively reflects the impact of the difference between lock clearance demand and ship clearance capacity on the number of ships entering the lock. The formula iterates and continuously accumulates the number of newly added waiting vessels, accurately estimating the number of waiting vessels each day within a certain period, providing data support for subsequent analysis of vessel backlog.
[0233] 2. Evaluation of waiting gate carrying capacity
[0234] Latin hypercube sampling: to determine operating conditions affecting the lock's waiting capacity, such as lock maintenance time. Frequency of severe weather Duration of severe weather Etc. Assuming the value range of each factor is known, the value range of each factor is divided into... Non-overlapping intervals (e.g.) The probability of each interval is For each factor, a sample value is randomly selected from each interval to form a sample point. Specifically, for the lock maintenance time... Its value range is $[0,30]$ days, divided into 10 intervals, each interval having 3 days. A value is randomly selected from each interval, such as... , , And so on. In this way, we obtain... Each sample point contains a combination of values for all operating conditions, which greatly reduces the number of samplings while ensuring the representativeness of the sample.
[0235] Constructing a Bayesian network: Based on domain knowledge and practical experience of lock operation, determine the factors of each operating condition (such as...). , , ) and the number of ships in stock To establish the causal relationships between nodes, a Bayesian network structure is constructed. Using historical data and sample data obtained through Latin hypercube sampling, the conditional probability distribution (CPD) of each node in the Bayesian network is calculated using maximum likelihood estimation or Bayesian estimation methods. Specifically, for each node... (Number of ships in stockpil), its conditional probability distribution This represents the probability distribution of the number of ships in a lock maintenance situation, given the lock maintenance time, frequency of severe weather, and duration of severe weather.
[0236] Simulation and Data Analysis: Sample points obtained through Latin hypercube sampling are sequentially input into the validated simulation model to simulate the operation of the lock under different working conditions. For each sample point, the simulation model is run multiple times (e.g., 50 times), and the number of ships backed up in each simulation is recorded. For the number of ships backed up in each simulation, its statistical characteristics such as trend, peak value, and mean are calculated. Using the constructed Bayesian network, the influence of various working condition factors on the number of ships backed up is analyzed. Specifically, through Bayesian network inference, the probability and magnitude of the increase in the number of ships backed up are calculated when the lock maintenance time increases by a certain number of days; or the changes in the number of ships backed up when the frequency and duration of severe weather change. Based on the above analysis results, the waiting capacity of the lock under different working conditions is comprehensively evaluated. Among them, when the lock maintenance time is... Severe weather frequency is The duration of severe weather is Based on the statistical characteristics of the simulation data and the results of Bayesian network analysis, the system determines whether the lock's waiting capacity is strong, medium, or weak, and provides corresponding quantitative indicators (such as the average number of waiting vessels and the maximum number of waiting vessels) to provide a basis for decision-making in lock scheduling and management.
[0237] In Latin hypercube sampling, by rationally dividing intervals and using random sampling methods, the representativeness and diversity of the sample are ensured, the number of samplings is reduced, and the simulation efficiency is improved. In Bayesian network construction, the conditional probability distribution is calculated. The formula describes the probabilistic relationship between various operating conditions and the number of ships in backlog. This formula quantifies the impact of different operating conditions on the number of ships in backlog, providing a powerful tool for analyzing the lock's waiting capacity. By combining Latin hypercube sampling and Bayesian network methods, through simulation and data analysis, the lock's waiting capacity under different operating conditions can be assessed more comprehensively and accurately, providing a scientific basis for lock scheduling and management.
[0238] After obtaining the lock's carrying capacity evaluation data, lock scheduling can be optimized in terms of navigation frequency, maintenance plans, and responses to the impact of severe weather, as detailed below:
[0239] 1. Adjust navigation frequency: Dynamically adjust based on the number of vessels waiting to pass through the locks and the demand for passage. If the number of vessels waiting to pass through the locks continues to rise and the demand is high, and the lock capacity allows, increase the navigation frequency to reduce vessel waiting time; if the number of vessels waiting to pass through the locks is low and the demand is low, appropriately reduce the frequency to conserve resources. For example, increase the navigation frequency during peak tourist season when there are more vessels, and decrease it during off-peak season.
[0240] 2. Schedule maintenance: Arrange maintenance based on lock capacity data under different operating conditions. If the capacity is high, longer maintenance can be scheduled during periods of low lock passage demand; if the capacity is sensitive to maintenance duration, short-duration segmented maintenance should be adopted. For example, during specific off-seasons each year, comprehensive maintenance can be scheduled when the capacity is high; for locks sensitive to capacity, phased maintenance can be carried out during off-peak periods.
[0241] 3. Responding to Severe Weather: Utilize the relationship between severe weather-related factors and the number of backlogged vessels for early warning and scheduling. Before severe weather arrives, increase navigation frequency to expedite vessel passage; adjust as needed during the weather to ensure safety; assess facilities afterward, restore navigation, and quickly evacuate backlogged vessels. For example, expedite vessel passage before a typhoon, adjust according to safety conditions during the typhoon, and quickly restore and schedule backlogged vessels afterward.
[0242] 4. Optimize scheduling strategies: Based on assessment data, and considering vessel type, tonnage, and the urgency of transported cargo, optimize the scheduling algorithm to determine lock passage priorities. For example, prioritize the passage of vessels transporting urgent supplies and large vessels to improve overall efficiency. Simultaneously, continuously monitor changes in the number of vessels waiting to pass and lock passage demand, and dynamically adjust the scheduling strategy accordingly.
[0243] 5. Multi-lock Coordinated Scheduling: For situations involving multiple locks, coordinated scheduling is implemented based on the waiting capacity evaluation data of each lock. This balances vessel traffic across locks, preventing congestion in some locks and idleness in others. Through information sharing and unified scheduling, the efficiency of the entire inland waterway transportation system is improved.
[0244] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A simulation-based method for evaluating the waiting capacity of ships in locks, characterized by: The method includes: S1. Collect lock operation data and preprocess the collected data; S2. Based on the actual structure and operating rules of the lock, a model is constructed using agent-based modeling and simulation algorithms; S3. Calculate the average daily parameters of vessels passing through the lock, the demand for passing through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity based on the collected data. S4. Select historical lock operation data as verification samples, and adjust the model parameters by comparing the simulation results in S2 with the actual data in S3. S5. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions, analyze the waiting conditions of ships, evaluate the waiting capacity of the lock, and adjust the lock navigation frequency reasonably based on the evaluation results. S6. Based on the simulation model parameters adjusted in step S4 above, simulate different working conditions. Based on the number of ships waiting to pass through the lock under different working conditions, when the number of ships waiting to pass through the lock exceeds the carrying capacity, take timely measures to evacuate the ships waiting to pass through the lock. The simulation modeling steps are as follows: Ship generation module: Cleans historical ship arrival time series data, divides it into time intervals, and counts the number of ship arrivals within each interval; determines the number of states in the HMM model. Initialize the state transition probability matrix Observation probability matrix and initial state probability vector The HMM was trained using the Baum-Welch algorithm, and the forward variables were calculated. : ; ; Backward variables : ; ; Auxiliary variables : ; : ; And update the model parameters accordingly. , , Continue until the model parameters converge; use the trained HMM to predict the number of ships arriving at the next moment, and generate ship arrival events using a random number generator. Scheduling module: Uses integer encoding to encode the ship scheduling plan into a format with a length equal to the number of ships. An integer array; randomly generated An initial scheduling scheme is used as the population; a fitness function is defined. : ; Calculate the fitness value for each scheduling scheme, where , , The weighting coefficients and , For the first The arrival time of the ship, For the first The service hours of the ship For the first Priority adjustment time for each ship; using a roulette wheel selection method, based on selection probability. : ; Select individuals, among whom For the first The fitness value of each individual; two individuals are randomly selected from the new population as parents, and crossover is performed using a partially matched crossover method. Then, individuals in the next generation population are subjected to mutation probabilities. The mutation operation is performed using the exchange mutation method; the fitness calculation, selection, crossover and mutation operations are repeated until the termination condition of maximum number of iterations or population fitness value convergence is met, and the optimal ship scheduling order is obtained. Lock passage module: Based on the actual structure and operating rules of the lock, determine the locations, transitions, and connections of the Petri net; set initial location markers; define transition triggering rules and change the number of location markers according to the rules; construct a reachability graph for resource utilization analysis; define performance indicators and calculate the average waiting time. : ; in For the first The waiting time of the ships in the waiting area To count the total number of ships passing through the lock within a given time period; to calculate the lock utilization rate. : ; in To calculate the total duration of the time period, For a moment The lock's operational status and usage. During free time To evaluate the efficiency of the lock passage process.
2. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 1, characterized in that: Lock operation data includes vessel type, number, tonnage, and passage time.
3. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 1, characterized in that: The preprocessing steps in step S1 include: A cluster-based outlier detection algorithm is used to identify and remove erroneous data and outliers. This algorithm uses a similarity measure between data points to identify data points that are far from the cluster as outliers. A quantile-based normalization algorithm is used to normalize the data, mapping data of different magnitudes to a unified interval, thus providing accurate data for subsequent modeling.
4. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 1, characterized in that: The simulation modeling in step S2 includes: ship generation module, scheduling module, and lock passage module; Ship generation module: Using a ship arrival prediction algorithm based on HMM model, the probability of ship arrival at different time periods is predicted based on the characteristics of ship arrival time series in historical data, and then ship arrival events are randomly generated. HMM is a Hidden Markov Model. Scheduling module: An optimized scheduling algorithm based on genetic algorithm is used to determine the gate passage priority; Lock passage module: Utilizes a Petri net-based modeling algorithm for ship lock passage to accurately describe the complex process and resource consumption of ships entering and exiting the lock.
5. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 1, characterized in that: Step S3 involves calculating the average daily parameters of vessels passing through the lock, the demand for passage through the lock, the number of vessels waiting to pass through the lock, and the lock's throughput capacity. Calculate the average daily demand for vessels passing through the locks: If the number of vessels passing through the locks year-round is M2, then the average daily demand for vessels passing through the locks is... voyages, Let be the lock passage cycle for the j-th vessel; the number of newly added vessels waiting to pass through the lock on day i is . The total number of ships waiting to pass through the lock is The ship passage capacity on day i is The maintenance period of 1 day resulted in an increase in the lock passage cycle for subsequent ships. On day i, the demand for ships passing through the two dam locks is [number]. Shipments; Estimate the demand for passage through the lock and the number of vessels waiting to pass: (The following is a list of numbers and likely related to The demand for passage through the gate , No. The number of newly added waiting vessels at the lock , No. Number of ships waiting to pass through locks ; In the formula For the gate passage demand on day i, Let be the number of ships waiting to pass through the lock on day i. This represents the number of newly added vessels waiting to pass through the lock on day i. in For seasonal factors of gate passage demand, For the first The ship's ability to pass through the sky, For the first Number of ships waiting to pass through the locks per day The iterative convergence condition is ; Calculating the lock's throughput capacity: For multi-line locks, where the total throughput capacity is... The number of locks that did not stop navigation was , No. The lock's throughput capacity , of which The daily number of lock operations for the non-stop navigation locks is On average, the number of ships passing through each lock is [number]. , This is the relevant correction factor.
6. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 5, characterized in that: The model verification step in step S4, based on the calculated data above, is as follows: A similarity metric method based on dynamic time warping distance was used to compare simulation results with actual data; If the similarity does not meet the preset threshold, the model parameters are adjusted using the simulated annealing algorithm and the model is re-verified until the model accuracy meets the standard. Simulated annealing algorithm searches for the global optimum in the solution space by simulating the physical annealing process, thus avoiding getting trapped in local optima.
7. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 6, characterized in that: The model validation step in step S4 is as follows: Data preparation and simulation operation: Select representative time period data covering various working conditions from the historical lock operation database as verification samples, input them into the constructed simulation model, run the model and record the simulation output of the ship passage time series and the daily waiting ship number series results; Similarity metric based on dynamic time warping distance: for simulated and actual ship lock passage time series , Construct the distance matrix , Initialize the cumulative distance matrix , , hour , hour , and hour DTW distance ; The DTW distance between the simulated and actual sequences of ships waiting to enter the lock was calculated using the same method; a similarity threshold was set. If the calculated DTW distance is greater than If the similarity requirement is not met, then the similarity is deemed not to be satisfactory. Model parameter adjustment based on simulated annealing algorithm: Determine the model parameters that need to be adjusted; Among them, the average interval between ship arrivals Standard deviation Shape parameters of gate passage time distribution Scale parameters ; Define the objective function ,in It is the DTW distance between the simulated and actual ship lock passage times. It is the DTW distance between the simulated and actual number of ships waiting in the lock. , It is a weighting coefficient and ; Set initial temperature Cooling coefficient and termination temperature At the current temperature Next, randomly generate new model parameter values and calculate the objective function values under the new and old parameters. , Calculate the acceptance probability ,like or random number Less than If the new parameter value is not found, the new value will be accepted; otherwise, the current value will be retained. The temperature will be lowered. ,when Stop iteration; rerun the simulation model with the adjusted parameters, recalculate the DTW distance and compare it with the threshold. If the simulation results do not meet the requirements, adjustments are made until the similarity between the simulation results and the actual data reaches a preset threshold.
8. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 7, characterized in that: The steps for analyzing vessel backlog and assessing lock waiting capacity include iterative calculation of the number of vessels waiting to pass and evaluation of waiting capacity. Iterative calculation of the number of vessels waiting to pass through the lock: Given the number of vessels waiting to pass through the lock and the lock passage demand data, the formula for estimating the number of vessels waiting to pass through the lock in claim 6 is iteratively calculated to estimate the number of vessels waiting to pass through the lock at a certain time. Evaluation of lock holding capacity: Different working conditions are set in the verified simulation model to simulate the impact of different maintenance durations and different frequencies and durations of severe weather on the lock. A method combining Latin hypercube sampling and Bayesian network was used to repeatedly simulate each working condition to obtain a large amount of sample data. Latin hypercube sampling reduces the number of samplings while ensuring sample representativeness, while Bayesian networks are used to analyze the causal relationship between various operating conditions and the number of ships backlogged. By analyzing the changing trends, peak values, and average statistical characteristics of the number of backlogged ships in these data, the waiting capacity of the locks under different operating conditions can be assessed, providing a basis for decision-making in lock scheduling and management.
9. The simulation-based method for evaluating the waiting capacity of ships in locks according to claim 8, characterized in that: The steps for assessing the lock's waiting capacity are as follows: Iterative calculation of the number of vessels waiting to enter the lock: Determine the initial number of vessels waiting to enter the lock. Number of ships passing through the locks year-round Seasonal factors of gate passage demand The lock passage cycle for each vessel Daily number of lock cycles for each lock that is not currently in operation within the multi-line lock system. Average number of ships passing through each lock and correction factor ; According to the formula in claim 6 Calculate the first The demand for passage through the gate on that day, among which The maintenance work will increase the number of days required for ships to pass through the locks later. For relevant parameters; based on the formula Calculate the first The number of newly added vessels waiting to pass through the locks, of which , The number of locks that did not stop navigation; according to the formula from Start iterative calculations until the preset period is reached, and obtain the number of ships waiting to pass through the lock each day during that period; Waiting capacity assessment: Determine the operating factors affecting the waiting capacity of the lock; Among them, the maintenance time of the lock Frequency of severe weather Duration of severe weather The range of values for each factor is divided into: There are three non-overlapping intervals, each with a probability of . Sample values are randomly drawn from each interval to form One sample point; Based on knowledge and experience of lock operation, determine the correlation between various operating conditions and the number of ships in backlog. A Bayesian network is constructed based on the causal relationship structure. Using historical data and sampled data, the conditional probability distribution of each node in the Bayesian network is calculated using maximum likelihood estimation or Bayesian estimation methods. ; The sample points obtained from the sampling are sequentially input into the verified simulation model. The simulation model is run multiple times for each sample point and the number of ships backlog is recorded. The statistical characteristics of the changing trend, peak value, and mean value of the number of ships backlogged in each simulation are calculated. Bayesian network analysis is used to analyze the degree of influence of various operating conditions on the number of ships backlogged. The waiting capacity of the lock under different operating conditions is comprehensively evaluated to provide a basis for decision-making for lock scheduling and management.
Citation Information
Patent Citations
Airport navigation operation management method and system
CN118153907A
Multi-objective real-time scheduling method based on prediction mechanism and energy storage mechanism
WO2024113353A1