Automatic logistics simulation method and system based on discrete event engine technology

By using an automated logistics simulation method based on a discrete event engine, the problems of simulation accuracy and modeling complexity in existing technologies are solved, achieving high-precision logistics system simulation and support for rapid response to personalized needs.

CN121563333APending Publication Date: 2026-02-24KUNMING KSEC LOGISTIC INFORMATION IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511623793.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing automated logistics simulation technologies have poor accuracy in real-time simulation, cannot accurately simulate the dynamic behavior of AGVs, ignore the impact of equipment failures, have high professional thresholds for modeling, and are difficult to respond quickly to personalized needs.

Method used

The simulation method based on discrete event engine technology is adopted. The scene model is built by graphical drag and drop, the residual task state is loaded, the A* algorithm and raster map are used to simulate AGV movement, and the simulation is combined with the fault model to support in-process simulation and rapid modeling.

Benefits of technology

It achieves high-precision in-process simulation of logistics systems, lowers the modeling threshold, supports rapid response to personalized needs, and improves the accuracy of simulation results and the robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563333A_ABST
    Figure CN121563333A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic logistics simulation method and system based on a discrete event engine technology, relates to the technical field of automatic logistics simulation, and aims to overcome the defects of an existing simulation tool in the aspect of coping with the dynamism and uncertainty of an automatic logistics system. And the functions of pre-simulation, in-event simulation of loading and continuing propelling of in-event residual tasks, post-simulation verification and the like can be realized. The automatic logistics discrete event simulation implementation technology is analyzed and comprises the steps of performing event processing on processes such as task allocation and material circulation, and promoting events by following a time flow overall management method. A data layer, a logic control layer, an access layer, an application layer, automatic logistics scene modeling and recovery, an operation mechanism, an interface and other implementation modes are covered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated logistics simulation technology, specifically to an automated logistics simulation method and system based on discrete event engine technology. Background Technology

[0002] Automated logistics systems are the core of modern manufacturing and e-commerce logistics, and their design, planning, and operation directly affect the efficiency and cost of the entire supply chain. Before a system is put into actual operation, modeling and analyzing it using simulation technology is a key means to verify the feasibility of the solution, optimize resource allocation, and improve task on-time performance. Among these methods, discrete event simulation (DES) has become the mainstream modeling method in this field because it can accurately describe asynchronous and random events in the logistics system, such as task arrival, equipment execution, and queue waiting.

[0003] Although simulation technology is developing towards deep integration with digital twins, artificial intelligence, and edge computing, and market demands are placing higher requirements on the real-time performance, accuracy, and ease of use of simulation tools, existing automated logistics simulation technologies, especially in practical engineering applications, still have the following significant shortcomings: The simulation is disconnected from the physical system state, resulting in poor accuracy in real-time simulations: Existing simulation tools mostly focus on "pre-event" planning simulations or simple "post-event" replays. When it is necessary to simulate and predict subsequent tasks based on the current state during system operation (in-event), there is generally a lack of effective mechanisms to synchronize the states of ongoing or residual unfinished tasks in the physical system to the simulation model. If these residual tasks are directly ignored and only new tasks are simulated, the simulation starting point will be seriously inconsistent with the actual situation, the prediction results will have huge deviations, and it will be impossible to provide a reliable basis for real-time scheduling.

[0004] The coarse granularity of simulations for continuous motion processes affects the accuracy of results: For devices with continuous movement characteristics, such as AGVs, many simulation tools simplify them into discrete events with fixed delays. This coarse modeling approach cannot accurately simulate the dynamic behaviors of AGVs on actual paths, such as movement, obstacle avoidance, and congestion, leading to inaccurate estimations of task execution time and difficulty in identifying potential conflicts and bottlenecks in path planning.

[0005] Insufficient consideration of system uncertainties and room for improvement in model realism: Physical equipment inevitably fails, but existing simulation models often operate under ideal conditions, ignoring the impact of random factors such as equipment failure rate and recovery time on the overall system efficiency. This makes the simulation results overly optimistic and unable to truly reflect the system's robustness and actual output capacity.

[0006] High professional threshold for modeling and low efficiency of customized development: Traditional simulation platforms usually require users to have professional modeling knowledge. Modeling and customized development for specific logistics scenarios have long cycles and high costs, making it difficult to quickly respond to market changes and customers' personalized simulation needs. For example, there is a lack of standardized and rapid verification tools in areas such as verifying task on-time performance and improving implementation efficiency.

[0007] Therefore, there is an urgent need in this field for an automated logistics simulation method that can deeply integrate physical and information spaces, support high-precision real-time simulation, and be rapidly built and deployed, in order to overcome the above-mentioned technical bottlenecks and provide stronger decision support for the efficient and reliable operation of automated logistics systems. Summary of the Invention

[0008] The purpose of this invention is to provide an automated logistics simulation method and system based on discrete event engine technology to address the aforementioned problems.

[0009] The technical solution of the present invention is as follows: An automated logistics simulation method based on discrete event engine technology includes the following steps: Scene modeling: Construct a 3D scene model of the automated logistics system through graphical drag-and-drop operations, configure simulation parameters for the logistics equipment in the scene, and establish adjacency relationships between equipment to define task execution paths; Discrete event engine initialization: Load and deserialize the scene model, initialize the discrete event simulation engine, which includes a discrete event queue and a time stream management module; In-process simulation preparation: Before the simulation starts, the task information query interface is called to obtain the status information of the currently remaining unfinished tasks on all devices in the physical system, and the remaining task information is loaded into the corresponding device objects in the simulation system to synchronize the initial state of the simulation system with the real-time state of the physical system. Task reception: Receives simulation task information from the Warehouse Execution System (WES); Discrete event-driven simulation: Based on the loaded residual task information and the received simulation task information, the simulation is driven by a discrete event engine. The discrete event engine executes events in the discrete event queue in the order of time flow. The execution of each event includes: calculating the duration of the event according to the simulation parameters of the device to which it belongs, and at the end of the event execution, generating the discrete event of the next device according to the task execution path and inserting it into the event queue, while updating the time flow advancement point. Simulation result reporting: After all task simulations are completed, the simulation result data is reported to WES.

