Ship Stowage Optimization Method, Device, Equipment and Medium Based on Ant Colony Algorithm
Optimizing ship cargo loading through ant colony algorithm solves the problem that manual experience in the existing technology is difficult to find the optimal solution, and the reduction of semi-submersible ship transportation costs and improvement of deck utilization are achieved.
Patent Information
- Application Number
- CN202410770949.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-06-14
AI Technical Summary
In the prior art, the size of the cargo modules in ship transportation is inconsistent and the loading and unloading ports are different. The loading method that relies on manual experience is time-consuming and it is difficult to find the optimal solution, resulting in high transportation costs.
The ship loading optimization method based on the ant colony algorithm is adopted to optimize the loading scheme of cargo on the ship deck by constructing a pheromone matrix, node transfer strategy and iterative calculation, and combine heuristic factors and pheromone concentration to calculate the optimal solution.
Under the satisfaction of constraints, the optimal cargo loading solution is quickly obtained, which reduces the transportation cost of semi-submersible ships and improves deck utilization and transportation efficiency.
Smart Images

Figure CN118657248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of shipping software development, and particularly relates to a ship stowage optimization method, device, equipment and medium based on the ant colony algorithm. Background Art
[0002] In recent years, the shipping industry has developed rapidly. Due to the advantages of large transportation capacity and low cost of ships, more and more transportation methods choose ships. For semi-submersible ships, the sizes of the cargo modules they transport are inconsistent, the loading and unloading ports between cargoes may be different, and the loading and unloading times may also be different. When selecting a carrier ship and an assembly plan for a voyage and determining the transportation cost, many factors are involved. If there are multiple carrier ships to choose from, different voyages and combinations of cargoes to be assembled can result in different transportation costs. By comparing different solutions and selecting the best one, the cost can be reduced.
[0003] Currently, in a single sea transportation project, there are problems of ship module stowage for multiple carrier ships and a large number of cargo transports, and most rely on manual experience for stowage to complete the transportation of cargo. This stowage method relying on manual experience requires a large amount of manpower, and it is difficult to obtain an optimal solution when the problem is too complex. How to achieve the purpose of reducing shipping costs through the optimal matching of ships, ports and cargoes is a problem that needs to be solved currently. Summary of the Invention
[0004] In view of the deficiencies of the prior art, the present invention proposes a ship stowage optimization method based on the ant colony algorithm, including a voyage cost function. The method includes:
[0005] Obtain a set of ships and a set of cargoes to be stowed to construct a pheromone matrix; establish a solution item for each ant;
[0006] Establish a single voyage in the solution item, randomly select the carrier ship for the voyage, and calculate the available deck area of the carrier ship according to the floating box plan;
[0007] Select and establish an alternative cargo set from the cargoes to be stowed based on the node transfer strategy, and stow the alternative cargo set on the deck;
[0008] Delete the alternative cargo set from the cargoes to be stowed, replace the carrier ship and stow again until the cargoes to be stowed are empty, and calculate the voyage cost function of the solution item;
[0009] Obtain the optimal solution item set through comparison operations and update the pheromone matrix, repeat the iteration until the number of iterations reaches a preset value, and obtain the optimal stowage plan.
[0010] In one embodiment, the probability determining factors of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration. The initial value of the pheromone concentration on each path is set to 50. The heuristic factor is the reciprocal of the difference in number of days between the planned loading time of the cargo to be assembled and the earliest planned loading time of the voyage.
[0011] In one embodiment, after deleting the candidate cargo set from the cargo to be loaded, replacing the carrier vessel and loading again until the cargo to be loaded is empty, calculating the voyage cost function of the solution item further includes:
[0012] After selecting a first carrier vessel and a set of alternative cargoes, a first cost is calculated according to the voyage cost function;
[0013] Select a second carrier based on the set of candidate cargoes, reassemble and calculate a second cost. Compare the first cost and the second cost, and retain the carrier with the lowest cost;
[0014] The carrier ship and the set of alternative cargoes for each voyage are obtained in sequence until all the cargoes to be loaded are assembled, and the cost of each voyage is calculated using the voyage cost function and added up to obtain the total cost of the solution item.
[0015] In one embodiment, when calculating the available deck area of the carrier vessel according to the pontoon solution, 3.5 times the actual available area of the carrier vessel is used as the available deck area.
[0016] In one embodiment, when selecting and establishing a set of alternative cargoes from the cargo to be loaded based on a node transfer strategy and loading the set of alternative cargoes onto the deck, the method further includes: setting the available deck area and cargo modules to rectangles, and filling the carrying ship using a residual matrix method.
[0017] In one embodiment, after selecting and establishing a set of candidate cargoes from the cargoes to be loaded based on the node transfer strategy and loading the set of candidate cargoes onto the deck, the method further includes:
[0018] Obtain the ship information of the carrier ship in the voyage, and obtain the loading and unloading port information and loading and unloading date information of each cargo module in the alternative cargo set on it;
[0019] The port sequence, route and speed of the voyage are calculated based on the ship information, loading and unloading port information and loading and unloading date information.
[0020] The present invention also provides a ship loading optimization device based on ant colony algorithm, comprising:
[0021] The condition setting module is used to obtain a set of ships and a set of cargoes to be loaded to construct a pheromone matrix; a solution item is created for each ant;
[0022] A ship selection module, which is used to establish a single voyage in the solution item, randomly select the carrier ship for the voyage, and calculate the available deck area of the carrier ship according to the floating box plan;
[0023] A cargo selection module, which is used to select and establish an alternative cargo set from the cargo to be stowed based on the node transfer strategy, and stow the alternative cargo set on the deck;
[0024] A cost calculation module, which is used to delete the alternative cargo set from the cargo to be stowed, replace the carrier ship and stow again until the cargo to be stowed is empty, and calculate the voyage cost function of the solution item;
[0025] An optimization and update module, which is used to obtain the optimal solution item set and update the pheromone matrix through comparison operations, repeat the iteration until the number of iterations reaches the preset value, and obtain the optimal stowage plan.
[0026] In one embodiment, the probability determining factors of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration. The initial value of the pheromone concentration on each path is set to 1, and the heuristic factor is the reciprocal of the difference in days between the planned loading time of the cargo to be assembled and the earliest planned loading time of the voyage.
[0027] The present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned ship stowage optimization method based on the ant colony algorithm is implemented.
[0028] The present invention also provides a computer storage medium, on which a computer program is stored. When the program is executed by a processor, the above-mentioned ship stowage optimization method based on the ant colony algorithm is implemented.
[0029] In the embodiment of the present invention, through the node transfer strategy of the ant colony algorithm, aiming at the characteristics of many semi-submersible ship cargos, many carrier ships, and many ports along the way in the semi-submersible ship transportation project, the cargo stowage of the semi-submersible ship is optimized. By iteratively calculating the optimal cargo stowage plan for each voyage, the ship, cargo, and port are matched, and the carrier ship and cargo with the lowest transportation cost for each voyage are obtained. This embodiment can accelerate the acquisition of the optimal stowage plan for the semi-submersible ship project, minimize the project transportation cost under the premise of meeting the constraints, and greatly reduce the semi-submersible ship transportation cost. Description of the Drawings
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0031] Figure 1 It is a schematic flowchart of the ship stowage optimization method based on the ant colony algorithm in the first embodiment of the present invention;
[0032] Figure 2 It is a detailed flowchart of the ship stowage optimization method based on the ant colony algorithm in the first embodiment of the present invention;
[0033] Figure 3 It is a detailed flowchart of step S4 in the first embodiment of the present invention;
[0034] Figure 4 It is a schematic diagram of the cargo module assembly after 20 generations of simulation iteration in the first embodiment of the present invention;
[0035] Figure 5 It is an iteration-cost convergence graph of the ant colony algorithm in the first embodiment of the present invention;
[0036] Figure 6 It is a structural block diagram of the ship stowage optimization device based on the ant colony algorithm in the second embodiment of the present invention;
[0037] Figure 7 It is a schematic diagram of the internal structure of a computer in another embodiment of the present invention. Specific Embodiments
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Well-known modules, units, and their connections, links, communications, or operations are not shown or not described in detail. And the described features, architectures, or functions can be combined in any way in one or more embodiments. Those skilled in the art should understand that the following various embodiments are only for illustration and not for limiting the protection scope of the present invention. It can also be easily understood that the modules, units, or processing methods in the embodiments described herein and shown in the drawings can be combined and designed in various different configurations. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0039] First Embodiment:
[0040] Please refer to Figures 1 to 5 As shown in Figures 1 to 5 , for the ship, cargo, and port matching problem of the semi-submersible ship transportation project, an embodiment of the present invention discloses an optimization method for ship stowage based on the ant colony algorithm to obtain the stowage project with the lowest transportation cost. First, a mathematical model of the cost of each voyage needs to be established, and the voyage cost function is obtained to provide a reference for subsequent cost calculations. The method includes:
[0041] S1 Obtain the set of ships and the set of goods to be stowed to construct a pheromone matrix; establish a solution item for each ant;
[0042] It can be understood that the basic idea of the ant colony algorithm is that the walking path of ants represents the feasible solution of the problem to be optimized, and all the paths of the entire ant colony constitute the solution space of the problem to be optimized. Ants with shorter paths release more pheromone. As time goes by, the pheromone concentration on the shorter paths gradually increases, and the number of ants choosing this path also increases. Eventually, the entire ant colony will concentrate on the best path under the action of positive feedback, and at this time, it corresponds to the optimal solution of the problem to be optimized. Since the optimization of ship module stowage is a random search problem, the ant colony algorithm, a heuristic algorithm, is considered for solution. In the ant colony algorithm, the node transfer probability is jointly determined by pheromone and heuristic factors. The heuristic factor is the reciprocal of the difference in the number of days between the planned loading time of the goods to be stowed and the earliest planned loading time of this voyage. The initial value of the pheromone concentration on each path is 50. When constructing the pheromone matrix, since the carrier ship and cargo module need to be randomly selected, assuming the number of candidate carrier ships is m and the number of goods to be stowed is n, the scale of the pheromone matrix is m*n.
[0043] Specifically, each ant in the ant colony algorithm establishes a solution item, and each solution item is a solution. The set of all stowage plans is the solution set of each generation in the ant colony algorithm. The solution of each solution item includes the voyage information of all voyages in the stowage plan, at least including the selected carrier ship, loaded cargo information, route, and ship speed of this voyage. Steps S2 to S4 are the solution process of each ant:
[0044] S2 Establish a single voyage in the solution item, randomly select the carrier ship of the voyage, and calculate the available deck area of the carrier ship according to the floating box plan;
[0045] It is understandable that when calculating the available deck area of the carrier ship according to the floating box plan, the floating box plan of the ship needs to be determined. One can be selected from the floating box plans of the ship, or one can be randomly selected, and 3.5 times the actual available area of the carrier ship is used as the available deck area. When the goods are placed on the deck of the semi-submersible ship, they can appropriately extend out of the deck. Using 3.5 times the actual available area of the ship as the available deck area can effectively improve the utilization rate of the ship's deck, thereby improving the economic benefits of this voyage. In this embodiment, 3.5 times is the preferred embodiment, but the specific multiple is not limited.
[0046] Furthermore, considering the mobilization and demobilization costs, it is preferred to select a ship that is already on voyage, provided that the shipping schedule meets the conditions. When all ships are on voyage and the return dates are difficult to meet the loading time requirements of the goods to be loaded, cargo extension operations need to be carried out, and an optimal "extended ship" is selected. The shipping schedule of the selected ship needs to meet the requirements.
[0047] S3 Select and establish an alternative cargo set from the goods to be loaded based on the node transfer strategy, and load the alternative cargo set onto the deck;
[0048] It is understandable that after the ship is selected, the goods that do not meet the constraint conditions need to be removed from the goods to be loaded, and then an alternative cargo set is established. The constraint conditions include that the carrier ship can berth at all the loading and unloading ports corresponding to the goods.
[0049] Specifically, the goods on a semi-submersible ship are usually loaded on board by roll-on / roll-off. When the roll-on / roll-off goods are assembled, their assembly paths may be blocked by other goods. In order to achieve the effect that the assembly paths between loading and unloading goods do not interfere while completing the assembly, the present application also proposes a remaining matrix algorithm based on grouping and sorting to stow the alternative goods set on the deck. The specific steps are as follows: Obtain the semi-submersible ship transportation project information, where the semi-submersible ship transportation project information includes the available deck area of the ship and the goods set to be stowed including several pieces of goods; Group the goods set to be stowed according to the loading port to obtain a port grouping set including several goods groups, sort the goods groups in the port grouping set according to the loading time, and sort the goods in each goods group according to the goods length; Take out the goods from the goods group with the first group order, establish the first column on the side of the available deck area close to the bow of the ship, and fill the goods in the first column, where the length of the first column is equal to the length of the goods module; Select and use the remaining matrix algorithm to fill the goods in the first column in sequence from the goods group until no more goods can be filled in the first column, then create the second column on the side of the first column far from the bow and fill the goods sorted in front into it, and use the remaining matrix algorithm to fill the second column again; Repeat this step until the goods set to be stowed is empty, then the stowage optimization of the ship is completed. By grouping and sorting the goods set to be stowed according to the port order grouping and time and goods length sorting, when arranging the goods stowage, the goods with the front port order and the front loading time are preferentially filled into the interior of the semi-submersible ship deck. At the same time, the remaining matrix algorithm is used to fill the goods according to the goods length, ensuring that the goods from the same loading port are filled in the same column of the available deck area as much as possible, and the goods with larger volumes are generated into separate columns, and the large-volume and small-volume goods are filled in the same column to make full use of the deck, avoiding blocking the roll-on / roll-off paths of the goods at subsequent ports, and improving the deck utilization rate on the premise of meeting the loading requirements.
[0050] S4 Delete the alternative goods set from the goods to be stowed, replace the carrier ship and perform stowage again until the goods to be stowed are empty, and calculate the voyage cost function of the solution item;
[0051] Further, as Figure 3 shown, step S4 also includes the following steps:
[0052] S41 After selecting the first carrier ship and the alternative goods set, calculate the first cost according to the voyage cost function;
[0053] S42 Select a second carrier ship again according to the set of alternative goods, re-assemble and calculate the second cost. Compare the first cost and the second cost, and retain the carrier ship with the minimum cost; the sailing schedule of the second carrier ship needs to meet the requirements, and re-assemble and calculate the cost for all carrier ships whose sailing schedules meet the requirements in turn, so as to select the ship with the minimum voyage cost.
[0054] It can be understood that ships with a smaller available deck area have relatively lower sailing costs. By retaining the route and goods and calculating the cost of the originally assembled goods on the second carrier ship, the ship with the lowest cost can be obtained, achieving the effect of reducing sailing costs.
[0055] S43 Obtain the carrier ship and the set of alternative goods for each voyage in turn until all the goods to be stowed are assembled. Calculate the cost of each voyage through the voyage cost function and add them up to obtain the total cost of the solution item.
[0056] It can be understood that the total cost of this solution item is one of the solutions of the contemporary ants. By obtaining the total cost of each contemporary solution and comparing the costs, the optimal solution can be selected.
[0057] S5 Obtain the optimal solution item set through comparison operations and update the pheromone matrix, and repeat the iteration until the number of iterations reaches the preset value to obtain the optimal stowage plan. After each generation cycle, update the pheromone matrix to make the random selection of ants more tendentious. This step is the key to making the algorithm converge and tend to the better solution.
[0058] Preferably in this embodiment, when selecting and establishing a set of alternative goods from the goods to be stowed based on the node transfer strategy and stowing the set of alternative goods on the deck, it further includes: setting both the available deck area and the cargo module as rectangles, and filling the carrying ship by the remaining matrix method.
[0059] Preferably in this embodiment, in order to make the voyage have a reasonable port sequence, route, and sailing speed, so as to plan the route in advance and reduce the sailing cost, after selecting and establishing a set of alternative goods from the goods to be stowed based on the node transfer strategy and stowing the set of alternative goods on the deck, it further includes:
[0060] Obtain the ship information of the carrier ship in the voyage, and obtain the loading and unloading port information and loading and unloading date information of each cargo module in the set of alternative goods thereon;
[0061] Calculate the port sequence, route, and sailing speed of the voyage according to the ship information, loading and unloading port information, and loading and unloading date information.
[0062] In the embodiment of the present invention, through the node transfer strategy of the ant colony algorithm, aiming at the characteristics of many goods on the semi-submersible ship, many carrying ships, and many ports along the way in the semi-submersible ship transportation project, the cargo stowage of the semi-submersible ship is optimized. By iteratively calculating the optimal cargo stowage plan for each voyage, the ship, cargo, and port are matched, and the carrying ship and cargo with the lowest transportation cost for each voyage are obtained. This embodiment can accelerate the acquisition of the optimal stowage plan for the semi-submersible ship project, minimize the project transportation cost under the premise of meeting the constraints, and greatly reduce the semi-submersible ship transportation cost.
[0063] For the convenience of understanding, the following simulation description is given by taking an actual semi-submersible ship project as an example in this embodiment:
[0064] The optional ship types are shown in the following table:
[0065]
[0066]
[0067] In this embodiment, the goods to be stowed are not set with an expected unloading date. The longitudinal spacing between the goods is 2m, the lateral spacing is 2m, and the maximum extensible length is 3m.
[0068] The goods to be stowed are shown in the following table:
[0069]
[0070]
[0071]
[0072] Among them, the loading port and the unloading port are PO1 and PO2 respectively;
[0073] The routes along the way are as follows:
[0074] Shipping route Origin port Canal code Distance Persian Gulf shipping route PO1 1 10000 Cape of Good Hope shipping route PO2 0 16000
[0075] As Figure 4 shown, after the above-mentioned cargo modules are optimized by the hybrid optimization method for semi-submersible ship module stowage proposed in this embodiment, the following assembly plan is obtained:
[0076] The first voyage is: V01_XYK_01, start date: 2021-04-29 00:00:00, end date: 2021-07-04 21:41:29.142857, deck utilization rate: 62.68%, and a total of 19 cargos are loaded.
[0077] The second voyage is: V02_DONGBANGGIANTNO.7_01, start date: 2021-04-29 00:00:00, end date: 2021-07-17 02:00:37.565217, deck utilization rate: 83.97%, a total of 7 cargos were loaded:
[0078] The third voyage is: V03_DBG3_01, start date: 2021-04-29 00:00:00, end date: 2021-07-02 05:22:17.142857, deck utilization rate: 57.58%, a total of 4 cargos were loaded.
[0079] The fourth voyage is: V04_XHK_01, start date: 2021-05-01 00:00:00, end date: 2021-07-07 14:58:17.142857, deck utilization rate: 69.73%, a total of 11 cargos were loaded.
[0080] The fifth voyage is: V05_HXL_01, start date: 2021-05-03 00:00:00, end date: 2021-07-20 05:22:13.565217, deck utilization rate: 72.11%, a total of 8 cargos were loaded.
[0081] The sixth voyage is: V06_XAK_01, start date: 2021-05-04 00:00:00, end date: 2021-07-10 07:17:29.142857, deck utilization rate: 72.14%, a total of 13 cargos were loaded.
[0082] The seventh voyage is: V07_TAK_01, start date: 2021-05-04 00:00:00, end date: 2021-07-08 02:58:17.142857, deck utilization rate: 77.70%, a total of 4 cargos were loaded.
[0083] The eighth voyage is: V08_HSL_01, start date: 2021-05-05 00:00:00, end date: 2021-07-21 11:36:37.565217, deck utilization rate: 61.42%, a total of 9 cargos were loaded.
[0084] The ninth voyage is: V09_ZYK_01, start date: 2021-06-22 00:00:00, end date: 2021-08-24 18:19:53.142857, deck utilization rate: 38.52%, a total of 9 cargos were loaded.
[0085] This simulation was iterated 20 times through the ant colony algorithm, and the optimal solutions of the objective function for each generation are as follows Figure 5 shown. The finally obtained minimum cost ($) is: 52742260.533126295, and the total time taken is 11.00 s. It can be seen that under the premise of meeting the actual constraints, this application can quickly calculate and obtain the semi-submersible ship freight plan with the lowest cost.
[0086] Second Embodiment:
[0087] Please refer to Figure 6 shown. The present invention also provides a ship stowage optimization device 100 based on the ant colony algorithm, including a condition setting module 110, which is used to obtain a set of ships and a set of goods to be stowed to construct a pheromone matrix; and establish a solution item for each ant;
[0088] A ship selection module 120, which is used to establish a single voyage in the solution item, randomly select the carrier ship for the voyage, and calculate the available deck area of the carrier ship according to the floating box plan;
[0089] A cargo selection module 130, which is used to select and establish an alternative cargo set from the goods to be stowed based on the node transfer strategy, and stow the alternative cargo set on the deck;
[0090] A cost calculation module 140, which is used to delete the alternative cargo set from the goods to be stowed, replace the carrier ship and stow again until the goods to be stowed are empty, and calculate the voyage cost function of the solution item;
[0091] An optimization and update module 150, which is used to obtain the optimal solution item set through comparison operations and update the pheromone matrix, and repeat the iteration until the number of iterations reaches a preset value to obtain the optimal stowage plan.
[0092] As a preferred solution rather than a limitation, the probability determining factors of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration. The initial value of the pheromone concentration on each path is set to 1, and the heuristic factor is the reciprocal of the difference in days between the planned loading time of the goods to be assembled and the earliest planned loading time of the voyage.
[0093] The modules in this embodiment are the same as the corresponding steps in the above method embodiment, and will not be elaborated here.
[0094] In the embodiments of the present invention, through the node transfer strategy of the ant colony algorithm, aiming at the characteristics of many goods on the semi-submersible ship, many carrier ships, and many ports along the way in the semi-submersible ship transportation project, the cargo stowage of the semi-submersible ship is optimized. By iteratively calculating the optimal cargo stowage plan for each voyage, the ship, cargo, and port are matched, and the carrier ship and cargo with the lowest transportation cost for each voyage are obtained. This embodiment can accelerate the acquisition of the optimal stowage plan for the semi-submersible ship project, minimize the project transportation cost under the premise of meeting the constraints, and greatly reduce the transportation cost of the semi-submersible ship.
[0095] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here.
[0096] The embodiments of the present invention also provide a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the ship stowage optimization method based on the ant colony algorithm in the above embodiments.
[0097] Alternatively, if the above integrated unit is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the methods of the embodiments of the present invention. The foregoing storage medium includes: various media such as mobile storage devices, RAM, ROM, magnetic disks, or optical disks that can store program codes.
[0098] Corresponding to the above computer storage medium, in an embodiment, a computer device is also provided. The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the ship stowage optimization method based on the ant colony algorithm in the above embodiments.
[0099] The computer device may be a terminal, and its internal structure diagram may be as Figure 7As shown in the figure. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a ship stowage optimization method based on the ant colony algorithm. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0100] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0101] The above embodiments only express several implementation manners of the present invention. The description is relatively specific and detailed, but it cannot be understood as a limitation to the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the invention patent should be subject to the appended claims.
Claims
1. A ship stowage optimization method based on the ant colony algorithm, characterized in that Including a voyage cost function, the method includes: Obtaining a set of ships and a set of goods to be stowed to construct a pheromone matrix; establishing a solution item for each ant; Establishing a single voyage in the solution item, randomly selecting the carrying ship for the voyage, and calculating the available deck area of the carrying ship according to the floating box plan; where 3.5 times the actual available area of the carrying ship is used as the available deck area; Selecting and establishing an alternative cargo set from the goods to be stowed based on the node transfer strategy, and stowing the alternative cargo set on the deck; the probability determining factors of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration, setting the initial value of the pheromone concentration on each path to 50, and the heuristic factor being the reciprocal of the difference in days between the planned loading time of the goods to be assembled and the earliest planned loading time of the voyage; Deleting the alternative cargo set from the goods to be stowed, replacing the carrying ship and stowing again until the goods to be stowed are empty, and calculating the voyage cost function of the solution item; Obtaining the optimal solution item set through comparison operations and updating the pheromone matrix, repeating the iteration until the number of iterations reaches a preset value, and obtaining the optimal stowage plan; Among them, the step of stowing the alternative cargo set on the deck includes: Obtaining semi-submersible ship transportation project information, where the semi-submersible ship transportation project information includes the available deck area of the ship and a set of goods to be stowed including several pieces of goods; grouping the set of goods to be stowed by loading port to obtain a port grouping set including several cargo groupings, sorting the cargo groupings in the port grouping set by loading time, and sorting the goods in each cargo grouping by cargo length; taking out the goods from the cargo grouping with the first group order, establishing a first column on the side of the available deck area close to the bow of the ship, and filling the goods in the first column, the length of the first column being equal to the length of the cargo module; sequentially selecting and using the remaining matrix algorithm to fill the goods in the first column until no more goods can be filled in the first column, then creating a second column on the side of the first column away from the bow and filling the goods with the earlier sorting into it, and using the remaining matrix algorithm to fill the second column again; repeating this step until the set of goods to be stowed is empty, then the stowage optimization of the ship is completed; Among them, when selecting and establishing an alternative cargo set from the goods to be stowed based on the node transfer strategy and stowing the alternative cargo set on the deck, it also includes: setting both the available deck area and the cargo module as rectangles, and filling the carrying ship by the remaining matrix method.
2. The method according to claim 1, characterized in that, When deleting the alternative cargo set from the goods to be stowed, replacing the carrying ship and stowing again until the goods to be stowed are empty, and calculating the voyage cost function of the solution item, it also includes: After selecting the first carrying ship and the alternative cargo set, calculating the first cost according to the voyage cost function; Selecting a second carrying ship again according to the alternative cargo set, re-assembling and calculating the second cost; comparing the first cost and the second cost, and retaining the carrying ship with the minimum cost; Obtain the carrying vessel for each voyage and the set of alternative goods in sequence until all the goods to be stowed are assembled. Calculate the cost of each voyage using the voyage cost function and sum them up to obtain the total cost of the solution item.
3. The method according to claim 1, characterized in that After selecting and establishing a set of alternative goods from the goods to be stowed based on the node transfer strategy and stowing the set of alternative goods on the deck, it further includes: Obtain the vessel information of the carrying vessel in the voyage, and obtain the loading and unloading port information and loading and unloading date information of each cargo module in the set of alternative goods thereon; Calculate the port sequence, route and sailing speed of the voyage according to the vessel information, loading and unloading port information and loading and unloading date information.
4. A ship stowage optimization device based on the ant colony algorithm, characterized in that It includes: A condition setting module, which is used to obtain a set of vessels and a set of goods to be stowed to construct a pheromone matrix; establish a solution item for each ant; A vessel selection module, which is used to establish a single voyage in the solution item, randomly select the carrying vessel of the voyage, and calculate the available deck area of the carrying vessel according to the floating box plan; When calculating the available deck area of the carrying vessel according to the floating box plan, take 3.5 times the actual available area of the carrying vessel as the available deck area; A cargo selection module, which is used to select and establish a set of alternative goods from the goods to be stowed based on the node transfer strategy, stow the set of alternative goods on the deck, then set both the available deck area and the cargo module as rectangles, and fill the carrying vessel using the remaining matrix method; wherein the probability determining factors of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration. Set the initial value of the pheromone concentration on each path to 50, and the heuristic factor is the reciprocal of the difference in days between the planned loading time of the goods to be assembled and the earliest planned loading time of the voyage; the step of stowing the set of alternative goods on the deck includes: obtaining semi-submersible ship transportation project information, where the semi-submersible ship transportation project information includes the available deck area of the ship and the set of goods to be stowed including several pieces of goods; group the set of goods to be stowed according to the loading port to obtain a port grouping set including several cargo groupings, sort the cargo groupings in the port grouping set according to the loading time, and sort the goods in each cargo grouping according to the cargo length; take out the goods from the cargo grouping with the first group order, establish the first column on the side of the available deck area close to the bow of the ship, and fill the goods in the first column, where the length of the first column is equal to the length of the cargo module; sequentially select and use the remaining matrix algorithm to fill the goods in the first column until no more goods can be filled in the first column, then create the second column on the side of the first column far from the bow and fill the goods with the earlier sorting into it, and use the remaining matrix algorithm to fill the second column again; repeat this step until the set of goods to be stowed is empty, then the stowage optimization of the ship is completed; A cost calculation module, which is used to delete the set of alternative goods from the goods to be stowed, replace the carrying vessel and perform stowage again until the goods to be stowed are empty, and calculate the voyage cost function of the solution item. An optimization and update module, which is used to obtain an optimal solution set through comparison operations and update the pheromone matrix, and repeat the iteration until the number of iterations reaches a preset value to obtain an optimal stowage plan.
5. The device according to claim 4, characterized in that, The probability determinants of the node transfer strategy of the ant colony algorithm include a heuristic factor and a pheromone concentration. The initial value of the pheromone concentration on each path is set to 1, and the heuristic factor is the reciprocal of the difference in days between the planned loading time of the goods to be assembled and the earliest planned loading time of the voyage.
6. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the ship stowage optimization method based on the ant colony algorithm according to any one of claims 1 to 3.
7. A computer storage medium, on which a computer program is stored, characterized in that, When the program is executed by the processor, it implements the ship stowage optimization method based on the ant colony algorithm according to any one of claims 1 to 3.
Citation Information
Patent Citations
Task ship determination method and device
CN116663800A
Ship scheduling and berth allocation collaborative optimization method based on demand prediction
CN117332996A