Aggregator-electric heating master-slave game optimization method based on electric energy and flexibility

By constructing a master-slave game model for aggregators and electric heating that jointly optimizes electrical energy and flexibility, the problem of insufficient improvement of the interests of users and aggregators in electric heating systems is solved, thereby improving the grid's flexible supply capacity and reducing electricity costs.

CN122155773APending Publication Date: 2026-06-05JILIN POWER SUPPLY COMPANY STATE GRID JILIN ELECTRIC POWER +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JILIN POWER SUPPLY COMPANY STATE GRID JILIN ELECTRIC POWER
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively utilize the flexible supply potential of electric heating systems, resulting in insufficient improvement of benefits for users and aggregators. Furthermore, the impact of electric heating has not been considered in the power balance model, hindering the optimization of electricity costs and the consumption of new energy sources.

Method used

An optimization method based on aggregator-electric heating master-slave game theory, which combines energy and flexibility, is adopted. By constructing a two-level optimization model and combining the Caro-Kuhn-Tucker condition and linear relaxation technique, the power consumption and flexibility supply strategies of electric heating users are optimized, thereby achieving joint optimization of energy and flexibility.

Benefits of technology

This improved the power grid's flexible supply capacity, increased the profits of distributed resource aggregators, and reduced the overall electricity costs for electric heating users, achieving a win-win situation for both aggregators and users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155773A_ABST
    Figure CN122155773A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power distribution network flexibility optimization, and particularly relates to an aggregator-electric heating master-slave game optimization method based on electric energy and flexibility, comprising: constructing an electric energy and flexibility joint optimization distributed resource aggregator-electric heating user master-slave game architecture; based on the master-slave game architecture, establishing an electric energy and flexibility joint optimization distributed resource aggregator-electric heating user double-layer optimization model, the upper layer being a distributed resource aggregator pricing model, and the lower layer being an electric heating user electricity consumption and flexibility control optimization model; applying KKT conditions and linearization technology to convert it into a single-layer mixed integer linear programming model for solving; based on the equivalent mixed integer linear programming model, jointly optimizing the pricing and control strategies of electric energy and flexibility, increasing the power grid flexibility supply capacity, improving the distributed resource aggregator profit, and reducing the comprehensive electricity consumption cost of electric heating users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution network flexibility optimization technology, and in particular to an aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility. Background Technology

[0002] Driven by the "dual-carbon" strategy, clean heating technologies are being rapidly promoted and applied in northern China. Taking Jilin Province as an example, by the end of 2025, the number of households applying for electric heating had exceeded 230,700, with a total capacity of 5,649,200 kVA. Against this backdrop, how to optimize the power consumption strategy of electric heating systems and efficiently utilize their flexible adjustment potential, while reducing electricity costs and promoting the consumption of new energy sources, has become a hot research topic. To reduce equipment electricity costs, thermal storage electric heating systems often operate the heat pump at full capacity during periods of low electricity prices to complete electrothermal conversion and heat storage. During peak electricity prices, the accumulated heat energy is released through radiation and convection to ensure continuous heating at a lower cost. Considering the operational characteristics of thermal storage electric heating, users can optimize their power consumption strategy by utilizing the hot water storage tank and considering the building's thermal inertia to reduce operating costs. With the development of the electricity spot market and the continuous emergence of distributed resource aggregators, balancing the interests of distributed resource aggregators and users has become an urgent issue to be addressed. Master-slave game theory, as an effective tool for studying the complex economic behavior of different stakeholders, is widely used in the game between aggregators and users. Most existing literature uses master-slave game models to simulate the interaction between aggregators and users from the perspective of energy balance, achieving a win-win situation for both at the game equilibrium point. However, it does not consider the impact of electric heating's participation in flexible supply on the game equilibrium point, hindering the utilization of users' flexible adjustment potential and the further enhancement of the interests of all parties in the multi-stakeholder game. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of existing technologies and propose an aggregator-electric heating master-slave game optimization method based on electric energy and flexibility. This method is used to determine the pricing strategy of aggregators for electric energy and flexibility towards electric heating users and the purchase and sale strategy of electric energy and flexibility towards distribution network operators, and to optimize the control strategy for the supply of electricity and flexibility to users of thermal storage electric heating.

[0004] To achieve the above objectives, the present invention adopts the following specific technical solution: The present invention provides an aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility, comprising the following steps: Step 1: Based on the distributed resource aggregator-electric heating user master-slave game architecture of joint optimization of electric energy and flexibility, establish a two-layer optimization model of distributed resource aggregator-electric heating user master-slave game based on joint optimization of electric energy and flexibility; the upper layer of the two-layer optimization model is the pricing model of distributed resource aggregator, and the lower layer is the electric heating user electricity consumption and flexibility control optimization model. The Distributed Resource Aggregator Pricing Model is the leader in setting electricity and flexibility trading prices for electric heating users and electricity and flexibility trading strategies for distribution network operators; the Electric Heating User Electricity Consumption and Flexibility Control Optimization Model is the follower, responding to the electricity and flexibility price signals set by the Distributed Resource Aggregator, optimizing the electricity consumption strategy and flexibility supply strategy for electric heating, and sending the corresponding electricity purchase and flexibility sales strategy to the Distributed Resource Aggregator. Step 2: Apply the Caro-Kun-Tucker conditions to transform the bi-level optimization model into a single-level equilibrium-constrained mathematical programming model. Use linear relaxation techniques and strong duality theorems to equivalently transform the constraints and nonlinear terms in the objective function to obtain a single-level mixed-integer linear programming model. Step 3: Solve the mixed-integer linear programming model to obtain the optimal electricity and flexibility pricing and control strategies for aggregators and electric heating users. These strategies are used to increase the grid's flexibility supply capacity, improve the profits of distributed resource aggregators, and reduce the overall electricity costs for electric heating users.

[0005] Furthermore, in step one, the distributed resource aggregator pricing model aims to maximize the distributed resource aggregator's profits. It includes revenue from selling electricity to electric heating users and distribution network operators, revenue from selling upward and downward flexibility to distribution network operators, costs of purchasing electricity from distribution network operators, and costs of purchasing upward and downward flexibility from electric heating users. The specific details are as follows:

