Simulation system building method and device for user-side energy storage facility
Through the integration of discrete event simulation functions and intelligent models of the Mesa framework, a simulation system for user-side energy storage facilities is built, which solves the problem of low digital operation level in the existing technology, and realizes more realistic simulation and more effective energy storage benefit analysis.
Patent Information
- Application Number
- CN202510234712.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The digital operation level of existing energy storage facilities is not high and cannot effectively reflect complex factors such as battery performance, user load and electricity price system, which increases the difficulty of subsequent analysis of energy storage benefits.
Integrate the discrete event simulation function of the Mesa framework into the simulation modeling system, create an agent model by defining the agent and its behavior information, and use the discrete event pool to simulate the actual operation scenario of the user-side energy storage facility to build a more realistic simulation system.
The digital operation level of the user-side energy storage facilities is improved, so that the simulation system can more realistically display the operation content of the energy storage facilities, thereby more effectively analyzing and optimizing energy storage benefits.
Smart Images

Figure CN120180873A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of energy system simulation, and in particular to a method and device for building a simulation system of a user-side energy storage facility. Background Art
[0002] With the advancement of new energy technologies, user-side energy storage has become an important part of the new power system. Making full use of user-side energy storage technology and enabling it to participate in peak shaving and valley filling of the power grid, smoothing power fluctuations and microgrid stability control can bring new opportunities and benefits to the existing power grid.
[0003] However, the current digital operation level of existing energy storage facilities is not high, which makes it impossible to reflect the influence of complex factors such as battery performance, user load, and electricity price system in actual operation, which will increase the difficulty of subsequent analysis of energy storage benefits. Therefore, how to improve the digital level of user-side energy storage facilities is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a method and device 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 of the user-side energy storage facilities built will more realistically display the operation content of the user-side energy storage facilities, thereby improving the digital operation level of the user-side energy storage facilities.
[0005] In order to achieve the above objectives, this application mainly provides the following technical solutions:
[0006] In a first aspect, the present application provides a method for building a simulation system for a user-side energy storage facility, the method comprising:
[0007] Integrate the Mesa framework to determine content information of multiple intelligent agents and behavior information between the multiple intelligent agents, wherein the behavior information includes input and output behaviors between the multiple intelligent agents and interactive relationships realized according to the input and output behaviors; the intelligent agent is an entity determined according to the physical architecture of the user-side energy storage facility;
[0008] Using the content information and behavior information of the intelligent agent, an intelligent agent model is created, and 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] Creating a discrete event pool, wherein the discrete event pool contains pre-built discrete events, wherein the offline event is an event occurring at a specific time point in an application scenario of a user-side energy storage facility;
[0010] By using the agent model, the actual operation scenario of the user-side energy storage facility is simulated by calling the offline events, so as to build a simulation system for the user-side energy storage facility.
[0011] The second aspect of the present application provides a device for building a simulation system of a user-side energy storage facility, and the device includes:
[0012] A determination unit, configured to integrate the Mesa framework, and determine the content information of multiple agents and the behavior information between the multiple agents, where the behavior information includes the input-output behaviors between the multiple agents and the interaction relationships realized according to the input-output behaviors; the agent is an entity determined according to the physical architecture of the user-side energy storage facility;
[0013] A first creation unit, configured to create an agent model by using the content information and behavior information of the agent, and the agent model is applied to simulate and manage the multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks;
[0014] A second creation unit, configured to create a discrete event pool, where the discrete event pool contains pre-constructed discrete events, and the offline event is an event that occurs at a specific time point in the application scenario of the user-side energy storage facility;
[0015] A building unit, configured to use the agent model to simulate the actual operation scenario of the user-side energy storage facility by calling the offline events, so as to build a simulation system for the user-side energy storage facility.
[0016] The third aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for building a simulation system of a user-side energy storage facility as described above is implemented.
[0017] The fourth aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the computer program is executed by the processor, the method for building a simulation system of a user-side energy storage facility as described above is implemented.
[0018] By means of the above technical solutions, the technical solutions provided by the present application have at least the following advantages:
[0019] The present application provides a method and device for building a simulation system of a user-side energy storage facility. For the core components in a real user-side energy storage facility, the present application integrates the Mesa framework to define the content information of multiple agents and the behavior information between them, and the behavior information includes the input-output behaviors between multiple agents and the interaction relationships realized according to the input-output behaviors; then, using the content information and behavior information of the agents, an agent model is created, and the agent model is applied to simulate and manage the perception of the environment by multiple agents, the interaction with other agents, and the taking of actions to achieve specific goals or tasks; and then a discrete event pool is created, and the discrete event pool contains pre-constructed discrete events, and the offline events are events that occur at specific time points in the application scenarios of the user-side energy storage facility; finally, using the agent model, the actual operation scenario of the user-side energy storage facility is simulated by calling the offline events to implement the building of the simulation system of the user-side energy storage facility.
[0020] Compared with the prior art, which requires improving the digital operation level of existing energy storage facilities, the present application integrates the discrete event simulation function of the Mesa framework into the simulation modeling system, so that the built 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 the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. Brief Description of the Drawings
[0022] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0023] Figure 1 It is a flowchart of a method for building a simulation system of a user-side energy storage facility provided by an embodiment of the present application;
[0024] Figure 2 It is a flowchart of another method for building a simulation system of a user-side energy storage facility provided by an embodiment of the present application
[0025] Figure 3 It is a block diagram of the composition of a device for building a simulation system of a user-side energy storage facility provided by an embodiment of the present application;
[0026] Figure 4It is a block diagram of another device for building a simulation system of a user-side energy storage facility provided by an embodiment of the present application. Detailed implementation manners
[0027] Hereinafter, exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.
[0028] The embodiments of the present disclosure provide a method for building a simulation system of a user-side energy storage facility, as Figure 1 shown. For this, the embodiments of the present application provide the following specific steps:
[0029] 101. Integrate the Mesa framework, determine the content information of multiple agents and the behavior information between multiple agents. The behavior information includes the input-output behavior between multiple agents and the interaction relationship realized according to the input-output behavior. An agent is an entity determined according to the physical architecture of the user-side energy storage facility.
[0030] The embodiments of the present application use the Mesa framework as the technology stack to build a simulation system. Its advantages include the following:
[0031] (1) The Mesa framework supports Agent-Based Modeling (ABM)
[0032] Mesa is a library focused on agent-based modeling (ABM), which is particularly suitable for describing and simulating the interactions and behaviors of a large number of individuals (agents).
[0033] (2) Lightweight and easy to use
[0034] Mesa is designed simply and lightly, and is easy to get started and use. It provides simple and powerful tools to help quickly build and debug simulation models.
[0035] (3) Built-in discrete event simulator module and scheduler module
[0036] The simulation uses discrete event simulation technology. Discrete event simulation (DES) simulates the operation of a system as a series of (discrete) events over time. Each event occurs at a specific instant, marking a change in the system state. Between consecutive events, it is assumed that no changes occur in the system. 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 discrete event management module built-in, and the integrity of its mechanism fits well with the required scenario. Secondly, the scheduler has two types: spatial dimension and time dimension. The required one is the discrete event simulator in the time dimension (run by event-driven), and the agents can be configured to be activated in different orders (the activation order of the agents will affect the results of the model).
[0037] (4) It has a powerful data collector and visualization function
[0038] The data collector is responsible for collecting data from the simulation model. The Mesa framework provides a class that can quickly process data collection and storage for us, making it easier to analyze. It can quickly collect and organize the simulation data (model-level variables, agent-level variables, and tables) into formatted data, providing strong support for the background, and can perform relevant visualization operations to observe the accuracy of the simulation.
[0039] In addition, in the embodiments of this application, the development language for the simulation project is Python. Using the flexibility and extensive ecosystem of Python, other Python libraries and tools, such as data analysis and visualization, can be easily integrated and used in combination with Mesa to further enhance the simulation modeling function and analysis ability.
[0040] Combined with the above advantages of the Mesa framework, in terms of requirement matching, the physical architecture of the user-side energy storage facility in the embodiments of this application actually involves multiple individuals, such as battery systems, battery management systems (BMS), energy management systems (EMS), power conversion systems (PCS), and energy storage control systems, etc. Therefore, Mesa provides a more convenient framework to define and manage the behaviors and interactions of these individuals.
[0041] In the Mesa framework, in the embodiments of the present application, some core individuals involved in the physical architecture of the user-side energy storage facility are determined as agents. These agents, as the core components of the user-side energy storage facility, each undertake different functions and roles, and their close cooperation jointly maintains the overall stable operation. Therefore, the embodiments of the present application further refine and determine the behavioral information between these agents, that is, the input-output behaviors between multiple agents and the interaction relationships realized according to the input-output behaviors. The purpose is to enable the finally built simulation system to more realistically reflect the operation status of the user-side energy storage facility. The following are several examples of individuals as agents and the behavioral information between agents, and the exemplary explanations are as follows:
[0042] Example 1: Battery system (including single 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 input-output behaviors such as charge-discharge characteristics, capacity attenuation law, and temperature influence, and consider the communication protocol and control strategy between it and the BMS. As the "brain" of the battery system, the BMS is responsible for monitoring the battery state, executing protection strategies, optimizing battery use, etc. Its input-output behaviors include data acquisition, state estimation, control instruction sending, etc., and there are close interaction relationships with the battery system and upper-layer systems such as the EMS.
[0043] Example 2: The EMS is responsible for the energy management and optimal scheduling of the entire energy storage system. Its input-output behaviors involve multiple aspects such as energy prediction, demand response, and load distribution, and it needs to cooperate closely with the PCS, energy storage control system, etc. to achieve the efficient operation and cost control of the system. As the core device for power conversion, the input-output behaviors of the PCS directly affect the energy conversion efficiency and stability, and there are complex interaction relationships with the battery system and the power grid.
[0044] As shown in the above Example 1 and Example, it can be seen that accurately defining agents and their input-output behaviors (along with the realized interaction relationships) on a simulation system is very important for the stable and effective simulation operation of the finally obtained simulation system of the user-side energy storage facility, so as to build a simulation system that can truly reflect the dynamic characteristics of the actual user-side energy storage system.
[0045] 102. Create an agent model using the content information and behavioral information of the agent.
[0046] Among them, the agent model is applied to simulate and manage multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks.
[0047] In the embodiments of the present application, multiple agents and the behavioral information existing therebetween are used to simulate and construct various agents and their behaviors. It should be noted here that the agent content information and behavioral information obtained in step 101 are data information obtained according to the physical architecture of the user-side energy storage system, and these are in line with the practical operation requirements. Therefore, the embodiments of the present application use these practical data to simulate and construct various agents and their behaviors, thereby obtaining an agent model, so that the agent model is applied to simulate and manage multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks. The purpose is to make the finally built simulation system capable of simulating the behaviors between various agents as well.
[0048] 103. Create a discrete event pool, which contains pre-constructed discrete events. The offline events are events that occur at specific time points in the application scenario of the user-side energy storage facility.
[0049] The embodiments of the present application use discrete events to build a simulation system, which is different from the "way without using discrete events". The "way without using discrete events" is equivalent to "continuous". In the physical architecture of the user-side energy storage system in the embodiments of the present application, there are devices, battery packs, users, etc., and they interact during the operation process, and this interaction is caused by events, not "continuous". Therefore, the embodiments of the present application use discrete events to implement an event-driven development method, which is more conducive to building a simulation system to truly display the operation status of the user-side energy storage facility.
[0050] 104. Use the agent model to simulate the actual operation scenario of the user-side energy storage facility by calling offline events, so as to build a simulation system for the user-side energy storage facility.
[0051] The embodiments of the present application adopt an agent model, which is applied to simulate and manage multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks, and then combine with the event-driven development method implemented by calling discrete events to simulate the actual operation scenario of the user-side energy storage facility, thereby building a simulation system for the user-side energy storage facility. The embodiments of the present application integrate the discrete event simulation function of the Mesa framework into the simulation modeling system, so that the built simulation system for the user-side energy storage facility will more truly display the operation content of the user-side energy storage facility, thereby improving the digital operation level of the user-side energy storage facility.
[0052] For a more detailed explanation, the embodiments of the present application also provide another method for building a simulation system for the user-side energy storage facility, as Figure 2 shown. For this, the embodiments of the present application provide the following specific steps:
[0053] 201. Integrate the Mesa framework to determine the content information of multiple agents and the behavior information between multiple agents. The behavior information includes the input-output behavior between multiple agents and the interaction relationship realized according to the input-output behavior. An agent is an entity determined according to the physical architecture of the energy storage facility on the user side.
[0054] In the embodiment of the present application, for the explanation of this step, refer to step 101.
[0055] 202. Use the content information and behavior information of the agents to create an agent model. The agent model is applied to simulate and manage the environment perception of multiple agents, interaction with other agents, and taking actions to achieve specific goals or tasks.
[0056] In the embodiment of the present application, the detailed explanation of this step includes the following: (1) and (2).
[0057] (1) Combine the content information and behavior information of the agents, and use the Agent class in the Mesa framework to create the first attribute information, the first method information, and the first application scenario information for the agents. The first attribute information includes at least the unique identifier of the agent. The first method information includes at least performing the current time step operation of the agent. The first application scenario information includes at least managing and tracking the state of the agent, dynamically managing the life cycle of the agent, the behavior logic of the agent, and specific operations performed at different time steps.
[0058] Exemplary explanations are as follows for the Agent class:
[0059] (1.1) Attributes, such as including: unique_id: the unique identifier of each agent; model: referring to the model instance where the agent is located; self.pos: the position of the agent.
[0060] (1.2) Methods, such as including: remove(): deleting the agent from the model; step(): performing the current time step operation of the agent.
[0061] (1.3) Application scenarios, such as including: unique identifier: ensuring the uniqueness of each agent in the model, applicable to managing and tracking the states of a large number of agents, for example, tracking the state of each single battery in a simulation system; position management: if the agent has a position attribute, it can be used to simulate dynamic changes in space, such as scenarios like the transfer of temperature between adjacent single batteries; deleting the agent: dynamically managing the life cycle of the agent, for example, removing a component under certain conditions or discrete event impacts; single-step operation: designing the behavior logic of the agent, performing specific operations at each time step, such as updating the charge and discharge state of a single battery or the EMS statistics of the charging amount.
[0062] (2) Use 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 the management agent step sequence and execution object, and a list of different agent types existing in the model; the second method information includes at least running the simulation of the model until a defined end condition; the second application scenario information includes at least managing the agent execution sequence.
[0063] Exemplary explanations are as follows, such as the Model class:
[0064] (2.1) Attributes, such as including the following:
[0065] schedule: Manage the agent step sequence and the execution object.
[0066] agents: An AgentSet containing all agents in the model.
[0067] agent_types: A list of different agent types existing in the model.
[0068] (2.2) Methods, such as including the following:
[0069] get_agents_of_type(agenttype:type[Agent]): Return an AgentSet of agents of the specified type.
[0070] run_model(): Run the simulation of the model until a defined end condition.
[0071] step(): Execute one step of the simulation process of the model.
[0072] next_id(): Generate and return the next unique identifier of the agent.
[0073] reset_randomizer(seed:int|None = None): Reset the random number generator of the model.
[0074] (2.3) Application scenarios, and have the following functions in the application scenarios:
[0075] Running state management: Control the start and stop of the simulation to ensure the orderly progress of the simulation process.
[0076] Agent scheduling: Manage the agent execution sequence to ensure the rationality of the behavior logic, for example: the execution sequence between agents such as BMS, PCS, and EMS.
[0077] Agent type management: Facilitate the management and acquisition of different types of agents, such as sensors, actuators, etc.
[0078] Simulation step management: Defines a single step operation of the model, applicable to state updates and behavior executions for each time step.
[0079] Randomness management: Controls random factors in the simulation to ensure result reproducibility or simulate a random environment.
[0080] Precise management of agents: The unique identifier and location attributes of agents make it simple to manage and track the states and behaviors of individual agents, applicable to the simulation of complex systems.
[0081] Flexible scheduling and execution: The scheduling and execution mechanism of the model allows for flexible definition and control of the order and logic of agent behaviors, ensuring the accuracy and rationality of the simulation process.
[0082] Support for multiple types of agents: The model can manage multiple types of agents simultaneously, applicable to the interaction of agents with different roles in complex systems, such as sensors, controllers, and pumps in an intelligent irrigation system.
[0083] Randomness control: The function of resetting the random number generator ensures that the simulation can be reproducible when needed, applicable to experiments and testing of different simulation conditions and scenarios.
[0084] 203. Create a discrete event pool, which contains pre-built discrete events. Offline events are events that occur at specific time points in the application scenario of the user-side energy storage facility.
[0085] In the embodiments of the present application, this step can be refined to include the following: (1)-(4);
[0086] (1) Use incremental time advancement to support discrete event scheduling using integer time units;
[0087] (2) Use floating-point time units to support discrete event simulation;
[0088] (3) According to the use of incremental time advancement and floating-point time units, adopt a scheduling function to encapsulate a discrete event;
[0089] (4) According to incremental time advancement and floating-point time units, store the multiple encapsulated discrete events in order in an event list to construct a discrete event pool.
[0090] As described above in (1)-(4), exemplary explanations include the following:
[0091] In the embodiments of the present application, the discrete event pool is constructed in the form of a Python class. Each method in the class is 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 occurs first), etc., not limited to the above parameters
[0093] (2) Obtain agents: According to the requirements of the discrete event combination, obtain the agents required for this combination through get_agents_of_type.
[0094] (3) Create discrete events. For example, in the Mesa framework, adopt the design of the discrete event module. For example, use the discrete event simulator of the Mesa framework to develop the simulation modeling system. Specifically, the following classes can be but are not limited to being used, and in order to implement the corresponding functions:
[0095] (1) ABMSimulator and DEVSimulator classes
[0096] ABMSimulator: Uses incremental time advancement and supports discrete event scheduling with integer time units. Suitable for agent-based models (ABMs) that require regular time steps.
[0097] DEVSimulator: Uses floating-point time units for more precise and complex discrete event simulations. Suitable for scenarios that require high-precision event times.
[0098] Application scenarios: ABMSimulator can be used for the design and application of agent-based simulation systems. DEVSimulator can handle more complex interactions, such as event-driven system state changes.
[0099] (2) Scheduling functions
[0100] schedule_event_next_tick: Schedule an event to the next time tick.
[0101] schedule_event_now: Schedule an event to the current time tick.
[0102] schedule_event_absolute: Schedule an event at a specific time.
[0103] schedule_event_relative: Schedule an event relative to the current time.
[0104] Application scenarios: These functions allow for precise control of the event occurrence time and are crucial for event scheduling and management in simulation modeling systems.
[0105] (3) SimulationEvent class
[0106] Encapsulate an event, which includes attributes such as time, function to be executed, priority, and unique identifier, and includes methods for executing and canceling events.
[0107] Application scenarios: Used to define specific operations at a specific time, such as starting charge and discharge as planned, simulating scenarios where the temperature of a certain battery pack exceeds the threshold, etc.
[0108] (4) Simulator class
[0109] Control the time advancement and event execution, including; managing the event list, scheduling, and simulation control (run_for, run_until).
[0110] Application scenarios: The core of managing the simulation process, ensuring that events are executed in the correct order and at the correct time. Supports running simulations for a specified duration, which is crucial for performance testing and scenario analysis.
[0111] (5) EventList class
[0112] Manage the event list to ensure that events are executed in order. Provide methods for adding, previewing, popping, and deleting events.
[0113] Application scenarios: Ensure efficient event management, which is crucial for large-scale simulations that need to process multiple events in a specific order, such as the BMS emergency response simulation when the voltage of a certain battery pack is too high.
[0114] 204. Utilize the agent model to simulate the actual operation scenario of the user-side energy storage facility by calling offline events, so as to build a simulation system for the user-side energy storage facility.
[0115] In the embodiment of the present application, in the user-side energy storage simulation modeling system, a data collection and analysis link is also added, as follows in 205 - 207.
[0116] 205. In the simulation system of the user-side energy storage facility, construct a data collector and a simulation log recording module.
[0117] 206. During the process of simulating the actual operation scenario of the user-side energy storage facility by calling offline events, collect the data information generated when the agent model simulates and manages the agent to achieve specific goals or tasks.
[0118] 207. Use the simulation log recording module to record the data information.
[0119] For the above 205-207, exemplarily, in the embodiments of the present application, the DataCollector class of the Mesa framework can be used to conveniently collect various types of data of the model and the agent, so as to perform further analysis and optimization. The following is an introduction to the tools used by the data collector module and the simulation log recording module, as well as the 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 scenario: It can collect the real time at each time step, the scheduler execution order log, etc.
[0123] (2) Agent-level data collection
[0124] agent_reporters: agent_reporters is a dictionary that maps data names to the attribute names or functions of the agent.
[0125] Application scenario: It can implement the monitoring of the state of a single agent, and can track the current real-time state and real-time behavior record of each component, such as the current real-time current of the PCS, the current battery temperature of the single cell battery, etc.
[0126] (3) Simulation log recording module
[0127] Log_list: It adopts the form of a native Python list. Whenever there is new log information, the log content is added. The format of the log is: the current event simulator time, the agent name, the unique ID of the agent, the device state of the agent, and the specific log content, a total of 5 elements. It can monitor and collect the logs of the system operation behavior in real time to ensure the repeatability of the simulation modeling and the verifiability of the results.
[0128] Error_list: It adopts the form of a native Python list. Whenever there is new warning information, the warning content is added. The format of the warning is: the current event simulator time, the agent name, the unique ID of the agent, the device state of the agent, and the specific warning content, a total of 5 elements. It can monitor and collect the warnings of the system operation behavior in real time to ensure the repeatability of the simulation modeling and the verifiability of the results.
[0129] Application scenario: Collect the historical operation log records to verify the rationality of the event occurrence and sequence.
[0130] As for the above Figure 1 and Figure 2For the implementation of the method described above, an embodiment of the present application provides a device for building a simulation system of a user-side energy storage facility, which is a virtual device serving as the execution subject of the foregoing method. The embodiments of this device correspond to the embodiments of the foregoing method. For the convenience of reading, the details in the foregoing method embodiments will not be elaborated one by one in the embodiments of this device. However, it should be clear that the device in this embodiment is applied to improve the digital operation level of the user-side energy storage facility, such as Figure 3 , the device includes:
[0131] A determination unit 31, configured to integrate the Mesa framework, determine the content information of multiple agents and the behavior information between the multiple agents. The behavior information includes the input-output behavior between the multiple agents and the interaction relationship realized according to the input-output behavior. The agent is an entity determined according to the physical architecture of the user-side energy storage facility;
[0132] A first creation unit 32, configured to create an agent model by using the content information and behavior information of the agent. The agent model is used to simulate and manage the multiple agents to perceive the environment, interact with other agents, and take actions to achieve specific goals or tasks;
[0133] A second creation unit 33, configured to create a discrete event pool, which contains pre-constructed discrete events. The offline event is an event that occurs at a specific time point in the application scenario of the user-side energy storage facility;
[0134] A construction unit 34, configured to use the agent model to simulate the actual operation scenario of the user-side energy storage facility by calling the offline event, so as to implement the construction of the simulation system of the user-side energy storage facility.
[0135] Furthermore, as Figure 4 shown, the device further includes:
[0136] A third creation unit 35, configured to construct a data collector and a simulation log recording module in the simulation system of the user-side energy storage facility;
[0137] A collection unit 36, configured to collect the data information generated when the agent model simulates and manages the agent to achieve specific goals or tasks during the process of simulating the actual operation scenario of the user-side energy storage facility by calling the offline event;
[0138] A recording unit 37, configured to record the data information by using the simulation log recording module.
[0139] Furthermore, as Figure 4 shown, the first creation unit 32 includes:
[0140] The first execution module 321 is configured to create first attribute information, first method information, and first application scenario information for the agent by combining the content information and behavior information of the agent and using the Agent class in the Mesa framework; the first attribute information includes at least the unique identifier of the agent; the first method information includes at least performing the operation of the current time step of the agent; the first application scenario information includes at least managing and tracking the state of the agent, dynamically managing the life cycle of the agent, the behavior logic of the agent, and specific operations performed at different time steps.
[0141] The second execution module 322 is configured to create second attribute information, second method information, and second application scenario information for the agent by using the Model class in the Mesa framework; the second attribute information includes at least managing the step sequence and execution object of the agent and a list of different agent types existing in the model; the second method information includes at least running the simulation of the model until a defined end condition; the second application scenario information includes at least managing the execution sequence of the agents.
[0142] Further, as Figure 4 shown, the second creation unit 33 includes:
[0143] The third execution module 331 is configured to use incremental time advancement to support discrete event scheduling using integer time units.
[0144] The fourth execution module 332 is configured to use floating-point time units to support discrete event simulation.
[0145] The encapsulation module 333 is configured to encapsulate a discrete event by using a scheduling function according to the use of the incremental time advancement and floating-point time units.
[0146] The construction module 334 is configured to store the multiple encapsulated discrete events in sequence in an event list according to the incremental time advancement and floating-point time units to construct a discrete event pool.
[0147] In summary, the embodiment of the present application provides a convergence device for a train safety envelope, which includes a processor and a memory. The above determination unit, first creation unit, second creation unit, and construction unit are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.
[0148] The processor contains a kernel, which retrieves the corresponding program units from the memory. One or more kernels can be set. By adjusting the kernel parameters, the discrete event simulation function of the Mesa framework is integrated into the simulation modeling system, so that the simulation system of the user-side energy storage facility built 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.
[0149] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for building the simulation system of the user-side energy storage facility as described above is implemented.
[0150] An embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the method for building the simulation system of the user-side energy storage facility as described above is implemented.
[0151] An embodiment of the present application further provides a computer program product, which is suitable for executing a program initialized with the steps of the method for building the simulation system of the user-side energy storage facility as described above when executed on a data processing device.
[0152] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0153] In a typical configuration, the device includes one or more processors (CPUs), a memory, and a bus. The device may also include an input / output interface, a network interface, etc.
[0154] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory includes at least one storage chip. The memory is an example of a computer-readable medium.
[0155] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0156] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0157] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0158] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for building a simulation system for a user-side energy storage facility, characterized in that: The method comprises: Integrate the Mesa framework to determine content information of multiple intelligent agents and behavior information between the multiple intelligent agents, wherein the behavior information includes input and output behaviors between the multiple intelligent agents and interactive relationships realized according to the input and output behaviors; the intelligent agent is an entity determined according to the physical architecture of the user-side energy storage facility; Using the content information and behavior information of the intelligent agent, an intelligent agent model is created, and 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; Creating a discrete event pool, wherein the discrete event pool contains pre-built discrete events, wherein the offline event is an event occurring at a specific time point in an application scenario of a user-side energy storage facility; The intelligent agent model is used to simulate the actual operation scenario of the user-side energy storage facility by calling the offline event, so as to realize the construction of a simulation system for the user-side energy storage facility.
2. The method according to claim 1, characterized in that The method further comprises: In the simulation system of the user-side energy storage facility, construct a data collector and a simulation log recording module; In the process of simulating the actual operation scenario of the user-side energy storage facility by calling the offline event, collecting data information generated by the intelligent agent model to simulate and manage the intelligent agent to achieve a specific goal or task; The simulation log recording module is utilized to record the data information.
3. The method according to claim 1, characterized in that The step of creating an agent model by using the agent's content information and behavior information includes: In combination with 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 at least includes a unique identifier of the agent; the first method information at least includes executing the current time step operation of the agent; the first application scenario information at least includes managing and tracking the state of the agent, dynamically managing the life cycle of the agent, the behavior logic of the agent, and specific operations performed at different time steps; Using the Model class in the Mesa framework, second attribute information, second method information and second application scenario information are created for the agent; the second attribute information at least includes managing the step sequence and execution objects of the agent, and a list of different agent types existing in the model; the second method information at least includes running the simulation of the model until the defined end condition; the second application scenario information at least includes managing the execution sequence of the agent.
4. The method according to any one of claims 1 to 3, characterized in that The step of creating a discrete event pool comprises: Use incremental time advancement to support discrete event scheduling using integer time units; Use floating-point time units to support discrete event simulation; According to the use of the incremental time advancement and floating point time unit, a scheduling function is used to encapsulate a discrete event; According to the incremental time advancement and the floating point time unit, the encapsulated multiple discrete events are stored in order into an event list to construct a discrete event pool.
5. A simulation system construction device for user-side energy storage facilities, characterized in that: The device comprises: A determination unit, used to integrate the Mesa framework, determine content information of multiple intelligent agents, behavior information between the multiple intelligent agents, the behavior information includes input and output behaviors between the multiple intelligent agents, and interactive relationships realized according to the input and output behaviors; the intelligent agent is an entity determined according to the physical architecture of the user-side energy storage facility; A first creation unit is used to create an agent model using the content information and behavior information of the agent, wherein 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; A second creation unit is used to create a discrete event pool, wherein the discrete event pool contains pre-built discrete events, and the offline event is an event that occurs at a specific time point in an application scenario of the user-side energy storage facility; A building unit 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 event, so as to realize the construction of a simulation system of the user-side energy storage facility.
6. The device according to claim 5, characterized in that The device also includes: A third creation unit is used to construct a data collector and a simulation log recording module in the simulation system of the user-side energy storage facility; A collecting unit, configured to collect data information generated by the agent model simulating the management of the agent to achieve a specific goal or task in the process of simulating the actual operation scenario of the user-side energy storage facility by calling the offline event; A recording unit is used to record the data information using the simulation log recording module.
7. The device according to claim 5, characterized in that The first creation unit includes: A first execution module is used to combine the content information and behavior information of the agent, and use 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 at least includes a unique identifier of the agent; the first method information at least includes executing the current time step operation of the agent; the first application scenario information at least includes managing and tracking the state of the agent, dynamically managing the life cycle of the agent, the behavior logic of the agent, and specific operations executed at different time steps; The second execution module is used to use 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 at least includes managing the step sequence and execution objects of the agent, and a list of different agent types existing in the model; the second method information at least includes running the simulation of the model until the defined end condition; the second application scenario information at least includes managing the execution sequence of the agent.
8. The device according to any one of claims 5 to 7, characterized in that The second creation unit includes: a third execution module for advancing using incremental time to support discrete event scheduling using integer time units; a fourth execution module for using floating point time units to support discrete event simulation; A packaging module, used to package a discrete event using a scheduling function according to the incremental time advancement and floating point time unit; A construction module is used to store the encapsulated multiple discrete events in order into an event list according to the incremental time advancement and the floating point time unit to construct a discrete event pool.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for building a simulation system for a user-side energy storage facility as described in any one of claims 1 to 4 is implemented.
10. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for establishing a simulation system for a user-side energy storage facility as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Multi-type energy network collaborative planning configuration method for embedded operation optimization
CN115730798A
Crude oil industry chain operation simulation method and device
CN118133481A
Metareinforcement learning multi-agent system for complex environment
CN119150498A