A method and apparatus for building a simulation system for user-side energy storage facilities

By integrating the discrete event simulation function of the Mesa framework, defining the content and behavior of intelligent agents, and constructing a simulation system for user-side energy storage facilities, the problem of low digital operation level is solved, and more accurate operation analysis and management are achieved.

CN120180873BActive Publication Date: 2025-10-28INFORMATION & COMMUNICATION BRANCH STATE GRID JIBEI ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510234712.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-10-28
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The existing user-side energy storage facilities have a low level of digital operation, which cannot truly reflect complex factors such as battery performance, user load and electricity pricing system, increasing the difficulty of analyzing energy storage benefits.

Method used

By integrating the discrete event simulation function of the Mesa framework, defining the content and behavioral information of multiple agents, creating agent models, and simulating the actual operation scenarios of user-side energy storage facilities through a discrete event pool, a simulation system is constructed.

Benefits of technology

It has improved the digital operation level of user-side energy storage facilities, enabling the simulation system to more realistically display operational content and enhancing the accuracy of analysis and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180873B_ABST
    Figure CN120180873B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for building a simulation system for user-side energy storage facilities, relating to the field of energy system simulation technology. The solution provided in this application includes: integrating the Mesa framework to define the content information and behavioral information of multiple agents, whereby the behavioral information includes the input-output behaviors and associated interaction relationships between the agents; using the content and behavioral information of the agents, creating an agent model, which is then used to simulate and manage the multiple agents' perception of the environment, interaction with other agents, and actions to achieve specific goals or tasks; and further creating a discrete event pool containing pre-built discrete events, where these offline events are events occurring at specific points in time within the application scenario of the user-side energy storage facility; and using the agent model, simulating the actual operating scenario of the user-side energy storage facility by calling the offline events, thereby realizing the construction of a simulation system for the user-side energy storage facility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy system simulation technology, and in particular to a method and apparatus for building a simulation system for user-side energy storage facilities. Background Technology

[0002] With the advancement of new energy technologies, user-side energy storage has become an important component of the new power system. Fully utilizing user-side energy storage technology to participate in grid peak shaving and valley filling, power fluctuation mitigation, and microgrid stability control can bring new opportunities and benefits to the existing power grid.

[0003] However, the current level of digital operation of existing energy storage facilities is not high, making it impossible to reflect the impact of complex factors such as battery performance, user load, and electricity pricing in actual operation. This increases the difficulty of subsequent analysis of energy storage benefits. Therefore, how to improve the digitalization level of user-side energy storage facilities is an urgent technical problem to be solved. Summary of the Invention

[0004] This application provides a method and apparatus for building a simulation system for user-side energy storage facilities. The main purpose is to integrate the discrete event simulation function of the Mesa framework into the simulation modeling system, so that the simulation system for user-side energy storage facilities can more realistically reflect the operation of user-side energy storage facilities, thereby improving the digital operation level of user-side energy storage facilities.

[0005] To achieve the above objectives, this application mainly provides the following technical solutions:

[0006] The first aspect of this application provides a method for building a simulation system for a user-side energy storage facility, the method comprising:

[0007] The Mesa framework is integrated to determine the content information of multiple intelligent agents and the behavioral information between the multiple intelligent agents. The behavioral information includes the input and output behaviors between the multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined according to the physical architecture of the user-side energy storage facility.

[0008] Using the content and behavior information of the intelligent agents, an intelligent agent model is created. The intelligent agent model is used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks.

[0009] Create a discrete event pool containing pre-built discrete events, wherein the offline events are events that occur at a specific point in time in the application scenario of the user-side energy storage facility;

[0010] Using the aforementioned intelligent agent model, the actual operating scenarios of user-side energy storage facilities are simulated by invoking the offline events, thereby realizing the construction of a simulation system for user-side energy storage facilities.

[0011] A second aspect of this application provides a simulation system construction device for user-side energy storage facilities, the device comprising:

[0012] A determining unit is used to integrate the Mesa framework to determine the content information of multiple intelligent agents and the behavioral information between the multiple intelligent agents. The behavioral information includes the input and output behaviors between the multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined based on the physical architecture of the user-side energy storage facility.