[0006] In the formula, Number of time periods; The time interval step; , and They are respectively The price at which time-of-use distributed resource aggregators sell electrical energy, uplink flexibility, and downlink flexibility to distribution network operators; for The price at which time-of-use distributed resource aggregators purchase electricity from distribution network operators; for The price at which time-distributed resource aggregators sell electricity to electric heating users; and They are respectively The price at which time-distributed resource aggregators purchase upward and downward flexibility from electric heating users; and They are respectively Distributed resource aggregators purchase and sell electricity from distribution network operators during specific time periods; and They are respectively Upward and downward flexibility power sold by time-distributed resource aggregators to distribution network operators; For electric heating users Power consumption during a given time period; and They are respectively The up and down flexibility power purchased by the time-distributed resource aggregator from electric heating users.

[0007] Furthermore, the pricing model for distributed resource aggregators also includes pricing constraints, energy storage device operation constraints, and power balance constraints; The pricing constraints are as follows: ; ; ; ; ; ; In the formula, and They are respectively The upper and lower limits of the pricing for electricity sold by time-distributed resource aggregators to electric heating users; and They are respectively The upper and lower limits of the flexible pricing for time-based distributed resource aggregators to purchase from electric heating users; and They are respectively The upper and lower limits of downward flexibility pricing for time-based distributed resource aggregators when purchasing from electric heating users; , and These are the daily average prices for electricity, upward flexibility, and downward flexibility transactions between distribution network operators and distributed resource aggregators, respectively. The operating constraints of energy storage devices are as follows: ; ; ; ; ; ; In the formula, For energy storage devices The amount of electricity stored during a given period; and For energy storage devices Charging and discharging power during the same period; The loss rate of the stored energy in energy storage devices; and These refer to the charging efficiency and discharging efficiency of energy storage devices, respectively. and These are the minimum and maximum energy storage capacities of the energy storage device, respectively. and These are the maximum charging power and discharging power of the energy storage device, respectively. and These represent the charging and discharging states of the energy storage device, respectively, and are 0-1 variables; The initial energy storage capacity of the energy storage device; ; ; In the formula, and For energy storage devices The upward and downward flexibility offered by time periods; The power balance constraints are as follows: ; ; ; ; ; In the formula, for Solar power output during different time periods; for Forecasted photovoltaic output for the specified time period; for Wind power output during a given time period; for Forecast values ​​of wind power output for the specified time period.

[0008] Furthermore, the optimization model for electricity consumption and flexibility control for electric heating users uses the electricity and flexibility prices set by the distributed resource aggregator as boundary conditions. It combines the building's thermal inertia with the goal of minimizing overall electricity costs to optimize its own electricity consumption strategy and flexibility supply strategy, as detailed below: ; ; ; ; In the formula, , and They are respectively The power consumption of a single thermal storage electric heating unit during a given time period, as well as the power provided for upward and downward flexibility. This refers to the number of thermal storage electric heating devices.

[0009] Furthermore, the optimization model for electricity consumption and flexibility control of electric heating users also includes constraints on the operation of thermal storage electric heating, room temperature constraints, and building thermal inertia constraints. The operational constraints for thermal storage electric heating are as follows: ; , ; , ; ; ; ; ; ; In the formula, For hot water storage tanks in Heat storage during a certain period; The heat loss rate of the hot water storage tank; The heat loss rate of the connecting pipes between the air source heat pump and the hot water storage tank; The heat pump efficiency ratio; Heat dissipation capacity of the hot water storage tank; and These represent the maximum upward and downward flexibility that a single electric heating unit can provide, respectively. This is the maximum power consumption of the air source heat pump; and These are the upper and lower limits of the power ramp-up rate for air source heat pumps, respectively. This represents the maximum heat dissipation capacity of the hot water storage tank. and These are the upper and lower limits of the heat storage capacity of the hot water storage tank, respectively. The amount of heat stored in the hot water tank in its initial state; The room temperature constraints are as follows: ; In the formula, for Room temperature during the period; and These are the upper and lower limits of room temperature calculated based on human comfort. The thermal inertia constraints of the building are as follows:

[0010] In the formula, Indoor air density; Indoor air volume; The specific heat capacity of indoor air; For the heat dissipation efficiency of the radiator; The refractive index of the window; This refers to the area of ​​the exterior windows of the building. The intensity of sunlight in the house; This refers to the number of air exchanges; The area of ​​the house; The interior height of the house; This is the temperature difference correction factor for the building envelope; The heat transfer coefficient of the building envelope; The area of ​​the enclosure structure; Outdoor temperature; The heat output of indoor heat sources other than thermal storage electric heating.

[0011] Furthermore, in step two, the KKT conditions are applied to transform the two-layer optimization model into a single-layer equilibrium-constrained mathematical programming model, as follows: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; In the formula: For the dual variables of the thermal balance constraint of the hot water storage tank; and Dual variables that provide upward flexibility constraints for a single electric heating unit; and Dual variables that provide downward flexibility constraints for a single electric heating unit; and These are the dual variables of the upper and lower limits of the power consumption constraints for air source heat pumps, respectively. and These are the dual variables of the upper and lower limits of the power ramp-up constraint for air source heat pumps; and These are the dual variables of the upper and lower limit constraints on the heat dissipation power of the hot water storage tank, respectively. and These are the dual variables of the upper and lower limits of the heat storage capacity of the hot water storage tank, respectively; The dual variable for the consistency constraint of heat storage capacity of the hot water storage tank at the beginning and end of the period; and These are the dual variables of the upper and lower limits of room temperature constraints, respectively; is the dual variable for the building's thermal inertia constraint; the ⊥ symbol indicates that at most one of the non-negative variables is greater than 0.

[0012] Furthermore, in step two, by employing linear relaxation techniques and the strong duality theorem to equivalently transform the constraints and nonlinear terms in the objective function, a single-layer mixed-integer linear programming model is obtained as follows: To achieve efficient solutions to single-level equilibrium-constrained mathematical programming models, Boolean variables are introduced. , , , , , , , , , , , , , Furthermore, the Big-M method is used to transform the nonlinear complementary relaxation constraints into an equivalent linear form, as follows: ; ; ; ;

[0013] In the formula, M is a positive number;

