Bi-level optimization based two-stage market clearing model considering guaranteed accommodation of renewable energy generation

The existing electricity market mechanisms designed to promote the consumption of renewable energy generation complicate network participation in market transactions owing to an unfair market competition environment, where the low cost renewable energy generation is not reflected in the high bidding price of high cost conventional energy generation. This study addresses this issue by proposing a bi-level optimization based two-stage market clearing model that considers the bidding strategies of market players, and guarantees the accommodation of renewable energy generation. The first stage implements a dual-market clearing mechanism that includes a unified market for trading the power generations of both renewable energy and conventional energy units, and a subsidy market reserved exclusively for conventional generation units. A re-adjustment clearing mechanism is then proposed in the second stage to accommodate the power generation of remaining renewable energy units after first stage energy allocations. Each stage of the proposed model is further described as a bi-level market equilibrium problem and is solved using a co-evolutionary algorithm. Finally, numerical results involving an improved IEEE 39-bus system demonstrate that the proposed two-stage model meets the basic requirements of incentive compatibility and individual rationality. It can facilitate the rational allocation of resources, promote the economical operation of electric power grids, and enhance social welfare.


Introduction
China continues to promote the development of renewable energy in response to the two goals of carbon neutrality and peak carbon emissions proposed by President Xi Jinping [1][2][3]. As a result, installed wind power capacity has reached 280 GW by the end of 2020 with an annual power generation of 466.5 TWh. It is expected that the share of renewable energy generation in China's primary energy supply will increase to 67% by 2050 [4]. Accordingly, the momentum to promote the participation of renewable energy generation in electricity market transactions has become unstoppable [5].
The above-discussed efforts have motivated considerable research to facilitate the integration of a high proportion of renewable energy generation into electric power grids. For example, the challenges to grid operation posed by increased renewable energy penetration and associated technical solutions have been investigated in [6]. Researchers have also proposed the use of energy storage systems to balance the volatility and intermittency of renewable energy generation [7]. Other studies have investigated the implementation for the participation of renewable energy generation in market transactions. For example, the impact and challenges associated with large-scale wind power penetration on the Australian electricity market have been investigated [8], while the impact of wind power forecasting errors on the Nordic electricity market have been analyzed [9]. Further analysis has suggested that the incremental power in wind and solar generation would reduce the daily zonal market price in the Italian electricity market [10]. The gradually increased participation of renewable energy generation in electricity markets has led to the development of appropriate modeling methods for electricity markets in a number of recent studies. Among these, the impact of renewable energy generation participation in the market on the market equilibrium and the bidding game strategy of renewable energy generation has been investigated. For example, an equilibrium model was proposed for the participation of large-scale wind power generation in the short-term electricity market, and the Nash equilibrium problem of the electricity market was solved by means of game theory and a diagonalization algorithm [11]. Similarly, changes in equilibrium electricity market prices have been investigated with different power generation proportions [12]. The development of operational schemes for electric power systems and energy markets is no longer limited to optimization models involving top-down unified dispatch, but now also consider the decision-making behaviors of independent market players. For example, the bidding strategy behaviors and decisions of market players have been considered in a bi-level optimization model of electricity markets [13] while [14] has investigated the optimal bidding strategy for wind power generation to achieve maximum profits under conditions of uncertain power generation and clearing price. Similarly, in [15], the impacts of the strategic behaviors of electric power generation companies and the proportion of renewable energy generation on the locational marginal price of electricity have been studied. These studies have demonstrated that market players have an incentive to bid strategically.
However, the penetration rate of renewable energy generation is increasing, and the marginal cost of renewable energy is close to zero [16]. Therefore, the participation of renewable energy generation in the electricity market will seriously reduce the market clearing price and greatly decrease the profit of conventional energy generation. Nonetheless, another study has demonstrated that current operating electricity markets require considerable improvement to ensure that renewable energy generation offers reflect the true cost of the generation [17]. Addressing these issues relies on the implementation of a market mechanism suitable for the participation of renewable energy generation in electricity markets.
Market mechanisms better suited to renewable energy generation have been implemented in some countries. For example, feed-in tariffs can promote the development of renewable energy [18]. However, this mechanism cannot promote technological innovation in renewable energy enterprises. Subsequently, Germany has proposed the feed-in premium to enable renewable energy and conventional energy generation to participate equally in electricity markets [19]. However, this mechanism requires that electricity derived from uncertain renewable energy and conventional energy sources be cleared at the same price, which is obviously unfair for conventional energy generation. The U.S. has proposed a renewable portfolio standard to promote the accommodation of renewable energy generation by setting standards for its accommodation [20]. Nevertheless, individual regions will accommodate renewable energy generation locally, and thereby interfere with inter-provincial electric energy trading. Similarly, the green certificate mechanism obtains environmental benefits by trading green certificates [21]. Nonetheless, this mechanism requires a high sense of social responsibility from market players, who are currently motivated more by other incentives. Therefore, the design of an incentive-compatible market mechanism that can promote the consumption of renewable energy generation is still urgently required.
This issue is addressed herein by proposing a two-stage market clearing model, including a dual-market clearing mechanism and a re-adjustment market clearing mechanism. These guarantee the accommodation of renewable energy, encourage the implementation of renewable energy generation prices that reflect the true cost of generation, and create a fair market competition environment. The main contributions of this paper are as follows: • The dual-market clearing mechanism includes a unified market for trading the power generation of both renewable and conventional energy sources, and a subsidy market reserved exclusively for generations derived from the latter. This can decrease the clearing price of renewable energy generation and assure conventional energy generation of reasonable market share and profits. • The re-adjustment clearing mechanism can accommodate remaining renewable energy generation, and thereby support the accommodation of available renewable energy resources. • Each stage of the proposed market clearing model is formulated as a bi-level market equilibrium problem, and is solved using a co-evolution algorithm, which provides an equilibrium solution, while enabling the game behaviors of market players to be fully studied.
The remainder of this paper is structured as follows: Sect. 2 presents the process and analysis of the two-stage market clearing model, while Sect. 3 proposes a mathematical model for defining the participation of highcost conventional energy generation in the dual-market, and for the re-adjustment market clearing of abandoned renewable energy generation. Section 4 outlines the coevolutionary algorithm for solving the mathematical models, and Sect. 5 simulates the numerical computations involving an improved IEEE 39-bus system. Finally, conclusions are provided in Sect. 6.

