Introduction

The deregulation of electric power industry in Iran and many parts of the world is based on auction mechanism. For example, market participants in Iran wholesale spot market (a day-ahead electricity energy marketplace established in Iran) tender supply and demand curves for the day-ahead and hour-ahead energy markets in format of sealed bid. The spot market then constructs aggregated hourly supply and demand curves to determine market clearing prices (MCP). The importance of simulating bidding strategies of electricity markets can be investigated from several points. First part is related to the importance of comparison between actual results and optimal results from point of economic efficiency and lost welfare. In this way, market designers are continually trying to compare the present system and structure with efficiency criteria. Extraction between present deviations and observed differences is an appropriate tool to improve the market performance. Another importance of issue is related to participants’ strategies in the market. Generating companies require an appropriate theoretical and computational tool to bid an appropriate price and quantity to the market to evaluate accurately and increase profitability.

Song et al. (2003) proposed the new method of conjectural variation model (CV) and its application in electricity markets. The conjectural variation-based bidding strategy model helped generators to improve their bids and maximize their profits. Kian and Cruz (2005) have evaluated development of biddings in a dynamic multipolar electricity market. They took the electricity market as a non-linear dynamic system and modeled it using Nash discrete bidding strategies. Swider and Weber (2007) proposed a Bayes strategy for the strategic bidder while the others’ behaviors are modeled with a probability distribution. Gao et al. (2008) proposed two approaches to determine market bidding strategies by the support vector machine. Accuracy of methods was examined with an example.

Borghetti et al. (2009) proposed an analysis about the selecting process of the generators bidding strategies with regard to some constraints. This analysis was performed both for a simple approach of static game theory and for a cost-minimization unit-commitment algorithm using computer-based method. Bompard et al. (2010) used the linear supply function to find the Supply Function Equilibrium (SFE). They proposed a new and efficient approach to determine supply function equilibriums in the limited power markets by finding the best slope of the supply function with changing the intercept. Gong et al. (2011) have done a complete literature analysis on the state-of-the-art research of bidding strategy modeling methods. Chunhua et al. (2012) made the benefit/risk/emission comprehensive generation optimization model with objective of profit maximization and bidding risk and emissions minimization according to the coordinated interaction between generating companies’ outputs and electricity market prices.

Nojavan et al. (2013) have identified the optimal bidding strategy in day-ahead market using the Information Gap Decision theory. At bidding time, criteria such as generator characteristics and market price uncertainties that have a direct effect on the expected profit and the supply curve must be considered. Gap information decision-making indicates that risk aversion and risk taking will impact on the expected profit and the supply curve. The mentioned method has been applied to an unrealistic case study. Soleymani (2013) introduced a method to analyze the competition among companies with limited power transmission and incomplete information. In that method, supply function equilibrium was used for optimal strategies modeling of energy market participants and the Expected Function Equilibrium (SFE) was used to create an offer in the reactive power market. Finally, an experimental system was used to evaluate the effectiveness of the model. Mahmoudi et al. (2014) proposed a game theoretical model to show how plants maximize their utilities in each energy source by considering the government role in the competition of two power plants. Hafezalkotob et al. (2015) proposed a novel robust data envelopment model (RDEA) to investigate the efficiencies of decision-making units (DMU) when there were discrete uncertain input and output data. To illustrate the ability of proposed model, a numerical example of 38 Iranian electricity distribution companies was investigated. The results revealed that the RDEA model was suitable and reliable for target setting based on decision maker’s (DM’s) preferences when there are uncertain input/output data.

Sadjadi et al. (2015) presented an integrated decision model based on recent advances of geometric programming technique that managed Joint pricing and production. The demand of a product considered as a power function of factors such as product’s price, marketing expenditures, and consumer service expenditures. Furthermore, production cost considered as a cubic power function of outputs. Mousavi et al. (2015) presented some metaheuristic algorithms to simulate how generators bid in the spot electricity market viewpoint of their profit maximization according to the other generators’ strategies, such as genetic algorithm (GA), simulated annealing (SA) and hybrid simulated annealing genetic algorithm (HSAGA) and compares their results. The results of the simulations showed that GA outperforms SA and HSAGA on computing time, number of function evaluation and computing stability, as well as the results of calculated Nash equilibriums by GA are less various and different from each other than the other algorithms.

As seen above, main studies are performed based on the technical procedures and solely with the market simulation purpose. Studies are more based on the use of metaheuristic algorithms in development of computational models than the theoretical basics. Using various algorithms is the main advantage of these researches. On the other hand, the proposed methods have limited applications due to the required large size of data that are inaccessible. Modeling and simulating bidding strategies in a real and large market have not been performed yet. Moreover, the lost welfare measure or inefficiency of the Nash equilibrium in a real energy market has been rarely considered. So, the objectives of this article are:

  • Simulating Nash equilibrium of a real market with many participants.

  • Comparing the efficiency of the uniform pricing mechanism versus the pay-as-bid pricing mechanism in a large wholesale electricity market.

  • Calculating the deadweight loss of a real market such as Iran wholesale electricity market.

In addition, the assumptions of this article are:

  • There is at least a Nash equilibrium in the deregulated power industry.

  • The efficiency of the uniform pricing mechanism is more than the pay-as-bid pricing mechanism in a large wholesale electricity market.

  • The lost welfare of a real market such as Iran wholesale electricity market is computable.

In this paper, game theory and the Nash equilibrium are used as the theoretical basis of evaluation. This study tries to simulate the bidding strategy in Iran electricity market as a large electric power industry with about 370 generating units by relying on the mentioned principles and finally determine the Nash equilibrium of this real and large market. In addition, it intends to compute the lost welfare on the Nash equilibrium with uniform pricing mechanism and the real market with the pay-as-bid pricing mechanism and compare them to understand which pricing mechanism is more efficient. There are many challenges about pricing mechanism in researches by Son and Baldick (2004) Skoulidas et al. (2002). We practically examine the efficiency of them.

