A Game Theory Based Retail Market Framework With DSO’s Operational Considerations

Within the distribution system operator (DSO) framework, there could be alternative arrangements to enable market participation by all entities, including the privately owned distributed energy resources (DERs). In many cases, the retailers and similar aggregating agencies facilitate this. Even before finalizing the modalities of the market at the distribution level, it is essential to know about the possible market outcome and its impact on the operational decisions of DSO and vice-versa. This paper presents a simulation framework and associated case studies, where the market outcome and DSO’s operational activities are carried out in tandem to establish a realistic and feasible outcome. The market model is represented by a non-cooperative game where an efficient and fair solution is obtained using Nash equilibrium. For this, multi-player power transaction problem (MPTP) is solved using complementarity modeling. The proposed MPTP is further compounded with network reconfiguration and loss considerations which are the part of DSO’s operations. The inclusion of reconfiguration and loss allocation to entities makes the outcome realistic and feasible one. The proposed simulation framework is implemented on various test cases with a heterogeneous set of participants to establish its effectiveness.


Z
Set of opened lines for radial configuration. m p /i p Set/number of inequality constraint of a GNEP. n p /j p Set/number of equality constraint of a GNEP.
Parameters P gen,u Active power generated by DER at bus u. Q gen,u Reactive power generated by DER at bus u. τ i Tariff charged by i th retailer to the consumers.
Cost function parameters of k th DG. g uv , b uv Conductance and susceptance of a line connecting bus u and v. I uv,max Maximum current flow in a line connecting bus u and v. P d,u Load demand at bus u. P g i,max Maximum power sold by market to i th retailer.   Power purchased from k th DG by i th retailer. U u , ℘ l u Variables associated with conic formulation related with voltage. P d,u Loss allocated at bus u. L c,u , L u Variables used in loss allocation method. δ¯s i Dual variable associated with the constraint of maximum load demand for i th retailer. δḡ i Dual variable associated with the constraint of maximum power purchased by i th retailer from WEM. δ¯s i Dual variable associated with the constraint of minimum load demand for i th retailer. δḡ i Dual variable associated with the constraint of minimum power purchased by i th retailer from WEM.
δr j Dual variable associated with the constraint of maximum power sold by j th RES. δr j Dual variable associated with the constraint of minimum power sold by j th RES. δ dg k Dual variable associated with the constraint of maximum power sold by k th DG. δ dg k Dual variable associated with the constraint of minimum power sold by k th DG. λ td Dual variable associated with the global equality constraint of power balance. λ s i Dual variable associated with the equality constraint of power balance for i th retailer. λ r j Dual variable associated with the equality constraint power balance for j th RES. λ dg k Dual variable associated with the equality constraint power balance for k th DG. α i p , γ j p Dual variable of inequality and equality constraint, respectively, of a GNEP. x p , x −p Control variables of a GNEP I. INTRODUCTION Distribution system operators (DSOs) would play a key role in the next generation power systems with large-scale distributed energy resources (DERs) integration [1]. One of the key enablers, facilitated by DSO for overall efficient operation of the sector is electricity commodity markets. DSO provides an intermediate platform between the independent system operator and different entities at the distribution level for market activities [2]. The retail market facilitated by DSO enables consumers to make choices among available tariff plans and incentives. It brings competition and economic liberalization to the market. Unbundling of the vertically integrated unit of power system results in the participation of new entities into the retail market [3], [4]. Continued progression of the retail electricity market is imminent for the distribution power sector to meet the future scope. Bringing competition in the retail sale of electricity, especially by privately owned DERs will transform the conventional framework of the market. Therefore, an efficient and rational retail market framework needs to be explored and simulated to devise novel business strategies in the power market considering the different aspects of DSO's system operations.
A brief review of the existing retail markets with recent developments is presented in [5], describing the typical characteristics, challenges, and needs of the next-generation retail electricity markets. The progression of the smart grid opens up new avenues of opportunities for the development of market structure with a variety of energy producers and consumers. The involvement of private energy sources (small or medium size energy producers) and retailers gives a new scope to the retail market. This has raised a question on the integration of such DERs including renewable energy resources (RESs), diesel generators (DGs), etc., in the retail market. It is not possible for every DER to participate VOLUME 11, 2023 individually in the wholesale electricity market (WEM) [6], [7]. Thus, such trade mechanism is needed that enables the involvement of DERs and retailers at the distribution level. A transactive market is explained [8] that shows the participation of local distributed areas that include the coalition of DERs, microgrids, and load aggregators and allows their interaction with WEM. However, they have not considered different types of DERs formulation separately, instead they maximize the coalition's profit as one entity. Likewise, a liberalized energy market is presented in [9] for a short-term decision making model which enables the participation of retailers, suppliers, and consumers. However, the work is limited to distributed RES and tries to maximize only RES's profit. Moreover, [10], [11] have only incorporated the RES in their work, and [12] has not considered the RES. However, the existing work that modeled the interaction between the WEM and distribution system entities does not consider the RESs and DGs together. If considered, they are represented by aggregators as one entity.
Most of the work presented in the literature do not consider the network parameters while carrying out simulations on market trade mechanism [6], [9], [13], [14], [15], [16], [17], [18]. There can be binding constraints from the network side which can make the outcome of market infeasible in practice. Hence, it is essential to compliant the market model with DSO's network operations. In some of the recent work [10], [19], [20] bilevel optimization technique has been applied to overcome this problem. However, they do not solve the problem of all DERs and retailers at a single level to make them profitable with rational decision making. Additionally, [10] has employed DC formulation which is not acceptable for the distribution system. It is worthwhile to note that only analyzing the market outcome without considering the network and the operational bandwidth available with DSO, would lead to a non-realistic or misleading outcome. The need to combine the two would become even more important when the DSO is a deep DSO with large-scale advanced system operational functionalities discharged by it.
Considering DSO's operational activities, one of the important tools for the efficient operation of the distribution system is network reconfiguration. This tool will give a new direction to the market model and involve DSO's operations that improve the network's performance. Network reconfiguration takes into account the network parameters and comes up with the best topology for the required objective. Different techniques [21], [22], [23], [24] are available to implement network reconfiguration. A complete review and classification of the most significant works are presented in [25]. According to the literature survey, in recent times, secondorder conic programming (SOCP) has evolved as a suitable technique to solve reconfiguration problem [26], [27], [28], [29]. SOCP is a computationally efficient method and guarantees superior solution under mild assumptions [30], [31]. Another aspect of system operation is loss allocation. Retailers should know about their exposure to MW losses while trading. They can calculate the system loss by solving the reconfiguration problem, but it provides total loss of the network. When more than one retailer is present, it is important to calculate the share of loss among retailers which is dependent upon the serving area of the retailer. Also, these shares will change every time with the change of configuration. Hence, the loss allocation technique must be clubbed with the reconfiguration problem.
Further, the involvement of multiple players in a competitive retail market needs a solution approach that can deal with the economic conflict between two rational entities. In [12], a non-cooperative game theory approach is used to manage the financial conflict between retailers and consumers and specifies their optimal energy procurement strategies. Similarly, electricity market framework has been proposed in [32] and [13] based on non-cooperative game theory which involves the local energy providers and consumers. In [33], Nash equilibrium is derived to determine the optimal schedule of power generating firms using complementarity modeling. Linear complementarity problem (LCP) is an important tool both in mathematical theory as well as in applied mathematics. It serves as a bridge between mathematical fields such as optimization, game theory, etc., and also provides one of the leading modeling concepts for market equilibrium problems in energy applications like power or gas networks [34]. Reference [35] has presented a detailed analysis of LCP and provided an overview of these connections.
Moreover, an equilibrium model is proposed in [36] to split the joint market clearing of energy and reserve into two separate markets and solves the equilibrium model as an LCP. In a similar fashion, an equilibrium model based on LCP is proposed by [37] to perform energy trading with optimal coordination of the flexible resources in the gasheat-electricity integrated energy system. Whereas, [38] has designed a nonlinear complementarity problem to find Nash equilibrium by including the strategic behavior of producers and consumers. The scope of this paper involves the strategic participation of multiple players in the retail market with their objective to maximize profit. Therefore, a generalized Nash equilibrium problem (GNEP) is designed for the proposed market framework that assures the fairness of the market outcome by achieving Nash equilibrium.
Taking cognizance of the importance of the above discussion, this paper provides a simulation framework to study the outcome of multi-player electricity market without missing the aspects of system operation. The system operation aspects include the loss component allocation and optimal network configuration. A conceptual structure of mentioned trade mechanism that shows the involvement of DERs and retailers is shown in Fig. 1. The developed model is solved for rational market operation with an objective to maximize the profit of each participant. The key contributions of this paper have been summarised as follows: 1) Developing a game theory based multi-player market model that incorporates various energy producers and retailers with their objective to maximize the profit. 2) Optimal mix of purchases is achieved by converting the market model into a linear complementarity problem (LCP) in a non-cooperative game structure. 3) Modeling interaction in a non-cooperative structure among different players guarantees the fairness of the market outcome by achieving Nash equilibrium. 4) An optimal configuration is evaluated in compliance with the feasible outcomes of the market model. 5) Loss allocation is also embedded within the problem to calculate the power transaction including the loss component for each retailer, considering the impact of network reconfiguration.
The mathematical formulation of the proposed simulation framework comprises modeling of multi-player power transactions problem, generalized Nash equilibrium problem, loss allocation, and network reconfiguration is presented in Section II. The complete algorithm for a network compliant multi-player power transactions is provided in Section III. The simulation results for different case studies are discussed in Section IV. Section V discourses the conclusion of the paper.

