A container loading optimization method based on real-time scheduling and discrete event simulation
By combining real-time scheduling with discrete event simulation, the container loading sequence and resource allocation were optimized, solving the problems of resource idleness and bottlenecks in the multi-platform and multi-type loading process, and realizing an efficient container loading solution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NAVAL UNIV OF ENG PLA
- Filing Date
- 2026-02-08
- Publication Date
- 2026-06-09
AI Technical Summary
Existing container loading methods struggle to dynamically handle container priorities and loading methods across multiple platforms and types of scenarios, leading to resource idleness or congestion. They also fail to effectively predict the impact of bottleneck changes and differences in container types, making it difficult to meet the high-efficiency requirements of multiple ships operating simultaneously.
A loading scenario model is established using a method based on real-time scheduling and discrete event simulation. A preliminary optimization scheme for loading order and method is generated using a genetic algorithm. Resource allocation conflicts are handled through discrete event simulation. Finally, iterative optimization is carried out with the goal of minimizing the total loading time.
It effectively coordinates resources across multiple platforms, reduces waiting time, improves overall loading efficiency in scenarios involving multiple vessels operating in parallel, and enhances the ability to optimize and adapt to complex loading processes.
Smart Images

Figure CN122175060A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship operation technology, and more specifically, to a container loading optimization method based on real-time scheduling and discrete event simulation. Background Technology
[0002] Container loading, a crucial aspect of ship operations, involves a complex scenario where multiple vessels (referred to as multiple platforms) are simultaneously awaiting loading. In practice, containers exhibit diversity, primarily in size (e.g., height) and weight. Furthermore, different ship platforms (e.g., Type A, B, and C platforms) lead to varying loading requirements, such as the number of loading units, their location (bow or stern), and the types of containers they can accommodate (large, medium, and small). This multi-platform, multi-type characteristic necessitates the coordination of substantial resources during the loading process, including cranes, erecting frames, and temporary storage areas, with the goal of achieving efficient operation within limited resources. Currently, the loading process typically consists of two stages: transporting containers from the warehouse to the dock, and loading them from the dock onto the ship. However, in practice, uneven resource allocation or insufficient process coordination often results in low loading efficiency, becoming a key bottleneck restricting the execution of ship missions.
[0003] Existing loading methods exhibit limitations when dealing with multi-platform, multi-type container scenarios. On one hand, the loading process relies on traditional sequential scheduling, making it difficult to dynamically handle container priorities and loading methods (such as direct or indirect loading), easily leading to resource idleness or congestion. For example, if equipment such as direct-lift cranes and horizontal-lift cranes are not properly coordinated, bottleneck stages (such as the erection or lifting phases) can prolong the overall time. On the other hand, resource constraints (such as limited storage area capacity, crane boom length, and load-bearing differences) further exacerbate process complexity, making it difficult to minimize loading time. In addition, existing methods often focus on optimizing single stages, lacking integrated simulation of the entire process, and cannot effectively predict the impact of bottleneck changes or differences in container types, resulting in frequent waiting delays and resource waste in actual tasks, making it difficult to meet the high-efficiency requirements of simultaneous operations by multiple vessels.
[0004] Optimizing the container loading process has become an urgent need to improve the efficiency of port and ship operations. With the expansion of logistics tasks and the increasing diversification of container quantity and type, loading methods must not only shorten the total time but also reduce resource consumption and enhance adaptability to dynamic scenarios. The industry urgently needs an intelligent scheduling solution that can coordinate resources across multiple platforms and handle type differences to address uncertainties in the loading process (such as bottleneck shifts or resource conflicts). Summary of the Invention
[0005] This invention addresses the technical problems existing in the prior art by providing a container loading optimization method based on real-time scheduling and discrete event simulation, thereby achieving intelligent scheduling of containers that coordinates resources across multiple platforms and handles differences in container types.
[0006] According to a first aspect of the present invention, a container loading optimization method based on real-time scheduling and discrete event simulation is provided, comprising: Establish a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers; A preliminary optimization scheme for the loading sequence and method of containers was generated using a genetic algorithm; The loading process of the preliminary optimization scheme is simulated based on the discrete event simulation method, and a real-time scheduling strategy is used to handle resource allocation during the simulation. With the goal of minimizing the total filling time, the optimal filling scheme is obtained through iterative optimization.
[0007] Based on the above technical solution, the present invention can also be improved as follows.
[0008] Optionally, the establishment of the loading scenario model and the definition of loading tasks and resource constraints for multiple platforms and types of containers include: Define the loading requirements for multiple ship platforms, including at least the number of containers to be loaded on each platform, their distribution locations, and the type and specifications of the containers. Define the characteristics of various types of containers, including at least size and weight parameters, and determine the compatibility between the loading unit and the container; Configure the parameters and layout of the loaded resources, including at least the resource type, resource quantity, and capacity settings; By integrating filling requirements, container characteristics, and resource parameters, a complete filling scenario model is formed.
[0009] Optionally, the loading resources include a variety of types such as vertical cranes, horizontal cranes, shipboard cranes, erecting frames, shore-based temporary storage areas, and shipboard temporary storage areas; The onshore temporary storage area has a limited capacity for temporarily storing containers; the shipboard temporary storage area has a limited capacity for temporarily storing containers on board; and the erecting frame is used to erect containers from a horizontal position to a vertical position.
[0010] Optionally, the preliminary optimization scheme for generating the container loading sequence and loading method using a genetic algorithm includes: An initial population is generated using a genetic algorithm, and the parameters of the genetic algorithm are set. The initial population contains multiple individuals, each of which represents a combination of loading order and loading method.
[0011] Optionally, each individual uses a two-layer coding structure to represent the loading scheme, wherein: The upper-level code is the container loading priority sequence; The lower-level code is the filling method identifier for each container.
[0012] Optionally, the simulation of the loading process of the preliminary optimization scheme based on the discrete event simulation method includes: A. Set the time pointer to zero, and arrange the initial loading events according to the loading order and loading method. The loading events include container erection operation events and hoisting operation events. B, advance the time pointer to the earliest ending loading event moment, process all executable loading events at that moment, including direct loading events of the direct crane and indirect loading events of the horizontal crane and the ship crane in coordination; C. Update the loading resource status and container location status, calculate the start and end times of new loading events based on resource availability and loading priority, and schedule subsequent loading events; D. Execute steps B to C in a loop, dynamically handling resource conflicts and event queuing until all container loading events are completed, and output the total loading time.
[0013] Optionally, the simulation process employs a real-time scheduling strategy to handle resource allocation, including: When multiple loading events compete for the same resource, the event with the higher loading priority is processed first. For events that are waiting due to resource conflicts, their estimated processing time is dynamically updated.
[0014] Optionally, the step of obtaining the optimal filling scheme through iterative optimization with the goal of minimizing the total filling time includes: Obtain the genetic algorithm parameters, including population size, crossover rate, mutation rate, and maximum number of iterations; The fitness of each individual in the current population is evaluated, and the total loading time corresponding to the loading scheme of each individual is calculated through discrete event simulation. The fitness is negatively correlated with the total loading time. With the goal of improving population fitness, the population is iteratively optimized through evolutionary operations, which include at least selection, crossover, and mutation operations. Once the iteration stops, the optimal loading scheme with the best fitness is output.
[0015] Optionally, the iteration stopping condition is reaching the maximum number of iterations or the population fitness convergence; The optimal filling scheme includes a priority sequence of container filling order and a corresponding filling method allocation scheme.
[0016] According to a second aspect of the present invention, a container loading optimization system based on real-time scheduling and discrete event simulation is provided, comprising: The scenario modeling module is used to build a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers. The preliminary optimization module, connected to the scene modeling module, is used to generate a preliminary optimization scheme for the loading sequence and loading method of the container using a genetic algorithm; The simulation processing module is connected to the preliminary optimization module and is used to simulate the loading process of the preliminary optimization scheme based on the discrete event simulation method. During the simulation, a real-time scheduling strategy is used to handle resource allocation. The iterative optimization module, connected to the simulation processing module, is used to obtain the optimal filling scheme through iterative optimization with the goal of minimizing the total filling time.
[0017] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to implement the steps of the above-described container loading optimization method based on real-time scheduling and discrete event simulation when executing a computer management program stored in the memory.
[0018] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored, wherein when executed by a processor, the computer management program implements the steps of the above-described container loading optimization method based on real-time scheduling and discrete event simulation.
[0019] This invention provides a container loading optimization method, system, electronic device, and storage medium based on real-time scheduling and discrete event simulation. It establishes a loading scenario model to clarify the loading tasks and resource constraints of multiple platforms and container types. Then, a genetic algorithm is used to generate preliminary optimization schemes for loading sequence and method. Next, a discrete event simulation method is employed to introduce a real-time scheduling strategy to dynamically handle resource allocation conflicts during the simulation process. Finally, the optimal loading scheme is obtained through iterative optimization with the goal of minimizing the total loading time. This invention effectively coordinates loading resources, reduces operation waiting time, and improves the overall loading efficiency in multi-ship parallel operation scenarios. Furthermore, the combination of genetic algorithm and discrete event simulation enhances the optimization capability and adaptability to complex loading processes. Attached Figure Description
[0020] Figure 1 A schematic diagram of the container loading process; Figure 2 A schematic diagram of the container loading layout; Figure 3 A flowchart of a container loading optimization method based on real-time scheduling and discrete event simulation provided by the present invention; Figure 4 A schematic diagram of the genetic algorithm flow provided for one embodiment; Figure 5A Gantt chart showing the optimal solution for a specific implementation scenario; Figure 6 This invention provides a block diagram of a container loading optimization system based on real-time scheduling and discrete event simulation. Figure 7 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention; Figure 8 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation
[0021] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0022] Figure 1 This is a diagram illustrating the container loading process. Figure 2 This is a schematic diagram of the container loading layout. (Combined with...) Figure 1 as well as Figure 2 This section provides a brief overview of the steps involved in the two methods of container loading.
[0023] like Figure 1 As shown in the process diagram, for a given container, if the direct loading method is chosen, it involves two steps: first, the container is unloaded from the transfer vehicle and then erected by the erecting frame; second, the erected container is directly loaded onto the designated location on the ship by a gantry crane. If the indirect loading method is chosen, it involves four steps: first, the container is unloaded from the transfer vehicle to the quayside storage area; second, the container is lifted from the quayside storage area to the ship's storage area by a horizontal crane; third, after the preparation work for erection is completed, the container placed in the ship's storage area is erected by the erecting frame; and finally, the vertically positioned container is loaded onto the designated location on the ship by the ship's crane.
[0024] Regardless of the loading method chosen, bottlenecks may occur during the container loading process. A bottleneck is a critical step that limits the overall efficiency and speed of the process. The bottleneck is the slowest part of the process, preventing subsequent steps from functioning effectively and thus affecting the total time required to complete the loading task. Before the bottleneck, there is usually a backlog of containers, while after the bottleneck, there is usually waiting or idleness due to a lack of containers. Assuming a container is loaded using the indirect loading method, and of the four steps involved, let's assume the longest step is the third step, where the container is erected by the erector. Because this stage is the most time-consuming, in the fourth stage, after the ship's crane completes the loading of one container, the next container is still being erected. At this point, the ship's crane is idle, reducing the utilization rate of its resources. Similarly, because the third stage is the most time-consuming, the horizontal crane in the previous stage may have already moved another container to the ship's temporary storage area, while the previous container is still being erected, occupying the erection frame resources. This results in containers piling up in the ship's temporary storage area. When the temporary storage area is fully occupied, the horizontal crane will also be unable to lift any more containers, remaining idle. It is clear that the most time-consuming third stage impacts both the stages before and after it, preventing resources in these stages from being fully utilized and affecting the total time to complete the loading task. Therefore, this most time-consuming third stage can be considered the bottleneck of the indirect loading method.
[0025] Because containers using direct and indirect loading methods require different operational procedures, and the resources required for these two loading methods do not overlap, containers using different loading methods will also have different bottlenecks.
[0026] Furthermore, although the two loading methods are parallel, if one method slows down due to a bottleneck, it will necessitate switching some containers from the bottleneck-prone method to the other, ultimately increasing the total loading time. For example, suppose the bottleneck in the direct loading method is the first step: unloading the container from the transfer vehicle and then erecting it using a lifting frame. Because the unloading and erection time is too long, containers using the direct loading method have to wait in line. To ensure the loading of all containers is completed as quickly as possible, more containers will be loaded using the indirect loading method, thus prolonging the loading time for all containers using the indirect method. Therefore, regardless of the loading method, measures should be taken to eliminate bottlenecks and avoid waiting or congestion.
[0027] Based on the above technical background, such as Figure 3As shown, this embodiment of the invention provides a container loading optimization method based on real-time scheduling and discrete event simulation, including: Establish a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers; A preliminary optimization scheme for the loading sequence and method of containers was generated using a genetic algorithm; The loading process of the preliminary optimization scheme is simulated based on the discrete event simulation method, and a real-time scheduling strategy is used to handle resource allocation during the simulation. With the goal of minimizing the total filling time, the optimal filling scheme is obtained through iterative optimization.
[0028] Understandably, given the shortcomings in the background technology, this invention proposes a container loading optimization method based on real-time scheduling and discrete event simulation. This method utilizes a collaborative optimization approach combining discrete event simulation (DES) and a genetic algorithm. By establishing a loading scenario model for multiple platforms and container types, it clearly defines loading tasks and resource constraints (such as direct-lift cranes, horizontal-lift cranes, and temporary storage areas), thereby structuring the complex loading problem. The genetic algorithm first generates a preliminary scheme for the loading order and method. Its two-layer coding structure (e.g., the upper layer is a priority sequence, and the lower layer is a loading method identifier) ensures a comprehensive exploration of the solution space. Subsequently, the discrete event simulation method dynamically advances the time pointer, simulating loading events (such as...). Figure 1 The diagram illustrates the erection and hoisting operations in each stage, and incorporates a real-time scheduling strategy to handle resource conflicts. For example, when multiple events compete for the same resource, higher-priority tasks are executed first, and the estimated time for waiting events is dynamically updated. In this embodiment, the iterative optimization process aims to minimize the total loading time. The scheme is continuously updated through evolutionary operations of a genetic algorithm (such as selection, crossover, and mutation) until it converges to the optimal solution.
[0029] This invention aims to minimize the total loading time. The iteratively optimized solution effectively avoids bottlenecks (such as the second stage of indirect loading or the first stage of direct loading), reducing resource idleness and waiting time. Through the deep integration of discrete event simulation and real-time scheduling, intelligent dynamic optimization of the loading process is achieved: This method can efficiently coordinate the work sequences of various resources such as direct cranes, horizontal cranes, shipboard cranes, and temporary storage areas, avoiding equipment conflicts and idleness; at the same time, the genetic algorithm combined with a priority mechanism actively identifies and avoids bottlenecks (such as erection operations or hoisting processes), improving the balance of resource utilization; in addition, its adaptive capability can flexibly cope with the differences in loading requirements and container type changes of multiple platforms (such as A, B, and C type ships), and continuously optimize the loading sequence and method through a closed-loop iterative mechanism to ensure the robustness and effectiveness of the solution under complex constraints.
[0030] Based on the above technical solutions, the embodiments of the present invention can be further improved as follows.
[0031] In one possible implementation, establishing a loading scenario model and defining loading tasks and resource constraints for multiple platforms and container types includes: Define the loading requirements for multiple ship platforms, including at least the number of containers to be loaded on each platform, their distribution locations, and the type and specifications of the containers. Define the characteristics of various types of containers, including at least size and weight parameters, and determine the compatibility between the loading unit and the container; The parameters and layout of the loading resources are configured, including at least the resource type, resource quantity, and capacity settings; specifically, the loading resources include multiple types such as vertical cranes, horizontal cranes, shipboard cranes, erection frames, shore-based temporary storage areas, and shipboard temporary storage areas. The onshore temporary storage area has a limited capacity for temporarily storing containers; the shipboard temporary storage area has a limited capacity for temporarily storing containers on board; and the erecting frame is used to erect containers from a horizontal position to a vertical position. By integrating filling requirements, container characteristics, and resource parameters, a complete filling scenario model is formed.
[0032] For example, combining Figure 2 The diagram shown illustrates the container loading layout; different types of ships have different loading requirements. Figure 2 The table shows three typical ship types, corresponding to platforms A, B, and C. The loading requirements for platforms A, B, and C are shown in Table 1.
[0033] Table 1 Loading Requirements for Each Platform
[0034] Regarding the number of loading units, the A, B, and C ship platforms have 160, 80, and 40 loading units respectively. The depth of the loading units varies, with a maximum of two to three depths, each suitable for containers of different heights. Deeper loading units can hold smaller containers, but the reverse is not true. In special cases, a single unit can hold multiple smaller containers. However, in most cases, it is not necessary to fill all positions.
[0035] like Figure 2 As shown, in terms of loading location distribution, the loading locations of platforms A and B are located at the bow and stern of the ship, while the loading location of platform C is located at the bow. In terms of loading type, platforms A and B can load large, medium and small containers, while platform C can load medium and small containers.
[0036] The process of establishing a loading scenario model is illustrated using the Type A ship platform as an example.
[0037] First, the loading requirements of the Type A vessel platform are defined, including the loading of 160 containers, distributed as 100 units at the bow and 60 units at the stern, covering large, medium, and small container types. Next, the characteristics of the containers are defined, such as large containers, due to their size and weight, only being suitable for loading units with a depth exceeding 7 meters, while medium and small containers can flexibly adapt to various unit types. Then, resource parameters are configured, such as setting up one direct-lift crane for direct loading of large containers, one horizontal-lift crane to work in conjunction with the ship's crane, a shore storage area capacity of 3 containers, and a ship's storage area capacity of 2 containers. These parameters are then integrated to form a visual loading layout model, thereby ensuring a precise match between resource constraints and task requirements.
[0038] The modeling approach in this embodiment effectively prevents resource contention (such as crane conflicts or temporary storage overflow) by clearly defining the relationships between various elements, improves the feasibility and scheduling accuracy of the loading plan, and lays a solid foundation for subsequent genetic algorithm optimization.
[0039] In one possible implementation, combined Figure 4 As shown, the preliminary optimization scheme for generating the container loading sequence and loading method using a genetic algorithm includes: An initial population is generated using a genetic algorithm, and the parameters of the genetic algorithm are set. The initial population contains multiple individuals, each of which represents a combination of loading order and loading method.
[0040] Each individual uses a two-layer coding structure to represent the loading scheme, wherein: The upper-level code is the container loading priority sequence; The lower-level code is the filling method identifier for each container.
[0041] It is understood that this embodiment achieves loading optimization through a two-layer coding structure of a genetic algorithm. For example, when processing 10 containers, individuals in the initial population use an explicit two-layer coding structure—for example, the upper-layer coding of individual A is [8 2 12 11 5 13 9 3 15 10 7 4 14 1 6], representing the loading priority order of containers (loading container 8 first, then container 2, and so on); the lower-layer coding is [0 1 1 0 0 0 1 1 0 1 1 1 1 1 1], where 0 / 1 correspond to direct loading and indirect loading methods, respectively. This coding structure can be optimized through evolutionary operations of the genetic algorithm: for example, a tournament selection mechanism is used in the selection phase (e.g., randomly selecting 2 individuals to compete for the winner); in the crossover phase, single-point crossover is performed on the upper and lower layers of coding, and duplicate sequences appearing in the upper layer coding are automatically repaired; in the mutation phase, the positions of the upper layer coding are randomly swapped, and a bit-flipping operation is performed on the lower layer coding.
[0042] In this embodiment, the dual-layer coding structure controls the loading sequence through the upper-layer sequence number and allocates loading resources through the lower-layer pattern identifier, enabling the genetic algorithm to simultaneously optimize both order and method decision variables. For example, when the crossover operation generates duplicate numbers, the system automatically replaces the missing numbers to avoid generating invalid solutions; while the mutation operation explores the diversity of loading method combinations through local perturbation. This embodiment effectively solves the problem of coupled optimization of order and method in the loading task, preventing resource allocation conflicts (such as overlapping tasks between vertical and horizontal cranes) and improving overall operational efficiency by dynamically adjusting the loading method (such as switching the loading mode of containers at bottleneck stages).
[0043] In one possible implementation, the simulation of the loading process of the preliminary optimization scheme based on the discrete event simulation method includes: A. Set the time pointer to zero, and arrange the initial loading events according to the loading order and loading method. The loading events include container erection operation events and hoisting operation events. B, advance the time pointer to the earliest ending loading event moment, process all executable loading events at that moment, including direct loading events of the direct crane and indirect loading events of the horizontal crane and the ship crane in coordination; C. Update the loading resource status and container location status, calculate the start and end times of new loading events based on resource availability and loading priority, and schedule subsequent loading events; D. Execute steps B to C in a loop, dynamically handling resource conflicts and event queuing until all container loading events are completed, and output the total loading time.
[0044] It is understood that this embodiment uses discrete event simulation (DES) to specifically realize the dynamic simulation of the filling process.
[0045] For example, in a certain implementation scenario, when processing two containers (one using direct filling and the other using indirect filling), first set the time pointer T=0, and arrange the initial events according to the filling order—the erection operation of the directly filled container (end time t1=5) and the horizontal lifting operation of the indirectly filled container (end time t2=3).
[0046] The time pointer is then advanced to the earliest end time T=t2=3, executing events (such as scheduling the ship's erection operation for indirect container loading) are processed, and resource status (such as the ship's crane occupancy) is updated. The pointer continues to advance to T=t1=5, processing direct container loading events and calculating the start and end times of new events based on resource availability and loading priority. By cyclically executing event processing and status updates, resource conflicts (such as contention for the erection frame or crane) are dynamically resolved until all loading events are completed.
[0047] In this embodiment, the discrete advancement of the time pointer ensures that resource allocation is processed only when an event is triggered, reducing simulation computation redundancy; the real-time scheduling strategy, combined with loading priority (such as upper-level coding sequence), dynamically adjusts the event queue, effectively avoiding equipment idleness and congestion (such as the coordinated waiting of horizontal cranes and ship cranes), and improving the timing accuracy and resource utilization of the loading process.
[0048] In one possible implementation, the simulation process employs a real-time scheduling strategy for resource allocation, including: When multiple loading events compete for the same resource, the event with the higher loading priority is processed first. For events that are waiting due to resource conflicts, their estimated processing time is dynamically updated.
[0049] For example, when a direct-lift crane needs to handle container loading events numbered 8 and 2 simultaneously, the system compares priorities based on the upper-level encoding sequence generated by the genetic algorithm (e.g., [8 2 12 11 5 13 9 3 15 10 7 4 14 1 6]), prioritizing the allocation of crane resources to container number 8 for erection, while container event number 2 enters the waiting queue; at the same time, the estimated start time of container number 2 is dynamically updated based on the actual crane usage time, for example, the original start time T=5 is delayed to T=8 due to resource conflict.
[0050] This embodiment achieves rapid adjudication of resource contention by prioritizing the loading order, avoiding crane idleness or task blockage; while the dynamic time update function corrects the execution sequence of waiting events in real time, preventing the overall loading chain from breaking due to local conflicts, and ensuring the continuity and stability of the loading process.
[0051] In one possible implementation, combined Figure 4 As shown, the process of minimizing the total loading time and obtaining the optimal loading scheme through iterative optimization includes: Obtain the genetic algorithm parameters, including population size, crossover rate, mutation rate, and maximum number of iterations; The fitness of each individual in the current population is evaluated, and the total loading time corresponding to the loading scheme of each individual is calculated through discrete event simulation. The fitness is negatively correlated with the total loading time. With the goal of improving population fitness, the population is iteratively optimized through evolutionary operations, which include at least selection, crossover, and mutation operations. Once the iteration stops, the optimal loading scheme with the best fitness is output.
[0052] The iteration stopping condition is reaching the maximum number of iterations or the population fitness convergence. The optimal filling scheme includes a priority sequence of container filling order and a corresponding filling method allocation scheme.
[0053] For example, taking the optimization of 80 medium-sized containers as an example, the genetic algorithm parameters are set (population size 50, crossover rate 0.7, mutation rate linearly adjusted from 0.1 to 0.02), the maximum number of iterations is 100, and the total loading time of each individual in the population is calculated as the fitness through discrete event simulation (e.g., the loading scheme of individual A takes x minutes). The evolutionary operation adopts tournament selection (size k=2) to select high-quality individuals, and generates new solutions through single-point crossover and position flip mutation. The iteration terminates when the maximum number of iterations of 100 is reached or the population fitness converges (e.g., the optimal solution remains unchanged for 10 consecutive generations), and the output includes the priority sequence of loading order and the allocation of loading method.
[0054] The population sizes were set to 10, 20, 30, 40, and 50, respectively, and each population size was used for ten trials. Due to the randomness of the genetic algorithm's solution, the average of the ten trials was taken as the final result, i.e., the total time required to fill all the containers. The experimental results are shown in Table 2 below: Table 2 Comparison of the average values of optimal solutions with different population sizes
[0055] The optimal solution with the shortest total loading time is shown in the Gantt chart. Figure 5 As shown, the number in each square of the Gantt chart is the container number.
[0056] From Table 2 and Figure 5 The experimental results show that the optimal result obtained in this experiment is 900. Under ideal conditions, increasing the population size does not change the final result; all solutions are the same. Considering that the problem solved in this experiment is relatively simple, it is highly likely that the optimal solution was obtained.
[0057] In addition, from Figure 5 As shown in the Gantt chart, in the loading plan obtained using the genetic algorithm, the total time for loading containers using the direct loading method is close to the total time for loading containers using the indirect loading method. The utilization of the two loading methods is balanced, and the direct crane, horizontal crane, and ship crane are all fully utilized.
[0058] Figure 6 A structural diagram of a container loading optimization system based on real-time scheduling and discrete event simulation is provided for an embodiment of the present invention, as shown below. Figure 6 As shown, a container loading optimization system based on real-time scheduling and discrete event simulation includes a scenario modeling module, a preliminary optimization module, a simulation processing module, and an iterative optimization module, wherein: The scenario modeling module is used to build a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers. The preliminary optimization module, connected to the scene modeling module, is used to generate a preliminary optimization scheme for the loading sequence and loading method of the container using a genetic algorithm; The simulation processing module is connected to the preliminary optimization module and is used to simulate the loading process of the preliminary optimization scheme based on the discrete event simulation method. During the simulation, a real-time scheduling strategy is used to handle resource allocation. The iterative optimization module, connected to the simulation processing module, is used to obtain the optimal filling scheme through iterative optimization with the goal of minimizing the total filling time.
[0059] It is understood that the container loading optimization system based on real-time scheduling and discrete event simulation provided by the present invention corresponds to the container loading optimization method based on real-time scheduling and discrete event simulation provided in the foregoing embodiments. The relevant technical features of the container loading optimization system based on real-time scheduling and discrete event simulation can be referred to the relevant technical features of the container loading optimization method based on real-time scheduling and discrete event simulation, and will not be repeated here.
[0060] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 7 As shown, this embodiment of the invention provides an electronic device 700, including a memory 710, a processor 720, and a computer program 711 stored in the memory 710 and executable on the processor 720. When the processor 720 executes the computer program 711, it performs the following steps: Establish a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers; A preliminary optimization scheme for the loading sequence and method of containers was generated using a genetic algorithm; The loading process of the preliminary optimization scheme is simulated based on the discrete event simulation method, and a real-time scheduling strategy is used to handle resource allocation during the simulation. With the goal of minimizing the total filling time, the optimal filling scheme is obtained through iterative optimization.
[0061] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 8 As shown, this embodiment provides a computer-readable storage medium 800, on which a computer program 711 is stored. When the computer program 711 is executed by a processor, it performs the following steps: Establish a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers; A preliminary optimization scheme for the loading sequence and method of containers was generated using a genetic algorithm; The loading process of the preliminary optimization scheme is simulated based on the discrete event simulation method, and a real-time scheduling strategy is used to handle resource allocation during the simulation. With the goal of minimizing the total filling time, the optimal filling scheme is obtained through iterative optimization.
[0062] This invention provides a container loading optimization method, system, electronic device, and storage medium based on real-time scheduling and discrete event simulation. It establishes a loading scenario model to clarify the loading tasks and resource constraints of multiple platforms and container types. Then, a genetic algorithm is used to generate preliminary optimization schemes for loading sequence and method. Next, a discrete event simulation method is employed to introduce a real-time scheduling strategy to dynamically handle resource allocation conflicts during the simulation process. Finally, the optimal loading scheme is obtained through iterative optimization with the goal of minimizing the total loading time. This invention effectively coordinates loading resources, reduces operation waiting time, and improves the overall loading efficiency in multi-ship parallel operation scenarios. Furthermore, the combination of genetic algorithm and discrete event simulation enhances the optimization capability and adaptability to complex loading processes.
[0063] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0064] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0065] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0068] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0069] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A container loading optimization method based on real-time scheduling and discrete event simulation, characterized in that, include: Establish a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers; A preliminary optimization scheme for the loading sequence and method of containers was generated using a genetic algorithm; The loading process of the preliminary optimization scheme is simulated based on the discrete event simulation method, and a real-time scheduling strategy is used to handle resource allocation during the simulation. With the goal of minimizing the total filling time, the optimal filling scheme is obtained through iterative optimization.
2. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 1, characterized in that, The establishment of the loading scenario model and the definition of loading tasks and resource constraints for multiple platforms and types of containers include: Define the loading requirements for multiple ship platforms, including at least the number of containers to be loaded on each platform, their distribution locations, and the type and specifications of the containers. Define the characteristics of various types of containers, including at least size and weight parameters, and determine the compatibility between the loading unit and the container; Configure the parameters and layout of the loaded resources, including at least the resource type, resource quantity, and capacity settings; By integrating filling requirements, container characteristics, and resource parameters, a complete filling scenario model is formed.
3. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 2, characterized in that, The loading resources include a variety of types such as vertical cranes, horizontal cranes, shipboard cranes, erection frames, shore-based temporary storage areas, and shipboard temporary storage areas; The onshore temporary storage area has a limited capacity for temporarily storing containers; the shipboard temporary storage area has a limited capacity for temporarily storing containers on board; and the erecting frame is used to erect containers from a horizontal position to a vertical position.
4. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 1, characterized in that, The preliminary optimization scheme for generating the container loading sequence and loading method using a genetic algorithm includes: An initial population is generated using a genetic algorithm, and the parameters of the genetic algorithm are set. The initial population contains multiple individuals, each of which represents a combination of loading order and loading method.
5. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 4, characterized in that, Each individual uses a two-layer coding structure to represent the loading scheme, wherein: The upper-level code is the container loading priority sequence; The lower-level code is the filling method identifier for each container.
6. A container loading optimization method based on real-time scheduling and discrete event simulation according to claim 4 or 5, characterized in that, The simulation of the loading process of the preliminary optimization scheme based on the discrete event simulation method includes: A. Set the time pointer to zero, and arrange the initial loading events according to the loading order and loading method. The loading events include container erection operation events and hoisting operation events. B, advance the time pointer to the earliest ending loading event moment, process all executable loading events at that moment, including direct loading events of the direct crane and indirect loading events of the horizontal crane and the ship crane in coordination; C. Update the loading resource status and container location status, calculate the start and end times of new loading events based on resource availability and loading priority, and schedule subsequent loading events; D. Execute steps B to C in a loop, dynamically handling resource conflicts and event queuing until all container loading events are completed, and output the total loading time.
7. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 6, characterized in that, The simulation process employs a real-time scheduling strategy for resource allocation, including: When multiple loading events compete for the same resource, the event with the higher loading priority is processed first. For events that are waiting due to resource conflicts, their estimated processing time is dynamically updated.
8. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 6, characterized in that, The goal of minimizing the total loading time, through iterative optimization to obtain the optimal loading scheme, includes: Obtain the genetic algorithm parameters, including population size, crossover rate, mutation rate, and maximum number of iterations; The fitness of each individual in the current population is evaluated, and the total loading time corresponding to the loading scheme of each individual is calculated through discrete event simulation. The fitness is negatively correlated with the total loading time. With the goal of improving population fitness, the population is iteratively optimized through evolutionary operations, which include at least selection, crossover, and mutation operations. Once the iteration stops, the optimal loading scheme with the best fitness is output.
9. The container loading optimization method based on real-time scheduling and discrete event simulation according to claim 8, characterized in that, The iteration stopping condition is reaching the maximum number of iterations or the population fitness convergence. The optimal filling scheme includes a priority sequence of container filling order and a corresponding filling method allocation scheme.
10. A container loading optimization system based on real-time scheduling and discrete event simulation, characterized in that, include: The scenario modeling module is used to build a loading scenario model and define loading tasks and resource constraints for multiple platforms and types of containers. The preliminary optimization module, connected to the scene modeling module, is used to generate a preliminary optimization scheme for the loading sequence and loading method of the container using a genetic algorithm; The simulation processing module is connected to the preliminary optimization module and is used to simulate the loading process of the preliminary optimization scheme based on the discrete event simulation method. During the simulation, a real-time scheduling strategy is used to handle resource allocation. The iterative optimization module, connected to the simulation processing module, is used to obtain the optimal filling scheme through iterative optimization with the goal of minimizing the total filling time.