[0014] ; Therefore, the distributed resource aggregator-thermal storage electric heating user master-slave game two-level optimization model can be transformed into an equivalent mixed-integer linear programming model, with the objective function being:

[0015] Solving the mixed-integer linear programming model yields the equilibrium solution of a distributed resource aggregator-thermal storage electric heating user master-slave game model that jointly optimizes electrical energy and flexibility.

[0016] The present invention can achieve the following technical effects: The participation of electric heating users in flexible supply will change their electricity consumption strategies, and at the same time affect the electricity pricing strategies of distributed resource aggregators and their electricity and flexibility trading strategies with distribution network operators, thus enabling distributed resource aggregators to obtain more profits. Electric heating users’ electricity consumption strategies and flexible supply strategies are closely coupled through comprehensive electricity costs. When the additional benefits of flexibility resulting from changes in electricity consumption strategies exceed the increase in electricity purchase costs, the electricity consumption strategies will change. The distributed resource aggregator-electric heating user master-slave game strategy, which optimizes both energy and flexibility, can increase the profits of the distributed resource aggregator and reduce the overall electricity costs of the electric heating user, thus maximizing the interests of both parties in the game. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of a master-slave game architecture between a distributed resource aggregator and an electric heating user, provided according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a thermal storage electric heating system according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the solution process of the aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to an embodiment of the present invention. Figure 4 These are the parameters of the electric energy storage device, the electric heating device, and the house held by DERA, as provided in the embodiments of the present invention. Figure 5This is a price chart of electricity and flexibility transactions between distributed resource aggregators and distribution network operators, provided according to an embodiment of the present invention. Figure 6 This is an outdoor temperature map provided according to an embodiment of the present invention; Figure 7 This is a wind power and photovoltaic output prediction curve provided according to an embodiment of the present invention; Figure 8 This is a diagram showing the results of the electricity pricing strategy of the distributed resource aggregator in Scheme 1 according to an embodiment of the present invention; Figure 9 This is a diagram showing the results of the electricity pricing strategy of the distributed resource aggregator in Scheme 2 according to an embodiment of the present invention; Figure 10 This is a diagram showing the results of the upward flexibility pricing strategy of the distributed resource aggregator in Scheme 2, as provided in an embodiment of the present invention. Figure 11 This is a diagram showing the results of the downward flexibility pricing strategy of the distributed resource aggregator in Scheme 2, as provided in an embodiment of the present invention. Figure 12 This is a diagram showing the power purchase and sale strategy results between distributed resource aggregators and distribution network operators under two schemes provided in the embodiments of the present invention; Figure 13 This is a diagram showing the results of flexible transaction strategies between distributed resource aggregators and distribution network operators under two schemes provided in the embodiments of the present invention; Figure 14 This is a graph showing the supply potential and actual supply of electric heating under two schemes provided in the embodiments of the present invention; Figure 15 This is a graph showing the combined electricity cost of electric heating under two different schemes provided in the embodiments of the present invention; Figure 16 This is a diagram showing the profit results of distributed resource aggregators under two schemes provided in the embodiments of the present invention. Detailed Implementation

[0018] In the following description, embodiments of the invention will be described with reference to the accompanying drawings. In the description below, the same modules are denoted by the same reference numerals. Where the same reference numerals are used, their names and functions are also the same. Therefore, their detailed description will not be repeated.

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.

[0020] This invention provides an optimization method for aggregator-electric heating master-slave game based on electrical energy and flexibility, comprising the following steps: S1: Construct a master-slave game architecture for Distributed Resource Aggregator (DERA)-Electric Heating User that jointly optimizes energy and flexibility; establish a two-layer optimization model for Distributed Resource Aggregator-Electric Heating User based on the master-slave game architecture that jointly optimizes energy and flexibility. The upper layer consists of a distributed resource aggregator pricing model, while the lower layer consists of an electric heating user electricity consumption and flexibility control optimization model.

[0021] S2: Apply the Caro-Kuhn-Tucker conditions (KKT conditions) to transform the bi-level optimization model of joint optimization of electrical energy and flexibility into a single-level equilibrium constraint mathematical programming model; then, use linear relaxation techniques and strong duality theorems to equivalently transform the nonlinear terms in the constraints and objective function, and finally transform the bi-level optimization model of joint optimization of electrical energy and flexibility into a single-level mixed integer linear programming model for solution. The above solution avoids the convergence problem that may occur when iterating between upper and lower level problems.

[0022] S3: Solve the equivalent mixed integer linear programming model to obtain the optimal energy and flexibility pricing and control strategies for aggregators and electric heating users.

[0023] In the distributed resource aggregator-electric heating master-slave game model, joint optimization of electrical energy and flexibility can not only increase the grid's flexible supply capacity, but also improve the profits of distributed resource aggregators and reduce the overall electricity costs for electric heating users.

[0024] The solution will be further described below with specific calculation formulas and examples.

[0025] S11. Aggregator-Electric Heating User Master-Slave Game Architecture for Joint Optimization of Electrical Energy and Flexibility: With the increasing prevalence of distributed resources, Distributed Resource Aggregators (DERAs) and electric heating users have become distinct stakeholders. To balance their interests, this invention employs a master-slave game theory architecture to describe the game relationship between DRAs and electric heating users. A two-layer master-slave game model for DRA-electric heating users, jointly optimizing energy consumption and flexibility, is constructed. The game theory architecture is as follows: Figure 1 As shown.

[0026] In the upper-level model, the Distributed Resource Aggregator (DERA), acting as the link between electric heating users and Distribution Grid Operators (DSOs), holds a leading position in the master-slave game between DERA and electric heating users. It primarily optimizes the operation of its distributed power sources and energy storage devices, formulates energy and flexibility pricing strategies for electric heating users, and develops energy and flexibility trading strategies for DSOs, based on the energy and flexibility trading prices published by the DSOs and the electricity consumption and flexibility sales strategies reported by electric heating users, with the goal of maximizing its own profits. In the lower-level model, electric heating users, as followers, respond to the energy and flexibility price signals set by DERAs, optimize their electricity consumption and flexibility supply strategies, and feed back their corresponding electricity purchase and flexibility sales strategies to the upper level so that DERA can further optimize its energy and flexibility pricing strategies. Through this iterative game structure, the equilibrium point is reached when neither DERA nor electric heating users can improve their profits by changing their respective strategies.

