Container ship intelligent stowage method, device and equipment
Through the intelligent loading method of container ships, the loading scheme is optimized using genetic algorithms and simulated annealing algorithms, the problem of time-consuming and inaccurate traditional loading methods is solved, and scientific and reasonable loading is achieved, the risk of safety accidents is reduced, and the stability and safety of the ship are ensured.
Patent Information
- Application Number
- CN202510167786.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional container ship loading methods rely on manual experience and calculations, which take a long time and are difficult to guarantee accuracy, and are difficult to meet the needs of the modern shipping industry. Improper loading may lead to ship safety and stability problems.
The intelligent loading method of container ships is adopted to obtain the information of ships and containers, and optimize the loading scheme using genetic algorithms and simulated annealing algorithms to ensure that the draft difference, bending moment and shear force meet the preset conditions, thereby achieving scientific and reasonable loading.
Through intelligent loading methods, the risk of safety accidents caused by improper loading can be effectively reduced, the scientificity and rationality of loading can be improved, and the stability and safety of the ship during navigation can be ensured.
Smart Images

Figure CN119624290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device and equipment for intelligent loading of container ships. Background Art
[0002] In the field of container transportation, container stowage needs to be effectively allocated to meet assembly requirements. Traditional container stowage mainly relies on manual experience and calculation, which is not only time-consuming but also difficult to ensure accuracy. With the continuous increase in container transportation volume and the expansion of ship size, traditional stowage methods have been unable to meet the needs of the modern shipping industry.
[0003] In the process of loading container ships, multiple factors need to be considered, such as the size, weight, quantity of containers, the structure of the ship, loading capacity, etc. Since there are many and complex factors to consider, improper loading may cause the center of gravity of the ship to shift, the draft difference to be too large, the bending moment and shear force to exceed the safe range, and thus endanger the safety and stability of the ship.
[0004] Therefore, how to load containers reasonably, ensure the stability and safety of the ship during navigation, and reduce the risk of safety accidents caused by improper loading is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The present invention provides a method, device and equipment for intelligent loading of container ships, which are used to solve the defect that manual loading of container ships in the prior art is prone to improper loading and leading to safety accidents.
[0006] In a first aspect, the present invention provides a container ship intelligent loading method, comprising: Obtain container ship information and obtain container attribute information that needs to be loaded; Based on the container ship information and the container attribute information, the containers are evenly loaded into the container ship according to the stacking quantity; During the loading process, it is determined whether the number of containers to be loaded is less than the number of remaining stacks. If the number of containers to be loaded is less than the number of remaining stacks, all the containers to be loaded are loaded into the container ship. After loading is completed, the draft difference of the container ship is obtained, and the bending moment and shear force of the container ship are calculated; When the draft difference, bending moment and shear force meet the preset conditions, it is determined whether the constraint conditions are met after the bayonet is loaded; If the constraint condition is met, the bay position in the container ship is encoded to confirm the initialization population; Calculate the fitness values of all individuals in the population and perform genetic iteration operations to determine whether the termination conditions are met; If the termination condition is met, the optimal loading plan is output.
[0007] According to a container ship intelligent stowage method provided by the present invention, the confirming the initialization population includes: The population is initialized using the Bayesian matrix model, each container is initialized as an independent chromosome, and then each initialized container is randomly sorted and numbered one by one to form an ordered container sequence, and the container sequence is used as the initial chromosome of the population.
[0008] According to a container ship intelligent stowage method provided by the present invention, the step of calculating the fitness values of all individuals in the population includes: A constructor model is constructed based on the amount of containers unloaded by the container ship at different ports, the number of times the cover plate needs to be opened for unloading, and the number of containers on both sides of the ship after loading and unloading; Based on the function model, determining the fitness values of all individuals in the population; The function model is: ; ; Where i, j, k represent the numbers of the shell, row, and layer respectively; m means that the container needs to be unloaded when loading or unloading the m-layer. If the container on the k-layer needs to be unloaded when loading or unloading the m-layer, the value of r(i,j,k,m) is 1, otherwise it is 0; n(g,0) indicates whether the container hatch needs to be opened for the n-th loading or unloading; N(i,g) represents the number of containers at all destination ports above the hatch g in the i-th shell; N p (i,g) represents the number of containers with destination port p above hatch cover g in bay i; d represents the route between different ports, and D represents the set of routes between different ports; V h 、V v 、V t S is the lateral, vertical and longitudinal travel speed of the shore crane during operation. h , S v , S t is the corresponding moving distance; cont q The total amount of containers that need to be loaded and unloaded by the quay crane; represents the number of containers in the nearshore container block at bay i, It represents the number of containers in the offshore side container block at bay i; and is the momentum factor, which is used to control the weight; q represents the current shore crane operation machinery, Q is the set of shore crane operation machinery, I represents the total number of containers on the container ship, G represents the total number of loading and unloading times, and J represents the total number of container unloading times.
[0009] According to a container ship intelligent stowage method provided by the present invention, the performing of genetic iteration operation comprises: In the optimization process of the fusion of genetic algorithm and particle swarm algorithm, a crossover operation is performed to randomly select individuals in the population and pair them with individual extreme values or global extreme values in the particle swarm. Information is exchanged through two randomly determined crossover points to generate new particles. The crossover probability is set to 0.9. The mutation operation is performed by comparing the randomly generated number with the preset mutation probability of 0.1 to determine whether to execute. If the termination condition is met, the particle is mutated by exchanging the two points. Determine whether the number of iterations reaches the preset iteration threshold. If not, return to the initial solution and perform iterative operations until it reaches the optimal solution, which is then output as the optimal loading solution.
[0010] A container ship intelligent stowage method according to the present invention also includes: Integrate simulated annealing algorithm into genetic operation, perform iterative process, and combine genetic operation and simulated annealing mechanism to evolve population; After each iteration, the objective function value of the new individual is calculated and compared with the objective function value of the previous state. According to the difference between the two and the acceptance probability at the current annealing temperature, it is decided whether to accept the new individual as the current optimal solution; the acceptance probability function is: ; in, P i (T), P j (T) Respectively represent the objective function values before and after individual mutation, T represents the number of iterations, α is the annealing coefficient; If the value after mutation is less than the value before mutation, the new individual is accepted; if the value after mutation is greater than or equal to the value before mutation, a coefficient between 0 and 1 is randomly generated, and if the coefficient is less than the mutation probability, the new individual is accepted.
[0011] According to a container ship intelligent stowage method provided by the present invention, the constraint conditions include: the constraint conditions limiting the container loading space are: ; ; Among them, i, j, k represent the shell, row, and layer numbers respectively, c represents the container number, C is the container set, and when S(i,j,k,c) is 1, it means that container c is placed at position S.
[0012] According to a container ship intelligent loading method provided by the present invention, the constraint conditions include: the constraint conditions of the total weight of the container ship and the local strength of the ship are: ; in, represents the weight of container c, Indicates container weight; Indicates container The weight of; S(i,j,k) represents the position of layer k in row i of shell j; S(i,j,k+1) represents the position of layer k+1 in row i of shell j; S(i,j,k+2) represents the position of layer k+2 in row i of shell j; K is the set of layers; Indicates the maximum load-bearing weight of a single row of containers.
[0013] According to a container ship intelligent stowage method provided by the present invention, the constraint conditions include: the ship heel angle constraint condition is: ; represents the container at layer k in row i, j, Indicates its weight; Indicates the transverse distance of the ship's stack h from the ship's centerline; Indicates the maximum deviation of the left and right weight that the hull can withstand.
[0014] In a second aspect, the present invention further provides an intelligent loading device for a container ship, comprising: The acquisition module is used to obtain the container ship information and the attribute information of the container to be loaded; A loading module, configured to load containers evenly into the container ship according to the stacking quantity based on the container ship information and the container attribute information; A judgment module, used for judging whether the number of containers to be loaded is less than the number of remaining stacks during the loading process, and if it is less than the number of remaining stacks, loading all the containers to be loaded into the container ship; A calculation module, used to obtain the draft difference of the container ship after loading is completed, and calculate the bending moment and shear force of the container ship; The output module is used to determine whether the bays meet the constraint conditions after loading when the draft difference, bending moment and shear force meet the preset conditions; if the constraint conditions are met, encode the bays in the container ship and confirm the initialization population; calculate the fitness values of all individuals in the population, and perform genetic iteration operations to determine whether the termination conditions are met; if the termination conditions are met, output the optimal loading plan.
[0015] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described intelligent loading methods for container ships.
[0016] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described intelligent loading methods for container ships.
[0017] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the intelligent loading method for a container ship as described above is implemented.
[0018] The present invention provides a method, device and equipment for intelligent loading of container ships, comprising: obtaining container ship information and obtaining attribute information of containers to be loaded; based on the container ship information and the container attribute information, loading the containers evenly into the container ship according to the stacking quantity; during the loading process, judging whether the number of containers to be loaded is less than the remaining stacking quantity, if it is less than the remaining stacking quantity, loading all the containers to be loaded into the container ship; after loading is completed, obtaining the draft of the container ship, and calculating the bending moment and shear force of the container ship force; when the draft difference, bending moment and shear force meet the preset conditions, it is determined whether the bay position meets the constraint conditions after loading; if the constraint conditions are met, the bay positions in the container ship are encoded to confirm the initialization population; the fitness values of all individuals in the population are calculated, and the genetic iteration operation is performed to determine whether the termination conditions are met; if the termination conditions are met, the optimal loading scheme is output. By intelligently determining the bay positions and combining the genetic algorithm to automatically output the optimal loading scheme, compared with loading based on manual experience, it is more scientific and reasonable, and effectively reduces the occurrence of safety accidents caused by improper loading. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a flow chart of the intelligent stowage method for container ships provided in this embodiment; Figure 2 is a structural schematic diagram of the intelligent loading device for container ships provided in this embodiment; Figure 3 It is a schematic diagram of the structure of the electronic device provided in this embodiment. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Figure 1 It is a flow chart of the intelligent loading method for container ships provided in this embodiment.
[0023] like Figure 1 As shown, the container ship intelligent loading method provided by the embodiment of the present invention mainly includes the following steps: 101. Obtain container ship information and obtain attribute information of containers to be loaded.
[0024] In a specific implementation process, the obtained container ship information may include: the model, size, load capacity, container space distribution, ship load-bearing capacity, center of gravity position, navigation route, loading status and other information of the container ship. It also involves the arrival time, departure time, route and other information of the container ship. The obtained container attribute information may include the size, type, weight, unloading port, container number and current yard location of the container. Through the above data, the water area information and climate status of the navigation process can be understood. It can provide data support for the intelligent loading of container ships.
[0025] 102. Based on the container ship information and container attribute information, the containers are evenly loaded into the container ship according to the stacking quantity.
[0026] According to the container ship's slot distribution and container attribute information, a loading plan is formulated. Based on automated or manual methods, containers are loaded into the container ship according to the plan to ensure that the stacking quantity is evenly distributed. During the loading process, a loading method with heavy bottom and light top and left-right symmetry can be considered.
[0027] 103. During the loading process, it is determined whether the number of containers currently to be loaded is less than the number of remaining stacks. If so, all containers currently to be loaded are loaded into the container ship.
[0028] The remaining stack quantity can be calculated based on the loading plan and the number of loaded containers. By comparing the current number of containers to be loaded and the remaining stack quantity, the loading requirements of the container ship can be met. If it is greater than the remaining stack quantity, the maximum loading capacity of the container ship is determined and the corresponding number of containers can be loaded.
[0029] 104. After loading is completed, obtain the draft difference of the container ship and calculate the bending moment and shear force of the container ship.
[0030] The calculation method of the draft difference of container ships can be obtained by measuring the difference between the fore and stern drafts of container ships to ensure that it is within a reasonable range. The calculation method of bending moment and shear force can be calculated based on ship calculation software or methods according to the loading conditions and structural characteristics of container ships.
[0031] 105. When the draft difference, bending moment and shear force meet the preset conditions, it is determined whether the constraint conditions are met after the bayonet is loaded.
[0032] The preset conditions can be specific thresholds determined artificially based on historical experience, which can be flexibly adjusted according to different ships. Constraints can set ship stability constraints: ensure that the loaded container ship remains stable during navigation. Strength constraints are also involved: ensure that the structural strength of the loaded container ship meets the requirements. Draught difference constraints can ensure that the draft difference of the loaded container ship is within a reasonable range. Finally, based on the calculation results and constraints, it can be judged whether the bay meets the requirements after loading.
[0033] 106. If the constraints are met, the bay positions in the container ship are coded and the population is initialized.
[0034] The coding method can use numbers, letters or symbols to uniquely code the bay positions in the container ship. According to the coding rules, the corresponding relationship between the bay positions and containers is established. Confirming the initialization population is to generate multiple possible loading schemes as the initialization population based on the encoded bay positions and container information.
[0035] 107. Calculate the fitness values of all individuals in the population and perform genetic iteration operations to determine whether the termination conditions are met.
[0036] The fitness value can be calculated based on the minimization of the number of box flipping and maximization of loading efficiency of the loading scheme. The loading scheme with a higher fitness value is selected as the parent. Through genetic operations such as crossover and mutation, a new offspring loading scheme is generated.
[0037] Evaluate the fitness value of the offspring loading scheme and select excellent individuals to enter the next generation. Determine whether the termination condition is met: The termination condition can be set to reach the preset number of iterations, the fitness value reaches the preset threshold, or converges to the optimal solution. According to the termination condition, determine whether to end the genetic iteration operation.
[0038] 108. If the termination condition is met, the optimal loading plan is output.
[0039] The optimal loading plan includes, but is not limited to, the specific location of the container on the container ship, the stacking method, the loading order and other information. Of course, it can also include the evaluation results of the loading plan, such as the number of container turns, loading efficiency, ship stability and other key indicators. According to the actual data, combined with constraints such as ship safety requirements, the optimal storage position is calculated for each loaded container to improve the efficiency of container loading and unloading and the stability of the ship. This embodiment can calculate the average time for the transport equipment to the designated yard according to the ship's berthing position and the yard layout, and reasonably allocate transportation tasks.
[0040] Furthermore, this embodiment takes into account that the ship will be tilted due to factors such as waves during navigation, and the draft difference between the bow and stern of the ship will also change. Excessive bow and stern inclination will affect navigation safety. The displacement of the ship is the sum of the weight of the ship itself and the weight of the cargo. The corresponding weight can be obtained through the data acquisition module. Assuming represents the displacement of the ship, then we can get: (1) Where M is a fixed weight, To change the weight, is the mooring waterline distance.
[0041] When a ship is tilted by external forces, it can produce longitudinal inclination, longitudinal stability and transverse stability according to the different inclination angles. When the ship tilts longitudinally, a longitudinal inclination angle will be generated. , normally its longitudinal inclination angle is relatively small, then the longitudinal righting moment of the ship can be expressed as: (2) L BP Indicates the length between perpendicular lines of the ship, GM L is the longitudinal stability height, t is the draft difference. If the ship is relatively balanced, its longitudinal moment M S With M RL The values can be considered to be approximately equal.
[0042] Since the initial stability height is equivalent to the length, the vertical distance between the center of buoyancy and the center of gravity of the ship when it is floating upright has no significant direct effect on the stability, so it can be simplified and not taken into account or regarded as a secondary factor. Then B can be used to replace G. When t is 0.01m, it can be concluded that the ship's MTC, that is, the moment of trim per centimeter, is: (3) Combined with equation (2), we can get the draft difference t, where B represents the center of buoyancy, M L Indicates the longitudinal metacentric point, BM L It is the distance between the center of buoyancy and the longitudinal metacentric point, that is, the transverse metacentric radius.
[0043] pass The fore and aft drafts are and : (4) (5) Among them, X f is the average water intake, is the threshold coefficient.
[0044] When the ship is heeling, the formula for the ship's transverse restoring moment is: (6) in, is the ship's heel angle, g' is the gravitational acceleration. The initial stability height GM can be obtained by Calculated, KM is the transverse metacentric height, Z is the center of gravity height, and GM is the correction value of the free liquid surface to the ship's stability height.
[0045] In this embodiment, the dynamic stability of the ship can be reflected by the stability criterion number: (7) M q 、M f They respectively represent the minimum overturning moment and wind pressure heeling moment of the ship under the combined action of wind and waves.
[0046] When optimizing the container loading strategy on a ship, this embodiment can collect information including the scheduled unloading port of each container, the number of containers required to be loaded and unloaded at each port, and the structural characteristics and carrying capacity of the ship itself. Based on the collected information and combined with the priority order of cargo loading and unloading at each port, the placement of the containers on the ship is designed.
[0047] In this embodiment, coarse-grained allocation of bays can be performed. When optimizing the efficiency of container ship loading and shore crane operations, the containers in the yard are classified by type and size and reasonably allocated to the operating shore cranes. In order to avoid a large number of container dumping during loading and unloading operations at different ports, the strategy of loading the last-arrived containers first is used when formulating the loading strategy. The strength and safety of the ship are comprehensively considered as key constraints, and the two goals of shortest loading and unloading time (derived by dividing the container travel distance by the speed, and calculating the operating distance of the shore crane trolley each time based on the bay) and the minimum number of dumped containers are combined into a unified multi-objective optimization strategy through a weighted method.
[0048] In some specific embodiments, shells, rows, and layers are numbered i, j, and k, respectively, and the model is constructed with the goal of minimizing port loading and unloading time and reducing the number of container turnovers: (8) in, F The number indicating the port of destination, T q The time it takes for a quay crane to complete loading and unloading of a single container. cont q The total amount of containers that need to be loaded and unloaded by the quay crane, Indicates that the container in the i-th port is sent to the destination port F The number of q represents the current shore crane operation machinery, Q It is a collection of shore crane operation machinery. I Indicates the total number of containers on a container ship, Indicates the correction factor.
[0049] This embodiment defines the constraints for the position of the container loaded inside the container ship as follows: (9) Formula (9) ensures that each loading container position can store at most one container.
[0050] (10) Formula (10) indicates that the number of containers loaded on board is no greater than the maximum cargo capacity of the container ship. .
[0051] (11) Formula (11) indicates that there is no hanging box. i, j, k represent the numbers of shell, row, and layer respectively. represents the container at layer k in row i, j, represents the container at the k+1th floor of row i, represents the weight of the container at layer k in row i.
[0052] (12) (13) Formula (12) and Formula (13) indicate that the longitudinal and heeling conditions must meet the requirements. Indicates the maximum trim value of the hull. Indicates the maximum heel value of the hull. , The combination of the front and rear hull positions, , It represents the set of bay positions on the left and right parts based on the mid-longitudinal section, I represents the total number of containers on the container ship, J represents the total number of container overturnings, and K is the set of layers.
[0053] (14) Formula (14) ensures that the total cargo weight does not exceed the maximum load weight W of the container ship.
[0054] (15) Formula (15) ensures that the ship draft difference meets the conditions, represents the longitudinal distance from the i shell to the buoyancy center of the ship, where It represents the width of the ship, L represents the length between the bow and the stern, Represents the weight of the i-th container.
[0055] In an exemplary embodiment, a genetic algorithm is used and designed and configured in the coarse-grained allocation process of bay positions. The genetic algorithm of this embodiment can simulate the search algorithm of natural selection and genetic mechanisms, and guide the solution population to gradually approach the optimal solution by simulating operations such as selection, crossover and mutation in the biological evolution process.
[0056] The genetic algorithm involved in this embodiment can map the solution space to the coding space through coding, and then use the iteration method to select, cross and mutate the individuals in the population, so as to generate a new generation of solution population. In this process, the genetic algorithm gradually optimizes the solution of the problem. The implementation steps of the genetic algorithm are as follows: Initial solution generation: This embodiment can classify all containers to be loaded according to their destination ports in detail based on the container booking information to form different container groups. The container groups are sorted according to the relative distance between each port and the departure port to ensure the rationality of the loading order. In the process of packing, the balanced distribution of container weights can be emphasized to avoid safety hazards caused by uneven weights. Taking into account the overall structural characteristics of the ship, the classified and sorted container groups are allocated to the ship's bays on the premise of ensuring that the container ship can sail safely, and finally an initial solution is obtained.
[0057] Bay bit encoding: When constructing a genetic algorithm, the bays are numbered in a combination of position and capacity, and the numbers are used as genes of chromosomes in the genetic algorithm.
[0058] Generate the initial population: The initial population is constructed through matrix encoding. The containers are grouped according to the destination ports and split according to the stacking requirements of the hold. The rows of the matrix represent the ports, the columns represent the bays, and the element values indicate the number of containers. 100 such matrices are set as the starting point for the exploration of the genetic algorithm.
[0059] Define the fitness function: A fitness function can be defined to evaluate the quality of each chromosome. The fitness values of the chromosomes are iteratively calculated and sorted to screen out the best individuals. At the same time, they are compared with the best solutions in each previous generation to ultimately determine the global optimal loading plan.
[0060] Crossing over between chromosomes: This embodiment uses a partial matching crossover operator to generate new chromosomes. Two non-adjacent gene positions are randomly selected from the two parent chromosomes as crossover points, and then the gene fragments between the two crossover points are exchanged. In order to maintain the validity of the chromosomes, that is, to ensure that each container is only allocated once, an additional step is required to remap the exchanged gene fragments to eliminate any potential duplicate allocations. In this way, two offspring individuals are created that inherit the characteristics of the parents and have new characteristics. The details are as follows: Randomly select two parent chromosomes from the current population, each of which represents a different loading sequence. Randomly select two intersection points, and define the interval between the two points as the gene exchange region to achieve the exchange of genetic information in this interval. Exchange the gene fragments of the two parent chromosomes between the selected intersection points. Determine the elements of the gene exchange region of the parent with the mapping relationship. Perform substitution based on the previously established mapping relationship to ensure the unique allocation of each container. Chromosome mutation: The mutation operation is used to increase the diversity of the population. The specific implementation method is to randomly select two genes in each chromosome for position exchange, but this process only occurs with a small probability (such as 0.1%), which is called the mutation probability. It subtly adjusts the genetic composition of excellent chromosomes to prevent the loss of excellent traits and prevent the algorithm from converging prematurely due to over-reliance on a few elite chromosomes. By setting the mutation probability, a balance is found between retaining potential beneficial mutations and avoiding insufficient exploration of the solution space.
[0061] Use the simulated annealing algorithm: Considering the strong global search and parallel processing capabilities of genetic algorithms, they are prone to fall into the dilemma of local optimal solutions in the later stages of the search, which limits their optimization effect. In order to overcome the limitations of genetic algorithms, simulated annealing strategies are incorporated into the process of executing genetic iteration operations. The simulated annealing algorithm simulates the randomness and probability acceptance criteria in the physical annealing process, and gradually reduces the system temperature, that is, the annealing temperature, allowing solutions that are worse than the current solution to be accepted with a certain probability. This mechanism is controlled by the Metropolis criterion, ensuring that the algorithm can maintain the trend of moving towards a better solution during the search process, and have enough flexibility to jump out of the local optimal area. Specifically, after each iteration of the genetic algorithm, the simulated annealing mechanism is combined to further optimize the population, calculate the objective function value of the new individual, and compare it with the objective function value of the previous state. According to the difference between the two and the acceptance probability at the current annealing temperature, it is decided whether to accept the new individual as the current optimal solution.
[0062] The receiving probability function is: (16) Among them, P i (T), P j (T) represents the objective function value before and after individual mutation, α is the annealing coefficient, T Represents the number of iterations. If the value after mutation is smaller than the value before mutation, a new individual will be accepted. If it is larger than the value before mutation, a coefficient between 0 and 1 will be randomly generated. If the coefficient is smaller than the mutation probability, a new individual will be accepted.
[0063] Define the iteration termination condition: This embodiment runs through a preset number of iterations, and combines genetic operations and simulated annealing mechanisms to evolve the population in each iteration. When the number of iterations reaches the preset upper limit, or the fitness function value remains stable and has no obvious changes in multiple consecutive iterations, the algorithm is considered to have converged, and the best individual in the current population is selected as the final optimization result output. The strategy of this embodiment ensures that the algorithm can complete the search within the specified time and can flexibly adjust when encountering local optimal stagnation, in order to pursue better global optimization effects. According to the allocation results obtained by the coarse-grained shell allocation strategy, a more detailed shell arrangement method is performed on the premise of ensuring that the transverse and longitudinal strength of the ship meets safety standards. This embodiment optimizes the shell arrangement of container ships, and multiple factors need to be considered comprehensively: including the loading and unloading needs of each container at multiple ports, the reasonable layout of light and heavy containers, the loading order of the cabin first and the deck later, and the effective allocation of shore crane operation areas.
[0064] Construct a model based on the amount of containers unloaded by container ships at different ports, the number of times the cover is opened for unloading, and the number of containers on both sides of the ship after loading and unloading; Based on the function model, determine the fitness values of all individuals in the population; The function model is: (17); (18); The three parts in the function model f represent the time required for unloading containers, moving the quay crane, and opening the ship cover. i, j, and k represent the numbers of the shell, row, and layer, respectively; m means that the container needs to be unloaded when loading and unloading the mth layer of the container. If the kth layer of the container needs to be unloaded when loading and unloading the mth layer, the value of r(i,j,k,m) is 1, otherwise it is 0; n(g,0) indicates whether the container hatch needs to be opened for the nth loading and unloading; N(i,g) represents the number of containers at all destination ports above the hatch cover g in the ith shell; N p (i,g) represents the number of containers with destination port p above hatch cover g in bay i; d represents the route between different ports, and D represents the set of routes between different ports; V h 、V v 、V t S is the lateral, vertical and longitudinal travel speed of the shore crane during operation. h , S v , S t is the corresponding moving distance; cont q The total amount of containers that need to be loaded and unloaded by the quay crane; represents the number of containers in the nearshore container block at bay i, It represents the number of containers in the offshore side container block at bay i; and is the momentum factor, which is used to control the weight; q represents the current shore crane operation machinery, Q is the set of shore crane operation machinery, I represents the total number of containers on the container ship, G represents the total number of loading and unloading times, and J represents the total number of container unloading times.
[0065] Similarly, the container cannot be suspended in the air, so we add constraint condition (11). Each container cannot be stored in a full hold and can only be placed in a certain cabin, so we add constraint conditions (19) and (20) respectively.
[0066] (19) (20) Among them, i, j, k represent the shell, row, and layer numbers respectively, c represents the container number, C is the container set, and when S(i,j,k,c) is 1, it means that container c is placed at position S.
[0067] The total weight of the stored boxes cannot be higher than the local strength limit of the ship. Add constraint condition (21).
[0068] (twenty one) in, represents the weight of container c, Indicates container weight; Indicates container The weight of; S(i,j,k) represents the position of layer k in row i of shell j; S(i,j,k+1) represents the position of layer k+1 in row i of shell j; S(i,j,k+2) represents the position of layer k+2 in row i of shell j; K is the set of layers; Indicates the maximum load-bearing weight of a single row of containers.
[0069] The heel angle of the ship when leaving the port cannot be higher than the maximum safety limit. Add constraint condition (22).
[0070] (twenty two) represents the container at layer k in row i, j, Indicates its weight; Indicates the transverse distance of the ship's stack h from the ship's centerline; It indicates the maximum deviation of the left and right weight that the hull can bear, and d indicates the route between different ports. Represents the destination port in a collection of routes between different ports.
[0071] In this embodiment, in the process of realizing the refined Bailey box arrangement task, the particle swarm optimization algorithm is introduced. The particle swarm optimization algorithm often faces a challenge: When a particle accidentally discovers a local optimal solution, other particles are attracted to it and gather together, resulting in a limited search space and a sharp decrease in population diversity, which may lead to the loss of the global optimal solution.
[0072] The genetic algorithm of this embodiment can generate new individuals through its unique crossover and mutation mechanism even when the populations are highly similar, effectively maintaining the diversity of the population, and promoting the search process to cover the solution space more evenly, while promoting the sharing and use of information among individuals.
[0073] In order to overcome the limitation of particle swarm optimization algorithm that is prone to fall into local optimality, and to draw on the advantages of genetic algorithm in maintaining population diversity and global search ability, a hybrid algorithm strategy based on is proposed. This strategy cleverly combines the core ideas of particle swarm optimization algorithm and genetic algorithm, not only retains the high efficiency of social learning and information sharing between particles in particle swarm optimization algorithm, but also introduces crossover and mutation operations of genetic algorithm as a supplement. This innovative design significantly broadens the search range of the algorithm, enhances its ability to explore unknown solution space, and effectively avoids the premature convergence problem that a single particle swarm optimization algorithm may encounter.
[0074] Specifically, during the iteration process, the hybrid algorithm allows particles to adjust their positions according to the current optimal solution, simulating learning and following in social behavior, and timely triggers crossover and mutation operations to generate new candidate solutions in a non-traditional way. These new solutions may be located in completely different search areas, thereby increasing the possibility of finding the global optimal solution. The Baynes box involves huge calculations and requires high convergence speed. The present invention uses an improved particle swarm algorithm to improve the convergence speed while avoiding falling into the local optimal situation.
[0075] The algorithm flow of the Bayer box arrangement involved in this embodiment is as follows: Initial solution generation: Step 1: Randomly assign containers to a certain slot. Under the condition of ensuring the safe navigation of the ship, evenly distribute the containers to the corresponding slot blocks from left to right, and arrange them from bottom to left. Determine whether the current row has reached the maximum loading limit. If it is full, assign them to the next row with empty slots for storage.
[0076] Step 2: During the shore crane operation, determine whether the current container block is fully loaded. If it is fully loaded, select the unfilled container block to continue loading. In order to maintain the stability of the ship and prevent heeling, the loading sequence will give priority to gradually advancing from the two sides of the ship to the middle. If it is not full, return to step 1.
[0077] Step 3: Determine whether the port containers have been fully loaded. If not, return to step 2. Otherwise, obtain the initial solution and output it.
[0078] Step 4: Based on the loading results, determine whether the requirements for safe navigation of the ship are met. If not, establish a new model based on relevant information.
[0079] Chromosome encoding, generating initial population: The Bay matrix model is used to initialize the population, in which the matrix elements are assigned different weights according to the slot status: unallocated slots are marked with -1, empty slots are assigned with 0, and non-empty slots are assigned positive integer weights, which directly reflect the destination port information of the container. This initialization strategy aims to improve the quality of the population and ensure its diversity through random generation. Specifically, each container is first initialized as an independent chromosome, and then these containers are randomly sorted and numbered one by one to form an ordered sequence of containers, which serves as the initial chromosome of the population. In terms of encoding, this paper adopts the decimal encoding system. Each gene of the chromosome not only represents the destination port information of the container, but also implies its weight attribute.
[0080] Calculate the fitness value: When evaluating the fitness of chromosomes, we focus on the optimization goals: reducing the number of container unloading times in container ships, shortening the shore crane operation time and the hatch cover opening time. The chromosomes that can minimize the values of these objective functions will be given the highest fitness scores.
[0081] Genetic Operations: In the optimization process of the fusion of genetic algorithm and particle swarm algorithm, the crossover operation involves randomly selecting individuals in the population and pairing them with individual extreme values or global extreme values in the particle swarm, exchanging information between them through two randomly determined crossover points to generate new particles. The crossover probability is set to 0.9 to promote sufficient information mixing. The mutation operation determines whether to execute by comparing the randomly generated number with the preset mutation probability of 0.1. If the conditions are met, the particle is mutated by exchanging the two points to increase the diversity of the population.
[0082] Particle Update: The particle update rule is used to update the particle flight speed and direction, and move to a new position in the solution space. It is determined whether the number of iterations reaches the expected number. If not, it returns to the initial solution for iteration until it reaches the optimal solution. By combining the hybrid genetic algorithm with the particle swarm optimization algorithm, it is possible to comprehensively consider multiple factors such as loading constraints, ship stability, strength, and cargo distribution in a short period of time, and generate an optimized loading plan that meets various requirements.
[0083] The present invention is based on the above-mentioned intelligent loading method for container ships. Through coarse-grained calculation, the approximate position of the container is allocated, and on this basis, the specific position in the container is refined and calculated, which can effectively improve the space utilization rate of the ship and reduce space waste, thereby increasing the cargo transportation volume of a single voyage. Through a detailed analysis of the longitudinal force, initial stability and dynamic stability of the hull, the proposed loading scheme can ensure the stability and safety of the ship during navigation, reduce the risk of safety accidents caused by improper loading, and can calculate the loading scheme that meets the loading constraints and the stability and strength of the ship in a relatively short time, thereby improving the calculation efficiency and facilitating the rapid response to loading requirements in practical applications. Swarm intelligence algorithms such as hybrid genetic algorithms and particle swarm optimization algorithms are used. These algorithms show strong capabilities in solving complex optimization problems, can effectively avoid falling into local optimal solutions, and improve the quality of solutions.
[0084] Based on the same general inventive concept, the present invention also protects an intelligent loading device for a container ship. The intelligent loading device for a container ship described below and the intelligent loading method for a container ship described above can refer to each other.
[0085] Figure 2 It is a structural schematic diagram of the intelligent loading device for container ships provided in this embodiment.
[0086] like Figure 2 As shown, this embodiment provides an intelligent loading device for container ships, comprising: The acquisition module 201 is used to acquire container ship information and acquire attribute information of containers to be loaded; A loading module 202 is used to load containers evenly into the container ship according to the stacking quantity based on the container ship information and the container attribute information; The judgment module 203 is used to judge whether the number of containers to be loaded is less than the number of remaining stacks during the loading process. If it is less than the number of remaining stacks, all the containers to be loaded are loaded into the container ship; The calculation module 204 is used to obtain the draft difference of the container ship after loading is completed, and calculate the bending moment and shear force of the container ship; The output module 205 is used to determine whether the bays meet the constraint conditions after loading when the draft difference, bending moment and shear force meet the preset conditions; if the constraint conditions are met, encode the bays in the container ship and confirm the initialization population; calculate the fitness values of all individuals in the population, and perform genetic iteration operations to determine whether the termination conditions are met; if the termination conditions are met, output the optimal loading plan.
[0087] Figure 3 It is a schematic diagram of the structure of the electronic device provided in this embodiment.
[0088] like Figure 3As shown, the electronic device may include: a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logic instructions in the memory 330 to execute the intelligent loading method of the container ship, which includes: obtaining the container ship information and obtaining the attribute information of the container to be loaded; based on the container ship information and the container attribute information, evenly loading the containers into the container ship according to the stacking quantity; in the loading process, judging whether the number of containers to be loaded is less than the number of remaining stacks, if it is less than the number of remaining stacks, all the containers to be loaded are loaded into the container ship; after loading is completed, obtaining the draft difference of the container ship, and calculating the bending moment and shear force of the container ship; when the draft difference, bending moment and shear force meet the preset conditions, judging whether the bay position meets the constraint conditions after loading; if the constraint conditions are met, encoding the bay positions in the container ship to confirm the initialization population; calculating the fitness values of all individuals in the population, and performing genetic iteration operations to judge whether the termination conditions are met; if the termination conditions are met, outputting the optimal loading plan.
[0089] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0090] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the container ship intelligent loading method provided by the above methods, the method comprising: obtaining container ship information, and obtaining container attribute information to be loaded; based on the container ship information and the container attribute information, uniformly loading the containers into the container ship according to the stacking quantity; during the loading process, judging whether the number of containers to be loaded is less than the number of remaining stacks, if less than the number of remaining stacks, all the containers to be loaded are loaded into the container ship; after loading is completed, obtaining the draft difference of the container ship, and calculating the bending moment and shear force of the container ship; when the draft difference, bending moment and shear force meet the preset conditions, judging whether the bay position meets the constraint conditions after loading; if the constraint conditions are met, encoding the bay positions in the container ship, and confirming the initialization population; calculating the fitness values of all individuals in the population, and performing genetic iteration operations to judge whether the termination conditions are met; if the termination conditions are met, outputting the optimal loading plan.
[0091] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by executing the intelligent loading method of container ships provided by the above methods when the computer program is executed by a processor, the method comprising: obtaining container ship information and obtaining attribute information of containers to be loaded; based on the container ship information and the container attribute information, loading the containers evenly into the container ship according to the stacking quantity; during the loading process, judging whether the number of containers to be loaded is less than the number of remaining stacks, if it is less than the number of remaining stacks, loading all the containers to be loaded into the container ship; after loading is completed, obtaining the draft difference of the container ship, and calculating the bending moment and shear force of the container ship; when the draft difference, bending moment and shear force meet the preset conditions, judging whether the bay position meets the constraint conditions after loading; if the constraint conditions are met, encoding the bay positions in the container ship to confirm the initialization population; calculating the fitness values of all individuals in the population, and performing genetic iteration operations to judge whether the termination conditions are met; if the termination conditions are met, outputting the optimal loading plan.
[0092] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A container ship intelligent loading method, characterized in that: include: Obtain container ship information and obtain container attribute information that needs to be loaded; Based on the container ship information and the container attribute information, the containers are evenly loaded into the container ship according to the stacking quantity; During the loading process, it is determined whether the number of containers to be loaded is less than the number of remaining stacks. If the number of containers to be loaded is less than the number of remaining stacks, all the containers to be loaded are loaded into the container ship. After loading is completed, the draft difference of the container ship is obtained, and the bending moment and shear force of the container ship are calculated; When the draft difference, bending moment and shear force meet the preset conditions, it is determined whether the constraint conditions are met after the bayonet is loaded; If the constraint condition is met, the bay position in the container ship is encoded to confirm the initialization population; Calculate the fitness values of all individuals in the population and perform genetic iteration operations to determine whether the termination conditions are met; If the termination condition is met, the optimal loading plan is output.
2. The intelligent stowage method for container ships according to claim 1, characterized in that: The confirming initialization population includes: The population is initialized using the Bayesian matrix model, each container is initialized as an independent chromosome, and then each initialized container is randomly sorted and numbered one by one to form an ordered container sequence, and the container sequence is used as the initial chromosome of the population.
3. The intelligent stowage method for container ships according to claim 1, characterized in that: The calculation of the fitness values of all individuals in the population includes: A constructor model is constructed based on the amount of containers unloaded by the container ship at different ports, the number of times the cover plate needs to be opened for unloading, and the number of containers on both sides of the ship after loading and unloading; Based on the function model, determining the fitness values of all individuals in the population; The function model is: ; ; Among them, i, j, k represent the numbers of the shell, row, and layer respectively; m means that the container needs to be unloaded when loading or unloading the mth layer. If the container on the kth layer needs to be unloaded when loading or unloading the mth layer, the value of r(i,j,k,m) is 1, otherwise it is 0; n(g,0) indicates whether the container hatch needs to be opened for the nth loading or unloading; N represents the number of containers at all destination ports above hatch cover g in bay i; p (i,g) represents the number of containers with destination port p above hatch cover g in bay i; d represents the route between different ports, and D represents the set of routes between different ports; V h 、V v 、V t S is the lateral, vertical and longitudinal travel speed of the shore crane during operation. h , S v , S t is the corresponding moving distance; cont q The total amount of containers that need to be loaded and unloaded by the quay crane; represents the number of containers in the nearshore container block at bay i, It represents the number of containers in the offshore side container block at bay i; and is the momentum factor, which is used to control the weight; q represents the current shore crane operation machinery, Q is the set of shore crane operation machinery, I represents the total number of containers on the container ship, G represents the total number of loading and unloading times, and J represents the total number of container unloading times.
4. The intelligent stowage method for container ships according to claim 1, characterized in that: The performing of the genetic iteration operation comprises: In the optimization process of the fusion of genetic algorithm and particle swarm algorithm, a crossover operation is performed to randomly select individuals in the population and pair them with individual extreme values or global extreme values in the particle swarm. Information is exchanged through two randomly determined crossover points to generate new particles. The crossover probability is set to 0.9; The mutation operation is performed by comparing the randomly generated number with the preset mutation probability of 0.1 to determine whether to execute. If the termination condition is met, the particle is mutated by exchanging the two points. Determine whether the number of iterations reaches the preset iteration threshold. If not, return to the initial solution and perform iterative operations until it reaches the optimal solution, which is then output as the optimal loading solution.
5. The intelligent stowage method for container ships according to claim 4, characterized in that: Also includes: Integrate simulated annealing algorithm into genetic operation, perform iterative process, and combine genetic operation and simulated annealing mechanism to evolve population; After each iteration, the objective function value of the new individual is calculated and compared with the objective function value of the previous state. According to the difference between the two and the acceptance probability at the current annealing temperature, it is decided whether to accept the new individual as the current optimal solution; the acceptance probability function is: ; in, P i (T), P j (T) Respectively represent the objective function values before and after individual mutation, T represents the number of iterations, α is the annealing coefficient; If the value after mutation is less than the value before mutation, the new individual is accepted; if the value after mutation is greater than or equal to the value before mutation, a coefficient between 0 and 1 is randomly generated, and if the coefficient is less than the mutation probability, the new individual is accepted.
6. The intelligent stowage method for container ships according to claim 1, characterized in that: The constraints include: the constraints limiting the container loading space are: ; ; Among them, i, j, k represent the shell, row, and layer numbers respectively, c represents the container number, C is the container set, and when S(i,j,k,c) is 1, it means that container c is placed at position S.
7. The intelligent stowage method for container ships according to claim 6, characterized in that: The constraint conditions include: the constraint conditions of the total weight of the container on board and the local strength of the ship are: ; in, represents the weight of container c, Indicates container weight; Indicates container The weight of; S(i,j,k) represents the position of layer k in row i of shell j; S(i,j,k+1) represents the position of layer k+1 in row i of shell j; S(i,j,k+2) represents the position of layer k+2 in row i of shell j; K is the set of layers; Indicates the maximum load-bearing weight of a single row of containers.
8. The intelligent stowage method for container ships according to claim 7, characterized in that: The constraint conditions include: the ship heel angle constraint condition is: ; represents the container at layer k in row i, j, Indicates its weight; Indicates the transverse distance of the ship's stack h from the ship's centerline; It indicates the maximum deviation of the left and right weight that the hull can bear, and d indicates the route between different ports. Represents the destination port in a collection of routes between different ports.
9. An intelligent loading device for container ships, characterized in that: include: The acquisition module is used to obtain the container ship information and the attribute information of the container to be loaded; A loading module, configured to load containers evenly into the container ship according to the stacking quantity based on the container ship information and the container attribute information; A judgment module, used for judging whether the number of containers to be loaded is less than the number of remaining stacks during the loading process, and if it is less than the number of remaining stacks, loading all the containers to be loaded into the container ship; A calculation module, used to obtain the draft difference of the container ship after loading is completed, and calculate the bending moment and shear force of the container ship; An output module is used to determine whether the bays meet the constraint conditions after loading when the draft difference, bending moment and shear force meet the preset conditions; if the constraint conditions are met, encode the bays in the container ship to confirm the initialization population; Calculate the fitness values of all individuals in the population, and perform genetic iteration operations to determine whether the termination conditions are met; if the termination conditions are met, output the optimal loading plan.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the intelligent loading method for a container ship as claimed in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Cargo allocation method for improving quay crane operation efficiency and vessel stability of containers
CN103544586A
Hybrid adaptive genetic algorithm for three-dimensional multi-box flexible boxing
CN116644807A
Automatic wharf ship container stowage method, device and equipment and storage medium
CN118115065A
Ship intelligent stowage method and system
CN118378861A
Cited By
Continuous learning waybill matching method based on rules and experience
CN120031002A
Ship selection method for semi-submerged ship / heavy lift ship industrial module joint stowage ant colony optimization algorithm
CN121352573A
A ship selection method using an ant colony optimization algorithm for joint loading of industrial modules for semi-submersible / heavy-lift vessels.
CN121352573B
Automatic loading and unloading operation method based on linkage of multiple intelligent systems
CN121591011A