Pallet distribution method and device, computer equipment, readable storage medium and program product
By iteratively optimizing the distribution of cargo pallets between ships using multiple search operators during the pallet allocation process, the problem of inaccurate distribution in the prior art is solved, and a lower cost and more accurate pallet allocation is achieved.
Patent Information
- Application Number
- CN202510471508.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, there is a problem of inaccurate allocation of cargo pallets, especially when considering the weight/volume of the cargo and the load/capacity of the ship, which can easily lead to deviations in the number of ships of each route.
By obtaining the current pallet allocation plan and the pallet adjustment rules indicated by the search operator, the distribution of pallets between ships is gradually optimized, and multiple search operators iteratively find solutions with lower transportation costs, avoiding prematurely falling into the local optimal solution until the iteration end condition is met.
It improves the accuracy and rationality of the pallet distribution plan, increases the possibility of finding the global optimal pallet distribution plan, and reduces the total cost of the transportation process.
Smart Images

Figure CN120373764A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of shipping, and in particular, to a method, device, computer device, computer-readable storage medium, and computer program product for pallet allocation. Background Art
[0002] Maritime transportation is suitable for the transportation of bulk commodities because of its low freight rate, large carrying capacity, long voyage, etc.
[0003] In the actual shipping process, when users need to transport bulk commodities, algorithm rules can be used for ship dispatch. However, this method often only refers to some simple information, such as cargo weight / volume, ship load / capacity, etc., and there are often deviations in the number of ships allocated to each route, resulting in inaccurate and unreasonable pallet allocation plans.
[0004] Therefore, the pallet allocation plan in the related technology has the problem of inaccurate allocation. Summary of the Invention
[0005] Based on this, it is necessary to provide a pallet allocation method, device, computer device, computer-readable storage medium, and computer program product that can improve the accuracy of the pallet allocation plan for the above technical problems.
[0006] In a first aspect, this application provides a pallet allocation method, including:
[0007] Obtain the current pallet allocation plan; the current pallet allocation plan is used to indicate the pallets currently required by the ships in the ship set; the ship set includes at least two ships;
[0008] Obtain the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets currently required between every two of the ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched;
[0009] In the case where the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, use the new pallet allocation plan as the new current pallet allocation plan;
[0010] In the case where the preset iteration end condition is not satisfied, use another search operator to be searched among the multiple search operators as the new current search operator;
[0011] Return to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and output the current pallet allocation plan.
[0012] In one embodiment, when the transportation cost corresponding to the new pallet allocation scheme is lower than the transportation cost corresponding to the current pallet allocation scheme, taking the new pallet allocation scheme as the new current pallet allocation scheme includes: traversing all new pallet allocation schemes obtained by adjusting the pallets required for current services between every two of the ships according to the pallet adjustment rules indicated by the current search operator; wherein, when the transportation cost corresponding to the currently traversed new pallet allocation scheme is lower than the transportation cost corresponding to the current pallet allocation scheme, taking the new pallet allocation scheme as the new current pallet allocation scheme. In one embodiment, the traversing all new pallet allocation schemes obtained by adjusting the pallets required for current services between every two of the ships according to the pallet adjustment rules indicated by the current search operator includes: obtaining all combinations of every two ships in the ship set according to the pallet adjustment rules indicated by the current search operator; obtaining a new pallet allocation scheme obtained by adjusting the pallets required for current services between the current combinations according to the pallet adjustment rules indicated by the current search operator; the current combination is a combination to be adjusted among all combinations of every two ships; when there are other combinations to be adjusted among all combinations of every two ships, determining one combination among the other combinations to be adjusted as the new current combination, and returning to the step of obtaining a new pallet allocation scheme obtained by adjusting the pallets required for current services between the current combinations until there are no other combinations to be adjusted among all combinations of every two ships. In one embodiment, when the current search operator is the first search operator, the current combination includes a first ship and a second ship, and the obtaining a new pallet allocation scheme obtained by adjusting the pallets required for current services between the current combinations according to the pallet adjustment rules indicated by the current search operator includes: obtaining a first pallet allocation scheme according to the pallet adjustment rules indicated by the first search operator; the first pallet allocation scheme is used to adjust the target pallet required for current services of the first ship to the second ship; the target pallet is a pallet that conforms to the pallet adjustment rules indicated by the first search operator; taking the first pallet allocation scheme as the new pallet allocation scheme.In one embodiment, when the current search operator is the second search operator, the current combination includes a first ship and a second ship. Obtaining a new pallet allocation plan by adjusting the pallets of the current required services among the current combinations according to the pallet adjustment rule indicated by the current search operator includes: obtaining a second pallet allocation plan according to the pallet adjustment rule indicated by the second search operator; the second pallet allocation plan is used to adjust the first pallet required by the first ship for the current service to the second ship, and adjust the second pallet required by the second ship for the current service to the first ship; both the first pallet and the second pallet conform to the pallet adjustment rule indicated by the second search operator; and taking the second pallet allocation plan as the new pallet allocation plan. In one embodiment, the method further includes: determining that the iteration end condition is satisfied and outputting the current pallet allocation plan when there is no search operator to be searched among the multiple search operators or the number of iterations meets a preset number threshold.
[0013] In a second aspect, the present application further provides a pallet allocation device, including: a plan acquisition module, configured to acquire a current pallet allocation plan; the current pallet allocation plan is used to indicate the pallets required by the ships in the ship set for the current service; the ship set includes at least two ships; a rule acquisition module, configured to acquire the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets required by the current service between every two of the ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched; an update module, configured to take the new pallet allocation plan as the new current pallet allocation plan when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan; a change module, configured to take another search operator to be searched among the multiple search operators as the new current search operator when the preset iteration end condition is not satisfied; and an iteration module, configured to return to the step of acquiring the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied and output the current pallet allocation plan.
[0014] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented. In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by the processor, the steps of the above method are implemented. In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.
[0015] The above pallet allocation method, device, computer device, computer-readable storage medium, and computer program product obtain the current pallet allocation plan; the current pallet allocation plan is used to indicate the pallets currently required by the ships in the ship set; the ship set includes at least two ships; obtain the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets currently required between two ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched; when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, the new pallet allocation plan is used as the new current pallet allocation plan; when the preset iteration end condition is not satisfied, another search operator to be searched among the multiple search operators is used as the new current search operator; return to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and output the current pallet allocation plan.
[0016] In this way, the present application continuously searches for a new pallet allocation plan with a lower transportation cost under the condition of satisfying the pallet adjustment rule and uses it as the new current pallet allocation plan. By continuously iteratively searching for different pallet adjustment rules indicated by multiple search operators, the allocation of pallets among ships can be gradually optimized, thereby reducing the cost of the entire transportation process. Moreover, by using multiple search operators and continuously switching the search operator to be searched when the iteration end condition is not satisfied, it is possible to search in a larger solution space. This helps to avoid prematurely falling into a local optimal solution, increases the possibility of finding the global optimal pallet allocation plan, makes the finally obtained pallet allocation plan more likely to be optimal or close to optimal, and effectively enhances the accuracy and rationality of the pallet allocation plan. Description of the Drawings
[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0018] Figure 1 It is a schematic flowchart of a pallet allocation method in an embodiment.
[0019] Figure 2 It is a schematic diagram of the principle of a search operator in an embodiment.
[0020] Figure 3 It is a schematic diagram of the principle of another search operator in an embodiment.
[0021] Figure 4 It is a schematic flowchart of a pallet allocation method in another embodiment.
[0022] Figure 5 It is a schematic flowchart of a pallet allocation method in yet another embodiment.
[0023] Figure 6 It is a schematic flowchart of yet another pallet allocation method in an embodiment.
[0024] Figure 7 It is a structural block diagram of a pallet allocation device in an embodiment.
[0025] Figure 8 It is an internal structure diagram of a computer device in an embodiment. Specific Embodiments
[0026] In order to make the objectives, technical solutions and advantages of the present application more clear, the following further details the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0028] In one embodiment, as Figure 1 shown, a pallet allocation method is provided. In this embodiment, taking the application of this method to a computer device as an example, it can be understood that the computer device can be a terminal, a server, or a system including a terminal and a server. In this embodiment, the method includes the following steps:
[0029] Step S110, obtain the current pallet allocation plan.
[0030] Among them, the current pallet allocation plan can be a pallet allocation plan obtained by matching the pallets to be allocated with the ships in the ship set.
[0031] Among them, the current pallet allocation plan is used to indicate the pallets currently required by the ships in the ship set.
[0032] Among them, the ship set includes at least two ships.
[0033] Step S120, obtain the pallet adjustment rule indicated by the current search operator.
[0034] Among them, the pallet adjustment rule is used to adjust the pallets currently required between two ships to obtain a new pallet allocation plan.
[0035] Among them, the current search operator is one of the multiple search operators to be searched.
[0036] In specific implementation, the pallet adjustment rule indicated by the current search operator can be used to adjust the pallets currently required between two ships, so as to obtain a new pallet allocation plan.
[0037] Step S130, when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, use the new pallet allocation plan as the new current pallet allocation plan.
[0038] In specific implementation, if the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, the current pallet allocation plan can be updated, and the new pallet allocation plan can be used as the new current pallet allocation plan.
[0039] Among them, the transportation cost corresponding to the pallet allocation plan refers to the sum of the transportation costs of each ship under the corresponding sailing path in the pallet allocation plan.
[0040] Step S140, when the preset iteration end condition is not satisfied, use another search operator to be searched among the multiple search operators as the new current search operator.
[0041] Among them, the preset iteration end condition may include that there is no search operator to be searched among multiple search operators, or the number of iterations meets a preset number threshold.
[0042] Step S150: Return to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is met, and output the current pallet allocation plan.
[0043] In specific implementation, when the preset iteration end condition is not met, after using another search operator to be searched among multiple search operators as the new current search operator, the computer device can return to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is met, and output the current pallet allocation plan.
[0044] In the above pallet allocation method, by obtaining the current pallet allocation plan, which is used to indicate the pallets currently required by the ships in the ship set, the ship set includes at least two ships, obtaining the pallet adjustment rule indicated by the current search operator, the pallet adjustment rule is used to adjust the currently required pallets between two ships to obtain a new pallet allocation plan, the current search operator is one of the search operators to be searched among multiple search operators, when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, using the new pallet allocation plan as the new current pallet allocation plan, when the preset iteration end condition is not met, using another search operator to be searched among multiple search operators as the new current search operator, and returning to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is met, and outputting the current pallet allocation plan.
[0045] In this way, when the pallet adjustment rule is met, the present application continuously searches for a new pallet allocation plan with a lower transportation cost and uses it as the new current pallet allocation plan. By continuously iteratively searching for different pallet adjustment rules indicated by multiple search operators, the allocation of pallets among ships can be gradually optimized, thereby reducing the cost of the entire transportation process. Moreover, by using multiple search operators and continuously switching the search operators to be searched when the iteration end condition is not met, it is possible to search within a larger solution space. This helps to avoid falling into a local optimal solution prematurely, increases the possibility of finding the global optimal pallet allocation plan, makes the finally obtained pallet allocation plan more likely to be optimal or close to optimal, and effectively enhances the accuracy and rationality of the pallet allocation plan.
[0046] In one embodiment, when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan includes: traversing all new pallet allocation plans obtained by adjusting the pallets required for current services between every two ships under the pallet adjustment rules indicated by the current search operator.
[0047] Among them, when the transportation cost corresponding to the currently traversed new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan.
[0048] In specific implementation, the computer device can adjust the pallets required for current services between every two ships under the pallet adjustment rules indicated by the current search operator to obtain new pallet allocation plans. Among them, since the ship set includes at least two ships and there are multiple combinations of every two ships, adjusting the pallets required for current services between every two ships can obtain multiple new pallet allocation plans. During the process of traversing all combinations of every two ships to adjust the pallets required for current services, the transportation cost corresponding to the newly traversed new pallet allocation plan can be calculated. When the transportation cost corresponding to the currently traversed new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan.
[0049] In practical applications, during the process of the computer device traversing all new pallet allocation plans obtained by adjusting the pallets required for current services between every two ships under the pallet adjustment rules indicated by the current search operator, the computer device can obtain all combinations of every two ships in the ship set under the pallet adjustment rules indicated by the current search operator; then, obtain the new pallet allocation plan obtained by adjusting the pallets required for current services between the current combinations under the pallet adjustment rules indicated by the current search operator; the current combination is a combination to be adjusted among all combinations of every two ships; when there are other combinations to be adjusted among all combinations of every two ships, determining one combination among the other combinations to be adjusted as the new current combination, and returning to the step of obtaining the new pallet allocation plan obtained by adjusting the pallets required for current services between the current combinations under the pallet adjustment rules indicated by the current search operator until there are no other combinations to be adjusted among all combinations of every two ships, so that the currently iteratively obtained current pallet allocation plan under the current search operator is the local optimal solution under the current search operator, that is, the pallet allocation plan with the lowest transportation cost under the current search operator.
[0050] In the technical solution of this embodiment, by traversing all new pallet allocation schemes obtained by adjusting the pallets required for the current service between two ships under the pallet adjustment rules indicated by the current search operator; among them, when the transportation cost corresponding to the newly traversed pallet allocation scheme is lower than the transportation cost corresponding to the current pallet allocation scheme, the new pallet allocation scheme is used as the new current pallet allocation scheme.
[0051] In this way, the current pallet allocation scheme finally obtained by iteration under the current search operator is the local optimal solution under the current search operator, that is, the pallet allocation scheme with the lowest transportation cost under the current search operator, and the local optimal solution under the current search operator can be accurately searched.
[0052] In some embodiments, the current search operator includes one of a first search operator or a second search operator. Among them, the first search operator is used to reallocate ships between different routes and change the allocated quantity. The second search operator is used to change the ship dispatching plan by exchanging ships between different routes.
[0053] Specifically, the pallet adjustment rules indicated by the first search operator are used to adjust the pallets required for the current service of one of the ships in the current combination to another ship in the current combination. The pallets at the specific positions to be adjusted need to be determined according to the pallet adjustment rules indicated by the first search operator. For example, the current combination includes a first ship and a second ship, and the pallet adjustment rules indicated by the first search operator can be used to adjust some of the pallets required for the current service of the first ship to the second ship.
[0054] In practical applications, the first search operator may refer to the relocate operator.
[0055] In one embodiment, when the current search operator is the first search operator, the current combination includes a first ship and a second ship. Obtaining a new pallet allocation scheme by adjusting the pallets required for the current service between the current combinations under the pallet adjustment rules indicated by the current search operator includes: obtaining a first pallet allocation scheme according to the pallet adjustment rules indicated by the first search operator; the first pallet allocation scheme is used to adjust the target pallets required for the current service of the first ship to the second ship; the target pallets are the pallets that meet the pallet adjustment rules indicated by the first search operator; and taking the first pallet allocation scheme as the new pallet allocation scheme.
[0056] In a specific implementation, when the current search operator is the first search operator, the current combination includes a first ship and a second ship. When the computer device obtains a new pallet allocation plan obtained by adjusting the pallets of the current required services among the current combinations according to the pallet adjustment rules indicated by the current search operator, the computer device may obtain a first pallet allocation plan according to the pallet adjustment rules indicated by the first search operator. Specifically, according to the pallet adjustment rules indicated by the first search operator, the pallets to be adjusted in the first ship can be determined as the target pallets. Correspondingly, the first pallet allocation plan is to adjust the target pallets required for the current services of the first ship to the second ship. In this way, the first pallet allocation plan can be used as the new pallet allocation plan under the first search operator.
[0057] In practical applications, the first search operator (relocate operator) may include at least one of simple relocate, loading port relocate, and unloading port relocate. For the convenience of those skilled in the art to understand, Figure 2 a schematic diagram of the principle of the relocate operator is provided, as Figure 2 shown:
[0058] Simple relocate: Adjust at least one pallet required for the current services of one of the ships in the current combination to another ship. For example, if the current combination includes Ship 1 and Ship 2, select the pallet of Ship 1 and Ship 2, put the pallet of Ship 1 into Ship 2, and update the sailing paths of Ship 1 and Ship 2 to calculate the change in transportation cost.
[0059] Loading port relocate: Adjust the pallets loaded by one of the ships in the current combination at the target loading port to another ship. The target loading port includes at least one loading port in the current sailing path of the ship. For example, select Loading Port 1 on Ship 1 and Ship 2 respectively, put the pallets of Ship 1 with the same Loading Port 1 into Ship 2, and update the sailing paths of Ship 1 and Ship 2 to calculate the change in transportation cost.
[0060] Unloading port relocate: Adjust the pallets unloaded by one of the ships in the current combination at the target unloading port to another ship. The target unloading port includes at least one unloading port in the current sailing path of the ship. For example, select Unloading Port 5 on Ship 1 and Ship 2 respectively, put the pallets of Ship 1 with the same Unloading Port 5 into Ship 2, and update the sailing paths of Ship 1 and Ship 2 to calculate the change in transportation cost.
[0061] In some other embodiments, the pallet adjustment rule indicated by the second search operator is used to exchange the pallets currently required for service by one of the ships in the current combination with the pallets currently required for service by another ship. The pallets at the specific adjustment positions to be adjusted need to be determined according to the pallet adjustment rule indicated by the second search operator. For example, if the current combination includes a first ship and a second ship, the pallet adjustment rule indicated by the second search operator can be used to exchange the positions of some pallets currently required for service by the first ship with some pallets currently required for service by the second ship.
[0062] In practical applications, the second search operator can refer to the swap operator.
[0063] In one embodiment, when the current search operator is the second search operator, and the current combination includes a first ship and a second ship, obtaining a new pallet allocation plan obtained by adjusting the pallets currently required for service among the current combinations under the pallet adjustment rule indicated by the current search operator includes: obtaining a second pallet allocation plan according to the pallet adjustment rule indicated by the second search operator; the second pallet allocation plan is used to adjust the first pallet currently required for service by the first ship to the second ship, and adjust the second pallet currently required for service by the second ship to the first ship; both the first pallet and the second pallet are pallets that conform to the pallet adjustment rule indicated by the second search operator; and taking the second pallet allocation plan as the new pallet allocation plan.
[0064] In specific implementation, when the current search operator is the second search operator, and the current combination includes a first ship and a second ship, in the process of the computer device obtaining a new pallet allocation plan obtained by adjusting the pallets currently required for service among the current combinations under the pallet adjustment rule indicated by the current search operator, the computer device can obtain a second pallet allocation plan according to the pallet adjustment rule indicated by the second search operator. Specifically, according to the pallet adjustment rule indicated by the second search operator, the pallet to be adjusted in the first ship can be determined as the first pallet, and the pallet to be adjusted in the second ship can be determined as the second pallet. Correspondingly, the second pallet allocation plan is used to adjust the first pallet currently required for service by the first ship to the second ship, and adjust the second pallet currently required for service by the second ship to the first ship. In this way, the second pallet allocation plan can be used as the new pallet allocation plan under the second search operator.
[0065] In practical applications, the second search operator (swap operator) can include at least one of simple swap, loading port swap, discharging port swap, and ship change swap. For the convenience of those skilled in the art to understand, Figure 3 a schematic diagram of the principle of the swap operator is provided, as Figure 3 shown:
[0066] Simple swap: swap at least one pallet currently required to be served by one of the ships in the current combination with at least one pallet currently required to be served by another ship. For example, the current combination includes ship 1 and ship 2. Select one pallet from ship 1 and one pallet from ship 2 (such as pallet 3 from ship 1 and pallet 4 from ship 2), put pallet 3 from ship 1 into ship 2, and put pallet 4 from ship 2 into ship 1. Update the navigation paths of ships 1 and 2 to calculate the change in transportation cost.
[0067] Loading port swap: swap the pallets loaded on the first loading port of one of the ships in the current combination with the pallets loaded on the second loading port of another ship. The first loading port includes at least one loading port in the current navigation path of one of the ships, and the second loading port includes at least one loading port in the current navigation path of the other ship. For example, select loading port 1 on ship 1 and loading port 3 on ship 2, respectively, put the pallets with the same loading port 1 of ship 1 into ship 2, put the pallets with the same loading port 3 of ship 2 into ship 1, and update the navigation paths of ships 1 and 2 to calculate the change in transportation cost.
[0068] Unloading port swap: swap the pallets unloaded at the first unloading port by one of the ships in the current combination with the pallets unloaded at the second unloading port by another ship. The first unloading port includes at least one unloading port in the current navigation path of one of the ships, and the second unloading port includes at least one unloading port in the current navigation path of the other ship. For example, select unloading port 4 on ship 1 and unloading port 4 on ship 2 respectively, put the pallets with the same unloading port 4 of ship 1 into ship 2, put the pallets with the same unloading port 4 of ship 2 into ship 1, and update the routes of ships 1 and 2 to calculate the target value change.
[0069] Swap: Exchange all the pallets currently required to be served by one of the ships in the current combination with all the pallets currently required to be served by another ship. For example, select Ship 1 and Ship 2 respectively, swap all the pallets of Ship 1 with all the pallets of Ship 2, and update the routes of Ship 1 and Ship 2 to calculate the change in target value (which will be affected by the departure positions and departure times of different ships).
[0070] In this way, the cargo pallets that the ship needs to serve will determine the loading and unloading ports it needs to pass through. After determining the ports to pass through, the algorithm will traverse all feasible port sequences for each ship and select the best port sequence with the lowest transportation cost.
[0071] In another embodiment, Figure 4As shown, a flowchart of a pallet allocation method is provided. The method includes: Step S402, obtaining the current pallet allocation plan. Step S404, obtaining the pallet adjustment rule indicated by the current search operator. Step S406, obtaining all pairwise ship combinations of the ship set under the pallet adjustment rule indicated by the current search operator. Step S408, obtaining a new pallet allocation plan obtained by adjusting the current required service pallets between the current combinations under the pallet adjustment rule indicated by the current search operator. Step S410, in the case that there are other combinations to be adjusted among all pairwise ship combinations, determining one of the other combinations to be adjusted as the new current combination, and returning to the step of obtaining the adjustment of the current required service pallets between the current combinations under the pallet adjustment rule indicated by the current search operator until there are no other combinations to be adjusted among all pairwise ship combinations. Step S412, in the case that the transportation cost corresponding to the newly traversed pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan. Step S414, in the case that the preset iteration end condition is not satisfied, taking another search operator to be searched among the multiple search operators as the new current search operator. Step S416, returning to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and outputting the current pallet allocation plan.
[0072] It should be noted that the specific limitations of the above steps can be referred to the specific limitations of a pallet allocation method described above.
[0073] In still other embodiments, such as Figure 5As shown in the figure, a flowchart of a pallet allocation method is provided. The method includes: obtaining the current pallet allocation plan (current solution S); traversing local search operators in a random order; where the local search operators include simple relocate, loading port relocate, unloading port relocate, simple swap, loading port swap, unloading port swap, and ship change swap. Specifically: obtaining the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets required for current service between two ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched; in the case where the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan (S'); in the case where the preset iteration end condition is not met, taking another search operator to be searched among the multiple search operators as the new current search operator; returning to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is met, and outputting the current pallet allocation plan. Among them, the iteration end condition may include that there is no search operator to be searched among the multiple search operators, or the number of iterations meets the preset number threshold.
[0074] In one embodiment, a flowchart of a pallet allocation method is further provided, as Figure 6 shown. The method includes: initial solution generation: obtaining an initial feasible plan. Specific local details include: according to manual experience, performing the insertion of complete pallets for the pallet set to be allocated in the order of A - B - C routes. Specifically, sorting all the pallets in the pallet set to be allocated under the A - B - C route according to the preset sorting rule, obtaining the insertion results during the process of sequentially inserting the pallets in the pallet set to be allocated into each ship in the ship set in the current sorting. For the first pallet successfully inserted, select the optimal ship (target ship) for insertion, and give priority to the insertion position with the largest increase in revenue (the highest virtual resource gain data). For the second pallet that fails to be inserted, randomly move the positions of each second pallet in the pallet set to be allocated forward by a random perturbation to obtain a new current sorting, and return to obtain the insertion results during the process of sequentially inserting the pallets in the pallet set to be allocated into each ship in the ship set in the current sorting until the preset iteration end condition is met; where if the virtual resource gain situation of the new pallet allocation plan corresponding to the new current sorting is better than the virtual resource gain situation of the current pallet allocation plan, then update the current pallet allocation plan.
[0075] Specifically, it includes: obtaining the insertion results during the process of successively inserting the pallets in the pallet set to be allocated into each ship in the ship set under the current sorting on the target shipping lane; determining the current pallet allocation plan according to the insertion results; the current pallet allocation plan is used to indicate the target ship corresponding to the first pallet and the second pallet; the target ship corresponding to the first pallet is the ship with the highest virtual resource gain data after inserting the first pallet; the second pallet is the pallet that cannot be inserted into any ship; randomly moving forward the positions of the second pallets in the pallet set to be allocated in a random perturbation manner to obtain a new current sorting; returning the insertion results during the process of successively inserting the pallets in the pallet set to be allocated into each ship in the ship set under the current sorting until the preset iteration end condition is met; wherein, if the virtual resource gain situation of the new pallet allocation plan corresponding to the new current sorting is better than that of the current pallet allocation plan, the current pallet allocation plan is updated.
[0076] Among them, the target shipping lane can refer to the shipping lane for which the ships and pallets under this lane need to be matched.
[0077] Among them, the current sorting refers to the current arrangement order of the pallets in the pallet set to be allocated.
[0078] Among them, the current sorting can be determined according to a preset sorting rule. Among them, the preset sorting rule can include at least one of weight and loading period.
[0079] Among them, after the target shipping lane is given and the ship situation (ship set) of the target shipping lane is given, all the pallets in the pallet set to be allocated under the target shipping lane are subjected to ship-by-ship insertion attempts for the ship set, and the insertion results during the process of successively inserting the pallets in the pallet set to be allocated into each ship in the ship set can be obtained.
[0080] In practical applications, due to the tight ship capacity, the ship set may not be able to serve all pallets. Therefore, the insertion results can include ships that can be completely inserted (successfully inserted), or ships that cannot be inserted into any ship (unsuccessfully inserted).
[0081] Among them, the pallet with an insertion result of a ship that can be completely inserted can be used as the first pallet.
[0082] Among them, the pallet with an insertion result of a ship that cannot be inserted into any ship can be used as the second pallet.
[0083] In a specific implementation, when the computer device obtains the insertion results during the process of sequentially inserting the pallets in the set of pallets to be allocated into each ship in the ship set in the current sorting, for the current pallet, where the current pallet is the pallet to be currently inserted in the set of pallets to be allocated, if there is a ship in the ship set into which the current pallet can be completely inserted, it is determined that the insertion result of the current pallet is a successful insertion, and the current pallet is used as the first pallet; if there is no ship in the ship set into which the current pallet can be inserted, it is determined that the insertion result of the current pallet is an unsuccessful insertion, and the current pallet is used as the second pallet.
[0084] Among them, when the insertion result of the pallet is that there is a ship into which it can be completely inserted, after selecting to completely insert the pallet, the ship with the highest virtual resource gain data is selected as the target ship corresponding to the pallet.
[0085] In practical applications, the virtual resource gain data can refer to the profit increment (revenue increment).
[0086] In this way, the current pallet allocation plan can be determined according to the insertion results, and the current pallet allocation plan is used to indicate the target ship corresponding to the first pallet and the second pallet.
[0087] In a specific implementation, the positions of each second pallet in the set of pallets to be allocated are randomly moved forward by means of random perturbation to change the sorting of the pallets in the set of pallets to be allocated, so as to obtain a new current sorting, so that the second pallet has a higher priority in the next insertion process.
[0088] In practical applications, the random perturbation can be performed according to the urgency of the time window of the second pallet.
[0089] Among them, if the virtual resource gain situation of the new pallet allocation plan corresponding to the new current sorting is better than that of the current pallet allocation plan, the current pallet allocation plan is updated.
[0090] Among them, the virtual resource gain situation can refer to the revenue situation.
[0091] In this way, when a new current sorting is obtained by means of random perturbation, based on this new order, starting from an empty load, all pallets are re-inserted, and the computer device can return the insertion results during the process of sequentially inserting the pallets in the set of pallets to be allocated into each ship in the ship set in the current sorting until the preset iteration end condition is met.
[0092] Among them, a new pallet allocation plan can be generated under the new current sorting, and the new pallet allocation plan can indicate the target ship corresponding to the new first pallet and the new second pallet.
[0093] Among them, if the virtual resource gain of the new pallet allocation plan corresponding to the new current sorting is better than that of the current pallet allocation plan, the current pallet allocation plan is updated, that is, the current pallet allocation plan is updated to the new pallet allocation plan.
[0094] In this way, when the preset iteration end condition is satisfied, the current pallet allocation plan is output to obtain the final optimal allocation plan.
[0095] Among them, the preset iteration end condition may include that the number of iterations meets a preset number threshold, or all the remaining pallets are inserted successfully, that is, there is no second pallet anymore (the number of second pallets is zero).
[0096] In the above pallet allocation method, under the target shipping route, the insertion results during the process of successively inserting the pallets in the pallet set to be allocated into each ship in the ship set under the current sorting are obtained; the current pallet allocation plan is determined according to the insertion results; the current pallet allocation plan is used to indicate the target ship corresponding to the first pallet and the second pallet; the target ship corresponding to the first pallet is the ship with the highest virtual resource gain data after inserting the first pallet; the second pallet is the pallet that fails to be inserted into any ship; the positions of the second pallets in the pallet set to be allocated are randomly moved forward by means of random perturbation to obtain a new current sorting; return the insertion results during the process of successively inserting the pallets in the pallet set to be allocated into each ship in the ship set under the new current sorting until the preset iteration end condition is satisfied; among them, if the virtual resource gain of the new pallet allocation plan corresponding to the new current sorting is better than that of the current pallet allocation plan, the current pallet allocation plan is updated.
[0097] In this way, by determining the target shipping route and the set of ships on the target shipping route, all pallets under the target shipping route are subjected to ship-by-ship insertion attempts, and the insertion results during the process of sequentially inserting the pallets in the pallet set into each ship in the ship set are obtained, so as to determine the current pallet allocation plan according to the insertion results. The current pallet allocation plan indicates the target ship corresponding to the first pallet and the second pallets that cannot be inserted into any ship. The positions of the second pallets in the pallet set to be allocated are randomly moved forward by means of random perturbation to obtain a new current sorting, and the insertion results during the process of sequentially inserting the pallets in the pallet set to be allocated into each ship in the ship set are returned until the preset iteration end condition is satisfied. Among them, if the virtual resource gain of the new pallet allocation plan corresponding to the new current sorting is better than that of the current pallet allocation plan, the current pallet allocation plan is updated; In this way, by means of random perturbation, the positions of the remaining second pallets in the original sorting are randomly moved forward, so that they have a higher priority in the next insertion process, and the probability of successful insertion of these remaining second pallets is increased in subsequent iterations. For each perturbation test, a new pallet allocation plan will be generated, and it will be judged whether to update the current pallet allocation plan according to the virtual resource gain of the new pallet allocation plan. When the virtual resource gain of the new pallet allocation plan is better than that of the current pallet allocation plan, the current pallet allocation plan is updated. Iterating in this way, when the preset iteration end condition is satisfied, the finally obtained current pallet allocation plan can be output. First, the insertion of a single pallet is attempted ship by ship, and then on this basis, the overall insertion and improvement of all pallets are realized. By combining the local search strategies of single-pallet insertion and overall pallet insertion under the target shipping route, this method can quickly generate a feasible heuristic solution in a short time, and then based on the random perturbation mechanism, further search for improvement opportunities in the neighborhood space of the solution, avoid falling into premature local optimality, take into account the feasibility of the initial solution and the flexibility of subsequent optimization, effectively improve the accuracy and intelligence of pallet allocation, and thus can improve the efficiency of maritime shipping.
[0098] In one embodiment, during the process of determining the target ship corresponding to the first pallet, the difference between the virtual resource values corresponding to the ship before and after inserting the first pallet can be calculated respectively, so as to select the ship with the largest difference as the target ship corresponding to the first pallet.
[0099] In practical applications, the virtual resource value can refer to the profit value (income value) corresponding to the ship.
[0100] Specifically, taking a certain first pallet as an example for illustration, the computer device can determine the insertable vessels in the vessel set. An insertable vessel refers to a vessel into which the first pallet can be completely inserted, and obtain the first virtual resource values corresponding to the optimal routes of each insertable vessel before inserting the first pallet; among them, the virtual resource value can be a profit value (revenue value). Specifically, during the pallet insertion process, after each vessel inserts the pallet, it needs to regenerate a feasible sailing path (feasible route) based on the updated pallet set assigned to itself. Since different pallets may have a starting port and a destination port, as well as corresponding time or load restrictions, the generation of the feasible sailing path of the vessel needs to take into account the above various constraints, and select the one that can bring the highest profit among all feasible sailing paths as the optimal route.
[0101] In this way, for the same insertable vessel, the profit value corresponding to the optimal route of the insertable vessel before inserting the first pallet is used as the first virtual resource value; the profit value corresponding to the optimal route of the insertable vessel after inserting the first pallet is used as the second virtual resource value. Specifically, in the process of obtaining the second virtual resource value corresponding to the optimal route of the insertable vessel after inserting the first pallet, for any insertable vessel, the computer device can obtain all the feasible routes of the any insertable vessel after inserting the first pallet; determine the virtual resource values corresponding to each feasible route, and take the feasible route with the highest corresponding virtual resource value as the optimal route of the any insertable vessel after inserting the first pallet, and take the highest virtual resource value as the second virtual resource value.
[0102] Thus, the computer device can determine the virtual resource gain data corresponding to each insertable vessel according to the difference between the second virtual resource value and the corresponding first virtual resource value of each insertable vessel, and thus take the insertable vessel with the highest corresponding virtual resource gain data as the target vessel corresponding to the first pallet.
[0103] In the technical solution of this embodiment, for the first pallet, the first virtual resource value corresponding to the optimal route of each insertable ship before inserting the first pallet is obtained; the insertable ship is a ship into which the first pallet can be inserted; the second virtual resource value corresponding to the optimal route of each insertable ship after inserting the first pallet is obtained; according to the difference between the second virtual resource value corresponding to each insertable ship and the corresponding first virtual resource value, the virtual resource gain data corresponding to each insertable ship is determined; the insertable ship with the highest corresponding virtual resource gain data is used as the target ship corresponding to the first pallet. In this way, for the insertable ships into which the first pallet can be inserted, the first virtual resource value corresponding to the optimal route of each insertable ship before inserting the first pallet and the second virtual resource value corresponding to the optimal route of each insertable ship after inserting the first pallet are respectively obtained, so that according to the difference between the second virtual resource value corresponding to each insertable ship and the corresponding first virtual resource value, the insertable ship with the highest corresponding virtual resource gain data can be used as the target ship corresponding to the first pallet, so as to allocate the first pallet to the ship with the highest virtual resource gain after insertion, thereby effectively improving the virtual resource gain of the ship.
[0104] In one embodiment, the insertion results in the process of sequentially inserting the pallets in the pallet set to be allocated into each ship in the ship set in the current sorting are returned until a preset iteration end condition is met, including: obtaining the number of second pallets in the new pallet allocation plan; in the case where the number of second pallets in the new pallet allocation plan is less than the number of second pallets in the current pallet allocation plan, updating the current pallet allocation plan to the new pallet allocation plan.
[0105] In specific implementation, during the iteration process, the computer device can obtain the number of second pallets in the new pallet allocation plan. In the case where the number of second pallets in the new pallet allocation plan is less than the number of second pallets in the current pallet allocation plan, update the current pallet allocation plan to the new pallet allocation plan. At the same time, the best sorting of the pallets can be updated to the new current sorting.
[0106] In some other embodiments, during the iteration process, the computer device can obtain the number of second pallets in the new pallet allocation plan and the total virtual resource gain data corresponding to the new pallet allocation plan. In the case where the total virtual resource gain data corresponding to the new pallet allocation plan is greater than or equal to the total virtual resource gain data corresponding to the current pallet allocation plan, and the number of second pallets in the new pallet allocation plan is less than or equal to the number of second pallets in the current pallet allocation plan, update the current pallet allocation plan to the new pallet allocation plan. At the same time, the best sorting of the pallets can be updated to the new current sorting.
[0107] Among them, the total virtual resource gain data corresponding to the new pallet allocation plan can refer to the sum of the virtual resource values (profit values) of the optimal routes corresponding to each ship under the new pallet allocation plan.
[0108] Among them, the total virtual resource gain data corresponding to the current pallet allocation plan can refer to the sum of the virtual resource values (profit values) of the optimal routes corresponding to each ship under the current pallet allocation plan.
[0109] It can be understood that the update priority corresponding to the reduction of the second pallet quantity is higher than the update priority corresponding to the increase of the total virtual resource gain data.
[0110] The technical solution of this embodiment obtains the quantity of the second pallet in the new pallet allocation plan; when the quantity of the second pallet in the new pallet allocation plan is less than the quantity of the second pallet in the current pallet allocation plan, updates the current pallet allocation plan to the new pallet allocation plan. In this way, when the quantity of the second pallet in the new pallet allocation plan is less than the quantity of the second pallet in the current pallet allocation plan, that is, if the new pallet allocation plan can serve more pallets, the current pallet allocation plan is updated to the new pallet allocation plan, so that the current pallet allocation plan output after the iteration ends is the pallet allocation plan with the optimal revenue situation calculated during the iteration process, thereby effectively improving the utilization rate of shipping resources and improving the efficiency of maritime shipping.
[0111] In one embodiment, the method further includes: determining a remaining pallet set; the remaining pallet set includes the remaining pallets that still cannot be inserted into any ship after the number of iterations meets a preset number threshold; obtaining a loading capacity arrangement order; the loading capacity arrangement order is obtained by sorting the maximum loading capacities of the remaining pallets on each remaining available ship from largest to smallest; the remaining available ships are the ships that still have insertion space; the maximum loading capacity in the loading capacity arrangement order is used to indicate splitting the remaining pallets so as to sequentially allocate the split remaining pallets to the remaining available ships corresponding to the respective maximum loading capacities.
[0112] Among them, the remaining available ships can refer to the ships that still have service space (insertion space) after the number of iterations meets the preset number threshold.
[0113] In a specific implementation, after the number of iterations meets the preset number threshold, if there are still pallets that have not been inserted into the ship, the computer device can determine the remaining pallet set, which includes the remaining pallets that have not been inserted into any ship after the number of iterations meets the preset number threshold. In addition, for the remaining pallets currently to be inserted in the remaining pallet set, the computer device can obtain the loading capacity arrangement order, which is obtained by sorting the maximum loading capacities of the remaining pallets on each remaining available ship from large to small; in this way, the maximum loading capacity under the loading capacity arrangement order is used to indicate that the remaining pallets are split, so as to sequentially allocate the split remaining pallets to the remaining available ships corresponding to the corresponding maximum loading capacities.
[0114] The technical solution of this embodiment is to determine the remaining pallet set; the remaining pallet set includes the remaining pallets that have not been inserted into any ship after the number of iterations meets the preset number threshold; obtain the loading capacity arrangement order; the loading capacity arrangement order is obtained by sorting the maximum loading capacities of the remaining pallets on each remaining available ship in order from large to small; the remaining available ships are ships that still have insertion space; the maximum loading capacity under the loading capacity arrangement order is used to indicate that the remaining pallets are split, so as to distribute the split remaining pallets in turn to the remaining available ships corresponding to the corresponding maximum loading capacities.
[0115] In this way, when the number of iterations meets the preset number threshold, if there are still remaining pallets, the remaining pallets can be split according to the maximum loading capacity of the remaining pallets on the remaining available ships, so that the split remaining pallets can be allocated in turn to the remaining available ships corresponding to the corresponding maximum loading capacity, to ensure that the remaining pallets can be allocated to the ships that still have insertion space as much as possible, so as to make full use of the insertion space of the ship and improve the utilization rate of shipping resources.
[0116] Furthermore, for the calculation of the virtual resource value (profit) corresponding to the ship in this application, the feasibility of the constraints is first determined: the time window, capacity and load feasibility, cross-month restrictions, etc. are determined. If the feasibility of the constraints is not met, negative infinity is returned; if the feasibility of the constraints is met, the ship cost and ship income are calculated to calculate the profit.
[0117] Specifically, we first consider a static profit calculation function as follows. The input of this function includes the following information: basic information of the ship, the cargo pallets loaded on the ship, and the route of the ship. Based on the above information, we can further calculate the travel time and fuel consumption of the ship between each section, as well as the arrival time and stay time at each port.
[0118] Based on the above information, calculate the current ship's profit: Profit (income) = total income - total cost. Total income = freight rate * cargo volume + surcharge + fuel surcharge * cargo volume; Total cost = variable cost + fixed cost. Variable cost = fuel cost + port fee + carbon tax + cargo fee * cargo volume; Fixed cost = fixed cost per ship per day * single ship voyage days.
[0119] Taking a navigation mission as an example, the following information is known:
[0120] The ship carrying out the mission is S, with a total capacity of 52,000 tons and a route of A1.
[0121] Departing empty from port M, it passes through P, SAN, T, SAV, LI and NAP in sequence.
[0122] Among them, the first loading port is Port P, and the planned arrival time is January 12.
[0123] The cargoes of customers A, B and C were loaded on the vessel. The cargoes of customers A and B were loaded from January 1 to 7. 32,000 tons were loaded at P, followed by 2,000 tons unloaded at T, 5,500 tons unloaded at NAP and 24,500 tons unloaded at LI. The cargoes of customer C were loaded from January 23 to 29. 19,950 tons were loaded at SAN, 6,450 tons were unloaded at SAV and 13,500 tons were unloaded at LI.
[0124] Calculation process:
[0125] Step 1: According to the ship's port mission sequence MP-SAN-T-SAV-LI-NAP, as well as the ship's basic data, port basic data and port spacing, calculate the mission sequence's fixed cost per ship per day, single ship voyage day, sailing time (distance / speed, including empty sailing time and full sailing time), port time (loading time (loading volume / loading efficiency) and unloading time (unloading volume / unloading efficiency) at the port), ship fuel price (heavy fuel price and light fuel price), fuel consumption (empty fuel consumption, full-load fuel consumption and port fuel consumption). At this point, the fuel cost, fixed cost and carbon emissions can be calculated.
[0126] Step 2: According to the customer's cargo transportation loading and unloading port information and cargo volume, such as customer A: P loading-T unloading-cargo volume 2000, P loading-NAP unloading-cargo volume 5500. Then, according to the customer's contract situation, obtain the freight (freight rate), surcharge, fuel surcharge and tally fee (cargo fee) of the loading and unloading port of the customer's corresponding route (such as A1 line). At the same time, obtain the port fee of the corresponding port based on the basic data of port fees. At this point, the total voyage income, variable expenses and TCE (Time Charter Equivalent) can be calculated.
[0127] Step 3: Calculate the contribution margin based on the total voyage revenue and variable costs, and then calculate the net profit in combination with the fixed costs.
[0128] Step 4: Summarize all the laycan data of the current month according to Steps 1-3, so as to calculate the total benefit value of the current month.
[0129] In this way, the virtual resource value corresponding to the ship can be calculated.
[0130] In summary, the present application combines a local search strategy of single pallet insertion and overall pallet insertion under a certain shipping line. This method can quickly generate a feasible heuristic solution in a short time, and then based on a random perturbation mechanism, further search for improvement opportunities in the neighborhood space of the solution to avoid falling into premature local optimality.
[0131] Among them, during the generation of the initial solution, after the insertion of the complete pallet is completed, it is judged whether there are remaining pallets. If not, the initial solution is output (corresponding to the insertion result during the process of inserting the pallets in the set of pallets to be allocated into each ship in the ship set in the current sorting in turn until the preset iteration end condition is met, and the current pallet allocation plan is output). If so, perform ship exchange and adjustment between shipping lines: reduce the remaining cargo volume and increase the revenue.
[0132] Among them, reducing the remaining cargo volume and increasing the revenue are specifically achieved through local search. Specifically, the local details include: obtaining the current pallet allocation plan (the current solution S); in this embodiment, the current pallet allocation plan is the initial solution output by the previous process; traversing the local search operators in a random order; among them, the local search operators include simple relocate, loading port relocate, unloading port relocate, simple swap, loading port swap, unloading port swap, and ship change swap. Specifically: obtaining the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets required for current service between two ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched; in the case where the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, the new pallet allocation plan is used as the new current pallet allocation plan (S'); in the case where the preset iteration end condition is not met, another search operator to be searched among the multiple search operators is used as the new current search operator; return to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is met, and output the current pallet allocation plan. Among them, the iteration end condition may include that the number of iterations meets a preset number threshold.
[0133] Among them, during the local search process, if all operators have been traversed but the time limit has not been reached, the "destroy - repair" strategy is executed to perturb the current solution S. Specifically, the current solution S is perturbed through the "destroy - repair" strategy. Specifically, first determine the perturbation range: select N (N is a positive integer, and the specific value is determined according to the preset screening ratio range) pallets with the highest transportation costs from the pallets required by the ships in the ship set indicated by the current solution S as the target pallets; secondly, in the destruction stage: remove the selected N target pallets to obtain the current pallet allocation plan; finally, in the repair stage: randomly select the greedy insertion algorithm or the regret value insertion algorithm to re - determine the insertion ships corresponding to each removed target pallet in the ship set.
[0134] Specifically, it includes: screening out a target pallet set according to the preset screening ratio range under the original pallet allocation plan; the original pallet allocation plan is used to indicate the pallets required by the ships in the ship set; the transportation costs corresponding to the target pallets in the target pallet set are higher than those corresponding to the pallets not screened out; obtaining the current pallet allocation plan and determining the target transportation cost change amount corresponding to each target pallet; the target transportation cost change amount is used to indicate the minimum transportation cost change amount after the target pallet is inserted into the ship set under the current pallet allocation plan; the current pallet allocation plan is the pallet allocation plan obtained by removing the target pallet set from the original pallet allocation plan; according to the target transportation cost change amount corresponding to each target pallet, re - determine the insertion ships corresponding to each target pallet in the ship set to obtain a new current pallet allocation plan.
[0135] In this embodiment, the original pallet allocation plan refers to the current solution S when all operators have been traversed but the time limit has not been reached.
[0136] Among them, the screening ratio range is used to indicate the proportion range of the screened pallets in all pallets.
[0137] Among them, the transportation costs corresponding to the target pallets in the target pallet set are higher than those corresponding to the pallets not screened out.
[0138] In this embodiment, the transportation cost corresponding to a pallet refers to the difference in the total transportation cost of the corresponding ship before and after removing the pallet.
[0139] In specific implementation, the computer device can obtain the original pallet allocation plan and screen out the target pallet set to be removed under the original pallet allocation plan according to the preset pallet removal rule. The transportation costs corresponding to the target pallets in the target pallet set are higher than those corresponding to the pallets not screened out.
[0140] Among them, the pallet removal rule can indicate a preset screening ratio range (for example, the number of pallets to be removed does not exceed 70% of the number of pallets being served). In practical applications, 10%-30% (the specific value can be determined according to actual needs) of the pallets with high transportation costs can be randomly selected as the set of target pallets to be removed, so as to balance the exploration of the solution space and the reparability of the solution.
[0141] Among them, the current pallet allocation plan is the pallet allocation plan obtained by removing the set of target pallets from the original pallet allocation plan.
[0142] Among them, the change in transportation cost refers to the change in transportation cost when the target pallet is inserted into all possible positions under the current pallet allocation plan.
[0143] Specifically, for any target pallet, determine the transportation cost corresponding to each ship before inserting the target pallet under the current pallet allocation plan, and then obtain the transportation cost corresponding to each ship after inserting the target pallet during the process of attempting to insert the target pallet into each ship. Thus, according to the difference between the transportation cost corresponding to each ship before inserting the target pallet and the transportation cost corresponding to each ship after inserting the target pallet, obtain the change in transportation cost when the target pallet is inserted into all possible positions under the current pallet allocation plan.
[0144] Among them, the target change in transportation cost is used to indicate the minimum change in transportation cost after the target pallet is inserted into the set of ships.
[0145] Specifically, for any target pallet, by obtaining the change in transportation cost corresponding to each ship during the process of inserting the target pallet into each ship in turn under the current pallet allocation plan; take the minimum change in transportation cost as the target change in transportation cost corresponding to the target pallet.
[0146] In specific implementation, the computer device can re-determine the ships corresponding to each target pallet in the set of ships according to the target change in transportation cost corresponding to each target pallet, and obtain a new current pallet allocation plan.
[0147] In the above pallet allocation method, a target pallet set is screened out from the original pallet allocation plan according to a preset screening ratio range; the original pallet allocation plan is used to indicate the pallets required to be served by the ships in the ship set; the transportation cost corresponding to the target pallets in the target pallet set is higher than the transportation cost corresponding to the pallets that are not screened out; obtain the current pallet allocation plan, and determine the target transportation cost change amount corresponding to each target pallet; the target transportation cost change amount is used to indicate the minimum transportation cost change amount after the target pallet is inserted into the ship set under the current pallet allocation plan; the current pallet allocation plan is the pallet allocation plan obtained by removing the target pallet set from the original pallet allocation plan; according to the target transportation cost change amount corresponding to each target pallet, re-determine the insertion ships corresponding to each target pallet in the ship set to obtain a new current pallet allocation plan.
[0148] In this way, the present application adopts a destruction-repair strategy: in the destruction stage, according to a preset screening ratio range, a target pallet set with a higher corresponding transportation cost is screened out from the original pallet allocation plan, so as to remove the target pallet set from the original pallet allocation plan to obtain the current pallet allocation plan, realizing the removal of a part of the pallets from the original solution, introducing the incompleteness of the solution, and providing more space for the repair stage to explore a better solution; in the repair stage: obtain the target transportation cost change amount corresponding to each target pallet under the current pallet allocation plan, and the target transportation cost change amount is used to indicate the minimum transportation cost change amount after the target pallet is inserted into the ship set under the current pallet allocation plan, so as to re-determine the insertion ships corresponding to each target pallet in the ship set to obtain a new current pallet allocation plan. It realizes that by using the destruction-repair strategy, when the original pallet allocation plan falls into a local optimal solution, by perturbing the original pallet allocation plan, the current local optimal state is broken. The target pallet set with a higher transportation cost is removed, and then the target pallets are re-inserted, enabling the algorithm to enter a new search neighborhood and having the opportunity to find a better global solution, avoiding poor solution quality caused by falling into a local optimum, and making the finally output new current pallet allocation plan have high quality in terms of transportation cost and resource utilization, etc., which can improve the accuracy of the pallet allocation plan.
[0149] In one embodiment, according to the change amount of the target transportation cost corresponding to each target pallet, the insertion ship corresponding to each target pallet in the ship set is re-determined to obtain a new current pallet allocation plan, including: screening out the first inserted pallet in the target pallet set according to the change amount of the target transportation cost corresponding to each target pallet to obtain a new current pallet allocation plan; the new current pallet allocation plan is obtained after inserting the first inserted pallet into the ship matching the corresponding change amount of the target transportation cost; taking the remaining target pallets as a new target pallet set, and returning to the step of determining the change amount of the target transportation cost corresponding to each target pallet until the preset iteration end condition is met, and outputting the new current pallet allocation plan.
[0150] Among them, the first inserted pallet refers to the first target pallet whose insertion position is determined under the current pallet allocation plan in the target pallet set.
[0151] Among them, the remaining target pallets refer to the target pallets whose insertion positions have not been determined.
[0152] In a specific implementation, when the computer device re-determines the insertion ship corresponding to each target pallet in the ship set according to the change amount of the target transportation cost corresponding to each target pallet to obtain a new current pallet allocation plan, the computer device can screen out the target pallet that needs to be inserted first in the target pallet set according to the change amount of the target transportation cost corresponding to each target pallet as the first inserted pallet, and determine the ship required to insert the first inserted pallet in the ship set under the current pallet allocation plan to obtain a new current pallet allocation plan. Specifically, it can be selected to insert the first inserted pallet into the ship corresponding to the corresponding change amount of the target transportation cost, that is, the new current pallet allocation plan can be used to insert the first inserted pallet into the ship matching the corresponding change amount of the target transportation cost.
[0153] Further, the remaining target pallets can be used as a new target pallet set, and the step of determining the change amount of the target transportation cost corresponding to each target pallet is returned until the preset iteration end condition is met, and the new current pallet allocation plan is output.
[0154] Among them, the preset iteration end condition may include that there are no target pallets whose insertion positions have not been determined, or the number of iterations meets the preset number threshold.
[0155] In the technical solution of this embodiment, by determining the change amount of the target transportation cost corresponding to each target pallet, the first inserted pallet is screened out from the set of target pallets to obtain a new current pallet allocation plan; the new current pallet allocation plan is used to insert the first inserted pallet into the ship that matches the corresponding change amount of the target transportation cost; the remaining target pallets are used as a new set of target pallets, and the step of determining the change amount of the target transportation cost corresponding to each target pallet is returned until the preset iteration end condition is met, and the new current pallet allocation plan is output. In this way, by the change amount of the target transportation cost corresponding to each target pallet, the first inserted pallet is determined to obtain a new current pallet allocation plan, and the remaining target pallets are used as a new set of target pallets. By continuously iterating and adjusting the pallet allocation, the target pallets with less impact on the transportation cost are preferentially inserted, which can make more reasonable use of the transportation capacity of the ship and avoid resource waste. Ensure that each ship can serve the pallets in a relatively optimal state, improve the utilization efficiency of ship resources, and make the resource allocation of the entire transportation system more reasonable.
[0156] In one embodiment, screening out the first inserted pallet from the set of target pallets according to the change amount of the target transportation cost corresponding to each target pallet includes: in the case of using the Greedy insert algorithm, the target pallet with the smallest corresponding change amount of the target transportation cost is used as the first inserted pallet.
[0157] In specific implementation, when the computer device screens out the first inserted pallet from the set of target pallets according to the change amount of the target transportation cost corresponding to each target pallet, in the case of using the greedy insertion algorithm, that is, in the case of using the greedy insertion algorithm, the target pallet with the smallest corresponding change amount of the target transportation cost can be used as the first inserted pallet.
[0158] In practical applications, for the greedy insertion algorithm, sorting the change amounts of the target transportation costs corresponding to all target pallets from small to large can obtain an insertion priority list under the greedy insertion algorithm, where the target pallet corresponding to the first position in the insertion priority list is the first inserted pallet. The core idea of greedy insertion is to select the current optimal local solution at each step in order to obtain a global solution. The following is the detailed process of greedy insertion:
[0159] S1. Greedy Selection: For the current solution, select a target pallet for insertion. Specifically, the pallet can be inserted at the beginning. The criterion for greedy selection is that each insertion brings the smallest cost increment (or the smallest cost). That is, for each target pallet, calculate the cost increment of inserting it into the current solution. Select the insertion position with the smallest cost: Calculate the cost increment of each target pallet at all possible insertion positions in the current solution (since the port order is enumerated, the position is only refined to each ship). Select the target pallet that generates the smallest insertion cost increment (i.e., the first-inserted pallet) and insert it into the best position (i.e., the ship corresponding to the smallest cost increment of the first-inserted pallet).
[0160] S2. Update the Solution: Insert the selected target pallet into the best position of the current solution. After insertion, update the current solution and remove the target pallet from the set of target pallets, then go to S1.
[0161] S3. Termination Condition: When all target pallets are inserted into the solution, the greedy insertion process terminates. At this time, a complete solution is obtained.
[0162] In the technical solution of this embodiment, the greedy insertion algorithm selects the optimal solution in the current state at each step of decision-making, that is, selects the target pallet with the smallest change in transportation cost for insertion. This locally optimal selection strategy enables the algorithm to quickly construct a solution without exhaustive search of all possible combinations, thereby improving the computational efficiency and being able to obtain a feasible pallet allocation scheme in a short time, effectively improving the pallet allocation efficiency.
[0163] In one embodiment, to screen out the first-inserted pallet from the set of target pallets according to the target transportation cost change amount corresponding to each target pallet, including: in the case of using the regret value insertion algorithm, determine the additional transportation cost corresponding to each target pallet under the current pallet allocation scheme; the additional transportation cost is used to indicate the additional transportation cost corresponding to the target pallet when the target pallet is not inserted into the ship matching the corresponding target transportation cost change amount; take the target pallet with the largest corresponding additional transportation cost as the first-inserted pallet.
[0164] In specific implementation, when the computer device screens out the first-inserted pallet from the set of target pallets according to the target transportation cost change amount corresponding to each target pallet, in the case of using the regret value insertion algorithm, the computer device can determine the additional transportation cost corresponding to each target pallet under the current pallet allocation scheme. The additional transportation cost is used to indicate the additional transportation cost corresponding to the target pallet when the target pallet is not inserted into the ship matching the corresponding target transportation cost change amount, and take the target pallet with the largest corresponding additional transportation cost as the first-inserted pallet.
[0165] In some of these embodiments, in the process of determining the additional transportation costs corresponding to each target pallet under the current pallet allocation scheme, the computer device may obtain the change amount of the second-lowest transportation cost corresponding to each target pallet after being inserted into the set of ships under the current pallet allocation scheme. That is, for any target pallet, obtain the change amount of the transportation cost corresponding to each ship during the process of successively inserting the target pallet into each of the ships under the current pallet allocation scheme. Among them, the smallest transportation cost change amount is the target transportation cost change amount, and the transportation cost change amount that is only smaller than the target transportation cost change amount is used as the second-lowest transportation cost change amount.
[0166] By obtaining the difference between the target transportation cost change amount corresponding to each target pallet and the corresponding second-lowest transportation cost change amount, the additional transportation cost corresponding to each target pallet is determined.
[0167] In practical applications, the additional transportation cost may refer to the regret value. For regret value insertion, the calculation of the regret value is the difference between the target transportation cost change amount and the second-lowest transportation cost change amount, and the regret values are sorted from largest to smallest to obtain an insertion priority list. Among them, the target pallet corresponding to the first position in the insertion priority list is the first inserted pallet.
[0168] Regret value insertion is a strategy for optimization problems, used to balance the current insertion choice and the opportunity loss in the future. The following is the detailed process of regret value insertion:
[0169] S1. Calculate the insertion cost: For each target pallet, successively calculate the cost increment when it is inserted into all possible positions in the current solution (since the port order is enumerated, the positions are only refined to each ship). The insertion cost increments of each pallet are arranged in ascending order, and the lowest cost (target transportation cost change amount) of the best insertion position and the second-lowest cost (second-lowest transportation cost change amount) of the second-best insertion position are recorded.
[0170] S2. Calculate the regret value: According to the insertion cost of each target pallet, calculate its regret value. The regret value reflects the additional cost brought by the second-best choice when the best position is not selected. If multiple second-best positions are considered, the regret value is the additional cost of the total cost of choosing the second-best position relative to the best position.
[0171] S3. Select a pallet for insertion: Among the target pallets, select the target pallet with the largest regret value (the first inserted pallet) for insertion. This can minimize the opportunity loss of future decisions. Insert the selected target pallet into the current solution and remove it from the set of target pallets, and then go to S1.
[0172] S4. Termination condition: The regret value insertion process terminates when one of the following situations occurs: the set of target pallets is empty, i.e., all target pallets have been inserted, or the preset iteration count threshold is reached.
[0173] In the technical solution of this embodiment, in the case of adopting the regret value insertion algorithm, the additional transportation cost corresponding to each target pallet under the current pallet allocation plan is determined; the additional transportation cost is used to indicate the additional transportation cost corresponding to the target pallet when the target pallet is not inserted into the ship that matches the corresponding target transportation cost change amount; the target pallet with the largest corresponding additional transportation cost is used as the first inserted pallet; wherein, the additional transportation cost is calculated based on the difference between the target transportation cost change amount corresponding to each target pallet and the corresponding second-lowest transportation cost change amount. In this way, in each iteration process, the target pallet with the largest corresponding additional transportation cost is selected for insertion, which not only focuses on the current optimal choice but also comprehensively considers the possible losses that may occur after other possible choices are missed. Therefore, it can more comprehensively evaluate various insertion schemes, avoid missing the globally optimal solution due to only considering local optimality, minimize the opportunity loss of future decisions to the greatest extent, find a pallet allocation plan closer to the global optimum, improve the quality of the final allocation result, and further reduce the transportation cost or make the resource utilization more reasonable.
[0174] Further, after performing the local search, the computer device can determine whether there are remaining goods. If not, the current solution is output; if so, the remaining pallets (including some oversize pallets and pallets that still cannot be completely inserted after the local search) are split to maximize the pallet service volume. The specific local details include: when splitting a remaining pallet, first consider the maximum loading capacity that the remaining pallet can hold on each remaining available ship (based on the logic of giving priority to serving the remaining pallets). When determining this maximum loading capacity, the binary search method can be used, or the formula can be deduced through a certain inference method. In practical applications, since the binary search method does not take much time and has stronger versatility, once the constraint requirements change, the inference formula may not be applicable, but the binary search method can still be used. Therefore, the binary search method is used to determine the maximum loading capacity.
[0175] During the splitting, it will first be judged whether it can be completely inserted and whether it is feasible when the quantity is 0. If it can, splitting will no longer be considered.
[0176] If splitting is required, at this time, consider the maximum quantity (maximum loading capacity) that can be split among all the remaining available ships. If this maximum quantity is less than the splitting threshold, splitting will no longer be performed, and it is considered that if splitting continues, it will be too scattered.
[0177] Here, when this splitting is applied to greedy insertion, since the splitting of the super-large pallet is completed at one time within the function, that is, a super-large pallet with a cargo volume of x will be split into x1, x2, x3 (x1+x2+x3=x) at one time and placed on the remaining available ships, instead of splitting x1 and then mixing the remaining x2 with other ordinary cargoes and re-inserting them in sorted order, the search space can be reduced.
[0178] In this way, the loading capacity arrangement order is obtained; the loading capacity arrangement order is obtained by sorting the maximum loading capacity of the remaining pallets on each remaining available ship in order from large to small; the remaining available ships are ships that still have insertion space; the maximum loading capacity under the loading capacity arrangement order is used to indicate the splitting of the remaining pallets, so as to distribute the split remaining pallets in sequence to the remaining available ships corresponding to the corresponding maximum loading capacity.
[0179] Among them, if there is a situation where the maximum loading capacity of the remaining pallets on the remaining available ships is the same, the maximum loading capacity corresponding to the remaining available ships with higher virtual resource gain data (higher profit increment) after inserting the remaining pallets will be prioritized.
[0180] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0181] Based on the same inventive concept, the embodiment of the present application also provides a pallet allocation device for implementing the above-mentioned pallet allocation method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the pallet allocation device provided below can refer to the limitations of the pallet allocation method above, and will not be repeated here.
[0182] In an exemplary embodiment, Figure 7As shown, a pallet allocation device is provided, including: a solution acquisition module 710, a rule acquisition module 720, an update module 730, a change module 740, and an iteration module 750, where: The solution acquisition module 710 is configured to acquire the current pallet allocation solution; the current pallet allocation solution is used to indicate the pallets currently required to be served by the ships in the ship set; the ship set includes at least two ships. The rule acquisition module 720 is configured to acquire the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets currently required to be served between every two of the ships to obtain a new pallet allocation solution; the current search operator is one of multiple search operators to be searched. The update module 730 is configured to, when the transportation cost corresponding to the new pallet allocation solution is lower than the transportation cost corresponding to the current pallet allocation solution, use the new pallet allocation solution as the new current pallet allocation solution. The change module 740 is configured to, when the preset iteration end condition is not satisfied, use another search operator to be searched among the multiple search operators as the new current search operator. The iteration module 750 is configured to return to the step of acquiring the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and output the current pallet allocation solution.
[0183] In one embodiment, the update module 730 is specifically configured to traverse all new pallet allocation schemes obtained by adjusting the pallets of the current required services between every two of the ships according to the pallet adjustment rules indicated by the current search operator; wherein, when the transportation cost corresponding to the newly traversed new pallet allocation scheme is lower than the transportation cost corresponding to the current pallet allocation scheme, the new pallet allocation scheme is used as the new current pallet allocation scheme. In one embodiment, the update module 730 is specifically configured to obtain all pairwise ship combinations of the ship set according to the pallet adjustment rules indicated by the current search operator; obtain a new pallet allocation scheme obtained by adjusting the pallets of the current required services between the current combinations according to the pallet adjustment rules indicated by the current search operator; the current combination is a combination to be adjusted among all pairwise ship combinations; when there are other combinations to be adjusted among all pairwise ship combinations, one combination among the other combinations to be adjusted is determined as the new current combination, and the step of obtaining the adjustment of the pallets of the current required services between the current combinations according to the pallet adjustment rules indicated by the current search operator is returned until there are no other combinations to be adjusted among all pairwise ship combinations. In one embodiment, when the current search operator is the first search operator, the current combination includes a first ship and a second ship, and the update module 730 is specifically configured to obtain a first pallet allocation scheme according to the pallet adjustment rules indicated by the first search operator; the first pallet allocation scheme is used to adjust the target pallet currently required by the first ship to the second ship; the target pallet is a pallet that conforms to the pallet adjustment rules indicated by the first search operator; the first pallet allocation scheme is used as the new pallet allocation scheme. In one embodiment, when the current search operator is the second search operator, the current combination includes a first ship and a second ship, and the update module 730 is specifically configured to obtain a second pallet allocation scheme according to the pallet adjustment rules indicated by the second search operator; the second pallet allocation scheme is used to adjust the first pallet currently required by the first ship to the second ship and adjust the second pallet currently required by the second ship to the first ship; the first pallet and the second pallet are both pallets that conform to the pallet adjustment rules indicated by the second search operator; the second pallet allocation scheme is used as the new pallet allocation scheme. In one embodiment, the iteration module 750 is further configured to determine that the iteration end condition is satisfied and output the current pallet allocation scheme when there is no search operator to be searched among the multiple search operators or the number of iterations meets a preset number threshold. Each module in the above pallet allocation device can be implemented in whole or in part by software, hardware, and their combination.Each of the above modules may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a memory in the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules. In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. 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 input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. The computer program, when executed by the processor, implements a pallet allocation method. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a button, a trackball, or a touchpad provided on the housing of the computer device, or may also be an external keyboard, a touchpad, or a mouse, etc. Those skilled in the art can understand, Figure 8The structures shown are only block diagrams of some of the structures related to the solution of this application, and do not constitute a limitation on the computer devices to which the solution of this application is applied. Specifically, a computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement. In one embodiment, a computer device is also provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented. In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented. In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations. Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium, and when the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.In each of the embodiments provided in this application, the database involved may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., and is not limited thereto. The processor involved in each of the embodiments provided in this application may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., and is not limited thereto. 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 application. The above-described embodiments only represent several implementation manners of this application, and their descriptions are relatively specific and detailed, but they should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application should be subject to the appended claims.
Claims
1. A pallet allocation method, characterized in that, The method includes: Obtaining a current pallet allocation plan; the current pallet allocation plan is used to indicate the pallets currently required to be served by the ships in the ship set; the ship set includes at least two ships; Obtaining a pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets currently required to be served between every two of the ships to obtain a new pallet allocation plan; the current search operator is one of multiple search operators to be searched; In the case where the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan; In the case where a preset iteration end condition is not satisfied, taking another search operator to be searched among the multiple search operators as the new current search operator; Returning to the step of obtaining the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and outputting the current pallet allocation plan.
2. The method according to claim 1, wherein The step of, in the case where the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan includes: Traversing all new pallet allocation plans obtained by adjusting the pallets currently required to be served between every two of the ships under the pallet adjustment rule indicated by the current search operator; Wherein, in the case where the transportation cost corresponding to the currently traversed new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan, taking the new pallet allocation plan as the new current pallet allocation plan.
3. The method according to claim 2, wherein The step of traversing all new pallet allocation plans obtained by adjusting the pallets currently required to be served between every two of the ships under the pallet adjustment rule indicated by the current search operator includes: Obtaining all pairs of ship combinations of the ship set under the pallet adjustment rule indicated by the current search operator; Obtaining a new pallet allocation plan obtained by adjusting the pallets currently required to be served between the current combinations under the pallet adjustment rule indicated by the current search operator; the current combination is one of the pairs of ship combinations to be adjusted; In the case where there are other pairs of ship combinations to be adjusted among all the pairs of ship combinations, determining one of the other pairs of ship combinations to be adjusted as the new current combination, and returning to the step of obtaining the new pallet allocation plan obtained by adjusting the pallets currently required to be served between the current combinations under the pallet adjustment rule indicated by the current search operator until there are no other pairs of ship combinations to be adjusted among all the pairs of ship combinations.
4. The method according to claim 3, wherein In the case where the current search operator is the first search operator, the current combination includes a first ship and a second ship, and the step of obtaining a new pallet allocation plan obtained by adjusting the pallets currently required to be served between the current combinations under the pallet adjustment rule indicated by the current search operator includes: According to the pallet adjustment rule indicated by the first search operator, obtain a first pallet allocation plan; the first pallet allocation plan is used to adjust the target pallet currently required by the first ship to the second ship; the target pallet is a pallet that conforms to the pallet adjustment rule indicated by the first search operator. Take the first pallet allocation plan as the new pallet allocation plan.
5. The method according to claim 3, wherein When the current search operator is the second search operator, the current combination includes the first ship and the second ship. Obtaining a new pallet allocation plan obtained by adjusting the pallets currently required for service among the current combinations according to the pallet adjustment rule indicated by the current search operator includes: According to the pallet adjustment rule indicated by the second search operator, obtain a second pallet allocation plan; the second pallet allocation plan is used to adjust the first pallet currently required by the first ship to the second ship, and adjust the second pallet currently required by the second ship to the first ship; the first pallet and the second pallet are both pallets that conform to the pallet adjustment rule indicated by the second search operator. Take the second pallet allocation plan as the new pallet allocation plan.
6. The method according to claim 1, wherein The method further includes: When there is no search operator to be searched among the multiple search operators, or the number of iterations meets the preset number threshold, it is determined that the iteration end condition is satisfied, and the current pallet allocation plan is output.
7. A pallet allocation device, characterized in that, The device includes: A plan acquisition module, configured to acquire a current pallet allocation plan; the current pallet allocation plan is used to indicate the pallets currently required for service by the ships in the ship set; the ship set includes at least two ships. A rule acquisition module, configured to acquire the pallet adjustment rule indicated by the current search operator; the pallet adjustment rule is used to adjust the pallets currently required for service between every two ships to obtain a new pallet allocation plan; the current search operator is one of the multiple search operators to be searched. An update module, configured to take the new pallet allocation plan as the new current pallet allocation plan when the transportation cost corresponding to the new pallet allocation plan is lower than the transportation cost corresponding to the current pallet allocation plan. A change module, configured to, when the preset iteration end condition is not satisfied, take another search operator to be searched among the multiple search operators as the new current search operator. An iteration module, configured to return to the step of acquiring the pallet adjustment rule indicated by the current search operator until the iteration end condition is satisfied, and output the current pallet allocation plan.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.