[0027] S12. Construct a distributed resource aggregator-electric heating user master-slave game model that jointly optimizes electrical energy and flexibility, including: (1) The upper layer is a distributed resource aggregator pricing model: a) Objective function The upper-level model aims to maximize the profits of the Distributed Resource Aggregator (DERA), and includes revenue from selling electricity to electric heating users and distribution network operators (DSOs), revenue from selling uplink and downlink flexibility to DSOs, fees for purchasing electricity from DSOs, and fees for purchasing uplink and downlink flexibility from electric heating users, as described in detail below:

[0028] In the formula, Number of time periods; The time interval step; , and They are respectively The price at which time-of-use distributed resource aggregators sell electrical energy, uplink flexibility, and downlink flexibility to distribution network operators; for The price at which time-of-use distributed resource aggregators purchase electricity from distribution network operators; for The price at which time-distributed resource aggregators sell electricity to electric heating users; and They are respectively The price at which time-distributed resource aggregators purchase upward and downward flexibility from electric heating users; and They are respectively Distributed resource aggregators purchase and sell electricity from distribution network operators during specific time periods; and They are respectively Upward and downward flexibility power sold by time-distributed resource aggregators to distribution network operators; For electric heating users Power consumption during a given time period; and They are respectively The up and down flexibility power purchased by the time-distributed resource aggregator from electric heating users.

[0029] b) Constraints b1) Pricing constraints To protect the interests of lower-level followers, the electricity sales price and flexibility purchase price set by distributed resource aggregators for electric heating users should meet the following constraints:

[0030] In the formula, and They are respectively The upper and lower limits of the pricing for electricity sold by time-distributed resource aggregators to electric heating users; and They are respectively The upper and lower limits of the flexible pricing for time-based distributed resource aggregators to purchase from electric heating users; and They are respectively The upper and lower limits of downward flexibility pricing for time-based distributed resource aggregators when purchasing from electric heating users; , and These represent the daily average prices for electricity, upward flexibility, and downward flexibility transactions between distribution network operators and distributed resource aggregators. Equations (2) to (4) are the upper and lower limits for the pricing of electricity, upward flexibility, and downward flexibility by distributed resource aggregators, respectively. Equations (5) to (7) are average price constraints, which limit the average price at which distributed resource aggregators sell electricity to electric heating users within the research period to no higher than the daily average electricity price at which distribution network operators sell electricity, and the average price at which they purchase upward and downward flexibility from electric heating users to no lower than the daily average price at which distribution network operators purchase flexibility, in order to protect the interests of lower-level followers.

[0031] b2) The operating constraints of energy storage devices are as follows: For energy storage devices held by distributed resource aggregators, profits can be made by taking advantage of the price differences of electricity over time, storing electricity during off-peak hours and discharging it during peak hours. The operational constraints that should be met are as follows: (8)

[0032] In the formula, For energy storage devices The amount of electricity stored during a given period; and For energy storage devices Charging and discharging power during the same period; The loss rate of the stored energy in energy storage devices; and These refer to the charging efficiency and discharging efficiency of energy storage devices, respectively. and These are the minimum and maximum energy storage capacities of the energy storage device, respectively. and These are the maximum charging power and discharging power of the energy storage device, respectively. and These represent the charging and discharging states of the energy storage device, respectively, and are 0-1 variables; The initial energy storage capacity of the energy storage device is given by equation (8). Equation (9) represents the energy balance constraint of the energy storage device; Equation (10) represents the charging power constraint of the energy storage device; Equation (11) represents the discharging power constraint of the energy storage device; Equation (12) represents the charging and discharging state constraint of the energy storage device; Equation (13) indicates that the energy storage capacity of the energy storage device should be restored to the initial state at the end of the scheduling cycle in order to facilitate the next round of scheduling.

[0033] Besides profiting from price differences in electricity over time, energy storage devices can also generate additional profits by providing flexibility to distribution network operators through their excellent regulation capabilities. The operational constraints that must be met are as follows:

[0034] In the formula, and For energy storage devices The upward and downward flexibility provided by the time period. Equation (14) indicates that when the energy storage device is in a charging state, it can provide up to [amount missing] by reducing the charging power. Upward flexibility; when the system is in a non-charging state, upward flexibility can be provided by increasing the discharge power, but its value is constrained by the maximum discharge power and the remaining energy. Equation (15) indicates that when the energy storage device is in a discharging state, upward flexibility can be provided by reducing the discharge power to not more than Downward flexibility; when the system is in a non-discharged state, downward flexibility can be provided by increasing the charging power, the value of which is constrained by both the maximum charging power and the remaining storage capacity.

[0035] b3) Power balance constraints are as follows:

[0036] In the formula, for Solar power output during different time periods; for Forecasted photovoltaic output for the specified time period; for Wind power output during a given time period; for The predicted wind power output for the time period. Equation (16) represents the active power balance constraint; Equation (17) represents the upward flexibility balance constraint; Equation (18) represents the downward flexibility balance constraint; Equation (19) represents the photovoltaic power output constraint; Equation (20) represents the wind power output constraint.

[0037] (2) The lower layer is the optimization model for electricity consumption and flexibility control of electric heating users: a) Objective function In the lower-level model, electric heating users use the electricity and flexibility prices set by the upper-level distributed resource aggregator as boundary conditions, and, considering the thermal inertia of the building, optimize their electricity consumption and flexibility supply strategies with the goal of minimizing overall electricity costs. Based on the above, the objective function of the lower-level model can be described as: ; (twenty one) in,

[0038] In the formula, , and They are respectively The power consumption of a single thermal storage electric heating unit during a given time period, as well as the power provided for upward and downward flexibility. The number of thermal storage electric heating devices is [number], and the operating parameters of all thermal storage electric heating devices are the same.

[0039] b) Constraints b1) Operational constraints of thermal storage electric heating systems like Figure 2 As shown, a thermal storage electric heating system consists of an air source heat pump, a hot water storage tank, radiators, and connecting pipes. The air source heat pump is the heating device, responsible for converting electrical power into heating power to produce high-quality heat energy; the hot water storage tank optimizes its heat storage and dissipation plan based on electricity prices and the building's heat load requirements to maintain a comfortable indoor temperature at the lowest cost.