Two-stage market clearing model
The current spot market clearing mechanism is illustrated in Fig. 1, where bids from renewable energy generation and conventional energy generation are applied within the same electricity market. The market organizer sorts bids from low to high, and the winning electric energy P and market clearing price A are obtained at the intersection with the demand curve. This is the equilibrium point. Accordingly, increased renewable energy penetration will result in a lower market clearing price [22], which makes conventional energy generation less profitable or even loss-making.

Dual-market clearing operation in the first stage
In the proposed dual-market clearing mechanism, conventional energy generation receives additional subsidies, which are shared equally by users. This means that the price of conventional energy generation is divided into two parts: (1) participating in the subsidized market and receiving a subsidized price; and (2) participating in the unified market and bidding with renewable energy generation. Then, conventional energy generation will have a lower bid price in the unified market and be able to compete with renewable energy generation at the same price level. All electrical energy from conventional energy generation should be subsidized to ensure the profitability of these resources. At the same time, the impact of fluctuations in fuel costs and differences in energy management levels on the cost of conventional energy generation is accurately reflected by introducing a market-based competition mechanism to achieve a reasonable declaration of subsidy prices among conventional energy bids.
The proposed dual-market clearing mechanism introducing both a unified market and a subsidy market is illustrated in Fig. 2. It should be noted that all conventional energy bids include not only a unified market price but also a subsidized market price that must be declared. Therefore, the combined price of conventional energy generation is the sum of the subsidy price and the unified market price. The combination is reflected in the order of the bids from low to high. The subsidy is established in a competitive market to ensure that the subsidy price is reasonable. It is clear that the subsidy of the generation cost for conventional energy sources makes the market clearing price A' less than the spot market clearing price A. Therefore, the dual-market operation avoids the negative impact of applying the clearing price of renewable energy generation to conventional energy generation with its higher cost.