[0010] By using the above method and loading residual tasks from physical devices, the initial state of the simulation system is kept consistent with the actual operating state, avoiding prediction deviations caused by inaccurate starting points. This makes real-time simulation optimization possible during system operation. WES can dynamically adjust task strategies based on more accurate simulation results, achieving true "online optimization" and "dynamic scheduling".

[0011] Complex scenarios can be built through graphical drag-and-drop and parameter configuration without writing code, enabling domain experts to create models independently without programming expertise. The XML serialization mechanism enables persistent storage and rapid recovery of scenario models, facilitating the reuse, sharing, and iterative optimization of solutions.

[0012] Furthermore, the discrete event queue is managed using a linked list data structure. When an event is inserted, the linked list is traversed from the head, and the new event is inserted before the first event whose simulation time is greater than the simulation time of the new event. When an event is retrieved, the event at the head of the linked list is retrieved directly.

[0013] Furthermore, in the discrete event-driven simulation, each simulation device object is predefined with at least three events: a pre-execute event, an execute event, and a post-execute event; its execution logic is as follows: The PreExecute event is used to receive simulation tasks, calculate the activation delay time of the Execute event based on the device simulation parameters, and then insert the Execute event into the discrete event queue. After the Execute event completes execution, the NextExecute event is triggered. The NextExecute event is used to detect whether the next device in the task execution path is idle. If it is, the PreExecute event for the next device is triggered. If not, a delayed NextExecute event is re-inserted into the discrete event queue for detection again.

[0014] Furthermore, it also includes AGV subsystem simulation, which discretizes the continuous movement process of the AGV into grid-by-grid movement events on a rasterized map, specifically including: Path planning: The A* algorithm is used to calculate the optimal path from the starting point to the destination for the AGV on a raster map, where the heuristic function H(n) adopts Euclidean distance; Discrete movement: The calculated optimal path is decomposed into a series of continuous grid movements; for each grid on the path, a corresponding discrete movement event is generated and inserted into the discrete event queue in sequence; when each discrete movement event is executed, an attempt is made to lock the next target grid. If the lock is successful, the AGV moves to the grid and inserts the next grid movement event. If the lock fails, the current grid movement event is re-inserted into the queue.

[0015] By using the above method, continuous movement is broken down into grid-level discrete events, allowing for precise simulation of the AGV's walking path and speed changes. The calculation results are closer to the actual values ​​than those of a simple fixed-delay model. Combining the A* algorithm and grid locking mechanism, complex scenarios such as AGV path planning, obstacle avoidance, and waiting can be naturally reproduced in simulations, helping to identify system bottlenecks such as path conflicts and traffic deadlocks in advance.

[0016] Furthermore, in the simulation of the AGV subsystem, map rasterization is also included before path planning: the three-dimensional physical space in which the AGV runs is mapped into a two-dimensional raster map with a custom number of rows and columns through the simulation path planning tool, and obstacles are defined by marking specific grids as prohibited.

[0017] Furthermore, after the task is received but before the discrete event-driven simulation, task path detection and allocation are also included: For each simulation task, the corresponding route list is matched in a predefined path information database based on its source address and destination address; Once a match is successful, the task is bound to the route list and added to the list of valid tasks; When the simulation starts, the tasks in the list of legal tasks are prioritized according to the preset task allocation strategy, and the tasks are then sent to the corresponding starting devices in sequence according to the sorting results and the idle status of the devices.

[0018] Furthermore, the task allocation strategy is a multi-rule composite strategy, which sorts tasks by superimposing the calculation results of multiple task rules into a single priority value; the task rules include, but are not limited to: task priority in reverse / ascending order, task creation time in ascending order, task sequence number in ascending order, and weight calculation rules that combine time, position, and priority.

[0019] Furthermore, it also includes equipment failure simulation: Configure fault models for logistics equipment based on historical statistical data; During the simulation, when the triggering conditions of the fault model are met, a device fault event is generated. This event will lock the device and simulate the fault recovery process. During the fault, the device will suspend the execution of all tasks.

[0020] By employing the methods described above and introducing a failure model based on historical statistics, simulations can assess the impact of random equipment failures on overall system efficiency (such as task on-time performance and throughput). This helps users understand system vulnerabilities during the design phase and validate different operation and maintenance strategies (such as backup equipment plans and maintenance procedures), thereby enabling the planning of a more robust logistics system.

[0021] This application also includes an automated logistics simulation system based on discrete event engine technology, used to implement an automated logistics simulation method based on discrete event engine technology, including: The scenario modeling module is used to build and persist automated logistics scenario models through a graphical interface; The core module of the discrete event engine includes a discrete event queue for managing the order of events and a time flow management module for advancing simulation time; The in-process simulation processing module is used to load residual task information from the physical system before the simulation begins, so as to synchronize the initial state of the simulation. The task management module is used to receive external simulation tasks and perform task path detection and allocation. The equipment simulation module is used to simulate the behavior of various logistics equipment and calculate the duration of events based on simulation parameters. The AGV simulation subsystem module is used to perform discretized simulation of the continuous movement of AGVs using a gridded map and the A* algorithm. The simulation interface module is used to communicate with the Warehouse Execution System (WES) to receive tasks and report results.

[0022] The system described above, employing a base class for simulated entities and generic event classes, simplifies the addition of new device types and custom events, reducing the complexity of system expansion. The standard "PreExecute-Execute-NextExecute" event flow clearly defines the state transition logic of the simulated devices, making the model easier to understand and maintain. The linked-list-based event queue management achieves an efficient balance between event insertion and retrieval while ensuring correct event order.