[0013] The first creation unit is used to create an intelligent agent model using the content information and behavior information of the intelligent agent. The intelligent agent model is used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks.

[0014] The second creation unit is used to create a discrete event pool, which contains pre-built discrete events. The offline events are events that occur at a specific point in time in the application scenario of the user-side energy storage facility.

[0015] The building unit is used to simulate the actual operation scenario of the user-side energy storage facility by calling the offline events using the intelligent agent model, so as to realize the construction of a simulation system for the user-side energy storage facility.

[0016] A third aspect of this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for building a simulation system for user-side energy storage facilities.

[0017] The fourth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-described method for building a simulation system for user-side energy storage facilities.

[0018] By employing the above-described technical solution, the technical solution provided in this application has at least the following advantages:

[0019] This application provides a method and apparatus for building a simulation system for user-side energy storage facilities. For the core components of a real user-side energy storage facility, this application integrates the Mesa framework to define the content information and behavioral information of multiple agents, including the input and output behaviors between the agents and the interactive relationships achieved based on these behaviors. Then, using the content and behavioral information of the agents, an agent model is created. This agent model is used to simulate and manage the multiple agents' perception of the environment, interaction with other agents, and actions to achieve specific goals or tasks. A discrete event pool is then created, containing pre-built discrete events. These offline events are events that occur at specific points in time in the application scenario of the user-side energy storage facility. Finally, using the agent model, the actual operating scenario of the user-side energy storage facility is simulated by calling the offline events, thereby realizing the construction of a simulation system for the user-side energy storage facility.

[0020] Compared to existing technologies, there is a need to improve the digital operation level of existing energy storage facilities. This application integrates the discrete event simulation function of the Mesa framework into the simulation modeling system, so that the simulation system of the user-side energy storage facility will more realistically display the operation content of the user-side energy storage facility, thereby improving the digital operation level of the user-side energy storage facility.

[0021] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0022] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0023] Figure 1 A flowchart illustrating a method for building a simulation system for a user-side energy storage facility, as provided in this application embodiment;

[0024] Figure 2 Flowchart of another simulation system construction method for user-side energy storage facilities provided in this application embodiment

[0025] Figure 3 A block diagram illustrating the composition of a simulation system construction device for a user-side energy storage facility, provided in an embodiment of this application;

[0026] Figure 4A block diagram of a simulation system construction device for another user-side energy storage facility provided in this application embodiment. Detailed Implementation

[0027] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0028] This disclosure provides a method for building a simulation system for user-side energy storage facilities, such as... Figure 1 As shown, the following specific steps are provided in this embodiment of the application:

[0029] 101. Integrate the Mesa framework to determine the content information of multiple intelligent agents and the behavioral information between multiple intelligent agents. The behavioral information includes the input and output behaviors between multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined based on the physical architecture of the user-side energy storage facilities.

[0030] This application embodiment uses the Mesa framework as the technology stack to build a simulation system, which has the following advantages:

[0031] (1) The Mesa framework supports Agent-Based Modeling (ABM).

[0032] Mesa is a library focused on Agent Basic Modeling (ABM), particularly well-suited for describing and simulating the interactions and behaviors of large numbers of individuals (agents).

[0033] (2) Lightweight and easy to use

[0034] Mesa is designed to be simple, lightweight, and easy to learn and use. It provides simple yet powerful tools to help quickly build and debug simulation models.

[0035] (3) Built-in discrete event simulator module and scheduler module