Re-adjustment market clearing operation in the second stage
Available conventional energy generation is consumed more in the fair competitive environment provided by the dual-market mechanism applied in the first stage. This ensures a certain level of profitability for conventional energy generation. However, this leads to a reduction in the consumption of renewable energy, so this paper proposes a re-adjustment market clearing mechanism to increase the consumption of renewable energy generation while ensuring significant revenues for conventional energy generation at the same time. The proposed readjustment market clearing mechanism is illustrated in Fig. 3. When the unconsumed renewable energy generation re-bids with a revised strategy, the market clearing price is A'' and the clearing electric energy is P''. It should be noted that the bidding price of renewable energy generation in the re-adjustment market clearing operation should be less than the dual-market bidding price; otherwise, it is impossible to win the bid for the unconsumed renewable energy generation. Therefore, the market clearing price A'' in the re-adjustment market is less than the dual-market clearing price A'. It should be noted that the value of P' for renewable energy generation is settled according to A', the value of P'' for renewable energy generation is settled according to A'', and the value of P'' for conventional energy generation is settled according to A' under the subsidy.

Combined two-stage market clearing model
A flow chart illustrating the full process of the proposed two-stage market clearing model is presented in Fig. 4. As is conducted in the spot market clearing process, the unified market bid prices of renewable energy generation and conventional energy generation are arranged in the order from low to high, in which the combined unified and subsidized market bid prices of conventional energy generation are also arranged in the order from low to high, while actual participation in the unified market clearing process is conducted solely according to the order associated with the unified market bid prices of both energy generation types. The average price of electricity in the spot market should be consistent with that in the combined unified and subsidized markets, and the probability of clearing conventional energy generation in the unified market should be higher than the spot market. At the same time, the possibility of conventional energy generation bids in the subsidy market being excessively high is avoided by applying a penalty to bids in the subsidy market that extend beyond the upper limit of the subsidy. In this way, both renewable and conventional energy generation will bid based on the true cost of electricity generation as far as possible.
In the re-adjustment market clearing process, part of the electrical energy derived from conventional energy sources is transferred to that of renewable energy sources to ensure their maximum use. Therefore, conventional energy generation participants must receive corresponding compensation for the transferred electricity. Here, the transferred electric energy is the difference between P' and P'' for conventional energy generation, and the corresponding compensation price is the difference between A' and A''. This compensation effectively encourages the transfer of power generation rights from conventional to renewable energy generation participants. In addition, while A'' is less than A', the total renewable energy generation consumption increases, while renewable energy generation participants are still profitable. In the meantime, the reduction in electrical energy from conventional energy sources is also compensated such that they are also profitable. Therefore, this mechanism accords well with the incentive compatibility principle, and the proposed mechanism is consistent with the properties of mechanism design theory [23,24].
3 Mathematical formulation of the two-stage market clearing model

Mathematical model of participation in dual-market clearing
The dual-market clearing mechanism is for the traditional energy to participate in the unified market bidding and the subsidy market bidding, and needs to declare based on two price-electricity curves. The optimization of the market clearing model needs to consider an appropriate objective function and constraints. The objective function should consider the strategic nature of market bids for maximizing the profit of the market players. However, the clearing process also includes the objective of maximizing social welfare. The optimization process of market clearing will influence the next decision-making behavior of the market players. This master-slave structure with distinct, interlinked, and constrained upper and lower objectives can be described by the bi-level market equilibrium problem. The optimal decision process for market players in the upper level of the model relies on the locational marginal prices and winning electrical energy in the lower level of the model, while the market clearing process conducted in the lower level relies on the optimal price-electricity curve obtained in the upper level [25]. A schematic illustrating the functioning of the bi-level optimization model is presented in Fig. 5.