[0023] This application also includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an automated logistics simulation method based on discrete event engine technology.

[0024] Compared with existing technologies, the advantages of this invention are: Targeting the characteristics of automated logistics systems, this paper deeply customizes discrete events to enable pre-event simulation, in-event simulation through loading residual tasks to continue progressing, and post-event simulation verification. First, it analyzes the implementation technology of the discrete event engine and provides an overall overview of its implementation approach in automated logistics simulation. Then, it provides an overall introduction to the system architecture, including the overall framework, operating mechanism, modeling and recovery methods for automated logistics scenarios, and related simulation interfaces. Next, it details the design of the discrete event engine, including event system design, event-driven mechanism, time-flow management, task execution path decomposition and control, and in-event simulation processing. Finally, it explains the simulation result analysis methods. A comparative analysis is conducted between the self-developed discrete event simulation and existing simulation software using a real-world application scenario in automated logistics. Attached Figure Description

[0025] Figure 1 This is a flowchart of the method used in this application.

[0026] Figure 2 This is the architecture diagram of the system in this application.

[0027] Figure 3 This is a schematic diagram of the system operation mechanism of this application.

[0028] Figure 4 Create a user interface diagram for automated logistics scenarios.

[0029] Figure 5 This is a diagram showing the correspondence between persistent data and scenarios in this application system.

[0030] Figure 6 This is a schematic diagram of serialized data in the automated logistics scenario of this application.

[0031] Figure 7 This is a schematic diagram of the system interface calls in this application.

[0032] Figure 8 This is a diagram illustrating the implementation of the simulation event class in this application.

[0033] Figure 9 This is a diagram illustrating the implementation of the simulation event class in this application.

[0034] Figure 10 This is a schematic diagram of the timeline advancement mechanism of this application.

[0035] Figure 11 This is a schematic diagram of the path planning for the AGV subsystem in this application.

[0036] Figure 12 This is a flowchart for the simulation of discrete events in automated logistics in this application.

[0037] Figure 13 This is a flowchart for WES to send simulation tasks to the simulation system.

[0038] Figure 14 A flowchart for simulating task path detection and path splitting. Detailed Implementation

[0039] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0040] The features and performance of the present invention will be further described in detail below with reference to embodiments.

[0041] Please see Figure 1-14 An automated logistics simulation method based on discrete event engine technology includes: Automated logistics systems employ discrete event simulation, which allows for the rapid progression of discrete events to infer the time consumption of system tasks. Through simulation result analysis, and continuous optimization of task structure, task allocation strategies, and equipment bottleneck efficiency, multiple simulations are conducted to ultimately identify the optimal system solution.

[0042] Discrete event simulation refers to the simulation of a discrete event system model as events evolve. Automated logistics simulation requires event-based processing of processes such as task allocation, material flow, and equipment loading / unloading. During the execution of the discrete simulation system, a time-flow management method is followed. Events are stored in the system in a sequential queue, ensuring a first-in, first-out (FIFO) order. Events are allowed to jump the queue (the inserted event can also be the current event) to fill the system's time flow module, ensuring that after an event is inserted according to the system timeline, the earlier events in the system timeline are at the front of the event queue, and events are arranged sequentially. The entire simulation system starts with an initial event and continues until the event execution ends, at which point no more events are inserted into the system time flow. Figure 1 A flowchart for simulating discrete events in automated logistics.

[0043] The automated logistics discrete event simulation system is designed with the following main components: 1. Modeling and restoration of logistics scenarios: Its main function is to create 3D visual models of logistics scenarios with different layouts by dragging and dropping equipment models, establishing adjacency relationships between scene equipment and configuring simulation parameters for the equipment, providing basic information for simulation operation. 2. The core of discrete event simulation: a discrete event engine. This engine provides discrete event queue management and, combined with the time-flow module's advancement mechanism, ensures that discrete events are inserted into the discrete event queue in a time sequence. Events are retrieved from the event queue sequentially and executed. After an event is executed, the current simulation time in the time-flow module is updated to the absolute time of the executed event. The discrete event engine is event-driven; that is, subsequent events are generated when the current event finishes execution. Subsequent events can be detection events for the current object or events for other objects. If no subsequent events occur for the current object, it indicates that the current task is complete. During event execution, execution records (including event objects, start times, durations, and other simulation data) are saved to provide corresponding data support for simulation analysis.

[0044] In the equipment simulation operation module, in order to solve the problem of large deviations in simulation due to different execution paths of continuous movement tasks, a processing method is proposed to decompose the continuous movement process of AGV into fine-grained discrete events. Combined with AGV map partitioning and A* algorithm path detection mechanism, the simulation of continuous events can achieve a relatively accurate level.

[0045] To achieve real-time simulation of automated systems, directly simulating based on unexecuted tasks and only considering the execution time of new tasks without taking into account the situation where a considerable amount of material remains to be handled on the logistics equipment after tasks have begun will inevitably lead to significant deviations between simulation results and actual conditions. This invention proposes a mechanism that loads residual tasks before simulation, ensuring that the simulated system state matches reality. At the start of simulation, while receiving new tasks, the simulation continues to complete all pending tasks, thereby ensuring the accuracy of real-time system simulation.

[0046] The frequency of physical equipment failures and recovery times inevitably affect the efficiency of the entire system's task execution. Ignoring these factors can lead to significant deviations between simulation results and actual operating conditions. Equipment failure frequencies and recovery times follow certain patterns. By statistically analyzing daily failure records and selecting a suitable failure model in the simulation system, the system can simulate equipment failure states under certain conditions. The failed equipment will then be locked in the current simulation state. The simulation will continue after the failure is recovered. The impact range of the failed equipment can also be configured to approximate the actual operating conditions of the physical equipment as closely as possible.

