3.1.1. Generator Bidding

In a period T, the cost of the generator *i* ∈ *S*G is assumed to be a quadratic curve [27]:

$$\mathbb{C}(P\_{\mathbb{G}i,t}) = \frac{1}{2}a\_i P\_{\mathbb{G}i,t}^2 + b\_i P\_{\mathbb{G}i,t} \tag{6}$$

where *<sup>P</sup>*G*i*,*<sup>t</sup>* is the actual output of the generator, *ai* and *bi* are the quadratic coefficient and the primary coefficient of the cost curve of the generator, respectively. The power producer quotes according to the marginal cost, and uses the quotation strategy coefficient *k*G*i*,*<sup>t</sup>* to affine the marginal cost function, and the quotation curve can be expressed as:

$$p\_{\text{Gi},t} = k\_{\text{Gi},t}(a\_i P\_{\text{Gi},t} + b\_i) \tag{7}$$

## 3.1.2. Demand Side Bidding

In a period T, the benefit function of the demand side *j* ∈ *S*L can be expressed as:

$$B(P\_{\rm Lj}) = -\frac{1}{2} a\_{\dot{\jmath}} P\_{\rm Lj,t}^2 + \beta\_{\dot{\jmath}} P\_{\rm Lj,t} \tag{8}$$

where α*j* and β*j* are the quadratic coefficient and the primary coefficient of the benefit function, *<sup>P</sup>*L*j*,*<sup>t</sup>* is the power demand of the load node. In the same way as the power producer, the demand side participates in the market bidding by adjusting the quotation strategy coefficient *k*L*i*,*t*, and the submitted quotation curve is:

$$p\_{\mathcal{L},j,t} = k\_{\mathcal{L},j,t}(-\alpha\_j P\_{\mathcal{L},j,t} + \beta\_j) \tag{9}$$

## 3.1.3. Market Clearing Model

In this paper, the demand side is divided into the normal load and flexible load. The corresponding benefit functions are *<sup>B</sup>*(*<sup>P</sup>*L) and *<sup>B</sup>*(*<sup>P</sup>*FL), respectively. The difference between the demand side benefit and the generator cost *<sup>C</sup>*(*<sup>P</sup>*G) is the social welfare. From the perspective of the power market clearing, the purpose of electricity trading center is to maximize the social welfare. Therefore, the objective function is the maximization of the social welfare, and it can be expressed as:

$$\begin{aligned} \max\_{\substack{P\_{\mathcal{G}}, P\_{\mathcal{L}}, P\_{\mathcal{FL}} \\ t = 1}} F\_{\mathcal{S}\mathcal{S}} &= B(P\_{\mathcal{L}}) + B(P\_{\mathcal{FL}}) - \mathbb{C}(P\_{\mathcal{G}}) \\ \mathcal{S} &= \sum\_{t=1}^{T} \sum\_{j \in \mathcal{S}\_{\mathcal{L}}} k\_{\mathcal{L},j,t} (-\frac{1}{2} a\_j P\_{\mathcal{L},j,t}^2 + \beta\_j P\_{\mathcal{L},j,t}) + \\ &\sum\_{t=1}^{T} \sum\_{j \in \mathcal{S}\_{\mathcal{L}}} (-\frac{1}{2} a\_j^{\mathcal{F}L} P\_{\mathcal{F}\mathcal{L},j,t}^2 + \beta\_j^{\mathcal{F}L} P\_{\mathcal{E}\mathcal{L},j,t}) - \sum\_{t=1}^{T} \sum\_{i \in \mathcal{S}\_{\mathcal{G}}} k\_{\mathcal{G},i,t} (\frac{1}{2} a\_i P\_{\mathcal{G},i,t}^2 + b\_i P\_{\mathcal{G}i,t}) \end{aligned} \tag{10}$$

where *P*G, *P*L, and *P*FL are respectively the power generation output power, the conventional load demand, and the flexible load demand. Moreover, αFL*j* and βFL*j* are the quadratic coefficients and the primary coefficients of the flexible load benefit function, respectively. The clearing model that considers the convertible load needs to consider the transferable load constraint in addition to the conventional power balance constraints, network security constraints, and related constraints of the generator set. The transferable load does not change the total amount of electricity used in 1 power cycle, but the power consumption in each period can be flexibly adjusted.

