Finding Multiple Equilibria for Raiffa–Kalai–Smorodinsky and Nash Bargaining Equilibria in Electricity Markets: A Bilateral Contract Model

: In a deregulated market, energy can be exchanged like a commodity and the market agents including generators, distributors, and the end consumers can trade energy independently settling the price, volume, and the supply terms. Bilateral contracts (BCs) have been applied to hedge against price volatility in the electricity spot market. This work introduces a model to ﬁnd all solutions for the equilibria implementing the Raiffa–Kalai–Smorodinski (RKS) and the Nash Bargaining Solution (NBS) approaches in an electricity market based on BCs. It is based on creating “holes” around an existing equilibrium within the feasibility set, yielding a new (smaller) feasibility set at each iteration. This research has two players: a generation company (GC) and an electricity supplier company (ESC), aiming to achieve the highest proﬁt for each of them. The results present all possible RKS and NBS, in addition to showing all assigned energies for a case study at different time frames. The multiple equilibria solutions allow the ESC and the GC to apply different strategies knowing that they can still achieve an optimal solution.


Introduction
The deregulated energy sector permits the actors to interconnect in optimal trading strategies by bilateral contracts (BCs) or the spot market. Electricity acquired by a BC can be resold on the spot market and electricity bought in the spot market can be used to accomplish BC obligations [1,2]. BCs in a deregulated market secure delivery of a certain amount of electricity at agreed upon prices while the spot market can have very volatile prices. Nevertheless, negotiation procedures present a main defiance to optimize the agents' revenues given the possible buying and selling decision alternatives.
BCs are often used to reduce uncertainty and volatility risks of spot prices. High demand, for instance, results in a higher increase in the price of the electricity. Once the spot market prices have uncertainties, they can then have higher or lower prices than the forecasted ones, and the bilateral contracts then become an essential technique to support and mitigate risks.
This type of contract is negotiated based on the expected long-run price averages. Even though the contract can be applied to avoid risk, spot bidding may also allow the opportunity for higher profits to the players. High prices in the spot market favor the generation company (GC) to increase sales in this market reducing deliveries under BC. Concurrently, network [21,22]. The problem of electricity market equilibria with storage modeling was also analyzed in [22]. It is considered that the spot market trading of electricity includes different players like storage operators, producers, and consumers, where storage devices allow for shifting proceed electricity from one time period to a later one.
Relevant works have also been published regarding market equilibrium models applied to electricity markets [23,24]. The formulation of the electricity market applying equilibrium models as well as the distinction of these models related to the economics and commercial aspects of the problem have been addressed [23]. The implementation of electricity market equilibrium methods to assess not only the economic benefits of transmission expansions for market environments, and forward and spot markets, but short-term power system security has also been taken into account considering techniques to compute the electricity market equilibrium problems [24].
Apart from the previously mentioned works on Nash equilibrium, there are very few works dealing with bargaining solutions in electricity markets, other than the seminal paper [2] by Palamarchuk. He was the first to propose a different approach achieving a deal uniformly advantageous for both actors, the ESC and the BC. Moreover, it implements the Nash bargaining solution (NBS) to attain the relative concession to be made by both actors. Extending the work of Palamarchuk, another work has shown that a better outcome can be obtained implementing the Raiffa-Kalai-Smorodinsky (RKS) bargaining solution [25].
In this respect, one of the first works to show the connections between the NBS and the RKS is [26], where both approaches are compared for the supply chain contract negotiation problem, indicating that the RKS outperforms the NBS. In addition, Ruusunen [27] presents barter contracts in energy exchange between independent power companies, using a gametheoretic approach based on the NBS. An automated negotiation procedure for peer-to-peer electricity trading is developed in [28], based on the well-known Rubinstein alternating offers protocol. It constructs a Pareto frontier where both NBS and RKS are represented. Another bargaining model for the economic dispatch problem with demand response is shown in [29], using the RKS. The authors formulate a wholesale price negotiation problem between the generation company and multiple utility companies. Since the negotiation problem between the generation company and multiple utility companies is a bargaining problem, the RBS is applied to achieve the optimal bargaining outcome. A similar framework using the RKS is proposed in [30] in a smart grid, for an electricity market, which consists of a generation company, multiple electric utility companies, and consumers.