[0047] like Figure 2As shown, the overall system architecture is divided into four layers. The data layer, operating at the lowest level, is primarily responsible for reading and writing simulation scene files, data acquisition, and database operations, providing upper layers with access to files, physical devices, and the database. The logic control layer is the core layer of the system. The discrete simulation engine is implemented in this layer. Additionally, the control logic for simulation scene modeling, scene serialization and storage, and restoring the runtime scene from the scene file is implemented in this layer. The access layer, building upon the logic control layer, encapsulates the basic operation logic of the program, providing the application layer with interfaces for accessing the discrete simulation engine, scene loading, and other external interfaces. The application layer provides the operation interface for the automated logistics scene, the simulation scene display, and an interface for obtaining simulation result records and related simulation result data analysis based on the simulation interfaces provided by the access layer.

[0048] The automated logistics simulation runs on the server side, receiving simulation task information from the Warehouse Execution System (WES) via a task information interface. Upon completion of the simulation, it reports the simulation results. The WES, based on multiple simulation results, optimizes the task sequence, task issuance start time, and task batch size control before issuing physical system tasks to the Warehouse Control System (WCS). The data acquisition service reads the device status and information of physical equipment and populates it into the message bus for use by other systems. Based on a publish-subscribe communication framework, different components (services, modules) can interact indirectly through messages, enabling distributed system integration. The simulation results are displayed by calling the server-side simulation result recording and analysis data interfaces. Figure 3 As shown.

[0049] Modeling of automated logistics scenarios: The foundational work for automated logistics simulation begins with modeling the physical equipment layout within the simulation system. The simulation system then establishes task execution paths based on the connections between the equipment (equipment exit list). Equipment simulation parameters and system simulation configuration parameters are specified during scene modeling. This invention proposes a drag-and-drop automated logistics scene modeling method and briefly describes its method for saving and restoring 3D scenes. Figure 4 Create a user interface diagram for an automated logistics scenario. The automated logistics scenario is represented by a tree structure in terms of data, with the warehouse as the root node at the top. Sub-regions below organize the equipment within the scenario hierarchically. An automated logistics system's organizational structure is a tree-structured data structure, with a one-to-one correspondence between the scenario's running objects and this tree. For example... Figure 5 As shown.

[0050] 3D simulation scene construction: 3D simulation scene construction is achieved by adding new devices to the scene's operating area. There are two operation methods: 1. Drag and drop device models from the model library to the operating area; 2. Add devices by right-clicking. When a device is placed in a suitable location, the system's internal response event generates a new device object in the scene's operating area through device object cloning. Simultaneously, the tree structure data is kept updated synchronously. The device's position, scaling factor, number, simulation parameters, device running path, and device animation control script are represented as the device's attribute information or sub-objects.

[0051] Scene saving and restoration: In the persistent storage of data in automated logistics scenarios, this invention stores logistics equipment objects in an XML structure by serializing them according to their hierarchical order. The attributes of tree-structured objects are serialized into XML node attributes, and child objects are serialized into child nodes of the current XML node. Child nodes can also have attributes and child nodes. The structure of the serialized data is as follows: Figure 6 As shown.

[0052] When restoring an automated logistics scenario, the first step is to select the saved scenario XML file and create scenario device objects sequentially during system runtime, following the order in which child objects are instantiated. This process corresponds to a deserialization process, where XML node attributes are read, runtime object attributes are populated, and attribute values ​​are applied to the scenario objects. Additionally, the parent-child relationships between runtime objects are restored. Saving and restoring equipment simulation parameters follows the same process. Equipment simulation parameters typically include picking time, moving speed, unloading time, reaction time, and acceleration.

[0053] System simulation interface: Simulation status query interface: The simulation status query interface is an interface provided by the simulation server to WES for use in proactively querying the simulation execution status before issuing simulation tasks to the simulation service, preventing invalid simulation tasks from being issued. The returned structure includes: current simulation number, simulation status, simulation result time stream duration, simulation time, simulation start time, simulation end time, and simulation task list (task number, task status, current task step, etc.).

[0054] Simulation task distribution interface: The simulation task distribution interface is used by WES to send simulation task information to the simulation server. Interface parameters include the simulation number, a flag indicating whether to automatically start the simulation upon completion, and a list of simulation task information. The simulation task information includes: task number, tray number, tray type, source address, and destination address. It returns the simulation number and the simulation task reception status (normal reception, error - other simulations are executing). Simulation tasks with the same simulation number can be received in batches, but if the currently executing simulation number does not match the newly received simulation number, an error message will be returned.

[0055] Simulation start / stop interface: The simulation start / stop interface provides the WES client with a control method to start the simulation and stop it in case of an abnormality after the simulation task has been prepared.

[0056] Simulation record query interface: The simulation record query interface is used to provide the WES client with information on completed simulation tasks, which serves as the basis for its task issuance decisions.

[0057] Task information query interface: Before performing a real-time simulation task, the simulation server calls the task information query interface of WES based on the real-time task information of the physical device. The simulation server then loads the remaining task information of the device based on the returned task information. The simulation service will then perform real-time simulation based on the received simulation task information and the remaining task information, and the simulation of the remaining tasks will proceed according to the current state of the physical device.

[0058] Simulation result reporting interface, After the simulation is completed, the simulation server actively calls the simulation result reporting interface of the WES side. The reported structure includes: current simulation number, simulation status, simulation result time stream duration, simulation time, simulation start time, simulation end time, and simulation task list.

[0059] Task execution path decomposition mechanism: The task execution path decomposition provides the execution order for simulation tasks, and the task execution path information is stored in the path information data. The path information includes: source address, destination address, routing list, priority, and activation status. The source and destination addresses of the simulation task are generally specific path locations, such as 101 and 0011002003000, representing conveyor 101 and the left side of the second column of the third-level shallow storage location in aisle 1 of the automated storage and retrieval system, respectively. The routing list completely records the path location information, such as "101, 102, AGV subsystem, 103, 104, stacker crane 201". The simulation task execution path will be executed sequentially by the simulation equipment and subsystems "conveyor 101, conveyor 102, AGV subsystem, conveyor 103, conveyor 104, stacker crane 201".