Upper level optimization process
The objective function F applied in the optimization model based on the profit maximization of each power generation enterprise obtains its optimal bidding strategy according to the locational marginal price t,n of bus n at time interval t , and the winning electric energy P G i,t,k obtained from the lower level clearing model for the i-th generation unit in set G during the k-th bidding segment. Neglecting the start-up cost of wind power units, the specific optimization process in the upper level is given as: where N and M are the total numbers of conventional and renewable generation units, respectively. T is the total number of time intervals, K is the total number of bidding segments, β is the final subsidy price established in the subsidy market, and G i,t is the unit marginal cost of generation.
Reasonable locational marginal prices can facilitate optimal electricity system operation [26]. Therefore, the locational marginal price is defined in this paper as the average of the marginal electricity consumption benefit F D on the electricity consumption side and the marginal generation cost F G on the generation side per unit load increment, as: where α i,k is the unit bidding price, D t is the marginal benefit on the customer side, and P D t is the demand for electricity on the customer side. Accordingly, t,n is defined as: The constraints applied in the upper level of the optimization model are defined as follows: (1) Bidding electric power constraints Equation (5) prevents power generation enterprises from holding reserve electrical energy in an effort to increase the price. It does this by requiring that the sum of the declared maximum electrical energy of each generation unit (i.e., P Gmax i,k ) over all bidding segments is equal to its upper bidding electrical energy limit P Gmax i . Equation (6) ensures that the declared maximum electrical energy of each generation unit must be greater than or equal to a specified proportion ς of its upper bidding electrical energy limit.
(2) Bidding price constraint Equation (7) ensures that the unit price-electricity curve must be monotonically increasing, with α max representing the upper unit bidding price limit.
(3) Subsidy bidding price constraint Here, β i is the bidding price of unit i in the subsidy market and β max is the upper limit of the subsidy bidding price. This is based on the difference between the longterm average marginal costs of conventional and renewable energy generation units.

Lower level optimization process
First, the generation unit start and stop plan is obtained using the security constraint unit commitment procedure based on the power generation enterprise bidding strategy obtained from the upper level of the model. Then, the winning electrical energy and locational marginal price are calculated in the lower level process. As mentioned above, the market clearing process is conducted in the lower level, with the objective of maximizing social welfare. The specific optimization model is given as: The constraints applied in the lower level process are given as follows:

1) System power flow balance constraints
Here, A is the bus-generator association matrix, B is the bus-load association matrix, S is the busbranch association matrix, PL is the transmission line power flow, X is the branch reactance matrix, and θ is the bus voltage phase angle. 2) Line power flow constraint Here, P max n,m is the upper limit of the line transmission power from bus n to bus m.

3) Bus voltage phase angle constraints
Here, expression (14) assigns the bus 1 to be the reference bus. 4) Unit output constraints Equation (15) ensures that the winning electrical energy of each unit during bidding is less than the declared electrical energy, while (16) applies a similar constraint to the sum of the winning electrical energies for each unit over the entire bidding process, and ensures that this sum resides somewhere between P Gmax i and the minimum electrical energy P Gmin i , where u i,t is the binary start-up (u i,t = 1) and shutdown (u i,t = 0) variable of each unit. 5) Ramping constraints Here, R U i and R D i are the respective upward and downward ramping rates of each unit.

6) Spinning reserve constraints
Here, S U t and S D t are the upward and downward spinning reserve requirements, respectively. The spinning reserve constraints ensure that the grid-connected electrical energy can meet demand loads in the event of fluctuations or failures in uncertain renewable energy generation [27]. 7) Minimum start-up and shut-down time constraints here T U i,t is the continuous start-up time of each unit and T U is its minimum value, while T D i,t is the continuous shutdown time of each unit and T D is its minimum value.

Mathematical formulation of re-adjustment market clearing
The re-adjustment market clearing mechanism is also formulated as a bi-level market equilibrium problem. Again, the upper level selects the optimal bidding strategy for renewable energy generation enterprises that maximizes their profit according to the winning electrical energy and locational marginal price obtained in the lower level, while the lower level optimizes the social welfare of all market players based on customer benefits, power purchase costs, compensation costs, and the optimal bidding strategy obtained in the upper level. The upper level applies the same constraints in (6) and as those applied in the dual-market clearing mechanism, while applying a new constraint on the bidding electrical energy, adding a further constraint to the bidding price, and omitting constraint (8). The lower level applies the same constraints in (10) that are used in the dual-market clearing process, while omitting the start-up and shutdown constraints.