[0036] The simulation employs discrete event simulation (DES) technology, which models the system's operation as a series of (discrete) events over time. Each event occurs at a specific instant, marking a change in the system's state. Between consecutive events, it is assumed that the system remains unchanged. Therefore, the simulation time can directly jump to the occurrence time of the next event, i.e., the next event time. Mesa has a nearly perfect built-in discrete event management module, whose mechanism perfectly matches the required scenario. Furthermore, the scheduler has two types: spatial and temporal. The requirement uses the temporal dimension discrete event simulator (running with event-driven propagation), which can be configured to activate agents in different orders (the activation order of agents affects the model's results).

[0037] (4) It has powerful data collector and visualization functions.

[0038] The data collector is responsible for gathering data from the simulation model. The Mesa framework provides a class that allows us to quickly process data collection and storage, making it easier to analyze. It can quickly collect and organize simulation data (model-level variables, surrogate-level variables, and tables) into formatted data, providing strong support for the backend, and enabling related visualization operations to observe the accuracy of the simulation.

[0039] In addition, in this embodiment of the application, Python is used as the development language for the simulation project. By leveraging Python's flexibility and extensive ecosystem, other Python libraries and tools, such as data analysis and visualization tools, can be easily integrated. When used in conjunction with Mesa, the functionality and analytical capabilities of the simulation modeling can be further enhanced.

[0040] Combining the advantages of the Mesa framework above, in terms of demand matching, the physical architecture of the user-side energy storage facility in this application embodiment actually involves multiple entities, such as battery system, battery management system (BMS), energy management system (EMS), power conversion system (PCS), and energy storage control system, etc. Therefore, Mesa provides a more convenient framework to define and manage the behavior and interaction of these entities.

[0041] In the Mesa framework, this embodiment identifies several core entities involved in the physical architecture of the user-side energy storage facility as intelligent agents. These agents, as core components of the user-side energy storage facility, each undertake different functions and roles, and their close collaboration maintains the overall stable operation. Therefore, this embodiment further refines the determination of the behavioral information between these agents, namely, the input-output behaviors between multiple agents and the interactive relationships achieved based on these input-output behaviors. The purpose is to enable the final simulation system to more realistically reflect the operational status of the user-side energy storage facility. The following examples illustrate several individuals as intelligent agents and the behavioral information between them, providing an exemplary explanation:

[0042] Example 1: Battery system (including individual cells, battery packs, and battery clusters), Battery Management System (BMS), and Energy Management System (EMS). For the battery system, it is necessary to define its charge / discharge characteristics, capacity decay patterns, temperature effects, and other input / output behaviors, and consider their communication protocols and control strategies with the BMS. The BMS, as the "brain" of the battery system, is responsible for monitoring battery status, implementing protection strategies, and optimizing battery usage. Its input / output behaviors include data acquisition, state estimation, and control command transmission, and it has a close interaction with the battery system and higher-level systems such as the EMS.

[0043] Example 2: The EMS is responsible for the energy management and optimized scheduling of the entire energy storage system. Its input and output behavior involves multiple aspects such as energy forecasting, demand response, and load allocation. It needs to work closely with the PCS and energy storage control system to achieve efficient system operation and cost control. As the core equipment for power conversion, the PCS's input and output behavior directly affects the energy conversion efficiency and stability, and it has a complex interaction with the battery system and the power grid.

[0044] As can be seen from Examples 1 and 2 above, accurately defining the intelligent agent and its input-output behavior (along with the implemented interaction relationships) in a simulation system is crucial for the stable and effective simulation operation of the final user-side energy storage facility simulation system. Only in this way can a simulation system that can truly reflect the dynamic characteristics of the actual user-side energy storage system be constructed.

[0045] 102. Create an agent model using the agent's content and behavior information.

[0046] Among them, the agent model is used to simulate and manage multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks.

[0047] This application embodiment utilizes multiple intelligent agents and their behavioral information to simulate and construct various intelligent agents and their behaviors. It should be noted that the intelligent agent content information and behavioral information obtained in step 101 are data information obtained based on the physical architecture of the user-side energy storage system. These are consistent with practical operational requirements. Therefore, this application embodiment uses these practical data to simulate and construct various intelligent agents and their behaviors, thereby obtaining an intelligent agent model. This intelligent agent model is used to simulate and manage multiple intelligent agents' perception of the environment, interaction with other intelligent agents, and taking actions to achieve specific goals or tasks. The purpose is to ensure that the final simulation system can also simulate the behaviors between various intelligent agents.

[0048] 103. Create a discrete event pool. The discrete event pool contains pre-built discrete events. Offline events are events that occur at a specific point in time in the application scenario of user-side energy storage facilities.

[0049] This application uses discrete events to build the simulation system, which is different from "not using discrete events". "Not using discrete events" is equivalent to "continuous". The physical architecture of the user-side energy storage system in this application includes devices, battery packs and users, etc., and they interact during operation. Moreover, this interaction is caused by events and is not "continuous". Therefore, this application uses discrete events to realize an event-driven development approach, which is more conducive to building a simulation system to realistically display the operating status of user-side energy storage facilities.

[0050] 104. Using an intelligent agent model, simulate the actual operation scenario of user-side energy storage facilities by calling offline events, so as to realize the construction of a simulation system for user-side energy storage facilities.

[0051] This application employs an intelligent agent model to simulate the perception of the environment by multiple intelligent agents, their interaction with other intelligent agents, and their actions to achieve specific goals or tasks. It also combines this with an event-driven development approach that utilizes discrete events to simulate the actual operating scenarios of user-side energy storage facilities, thereby building a simulation system for user-side energy storage facilities. This application integrates the discrete event simulation capabilities of the Mesa framework into the simulation modeling system, enabling the constructed simulation system to more realistically represent the operational content of user-side energy storage facilities, thus improving the digital operation level of user-side energy storage facilities.

[0052] To provide a more detailed explanation, this application also provides another method for building a simulation system for user-side energy storage facilities, such as... Figure 2 As shown, the following specific steps are provided in this embodiment of the application:

[0053] 201. Integrate the Mesa framework to determine the content information of multiple intelligent agents and the behavioral information between multiple intelligent agents. The behavioral information includes the input and output behaviors between multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined based on the physical architecture of the user-side energy storage facilities.

[0054] In the embodiments of this application, this step is explained and described in step 101.

[0055] 202. Using the content and behavioral information of intelligent agents, create intelligent agent models. These models are used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks.

[0056] In the embodiments of this application, the detailed explanation of this step includes the following: (1) and (2).

[0057] (1) Combining the content information and behavior information of the agent, the Agent class in the Mesa framework is used to create first attribute information, first method information and first application scenario information for the agent; the first attribute information includes at least the unique identifier of the agent; the first method information includes at least the operation of the agent at the current time step; the first application scenario information includes at least the management and tracking of the agent's state, dynamic management of the agent's life cycle, the agent's behavior logic, and specific operations executed at different time steps.

[0058] An example explanation, such as the Agent class:

[0059] (1.1) Attributes, such as: unique_id: a unique identifier for each agent; model: a reference to the model instance in which the agent resides; self.pos: the position of the agent.

[0060] (1.2) Methods, such as: remove(): remove the agent from the model; step(): execute the agent's current time step operation.

[0061] (1.3) Application scenarios, such as: Unique identifier: Ensure that each agent is unique in the model, suitable for managing and tracking the state of a large number of agents, such as tracking the state of each individual battery in a simulation system; Location management: If the agent has a location attribute, it can be used to simulate dynamic changes in space, such as the transfer of temperature between adjacent individual batteries; Deleting agents: Dynamically manage the life cycle of agents, such as removing a component under certain conditions or discrete events; Single-step operation: Design the behavioral logic of agents, and perform specific operations at each time step, such as updating the charge and discharge status of individual batteries or EMS counting the amount of charge.

[0062] (2) Using the Model class in the Mesa framework, create second attribute information, second method information and second application scenario information for the agent; the second attribute information includes at least the order of steps of the management agent and the execution object, and a list of different agent types in the model; the second method information includes at least the simulation of running the model until the defined termination condition; the second application scenario information includes at least the execution order of the management agent.

[0063] An example explanation, such as the Model class:

[0064] (2.1) Attributes, such as the following:

[0065] schedule: The object that manages the sequence of steps and execution of intelligent agents.

[0066] agents: An AgentSet containing all agents in the model.

[0067] agent_types: A list of different agent types that exist in the model.

[0068] (2.2) Methods, such as the following:

[0069] get_agents_of_type(agenttype:type[Agent]): Returns an AgentSet of agents of the specified type.

[0070] run_model(): Runs the simulation of the model until the defined termination condition is met.

[0071] step(): Executes one step of the simulation process of the model.

[0072] next_id(): Generates and returns the next unique identifier for the agent.

[0073] reset_randomizer(seed:int|None=None): Resets the random number generator for the model.

[0074] (2.3) Application scenarios, and enable the following functions in the application scenarios:

[0075] Operation status management: Controls the start and stop of the simulation to ensure the orderly progress of the simulation process.

[0076] Agent scheduling: manages the execution order of agents to ensure the rationality of behavioral logic, such as the execution order between agents like BMS, PCS, and EMS.

[0077] Agent type management: Facilitates the management and acquisition of different types of agents, such as sensors and actuators.

[0078] Simulation step management: Defines a one-step operation for the model, applicable to state updates and behavior execution at each time step.

[0079] Randomness management: Controlling random factors in simulation to ensure the repeatability of results or to simulate random environments.

[0080] Precise management of agents: The unique identifiers and location attributes of agents make it easy to manage and track the state and behavior of each agent, which is suitable for the simulation of complex systems.

[0081] Flexible scheduling and execution: The model's scheduling and execution mechanism allows for flexible definition and control of the order and logic of agent behavior, ensuring the accuracy and rationality of the simulation process.

[0082] Multi-type agent support: The model can manage multiple types of agents simultaneously, suitable for agent interactions with different roles in complex systems, such as sensors, controllers and pumps in a smart irrigation system.

[0083] Randomness control: The ability to reset the random number generator ensures that the simulation is repeatable when needed, suitable for experimenting and testing different simulation conditions and scenarios.

[0084] 203. Create a discrete event pool. The discrete event pool contains pre-built discrete events. Offline events are events that occur at a specific point in time in the application scenario of user-side energy storage facilities.

[0085] In the embodiments of this application, this step can be further refined to include the following: (1)-(4);

[0086] (1) Use incremental time advance to support discrete event scheduling using integer time units;

[0087] (2) Use floating-point time units to support discrete event simulation;

[0088] (3) Based on the use of incremental time advancement and floating-point time units, a scheduling function is used to encapsulate a discrete event;

[0089] (4) Based on incremental time progression and floating-point time unit, the multiple discrete events obtained by encapsulation are stored in the event list in sequence to construct a discrete event pool.

[0090] As shown in (1)-(4) above, the exemplary explanations include the following:

[0091] In this embodiment, the discrete event pool is constructed using Python classes. Each method within the class represents a combination of discrete events. The specific process is as follows:

[0092] (1) Input parameters: run_model (the model of the current simulation system), first_event_time (the time when the current event combination first occurs), etc., and not limited to the above parameters.

[0093] (2) Obtaining agents: Based on the requirements of the discrete event combination, obtain the agents required for the combination through get_agents_of_type.

[0094] (3) Create discrete events, such as using the discrete event module design in the Mesa framework, such as using the discrete event simulator of the Mesa framework for simulation modeling system development. Specifically, the following classes can be used, but are not limited to, to achieve the corresponding functions:

[0095] (1) ABMSimulator and DEVSimulator classes

[0096] ABMSimulator: Uses incremental time progression to support discrete event scheduling with integer time units. Suitable for Agent Base Models (ABMs) that require periodic time steps.

[0097] DEVSimulator: Uses floating-point time units for more accurate and complex discrete event simulations. Suitable for scenarios requiring high-precision event timing.

[0098] Application scenarios: ABMSimulator can be used for the design of agent-based simulation systems. DEVSimulator, on the other hand, can handle more complex interactions, such as event-driven system state changes.

[0099] (2) Scheduling function

[0100] schedule_event_next_tick: Schedules an event to the next time tick.

[0101] schedule_event_now: Schedules events to the current time scale.

[0102] schedule_event_absolute: Schedules events at a specific time.

[0103] schedule_event_relative: Schedule events relative to the current time.

[0104] Application scenarios: These functions allow for precise control over the timing of events, which is crucial for event scheduling and management in simulation modeling systems.

[0105] (3) SimulationEvent class

[0106] Encapsulate an event, including attributes such as time, function to be executed, priority, and unique identifier, and include methods for executing and canceling the event.

[0107] Application scenarios: Used to define specific operations at specific times, such as planned start-up of charging and discharging, or simulating a battery pack temperature exceeding a threshold.

[0108] (4) Simulator class

[0109] Controlling time progression and event execution includes managing event lists, scheduling, and simulation control (run_for, run_until).

[0110] Application Scenarios: At the heart of managing simulation workflows, ensuring events are executed in the correct order and at the right time. Supporting simulations to run for specified durations is crucial for performance testing and scenario analysis.

[0111] (5) EventList class

[0112] Manage the event list to ensure events are executed in sequence. Provide methods for adding, previewing, popping up, and deleting events.

[0113] Application scenarios: Ensuring efficient event management is crucial for large-scale simulations that require processing multiple events in a specific order, such as emergency response simulation of a battery pack with excessive voltage in a BMS.

[0114] 204. Using an intelligent agent model, simulate the actual operation scenario of user-side energy storage facilities by calling offline events, so as to realize the construction of a simulation system for user-side energy storage facilities.

[0115] In this embodiment of the application, a data collection and analysis step is added to the user-side energy storage simulation modeling system, as shown in 205-207 below.

[0116] 205. In the simulation system of user-side energy storage facilities, construct a data collector and a simulation log recording module.

[0117] 206. In the process of simulating the actual operation scenario of user-side energy storage facilities by calling offline events, collect data information generated by the simulated management agents of the agent model to achieve specific goals or tasks.

[0118] 207. Use the simulation log recording module to record data information.

[0119] For items 205-207 above, exemplarily, embodiments of this application use the DataCollector class of the Mesa framework, which can conveniently collect various types of data from the model and agent for further analysis and optimization. The following is an introduction to the tools used in the data collector module and the simulation log recording module, as well as their application scenarios:

[0120] (1) Model-level data collection

[0121] `model_reporters`: `model_reporters` is a dictionary that maps data names to specific attribute names or functions. These functions or attributes are called at each time step and the results are stored.

[0122] Application scenarios: It can collect the real time of each time step, scheduler execution order logs, etc.

[0123] (2) Agent-level data collection

[0124] agent_reporters: agent_reporters is a dictionary that maps data names to agent attribute names or functions.

[0125] Application scenarios: To realize the status monitoring of a single intelligent agent, it can track the current real-time status and real-time behavior records of each component, such as the current real-time current of the PCS and the current battery temperature of a single cell.

[0126] (3) Simulation log recording module

[0127] Log_list: Uses a native Python list format. Log content is added whenever new log information is available. The log format consists of 5 elements: current event simulator time, agent name, agent unique ID, agent device status, and specific log content. It can monitor and collect system operation behavior logs in real time, ensuring the repeatability of simulation modeling and the verifiability of results.

[0128] Error_list: This uses a native Python list format. Alarm content is added whenever new alarm information is received. The alarm format consists of 5 elements: current event simulator time, agent name, agent unique ID, agent device status, and specific alarm content. It can monitor and collect alarms of system operation behavior in real time, ensuring the repeatability of simulation modeling and the verifiability of results.

[0129] Application scenario: Collect historical operation logs to verify the rationality of the occurrence and sequence of events.

[0130] As a response to the above Figure 1 and Figure 2To implement the method shown, this application embodiment provides a simulation system construction device for user-side energy storage facilities, serving as a virtual device for executing the aforementioned method. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment, but it should be clear that the device in this embodiment is used to improve the digital operation level of user-side energy storage facilities, such as... Figure 3 The device includes:

[0131] The determining unit 31 is used to integrate the Mesa framework to determine the content information of multiple intelligent agents and the behavioral information between the multiple intelligent agents. The behavioral information includes the input and output behaviors between the multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined according to the physical architecture of the user-side energy storage facility.

[0132] The first creation unit 32 is used to create an intelligent agent model using the content information and behavior information of the intelligent agent. The intelligent agent model is used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks.

[0133] The second creation unit 33 is used to create a discrete event pool, which contains pre-built discrete events. The offline events are events that occur at a specific point in time in the application scenario of the user-side energy storage facility.

[0134] The construction unit 34 is used to utilize the intelligent agent model to simulate the actual operation scenario of the user-side energy storage facility by calling the offline events, so as to realize the construction of a simulation system for the user-side energy storage facility.

[0135] Further, such as Figure 4 As shown, the device further includes:

[0136] The third creation unit 35 is used to build a data collector and a simulation log recording module in the simulation system of the user-side energy storage facility;

[0137] Collection unit 36 ​​is used to collect data information generated by the intelligent agent model in achieving specific goals or tasks during the process of simulating the actual operation scenario of user-side energy storage facilities by calling the offline events;

[0138] The recording unit 37 is used to record the data information using the simulation log recording module.

[0139] Further, such as Figure 4 As shown, the first creation unit 32 includes:

[0140] The first execution module 321 is used to combine the content information and behavior information of the intelligent agent and, using the Agent class in the Mesa framework, create first attribute information, first method information, and first application scenario information for the intelligent agent; the first attribute information includes at least the unique identifier of the intelligent agent; the first method information includes at least the operation of executing the current time step of the intelligent agent; the first application scenario information includes at least the management and tracking of the state of the intelligent agent, dynamic management of the life cycle of the intelligent agent, the behavioral logic of the intelligent agent, and specific operations executed at different time steps.

[0141] The second execution module 322 is used to create second attribute information, second method information and second application scenario information for the agent using the Model class in the Mesa framework; the second attribute information includes at least a list of different agent types existing in the model, which manages the step order and execution objects of the agent; the second method information includes at least running the simulation of the model until the defined termination condition; the second application scenario information includes at least managing the execution order of the agent.

[0142] Further, such as Figure 4 As shown, the second creation unit 33 includes:

[0143] The third execution module 331 is used to advance using incremental time and to support discrete event scheduling using integer time units;

[0144] The fourth execution module 332 is used to support discrete event simulation using floating-point time units;

[0145] Encapsulation module 333 is used to encapsulate a discrete event using a scheduling function based on the incremental time advance and floating-point time unit used.

[0146] The construction module 334 is used to store the multiple encapsulated discrete events in sequence into an event list according to the incremental time advance and floating-point time unit, so as to construct a discrete event pool.

[0147] In summary, the embodiments of this application provide a convergence device for a train safety envelope, including a processor and a memory. The aforementioned determining unit, first creation unit, second creation unit, and building unit are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0148] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the discrete event simulation capabilities of the Mesa framework can be integrated into the simulation modeling system. This allows the simulation system for user-side energy storage facilities to more realistically represent the operational content of these facilities, thereby improving the digital operation level of user-side energy storage facilities.