[0060] Before a simulation task is issued, the task-driven management object will perform a validity check on the task execution path. As shown in the example above, the AGV subsystem will assign an AGV to pick up goods from conveyor 102 and transport them to conveyor 103 for unloading. Both locations 102 and 103 are within the AGV's operating range. The target address, location "0011002003000," is within the stacker crane's operating range "001%" (all locations in aisle 1). After the validity check passes, the path information will be saved in the simulation task's task path information attribute. During simulation task execution, the simulation task will be executed sequentially within the simulation equipment and the simulation task itself.

[0061] Task allocation strategy: Task allocation strategies are implemented through a combination of task rules. A single task strategy can be configured with multiple task rules, each corresponding to a priority value. Tasks that best conform to the assigned rules have higher priority values. After calculation using multiple task rules, the priority values ​​are summed, transforming this multi-objective factor calculation into a single-objective factor priority evaluation method. Ultimately, the task most deserving priority is determined. Table 1 shows the task strategies implemented by the system.

[0062] Table 1. Task Strategies Implemented by the System

[0063] Discrete event systems: The problem that discrete event systems need to solve is to represent task allocation and device task execution in the system as discrete events, and to execute them sequentially according to the system response time of the events.

[0064] Since events cannot exist independently of objects, their execution is inseparable from the invocation of their respective objects. In terms of structural design, the simulation device class of the task-driven management class also inherits from the simulation entity base class, and the simulation event class... <t>The generic constraint type T in the generic class is the simulation entity base class. This design allows task-driven events and device execution events to be added to the event queue in the same way. The event generic class inherits from the simulation event base class. Simulation event execution only requires the DoEvent() method, which simplifies the calling logic for various discrete events when dequeuing events. Example code is shown below. Figure 8 As shown.

[0065] Discrete event-driven mechanism: The discrete event queue is implemented using a linked list data structure. The event with the earliest system time point is inserted at the head of the linked list. When inserting other events, the system time point of each subsequent event is greater than the system time point of the event to be inserted, and the inserted event is positioned before the detected event. Its time complexity is O(n). When an event is dequeued, the first node element of the linked list is directly retrieved, with a time complexity of O(1). The linked list approach to managing the discrete event queue offers exceptionally high access efficiency.

[0066] like Figure 9 As shown, simulation events are constructed by passing the event object name of the simulation object to the constructor during initialization. During event invocation, the event is looked up and invoked using the initialized event dictionary. The simulation object's event dictionary is loaded during initialization. The simulation engine provides three events by default: "PreExecute", "Execute", and "NextExecute", corresponding to the simulation event's "Running Preparation Event", "Running Execution Event", and "Running Post-Processing Event", respectively. The execution order of these three events is "PreExecute->Execute->NextExecute". PreExecute indicates that the simulation object enters the event preparation execution state. In this state, it receives simulation task information, calculates the device's running duration based on the simulation device's execution strategy, retrieves the current system simulation time from the time stream module, and adds the device's continuous running time to obtain the device's Execute (running execution event) time. When PreExecute finishes execution, an Execute event is inserted into the event queue. After Execute finishes execution, the NextExecute event is invoked. The processing logic for the NextExecute event is as follows: First, it checks whether the next-path device is not in an "occupied" state. If it is not in an "occupied" state, the next-path device can receive the task and will enter the device preparation execution state, thus starting the relevant event execution process for the next device. At the same time, it clears the simulation task information and "occupied" state of the current device. Otherwise, it adds the NextExecute event of the current object to the event queue, and performs the next device "occupied" state check when the time flow advances to the corresponding time point. In addition to loading the three built-in events mentioned above by default, the event dictionary of the simulation object can also load custom events of the simulation object. The dictionary key value and event should be unique. The calling order can be customized by the user, and the calling method is the same as above, by adding an object specifying the event execution system time, event object, and event name to the event queue.

[0067] Time flow progression management is implemented through time flow management objects. When a discrete event is added to the event queue, the current system simulation time flow progression point is first read. Simulation time for event enqueuing equal Event activation delay time The sum. After the discrete event queue advances to the simulation time, the event will be dequeued and executed. The completion of event execution will advance the time stream to the next point. Advancing to the current simulation time, the increment of the time flow with each advancement. Simulation time for the current event Subtract the time flow advancement point of the last system simulation , It will only be updated after the timeline has progressed to completion.

[0068] like Figure 10 As shown, the generation of discrete events and the progression of time are complementary and proceed in a coordinated manner. For example... Figure 11 As shown in the time flow diagram, when event 1 is dequeued and the execution completion event is completed, the time flow advancement point advances to... Then, events 2 and 3 are generated, with event activation delay times of respectively. and Then the simulation times for the two corresponding events are respectively and That is and Because the time flow advances before these two events occur. An update has been implemented. The timeline advances incrementally when event 2 is dequeued and completes execution. For simulation time Progression point of the last system simulation timeline The difference between them, the current timeline advances to... The newly generated event 4 system simulation time is With Event 4 Activation Delay Time The sum of these. The process of other events entering and leaving the queues advances the timeline in a similar way.