Upper level optimization process
The objective function F applied in the upper level optimization model is given as: here all terms with the superscript Re applied in the readjustment market clearing formulation refer to the same terms applied in the dual-market clearing formulation discussed above, and ( Re t,n − t,n ) × (P G i,t,k − P GRe i,t,k ) is the compensation applied to conventional energy generation providers for their transfer of electrical energy to renewable energy generation providers.
The new constraints applied in the upper level of the model are given as follows: (1) Bidding electrical energy constraint Constraint (24) replaces constraint (5) for renewable energy generation units, and ensures that the total maximum declared electrical energy is the unconsumed renewable energy generation after completion of the dual-market clearing process.
(2) Bidding price constraint This formulation augments constraint (7) to ensure that the re-adjustment bidding price α Re i,k for renewable energy generation is less than its dual-market bidding price.

Lower level optimization process
The objective function F applied in the lower level optimization model is given as:

Solution method with the co-evolutionary algorithm
As discussed above, the market equilibrium problem involving multiple market players in each stage is formulated as a bi-level optimization problem. One potential (23)  way to obtain the Nash equilibrium is through a Karush-Kuhn-Tucker (KKT) transformation [11]. This replaces the lower level with the first-order optimal conditions, thereby transforming the bi-level problem into a singlelevel problem, which is a mathematical program with equilibrium constraints [28]. However, the application of a KKT transformation is cumbersome and complex, and is prone to difficulties associated with non-convexity or a situation where the solution cannot converge to the Nash equilibrium when dealing with high-dimensional relaxation variables and complex constraints [29]. This issue was addressed in [30] through the development of a heuristic method denoted as the co-evolutionary algorithm. Reference [31] illustrates the advantages of co-evolution as a parallel and global search algorithm. Co-evolutionary algorithms also provide good solutions from several viewpoints, such as computing speed, accuracy, and robustness [32]. A number of studies have applied co-evolutionary algorithms to solve market equilibrium problems. For example, reference [33] has extended the algorithm to solve for multiple Nash equilibria and demonstrated the advantages of the evolutionary approach. The co-evolutionary algorithm has also been applied to solve the pure-strategy market equilibrium of an equilibrium program with an equilibrium constraints (EPEC) model and demonstrated the effectiveness of the algorithm [34]. Calculating the strategies of each agent at the Nash equilibrium with a competitive co-evolutionary algorithm has been shown to ensure a maximum profit for each agent, demonstrating its ability to obtain optimal strategies in different market situations [35].
The process employed for solving the bi-level market equilibrium problem is illustrated by the flow chart in Fig. 6. The individual steps of the solution process are as follows: Step 1 (Population initialization): randomly generate the initial set of strategies for each market player within the total population of x market players, where y bidding strategies are generated for each player. Accordingly, the set of market players is X = X 1 , X 2 , · · ·X x and the set of bidding strategies for player X 1 is X 1 = Y 1,1 , Y 1,2 , · · ·Y 1,y . The information contained in each strategy Y 1,j is a three-segment price-electricity curve, and the strategy is denoted as a chromosome.
Step 2 (Optimal strategy selection): at any iteration and for any player, the chromosome providing the highest profit of the applied objective function is recorded as the fittest chromosome for that player.
Step 3 (Convergence judgment): if the differences in social welfare between iteration r and r-1 are less than a predetermined threshold or if r is greater than or equal to the maximum number of iterations R, save the fittest chromosomes for all players as the optimal bidding strategies and end all steps; otherwise, proceed to Step 4.
Step 4 (Strategy update): according to the elite retention mechanism, retain the fittest chromosomes for all players except X i at iteration r-1, update chromosomes for X i at iteration r, and return to Step 2. In each iteration, each player needs to go through this update process, which will in turn help select the optimal strategies for all players after numerous iterations.