(1) System power balance constraint

$$-\sum\_{i \in \mathcal{S}\_{\mathbf{G}, j} \in \mathcal{S}\_{\mathbf{L}}} B\_{ij} \theta\_{ij} = P\_{\mathbf{G}i, t} + P\_{\mathbf{C}i, t} + P\_{\mathbf{I}\mathbf{H}, t} - P\_{\mathbf{L}j, t} - P\_{\mathbf{F}\mathbf{L}, j, t} \tag{11}$$

where *<sup>P</sup>*G*i*,*<sup>t</sup>* is the output of the conventional generator set, *<sup>P</sup>*C*i*,*<sup>t</sup>* is the output of the pumped storage unit, *<sup>P</sup>*H*i*,*<sup>t</sup>* is the output of the nuclear power unit, *<sup>P</sup>*L*j*,*<sup>t</sup>* is the load of the conventional user, and *<sup>P</sup>*FL*j*,*<sup>t</sup>* is the load of the flexible load. When the power system is running, the power system power balance must be guaranteed. The pumped-storage generator set generates electricity when the electricity price is high during peak hours and transmits power to the grid; it draws water during the low-voltage period and consumes electricity. In one day, the sum of the power generation and electricity consumption is zero. The output of the nuclear power unit is stable, and its output in each period is considered constant, *P*H0.

#### (2) Upper and lower limits of the unit

$$P\_i^{\text{min}} \le P\_{i,t} \le P\_i^{\text{max}} \tag{12}$$

where, *Pi*,*<sup>t</sup>* is the output of the unit in this period, which satisfies the upper and lower limits of the unit output. *P*min *i*and *P*max *i*are the minimum and maximum output of the unit, respectively.

 (3) Climbing constraint of the unit

$$-\Delta P\_{\rm Ci,t,div} \le P\_{\rm Ci,t} - P\_{\rm Ci,t-1} \le \Delta P\_{\rm Ci,t,mp} \tag{13}$$

where <sup>Δ</sup>*PGi*,*t*,up and <sup>Δ</sup>*PGi*,*t*,*dw* are the maximum up/down climbing power of unit. In two adjacent time periods, the climb rate of the unit must meet the minimum and maximum climb constraints.

#### (4) Convertible load constraint

In a period T, the total electricity consumption of the convertible load remains the same, satisfying the convertible load total constraint and the transferable load transfer interval constraint:

$$\begin{cases} \begin{aligned} \sum\_{t=1}^{T} P\_{\text{con},j,t} &= \text{TP}\_{\text{con},j} \\ -\tau \% P\_{\text{con},j} &\le \Delta P\_{\text{con},j,t} \le -\tau \% P\_{\text{con},j} \\ t \in \mathcal{T}\_{\text{con},j} \end{aligned} \tag{14}$$

where <sup>Δ</sup>*P*con,*j*,*<sup>t</sup>* is the transfer amount of the convertible load at the time T of the node *j*. If it is positive, the load is transferred to time T, and if it is negative, the load is transferred from time T. The first equation is the transferable load total constraint, the second inequality is the upper and lower bounds of the transfer amount, and Tcon,*j* is the convertible interval.

#### *3.2. Safety Checking Model That Considers the Reducible Loads*

The market clearing model aims to maximize the social welfare, but in the pursuit of maximizing profits, it will inevitably lead to a reduction in the system's security. To ensure that the power flow of the line does not exceed the limit, it is usually directly in the clearing model that considers the line safety constraint, to ensure the security of the line transmission. However, this method makes the clearing model very complicated and it is difficult to ensure the efficiency of solving the model [15,28,29]. In this paper, the market clearing process of this article actually includes two stages, the first stage does not consider the line safety constraints, and the second stage is the safety checking process considering safety constraints. In both stages, flexible loads are considered. Moreover, in the safety checking process, by simultaneously adjusting the output of the unit and reducing the load, the problem of power overrun is eliminated. This method divides the complex market clearing into two simple steps and uses the optimization algorithm to adjust the power generation output and the load reduction to eliminate the trend limit of the branch and section.