[0069] Event activation delay time of simulation device When the simulation is in the "Ready to Execute" state, the "Get Device Execution Prediction Value()" method of the device is called to obtain the value. Each type of device class inherits from the simulation device class and provides the activation delay time strategy configuration for specific types of device running events by overriding the "Get Device Execution Prediction Value()" method. Device simulation parameter values ​​serve as the basic data for obtaining device execution prediction values ​​for each type of device. In addition to configuring simulation parameter attributes such as picking time, moving speed, unloading time, reaction time, and acceleration inherited from the simulation device parent class, specific simulation parameter attributes required by this device can also be defined as needed. Device simulation parameters can be configured by initializing the device simulation parameters through the scene file. During simulation operation, device simulation parameters can be dynamically changed through the provided device parameter configuration interface. Device simulation parameters can be set manually or automatically invoked by the simulation operation prediction system, thereby enabling the device simulation to dynamically adapt to the real-time state of the device.

[0070] AGV simulation subsystem: The main implementation methods of the AGV simulation subsystem are: 1. Simulating continuous running events through a discretization processing mechanism; 2. Using simulation path sub-devices for gridded path planning.

[0071] like Figure 11 As shown, the operating mechanism of the simulation subsystem is consistent with the processing method of the discrete event engine; both are driven by tasks. For the simulation subsystem, after the simulation starts, the task allocation module of the simulation subsystem will be initialized, that is, adding subsystem task allocation discrete events to the simulation discrete event queue. After the discrete events finish executing, simulation subsystem task allocation discrete events will still be added to the discrete event queue. For example... Figure 14 This describes the operation flow of the simulation subsystem.

[0072] Discretizing continuously running events is an effective solution for continuous operation simulation, specifically in terms of the step size of the simulated sub-device movement. For example, how many checks are performed during the sub-device's 1-meter movement? The more checks performed, the more detailed the simulated movement path and the more accurate the simulation results. However, path planning consumes more resources and takes longer to simulate.

[0073] The map path is rasterized using a simulation path planning tool. This tool allows users to customize the number of horizontal and vertical columns, as well as the column widths. It represents the horizontal physical space in three-dimensional space as two-dimensional coordinates. A smaller column width results in more discretized events for continuous AGV movement over the same distance, leading to more refined AGV path planning and smaller step sizes for each discrete AGV event, resulting in more nuanced movement. The settings for the number of horizontal and vertical columns and column widths in the simulation path planning tool must be determined based on the specific logistics scenario.

[0074] The simulation path specification tool not only enables the representation of 3D physical space data in 2D coordinates, but also allows the 2D coordinates to be restored to 3D physical space coordinates. This ensures that the simulated position of the AGV can be updated in real time during system simulation. For example, the coordinates of the lower left space are represented as (0,0), and the coordinates of the upper right space are represented as (36,22). If there is an obstacle in the scene, simply hold down the Ctrl key and select the corresponding space on the map. This space will be grayed out, and the map data will be set to "No Entry" (serialized data is represented by 0), marking this location as an obstacle that the AGV must detour through.

[0075] The above steps transform the complex physical environment into a discrete space that the algorithm can process, providing a basic data structure for subsequent AGV path planning. This invention uses the A* algorithm for path planning. The algorithm expression is: , For the current point The actual distance to the starting point; The distance from the current point to the target point is the heuristic function. Generally, AGVs move in eight directions, so Euclidean distance is used as the heuristic function here. , Path planning processing flow: Initialize and define the open list (store nodes to be evaluated using a priority queue, ordered by...) The algorithm sorts, closes lists (using a hash table to record processed nodes to avoid duplicate calculations), and uses a path record dictionary (recording the parent node of each node for backtracking). Then, it performs search and expansion operations starting from the starting point, adding the starting point to the open list. (Starting point). Then, the nodes are expanded in a loop until the target is found. The loop logic is: right... If it is an obstacle or already in the closed list, skip it; calculate temporary... ,like Not on the open list or If smaller, then update. , and the parent node, Add to the open list. Finally, perform path backtracking, starting from the target node and tracing back along the parent node to the starting point to generate the optimal path.

[0076] During simulation, a discrete event causes an AGV to move one map space. To ensure that AGVs do not collide, they first attempt to lock the map space object before moving. Map space objects already locked by other AGVs cannot be locked again. After successfully locking, the AGV moves, thus avoiding collisions.

[0077] In another specific embodiment, such as Figure 12 As shown, a liquor company's production workshop connects the packaging material warehouse and the finished product warehouse via an AGV (Automated Guided Vehicle) operating area. The AGV subsystem is responsible for the timely supply of packaging materials during production and the timely transfer of finished products to the finished product warehouse. Considering factors such as site size and cost, the AGV subsystem is planned to include 5 AGVs. Operational requirements include an average of 150 pallets of packaging materials per hour during production to ensure uninterrupted material supply, and a finished product transfer efficiency of 90 pallets per hour to ensure timely freeing of production space for finished products.

[0078] Modeling of automated logistics scenarios: Based on the actual project's packaging material area, AGV area, and finished product area, a scene model is created. First, relevant logistics equipment for each area is added to the scene via drag-and-drop, and simulation parameters are set for the equipment. Then, a simulation path planning tool is used to construct a gridded path for the AGVs, covering the entire AGV operating area. The number of horizontal columns, vertical columns, and column widths are customized, representing the horizontal physical space in three-dimensional space as two-dimensional coordinates, and using the current grid path as the basis for AGV path planning. After the entire scene model is completed, it is saved and loaded before starting the simulation service to ensure normal startup of the simulation service.

[0079] WES sends simulation tasks to the simulation system: Before issuing a simulation task, WES calls the "Simulation Status Query" interface. The simulation service reports the simulation execution status. If the simulation service is not in the "Executing Simulation" state, WES is allowed to issue the simulation task. If the simulation service is in the "Executing Simulation" state, WES needs to wait for the simulation service to complete before issuing the simulation task. Simultaneously with task issuance, the "Automatically Start After Receiving" parameter can be set to true, allowing the simulation service to start the simulation directly after receiving the task. Alternatively, the "Simulation Start / Stop Interface" can be called separately to issue a simulation start command.