[0040] Operational constraints of thermal storage electric heating systems;

[0041] In the formula, For hot water storage tanks in Heat storage during a certain period; The heat loss rate of the hot water storage tank; The heat loss rate of the connecting pipes between the air source heat pump and the hot water storage tank; The heat pump efficiency ratio; Heat dissipation capacity of the hot water storage tank; and These represent the maximum upward and downward flexibility that a single electric heating unit can provide, respectively. This is the maximum power consumption of the air source heat pump; and These are the upper and lower limits of the power ramp-up rate for air source heat pumps, respectively. This represents the maximum heat dissipation capacity of the hot water storage tank. and These are the upper and lower limits of the heat storage capacity of the hot water storage tank, respectively. The initial heat storage capacity of the hot water storage tank. Equation (25) represents the heat balance constraint of the hot water storage tank; Equations (26) and (27) represent the upward and downward flexibility constraints provided by a single electric heating device, respectively; Equation (28) represents the upper and lower limits of the power consumption of the air source heat pump; Equation (29) represents the power ramping constraint of the air source heat pump; Equation (30) represents the heat dissipation power constraint of the hot water storage tank; Equation (31) represents the heat storage capacity constraint of the hot water storage tank; Equation (32) indicates that the heat storage capacity of the hot water storage tank should be restored to the initial heat storage capacity at the end of the scheduling cycle in order to facilitate the next round of control.

[0042] b2) Room temperature constraint ; (33) In the formula, for Room temperature during the period; and These are the upper and lower limits of room temperature calculated based on human comfort.

[0043] b3) Thermal inertia constraint of the building The building envelope has a heat storage function. Taking into account heat dissipation due to indoor and outdoor temperature differences, heat generated by internal equipment and people, heat dissipation due to air infiltration, and the impact of electric heating on indoor temperature, the thermal inertia equation for building temperature can be expressed as:

[0044] In the formula, Indoor air density; Indoor air volume; The specific heat capacity of indoor air; For the heat dissipation efficiency of the radiator; The refractive index of the window; This refers to the area of ​​the exterior windows of the building. The intensity of sunlight in the house; This refers to the number of air exchanges; The area of ​​the house; The interior height of the house; This is the temperature difference correction factor for the building envelope; The heat transfer coefficient of the building envelope; The area of ​​the enclosure structure; Outdoor temperature; The heat output of indoor heat sources other than thermal storage electric heating.

[0045] S21. Transformation and solution of master-slave game model.

[0046] like Figure 3 As shown, for the constructed distributed resource aggregator-thermal storage electric heating user master-slave game two-level optimization model, in order to accelerate the acquisition of the game equilibrium solution and avoid the convergence problem that may occur when the upper and lower level problems are solved alternately and iteratively, the KKT conditions are first applied to transform the two-level optimization problem into a single-level equilibrium constraint mathematical programming model. Then, for the problem that the constraints and objective function of the equilibrium constraint mathematical programming model have nonlinear terms, linear relaxation techniques and strong duality theorems are used to transform it into an equivalent mixed integer linear programming model to achieve rapid solution of the model.

[0047] (1) Transformation of the master-slave game bi-level optimization problem based on KKT conditions Based on the principle of optimality, the optimization model for lower-level electric heating users can be equivalently replaced by the KKT conditions shown in equations (22) to (54), and then the objective function and constraint conditions of the upper-level problem shown in equations (1) to (20) can be added to form a single-level equilibrium constraint mathematical programming model that is equivalent to the proposed master-slave game two-level optimization model.

[0048] (35) (36) ; (37) ; (38) ; (39) ; (40) ; (41)

[0049] In the formula: For the dual variable of the thermal balance constraint of the hot water storage tank in equation (25); and Provides the dual variable for upward flexibility constraint of a single electric heating device in equation (26); and Provide the dual variable for downward flexibility constraint of a single electric heating device in equation (27); and These are the dual variables of the upper and lower limits of the power consumption constraints of the air source heat pump in equation (28); and These are the dual variables of the upper and lower limits of the power ramping constraint for air source heat pumps in equation (29); and These are the dual variables of the upper and lower limit constraints on the heat dissipation power of the hot water storage tank in equation (30); and These are the dual variables of the upper and lower limits of the heat storage capacity of the hot water tank in equation (31); For the dual variable of the consistency constraint of heat storage capacity of the hot water tank at the beginning and end of the period in equation (32); and These are the dual variables of the upper and lower limits of room temperature constraints in equation (33); Equation (34) represents the dual variable of the building's thermal inertia constraint; Equations (41)-(54) represent complementary relaxation constraints, where... Represents nonnegative variables and At most one of them is greater than 0.

[0050] (2) Linearization of complementary relaxation constraints To achieve efficient solutions to single-level equilibrium-constrained mathematical programming models, Boolean variables are introduced. , , , , , , , , , , , , , Furthermore, the Big-M method is used to transform the nonlinear complementary relaxation constraints shown in equations (41) to (54) into an equivalent linear form, as follows:

[0051]

[0052] In the formula, M is a large positive number.

[0053] (3) Linearization of the objective function Since the nonlinear term in the objective function (1) has the same expression as the objective function (21) of the lower-level problem, it can be linearized based on the strong duality theorem of the lower-level problem, as follows:

[0054] Therefore, the distributed resource aggregator-thermal storage electric heating user master-slave game two-layer optimization model can be transformed into the following mixed integer linear programming problem.

[0055] The objective function is:

[0056] The constraints are: Equation (2)-Equation (20), Equation (22)-Equation (40), Equation (55)-Equation (82).

[0057] The above model can be solved by calling the commercial solver CPLEX to obtain the equilibrium solution of the DERA-thermal storage electric heating user master-slave game model with joint optimization of electrical energy and flexibility.