When using the mathematical optimized method to conduct the safety checking on the clearing result, it is necessary to establish an optimization model, and the unit adjustment amount and the load reduction amount can be used as the decision variables. The goal is to minimize the sum of the unit adjustment cost and the flexible load reduction cost. The objective function is:

$$\min f = \mathbb{C}(\Delta P\_{\mathbb{G}}) + \mathbb{C}(P\_{\mathbb{F}}) \tag{15}$$

where *C*(Δ *<sup>P</sup>*G) and *<sup>C</sup>*(*<sup>P</sup>*F) are the generator set adjustment cost and the flexible load reduction cost, respectively. The unit adjustment cost can be expressed as:

$$C(\Delta P\_{\rm G}) = \sum\_{i \in S\_{\rm G}} \delta\_i |\Delta P\_{\rm Gi}| \tag{16}$$

The flexible load reduction costs can be expressed as:

$$\mathcal{C}(P\_{\mathcal{F}}) = \sum\_{i \in \mathcal{S}\_{\mathcal{L}}} \gamma\_i (P\_{\mathcal{F}i}^0 - P\_{\mathcal{F}i}) \tag{17}$$

where δ*i* and γ*i* express the cost factor of the unit adjusting and load reducing, respectively; here δ*i* = 10γ*i*.

The constraint conditions consider the adjustment amount and the reduction amount of the balance constraint, the unit adjustment upper and lower limit constraints, the load reduction constraint, the line upper and lower limit constraints and the power distribution factor constraint.

(1) Balance between the adjustment and reduction

$$\sum \Delta P\_{\rm Gi} - P\_{\rm Fi} = 0 \tag{18}$$

where Δ *P*G*i* is the adjustment amount of the unit output, and *<sup>P</sup>*F*j* is the flexible load reduction amount; in an ideal case, the flexible load reduction amount is equal to the unit output adjustment amount.

(2) Upper and lower limit constraints before and after the unit adjustment.

$$P\_{\rm Ci}^{\rm min} \le \Delta P\_{\rm Ci} + P\_{\rm Ci}^0 \le P\_{\rm Ci}^{\rm max} \tag{19}$$

where *P*<sup>0</sup> G*i* is the original output of the unit, and the sum of the output before the adjustment and after the adjustment must meet the upper and lower limits of the unit.

(3) Upper and lower limit constraint of the line transmission power.. 

$$-P\_l^{\text{max}} - P\_{\text{IO}} \le \Delta P\_l \le P\_l^{\text{max}} - P\_{\text{IO}} \tag{20}$$

where *P*max *l* is the maximum value of the line transmission power, *Pl*0 is the transmission power of the line before the safety checking, and Δ *Pl* is the adjustment amount of the line transmission power after the safety checking.

(4) Reduce load constraints.

$$P\_{\rm Fi,min} \le P\_{\rm Fi} \le P\_{\rm Fi}^0 \tag{21}$$

where *<sup>P</sup>*F*i*,min is the minimum power demand for the flexible load and *P*<sup>0</sup> F*i* is the original fixed power demand for the flexible load user.

(5) Power distribution factor constraints

$$
\Delta P\_l = p\_{l,i} \Delta P\_{\rm G,i} + q\_{l,i} (P\_{\rm Fi0} - P\_{\rm Fi}) \tag{22}
$$

where *pl*,*<sup>i</sup>* is the power distribution factor of line *l* with respect to Δ *<sup>P</sup>*G,*i*, *ql*,*<sup>i</sup>* is the power distribution factor of line *l* with respect to the flexible load reduction amount *P*F*i*0 − *P*F*i*, and Δ *Pl* is the adjustment amount of the line transmission power after the safety checking.

In the process of safety checking, the power dispatch center implements the load reduction plan and needs to provide compensation fees *F* to the load reduction users. The compensation fee *F* = *<sup>C</sup>*(*<sup>P</sup>*F) in this paper is shown in (17).
