Ship ballast water adjusting method and system based on simulated annealing algorithm
The optimized calculation of the ship's ballast water through simulated annealing algorithm is solved, and the problems of low calculation efficiency and insufficient adaptability in the existing technology are achieved, and the global optimal ballast water distribution is improved, which is improved the stability and fuel efficiency of the ship.
Patent Information
- Application Number
- CN202411485350.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The existing ballast water distribution system has low calculation efficiency under complex sea conditions, which is easy to fall into the local optimal solution, lacks adaptability, and cannot achieve optimal ballast water distribution, affecting ship stability and fuel efficiency.
The simulated annealing algorithm is used to optimize the calculation of ship ballast water, and solve the objective function and constraints to achieve a global optimal allocation plan.
The calculation efficiency and adaptability of ballast water distribution are improved, local optimal solutions are avoided, optimal ballast water distribution is achieved, and the stability and fuel efficiency of the ship are improved.
Smart Images

Figure CN119167524A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ballast water calculation, and in particular to a ship ballast water regulation method and system based on a simulated annealing algorithm. Background Art
[0002] Ballast water allocation plays a vital role in the navigation of ships. Ballast water is used to adjust the center of gravity, draft and stability of the ship to ensure that the ship remains stable and safe under different loads and sea conditions. Traditional ballast water allocation methods usually rely on manual calculations or pre-set rules for allocation. The crew manually adjusts the amount of water in each ballast tank according to the real-time status of the ship to control the draft and stability of the ship. However, the traditional manual ballast water allocation method has significant disadvantages such as low efficiency, heavy calculation burden and lack of accuracy when dealing with complex operational requirements.
[0003] In order to overcome the shortcomings of traditional allocation methods, ballast water allocation technology has gradually developed towards automation and intelligence in recent years. For example, some ships are equipped with automatic ballast water allocation systems, which accurately control the amount of water in each ballast tank through computers and control systems. These improvement measures have improved the efficiency and accuracy of allocation to a certain extent, but there are still the following limitations: First, some automatic ballast water allocation systems are based on traditional optimization methods such as graph theory and moment balance to distribute water. Although these methods are effective, they have high computational complexity, especially in multi-cabin or multi-objective optimization scenarios. The solution speed is slow and it is difficult to respond to the dynamic changes of the ship in real time. Secondly, many optimization methods are prone to fall into local optimal solutions during the solution process, resulting in the allocation scheme failing to achieve global optimality, and thus failing to achieve the minimum allocation of ballast water, which will still waste water and affect the stability and fuel efficiency of the ship. In addition, existing allocation methods often rely on preset algorithms and rules, lack the ability to adaptively adjust the real-time operating status of the ship and the external environment, resulting in the allocation process being inflexible and unable to cope with complex and changing sea conditions and operating conditions. These limitations mean that there is still much room for improvement in the adaptability and computational efficiency of existing automatic allocation systems under complex conditions.
[0004] Therefore, there is a need for a method that can efficiently and accurately perform optimal ballast water allocation under complex sea conditions. Summary of the invention
[0005] To solve the above problems, the present invention provides a ship ballast water regulation method and system based on a simulated annealing algorithm. The ship ballast water is optimized and calculated by the simulated annealing algorithm, which solves the problems of low adaptability and computational efficiency of the existing ballast water allocation system and easy falling into the local optimal solution.
[0006] To achieve the above object, the present invention provides the following technical solution: a ship ballast water regulation method based on simulated annealing algorithm, comprising the following steps: S1. Obtain the ship's ballast tank information and the current ballast water status, and construct an objective function based on the ballast tank information and the current ballast water status; S2. Establish ballast water constraints for the objective function; S3. Using a simulated annealing algorithm, the objective function is solved according to the ballast water constraint conditions until an optimal solution is obtained, wherein the optimal solution is the ballast water regulation scheme; S4. Adjust the current ballast water according to the ballast water adjustment plan.
[0007] Furthermore, in step S1, the ship ballast tank information includes the number of ballast tanks n, the maximum capacity of each ballast tank The current ballast water status includes the initial water volume in each ballast tank. .
[0008] Furthermore, in step S1, the specific formula of the objective function is:
[0009] in, represents the amount of water transferred from ballast tank i to ballast tank j, Represents the water transfer matrix between ballast tanks.
[0010] Furthermore, in step S2, the ballast water constraint conditions include: the final water volume of each ballast tank after allocation is equal to the initial water volume plus the transferred-in water volume minus the transferred-out water volume; the final water volume of each ballast tank does not exceed the maximum capacity of the compartment, nor is it less than 0; the total amount of ballast water in all ballast tanks remains unchanged.
[0011] Furthermore, the specific formula of the ballast water constraint condition is:
[0012] in, represents the initial water volume of the jth ballast tank, represents the amount of water transferred from ballast tank i to ballast tank j;
[0013] in, represents the current water volume of the jth ballast tank, represents the maximum capacity of the jth ballast tank;
[0014] represents the amount of water in the jth ballast tank, represents the initial water volume of the jth ballast tank.
[0015] Furthermore, the ballast water constraint condition also includes: heel angle constraint and pitch angle constraint. The specific formula of heel angle constraint is:
[0016] The specific formula for the pitch angle constraint is:
[0017] in, Respectively indicate the cabin The vertical and horizontal positions, is the lateral metacentric height, is the length of the ship, represents the maximum allowable heel angle, Indicates the maximum allowable heel angle.
[0018] Furthermore, in step S3, the annealing algorithm is used to solve the objective function according to the ballast water constraint condition, and the specific implementation method is as follows: S31. Randomly generate a water transfer matrix between ballast tanks , the water transfer matrix Satisfy the ballast water constraint conditions, preset the initial temperature T and the cooling rate α; S32 randomly selects two ballast tanks to transfer water randomly, performs a cooling according to the cooling rate, and obtains a new ballast water distribution plan , Satisfy the ballast water constraints, compare and The loss between The loss is less than When As new ,when The loss is greater than When the probability As new ; S33. Repeat step S32 until the temperature is lower than the preset threshold, or the ballast water distribution plan If the current ballast water allocation plan remains unchanged for more than the preset number of times, the calculation ends. This is the optimal ballast water result.
[0019] Further, in step S32, compare and The specific implementation method includes: calculating The objective function value of , and the current ballast water allocation scheme The objective function value of For comparison, > When The loss is less than .
[0020] Further, in step S32, the probability As new , and its specific implementation method is: The calculation formula of probability P is:
[0021] in, ; Generate a random number n in the range of 0-1. When the random number n is greater than the probability P, As new , when the random number n is less than the probability P, the ballast water allocation scheme remains unchanged.
[0022] Through the above technical scheme, the present invention has the following beneficial effects: the ship ballast water is tuned and simulated by a simulated annealing algorithm, and the random search characteristics of the annealing algorithm are utilized to achieve global optimization of ballast water allocation, and the computational efficiency of the ship ballast water adjustment scheme is improved, and it can adapt to different complex conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The present invention is a schematic diagram of the overall process of a ship ballast water regulation method based on a simulated annealing algorithm.
[0024] Figure 2 It is a schematic diagram comparing the changes before and after the ship ballast water optimization adjustment in an embodiment of the present invention.
[0025] Figure 3 It is a schematic diagram of the iteration of the simulated annealing algorithm in an embodiment of the present invention.
[0026] Figure 4 The schematic diagram is a structural diagram of a ship ballast water regulation system based on a simulated annealing algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] Example 1 See also Figure 1 , a ship ballast water regulation method based on simulated annealing algorithm, comprising the following steps: S1. Obtain the ship's ballast tank information and the current ballast water status, and construct an objective function based on the ballast tank information and the current ballast water status; S2. Establish ballast water constraints for the objective function; S3. Using a simulated annealing algorithm, the objective function is solved according to the ballast water constraint conditions until an optimal solution is obtained, wherein the optimal solution is the ballast water regulation scheme; S4. Adjust the current ballast water according to the ballast water adjustment plan.
[0030] The present invention solves the problem of ship ballast water allocation through mathematical modeling and intelligent optimization algorithms, focusing on solving the problems of complex calculations and slow response in the traditional ballast water allocation process. First, a mathematical model of ballast water allocation is established based on the water allocation requirements of each ballast tank of the ship. The model converts the water allocation process into an optimization problem, with the goal of ensuring the stability of the ship by minimizing the amount of water transferred. Subsequently, the mathematical model is solved using a simulated annealing algorithm, which avoids the problem of local optimal solutions through global search and can quickly find the optimal ballast water allocation solution that meets the conditions.
[0031] like Figure 3 As shown, after optimization and adjustment, the heel angle and the pitch angle are greatly reduced, and the adjustment range of the water volume in the ship's ballast tank is small, which can effectively realize the adjustment of the water volume in the ship's ballast tank.
[0032] In an optional embodiment, in step S1, the ship ballast tank information includes the number of ballast tanks n, the maximum capacity of each ballast tank The current ballast water status includes the initial water volume in each ballast tank. .
[0033] In an optional embodiment, in step S1, the specific formula of the objective function is:
[0034] in, represents the amount of water transferred from ballast tank i to ballast tank j, Represents the water transfer matrix between ballast tanks.
[0035] The purpose of the objective function is to minimize the amount of water transferred between all ballast tanks and, through subsequent constraints, ensure that the ship's attitude is stable and does not tilt to a certain point.
[0036] In step S2, the ballast water constraints include: the final water volume of each ballast tank after allocation is equal to the initial water volume plus the transferred-in water volume minus the transferred-out water volume; the final water volume of each ballast tank does not exceed the maximum capacity of the compartment, nor is it less than 0; the total amount of ballast water in all ballast tanks remains unchanged.
[0037] The specific formula of the ballast water constraint condition is:
[0038] in, represents the initial water volume of the jth ballast tank, Represents the amount of water transferred from ballast tank i to ballast tank j; by limiting the balance of water in and out of the ballast tank, the water balance in each compartment is ensured.
[0039]
[0040] in, represents the current water volume of the jth ballast tank, represents the maximum capacity of the jth ballast tank;
[0041] represents the amount of water in the jth ballast tank, represents the initial water volume of the jth ballast tank.
[0042] In order to maintain the stability of the ship, the heel angle and the trim angle of the ship must be controlled within an acceptable range. The ballast water constraint conditions also include: heel angle constraint and trim angle constraint. The specific formula of the heel angle constraint is:
[0043] The specific formula for the pitch angle constraint is:
[0044] in, Respectively indicate the cabin The vertical and horizontal positions, is the lateral metacentric height, is the length of the ship, represents the maximum allowable heel angle, Indicates the maximum allowable heel angle.
[0045] Through the above modeling, the ballast water allocation problem is transformed into a mathematical optimization problem to solve the optimal ballast water allocation plan. The focus of solving this model is how to minimize the water transfer amount while satisfying all constraints.
[0046] In an optional embodiment, in step S3, the annealing algorithm is used to solve the objective function according to the ballast water constraint condition, and the specific implementation method is: S31. Randomly generate a water transfer matrix between ballast tanks , the water transfer matrix To meet the ballast water constraint conditions, the initial temperature T and the cooling rate α are preset; the initial temperature is generally selected to be as large as possible to ensure that the algorithm has enough iterations to jump out of the local optimal solution, and the cooling rate is selected to be 0.95; S32 randomly selects two ballast tanks to transfer water randomly, and according to the cooling rate Perform a cooling operation to obtain a new ballast water distribution plan , Satisfy the ballast water constraints, compare and The loss between The loss is less than When As new ,when The loss is greater than When the probability As new ; S33. Repeat step S32 until the temperature is lower than the preset threshold, or the ballast water distribution plan If the current ballast water allocation plan remains unchanged for more than the preset number of times, the calculation ends. This is the optimal ballast water result.
[0047] The annealing algorithm is a random search and optimization algorithm that introduces randomness and temperature parameters by simulating the solid annealing process. In addition, the annealing algorithm allows the acceptance of inferior solutions by introducing probability, thereby improving the flexibility of the algorithm solution and avoiding falling into the local optimal solution.
[0048] In an optional embodiment, in step S32, comparing and The specific implementation method includes: calculating The objective function value of , and the current ballast water allocation scheme The objective function value of For comparison, > When The loss is less than .
[0049] The algorithm loss is determined by the objective function value. Since the purpose of the present invention is to minimize the ship ballast water adjustment amount, the objective function value of the new scheme is compared with the original scheme. When the function value of the new scheme is smaller than the original scheme, it means that the new scheme has smaller losses and is closer to the optimal solution.
[0050] In an optional embodiment, in step S32, the probability of As new , and its specific implementation method is: The calculation formula of probability P is:
[0051] in, ; Generate a random number n in the range of 0-1. When the random number n is greater than the probability P, As new , when the random number n is less than the probability P, the ballast water allocation scheme remains unchanged.
[0052] The present invention determines whether to accept a randomly generated solution with worse quality based on probability, so that the algorithm can jump out of the existing local optimal solution and allow flexible random selection in the search space to find the global optimal solution. The simulated annealing algorithm is an optimization algorithm that effectively avoids falling into a local minimum and eventually tends to a global optimal serial structure by giving the search process a time-varying and eventually zero probability jump. In addition, when the temperature gradually decreases, the probability of receiving a solution with worse quality will gradually decrease to ensure the calculation efficiency of the algorithm.
[0053] like Figure 3 As shown, according to the above rules and formulas, a complete annealing algorithm is performed with temperature and objective function iteration diagram.
[0054] Example 2 See also Figure 4 , a ship ballast water regulation system based on simulated annealing algorithm, comprising: The state acquisition module is used to obtain the ship's ballast tank information and the current ballast water state, and to construct an objective function based on the ballast tank information and the current ballast water state; Constraint building module, used to establish ballast water constraints on the objective function; The annealing simulation module is used to solve the objective function according to the ballast water constraint conditions by using the simulated annealing algorithm until an optimal solution is obtained, and the optimal solution is the ballast water regulation scheme; The ballast water adjustment module is used to adjust the current ballast water according to the ballast water adjustment plan.
[0055] The embodiment disclosed in this specification is only an example of a unilateral feature of the present invention, and the protection scope of the present invention is not limited to this embodiment, and any other functionally equivalent embodiments fall within the protection scope of the present invention. For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A ship ballast water regulation method based on simulated annealing algorithm, characterized in that: The following steps are involved: S1. Obtain the ship's ballast tank information and the current ballast water status, and construct an objective function based on the ballast tank information and the current ballast water status; S2. Establish ballast water constraints for the objective function; S3. Using a simulated annealing algorithm, the objective function is solved according to the ballast water constraint conditions until an optimal solution is obtained, wherein the optimal solution is the ballast water regulation scheme; S4. Adjust the current ballast water according to the ballast water adjustment plan.
2. A ship ballast water regulation method based on simulated annealing algorithm according to claim 1, characterized in that: In step S1, the ship ballast tank information includes the number of ballast tanks n, the maximum capacity of each ballast tank The current ballast water status includes the initial water volume in each ballast tank. .
3. A ship ballast water regulation method based on simulated annealing algorithm according to claim 2, characterized in that: In step S1, the specific formula of the objective function is: in, represents the amount of water transferred from ballast tank i to ballast tank j, Represents the water transfer matrix between ballast tanks.
4. A ship ballast water regulation method based on simulated annealing algorithm according to claim 3, characterized in that: In step S2, the ballast water constraints include: the final water volume of each ballast tank after allocation is equal to the initial water volume plus the transferred-in water volume minus the transferred-out water volume; the final water volume of each ballast tank does not exceed the maximum capacity of the compartment, nor is it less than 0; the total amount of ballast water in all ballast tanks remains unchanged.
5. A ship ballast water regulation method based on simulated annealing algorithm according to claim 4, characterized in that: The specific formula of the ballast water constraint condition is: in, represents the initial water volume of the jth ballast tank, represents the amount of water transferred from ballast tank i to ballast tank j; in, represents the current water volume of the jth ballast tank, represents the maximum capacity of the jth ballast tank; represents the amount of water in the jth ballast tank, represents the initial water volume of the jth ballast tank.
6. A ship ballast water regulation method based on simulated annealing algorithm according to claim 5, characterized in that: The ballast water constraint conditions also include: heel angle constraint and pitch angle constraint. The specific formula of heel angle constraint is: The specific formula for the pitch angle constraint is: in, Respectively indicate the cabin The vertical and horizontal positions, is the lateral metacentric height, is the length of the ship, represents the maximum allowable heel angle, Indicates the maximum allowable heel angle.
7. A ship ballast water regulation method based on simulated annealing algorithm according to claim 4, characterized in that: In step S3, the annealing algorithm is used to solve the objective function according to the ballast water constraint condition, and the specific implementation method is as follows: S31. Randomly generate a water transfer matrix between ballast tanks , the water transfer matrix Satisfy the ballast water constraint conditions, preset the initial temperature T and the cooling rate α; S32 randomly selects two ballast tanks to transfer water randomly, performs a cooling according to the cooling rate, and obtains a new ballast water distribution plan , Satisfy the ballast water constraints, compare and The loss between The loss is less than When As new ,when The loss is greater than When the probability As new ; S33. Repeat step S32 until the temperature is lower than the preset threshold, or the ballast water distribution plan If the current ballast water allocation plan remains unchanged for more than the preset number of times, the calculation ends. This is the optimal ballast water result.
8. A ship ballast water regulation method based on simulated annealing algorithm according to claim 7, characterized in that: In step S32, compare and The specific implementation method includes: calculating The objective function value of , and the current ballast water allocation scheme The objective function value of For comparison, > When The loss is less than .
9. A ship ballast water regulation method based on simulated annealing algorithm according to claim 7, characterized in that: In step S32, the probability As new , and its specific implementation method is: The calculation formula of probability P is: in, ; Generate a random number n in the range of 0-1. When the random number n is greater than the probability P, As new , when the random number n is less than the probability P, the ballast water allocation scheme remains unchanged.
10. A ship ballast water regulation system based on simulated annealing algorithm, characterized in that: include: The state acquisition module is used to obtain the ship's ballast tank information and the current ballast water state, and to construct an objective function based on the ballast tank information and the current ballast water state; Constraint building module, used to establish ballast water constraints on the objective function; The annealing simulation module is used to solve the objective function according to the ballast water constraint conditions by using the simulated annealing algorithm until an optimal solution is obtained, and the optimal solution is the ballast water regulation scheme; The ballast water adjustment module is used to adjust the current ballast water according to the ballast water adjustment plan.
Citation Information
Patent Citations
Self-adaptive heuristic algorithm for solving ship traffic organization and scheduling problem
CN114037252A
Ship path optimization method and device based on improved simulated annealing algorithm
CN116611759A
Automatic wharf ship container stowage method, device and equipment and storage medium
CN118115065A
Ship fuel consumption prediction method based on distributed energy efficiency calculation
CN118387260A
Production task scheduling method, system and device for flexible assembly job shop
US20240177251A1