[0058] In summary, this invention proposes a master-slave game model for the joint optimization of energy consumption and flexibility between aggregators and electric heating users through the above steps. The upper layer aims to maximize the profit of the Distributed Resource Aggregator (DERA) and constructs a DERA pricing model based on the electricity consumption strategies and flexibility sales strategies reported by electric heating users. The lower layer aims to minimize the overall electricity cost for electric heating users and constructs an electric heating user optimization model in response to the energy consumption and flexibility price signals set by the DERA. Addressing the difficulty of directly solving the nested two-layer model, the invention applies KKT conditions to transform the two-layer model into a single-layer equilibrium-constrained mathematical programming model. Furthermore, linear relaxation techniques and strong duality theorems are used to transform the equilibrium-constrained mathematical programming model into an equivalent mixed-integer linear programming model, jointly optimizing energy consumption and flexibility, thus achieving a win-win situation for both the DERA and the electric heating users.

[0059] The feasibility of the solutions in the above embodiments is verified below with specific examples.

[0060] This example uses simulation parameters and environmental parameters of a suburban power grid-based thermal storage electric heating system in Northeast China to construct a case study. The case study includes 1000 buildings, each equipped with one thermal storage electric heating unit for independent heating. The allowable room temperature fluctuation range is set to [20.6℃, 24.8℃]. The parameters of the energy storage equipment, electric heating equipment, and buildings held by DERA are as follows: Figure 4 As shown. The electricity price and flexibility price for transactions between DERA and DSO are shown in [reference needed]. Figure 5 Typical daily outdoor temperature curves in winter are shown below. Figure 6The power output forecast curves for wind and solar power are shown below. Figure 7 The study period was 24 hours, and the minimum time interval for adjusting the electric heating control strategy was set to 15 minutes.

[0061] To illustrate the effectiveness of the proposed DERA-thermal storage electric heating user master-slave game strategy that combines energy and flexibility optimization, the following two schemes are analyzed based on whether the electric heating user participates in the grid flexibility supply.

[0062] Option 1: Thermal storage electric heating does not offer flexibility, but only optimizes the power consumption strategy; Option 2: The method of the present invention involves thermal storage electric heating users participating in flexible supply and jointly optimizing their electricity consumption strategy and flexible supply strategy.

[0063] Results analysis: 1) DERA's pricing strategy for electricity and flexibility Figure 8 , Figure 9 The DERA electricity pricing strategies under two different schemes are presented.

[0064] analyze Figure 8 , Figure 9 It can be seen that, regardless of whether electric heating users participate in flexible supply, in order to maximize profits, DERA's electricity pricing under both schemes is often at the upper limit when the thermal storage electric heating system operates during periods of relatively high power consumption, such as 0:00-7:45, 12:00-16:00, 18:45-19:45, 20:15-20:45, 21:00-23:45 in Scheme 1, and 0:00-8:00, 12:00-16:15, 19:15-19:30, 20:00-24:00 in Scheme 2. Conversely, when the thermal storage electric heating system operates during periods of relatively low power consumption, in order to meet the average price... Under the constraints, the DERA electricity pricing is usually adjusted to the lower limit of the price under both schemes, such as 7:45-12:00 and 16:00-18:45 in Scheme 1, and 8:00-12:00, 16:15-19:15 and 19:30-19:45 in Scheme 2. In addition, the average price constraint in Equation (5) becomes an equality constraint, which is a necessary condition for judging the optimality of the DERA pricing strategy. To meet this condition, Scheme 1 has to set the electricity price during peak power consumption periods such as 19:45-20:15 and 20:45-21:00 as the lower limit, while Scheme 2 sets the electricity price between the upper and lower limits of the price during 19:45-20:00.

[0065] This paper analyzes the impact of electric heating's participation in flexible supply on electricity pricing strategies. Figure 8 , Figure 9It can be seen that the electricity pricing strategy of Scheme 2 differs significantly from that of Scheme 1 during the periods of 7:45-8:00, 16:00-16:15, 18:45-19:15, 19:30-20:15, 20:45-21:00, and 23:45-24:00. This is because electric heating users in Scheme 2 have adjusted their electricity consumption strategies to obtain greater flexibility and additional benefits, resulting in changes in the relative power consumption during each period, and thus, a change in the electricity pricing strategy.

[0066] To analyze DERA's flexible pricing mechanism, Figure 10 , Figure 11 The pricing strategies for DERA's upward and downward flexibility in Scheme 2 are presented respectively. Analysis shows that, to reduce the cost of purchasing flexibility from electric heating, DERA's upward (downward) flexibility pricing is often at the lower limit when electric heating operates during periods with relatively high upward (downward) flexibility supply; conversely, when electric heating operates during periods with relatively low upward (downward) flexibility supply in each time-of-use electricity price segment, DERA's upward (downward) flexibility pricing is at the upper limit. Since the average price constraint in equations (6) and (7) becomes an equality constraint, which is a necessary condition for the optimal flexibility pricing strategy, to satisfy this condition, the pricing during periods with higher upward (downward) flexibility supply is at the upper limit of flexibility pricing or a value between the upper and lower limits.

[0067] 2) Energy and flexibility trading strategies between DRA and DSO To analyze the impact of electric heating users' participation in flexible supply on the electricity and flexibility trading between DERA and DSO, Figure 12 The power purchase and sale strategies between DERA and DSO are given under two scenarios. Figure 13 Two flexible trading strategies between DERA and DSO are presented.

[0068] Depend on Figure 12 It can be seen that after electric heating users participate in flexible supply, compared with Option 1, DERA's electricity purchases from DSO decrease during 11:45-12:00 and 18:30-20:00, while its electricity sales to DSO decrease during 8:15-11:45, remaining unchanged during other periods. Combined with... Figure 8 , Figure 9It can be seen that, compared to Scheme 1, the power consumption of electric heating decreases between 11:45-12:00 and 18:30-20:00, resulting in a decrease in the amount of electricity sold by DERA to electric heating users. Under the power balance constraint, DERA's purchase of electricity from DSO during these periods also decreases accordingly. However, from 8:15-11:45, electric heating users increase their power consumption compared to Scheme 1 to increase upward flexibility supply, leading to an increase in the amount of electricity sold by DERA to electric heating users and a decrease in the amount sold to DSO. Therefore, considering the participation of electric heating users in flexible supply, the amount of electricity sold by DERA to electric heating users changes. Under the power balance constraint, DERA has to change its power purchase and sale strategy with DSO.