Numerical computational analysis
The basic characteristics of the improved IEEE 39-bus system employed in the numerical computations are listed in Table 1. The example system includes five thermal power units and a high proportion of renewable energy generation in the form of three wind power units. The total installed capacity is 2950 MW, of which the installed thermal capacity is 2050 MW, accounting for 69.49% of the total capacity, while the installed wind power is 900 MW, accounting for 30.51% of the total generation capacity. The load forecast curve applied over a 24-h period is presented in Fig. 7. The ratio of supply to demand is set as 2.34:1 to ensure that the generation units can engage in vigorous competition in the electricity market. The system is modeled by a two-stage market clearing model, and the GUROBI solver is invoked through the YALMIP toolbox in MATLAB software to solve the bi-level market equilibrium problem using a coevolutionary algorithm.
The basic properties of the proposed methodology are demonstrated based on following four control scenarios: • Scenario 1 adopts the proposed two-stage market clearing model. All energy generation providers first participate in the dual-market to improve the competitiveness and profit of conventional energy generation, and then participate in the re-adjustment market to improve the consumption of renewable energy generation. • Scenario 2 merely adopts the dual-market mechanism, in which conventional energy generation providers participate in the dual-market while renewable energy generation providers participate in the unified market. • In Scenario 3, all energy providers first adopt the general spot market clearing mechanism, and then unconsumed renewable energy generation providers participate in the re-adjustment market, to guarantee the accommodation of renewable energy generation.
• Scenario 4 adopts the spot market clearing mechanism, where thermal units and wind power units are allowed to bid only normal prices.
The market clearing results of the four scenarios are analyzed from four aspects: the bidding processes of market players, the winning energies of generator units, comparison of locational marginal prices, and costbenefit comparison.

Bidding processes of market players
The bidding prices proposed by each generation unit in the dual-market clearing process at each round of bidding are presented in Fig. 8a. It is noted that all generation units initially propose relatively low bidding prices. However, the thermal power units quickly approach high stable prices based on the maximum profit achieved by bidding in accordance to the real cost of generation. The bidding price curve of G4 is the highest because of its highest marginal generation cost. The market reached an equilibrium state in the 12th-15th rounds. The specific stable bidding prices obtained for the generation units during all three segments after 15 rounds of bidding under the dual-market clearing process (i.e., Scenario 2) are presented in Fig. 9. Comparing Fig. 8a and b, after adopting the dual-market clearing mechanism, the wind power units eventually reach a maximum profit after about 12 bidding rounds by bidding at about twice the real cost of generation, which is much lower than that in the normal spot market. These results show that the adoption of the proposed dual-market clearing mechanism that enables thermal power units to participate in the subsidy market leads to rational bidding for wind power units.