Implementation of proposed algorithm uses huge information to calculate Iran electricity market. Accordingly, implementation of this model is practically impossible for all days and we have to limit the modeling execution time. Hence, two specific models that characterize the minimum and maximum demand of Iran’s market are considered as two applicable examples. Market has faced maximum demand on July 24, 2012 with demand of 42,421 MW per hour and has faced the minimum demand on November 24, 2012 with demand of 23,487 MW per hour demand. These 2 days in 2012 have been selected for Nash equilibrium simulation. According to the information of the units (Iran Grid Management Co. 2012a, b), we compute the real supply curves of the market on July 24 and November 24, 2012. In addition, we compute and draw the competitive supply curves for two mentioned hours using the information like marginal costs of the generators that have been gained from the site of Iran Grid Management Co. (2012a, b). Then, we compare the lost welfare (efficiency) of the resulting equilibrium with the real supply curve by calculating the area between the competitive supply curve and each curve. The bigger area shows more lost welfare and less efficiency. We use the genetic algorithm, due to the simulation of real markets for the large number of participants is needed to an efficient and suitable computational tool.

Methods

Spot market

The spot market is only the real-time market (Stoft 2002). In a spot market, the seller delivers its production immediately and the buyer pays for it “on the spot”. (Kirschen and Strbac 2004). In the electricity market, two principal models of energy trading are considered:

  • The spot market

  • The bilateral agreements

Models are recognized by the bid matching processes and the price setting mechanisms. The concept of spot market is used as the basis for the modeling of a general competitive market structure. It provides the solution for specifying the optimal bidding strategies (Beck et al. 2008). The trading process of the spot market consists of following steps (Kirschen and Strbac 2004):

  • Generating companies submit their bids that are ordered pairs of the proposed prices and quantities to supply certain amounts of electrical energy for the period under consideration. These bids are ranked in order of increasing price. From this ranking, the supply curve of the market is built.

  • Similarly, the demand curve of the market is made by asking consumers to submit offers specifying quantities and prices and ranking these offers in decreasing order of price. Since the demand for electricity is highly inelastic, the demand curve is assumed to be a vertical line at the value of the load forecast.

  • The intersection of these supply and demand curves shows the market equilibrium. All the bids submitted at a price lower than or equal to the market price are accepted and producers are allowed to produce the amount of energy corresponding to their accepted bids. Similarly, all the offers submitted at a price greater than or equal to the market price are accepted.

  • Generators are paid the market price for every megawatt-hour that they produce, whereas consumers pay the market price for every megawatt-hour that they consume, irrespective of the bids and offers that they submitted. Generally electricity is traded as a quantity of energy at a certain price during a specific time period (1, 1/2 h).

Pricing mechanisms: uniform and pay-as-bid

The purpose of the energy auction and determining the prices is the optimization of both buyers’ and sellers’ general satisfactions. The main constraint in this optimizing problem is the equality between demand and supply in the market clearing. The amounts of generators’ productions and consumers’ consumptions with their corresponding prices are the output of this problem. After the optimization, the process of payment is done according to one of the methods of uniform or pay-as-bid pricing.

The procedure shown in Fig. 1 is based on the assumption that all market participants (generators) being used in the uniform pricing mechanism, receive the same price. They all receive the Market Clearing Price (MCP) or market price. Single-price energy auctions are the most widely used methods in electricity markets in the world. Another alternative is to use a pay-as-bid procedure that means all participants being used, receive the price they bid, not the MCP. The procedure is shown in Fig. 2 (Wangensteen 2005).

Fig. 1
figure 1

Uniform pricing mechanism

Fig. 2
figure 2

Pay-as-bid pricing mechanism

Indexes and parameters

The following indexes are used in the proposed model:

\(i\) :

Number of generators (\(i = \left\{ {1,2, \ldots ,N} \right\}\))

\(j\) :

Number of individuals/number of joint strategies (in this article, each generator can propose 3 strategies. Therefore, there are \(3^{N}\) joint strategies or individuals)

\(h\) :

Number of strategies that each generator can bid (In this article, each generator can propose 3 strategies)

The researchers consider the following parameters:

\({\text{MC}}_{{G_{i} }}\) :

Marginal cost of generator i

\(P_{{G_{i} }}\) :

Proposed price of generator i

\(Q_{{G_{i} }}\) :

Proposed quantity of generator i

\(P_{\text{cap}}\) :

Price cap of electricity market

\(Q_{{G_{i} }}^{\hbox{max} }\) :

Maximum generation capacity of generator i

\(Q_{{G_{i} }}^{\hbox{min} }\) :

Minimum generation capacity of generator i

\(U_{i}\) :

Set of available strategies of player i (each strategy contains an ordered pair of \(P_{{G_{i} }}\) and \(Q_{{G_{i} }}\))

\(u_{i}\) :

The specified strategy played by player i

\(\vec{u}\) :

Vector of all generators’ strategies (joint strategy: \(\vec{u} = \left\{ {u_{1} ,u_{2} , \ldots ,u_{N} } \right\}\))

\(U\) :

The finite set of strategies (in this article, each generator can propose 3 strategies. Therefore, there are \(3^{N}\) vectors of strategies in U)

\(J_{{G_{i} }} \left( {\vec{u}} \right)\) :

The profit of player i from the joint strategy of \(\vec{u}\)

\(J\left( {\vec{u}} \right)\) :

Generators’ joint profit

\(D_{i}\) :

An absolute value of difference between the gained profit in the current configuration j and the possible maximized value of the profit for player i

\(D\left( u \right) = F_{j}^{\text{abs}} = D_{j}\) :

Cost (objective) function (sum of the differences between amounts of profit obtained in the current configuration (joint strategy:\(\vec{u}\)) with the maximal possible amount of profit for each producer. It is equal to \(\sum\nolimits_{i} {D_{i} }\))

\(F_{j}^{\text{relative}}\) :

Relative fitness value of individual j

\({\text{MCP}}\) :