II. MATHEMATICAL FORMULATION
The proposed simulation problem is based on the non-cooperative game theory where all players (retailers and DER owners) compete with the strategy of rational decision making. The objective of all players is the maximization of their profit. Players come up with optimal mix of purchases and schedules, including loss component for an optimal configuration. The proposed simulation problem comprises a mathematical formulation of three sub-problems: (i) profit maximization problem for multi-player power transaction and its modeling as LCP, (ii) loss allocation, and (iii) network reconfiguration. A schematic flow diagram of the proposed simulation framework including all sub-problem models which are solved sequentially is shown in Fig. 2. The sub-problems are explained as follows:

A. MULTI-PLAYER POWER TRANSACTION
Multi-player power transaction problem (MPTP) is designed as GNEP. The optimal purchased quantities are determined by solving the GNEP using complementarity modeling. The details of GNEP and complementarity are explained in the subsequent subsection. Modeling of the optimization problems for all players is elaborated in this subsection.
In a retail distribution market, there can be multiple retailers and energy producers which are privately owned DERs to serve the load demands. Each service provider will act as a rational player in the competitive retail market and try to maximize his/her profit. This paper considers RESs with no generating cost and diesel generators (DGs). It is assumed that there are I retailers, J DGs, and K RESs and serve a load of fixed amount. According to the market scenario, retailers can participate in the WEM and can purchase power. At the same time, DG and RES can sell their power to retailers only. The profit maximization problem of each player can be framed as follows. The dual variable is written after the corresponding constraints separated by semicolon (;). 1) Retailers: Retailers have options to purchase power from two different sources: 1) WEM, 2) privately owned DERs installed in the network. In this way, the profit calculated by i th retailer is Equation (1) balances the power quantity purchased and sold by the i th retailer. These quantities are limited by certain maximum and minimum values represented by (2) and (3), respectively. 2) Owner of RES: RES is green energy source that is abundantly available free of cost. Hence, total profit gained by the owner of RES considering no generating cost is given as where P r j is the amount of power generated by j th renewable generator.
3) Owner of DG: The cost of power produced by DG is given by cost function C k P dg k . Therefore, the profit made by DG owner is given by where P dg k is the amount of power generated by k th DG. The cost function of the generator can be represented by Sum of the power sold by all retailers must satisfy the total demand of the load. Therefore, (9) serves the purpose of a global constraint for all the players.
Note: When each retailer has a fixed amount of load to serve, one additional constraint will be added to segregate the loads among retailers. It will replace (2) and dual variable with δ s i . Since, P s i is fixed, therefore, (9) is no longer required to consider.

