Process flow discrete simulation method, electronic device, storage medium and product
By decomposing process states using ECS architecture and Petri nets, and combining them with standardized lifecycle templates, the simulation performance bottlenecks and scalability issues in large-scale intelligent manufacturing systems are resolved. This enables efficient and flexible process simulation and bottleneck identification, and supports the construction of digital twin systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHIPBUILDING TECHNOLOGY RESEARCH INSITITUTE (NO 11 INSTITUTE OF CSSC)
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing process simulation technologies suffer from performance bottlenecks, insufficient scalability, unclear logical expression, and poor concurrent processing capabilities when dealing with large-scale, highly dynamic, and highly complex intelligent manufacturing systems.
The system adopts a solid component system (ECS) architecture, which establishes a mapping relationship between workpiece entities and process information components. The process state is decomposed through Petri nets, and the transitions are abstracted into standard behavioral characteristics. The transition types are divided through equipment constraints, general resources and time components, and the simulation operation is driven by standardized life cycle templates.
It enables real-time response, process flow analysis, and bottleneck identification in large-scale simulations, improving the accuracy, scalability, and concurrent processing capabilities of simulations, and providing efficient and flexible technical support for process optimization and digital twin systems.
Smart Images

Figure CN122363092A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial manufacturing technology, and in particular to a discrete simulation method for process flow, electronic equipment, storage medium and products. Background Technology
[0002] In modern industrial manufacturing, process simulation, as a key technology for optimizing production cycle time, predicting system bottlenecks, and verifying scheduling strategies, has been widely applied in the design and operation of intelligent manufacturing systems. However, as the scale of intelligent manufacturing systems expands and their complexity and dynamism increase, traditional process simulation methods have gradually revealed numerous shortcomings in addressing these challenges. First, in terms of computational efficiency, the memory access mode typically used in traditional simulation methods exhibits significant inefficiency when dealing with massive numbers of entities and complex interactions, failing to meet the demands of real-time simulation and rapid multi-scenario iteration. Particularly in high-concurrency and large-scale simulation tasks, computational latency increases significantly, and the system response speed drops sharply with the increase in the number of entities, severely restricting the timeliness of production scheduling and decision support. Second, traditional process simulation methods have significant deficiencies in system scalability and maintainability. Modeling methods, exemplified by object-oriented programming (OOP), work well for small systems. However, as system complexity increases, the high coupling between process logic and data structures often necessitates large-scale refactoring and modification for introducing new features, significantly increasing maintenance costs. Furthermore, integrating new process features often requires altering the structure of core classes, impacting system stability and scalability. Moreover, existing simulation methods lack formal support for control logic expression, typically distributing control logic across various objects and methods without a globally visualized mathematical description. This makes deadlock detection and correctness verification of process control extremely difficult. Additionally, the shared state and locking mechanisms in traditional methods result in low utilization efficiency of parallel computing resources during simulation, failing to fully leverage the advantages of modern multi-core processors in large-scale parallel computing, thus limiting simulation speedup. Therefore, existing technologies struggle to simultaneously meet the demands for efficient computing, flexible expansion, accurate verification, and parallel processing in highly dynamic and complex manufacturing environments.
[0003] Currently, there are three mainstream simulation methods to address the above problems: Object-Oriented Programming (OOP), Agent-Based Modeling (ABM), and Discrete Event Simulation (DES). OOP models process elements as objects and simulates through interactions between these objects, performing well in small-scale systems. However, as the system scales up, the complex relationships between objects lead to performance bottlenecks, and the system's maintainability and scalability are poor. ABM models process elements as autonomous agents, simulating through the agents' decisions and behaviors, effectively simulating complex behaviors, but it has high computational overhead and is difficult to scale to large-scale systems. DES models system state changes as discrete events and advances simulation time through event scheduling. While it is highly efficient, it is usually tightly coupled to specific modeling paradigms, lacks flexibility, and performs poorly when dealing with complex systems. Summary of the Invention
[0004] This application provides a discrete simulation method for process flow, an electronic device, a storage medium, and a product, to at least solve the problems of existing process flow simulation technologies in meeting the needs of large-scale, highly dynamic, and highly complex intelligent manufacturing systems, such as serious performance bottlenecks, insufficient scalability, unclear logical expression, and poor concurrent processing capabilities.
[0005] This application provides a method for discrete simulation of a process flow, including: Based on the entity component system architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is structured and stored to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, the stable states in the process are mapped to places in a Petri net, the actions that cause changes in the process state are abstracted into transitions in a Petri net, and the process topology of the transitions and the places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0006] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described discrete simulation methods for process flow. Based on the entity component system architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is structured and stored to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, the stable states in the process are mapped to places in a Petri net, the actions that cause changes in the process state are abstracted into transitions in a Petri net, and the process topology of the transitions and the places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described discrete simulation methods for process flow: Based on the entity component system architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is structured and stored to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, the stable states in the process are mapped to places in a Petri net, the actions that cause changes in the process state are abstracted into transitions in a Petri net, and the process topology of the transitions and the places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0008] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described discrete simulation methods for process flow: Based on the entity component system architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is stored in a structured manner to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, the stable states in the process are mapped to places in a Petri net, the actions that cause changes in the process state are abstracted into transitions in a Petri net, and the process topology of the transitions and the places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0009] This application constructs workpiece entities and process information components through an entity component system, achieving efficient mapping between data and simulation tokens. By decomposing the state space using Petri nets, key process states are mapped to locations, and actions are abstracted into transitions, forming a logical topology and decoupling process states from control flow. Combining equipment constraints, general resources, and dynamic and fixed-time components, transition execution is divided into four standard types. Furthermore, asynchronous event simulation is driven by standardized lifecycle templates, enabling accurate workpiece state updates and rational resource scheduling under high concurrency. This application provides real-time response, process flow analysis, and bottleneck identification in large-scale simulations, offering efficient and flexible technical support for process optimization and digital twin systems. Attached Figure Description
[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1This is a schematic diagram of a discrete simulation method for a process flow in one embodiment of this application; Figure 2 This is a diagram illustrating the application environment of the discrete simulation method for the process flow in one embodiment of this application. Figure 3 This is a schematic diagram illustrating the principle of bidirectional dynamic mapping between workpiece entities and Petri net elements in one embodiment of this application; Figure 4 This is a schematic diagram of a decision tree for a transition instantiation process based on a component composition strategy in one embodiment of this application. Figure 5 This is a timeline diagram of the standardized transition execution lifecycle in one embodiment of this application; Figure 6 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0013] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] ECS (Entity-Component-System) architecture: a data-driven software architecture pattern that achieves contiguous memory storage and logical decoupling by completely separating data (components), identity (entities), and behavioral logic (system). In this invention, it is used to solve memory access bottlenecks and high-concurrency processing challenges in large-scale simulation scenarios.
[0016] Petri Nets are a mathematical modeling language used to describe distributed asynchronous systems. They consist of places (representing states), transitions (representing events), and tokens (representing resources or artifacts). In this invention, they serve as a formal logic layer for accurately expressing complex process topologies and control logic.
[0017] SimSharp: A high-performance, open-source discrete event simulation (DES) engine that supports parallel event queue processing. In this invention, it serves as the core driving layer for time progression and event scheduling.
[0018] Token: A dynamic basic unit in Petri nets. In this invention, tokens are mapped to ECS entities carrying complete process context data (such as process parameters, priorities, and material attributes), and their flow between warehouses intuitively simulates the physical flow of workpieces on the production line.
[0019] like Figure 1 As shown, an embodiment of this application provides a method for discrete simulation of a process flow, including the following steps: Step S1: Based on the Entity Component System (ECS) architecture, construct workpiece entities according to process requirements, store the process data corresponding to each workpiece entity in a structured manner to form a process information component, and establish a mapping relationship between the workpiece entity and the process information component. Step S2: Decompose the target process flow into state space, map the stable state in the process to the place of the Petri net, abstract the actions that cause changes in the process state to the transition of the Petri net, and establish the process topology of the transition and the place. Step S3: Establish equipment constraint components, general resource components, dynamic time components and fixed time components for the transition of the workpiece entity, which are used to dynamically configure the behavioral characteristics of the transition; Step S4: By combining the equipment constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Step S5: Construct a standardized transition execution template based on the process topology. The transition execution template encapsulates the transition execution process into four standard lifecycle templates. Step S6: Perform simulation and data output for discrete events using the standardized lifecycle template.
[0020] This method achieves structured storage of process data and precise mapping between simulation objects by constructing workpiece entities and their process information components based on a physical component system. This enables efficient correspondence between process objects and logical simulation tokens at the data level. By decomposing the target process flow into a state space, key stable states in the process are mapped to Petri net places, and actions causing state changes are abstracted into Petri net transitions. The logical topology between input / output places and transitions is constructed, thus achieving decoupling and verifiable management of process state and control flow at the logical level. Combining equipment constraint components, general resource components, dynamic time components, and fixed time components, this method can dynamically configure the behavioral characteristics of transitions and classify transition execution into four standard types, balancing adaptability to diverse process scenarios such as equipment binding and resource sharing, and fixed and dynamic time. Furthermore, by encapsulating the transition execution process through standardized transition lifecycle templates, asynchronous event-driven simulation and efficient data output for complex processes are achieved. Even in multi-threaded and high-concurrency environments, accurate updates of workpiece entity states and reasonable scheduling of resource usage are maintained. Ultimately, this method can provide real-time response capabilities, accurate process flow analysis, resource utilization statistics, and bottleneck identification in large-scale production simulations, and generate structured performance reports. It provides efficient, flexible, and practical core technical support for process optimization, production scheduling, and the construction of digital twin systems, thereby significantly improving the accuracy, scalability, and application value of process flow simulation.
[0021] In this embodiment, the entity component system (ECS) architecture is used to construct workpiece entities according to process requirements, and to structurally store the process data corresponding to each workpiece entity to form a process information component. A mapping relationship is then established between the workpiece entities and the process information components, including: Based on the Entity Component System (ECS) architecture, initialize the entity pool of the simulation world; Based on the requirements of the process flow, dynamically generate workpiece entities that represent physical objects; The process data corresponding to each workpiece entity is structured and stored to form a process information component. The process information component is attached to each workpiece entity. The process data includes at least one of the following: workpiece name, current process stage, processing time, priority, and material properties. The process information component is used as a data carrier for tokens in a Petri net, and a mapping relationship is established between the workpiece entity and the process information component.
[0022] In this embodiment, the process of decomposing the target process into a state space, mapping the stable states in the process to places in a Petri net, abstracting actions that cause changes in the process state as transitions in the Petri net, and establishing the process topology of the transitions and the places includes: The target process flow is decomposed into a state space to identify key nodes in the target process flow, wherein the key nodes include at least one of waiting for processing, processing in progress, inspection passed, and rework waiting. The critical nodes are treated as stable states in the process and mapped to places in a Petri net. Each repository is associated with a query filter, which is used to retrieve and manage the set of all workpiece entities in the stable state corresponding to the repository in real time; Define the actions that change the process state as standard behavior interfaces for transitions, including at least one of EnableCheck, Resource Request, Process Execution, and TokenTransfer; The standard behavior interface of the transition is abstracted as a Petri net transition. The places are divided into input places and output places according to the preconditions and postconditions. The logical connection between the transition and the input places and the output places is established through directed arcs to form a process topology.
[0023] In this embodiment, the transition establishment device constraint component, general resource component, dynamic time component, and fixed time component corresponding to the workpiece entity are used to dynamically configure the behavioral characteristics of the transition, including: The EquipmentRequirementComponent is used to bind the transitions of the corresponding workpiece entity to the target device entity. When the transition is triggered, it automatically checks and occupies the time-driven (SimSharp) resource semaphore attached to the target device entity to realize the mutual exclusion access control of the target device entity. The general resource component is used to bind the transitions of the corresponding workpiece entity to non-device class logical resources, and handle resource contention and blocking through the time-driven (SimSharp) resource queue mechanism; The dynamic time component (TokenBaseProcessTimeComponent) is used to mark the processing time of the corresponding workpiece entity's transition, which depends on the process information component of the input workpiece entity. During runtime, it reads the processing time carried by the workpiece entity to dynamically calculate the delay. The FixedProcessTimeComponent is used to mark the processing time for the transition of the corresponding workpiece entity as a constant value.
[0024] Among them, non-device logical resources include at least one of operators, forklifts, and buffer capacity.
[0025] In this embodiment, by combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types, including: Based on the input process flow of the workpiece entity, determine whether the workpiece entity needs to be constrained by equipment. If so, determine to attach the workpiece entity to the equipment constraint component; otherwise, determine to attach the workpiece entity to the general resource component. After the workpiece entity is attached to the equipment constraint component or the general resource component, it is determined whether the working time mode is fixed working time. If so, it is determined that the workpiece entity is attached to the fixed working time component; otherwise, it is determined that the workpiece entity is attached to the dynamic working time component. The method of simultaneously attaching the workpiece entity to the equipment constraint component and the dynamic time component is set as an equipment-bound and dynamic time-type template. The method of simultaneously attaching the workpiece entity to the equipment constraint component and the fixed time component is set as an equipment-bound and fixed-time template. The method of simultaneously attaching the general resource component and the dynamic time component to the workpiece entity is set to a dynamic time template without device binding. The method of simultaneously attaching the general resource component and the fixed time component to the workpiece entity is set to a template with no device binding and a fixed time type. The device-bound and dynamic time template, the device-bound and fixed time template, the unbound and dynamic time template, and the unbound and fixed time template are used as four standard types to classify the execution process of the transition.
[0026] Among them, the following behaviors are considered: Equipment-bound and dynamically timed: Upon successful acquisition of equipment resources, the processing time is determined by reading the workpiece's process parameters, simulating a scenario of "dedicated equipment processing customized products." Equipment-bound and fixed-timed: After acquiring equipment resources, the process executes for a preset fixed duration, simulating a scenario of "dedicated equipment processing standard procedures." Unbound but dynamically timed: This behavior does not occupy specific equipment, is only limited by general resources, and its duration is determined by the workpiece, simulating scenarios of "manual assembly" or "natural efficiency." Unbound and fixed-timed: This behavior has no equipment dependency, executes for a fixed duration, simulating scenarios of "automatic transmission" or "fixed waiting."
[0027] Extension mechanism: Introducing a domain-specific language (DSL) parser, users can directly declare the above four types of transitions through configuration files or scripts, and generate the corresponding ECS system and component combinations without modifying the underlying code.
[0028] In this embodiment, a standardized transition execution template is constructed based on the process topology. The transition execution template encapsulates the transition execution process into four standard lifecycle templates, including: For each standard lifecycle template, initialize the execution environment for the current transition, and load the relevant Entity Component System (ECS) world references, time-driven (SimSharp) simulation environment references, and configuration parameters; According to the Petri net rules, retrieve the set of workpiece entities that meet the conditions from the input library and perform precondition checks (such as resource availability and workpiece attribute matching). If the check fails, suspend the current transition. Based on the standard type of the execution process of the transition, the corresponding business logic is executed, the asynchronous delay event (Timeout) initiated by the time-driven (SimSharp) engine is called, the workpiece entity is set to be in a processing state, the occupied resources are locked, and the delay is determined by the dynamic time component or the fixed time component. Once the delay is determined, the occupied resources are released, the state of the workpiece entity is updated, it is removed from the input library and added to the output library, and a single workpiece entity is distributed to multiple downstream libraries (splitting) or multiple upstream workpiece entities are merged and output (merging) according to the simulation business requirements.
[0029] For complex process topologies (such as splitting, merging, parallelizing, and looping), a standardized transition execution template is built. This template encapsulates the transition execution process into four standard lifecycle phases, allowing users to implement customized logic by overriding or configuring specific phases: Context Building Phase (BuildContext); Token Acquisition and Verification Phase (TakeTokens); Core Processing Phase (Process); Token Output and State Transition Phase (OutputTokens).
[0030] In this embodiment, the step of performing simulation and data output on discrete events using the standardized lifecycle template includes: Initialize the SimSharp engine, load the Entity Component System (ECS) architecture and the Petri net to perform discrete event simulation; When the SimSharp engine enters the main loop, it schedules all transition events to be triggered in the order of timestamps. The Entity Component System (ECS) listens for event signals and executes simulation running through the standardized lifecycle template. During the simulation, the number of tokens (work-in-process inventory), the trigger frequency of transitions (throughput), resource utilization, and the turnover cycle of workpiece entities in each warehouse are statistically analyzed in real time. After the simulation is completed, production efficiency, bottleneck analysis, and equipment load are obtained as key performance indicators (KPIs), and a structured report containing the searched key performance indicators (KPIs) is exported.
[0031] In summary, this invention successfully constructs a three-in-one simulation closed loop—"Data Carrier (ECS), Logic Control (Petri Net), and Time-Driven (SimSharp)"—through the organic synergy of steps S1 to S6. This solution is not a simple aggregation of technologies, but rather achieves high-performance memory layout of process objects through componentized data mapping (S1, S3), ensures the rigor and verifiability of complex process logic through formal state decomposition (S2), and enables flexible configuration and reuse of business logic through standardized lifecycle templates (S4, S5). This deep architectural integration fundamentally breaks through the performance bottlenecks and scalability challenges caused by data and logic coupling in traditional object-oriented simulation methods, achieving a paradigm shift from "static model deduction" to "dynamic event-driven." Ultimately, this method can provide millisecond-level real-time simulation capabilities and accurate multi-dimensional data analysis support in large-scale, high-concurrency scenarios, offering an efficient, universal, and implementable core technology solution for bottleneck identification, scheduling optimization, and the construction of digital twin systems for complex manufacturing processes.
[0032] like Figure 2As shown, this application constructs a three-layer decoupled simulation architecture of "data (ECS) - logic control (Petri net) - time-driven (SimSharp)," realizing bidirectional mapping between process entities and logic tokens, dynamic instantiation of transitions based on component strategies, and concurrent driving with lifecycle templates. By deeply decoupling and coordinating the ECS architecture (data layer), Petri net (logic layer), and SimSharp engine (driving layer), the strong coupling limitation between data and logic in traditional simulation is broken, achieving high-performance modular reconstruction of the process simulation system.
[0033] By mapping tokens to ECS workpiece entities carrying complete context data, mapping places to filter-based entity collection views, and mapping transitions to system logic with mounted functional components, the decoupling of data flow and control flow and the flexible modification of process logic are completely realized. Figure 3 As shown.
[0034] By using predefined core components such as equipment constraints and time strategies, and leveraging domain-specific languages (DSLs) or configuration files, four standard types of transition instances are dynamically assembled. This achieves a "configuration-as-development" capability that can adapt to diverse process scenarios without recompiling code. Figure 4 As shown.
[0035] By encapsulating complex process topologies into a standard four-stage lifecycle template of "build-acquire-process-output" and combining it with a time-driven (SimSharp) event queue mechanism for execution distribution, multi-threaded parallel processing is supported to solve lock contention issues and achieve efficient state transitions under high concurrency.
[0036] (1) Deriving high scalability and flexible configuration capabilities: Premise: In traditional simulation methods, adding new process types often requires modifying the core class inheritance structure or hard-coded logic, leading to system rigidity. This invention adopts an ECS model of pure data components + pure logic systems and introduces a DSL configuration mechanism.
[0037] reasoning: 1) When a new process feature (such as "special quality inspection process") is required, you only need to define a new component (data) or reuse an existing component combination, without modifying the existing workpiece entity class or other system code.
[0038] 2) By directly declaring transition types (such as "device-bound and dynamic working hours") through domain-specific language (DSL) scripts, the system automatically assembles the corresponding ECS components and logic at runtime, realizing "configuration is development".
[0039] Conclusion: The system possesses plug-in-level extensibility, supporting rapid prototyping and iterative optimization. Faced with complex and ever-changing technological processes, the response time to requirements has been reduced from days to hours, and as the system scales up, code maintenance costs increase linearly rather than exponentially.
[0040] (2) Clarity and verifiability of the derivation logic: Premise: In traditional methods, flow control logic is scattered across method calls of various objects, making it difficult to examine globally. This invention introduces Petri nets as an independent logical layer and executes it through standardized lifecycle templates.
[0041] reasoning: 1) Petri nets provide a formal mathematical expression that abstracts complex process flows into a visual “place-transition” network, making state dependencies, parallel relationships and conflict points clear at a glance.
[0042] 2) The logic layer and data layer (ECS) are completely separated, which allows for deadlock detection, reachability analysis and formal verification of the Petri net model without interfering with data operation.
[0043] 3) A standardized lifecycle (TakeTokens → Process → OutputTokens) ensures consistent execution paths for all transitions, eliminating hidden logical errors, such as... Figure 5 As shown.
[0044] Adding new process features only requires defining new components and systems, without modifying existing entities or other system code.
[0045] Conclusion: This significantly reduces the difficulty of system debugging and improves the reliability and maintainability of the model. It can detect logical flaws in process design (such as deadlocks and resource starvation) in advance, avoiding losses after actual production deployment.
[0046] (3) Deriving high performance and concurrent processing capabilities: Premise: In traditional object-oriented programming (OOP) simulation, frequent references between objects and shared state locks limit multi-core performance. This invention employs ECS data layout and SimSharp event-driven mechanisms.
[0047] reasoning: 1) The ECS architecture stores data of similar components contiguously (even without using sparse arrays, its component-based design is naturally superior to scattered objects), which improves CPU cache hit rate and reduces memory access latency.
[0048] 2) "Data-logic" decoupling allows multiple systems to process different sets of components in parallel without shared state contention.
[0049] 3) The SimSharp engine's event queue mechanism allows independent transition trigger events to be distributed to different threads for parallel execution, combined with lock-free or fine-grained lock resource management strategies (resource components in step S4).
[0050] Conclusion: By fully utilizing the performance of modern multi-core processors, a near-linear parallel speedup is achieved. Even in large-scale simulation scenarios (tens of thousands of entities, thousands of devices), millisecond-level time-advancement response is maintained, meeting the needs of real-time or rapid multi-scenario testing.
[0051] (4) Deriving data-driven accurate simulation capabilities: Premise: In traditional simulations, tokens are often abstract counters, lacking individual differences. This invention maps tokens to entities carrying complete process information components.
[0052] reasoning: 1) Each workpiece entity carries unique attributes (such as processing time, priority, and material type). As it flows through changes, the system can dynamically calculate processing logic (such as dynamic time components) based on this real-time data.
[0053] 2) This mechanism enables simulations to move beyond rough estimates based on average values and accurately reproduce personalized behaviors at the "single-piece flow" level.
[0054] Conclusion: High-fidelity microscopic simulation was achieved, which can accurately capture production line fluctuations and bottlenecks caused by individual differences in workpieces, providing valuable data support for refined production scheduling and process optimization.
[0055] In the aforementioned discrete simulation method for process flow, a physical component system is used to construct workpiece entities and process information components, achieving efficient mapping between data and simulation tokens. Through Petri net state space decomposition, key process states are mapped to locations, and actions are abstracted into transitions, forming a logical topology and decoupling process states from control flow. Combining equipment constraints, general resources, and dynamic and fixed-time components, transition execution is divided into four standard types, and asynchronous event simulation is driven by standardized lifecycle templates, achieving accurate workpiece state updates and rational resource scheduling under high concurrency. This application can provide real-time response, process flow analysis, and bottleneck identification in large-scale simulations, providing efficient and flexible technical support for process optimization and digital twin systems.
[0056] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0057] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described embodiments of the discrete simulation method for process flow.
[0058] In one embodiment, the electronic device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores discrete simulation data of the process flow. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a discrete simulation method for the process flow.
[0059] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the discrete simulation method for process flow: Based on the Entity Component System (ECS) architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is stored in a structured manner to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, and the stable states in the process are mapped to places in Petri nets. Actions that cause changes in the process state are abstracted into transitions in Petri nets, and the process topology of the transitions and places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0060] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0061] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described embodiments of the discrete simulation method for process flow: Based on the Entity Component System (ECS) architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is stored in a structured manner to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, and the stable states in the process are mapped to places in Petri nets. Actions that cause changes in the process state are abstracted into transitions in Petri nets, and the process topology of the transitions and places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0062] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps in any of the above-described embodiments of the discrete simulation method for process flow. Based on the Entity Component System (ECS) architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is stored in a structured manner to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, and the stable states in the process are mapped to places in Petri nets. Actions that cause changes in the process state are abstracted into transitions in Petri nets, and the process topology of the transitions and places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
[0063] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0064] The foregoing has provided a detailed description of a process flow discrete simulation method, electronic device, storage medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for discrete simulation of a process flow, characterized in that, include: Based on the entity component system architecture, workpiece entities are constructed according to process requirements. The process data corresponding to each workpiece entity is structured and stored to form a process information component. A mapping relationship is established between the workpiece entity and the process information component. The target process flow is decomposed into state space, the stable states in the process are mapped to places in a Petri net, the actions that cause changes in the process state are abstracted into transitions in a Petri net, and the process topology of the transitions and the places is established. The transition of the workpiece entity is established with equipment constraint components, general resource components, dynamic time components and fixed time components, which are used to dynamically configure the behavioral characteristics of the transition; By combining the device constraint component, general resource component, dynamic time component, and fixed time component, the execution process of the transition is divided into four standard types. Based on the aforementioned process topology, a standardized transition execution template is constructed, which encapsulates the transition execution process into four standard lifecycle templates. The standardized lifecycle template is used to perform simulations and output data for discrete events.
2. The discrete simulation method for process flow according to claim 1, characterized in that, The entity-based component system architecture constructs workpiece entities according to process flow requirements, structures and stores the process data corresponding to each workpiece entity to form a process information component, and establishes a mapping relationship between the workpiece entities and the process information components, including: Based on the entity component system architecture, initialize the entity pool of the simulation world; Based on the requirements of the process flow, dynamically generate workpiece entities that represent physical objects; The process data corresponding to each workpiece entity is structured and stored to form a process information component. The process information component is attached to each workpiece entity. The process data includes at least one of the following: workpiece name, current process stage, processing time, priority, and material properties. The process information component is used as the data carrier of the token in the Petri net, and a mapping relationship is established between the workpiece entity and the process information component.
3. The discrete simulation method for process flow according to claim 1, characterized in that, The process involves decomposing the target process into a state space, mapping the stable states of the process to places in a Petri net, abstracting actions that cause changes in the process state as transitions in the Petri net, and establishing a process topology that links the transitions to the places. This includes: The target process flow is decomposed into a state space to identify key nodes in the target process flow, wherein the key nodes include at least one of waiting for processing, processing in progress, inspection passed, and rework waiting. The key nodes are treated as stable states in the process and mapped to places in the Petri net. Each repository is associated with a query filter, which is used to retrieve and manage the set of all workpiece entities in the stable state corresponding to the repository in real time; Define the actions that change the process state as the standard behavior interface for transitions, including at least one of enable judgment, resource request, execution processing and token transfer; The standard behavioral interface of the transition is abstracted as a Petri net transition. The places are divided into input places and output places according to the preconditions and postconditions. The logical connection between the transition and the input places and the output places is established through directed arcs to form a process topology.
4. The discrete simulation method for process flow according to claim 1, characterized in that, The transition establishment device constraint component, general resource component, dynamic time component, and fixed time component corresponding to the workpiece entity are used to dynamically configure the behavioral characteristics of the transition, including: The device constraint component is used to bind the transitions of the corresponding workpiece entity to the target device entity. When the transition is triggered, it automatically checks and occupies the time-driven resource semaphore attached to the target device entity to realize the mutual exclusion access control of the target device entity. The general resource component is used to bind the transitions of the corresponding workpiece entity to non-device logical resources, and handle resource contention and blocking through a time-driven resource queue mechanism; The dynamic time component is used to mark the processing time of the corresponding workpiece entity's transition. It depends on the process information component of the input workpiece entity and reads the processing time carried by the workpiece entity during runtime to dynamically calculate the delay. The fixed time component is used to mark the processing time for the transition of the corresponding workpiece entity as a constant value.
5. The discrete simulation method for process flow according to claim 1, characterized in that, The process of transition execution is divided into four standard types by combining the equipment constraint component, general resource component, dynamic time component, and fixed time component, including: Based on the input process flow of the workpiece entity, determine whether the workpiece entity needs to be constrained by equipment. If so, determine to attach the workpiece entity to the equipment constraint component; otherwise, determine to attach the workpiece entity to the general resource component. After the workpiece entity is attached to the equipment constraint component or the general resource component, it is determined whether the working time mode is fixed working time. If so, it is determined that the workpiece entity is attached to the fixed working time component; otherwise, it is determined that the workpiece entity is attached to the dynamic working time component. The method of simultaneously attaching the workpiece entity to the equipment constraint component and the dynamic time component is set as an equipment-bound and dynamic time-type template. The method of simultaneously attaching the workpiece entity to the equipment constraint component and the fixed time component is set as an equipment-bound and fixed-time template. The method of simultaneously attaching the general resource component and the dynamic time component to the workpiece entity is set to a dynamic time template without device binding. The method of simultaneously attaching the general resource component and the fixed time component to the workpiece entity is set to a template with no device binding and a fixed time type. The device-bound and dynamic time template, the device-bound and fixed time template, the unbound and dynamic time template, and the unbound and fixed time template are used as four standard types to classify the execution process of the transition.
6. The discrete simulation method for process flow according to claim 1, characterized in that, The standardized transition execution template is constructed based on the process topology. This template encapsulates the transition execution process into four standard lifecycle templates, including: For each standard lifecycle template, initialize the execution environment of the current transition, and load the relevant entity component system world references, time-driven simulation environment references, and configuration parameters; According to the Petri net rules, retrieve the set of workpiece entities that meet the conditions from the input library and perform a precondition check. If the check fails, suspend the current transition. Based on the standard type of the execution process of the transition, the corresponding business logic is executed, the asynchronous delay event initiated by the time-driven engine is called, the workpiece entity is set to be in a processing state, the occupied resources are locked, and the delay is determined by the dynamic time component or the fixed time component. Once the delay is determined, the occupied resources are released, the state of the workpiece entity is updated, it is removed from the input library and added to the output library, and a single workpiece entity is distributed to multiple downstream libraries or multiple upstream workpiece entities are merged and output according to the simulation business requirements.
7. The discrete simulation method for process flow according to claim 1, characterized in that, The process of performing simulations and outputting data for discrete events using the standardized lifecycle template includes: Initialize the time-driven engine, load the entity component system architecture and the Petri net to perform discrete event simulation; When the time-driven engine enters the main loop, it schedules all transition events to be triggered according to the timestamp order. The entity component system listens for event signals and executes simulation operation through the standardized lifecycle template. During the simulation, the number of tokens in each warehouse, the trigger frequency of transitions, the utilization rate of resources, and the turnover cycle of workpiece entities are statistically analyzed in real time. After the simulation is completed, production efficiency, bottleneck analysis, and equipment load are obtained as key performance indicators, and a structured report containing the searched key performance indicators is exported.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the process flow discrete simulation method as described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the process flow discrete simulation method as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the discrete simulation method for the process flow as described in any one of claims 1 to 7.