[0080] Simulation task path detection and path splitting: The simulation service will perform path detection on each simulation task, matching the source and destination addresses of the simulation task with the records in the path list. If a record with the same source and destination address exists, the simulation task will be bound to the queried path information and added to the list of valid tasks to await simulation task allocation and distribution.

[0081] When system conditions are met, simulation tasks are issued according to the task strategy: After the simulation starts, the system sorts tasks according to the configured task allocation strategy. For example, this example uses the "priority reverse order (composite job)" strategy to sort the simulation tasks. When processing task assignment, the system checks whether the source address device can receive the task. If the source device is empty, the system prioritizes the task with the highest priority value and sends it to the source address device based on the priority reverse order sorting result for the same source address device.

[0082] The conveyor equipment has completed the update time stream module to advance the system time: When the simulation service detects that the source address device of the simulation task is in an "idle" state, the system generates a material object, binds the material object to the device, and adds a PreExecute event for the device to the discrete event queue, indicating that the device is in a ready-to-execute state. When the PreExecute event of the conveyor device is retrieved from the discrete event queue and executed, the device task execution duration (device length divided by conveyor speed) is calculated based on the device simulation parameters, and a device execution Execute event is inserted into the task duration field of the discrete event queue. The event insertion process involves sequentially checking the event queue from the head. If the discrete event queue is not empty and the simulation time of the event to be inserted is less than the simulation time of the event to be inserted, the event queue is checked further. If the discrete event queue is empty or the simulation time of the event to be inserted is greater than the simulation time of the event to be inserted, the event is inserted before the detected event. When a device execution Execute event is retrieved from the discrete event queue, it indicates that the device has finished execution and the simulation task needs to be passed to the next device. At this time, the task transfer detection process is initiated.

[0083] Insert subsequent device discrete events and execute: Based on the task path information, the next device to execute the task is determined. If the next device is idle, the PreExecute event is inserted into the discrete event queue to insert the next device to execute the task. The task information is normally transmitted to a device. If the condition is not met, the NextExecute event is inserted into the discrete event queue at the next detection time point. When the discrete event queue executes this event, the next device simulation task transmission detection process will be carried out.

[0084] The AGV subsystem processes simulation tasks and distributes them to the AGV devices: The simulation task execution, based on the task path information, determines that the next task segment will be executed by the AGV subsystem. The simulation service updates the segment start and end points of the task path, with the segment start point being the AGV subsystem's receiving point and the segment end point being the AGV subsystem's unloading point. The simulation path manager retrieves the previous device on the current task path as the AGV subsystem's segment start point, and the adjacent device as the segment end point. The AGV subsystem receives relevant simulation tasks and allocates tasks according to its configured task allocation strategy. For example, using a "nearest allocation" strategy, the AGV subsystem searches for the nearest empty AGV without a task and assigns it a task. The AGV subsystem binds the task information to the current AGV to prevent it from being retrieved and assigned other simulation tasks.

[0085] The AGV equipment executes the simulation task according to the grid path: Upon receiving the task, the AGV performs path planning from all current path grid nodes to the pickup point. After finding the shortest path, it inserts an event indicating movement to the next path grid into the discrete event queue.

[0086] Path planning rasterization (physical space → discrete space) processing: The three-dimensional physical space is transformed into a two-dimensional discrete grid that can be processed by algorithms using simulation path planning tools. Tool configuration: Customize the number of horizontal columns, vertical columns, and column width to map the three-dimensional horizontal physical space to two-dimensional coordinates (supports reverse restoration to three-dimensional coordinates to ensure real-time updates of AGV simulation position); Obstacle settings: Hold down the Ctrl key and select the empty space on the map, gray it out and set the data to "0" (no passage), marking the obstacle as a detour required; Ultimately, the complex physical environment is transformed into a discrete space, providing a basic data structure for path planning.