B. GENERALIZED NASH EQUILIBRIUM PROBLEM
The described problem can be designed as a generalized Nash equilibrium problem (GNEP) [39], where P players are competing with each other such that each p player, controlling the variables x p . Thus, x is a vector that constitutes x 1 , x 2 , .., x P control variables. For the sake of representation, x −p indicates the other players' strategies (control variables) other than player p strategies. Hence, each player has an objective function f p obj : R p → R that depends on both his own variables x p as well as on the variables x −p of all other players. The aim of player p is to find a solution x by choosing a strategy x p with other players' strategies x −p that solves the minimization/maximization problem.
Such a point x is called a generalized Nash equilibrium or, more simply, a solution of the GNEP. A point x is, therefore, an equilibrium if no other player can reduce their objective function by changing unilaterally x p to any other feasible point. Thus, for above presented MPTP, variables P s i , P g i , P sr ji , P sdg ki are the control variables for retailers, variable P r j is the control variable for RES owner and variable P dg k for DG owner. The Karush-Kuhn-Tucker (KKT) conditions for each player's problem (10)- (12) can be easily represented by (13)-(16) as given in [39] and [40].
The concatenation of all these KKT conditions of all players could be called KKT conditions of the GNEP. These KKT conditions show a strong relationship with another mathematical model, i.e., complementarity problem. It is a special case of variational inequality that deals with orthogonal vector variables for maximizing/minimizing a objective function. It consists finding of a vector, Y , belonging to real vector space such that Thus, when complementarity problem deals with linear equations, it is termed as linear complementarity problem (LCP) which is in form F(Y ) = MY + q for Y = x ′ , α ′ , γ ′ ′ and q is real valued vector. LCP relies on the KKT conditions of the optimization problem and involves both primal and dual variables. Therefore, KKT conditions of the GNEP presented by (13)-(16) is used for modeling multi-player power transaction problem as LCP. In this way, (13) can be written as (17) collectively for all players i = 1, .., I ; j = 1, .., J and k = 1, .., K .
The first four equations of (17) are derived from (13) (17) is derived from (13) of RES owner's optimization problem and sixth equation of (17) from DG owner's optimization problem. On the other hand, (1)- (9) can also be framed in the form of (14)- (16) for all players. These set of equations are solved together to reach a solution, also called equilibrium.