Main Contributions
The models proposed in this work aim to find a compromise solution, instead of finding a traditional non-cooperative equilibrium (Nash), as shown in most of the previously described works [1,[3][4][5][6][7][8][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24]. This research extends the findings of [25], showing that multiple solutions can be obtained when applying the NBS and the RKS for different values of the contract volume. To the best of our knowledge, there has been no other work showing all possible bargaining solutions in an electricity market context, describing the advantages for the players regarding the issue of knowing these different solutions within a timeframe. The advantage of being able to discern between various solutions lies in the possibility of buying or selling more energy in the spot market and using BC contracts depending on the prices of the market, as will be explained in the "Case Study" section. Therefore, the research gap relies on the fact that multiple solutions for the NBS and the RKS bargaining problems have not been analyzed yet in relation to electricity markets composed of both spot market and BC contracts.
The main contributions of this work can be considered the following ones: • the obtention of all multiple solutions when implementing the Nash bargaining (NB) and the Raiffa-Kalai-Smorodinsky (RKS) methods for an energy BC problem varying the values of the contract volumes for different time frames; • comparisons of the solutions obtained when applying the NBS and the RKS methods for the considered BC problem in the electricity market; and • description of the flexibilities the players can have to achieve the optimal solution in any of the NBS or the RKS applied approaches due to the existence of the multiple equilibria.
This paper implements the technique of creating a "hole" related to the already achieved solution in the feasible set (resulting in new feasible sets) to obtain all the optimal solutions [14]. The game assumes the existence of two players, an ESC and a GC, aiming to acquire a compromise approach implementing either the NBS or the RKS equilibrium. The input dataset includes the spot price scenarios and the demand for the end customers besides the production cost functions, the electricity generation limits, and the deliveries under the BCs. The methodology is implemented for different values of contract volumes in different time frames showing the total number of optimal solutions for the RKS and the NBS equilibria found. Therefore, the main innovation of this paper is the implementation of a model to obtain all the NBS and RKS equilibria for a BC problem in an electricity market. No other paper at this time, to our knowledge, has tried to achieve these results.
The paper is organized as follows. The background for the developed RKS and NBS problems is presented in Section 2 besides the analytical models applied for the bilateral contracts. Additionally, the methodology to obtain all optimal solutions is presented. The results when implementing the developed approach is shown in Section 3 obtaining the multiple equilibria for NBS and the RKS procedures. The conclusions are stated in Section 4.

Materials and Methods
The proposed model to obtain the multiple solutions for the NBS and the RKS is explained in the next subsections as well as the implemented compromise approach among the players. The BC model applied is also presented.

Multiple Equilibria Raiffa-Kalai-Smorodinsky and Nash Bargaining Solutions
In order to achieve either a RKS or a NBS in a cooperative game, the players aim to find an agreement favorable for all players. A structure to reach a solution for a bargaining problem was proposed by Nash where a feasible solution was attained as the result. A bargaining result is an equilibrium allocation satisfying the players giving them no grounds to negotiate any further.
The structure proposed by Nash included the axioms called symmetry (SYM), weak Pareto optimality (WPO), scale invariance (SI), and independence of irrelevant alternatives (IIA) [16]. Afterwards, the IIA axiom was substituted with a monotonicity axiom, yielding another structure where the solution was directed to ideal parties payoff related to the maximum likely payment that one actor could attain independently, this being called the RKS solution [31,32]. This concept was a critique of the Nash approach as the NBS could give a worse result even if it had a larger feasible set.
When analyzing Figure 1, one can observe the RKS and the NBS. The obtained NBS when the viable region limited by Curve 1 is represented by point A. When the feasible set is represented by Curve 2, the new NBS solution is given by point B, making player 2 worse off, even though Curve 2 has a larger feasible set than Curve 1. For the RKS approach, the obtained solution achieved when the feasible set is limited by Curve 1 is represented by point u * 0 ; whereas, if the viable region is given by Curve 2, point u * n represents the new solution, both players will better off if the RKS technique is implemented ( Figure 1). Thus, the RKS bargaining solution is a Pareto optimal point in the line from d to the ideal solution, h [31,32]. Finally, a bigger viable region having the same ideal result represented by point h, in Figure 1, achieves a bargaining result better (or no worse) for all actors when implementing the RKS approach. Therefore, the RKS bargaining result is a Pareto optimal point where both actors obtain an equal proportion of their potential utility benefits estimated by [28,29]: Further analysis can be made to find all the RKS and the NBS equilibria for the BC problem in electricity markets. This work proposes then to find all RKS and NBS equilibria where two players are considered, a GC and an ESC. The applied methodology is represented by Figure 2, where an initial feasible set is considered. Whenever a solution is obtained, either for the RKS or the NBS problem, a "hole" of radius r related to that solution is made in the feasible set, resulting in a new feasible set. A new solution, taking into account a new reduced feasible set, is obtained. The procedure continues until the newly obtained solution, either applying the RKS or the NBS approaches, results in a new value for the objective function which is worse than the initial one when adding an extra constraint related to the hole. Certainly, the radius r in the hypersphere hole has to be very small and the new result must not belong to the border of the hypersphere hole, otherwise another new solution could be missed [14].

Bilateral Contract Scheduling
In this work, scheduling refers to the quantity of electricity being conveyed at each interval t during the contract period [2]. The parties, either the GC or the ESC, schedule the electricity deliveries to maximize their profits having forecasted the electricity prices in the spot market. Therefore, the electricity prices in the spot market are random variables [33].
In order to compare our results with previous ones [2,25] we define: Type I: The buyer (ESC) aims to maximize its predicted profit, called S 1 , determining the electricity quantity to be conveyed by the BC, at each time interval t. The supplier (GC) must assure the electricity to be dispatched in agreement with the buyer's demands.
Type II: The supplier (GC) aims to maximize its predicted profit, called S 2 , determining the electricity quantity to be sold respecting the contract at each time interval t. The buyer (ESC) has to accept the required electricity in agreement with the GC maximizing the GC predicted profit.
The following equations are then applied to solve contract Types I and II [2,25]. For the Type I contract, ESC's profit (S 1 ) is evaluated by: where E is the mathematical expectation symbol. Furthermore, J is the contract value, being a constant in this research, since the actors agree on a contract price in their BC. Moreover, p t d and p ∼t s represent the electricity price for the final consumers in the retail market at period t and the discrete level of the spot market price, respectively. Finally, x t k , x t s , and x t ss represent the quantity of electricity delivered under the BC and sold to end consumers, the quantity of electricity bought by the ESC in the spot market, and the quantity of electricity received by the ESC under the BC and sold in the spot market all at period t, respectively. The aim to maximize the profit means to maximize the predicted sales revenue, R 1 , in the spot and the retail markets: subject to: (a) the total contract volume: (b) the sales to end consumers: (c) the delivery quantity by the contract at time intervals: (d) the non-negativity of variables: The ESC solves the problem (3)- (7) to schedule the electricity deliveries x t , t = 1, . . . , N for the contract interval, it then takes it to the GC. The GC must agree to the supply electricity according to the schedule proposed by the ESC.
Regarding the contract of Type II, the GC maximizes its profit, S 2 , concurrently trading in the spot and in the BC markets. The GC's production cost function, C t k x t g , is given as a function of the electricity generation, x t g , and it is evaluated by the optimal unit commitment [3].
Regarding the contract of Type II, GC's profit (S 2 ) can be given as: where p ∼t s represents the discrete level of the spot market price. Furthermore, x t gss , x t gs, and x t c represent the quantity of electricity produced by the GC and sold in the spot market, the quantity of electricity bought by the GC in the spot market being dispatched under the BC, and the quantity of electricity produced by the generation company (GC) and delivered under the BC all at period t, respectively.
subject to: (a) the electricity generation at each interval: (b) the delivery amount under the contract at individual intervals: (c) the non-negativity of variables: The Type I and II problems are solved applying a stochastic dynamic programming approach where an increment in the electricity distributed at a period means a decrement at the others [2,25]. Once (3)- (7) and (9)-(12) are solved, the maximum profits are evaluated and the compromise approach is applied achieving either the RKS or the NBS.

Raiffa-Kalai-Smorodinsky and Nash Bargaining Solutions for Bilateral Contract Scheduling
The advantage that a player has over the other one, by obeying the consigned schedule, can be mitigated implementing a compromise approach for BC scheduling. The implementation allows to determine the electricity deliveries achieving relative equal benefits to parties. Therefore, the actors, the Gc and the ESC, can schedule deliveries jointly or by a neutral third player.
When solving the compromise approach, the GC and the ESC schedule their deliveries separately. If the ESC schedules deliveries x t , t = 1, . . . , N independently, it solves the problem (3)-(7) obtaining its maximum profit, S * 1 . Similarly, if the GC schedules the deliveries x t , t = 1, . . . , N separately, it will not pursue the dispatch schedule given by the ESC. The compromise approach replaces constraint (11) in problem (9)-(12), with the following ones: and the quantity dispatched under the BC at the times t must obey: In order to solve the RKS bargaining problem, the objective function aims to maximize the revenues of the parties being represented by [25]: Adding the constraint related to the RKS solution: where J 0 represents the contract value given by the solution of the Types I and II contract problems, being given by J 0 = 1 2 R * 1 + |R * 2 | . The following conditions represented by (17)-(23) must also be satisfied: subject to: (a) total contract volume: (b) sales to end consumers: (c) electricity generation at each interval: (d) quantity of deliveries under contract at certain periods: (e) non-negativity of variables: The number of the equilibria methodology implementing the NBS is compared with the results implementing the RKS just described. When implementing NBS, the objective function aims to minimize the concessions of each actor in the game, given by k ( [2,25]): Furthermore, k is equal to: Finally, once having obtained one of the solutions for the RKS and the NBS, solving Equations (15)- (23) and Equations (17)- (25), respectively, a hole of radius r centered in the obtained solution must be added to the feasible set, given by: where an optimal solution is given by the set (x * t k , x * t s , x * t, ss , x * t c , x * t gs , x * t gss ) and the new one is given by x e t k , x e t s , x e t, ss , x e t c , x e t gs , x e t gss . The radius r in Equation (26) has to be small enough in order to not miss any result within the hypersphere hole, and the result must not belong to the border of the hypersphere hole [14]. Therefore, whenever a new optimal solution is found, where the objective function has a value equal to the previous one, a new constraint given by Equation (26) is added to the problem.
The following flowchart (i)-(v) summarizes the implementation of obtaining multiple equilibria for the RKS and the NBS.  23) and (17)- (25). If the problem is solved for the first time, store the objective function value. (iv) If the obtained optimal solution is the first one, store its value. Make a hole in the feasible set applying Equation (26)     Constraints for the optimization problem electricity generation limits, MWh