[0087] A* Algorithm Path Planning Process: Based on a rasterized discrete space, the A* algorithm is used to generate the optimal path. The algorithm formula is as follows: ( : Actual distance from the current point to the starting point; (Euclidean distance from the current point to the target point, based on the AGV's eight-directional movement): Initialization: Define the open list (priority queue, ordered by...) The system stores nodes to be evaluated in a sorted manner, a closed list (a hash table to record processed nodes to prevent duplicates), and a path record dictionary (recording the parent nodes of nodes for backtracking); the starting point is added to the open list. (starting point)).

[0088] Circular expansion nodes: Take from open list smallest node Check its adjacent nodes ; like If it's an obstacle or already on the closed list, skip it; calculate ,like Not on the open list or If smaller, then update. , and the parent node, Add to the open list.

[0089] Path backtracking: After finding the target node, backtrack along the parent node to the starting point to generate the optimal path.

[0090] When a grid movement event is executed, the system first checks if the next path grid is occupied by another AGV. If not, the current AGV uses the grid, moves to the grid position, and then inserts the next grid movement event. If the grid is occupied by another AGV, the event to move to a path grid is inserted again. If an AGV avoidance strategy is configured in the system, AGVs without tasks may be assigned simulation tasks to move to the avoidance station. Based on this process, the AGV moves to the picking station to pick up goods, thus associating the simulation task bound to the AGV with the material object, and then path planning is performed to the unloading station.

[0091] Subsequent equipment will execute the simulation task until it ends: Before a simulation task is transferred from the AGV to the AGV unloading station, it first checks whether the unloading station is locked with other material objects. If no material objects are locked, it indicates that the unloading station is idle and can unload. Before unloading, the unloading station is bound to the material objects locked by the AGV, and then the AGV's simulation task is transferred to the unloading station. The insertion method for the conveyor equipment's events is the same as the previous process. If the AGV detects that other material objects are locked at the unloading station before unloading, and the AGV cannot unload, the simulation service will insert an event for the next check of the unloading station's status into the discrete event queue. The idle status will be checked again in the next cycle until unloading is possible. After all simulation tasks have been executed, the "Simulation Result Reporting" interface provided by WES is called to report the simulation status and simulation time of the entire simulation process to WES.

[0092] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.< / t>

Claims

1. An automated logistics simulation method based on discrete event engine technology, characterized in that, Includes the following steps: Scene modeling: Construct a 3D scene model of the automated logistics system through graphical drag-and-drop operations, configure simulation parameters for the logistics equipment in the scene, and establish adjacency relationships between equipment to define task execution paths; Discrete event engine initialization: Load and deserialize the scene model, initialize the discrete event simulation engine, which includes a discrete event queue and a time stream management module; In-process simulation preparation: Before the simulation starts, the task information query interface is called to obtain the status information of the currently remaining unfinished tasks on all devices in the physical system, and the remaining task information is loaded into the corresponding device objects in the simulation system to synchronize the initial state of the simulation system with the real-time state of the physical system. Task reception: Receives simulation task information from the Warehouse Execution System (WES); Discrete event-driven simulation: Based on the loaded residual task information and the received simulation task information, the simulation is driven by a discrete event engine. The discrete event engine executes events in the discrete event queue in the order of time flow. The execution of each event includes: calculating the duration of the event according to the simulation parameters of the device to which it belongs, and at the end of the event execution, generating the discrete event of the next device according to the task execution path and inserting it into the event queue, while updating the time flow advancement point. Simulation result reporting: After all task simulations are completed, the simulation result data is reported to WES.

2. The automated logistics simulation method based on discrete event engine technology according to claim 1, characterized in that, The discrete event queue is managed using a linked list data structure. When inserting an event, the list is traversed from the head, and the new event is inserted before the first event whose simulation time is greater than the simulation time of the new event. When retrieving an event, the event at the head of the list is retrieved directly.

3. An automated logistics simulation method based on discrete event engine technology according to claim 1 or 2, characterized in that, In the discrete event-driven simulation, each simulation device object has at least three predefined events: the PreExecute event for preparation, the Execute event for execution, and the NextExecute event for post-processing. Its execution logic is as follows: The PreExecute event is used to receive simulation tasks, calculate the activation delay time of the Execute event based on the device simulation parameters, and then insert the Execute event into the discrete event queue. After the Execute event completes execution, the NextExecute event is triggered. The NextExecute event is used to detect whether the next device in the task execution path is idle. If it is, the PreExecute event for the next device is triggered. If not, a delayed NextExecute event is re-inserted into the discrete event queue for detection again.

4. The automated logistics simulation method based on discrete event engine technology according to claim 1, characterized in that, It also includes AGV subsystem simulation, which discretizes the continuous movement process of the AGV into grid-by-grid movement events on a rasterized map, specifically including: Path planning: The A* algorithm is used to calculate the optimal path from the starting point to the destination for the AGV on a raster map, where the heuristic function H(n) adopts Euclidean distance; Discrete movement: The calculated optimal path is decomposed into a series of continuous grid movements; for each grid on the path, a corresponding discrete movement event is generated and inserted into the discrete event queue in sequence; when each discrete movement event is executed, an attempt is made to lock the next target grid. If the lock is successful, the AGV moves to that grid and inserts the next grid movement event. If the lock fails, the current grid movement event is re-inserted into the queue.

5. The automated logistics simulation method based on discrete event engine technology according to claim 4, characterized in that, In the simulation of the AGV subsystem, map rasterization is also included before path planning: the three-dimensional physical space in which the AGV runs is mapped into a two-dimensional raster map with a custom number of rows and columns through the simulation path planning tool, and obstacles are defined by marking the raster as no-passage.

6. The automated logistics simulation method based on discrete event engine technology according to claim 1, characterized in that, After the task is received but before the discrete event-driven simulation, task path detection and allocation are also included: For each simulation task, the corresponding route list is matched in a predefined path information database based on its source address and destination address; Once a match is successful, the task is bound to the route list and added to the list of valid tasks; When the simulation starts, the tasks in the list of legal tasks are prioritized according to the preset task allocation strategy, and the tasks are then sent to the corresponding starting devices in sequence according to the sorting results and the idle status of the devices.

7. The automated logistics simulation method based on discrete event engine technology according to claim 6, characterized in that, The task allocation strategy is a multi-rule composite strategy, which sorts tasks by superimposing the calculation results of multiple task rules into a single priority value; the task rules include, but are not limited to: task priority in reverse / ascending order, task creation time in ascending order, task sequence number in ascending order, and weight calculation rules that combine time, location and priority.

8. The automated logistics simulation method based on discrete event engine technology according to claim 1, characterized in that, It also includes equipment failure simulation: Configure fault models for logistics equipment based on historical statistical data; During the simulation, when the triggering conditions of the fault model are met, a device fault event is generated. This event will lock the device and simulate the fault recovery process. During the fault, the device will suspend the execution of all tasks.

9. An automated logistics simulation system based on discrete event engine technology, characterized in that, An automated logistics simulation method based on discrete event engine technology as described in any one of claims 1-8 includes: The scenario modeling module is used to build and persist automated logistics scenario models through a graphical interface; The core module of the discrete event engine includes a discrete event queue for managing the order of events and a time flow management module for advancing simulation time; The in-process simulation processing module is used to load residual task information from the physical system before the simulation begins, so as to synchronize the initial state of the simulation. The task management module is used to receive external simulation tasks and perform task path detection and allocation. The equipment simulation module is used to simulate the behavior of various logistics equipment and calculate the duration of events based on simulation parameters. The AGV simulation subsystem module is used to perform discretized simulation of the continuous movement of AGVs using a gridded map and the A* algorithm. The simulation interface module is used to communicate with the Warehouse Execution System (WES) to receive tasks and report results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements an automated logistics simulation method based on discrete event engine technology as described in any one of claims 1-8.