1) EXISTENCE OF SOLUTION OR EQUILIBRIUM
It is explained and proved in [35] and [41] if matrix M of a LCP is positive semi-definite, the LCP is feasible and solvable. Also, according to the Theorem 4.1 in [39], a generalized Nash equilibrium exists for the GNEP defined by (10)- (12) if (a) for all p, set X p x −p which contain strategies of the rival player such that x p ∈ X p (x −p ) should be nonempty, closed and convex and X p , as a point-to-set map, is both upper and lower semi- Since the problem is solved as LCP, the matrix M is found to be positive semi-definite for the proposed multi-player power transaction model and market conditions are following Theorem 4.1 in [39]. Hence, we can say that solution or equilibrium exists for the proposed problem.

2) VALIDATION OF EQUILIBRIUM
For GNEP, defined by (10)-(12) assuming all functions involved are continuously differentiable, the solution vector x obtained is an equilibrium point of the GNEP according to Theorem 4.6 in [39]. It states the following conditions: (a) subproblem of all players satisfy a constraint qualification. Altogether, there existᾱ andγ that solves the system (13)-(16) withx, (b) with assumptionx,ᾱ,γ solves the system condtions (13)- (16) and GNEP satisfies the convexity, thenx is considered as equilibrium point of the GNEP.
Since all the conditions are being satisfied by the formulation of the market model, thus, the obtained solution vector represents Nash equilibrium.

C. LOSS ALLOCATION
The distribution system shares higher percentage of loss out of total AT&C losses. It is unavoidable to neglect the loss component in the distribution system. Hence, calculation of power transactions including loss component is essential. Loss allocation at each node is likely to change due to configuration change that will change the retailer's share of loss at every configuration and thus the power transactions. In the proposed simulation framework, the loss will be allocated only to those buses which have loads connected to them. In case the buses are equipped with both DER and load, no loss is allocated to that buses when DER capacity exceeds demand as they are reducing the congestion by providing power locally. All the feeder buses that connect the distribution network to the transmission network are responsible for the transfer of electricity. Hence, these buses also have no contribution to power loss. According to the usage and requirement, network dependent loss allocation method [42] based on shapely value is adopted in this paper with some modifications. Allocation of loss at each bus is calculated by an iterative method as described in Algorithm 1. Loss factor L c,u that represents the participation of power flow at bus u and L u finds the actual sharing factor of loss by the load at bus u, are calculated by (18) and (19) respectively.
After calculating the sharing factor of loss at each bus except the active source node and feeder bus, the normalization factor is determined. This factor is further multiplied by the loss sharing factor to find the loss allocated to a bus. Hence, the loss allocation method uses the normalization factor to find the actual share of loss such that the summation of losses allocated to the loads should remain a total active loss of the system.

Algorithm 1 Distribution System Loss Allocation
Result: P d,u Input: Load flow results F uv , bus data, line data Initialization: L c,u ← 0 begin Calculate active source nodes u a ← P gen,u ⩾ P d,u while L c,u a ̸ = 0 do for u ← 1 to N do if u ∈ u a || u ∈ N g then u ← u + 1 else Calculate L c,u using (18) u ← u + 1 end end end for u ← 1 to N do Find L u using (19) Determine normalization factor, NF = T P loss ∀u L u Return P d,u = NF × L u u ← u + 1 end end