Market clearing price

\(p_{ih}\) :

\(h\)th proposed price of generator i

\(q_{ih}\) :

\(h\)th proposed quantity of generator i

\(f_{ih}\) :

Fitness of \(h\)th generator i’s bid

\({\text{HR}}\) :

Generators’ heat rate (\({\text{kcal}}/{\text{kW}}\,{\text{h}}\))

\(w^{\text{fuel}}\) :

Generation unit cost for fuel consumption (\({\text{Rial}}/{\text{kcal}}\))

\(w^{{{\text{SO}}_{ 2} }}\) :

Generation unit cost for emission of sulfur oxide (\({\text{Rial}}/{\text{kcal}}\))

\(r^{{{\text{SO}}_{ 2} }}\) :

Emission rate of sulfur oxide for generation unit

\(w^{\text{NO}}\) :

Generation unit cost for emission of nitrogen oxide (\({\text{Rial}}/{\text{kcal}}\))

\(r^{\text{NO}}\) :

Emission rate of nitrogen oxide for generation unit

\({\text{Cost}}^{{\text{O}}\&{\text{M}}}\) :

Maintenance variable cost of each unit (\({\text{Rial}}/{\text{kW}}\,{\text{h}}\))

Optimal bidding strategy/Nash equilibrium

Constraints of generators’ profit maximization

In the new deregulated environment, generation companies are free to charge any price for electricity they offer into the market taking into consideration some limits. Those limits are defined often by the regulatory and preventive measures like for example price cap (\(P_{\text{cap}}\)). Many electricity markets incorporate a price that is called “price cap” designed to prevent large price spikes (Kirschen and Strbac 2004). A price cap may be charged for a commodity. Price caps are used to prevent gouging during times of short supply or to limit price increases to a certain level. Price of bidding shall not be higher than this upper price limit specified by the market operator (MO) (Beck 2008). However, each generation company will solve its own profit maximization problem to get the benefit and the optimal generation schedule for the units. In this work, the principal actors are assumed to be the power producers selling the energy on a centralized market place. The objective of the optimization is to maximize the individual profit value. The profit (or payoff) of bidding generator \(J_{{G_{i} }}\) is computed in the following way:

$$J_{{G_{i} }} = \left( {P_{\text{market}} \times Q_{{G_{i} }} } \right) - \left( {C_{{G_{i} }} \times Q_{{G_{i} }} } \right)$$
(1)

where \(P_{\text{market}}\) is the MCP, \(Q_{{G_{i} }}\) is the quantity of power the generator \(G_{i}\) is scheduled to produce and \(\left( {C_{{G_{i} }} \times Q_{{G_{i} }} } \right)\) is the cost of energy production. Every generation company has an objective to maximize this profit from selling energy. To maximize the function mathematically we must take the derivative from both parts and equate them to 0:

$$\frac{{\partial J_{{G_{i} }} }}{{\partial Q_{{G_{i} }} }} = \frac{{\partial \left[ {P_{\text{market}} \times Q_{{G_{i} }} - C_{{G_{i} }} \left( {Q_{{G_{i} }} } \right)} \right]}}{{\partial Q_{{G_{i} }} }} = \frac{{\partial P_{\text{market}} }}{{\partial Q_{{G_{i} }} }} \cdot Q_{{G_{i} }} + P_{\text{market}} - \frac{{\partial C_{{G_{i} }} \left( {Q_{{G_{i} }} } \right)}}{{\partial Q_{{G_{i} }} }} = 0$$
(2)

For a case of perfect competition, market price does not depend on the quantity of a single generator and so the quantity derivation of market price is equal to zero:

$$\frac{{\partial P_{\text{market}} }}{{\partial Q_{{G_{i} }} }} = 0$$
(3)

Then, the optimal price offer will be equal to the marginal cost of production:

$$P_{\text{market}} = \frac{{\partial C_{{G_{i} }} \left( {Q_{{G_{i} }} } \right)}}{{\partial Q_{{G_{i} }} }} = {\text{MC}}_{i}$$
(4)

Since the perfect competition is an idealistic case, the real bidding price will normally be defined between marginal cost (MC) value and \(P_{\text{cap}}\) and will depend on the time of delivery and demand volume:

$${\text{MC}}_{{G_{i} }} \le P_{{G_{i} }} \le P_{\text{cap}}$$
(5)

In addition, for every single hour the bidding quantity should satisfy the general production limits.

$$Q_{{G_{i} }}^{ \hbox{min} } \le Q_{{G_{i} }} \le Q_{{G_{i} }}^{ \hbox{max} }$$
(6)

Equilibrium of supply and demand in each market is considered as an inevitable constraint.

$$\mathop \sum \limits_{k} Q_{{L_{k} }} = \mathop \sum \limits_{i} Q_{{G_{i} }}$$
(7)

Nash equilibrium

Assuming that the participants in the game theory are rational, their strategies are directed with their profits. So, each person chooses a basket of commodities that will maximize his utility.

$$\mathop {\hbox{max} }\limits_{x \in X} u_{l} \left( {x,\mu } \right)$$
(8)

In Eq. 8, x is the set of possible choices for person l, μ is a set of parameters that are out of control and \(u_{l}\) is his utility function. In the game theory, strategies that are in interest of the person depend on the strategies of other players (opponents). So, we can say that μ is the selected strategies of the opponent and x is the selected strategies of player l and \(u_{l}\) is his consequence. As a result, a player’s decision-making problem in the game theory is as follows:

$$\mathop {\hbox{max} }\limits_{{s_{l \in } S_{l} }} u_{l} \left( {s_{l} ,s_{ - l} } \right)$$
(9)

In this equation, \(s_{ - l}\) is the combination of selected strategies of all players (opponents of player l) except player l. The key difference between these equations is that in Eq. 14, player l does not know choices of opponents (\(s_{ - l}\)). But in the previous case, μ is known to the person. So, choosing the best strategy (\(s_{l} \in S_{l}\)) in the game theory is required to simultaneously analyze each player’s decisions against his opponents.