Case Study: Numerical Results for Multiple Equilibria-RKS and NBS
The dataset applied in this research by the parties ESC and GC, in order to compare the solutions of this work with previous researchers, is given in Tables 1 and 2 [2,25]. It was assumed that the contract periods consist of three equal time intervals. This section shows the obtained results for the GC and the ESC in detail, then, it shows the number of optimal solutions when applying the RKS and the Nash approaches.

Revenues and Concessions Implementing the RKS and the NBS Methodologies
The obtained results by the ESC and the GC are presented in Tables 3 and 4. In particular, Table 4 shows the results for values of the contract volume from V = 130 MWh to V = 170 MWh. With independent scheduling, as in contract type I, and solving problems (3)-(7), the ESC obtains the maximum revenue, R * 1 , equal to $1807.9. When the GC applies its independent scheduling (as in contract type II), it solves problems (9)- (12), and, for V = 145 MWh, the GC has total expenses |R * 2 | that amount to $1493.3. Therefore, Table 4 gives the detailed results for the profits, concessions and contract values, J, when V = 145 MWh. A similar table could be obtained for the other values of the contract volumes used in this research, nevertheless, a summary of the obtained results is given in Table 4.
The relative concessions made by the ESC and the GC are shorter also when implementing the RKS bargaining solution. These concessions show how much of the maximum profit the players have to surrender to obtain the equilibrium. Finally, quite interestingly, the minimum relative concessions are obtained when V = 165, both for the RKS and the NBS approaches, being equal to 46.33% and 48.86%, respectively.
The total number of solutions obtained for the RKS and the NBS problems is given in Table 4. The results were then obtained for the compromise approach for the RKS solving Equations (15)-(23) and the solutions for the NBS were attained solving Equations (17)- (25), and they agreed with previous solutions [25]. Analyzing Table 4, when applying RKS and NBS, the contract values obtained for the BC, J, are always higher for the RKS case than when applying the NBS.