D. NETWORK RECONFIGURATION
In maximizing the profit of all retailers and DER, a power transaction market model gives a set of results. However, these results do not accommodate the loss component. Also, the MPTP model does not satisfy the network feasibility criterion. In order to make it network compliant, the obtained VOLUME 11, 2023 results should satisfy the corresponding power flow conditions. Network reconfiguration technique is used here to make the solution feasible with the optimal configuration of the network. It is an already established problem that is modified according to the proposed methodology. In the presence of DER, the reconfiguration problem is framed as a conic program. For N bus system with N g feeders having line l connected between node u and v, can be reconfigured using following formulations.
β uv + β vu = l . . . ..∀l ∈ N l (29) v∈π(u) Power flow equations are reformulated according to standard SOCP format and presented by (20)- (21). Their conic formulation is explained in Appendix A. The voltage at feeder buses is defined by (22). Voltage magnitude limit at different buses and current flows on each line is bounded by (23) and (25) respectively. Equations (26)-(27) express the voltage magnitude at bus u and v and restrict the power flow when line l is not connected. The cone is represented by (24). Constraints (28)-(31) are required to define the radial connectivity of the network.
Based upon the outcome provided by the MPTP, it is not necessary that the distribution system will function in normal operating state. Hence, the difference between the market outcome and the value calculated by network reconfiguration problem should be minimized to make the solution feasible for the network operation. Thus, the objective of the problem would be minimization of absolute error, ξ i.e., the difference between the amount of power drawn from the grid and the power quantum purchased from the WEM. The amount of power drawn from grid is being evaluated by using (33), and power quantum purchased from the market is the outcome of MPTP. It can be written mathematically as: where,

III. NETWORK COMPLIANT POWER TRANSACTION MODEL WITH NETWORK RECONFIGURATION
A simulation framework of a power transactive market is proposed in presence of retailers and local privately owned DERs with consideration of DSO's network operations. This framework provides an optimal mix of purchases, optimal configuration, and loss allocation. The proposed simulation is performed in a sequential fashion, as described in Algorithm 2. It begins with the initialization of a set Z (Z 0 = 0, .., 0) with all elements equal to zero. This set is the collection of line number which should be opened to make network radial in nature. This set will get updated later in the algorithm when reconfiguration problem is solved.
According to the algorithm, the MPTP is solved in the first step. It calculates the quantum of power that should be traded by the retailers and the optimal schedule of DERs. These results are used in next step as a parameter. This step involves network reconfiguration, which computes an optimal topology for the given objective and updates the zero-initialized set. Now, the loss allocation problem is solved using the calculated optimal configuration. This finds the share of loss at each load bus. Adding loss share to the actual load value will raise the demand of that bus by the loss value. At this moment, the iteration count is increased and the convergence criteria is checked. The algorithm is an iterative process that solely depends on the network configuration that can repeat the iterations with same solution if same configuration is evaluated every time. In case of larger systems, it is also possible that the algorithm is not able to provide a single configuration and start swinging between the different configuration with approximately same results. Hence, two termination criteria have been set and meeting either of them will converge the algorithm: 1) Network configuration obtained at an iteration matches the configuration evaluated at previous iteration.

5
Display Z k , set of lines to be opened 6 Allocate the losses P d,v to each load for configuration Z k given in Section II-C 2) The objective function value of the network reconfiguration problem which is an absolute error is lesser than threshold value 0.0000001.
Thus, in case of first iteration, the calculated optimal configuration will never match the previous iteration configuration because Z is initialized with zero value and ξ will also be greater than the threshold value because loss is not incorporated at first iteration for MPTP model. Hence, the algorithm will surely go to step 1 for 2 nd iteration. The MPTP is compiled again using the updated value of load and provides the solution including loss component. Like 1 st iteration, reconfiguration problem is solved followed by loss allocation. The load values and iteration count get updated and convergence criterion is checked. Thus, the same procedure is followed till the convergence is met.

IV. CASE STUDY
In order to check the efficiency and accuracy of the proposed simulation framework, it is implemented on various test systems. Firstly, MPTP is tested for four player structure and a

detailed analysis is performed on the basis of different input cost parameters. Then network compliant MPTP is investigated on 16-bus and 94-bus distribution network including heterogeneous set of players
The proposed framework is implemented on General Algebraic Modeling System (GAMS) [43] and MATLAB environment where PATH solver is used for MPTP and CPLEX is used for reconfiguration problem. It is executed on a PC having the following configurations: Intel Core i7 6700 @ 3.4 GHz and 16 GB RAM.