[0149] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for building a simulation system for user-side energy storage facilities.

[0150] This application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-mentioned method for building a simulation system for user-side energy storage facilities.

[0151] This application also provides a computer program product that, when executed on a data processing device, is suitable for executing the steps of a method for initializing a simulation system with user-side energy storage facilities.

[0152] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0153] In a typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input / output interfaces, network interfaces, etc.

[0154] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.

[0155] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0156] It should also be noted that 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 process, method, article, or apparatus. Unless otherwise specified, 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 that element.

[0157] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for constructing a simulation system for a user-side energy storage facility, characterized in that, The method includes: The Mesa framework is integrated to determine the content information of multiple intelligent agents and the behavioral information between the multiple intelligent agents. The behavioral information includes the input and output behaviors between the multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined according to the physical architecture of the user-side energy storage facility. Using the content and behavior information of the intelligent agents, an intelligent agent model is created. The intelligent agent model is used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks. The step of creating an agent model using the agent's content and behavior information includes: combining the agent's content and behavior information, and using the Agent class in the Mesa framework to create first attribute information, first method information, and first application scenario information for the agent; the first attribute information includes at least a unique identifier for the agent; the first method information includes at least executing the agent's current time step operation; the first application scenario information includes at least managing and tracking the agent's state, dynamically managing the agent's lifecycle, the agent's behavioral logic, and specific operations executed at different time steps; and using the Model class in the Mesa framework to create second attribute information, second method information, and second application scenario information for the agent; the second attribute information includes at least managing the agent's step order and execution object, and a list of different agent types existing in the model; the second method information includes at least running the model simulation until a defined termination condition; and the second application scenario information includes at least managing the agent's execution order. Create a discrete event pool containing pre-built discrete events, which are events that occur at a specific point in time in the application scenario of user-side energy storage facilities; The creation of the discrete event pool includes: using incremental time advancement to support the scheduling of discrete events using integer time units; using floating-point time units to support discrete event simulation; using a scheduling function to encapsulate a discrete event based on the incremental time advancement and floating-point time units used; and storing the multiple encapsulated discrete events in an event list in sequence according to the incremental time advancement and floating-point time units to construct the discrete event pool. Using the aforementioned intelligent agent model, the actual operating scenarios of user-side energy storage facilities are simulated by invoking the discrete events, thereby realizing the construction of a simulation system for user-side energy storage facilities.