Number of Solutions Varying the Contract Volumes for the RKS and the NBS Problems
The results obtained for the multiple equilibria for the RKS and the NBS bargaining problems are also shown in Table 4. The maximum number of solutions for the RKS case is obtained when V = 145, being a total of 21 solutions. There are three other cases where the number of solutions for the RKS problem is quite high, being equal to 13 (V = 160) and 7 (V = 130 and V = 135), giving the players higher flexibility to achieve their maximum profits depending on the contract values (V).
When analyzing the NBS given in Table 4, the maximum number of solutions is obtained when V = 145, being equal to 19 solutions. Like the RKS bargaining problem, there are two other cases where the number of solutions for the NBS is large, given by 11 (V = 160) and 6 (for V = 140). These solutions show again the players' flexibility to achieve minimum concessions for the NBS compromise approach.
When analyzing Figure 3, one can see how the number of solutions varies depending on the contract volumes. For this particular work and the dataset used, the RKS methodology always has a higher number of equilibria than the NBS for the same contract volume, V. Moreover, it is interesting to note that the results showing the RKS and the NBS graphs have similarities, like the two main peaks and valleys. Nevertheless, with caution it can be concluded that the RKS approach would not only obtain a higher number of solutions than the NBS, but also have the similarities observed on Figure 3. This is an important issue since they are different types of equilibria.
Finally, the different solutions obtained for the RKS and the NBS are shown in detail in Tables 5 and 6 for contract volumes equal to V = 165 MWh and V = 140 MWh, respectively.