A. MULTI-PLAYER POWER TRANSACTIONS
A simulation framework of distribution market with four players is discussed and analyzed in this section. It is assumed that two retailers (two players) in a distribution network supply power to the consumers. Another two players are DERs: one is a diesel generator (DG) of 5 MW capacity with cost function parameter A k = 50 & B k = 6000 |/MW, and another is RES with 4 MW capacity. Here, the RES is denoted as DER1, and DG is represented by DER2. Both retailers serve the total 14.629 MW load of the system such that 8.629 MW is served by retailer 1 (R#1), and the rest of the quantity is served by retailer 2 (R#2). Selling and purchasing costs of power of each player are obtained from the Indian energy exchange portal [44]. All input parameters are provided in Table 1. MPTP is solved for the given data and obtained a solution, called a Nash equilibrium. The outcome of power transactions among retailers, grid, and DER are shown in Table 2. It is worth mentioning that power drawn from the grid, power transacted by retailer from the grid, and power purchased by retailer from the WEM are same quantity. Profit earned by all entities retailers, DER1, and DER2 is shown in Table 3. Thus, total payoff, i.e., a sum of all player's profit value, is come out to be around |39073. On seeing the grid price for both retailers, it is easy to figure out that R#2 should buy from the WEM as the grid price for R#2 is lower than R#1. But, one can not determine the actual quantity of transactions and share of DERs schedule without solving the problem. According to Table 1, the grid price for R#1 is lower than selling price of DER2 (DG), but still, R#1 is purchasing from DER2. Thus, if we try to frame the mentioned scenario such that R#1 is transacting from the grid instead of DER2, then the total payoff falls to |34679, which is lower than the actual solution obtained. In this condition, profit for DER2 will be declined to |-50 and will reduce the total payoff. In the same way, if more other scenarios are created, the total payoff will be lesser than the obtained solution. Thus, it can be said that the solution obtained is the Nash equilibrium.
The outcome of the MPTP is dependent on various parameters. One of the crucial cost parameters is the grid price. It is the price at which retailers purchase power from the WEM. On that account, an interesting pattern has been observed for different values of grid price considering tariff charges of |7.5/MW and|7.0/MW, respectively, for both retailers. Power transacted by retailers from the grid and DERs are plotted in Fig. 3. The x-axis of the plot is the grid price of both retailers given like (M1,M2) which shows M1 is the grid price for R#1 and M2 is for R#2. Both quantities vary from 6 to 8 one by one. For instance, M2 varies from 6 to 8 when M1 is 6; next, M2 is again altering 6 to 8 when M1 is 6.5 and so on.
It is inferred from the Fig. 3 that when the retailer has the grid price of |6/KW, it gives different scheduling behavior compared with other grid price values. Therefore, when both retailers have grid price of |6/KW or lesser, DER2 will not schedule because generation cost of DER2 (DG) is same as |6/KW. Scheduling DER2 in such situation will reduce the total payoff of the system due to negative value of DER2's profit. For the rest of the values of grid price, following remarks can be concluded: 1) When the grid price is identical for both retailers, one retailer consumes all DER2 capacity, and another takes all DER1 capacity. The remaining quantum for both retailers are traded from the WEM. 2) The retailer with a higher grid price buys from expensive DER. If that DER generation is not sufficient, then it buys from other DER. On contrary, the retailer with a lower grid price buys from the WEM and cheaper DER. 3) DER1 incurred a profit of |16000 in all scenarios as it is scheduled at total capacity because of its lower selling price. DER2 is also scheduled full except for the condition when the grid price is equal to its generating cost. Profit incurred by both retailers is presented in Fig. 4. Since R#1 has more load demand, profit is higher for R#1 compared with R#2. When the grid price is greater than the tariff charged by retailers, lower than the second retailer's grid price, and insufficient DERs capacity, a retailer with a lower tariff will profit negatively. For the given case, the filled marker in Fig. 4 shows the negative profit for R#2 as it has a lower tariff.
Variation in tariff charge for a fixed grid price shows a different behavior on power transactions pattern. It only affects the value of purchased quantities when the grid price for both retailers is same. Change in tariff value does not affect the power transaction for other cases. Obviously, profit for both retailers will change according to the tariff charges and grid price. It is also seen that R#2 yields negative profit when its tariff charge is lower than the grid price.

B. NETWORK COMPLIANT MPTP WITH NETWORK RECONFIGURATION
This section discusses the two case studies for the implementation of MPTP including the system operations aspect. One is a 16-bus distribution network with four players, i.e., 2 retailers, 1 RES, and 1 DG. Another is 94-bus real distribution network of a Taiwan Power Company with 13 players, i.e., 3 retailers, 7 RESs, and 3 DGs. The voltage at each bus other than feeder bus is limited by ±5%.

1) CASE I (16-BUS 4 PLAYERS SYSTEM)
The network comprises two DERs; DER1 is a solar plant with a capacity of 7 MW, and DER2 is a diesel generator (DG) with a maximum capacity of 9 MW with cost function parameter A k = 50 & B k = 6000 |/MW. They are installed at different buses as shown in Fig. 5. It is assumed that both retailers serve fixed load demand, and loads are divided between them. R#1 delivers power to the loads connected at buses 8 to 12, and the rest of the loads are fed by R#2. Input price data considered for this system is same as given in Table 1. Bus and line data are derived from [45].
According to the algorithm 2, the first step solved the MPTP to calculate the quantum that should be traded by the retailers. Results for iteration 1 (iter_1) are given in Table 4. Using the results obtained at step 1, reconfiguration   model is solved to find the best and feasible configuration of the network according to the MPTP solution. It gave an optimal configuration,Ẑ = {7, 8, 13}, i.e., line no. 7, 8, and 13 should be opened. The next step is to allocate losses among loads so that the loss compensated MPTP can be solved. Loss distributed to each load is given in Table 5 for configuration calculated at step 4 i.e. {7, 8, 13}. The estimated loss assigned to every load bus is depended on the quantity and location of load and DER. Now, each load demand is increased by its allocated loss value. Next, the convergence criterion is checked for this iteration. It is obvious from the initialization of Z (Z 0 ) that convergence will never meet at the first iteration. Therefore, the MPTP is simulated again to find the amount of power transaction with increased load demand. Table 4 shows the scheduling of DERs, power transactions, and profit of retailers for the second iteration. Finally, the algorithm obtains convergences at the second iteration and found optimal configuration same as previous iteration {7, 8, 13}. The whole algorithm takes around 3 s to run the simulation.
The first iteration (iter_1) gave the results without including the loss of the system, while the solution obtained at the second iteration (iter_2) is consolidated with the loss component. Since the DERs are scheduled at full capacity, the excess demand will be drawn from the grid. But R#1 is not taking any power from the grid. Therefore, DERs share is adjusted for maximum payoff. Expected profit is also showed a significant change as R#1 profit is increased by |2736.7 for only 73.32 KW increase of load, whereas R#2 profit is reduced by |2567.5 for an increase of 103.32 KW. This exercise supports the relevance of including network aspects for an accurate estimation of market outcomes. Additionally, this algorithm offers the players to predict actual generating revenue.