[0069] For flexible trading strategies between DRA and DSO, by Figure 13 It can be seen that since the flexibility sold by DERA to DSO in Scheme 2 comes not only from the energy storage equipment owned by DERA itself, but also from the flexibility purchased from electric heating users, the upward and downward flexibility sold by DERA to DSO in Scheme 2 is 50,593 kWh and 19,506 kWh higher than that in Scheme 1, respectively, which can effectively alleviate the increasingly tight flexibility supply situation of the power grid.

[0070] 3) Electricity consumption strategies and flexible supply strategies for electric heating users To analyze the coupling relationship between the electricity consumption strategies and flexible supply strategies of electric heating users, Figure 14 The paper presents the flexibility supply potential and actual supply volume of electric heating under two different scenarios.

[0071] Depend on Figure 14 It can be seen that Scheme 2, by changing the electricity consumption strategy, increases the flexibility supply for electric heating users during periods such as 7:45-12:15 and 18:00-20:00. Simultaneously, electric heating users can gain 714 yuan in flexibility revenue by selling this additional flexibility, far exceeding the 260 yuan increase in electricity purchase cost caused by the change in electricity consumption strategy. This demonstrates that the electricity consumption strategy and flexibility supply strategy of electric heating users are closely coupled through overall electricity costs. When the increase in electricity purchase cost caused by changing the electricity consumption strategy is lower than the additional revenue from the increase in flexibility supply, electric heating users will shift from their operating mode aimed at minimizing electricity costs, continuing to increase flexibility supply to minimize overall electricity costs.

[0072] 4) Economic Analysis of DERA Electric Heating Users Figure 15 and Figure 16 The comprehensive electricity cost and DERA profit for electric heating under the two schemes are given respectively.

[0073] Depend on Figure 15It can be seen that, after considering the participation of electric heating in flexible supply, although the user's electricity purchase cost increases from 63,235 yuan in Scheme 1 to 63,495 yuan in Scheme 2, the flexibility benefit increases from 0 yuan in Scheme 1 to 5,798 yuan in Scheme 2. Ultimately, the user's comprehensive electricity cost decreases from 63,235 yuan in Scheme 1 to 57,697 yuan in Scheme 2, a reduction of about 8.8%.

[0074] Depend on Figure 16 It can be seen that after considering the participation of electric heating users in flexible supply, the net income that DREA obtains through flexibility decreases from RMB 1,697 in Scheme 1 to RMB -707 in Scheme 2, but the net income obtained from participating in electric energy trading increases from RMB 18,102 to RMB 20,960. As a result, DREA's profit increases from RMB 19,799 in Scheme 1 to RMB 20,253 in Scheme 2, an increase of about 2.3%.

[0075] It is evident that by jointly optimizing electrical energy and flexibility in the DERA-thermal storage electric heating user master-slave game strategy, DERA's profits can be increased while reducing the overall electricity costs for electric heating users, achieving a win-win situation for both DERA and electric heating users.

[0076] This invention describes the relationship between DERA and thermal storage electric heating users using a master-slave game architecture. It proposes a two-layer optimization model and solution method for DERA-electric heating user master-slave game theory, considering joint optimization of electrical energy and flexibility. Analysis and verification show the following results: 1) Electric heating users’ participation in flexible supply will change their electricity consumption strategies, and at the same time affect DRA’s electricity pricing strategy and its electricity and flexibility trading strategy with DSO, enabling DRA to obtain more profits.

[0077] 2) Electricity consumption strategies and flexible supply strategies of electric heating users are closely coupled through comprehensive electricity costs. When the additional benefits of flexibility resulting from changes in electricity consumption strategies exceed the increase in electricity purchase costs, the electricity consumption strategies will change.

[0078] 3) The DERA-electric heating user master-slave game strategy, which optimizes both electrical energy and flexibility, can increase DERA profits and reduce the overall electricity cost for electric heating users, thereby maximizing the interests of both parties in the game.

[0079] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0080] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

[0081] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A game-theoretic optimization method for aggregators-electric heating systems based on electrical energy and flexibility, characterized in that, Includes the following steps: Step 1: Based on the distributed resource aggregator-electric heating user master-slave game architecture of joint optimization of electric energy and flexibility, establish a two-layer optimization model of distributed resource aggregator-electric heating user master-slave game of joint optimization of electric energy and flexibility; the upper layer of the two-layer optimization model is the distributed resource aggregator pricing model, and the lower layer is the electric heating user electricity consumption and flexibility control optimization model. The distributed resource aggregator pricing model is the leader in setting electricity and flexibility trading prices for electric heating users and electricity and flexibility trading strategies for distribution network operators; the electric heating user electricity consumption and flexibility control optimization model is the follower, responding to the electricity and flexibility price signals set by the distributed resource aggregator, optimizing the electricity consumption strategy and flexibility supply strategy for electric heating, and sending the corresponding electricity purchase and flexibility sales strategy to the distributed resource aggregator. Step 2: Apply the Caro-Kuhn-Tucker conditions to transform the bi-level optimization model into a single-level equilibrium-constrained mathematical programming model. Use linear relaxation techniques and strong duality theorems to equivalently transform the constraints and nonlinear terms in the objective function to obtain a single-level mixed-integer linear programming model. Step 3: Solve the mixed-integer linear programming model to obtain the optimal electricity and flexibility pricing and control strategies for aggregators and electric heating users. These strategies are used to increase the grid's flexibility supply capacity, improve the profits of distributed resource aggregators, and reduce the overall electricity costs for electric heating users.

2. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 1, characterized in that, In step one, the distributed resource aggregator pricing model aims to maximize the distributed resource aggregator's profits. It includes revenue from selling electricity to electric heating users and distribution network operators, revenue from selling upward and downward flexibility to distribution network operators, fees for purchasing electricity from distribution network operators, and fees for purchasing upward and downward flexibility from electric heating users. The specific details are as follows: ; In the formula, Number of time periods; The time interval step; , and They are respectively The price at which time-of-use distributed resource aggregators sell electrical energy, uplink flexibility, and downlink flexibility to distribution network operators; for The price at which time-of-use distributed resource aggregators purchase electricity from distribution network operators; for The price at which time-distributed resource aggregators sell electricity to electric heating users; and They are respectively The price at which time-distributed resource aggregators purchase upward and downward flexibility from electric heating users; and They are respectively Distributed resource aggregators purchase and sell electricity from distribution network operators during specific time periods; and They are respectively Upward and downward flexibility power sold by time-distributed resource aggregators to distribution network operators; For electric heating users Power consumption during a given time period; and They are respectively The up and down flexibility power purchased by the time-distributed resource aggregator from electric heating users.

3. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 2, characterized in that, The distributed resource aggregator pricing model also includes pricing constraints, energy storage device operation constraints, and power balance constraints. The pricing constraints are as follows: ; ; ; ; ; ; In the formula, and They are respectively The upper and lower limits of the pricing for electricity sold by time-distributed resource aggregators to electric heating users; and They are respectively The upper and lower limits of the flexible pricing for time-based distributed resource aggregators to purchase from electric heating users; and They are respectively The upper and lower limits of downward flexibility pricing for time-based distributed resource aggregators when purchasing from electric heating users; , and These are the daily average prices for electricity, upward flexibility, and downward flexibility transactions between distribution network operators and distributed resource aggregators, respectively. The operating constraints of energy storage devices are as follows: ; ; ; ; ; ; In the formula, For energy storage devices The amount of electricity stored during a given period; and For energy storage devices Charging and discharging power during the same period; The loss rate of the stored energy in energy storage devices; and These refer to the charging efficiency and discharging efficiency of energy storage devices, respectively. and These are the minimum and maximum energy storage capacities of the energy storage device, respectively. and These are the maximum charging power and discharging power of the energy storage device, respectively. and These represent the charging and discharging states of the energy storage device, respectively, and are 0-1 variables; The initial energy storage capacity of the energy storage device; ; ; In the formula, and For energy storage devices The upward and downward flexibility offered by the time period; The power balance constraints are as follows: ; ; ; ; ; In the formula, for Solar power output during different time periods; for Forecasted photovoltaic output for the specified time period; for Wind power output during a given time period; for Forecast values ​​of wind power output for the specified time period.

4. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 3, characterized in that, The electric heating user electricity consumption and flexibility control optimization model uses the electricity and flexibility prices set by the distributed resource aggregator as boundary conditions, and combines the building's thermal inertia to optimize its own electricity consumption strategy and flexibility supply strategy with the goal of minimizing the overall electricity cost, as detailed below: ; ; ; ; In the formula, , and They are respectively The power consumption of a single thermal storage electric heating unit during a given time period, as well as the upward and downward flexibility power it provides. This refers to the number of thermal storage electric heating devices.

5. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 4, characterized in that, The electric heating user electricity consumption and flexibility control optimization model also includes thermal storage electric heating operation constraints, room temperature constraints, and building thermal inertia constraints. The operational constraints for thermal storage electric heating are as follows: ; , ; , ; ; ; ; ; ; In the formula, For hot water storage tanks in Heat storage during a certain period; The heat loss rate of the hot water storage tank; The heat loss rate of the connecting pipes between the air source heat pump and the hot water storage tank; The heat pump efficiency ratio; Heat dissipation capacity of the hot water storage tank; and These represent the maximum upward and downward flexibility that a single electric heating unit can provide, respectively. This is the maximum power consumption of the air source heat pump; and These are the upper and lower limits of the power ramp-up rate for air source heat pumps, respectively. This represents the maximum heat dissipation capacity of the hot water storage tank. and These are the upper and lower limits of the heat storage capacity of the hot water storage tank, respectively. The amount of heat stored in the hot water tank in its initial state; The room temperature constraints are as follows: ; In the formula, for Room temperature during the period; and These are the upper and lower limits of room temperature calculated based on human comfort. The thermal inertia constraints of the building are as follows: + ; In the formula, Indoor air density; Indoor air volume; The specific heat capacity of indoor air; For the heat dissipation efficiency of the radiator; The refractive index of the window; This refers to the area of ​​the exterior windows of the building. The intensity of sunlight in the house; This refers to the number of air exchanges; The area of ​​the house; The interior height of the house; This is the temperature difference correction factor for the building envelope; The heat transfer coefficient of the building envelope; The area of ​​the enclosure structure; Outdoor temperature; The heat output of indoor heat sources other than thermal storage electric heating.

6. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 5, characterized in that, In step two, the KKT conditions are applied to transform the two-level optimization model into a single-level equilibrium-constrained mathematical programming model, as follows: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; In the formula: For the dual variables of the thermal balance constraint of the hot water storage tank; and Dual variables that provide upward flexibility constraints for a single electric heating unit; and Dual variables that provide downward flexibility constraints for a single electric heating unit; and These are the dual variables of the upper and lower limits of the power consumption constraints for air source heat pumps, respectively. and These are the dual variables of the upper and lower limits of the power ramp-up constraint for air source heat pumps; and These are the dual variables of the upper and lower limit constraints on the heat dissipation power of the hot water storage tank, respectively. and These are the dual variables of the upper and lower limits of the heat storage capacity of the hot water storage tank, respectively; The dual variable for the consistency constraint of heat storage capacity of the hot water storage tank at the beginning and end of the period; and These are the dual variables of the upper and lower limits of room temperature constraints, respectively; The dual variable for the building's thermal inertia constraint; The symbol indicates that at most one of the non-negative variables is greater than 0.

7. The aggregator-electric heating master-slave game optimization method based on electrical energy and flexibility according to claim 6, characterized in that, In step two, by employing linear relaxation techniques and the strong duality theorem to equivalently transform the constraints and nonlinear terms in the objective function, a single-layer mixed-integer linear programming model is obtained as follows: To achieve efficient solutions to single-level equilibrium-constrained mathematical programming models, Boolean variables are introduced. , , , , , , , , , , , , Furthermore, the Big-M method is used to transform the nonlinear complementary relaxation constraints into an equivalent linear form, as follows: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; In the formula, M is a positive number; ; Therefore, the distributed resource aggregator-thermal storage electric heating user master-slave game two-level optimization model can be transformed into an equivalent mixed-integer linear programming model, with the objective function being: ; Solving the mixed-integer linear programming model yields the equilibrium solution of a distributed resource aggregator-thermal storage electric heating user master-slave game model that jointly optimizes electrical energy and flexibility.