Values of ESC Variables Values of GC Variables
Time Intervals

Values of ESC Variables Values of GC Variables
Time Intervals

Analysis for the Time Intervals When Solving the RKS and the NBS Problems
When applying the RKS methodology for V = 165 MWh, the concessions made by the players are equal to 46.33% and 6 different solutions can achieve this concession. See Table 5. Let us understand its importance supposing that the ESC has forecasted a "higher" price in the spot market at the interval time t 1 . Comparing, for instance, solutions 1 and 3, the ESC would prefer a solution where it would buy a lower amount of electricity in the spot market at the interval time t 1 (lower values of x t s ), but it would sell a higher amount of electricity in the spot market (higher values of x t ss ). Therefore, analyzing the values of x t s and x t ss for solutions 1 and 3, the ESC would choose solution 3, since it buys a lower quantity of electricity in the spot market at t 1 (the value of x t s decreases from 9.30 to 8.88 or about 4.5%), and the quantity of electricity sold to the spot market is much higher at t 1 for solution 3 than for solution 1 (the value of x t ss increases from 8.98 to 12.52, about 39.4%).
A similar analysis when applying the NBS methodology for V = 140 can be made where the players achieved concession is about to 47.86% and 6 different solutions can obtain this concession. See Table 6. Let us once again understand its relevance supposing that the GC had forecasted a "higher" price in the spot market at the interval time t 1 . If one compares solutions 2 and 3, for instance, the GC would choose a solution where it buys a lower amount of electricity from the spot market at interval time t 1 (lower values of x t gs ), but sells a higher amount to the same market (spot market), where the value of x t gss increases from 9.8 (solution 3) to 13.4 (solution 2), about 26.3%. Hence, solution 2 should be selected. These detailed analyses emphasize the importance of obtaining the multiple solutions for the studied problem. Certainly, other problems where different types of equilibria can be achieved can have the same patterns of this research giving the players higher flexibility to obtain solutions the equilibrium.
All the results presented were obtained on a laptop having a processor Intel Core i7 at 2.59 MHz and 32 Gb of RAM. The evaluations were made in Matlab and the processing time was about one minute and a half to obtain one solution for any of the applied approaches, the RKS and the NBS ones. Therefore, for the problems where the number of solutions increase, like 21 or 19 solutions, the running time is about 40 min.

Conclusions
This paper has presented a method to achieve multiple equilibria for a BC problem once implementing either the RKS or the NBS. The evaluations show all the multiple solutions for the RKS and the NBS applied approaches if one changes the contract volume values from V = 130 MWh to V = 170 MWh. The maximum number of solutions for the RKS and the NBS is obtained when V = 145 being equal to 21 and 19, respectively.
When applying either the RKS or the NBS, the lowest number of optimal solutions is equal to 3 and 2, respectively for V = 155, for example. These results of multiple equilibria are quite important since a compromise approach can be achieved applying different strategies, considering, for instance, the forecasted amount of electricity for the spot market. When a higher price of electricity is forecasted on the spot market for any time interval, either the ESC or the GC will aim to apply a strategy where they buy less electricity in the spot market, but they sell more energy to that same market. Therefore, this research contributes to the study of this problem, since it allows the players to choose a strategy depending, for instance, on the forecasting of the electricity prices.
The developed model can be improved if one includes, for example, forecasting or other factors like water storage and weather uncertainties. Moreover, the consequences of the developed RKS methodology regarding the matching of producers and consumers participating in the energy market will be taken into account [34]. Finally, the problem of peer-to-peer trading among players allowing small and flexible actors to enter the markets is also an interesting one and it can be studied in future works [35,36].

Conflicts of Interest:
The authors declare no conflict of interest.

Notation
The notation for the variables, functions, numbers and an acronym list used in this paper are described next.