2) CASE II (94-BUS 13 PLAYERS SYSTEM)
In second case, a realistic distribution network of Taiwan Power Company is considered with three retailers and ten DERs. The distribution network is an 11.4 KV system with 11 feeders, 83 sectionalizing switches and 13 tie lines [46] as shown in Fig. 6. Ten DERs are installed at buses 16, 18, 23, 31, 39, 50, 64, 71, 87, 94, [47] in which three are DGs (diesel generators) at 64, 87, and 94, one is wind turbine at 71, and rest are solar plants [48]. All DERs are numbered according to their type such that DER1 to DER7 are RES and DER8 to DER10 are DG.
It is assumed that R#1 serves the customers connected to All three scenarios are converged in two iterations meeting both termination criteria. The simulation takes an average time of around 498 s. The optimal configuration obtained in all three scenarios is given in Table 6. Power transacted by retailers from grid and other DERs for all three scenarios VOLUME 11, 2023    are provided in Table 7, 8, and 9, respectively, along with retailer's profit. The converged final solution is shown in grey shade.
Since the grid price for R#3 is the lowest among the three retailers, R#3 purchases power from the WEM. From the concluding remarks observed in Section IV-A, it stated retailers draw power from grid and DERs whenever they have the same grid price. Likewise, R#1 and R#2 have the same grid price for the first two scenarios and make transactions with DERs and the grid.
In the third scenario, R#3 has the lowest grid price, so R#3 draws power from the grid as inferred from the second point of Section IV-A. According to the third point of Section IV-A, profit is evaluated as negative for the retailer who has a lower grid price when the grid price is higher than the tariff. In the same way, R#2 has a lower grid price between R#1 and R#2 for the third scenario; therefore, R#2 earns in negative profit.
The contribution of loss component to each load is plotted for all scenarios in Fig. 7. Additionally, load demand at each bus is also mentioned in Fig. 7. Further distribution of loss  and total demand to each retailer are provided in Table 10. Highest penetration of DERs in scenario 2 leads to low loss in the system. Likewise, the other two scenarios represent higher loss with lower DERs penetration. Allocation of loss to retailers is dependent on the network configuration that means no retailers have fixed share of loss for the given scenarios. For instance, bus 30 shows high loss for scenario 3 but lesser for other two scenarios as laid out in Fig. 7. It is because the tie line 91 is closed and DER4 has lower power injection for scenario 3.