2. The method according to claim 1, characterized in that, The method further includes: In the simulation system of the user-side energy storage facility, a data collector and a simulation log recording module are constructed; In the process of simulating the actual operation scenario of user-side energy storage facilities by calling the discrete events, the data information generated by the intelligent agent model simulation management to achieve specific goals or tasks is collected. The simulation log recording module is used to record the data information.

3. A simulation system construction device for user-side energy storage facilities, characterized in that, The device includes: A determining unit is used to integrate the Mesa framework to determine the content information of multiple intelligent agents and the behavioral information between the multiple intelligent agents. The behavioral information includes the input and output behaviors between the multiple intelligent agents and the interaction relationships realized based on the input and output behaviors. The intelligent agents are entities determined based on the physical architecture of the user-side energy storage facility. The first creation unit is used to create an intelligent agent model using the content information and behavior information of the intelligent agent. The intelligent agent model is used to simulate and manage multiple intelligent agents to perceive the environment, interact with other intelligent agents, and take actions to achieve specific goals or tasks. The first creation unit includes: a first execution module and a second execution module; The first execution module is used to combine the content information and behavior information of the agent and, using the Agent class in the Mesa framework, create first attribute information, first method information, and first application scenario information for the agent; the first attribute information includes at least the unique identifier of the agent; the first method information includes at least the operation of executing the agent at the current time step; the first application scenario information includes at least the management and tracking of the agent's state, dynamic management of the agent's lifecycle, the agent's behavioral logic, and specific operations executed at different time steps; The second execution module is used to create second attribute information, second method information, and second application scenario information for the agent using the Model class in the Mesa framework; the second attribute information includes at least a list of different agent types existing in the model, which manages the step order and execution objects of the agent; the second method information includes at least running the simulation of the model until the defined termination condition; the second application scenario information includes at least managing the execution order of the agent. The second creation unit is used to create a discrete event pool, which contains pre-built discrete events, which are events that occur at a specific point in time in the application scenario of user-side energy storage facilities. The second creation unit includes: a third execution module, a fourth execution module, an encapsulation module, and a construction module; The third execution module is used to advance using incremental time and to support discrete event scheduling using integer time units; The fourth execution module is used to use floating-point time units to support discrete event simulation; The encapsulation module is used to encapsulate a discrete event using a scheduling function based on the incremental time advance and floating-point time unit used. The construction module is used to sequentially store the multiple encapsulated discrete events into an event list according to the incremental time progression and floating-point time unit, so as to construct a discrete event pool. The building unit is used to simulate the actual operation scenario of the user-side energy storage facility by calling the discrete events using the intelligent agent model, so as to realize the construction of a simulation system for the user-side energy storage facility.

4. The apparatus according to claim 3, characterized in that, The device further includes: The third creation unit is used to build a data collector and a simulation log recording module in the simulation system of the user-side energy storage facility; The collection unit is used to collect data information generated by the intelligent agent model simulation management of the intelligent agent in achieving specific goals or tasks during the process of simulating the actual operation scenario of the user-side energy storage facility by calling the discrete events. The recording unit is used to record the data information using the simulation log recording module.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the simulation system construction method for the user-side energy storage facility as described in claim 1 or 2.

6. An electronic device, characterized in that, include: The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the simulation system construction method for the user-side energy storage facility as described in claim 1 or 2.

Citation Information

Patent Citations

  • Crude oil industry chain operation simulation method and device

    CN118133481A

  • Metareinforcement learning multi-agent system for complex environment

    CN119150498A