Winning electrical energies of generator units
The winning electrical energy obtained for each unit over a 24-h period under Scenario 1 is presented in Fig. 10, in which units G4 and G7 fail to win any bids. This is because G4 has posted the highest bidding price (Fig. 8), while despite G7 and G8 having posted almost the same price, G7 failed to win any bids owing to its much higher low output limit of 300 MW compared to 125 MW for G8. The minimum 300 MW output of G7 could not be used at the posted price at the available demand. The winning electrical energies obtained for each wind power unit under Scenario 2 (G1, G2, and G3) and Scenario 1 (G1' , G2' , and G3') are presented in Fig. 11. It can be seen that the consumption of wind power has increased greatly after the adoption of the guaranteed accommodation mechanism implemented in the re-adjustment market clearing process. The effect is most evident for G3, with the consumption rate increasing from 50 to 84% of its upper output limit (Table 1).

Comparison of locational marginal prices
The locational marginal prices obtained under the four scenarios over a 24-h period are presented in Fig. 12. The spot market bidding process (Scenario 4) provides the highest locational marginal prices because the relatively high cost of conventional energy generation units enables the wind power units to win bids at much higher prices than their actual costs, which generates an unfair competitive environment. Accordingly, the adoption of the dual-market clearing mechanism for conventional energy generation units (Scenario 2) yields significantly reduced locational marginal prices over the vast majority of the 24-h period. This is because the applied mechanism subsidized part of the cost of conventional energy generation, making conventional and renewable energy generation compete at largely the same price level and thus creating a fairer competition environment. Based on the  spot market clearing mechanism of Scenario 4, Scenario 3 adds the re-adjustment market clearing mechanism to achieve the maximum consumption of renewable energy generation. However, the drawbacks of this scenario are obvious because the greatly reduced locational marginal price arising from the high proportion of renewable energy generation makes the conventional energy generation units no longer profitable. The adoption of both the dual-market clearing mechanism and the re-adjustment market clearing mechanism (Scenario 1) provides the lowest locational marginal price because the operation of these two mechanisms in sequence is equivalent to reducing the locational marginal price twice. However, unconsumed renewable energy generation is still profitable when it is settled at this price compared to being wasted entirely. In addition, conventional energy generation is also more profitable when the transferred electrical energy is compensated.

Cost-benefit comparison
The cost-benefit data obtained with the four scenarios are listed in Table 2. Comparing the profits of each generation unit under Scenarios 2 and 4, it can be seen that the participation of conventional energy generation units in the dual-market mechanism reduces the profits of renewable energy generation units while it increases the profits of the conventional. This allows conventional and renewable energy units to compete at the same level in terms of generation costs. As a result, conventional  energy generation units can secure greater market share while the profits of renewable energy generation units are restricted reasonably. The resulting promotion of fair competition makes electricity prices more reasonable and just, and increases overall social welfare.
Comparing the costs and profits of each generation unit under Scenarios 3 and 4, it can be seen that the adoption of guaranteed renewable energy consumption does indeed increase renewable energy consumption, and while the cost of generation increases, the profit also increases. At the same time, the transferred electrical energy of the conventional units is compensated. Therefore, while the allocated electrical energy of conventional energy generation units is reduced, their costs decrease and their profits increase. Moreover, the profits of conventional energy generation units increase with increasing transferred electrical energy. This is because the difference between the locational marginal prices obtained under the dual-market and re-adjustment market clearing mechanisms increases with increasing unconsumed electric energy cleared in the re-adjustment market, and this compensates for the transferred electrical energy of conventional energy generation units. This effectively encourages conventional energy generation units to promote renewable energy consumption.
Comparing the social benefits obtained in the four scenarios, it can be seen that the current spot market mechanism does not enhance social welfare because it fails to support the participation of conventional energy generation units in market transactions. Comparing Scenarios 2 and 4, social welfare is enhanced by conventional energy generation units participating in the dual-market mechanism. This increases their market competitiveness and reduces the locational marginal price. Comparing Scenarios 3 and 4, social welfare is also enhanced by adopting the re-adjustment market clearing mechanism to increase the consumption of renewable energy. Comparing Scenarios 1 and 4, when dual-market and re-adjustment market clearing mechanisms are used continuously, it is equivalent to enhancing social welfare twice. Therefore, the two-stage market proposed in this paper can obtain the greatest social welfare and is also the better choice for the current market.

Conclusion and outlook
This study has addressed the unfair market competition environment fostered by current electricity market mechanisms by designing a two-stage market clearing model based on bi-level optimization that considers the bidding strategies of market players, and guarantees the accommodation of renewable energy generation. The first stage implements a dual-market clearing mechanism that includes a unified market for trading the electric energy of both renewable and conventional energy units, and a subsidy market reserved exclusively for conventional energy generation units. This is followed by a re-adjustment clearing mechanism in the second stage to accommodate remaining renewable energy generation after first stage energy allocations. Finally, the model is solved using a co-evolutionary algorithm. The results of numerical computation demonstrate that the proposed dual-market mechanism ensures a fair market competition environment by supporting the profitability of relatively high cost conventional energy generation units. This ensures their share in market transactions, while the bidding of renewable energy generation is more reasonable. Meanwhile, the re-adjustment clearing mechanism increases the consumption of available renewable energy resources as much as possible, and supports the profitability of conventional energy generation units, which are compensated for their transferred electrical energy. This effectively encourages conventional energy generation units to promote renewable energy consumption. The results demonstrate that the proposed market mechanisms can facilitate the rational allocation of resources, promote the economical operation of electric power grids, and enhance social welfare. Directions for future research include consideration of the impact of a high proportion of renewable energy generation on the flexibility in the regulation ability of electric power systems and the continuous improvement of the calculation efficiency.