C. EFFECTIVENESS OF NETWORK RECONFIGURATION MODEL
Network reconfiguration model provides an optimal configuration for the calculated power transaction obtained by the MPTP model. When the proposed simulation framework is implemented on base configuration, substantial differences have been observed compared to the solution obtained when reconfiguration is done. A comparison between two configurations is presented in Table 11 for different outcomes. For all test cases, a significant change in loss is noted between the reconfigured and non-reconfigured networks. In the case of the first test system (Case I), a total of 193 KW loss is determined, i.e., 16.4 KW more loss occurred than the reconfigured network. Furthermore, losses allocated to each load bus are also modified, which will ultimately change the actual power transaction (MPTP solution) and thus profit to each retailer. On account of that, Table 12 provides the  distribution of the loss component for the Case I, and when  compared with Table 5, a drastic change in loss allocation can be noticed. Thus, the total loss to each retailer will change and increase/modify the load demand and final power transactions to retailers.
The tolerance value of absolute error ξ considered for the convergence criteria shows a connection between the MPTP   model and reconfiguration that helps the network to absorb the outcome of MPTP model. For simulation framework with network reconfiguration model, the problems converge with a value lesser than the tolerance value of ξ . Whereas, Table 11 shows that ξ has a higher tolerance value for base configuration at the end of the second iteration. Further iteration is also not possible as the outcome of the loss allocation problem will be nearly identical to the previous iteration. Additionally, the voltage profile of the buses has deteriorated for all test cases when reconfiguration is not done. Moreover, the minimum voltage also falls below 0.95 p.u. for all scenarios of Case II. Hence, the above discussion endorsed the effectiveness of the network reconfiguration model.

D. DISCUSSION
The proposed simulation framework has provided the possible market outcome and its impact on the operational decisions of DSO. Thus, a detailed analysis of MPTP model has been performed for the calculation of market outcome considering four players in the market. The purpose of this analysis is to identify the trend of power transactions between retailers and privately owned DERs/grid. Further, simulation framework of MPTP maket model clubbed with network reconfiguration and loss allocation problem is investigated. It helps to achieve an accurate and feasible estimation of market outcome that includes power transactions between retailers and the grid, schedule of privately owned DERs and their transactions with retailers, and profits earned by all players.
In order to practically realize the proposed framework, it is implemented on a real distribution network of Taiwan Power Company where different scenarios are simulated to consider the intermittent nature of RES and grid price. The result obtained confirms the trend concluded for four players market structure.
Reconfiguration of a network has remarkably improved the performance of network operation in terms of loss, and voltage profile when compared with the solution when reconfiguration is not performed. Additionally, the evaluated optimal configuration assists the DSO's operational decisions for efficient network performance.
It is also observed that the simulation time taken by Case II is more compared with Case I. It is because of the reconfiguration problem. Network reconfiguration is a mixed integer second-order conic program which took time with an increase in system size. On the other hand, MPTP and loss allocation problems have taken approximately similar time in both cases.

V. CONCLUSION
A game theory based multi-player retail market simulation framework has been developed in this paper that includes the network aspects and DSO's operational activities. The market model is represented by a non-cooperative game and designed as a linear complementarity problem that guarantees the fairness of the market outcome by achieving Nash equilibrium. The results of the market model are used by the reconfiguration problem to find the optimal configuration for the feasible market outcomes by minimizing the differences between the outcomes of the two models. The loss allocation technique is devised with the proposed algorithm to calculate the accurate market outcomes for each player including losses.
The simulation framework has been studied on various test cases including a real distribution system that shows its validation and effectiveness. The trend of power transactions observed in the case of 4 players system is verified by the 13 players system, which further justifies our proposal. A comparison is also shown between the base and optimal configurations for different parameters like loss, minimum voltage profile, etc., showing notable advantages of using network reconfiguration and thus confirming the eminence of the proposed simulation framework.
Our future research work involves the study of the market framework that integrates energy storage devices as a private player along with other DERs considering the impact of uncertainty. It will be interesting to analyze the effect of deploying storage devices on power transactions among different DERs and retailers when energy suppliers change their behavior and start acting as a load with DSO's operational considerations.

APPENDIX A CONIC FORMULATION OF THE POWER FLOW EQUATIONS
Referring to conventional symbols, a general active power flow equation can be written as The expression for injected power P u is a nonlinear equation that can be linearized by replacing non-linear terms with new variables as given below: In terms of new variables, injected power (A1) can be written as On similar pattern, (A3) can be derived from the expression of reactive injected power.
It should be noted that from the definition of ℜ uv and ℑ uv , they are both constrained by (A4) which represents a rotating cone [49], [50].
In order to incorporate the variable network configuration within power flow equations (A2)-(A4) for the reconfiguration problem, new variables ℘ l u and ℘ l v are introduced for each line l connected between bus u and v. These variables are set to zero when the line is disconnected ( l = 0) and take the values of U v and U u , when the line is connected ( l = 1) considering (26) and (27). Thus, (A2)-(A4) are modified to (20), (21) and (24), respectively.