Nash equilibrium will occur according to the following conditions:

  • Players will select their strategies with the most consequence regarding to their belief about their opponents.

  • Players’ belief should be correct. It means that the opponent practically chooses the strategy that is in player’s belief. Mathematically, the combination of the strategy of \(s^{ *} = \left( {s_{1}^{ *} ,s_{2}^{ *} , \ldots ,s_{n}^{ *} } \right) \in S\) will be called Nash equilibrium if:

$$\begin{aligned} u_{l} \left( {s_{l}^{*} ,s_{ - l}^{*} } \right) \ge u_{l} \left( {s_{l} ,s_{ - l}^{*} } \right) \hfill \\ \forall s_{l \in } S_{l} \hfill \\ \forall l \in N \hfill \\ \end{aligned}$$
(10)

(Abdoli 2011)

Generators’ joint profit maximization

The complexity of the problem of optimal bidding strategies is when each generator’s profit (payoff) associates with other generating companies’ bidding strategies together. In this research, Nash equilibrium is used to solve this problem. Therefore, the problem changes from each generator’s profits maximization to simultaneous generators’ profits satisfaction and Nash equilibrium occurs when none of the participants is unilaterally reluctant to the change of the equilibrium and the solution. Mathematically, optimizing problem of the generators’ profits is considered as a search problem of vector \(\vec{u}\) that causes to maximize the function.

$$\vec{u} = \left[ {u_{1} ,u_{2} , \ldots ,u_{N} } \right] \in U$$
(11)
$$J\left( {\vec{u}} \right) = \left[ {J_{{G_{1} }} \left( {\vec{u}} \right), \ldots ,J_{{G_{i} }} \left( {\vec{u}} \right), \ldots ,J_{{G_{N} }} \left( {\vec{u}} \right)} \right]$$
(12)

The vectors \(\vec{u}\left( {P,Q} \right)\) are N market generators’ strategies that are extracted from a finite set (U). The vector \(\vec{u}\) is equal to the proposed prices and the relevant quantities of production for all generators.

Generating units’ short-term marginal cost

Much research has been done about costs of plants. For example, Kumar et al. (2015) have analyzed the cost of a coal-fired power plant using the NPV method. To calculate the MC of generating companies, Mansur (2008) has introduced the following equation that indicates the short-term marginal cost of generation for each year of power plant:

$${\text{MC}} = {\text{HR}} \cdot \left( {w^{\text{fuel}} + w^{{{\text{SO}}_{ 2} }} \cdot r^{{{\text{SO}}_{ 2} }} + w^{\text{NO}} \cdot r^{\text{NO}} } \right) + {\text{Cost}}^{{\text{O}}\&{\text{M}}}$$
(13)

where HR is the generator’s heat rate (\({\text{kcal}}/{\text{kW}}\,{\text{h}}\)). \(w^{\text{fuel}}\), Wfuel \(w^{{{\text{SO}}_{ 2} }}\) and \(w^{\text{NO}}\) are, respectively, generation unit costs for fuel consumption, emission of sulfur oxide and emission of nitrogen oxide (\({\text{Rial}}/{\text{kcal}}\)) and \(r^{{{\text{SO}}_{ 2} }}\) and \(r^{\text{NO}}\) are equal to emission rates of generation unit and also \({\text{Cost}}^{{\text{O}}\&{\text{M}}}\) is the maintenance variable cost of each unit (\({\text{Rial}}/{\text{kW}}\,{\text{h}}\)). As generators in Iran do not pay attention to the social costs in their bidding process, the costs of emission of sulfur oxide and emission of nitrogen oxide need not be considered in Eq. 13 (Nazemi et al. 2011). Therefore, short-term MCs of generators in Iran are achieved by Eq. 14.

$${\text{MC}} = {\text{HR}} \cdot w^{\text{fuel}} + {\text{Cost}}^{{\text{O}}\&{\text{M}}}$$
(14)

Power plants’ fuel consumption and HR for every unit are extracted from the document of “Detailed statistics of power generation in Iran” (Tavanir Expert Holding Company 2013). As the plants use several fuels (gasoline, fuel oil and natural gas), fuel consumptions of generation units are formulated in the marginal cost formula as the weighted averages. We use the energy balance document to specify the fuel prices of plants (Ministry of Energy 2013).

Formulation of the problem

In this article, we are evaluating the generators’ profits based on the market clearing price (market price). Getting a set of bids in which all generators gain satisfactory profits is the aim of this simulation. As mentioned above, the most important characteristic of Nash equilibrium is that the participants’ selection in it does not necessarily make the most payoff (Abdoli 2011). In this situation, all generators gain a satisfactory profit. So, we are searching the Nash equilibrium instead of the maximization of every generator’s profit. This goal happens when each participant mutually changes his bid until it has no incentive to change its decision. According to the characterization of Nash equilibrium in games, Nash equilibrium search from point of the minimizing objective function on a joint strategy space changes to an optimization problem. Consider game G with N players (\(\left\{ {1,2, \ldots ,N} \right\}\)). In this game, \(U_{i}\) represents the set of available strategies of player i. \(u_{i}\) is equal to the specified strategy played by player i and \(\vec{u} = \left\{ {u_{1} ,u_{2} , \ldots ,u_{N} } \right\}\) is a joint strategy for N players. The profit of player i from the joint strategy of \(\vec{u} = u_{1} ,u_{2} , \ldots ,u_{N}\) is equal to (\(J_{i} \left( u \right)\)). In such situation, the definition of Nash equilibrium for game G is as follows:

Combined strategy of \(u^{ *} = \left( {u_{1}^{ *} ,u_{2}^{ *} , \ldots ,u_{N}^{ *} } \right)\) will be the Nash equilibrium for game G if we have for all \(i \in \left\{ {1,2, \ldots ,N} \right\}\) and (\(u_{i} \in U_{i}\)):

$$J_{i} \left( {u_{1}^{ *} ,u_{2}^{ *} , \ldots ,u_{N}^{ *} } \right) \ge J_{i} \left( {u_{1}^{ *} , \ldots ,u_{i - 1}^{ *} ,u_{i} ,u_{i + 1}^{ *} , \ldots ,u_{N}^{ *} } \right)$$
(15)

We define the equilibrium search function \(D\left( u \right) :U \to R^{ + }\) as a function on the combined strategy space of U (\(U = U_{1} \times U_{2} \times \cdots \times U_{N}\)) to identify this equilibrium (Beck et al. 2008):

$$D\left( u \right) = \mathop \sum \limits_{i = 1}^{N} \left[ {\mathop {\hbox{max} }\limits_{{\'u_{i} \in U_{i} }} J_{i} \left( {u_{1} , \ldots ,u_{i - 1} ,\'u_{i} ,u_{i + 1} , \ldots ,u_{N} } \right) - J_{i} \left( u \right)} \right]$$
(16)

Our purpose is to minimize Eq. 10. If U is not Nash equilibrium, \(D\left( u \right)\) will be positive and otherwise will be zero. Joint strategy of \(u^{ *}\) will be an equilibrium for the game if \(D\left( {u^{ *} } \right)\) is zero. The above-mentioned function calculates the difference between payoff (profit) in the current situation and the maximal possible payoff for each producer. In this paper, optimization problem of bidding strategies in the electricity market for a particular period is generally as follows:

$$\begin{aligned} \hbox{min} D\left( u \right) = \mathop \sum \limits_{i = 1}^{N} \left[ {\mathop {\hbox{max} }\limits_{{\'u_{i} \in U_{i} }} J_{i} \left( {u_{1} , \ldots ,u_{i - 1} ,\'u_{i} ,u_{i + 1} , \ldots ,u_{N} } \right) - J_{i} \left( u \right)} \right] \hfill \\ S.t: \hfill \\ {\text{MC}}_{{G_{i} }} \le P_{{G_{i} }} \le P_{\text{cap}} \hfill \\ Q_{{G_{i} }}^{ \hbox{min} } - Q_{{G_{i} }} \le 0 \hfill \\ Q_{{G_{i} }} - Q_{{G_{i} }}^{ \hbox{max} } \le 0 \hfill \\ \mathop \sum \limits_{j} Q_{{L_{j} }} = \mathop \sum \limits_{i} Q_{{G_{i} }} \hfill \\ Q \ge 0\ \&\ P \ge 0 \hfill \\ \end{aligned}$$
(17)

Minimizing the lost welfare

Social welfare

In an ideal market the optimization problem refers to the problem of social welfare maximization. The aim of the Market Operator (MO) to meet the maximal demand at the minimal price corresponds analytically to maximization of the area between aggregated demand \(D\left( Q \right)\) and supply \(S\left( Q \right)\) curves in Fig. 3. The intersection of supply and demand curves gives a market price that is often called market clearing price or system marginal price (SMP).

Fig. 3
figure 3

Social welfare

The surface CS below \(D\left( Q \right)\) is defined as the consumer surplus and the surface PS above \(S\left( Q \right)\) is the producer surplus. The social welfare is nothing else but the total surface between curves \(D\left( Q \right)\) and \(S\left( Q \right)\).

$${\text{Social }}\,{\text{Welfare}} = {\text{CS}} + {\text{PS}}$$
(18)

The function that maximizes the surface between \(D\left( Q \right)\) and \(S\left( Q \right)\) is called social welfare function.

$${\text{Social Welfare function}} = \hbox{max} \mathop \smallint \nolimits \left( {D\left( Q \right) - S\left( Q \right)} \right){\text{d}}Q$$
(19)

Minimizing lost welfare or maximizing economic efficiency

Farrel (1957) defined the enterprise efficiency as generating an amount of output that was sufficiently more than a predefined amount of input. With this definition, he introduced several types of efficiency such as production efficiency, allocative efficiency and economic efficiency.

$${\text{Economic efficiency}} = {\text{Allocative efficiency}} \times {\text{Production efficiency}}$$
(20)

In general, the lost welfare is usually due to lack of production and allocative efficiencies. In the short-term wholesale electricity market, allocative efficiency is not considered. Because in a wholesale market, the supply side includes generators and the demand side are distribution companies. Accordingly, the demand curve is approximately vertical and without elasticity. This problem is caused by two reasons:

  • The end consumer does not pay attention to the wholesale market price. Because the end consumer encounters with the electricity retail market and restructuring has not been realized in this market, consumers face predetermined and adopted prices. Accordingly, consumers will not react to them by increasing the prices.

  • Companies who developed the demand side of wholesale market should guarantee to supply electricity to consumers in every price (Mansur 2008).

Therefore, Fig. 3 changes to Fig. 4:

Fig. 4
figure 4

Social welfare in short-term wholesale electricity market

Accordingly, to investigate the economic efficiency (social welfare) in short-term wholesale market, evaluation of production efficiency is sufficient. If the competitive market is independently able to operate and market price is achieved from the intersection of the supply and demand curves, social welfare will have the maximum value (Kirschen and Strbac 2004) and this market will have the maximum economic efficiency. So, in the short-term wholesale electricity market where the demand curve is approximately vertical and without elasticity, the amount of difference between result of Nash equilibrium curve and supply curve in state of perfect competition in which the price of plants’ bids are equal to their marginal costs represents the lost economic inefficiency of Nash equilibrium or lost welfare. In comparing supply curves of the real market of Iran with the Nash equilibrium, each of them which its curve has less distance with the curve of the competitive market is more efficient.

Structure of the game

This paper presents a static game with complete information. As we are analyzing bidding strategies in the spot electricity market for an hour, this game is static. In addition, the information about HR, \(w^{\text{fuel}}\), fuel consumption for each generator and any information to achieve MCs of plants are published (Ministry of Energy 2013). In addition, the maximum and minimum quantities of production of any generators are available (Iran Grid Management Co. 2012a, b). The price cap is also known. Therefore, each generator can get the space of other competitors’ payoff (profit). So, we can assume it as a static game with complete information. Nash equilibrium is the solution of this kind of game.

Genetic algorithm

The concept of the spot market is used as a base to model the structure of competitive markets. This concept presents a solution for the problem of dispatching in auctions and proposes the optimal bidding strategies in the electricity market. In this paper, we are facing the problem of Nash equilibrium calculation with the large number of generators that each generator has a set of specific strategies from quantity and price of electricity generation. Solving such a combinatorial problem by single enumeration has a complexity which grows exponentially with the number of players. The solution of this problem is based on the Nash equilibrium characteristics to search the minimizing function and relying on the metaheuristic methods is used to find the minimums. In this paper, we use the genetic algorithm (GA). GA is an oriented stochastic optimization technique that moves gradually towards the optimum point. This algorithm is applicable to every problem without any information about the problem and any restrictions on the type of variables. Its efficiency in finding the global optimum point has been proved. Capability of this method is in solving complex optimization problems in which either classical methods are not applicable or they are not reliable to find the global optimum (Fogel 2000).

Crossover

Crossover operator performs the partial exchange of characteristics (genetic material) between two individuals selected randomly from the current population. Therefore, newly created individuals inherit the characteristics of both “parents”. Position(s) of crossover is defined randomly. In this research, we use both simple crossover and double crossover by applying a roulette wheel. Figure 5 shows an example of a simple and a double crossover.

Fig. 5
figure 5

Crossover

Mutation operator

Mutation introduces random modifications in the population, it helps preserve the diversity and prevent the algorithm from the premature convergence. It is performed on a single individual by modification of one value in a chain of characters according to some probability that tend to zero. It can improve the fitness of individual or deteriorate it. Figure 6 shows an example of a mutation.

Fig. 6
figure 6

Mutation

Configuration of market bids

Every individual contains the information related to the operation of the spot market, more precisely the vector of “price-quantity” bids and the fitness function’s vector. An individual in the population is a string of length N, where N is a number of participants/generators in the market. The individual represents a unique bid configuration, where the offer h of the producer i (\(i \in \left[ {1 : N} \right]\)) is defined by a couple of price and quantity (\(p_{ih}\), \(q_{ih}\)). Each individual of the first population is initialized randomly from the given list of parameters. By analogy, the individual h contains N offers.

Individuals evaluation (fitness function)

Absolute fitness value (\(F_{j}^{\text{abs}}\))

In this work, we assume the framework of mandatory spot market where active participants can bid strategically above there marginal costs. An intersection between an aggregated offer curve and a demand produces a uniform spot market price (MCP) and a scheduled quantity of power for each generator (\(q_{i}\)). The quality of individuals in the population is evaluated according to the profit output of the market clearing process. In our case, we have adopted function D as an objective function of genetic algorithm that estimates the remoteness of the current solution from an optimal one. It measures the obtained payoff value of each participant that is an output of market clearing process. It calculates the sum of differences between values of payoff obtained in the current configuration with maximal possible value of payoff for each producer.

$$D_{i} = J_{i}^{ \hbox{max} } - J_{i}$$
(21)

where \(J^{\hbox{max} }\) is calculated over the set of possible bid’s variables (price and/or quantities) given the market bids of other players.

$$J_{i}^{\hbox{max} } (u^{*} ) = \mathop {\hbox{max} }\limits_{{u_{i}^{*} \in U_{i} ,u_{i} }} J_{i} (u_{i} ) .$$
(22)

So, \(D_{i}\) is an absolute value of difference between the profits obtained in the current configuration j and the possible maximized value of the profit for player i. The absolute value obtained by summing up those individual profit values \(D_{i}\) indicates the remoteness of current solution from an ideal one, where everyone could maximize its profit.

$$F_{j}^{\text{abs}} = D_{j} = \mathop \sum \limits_{{i = 1:N_{\text{Genco}} }} D_{i}$$
(23)

It is clear that our objective is to minimize (\(F_{j}^{\text{abs}}\)):

$$\hbox{min} F_{j}^{abs}$$
(24)

Individual who has the fitness equal to zero (D = 0) will satisfy the Nash equilibrium.

Relative fitness value (\(F_{j}^{\text{relative}}\))

To apply the operators of genetic algorithm we must be able to order the individuals according to their quality. To evaluate an individual within the population, the relative fitness value of each individual is calculated.

$$F_{j}^{\text{relative}} = 1 - \left( {F_{j}^{\text{abs}} /\mathop \sum \limits_{j = 1:k} F_{j}^{\text{abs}} } \right)$$
(25)

Relative fitness estimates fitness and suitability of individual j with respect to other individuals by following probability:

$$P_{j} = F_{j}^{\text{relative}} /\mathop \sum \limits_{j = 1:k} F_{j}^{\text{relative}}$$
(26)

Single-period auctions

This study evaluates the uniform spot day-ahead electricity market. Each configuration of bidding indicates one of the individuals in the genetic algorithm. Bids are arranged based on merit order rank and will produce the market supply curve. Intersection of supply and vertical demand curves shows uniform market output and price. Generators are able to change their bids to maximize their profit. This repeated process is implemented by genetic algorithm. The procedure of single-period market has been shown in Fig. 7.

Fig. 7
figure 7

Procedure of single-period market

Results and discussion

Iran electric power industry

In Iran like many countries, the conceptual and general scheme of Iran’s electricity industry restructuring is adopted in 2002 with the ultimate goal of increasing the productivity to participate the private sector, provide necessary resources for development of appropriate investment simultaneously the consumption growth in power industry and according to the second and third country’s development policies. The following features are the most characteristics of Iranian electricity market:

  • The model of Iran’s electricity market with respect to the size of energy exchanges is wholesale model and competition in the retail level has not already been activated.

  • From the point of the time frame of implementation, the electricity market of Iran is day-ahead market.

  • Payments mechanism to sellers is based on the pay-as-bid mechanism.

  • The mechanism of receiving from customers is based on the same method.

  • Rate of energy in the electricity market has a minimum price and a price cap. The amounts paid to the generators are determined by the amount of actual produced energy provided to the network. Bidders are allowed to propose energy supply curves in the ascending steps and maximum to 10 steps. If these prices are accepted in the electricity market, payment to units will be based on the bidding not on the maximum accepted price (Bank Meli Iran Brokerage Co 2012).

Of course, practical studies about biddings of generating units in Iran indicate that the majority of them offer their biddings in one step (maximum generation) or two steps (minimum and maximum generation rates) (Iran Grid Management Co. 2012a, b).

Implementation of Iran electricity market

Implementation of proposed algorithm uses huge information to calculate Nash equilibrium in Iran electricity market. Accordingly, implementation of this model is practically impossible for all days and we have to limit the modeling execution time. Hence, two specific models that characterize the minimum and maximum demands of Iran’s market in 2012 have been considered as two applicable examples. On July 24, 2012 with demand of 42,421 MW per hour, market has faced maximum demand and on November 24, 2012 with demand of 23,487 MW per hour demand, market has faced the minimum demand. These 2 days in 2012 have been selected for Nash equilibrium simulation. In regard to absence of renewable power plants in the electricity market of Iran, the amount of demand satisfied by renewable plants is deducted from the amount of demands. Some of the electricity demand that is provided by the other countries is deducted from the total demand. Accordingly, the amount of electricity market demand on July 24 and November 24 are, respectively, 37,361 and 22,164 MW per hour.

Number of allowed plants for bidding on July 24 is 370 units and on November 24 is 319 units. Study of bidding files of Iranian plants indicates that most of the generating units offer just one or two bids and certainly one of them is equal to their maximum power generation. Accordingly, in this article, each plant is allowed to offer three fixed bids as an ordered pair of price and quantity (one of them is equal to maximum generation, and rest of them will be offered randomly). By selecting a random bid (strategy) from each of the generation unit, a set of strategies will be created. For example, it is possible for the first unit to select the third strategy and for the sixth unit to choose the second strategy. After arranging these strategies according to the prices and determining MCP based on the intersection of supply and demand curves, units with the price higher than MCP do not enter the market. Application of metaheuristic algorithms in facilitating the process is to achieve the best and closest optimal solution in large and complex problems with a little calculation time. Each unit is allowed to offer three bids. So the number of different scenarios for the market on July 24 is \(3^{370}\) and on November 24 is \(3^{319}\). It is noteworthy that the price cap is equal to 330,000 (\({\text{Rial}}/{\text{MW}}\;{\text{h}}\)). Iranian currency is Rial. In 2012, each one dollar is equal to 12,260 Rials.

By performing the algorithm several times to achieve optimal tuning parameters, the parameters are determined as shown in Table 1. In this research, we performed the model with GA to get the Nash equilibrium about 30 times to achieve optimal tuning parameters. Sivanandam and Deepa (2008) say that the efficiency of GA to reach global optimum is largely determined by the size of the population. Practically, a population size of around 100 individuals is quite frequent, but anyway this size can be changed according to the time and the memory disposed on the machine. So, we ran GA with population sizes of 100, 200, 300, 400 and 500 with different crossover and mutation probabilities with respect to the huge size of the problem. The results showed that the population size of 300 was optimal. In addition, after not reaching the optimal strategy by performing the algorithm many times with one level of cross over and mutation parameters, we deduced that we should use crossover and mutation probabilities and mutation rate in some levels. In this paper, we gradually decreased the amount of crossover probability and increased the amount of mutation probability and rate simultaneously to achieve the Nash equilibrium.

Table 1 Tuning parameters of genetic algorithm

Short-term marginal cost of power plants

Information of fuel, heat value (HV) and heating rate (HR) for every power plant is extracted from document of “Detailed statistics of power generation in Iran” (Tavanir Expert Holding Company 2013). As the plants use several fuels (gasoline, fuel oil and natural gas), heating value and fuel consumptions of generation units are formulated in as the weighted average. Energy balance document is used to specify fuel price of plants (Ministry of Energy 2013). Variable maintenance cost of plants is also provided by Iran Grid Management Company.

Peak hour electricity market on November 24, 2012 (18:00)

The electricity market on November 24 included several types of plants: 21 % steam power plants, 9 % combined cycle of steam Power Plants, 27 % gas power plants and 43 % combined cycle of gas power plants. Simulation of electricity market in this day is performed in two ways:

  • In the first state, plants are allowed to choose any desired generation quantity and only one of their choices should be equal to the maximum of their power.

  • In the second state, generation units are required to choose their maximum power with different prices for each of their three bids.

According to calculated MCs for all allowed units in this day, the supply curve in the state of competitive equilibrium in which proposed prices are equal to units’ MCs and their quantities of generation are equal to their maximum power is drawn. The minimum and maximum power of plants was collected through the Energy ministry site (Iran Grid Management Co. 2012a, b). In addition, the real market supply curve is drawn according to the real amounts of units’ proposed prices and quantities (Iran Grid Management Co. 2012a, b).

The first case MCP in resulting Nash equilibrium is equal to 192,846 (\({\text{Rial}}/{\text{MW}}\,{\text{h}}\)) and 212 units of 319 generation units produce energy and 107 power units at this time of market are off. Combination percent of allowed plants in the Nash equilibrium in this day is 27 % steam power plants, 11 % combined cycle of steam Power Plants, 17 % gas power plants and 45 % combined cycle of gas power plants. By comparing these data with the actual data of plants in Iran electricity market, it is specified that after obtaining the market Nash equilibrium, a large number of 107 unallowable power generation units are gas and combined cycle of gas plants. Table 2 shows the numbers and percentages of offline and unallowable plants.

Table 2 Number and percentage of offline and unallowable plants (first case)

Figure 8 shows supply curves of the Nash equilibrium, the real market and the competitive equilibrium on November 24, 2012.

Fig. 8
figure 8

Supply curve of Nash and competitive equilibrium and real market on November 24 (first case)

In the real Iran market in which the pricing mechanism is pay-as-bid, generating companies tend to propose their prices more than their MCs and near to the price cap to achieve more profit. As shown in Fig. 9, many generators have bid their prices near to 330,000 (\({\text{Rial}}/{\text{MW}}\,{\text{h}}\)). Lost welfare or economic efficiency in the real market of Iran at the peak hour on November 24, 2012 is equal to 5,191,815,809 Rials. In addition, the lost welfare in the Nash equilibrium is equal to 1,872,871,680 Rials. So, the economic efficiency or social welfare of Nash equilibrium is 2.77 times as much as the real market.

Fig. 9
figure 9

Supply curve of Nash and competitive equilibrium and real market on November 24 (second Case)

The second case when the plants should offer their maximum power with different prices, MCP is equal to 178,113 (\({\text{Rial}}/{\text{MW}}\,{\text{h}}\)). 184 power plants are in startup mode and 135 power units do not have permission to generate energy at this hour of the market. Combination percent of allowed plants in the Nash equilibrium in this day is 33 % steam power plants, 13 % combined cycle of steam Power Plants, 11 % gas power plants and 43 % combined cycle of gas power plants. Numbers and percentages of offline plants based on their performance have been shown in Table 3.

Table 3 Number and percentage of offline and unallowable plants (second case)

Figure 9 shows the supply curve of the Nash equilibrium market, the real market and the competitive equilibrium market on November 24, 2012.

The lost welfare of Iran wholesale electricity market on November 24, 2012 is equal to 5,191,815,809 Rials and the lost welfare of Nash equilibrium is 1,444,323,868 Rials. Therefore, the efficiency or social welfare of Nash equilibrium is 3.6 times as much as the real market.

Peak hour electricity market on July 24, 2012 (21:00)

Due to the demand of 37,361 MW in this hour of market, all plants should generate at their maximum power to response this amount of demand. In regard to ability of each unit to offer three bids, many Nash equilibriums are achieved and one of them is reviewed in this paper. There are 81 steam power plants (22 %), 34 combined cycle of steam power plants (9 %), 100 gas power plants (27 %) and 155 combined cycle of gas power plants (42 %) in the electricity market on July 24. Figure 10 shows supply curves of Nash equilibrium, the real market and the competitive equilibrium in the market of July 24, 2011.

Fig. 10
figure 10

Supply curve of Nash and competitive equilibrium and real market on July 24, 2012

MCP is equal to 329,907 (\({\text{Rial}}/{\text{MW}}\,{\text{h}}\)) which is approximately close to the price cap. This price is much higher than the prices on November 24. Regard to the high demand and confidence of the plants about their generations with maximum power, increasing of bidding prices does not lead to the financial loss for them and does not force them to leave the market. Therefore, the MCP is coming closer to the price cap. The lost welfare in the Nash equilibrium is equal to 4,248,683,115 Rials and for the real market is equal to 8,488,258,338 Rials. It shows that the economic efficiency or social welfare of the Nash equilibrium is about 2 times as much as the real market.

As mentioned above, generating units bid their proposed prices close to the price cap to gain more profits in pay-as-bid pricing mechanism. But at the peak hours that all plants should generate at their maximum power to respond to the demand, the generators’ profits gained in the Nash equilibrium with the uniform pricing mechanism are equal to or even more than the profits in pay-as-bid. So, the uniform mechanism has the advantages of both more economic efficiency or social welfare and much generations’ profits than the pay-as-bid at the peak hours that all plants have to generate at their maximum power. Comparison of the profits of generators in the Nash equilibrium (uniform pricing) with the real market (pay-as-bid) is shown in Fig. 11. The summation of profits in the Nash equilibrium is 739,055,784 Rials more than the real market.

Fig. 11
figure 11

Comparison of the profits of Nash equilibrium with the real market on July 24, 2012

Conclusion and policy implications

This paper presents a new approach to model optimal bidding strategies in the electric power industries using Nash equilibrium concept and genetic algorithm and performs it in Iran electricity market. In addition, it computes the lost welfares of the Nash equilibrium with the uniform pricing mechanism and the real market with the pay-as-bid mechanism according to the competitive equilibrium and then compares them together. Using practical data, the proposed model is applied to the wholesale electricity market of Iran in 2012. Implementing this model is practically impossible for all days. Hence, two specific models that characterize the minimum and maximum demands of Iran’s market in 2012 have been considered. The results of simulations indicate the MCPs, number of allowed units and profit of each unit on both November 24 and July 24, 2012. It was observed that in the Nash equilibrium on November 24, there is 212 allowed plants for the first case (plants are allowed to choose any quantity of generation except one of them that should be equal to maximum Power) and 184 for the second case (plants should offer their maximum power with different prices); on July 24, all 370 plants should generate maximum energy due to the high electricity demand. There is a significant difference between lost welfare of the Nash equilibrium and the real market. Table 4 shows the results of simulations.

Table 4 Result of Iran electricity market simulations

MCP on July 24 is much higher than on November 24. Due to the high demand of market on July 24 and confidence of the plants about their generations with maximum power, increasing of bidding prices does not lead to the financial loss for them and does not force them to leave the market. Therefore, the MCP is coming closer to the price cap than on November 24. In addition, at the peak hours that all plants should generate at their maximum power like the case on July 24, the generators’ profits gained in the Nash equilibrium with the uniform pricing mechanism are equal to or even more than the profits in pay-as-bid. So, the uniform mechanism have the advantages of both more economic efficiency or social welfare and much generations’ profits than the pay-as-bid at the peak hours that all units should generate at their maximum power.

Future researches can be done for the dynamic states. It means, we should calculate the Nash equilibrium for a 24-h electricity market instead of 1-h market.