# Optimal Day-Ahead Bidding Strategy for Electricity Retailer with Inner-Outer 2-Layer Model System Based on Stochastic Mixed-Integer Optimization

Authors: Yuwei Wang; Jingmin Wang; Wei Sun; Mingrui Zhao
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

Bidding in spot electricity market (EM) is a key source for electricity retailer (ER)’s power purchasing. In China for the near future, besides the real-time load and spot clearing prices uncertainties, it will be hard for a newborn ER to adjust its retail prices at will due to the strict governmental supervision. Hence, spot EM bidding decision-making is a very complicated and important issue for ER in many countries including China. In this paper, an inner-outer 2-layer model system based on stochastic mixed-integer optimization is proposed for ER’s day-ahead EM bidding decision-making. This model system not only can help to make ERs more beneficial under China’s EM circumstances in the near future, but also can be applied for improving their profits under many other deregulated EM circumstances (e.g., PJM and Nord Pool) if slight transformation is implemented. Different from many existing researches, we pursue optimizing both the number of blocks in ER’s day-ahead piecewise staircase (energy-price) bidding curves and the bidding price of every block. Specifically, the inner layer of this system is in fact a stochastic mixed-integer optimization model, by which the bidding prices are optimized by parameterizing the number of blocks in bidding curves. The outer layer of this system implicitly possesses the characteristics of heuristic optimization in discrete space, by which the number of blocks is optimized by parameterizing bidding prices in bidding curves. Moreover, in order to maintain relatively low financial-risk brought by clearing prices and real-time load uncertainties, we introduce the conditional value at risk (CVaR) of profit in the objective function of inner layer model in addition to the expected profit. Simulations based on historical data have not only tested the scientificity and feasibility of our model system, but also verified that our model system can further improve the actual profit of ER compared to other methods.


---

## Body

## 1. Introduction

The spot electricity market (EM) is a crucial component in the EM system [1]. In recent years, electricity retailers (ERs), representing different types of electricity consumers, have experienced an unprecedented growth in the spot EMs worldwide [2]. In China, spot EM pilots that allow ERs' participation will be implemented in 8 provinces by the end of 2018 [3].The participation of newborn ERs in China's spot EM as the most important provider is critically challenging [3, 4]. On one hand, the retail prices will still be fixed or under the government’s supervision for many types of consumers (e.g., residents and utilities) in China [5]. That is to say, it is difficult for ER to adjust its retail prices at will which can directly affect its profit. On the other hand, like many spot EM systems worldwide, clearing prices in different market stages (e.g., day-ahead and balancing/real-time markets) as well as real-time load profiles of different consumers are uncertain beforehand. That is to say, it is difficult for ER to make its spot EM bidding decision due to clearing prices and real-time load uncertainties which can also directly affect its profit. Therefore, it is definitely important to propose a scientific and feasible approach for bidding decision-making so that ERs can be more beneficial under China’s spot EM circumstances in the near future. Moreover, if slight transformation is implemented, improving ERs’ profits under most existing EM circumstances (e.g., PJM and Nord Pool) can also be realized.In recent years, different models have been presented in technical literatures to specify ER’s bidding decision-making problem under spot EM circumstances. Authors in [6], considering spot EM clearing prices and real-time load uncertainties, set up a bidding decision-making model for ER to participate in the day-ahead market based on the stochastic optimization method. Under the same consideration for uncertainties, [7] applied the demand price elasticity matrix to model the demand responses of different types of electricity consumers to retail electricity price. Based on this demand price elasticity matrix, the stochastic day-ahead market bidding decision-making model was proposed for ER. Authors in [8] introduced the assumption of “price-maker,” and take the same approach in [7] for ER’s spot EM decision-making problem. Similar to [6–8], the spot EM bidding decision-making models for ER set up by stochastic optimization methods can also be reflected in [9–12]. In the case of many uncertain parameters such as the abovementioned bidding decision-making problem for ER, the robust optimization method can also be well applied in addition to the stochastic optimization one. [13] proposed a decision-making model for an ER with distributed generation (DG) units to determine the optimal combinatorial power procurement strategy from different EM stages (forward and spot EMs) based on the robust optimization method. In [14], a robust optimization based decision-making model was set up for an ER to determine its power procurement strategy from day-ahead and balancing markets. However, approaches in [13, 14] do not consider and deal with the uncertainties brought from the real-time load profile. Similar to [13, 14], the spot EM bidding decision-making models for ER set up by robust optimization methods can also be reflected in [15–19]. As mentioned in [20], in spot EM circumstances and if neglecting intraday markets [6–20], an ER often submits price-energy demand bidding curve to the day-ahead market and only energy quantity bids to the balancing markets in order to counterbalance the deviations from the scheduled day-ahead loads to the corresponding actual ones. A price-energy demand bid is in fact a piecewise staircase price-energy curve [20, 21], the number of which corresponds to the number of time units in a delivery day. Evidently, day-ahead bidding curves generated in [6–12] are piecewise but not staircase ones. Authors in [13–19] focus only on the decision of the optimal distribution of power procurement but do not consider bidding prices in spot EMs. Authors in [20] proposed a spot EM bidding decision-making model for a “price-taking” ER based on the stochastic mixed-integer optimization method. Day-ahead bidding curves generated in this model possess the characteristics of both piecewise and staircase. Methods similar to that in [20] can also be seen in [21].Piecewise staircase bidding curve conforms to the actual situations of most EM circumstances in the world including China [1, 3, 4, 20, 21]. There should be 2 groups of factors in this curve that must be well optimized: the number of blocks in this curve and the bidding price of every block. That is because adjusting both of these 2 factor groups can directly affect the ER’s profit. Unfortunately, as far as we know, methods to generate piecewise staircase bidding curves for ER (including that in [20, 21]) only make decisions on the bidding prices while neglecting optimizing the number of blocks. Therefore, it is definitely necessary to propose a scientific and feasible approach for ER’s spot EM bidding decision-making. By implementing this approach, both the bidding prices and the number of blocks in ER’s piecewise staircase bidding can be optimized alternately.In summary, the contributions and novelties of this paper can be listed as follows:( 1 ) In the aspect of application contributions, we consider the features of China’s EM circumstances in the near future which mainly reflect in this paper as fixed or strictly supervised retail prices as well as clearing prices and real-time load uncertainties. Hence, our proposed spot EM bidding decision-making model system can make ER more beneficial under these circumstances. Moreover, if the demand response formulation (e.g., the demand price elasticity matrix) is introduced, it is easy to extend our proposed model system to be applied to other deregulated EM circumstances (e.g., PJM and Nord Pool).( 2 ) In the aspect of theoretical innovation, we pursue optimizing the number of blocks in the piecewise staircase bidding curve and the bidding price of every block simultaneously. Hence, a model system with 2-layer decision-making structure is proposed in this paper for ER’s day-ahead piecewise staircase bidding curves optimization. The inner layer of this system is in fact a stochastic mixed-integer optimization model. Through implementing the inner layer model, the bidding prices are optimized not only by considering day-ahead and balancing clearing prices as well as real-time load uncertainties, but also by parameterizing the number of blocks in bidding curves. The outer layer of this system implicitly possesses the characteristics of heuristic optimization in discrete space. Through implementing the outer layer model, the number of blocks is optimized by parameterizing bidding prices in bidding curves. Moreover, in order to maintain relatively low financial-risk brought by clearing prices and real-time load uncertainties, we introduce the conditional value at risk (CVaR) of profit in the objective function of inner layer model in addition to the expected profit.The rest of this paper is organized as follows: in Section2, our methodology for ER’s bidding decision-making problem in spot EM is mathematically proposed, which is equivalent to an inner-outer 2-layer model system based on stochastic mixed-integer optimization. Section 3 presents a step-by-step solution procedure for our model system which can determine both the number of blocks in ER’s piecewise staircase bidding curves and bidding price of every block under clearing prices and real-time load uncertainties. Simulation and model comparisons are implemented in Section 4 for verifying the feasibility and rationality of our model system, and Section 5 concludes the paper.


## 2. Methodology

### 2.1. Relevant Explanation and Hypothesis

In this Section,the inner-outer 2-layer model system based on stochastic mixed-integer optimizationis mathematically formulated for ER to make bidding decisions in spot EM. For the sake of simplicity and without loss of generality, we make some assumptions and explanations listed as follows before conducting any further research:( 1 ) Similar to [6, 7, 9–21], this paper considers the ER as a “price taker” participating in spot EMs. This is equivalent to the fact that the bidding behaviors of ER will not affect clearing prices in spot EMs.( 2 ) Similar to [6–20], the spot EMs are assumed to contain only 2 market stages: the day-ahead and balancing markets. Intraday market stages are neglected due to their small trading amounts.( 3 ) Due to the lack of demand response incentive mechanisms in China (the retail prices will still be fixed or under the government’s strict supervision in the near future [5]), ERs cannot control the real-time loads of consumers quickly and accurately in the stage of balancing markets.


### 2.2. The Day-Ahead Bidding Decision-Making Model for ER

According to the assumptions and explanations mentioned above, for a delivery day, a “price taker” ER is assumed to successively participate in 1 day-ahead market andT balancing markets. In the day-ahead market stage, ER needs to make decision on itsT piecewise staircase bidding curves corresponding toTtime units of the next day (delivery day), where uncertainties of day-head and balancing clearing prices as well as real-time load must be taken into consideration. As time goes on, balancing markets for the delivery day are launched one by one. In the tth (1≤t≤T) balancing market stage, ER can only passively counterbalance the deviations from the scheduled day-ahead load to the corresponding real-time one. Active bidding decision-making is impossible due to the uncontrollable real-time load of consumers [20, 21].In summary, bidding decision-making of ER in spot EMs is mainly reflected in the day-ahead market stage. Hence, the key problem to be solved in this paper is how to optimally determine the day-ahead price-energy piecewise staircase bidding curves for ER, which can be mathematically formulated as follows:(1) Objective Function.For a delivery day, an ER pursues the maximization of its own profit [6–21]: (1)maxLtda,λi,t,∀tR~RET=∑t=1TΛL~t-∑t=1Tλ~t∗Ltda-∑t=1Tλ~tB∗L~t-Ltdawhere R~RET represents ER’s total profit which is uncertain in the day-ahead decision-making stage due to the uncertainties of day-head and balancing clearing prices (λ~t∗ and λ~tB∗(1≤t≤T)) as well as real-time load (L~t(1≤t≤T)); Λre means retail price; Ltda (1≤t≤T) indicates the scheduled day-ahead load in time unitt.(2) Day-Ahead Clearing Price-Scheduled Energy Constraints.In the price-energy piecewise staircase bidding curves, Ltda can be further formulated as follows: (2)Ltda=∑i=1NLtLi,tIλi,t≥λ~t∗,1≤∀i≤NLt,1≤∀t≤Twhere Li,t, λi,t (1≤∀i≤NLt,1≤∀t≤T) represent the maximum load and bidding price for theith block of ER’s bidding curve corresponding to time unitt, respectively; NLt (1≤∀t≤T) is the total number of blocks in ER’s bidding curve corresponding to time unitt. According to [20, 21], {(NLt)t=1T} is a set of exogenous parameters. However, this paper will discuss the optimal decision-making problem of NLt in Section 2.3. Under a given NLt value, Li,t can be easily obtained by sharing daily maximum load forecast on NLt blocks [20, 21]. In addition, I(.) is an indicator function that returns only 0 or 1, whose specific meaning in Eq. (2) is that if λi,t≥λ~t∗, then return 1; otherwise, return 0.(3) Shaping Constraints for Bidding Curves. For time unitt (1≤t≤T), the shape of an ER’s day-ahead price-energy piecewise staircase bidding curve should conform to the downward or horizontal trend [20, 21]. Moreover, ER’s bidding prices should be restricted within reasonable limits by relevant regulatory authorities:(3)λi+1,t≤λi,t,1≤∀i≤NLt-1,1≤∀t≤T(4)λmin≤λi,t≤λmax,1≤∀i≤NLt,1≤∀t≤Twhere λmax, λmin represent the exogenous upper and lower bounds for bidding prices, respectively.Theoretically, the outputs of modelEq. (1) to Eq. (4) are ER’s day-ahead price-energy piecewise staircase bidding curves for all time units (namely, {(Li,t,λi,t∗)i=1NLt}, where 1≤t≤T, λi,t∗ means the determined bidding price). However, on the premise of allowing ER to adjust the number of blocks in its bidding curves, it is difficult to directly determine the optimal values of {(NLt)t=1T}. Moreover, due to the existence of stochastic parameters (L~t, λ~t∗ and λ~tB∗, 1≤t≤T) and 0-1 indicator function (I(.)), model Eq. (1) to Eq. (4) still cannot be directly solved even when the values of {(NLt)t=1T} are exogenously fixed beforehand. Therefore, method for reformulating model Eq. (1) to Eq. (4) must be applied.


### 2.3. Outer-Inner 2-Layer Structure Reformulation

Whether or not an ER is allowed to adjust the number of blocks in its bidding curves, the value ofNLt (1≤t≤T) can only be a positive integer. In addition, this paper holds that it is necessary to set an upper limit for the value of NLt, which means that bidding curves cannot be “segmented” indefinitely:(5)NLt∈1,…,NLmax,1≤∀t≤Twhere NLmax (NLmax∈N+) represents the exogenous upper bound for NLt (1≤t≤T). Evidently, in the case of not setting other objectives for ER, the determination of block quantities for bidding curves is also to pursue the maximization of its profit. Moreover, any adjustment to NLt (1≤t≤T) shall not exceed the scope specified by Eq. (5). Hence, Eq. (5) defines the feasible region of decision variables NLt (1≤t≤T).According to the above analysis, modelEq. (1) to Eq. (4) proposed in Section 2.2 can be further reformulated as the following outer-inner 2-layer model structure:(6)maxNLt,∀tmaxLtda,λi,t,∀tR~RETNL1,…,NLT=∑t=1TΛreL~t-∑t=1Tλ~t∗Ltda-∑t=1Tλ~tB∗L~t-Ltdas.t.Ltda=∑i=1NLtLi,tIλi,t≥λ~t∗,1≤∀i≤NLt,1≤∀t≤Tλi+1,t≤λi,t,1≤∀i≤NLt-1,1≤∀t≤Tλmin≤λi,t≤λmax,1≤∀i≤NLt,1≤∀t≤Ts.t.NLt∈1,…,NLmax,1≤∀t≤Twhere R~RET(NL1,…,NLT) means, in addition to the bidding prices λi,t, that ER’s profit is also an implicit function of {(NLt)t=1T}. In the above outer-inner 2-layer model structure, the inner decision-making model (model contained in the braces) is equivalent to model Eq. (1) to Eq. (4). It optimally determines the bidding prices λi,t (1≤∀i≤NLt,1≤∀t≤T) on the premise of a group of given values of NLt (1≤t≤T). The outer decision-making model uses the output objective function value R~RET(NL1,…,NLT) of the inner layer model as the fitness function (objective function) to pursue its maximization via adjusting NLt (1≤t≤T) in the feasible region defined by Eq. (5). When the inner decision variables λi,t (1≤∀i≤NLt,1≤∀t≤T) and the outer decision variables NLt (1≤t≤T) have been adjusted to no further increase in the profit of ER, the whole decision-making process of our proposed outer-inner 2-layer model structure is finished. The final outputs of our model structure are the optimal day-ahead price-energy piecewise staircase bidding curves of all time units {(Li,t,λi,t∗)i=1NLt∗} (1≤∀t≤T).


### 2.4. Stochastic Mixed-Integer Optimization Reformulations

The core part of the outer-inner 2-layer model structureEq. (6) lies in its inner decision-making model (model Eq. (1) to Eq. (4)). As mentioned in Section 2.2, the inner decision-making model cannot be solved directly due to the existence of stochastic parameters and 0-1 indicator function. For this problem, reasonable reformulation is necessary. Our method is the following:( 1 ) Joint distributed stochastic scenarios about day-ahead, balancing clearing prices, and real-time load are generated based on historical data of those 3 parties [20, 21]. Accordingly, a corresponding stochastic optimization reformulation can be easily implemented (the objective function pursues the expected profit maximization according to the stochastic scenarios, and some constraints should be satisfied in each stochastic scenario).( 2 ) 0-1 binary variables for replacing the 0-1 indicator function are introduced so that a corresponding integer programming reformulation can also be easily implemented.Moreover, method of conditional value-at-risk (CVaR) is introduced by us for properly hedging ER’s financial-risk caused by the influence of clearing prices and real-time load fluctuations on profit.The specific approach for reformulating our inner decision-making model is as follows:(1) Objective Function. Based on the abovementioned joint stochastic scenarios and 0-1 binary variables, the inner decision-making model can be reformulated as a stochastic mixed-integer optimization model. If the values of confidence level α and ER’s subjective preference γ (0≤γ≤1) are given, the objective function can simultaneously pursue the maximization of the expectation and CVaR of profit: (7)maxLtda,λi,t,∀tγER~RET+1-γCVaRαR~RETwhere E(R~RET) represents the expected value of profit under the joint distribution of clearing prices and real-time load; CVaRα(R~RET) indicates the CVaR value of profit under the joint distribution of clearing prices and real-time load. Similar to [22], in the case of discrete stochastic scenarios, the objective function Eq. (7) can be equivalently transformed into a linear programming problem Eq. (8) to Eq. (10) as follows:(8)maxLt,ωda,λi,t,∀t,υ,zω,∀ω∈Ωγ∑ω∈Ωρω∑t=1TΛreLt,ω-∑t=1Tλt,ω∗Lt,ωda-∑t=1Tλt,ωB∗Lt,ω-Lt,ωda+1-γχ+11-α∑ω∈Ωρωzωs.t.(9)zω≤∑t=1TΛreLt,ω-∑t=1Tλt,ω∗Lt,ωda-∑t=1Tλt,ωB∗Lt,ω-Lt,ωda-χ,∀ω∈Ω(10)zω≤0,∀ω∈Ωwhere Ω is the set of all joint stochastic scenarios; ρω represents the probability of the occurrence of joint stochastic scenario ω; χ and zω (∀ω∈Ω) are intermediate variables introduced in the process of linearizing CVaRα(R~RET) and have no physical and economic implications.(2) The Constraint Conditions.As mentioned in Section 2.2, constraint Eq. (2) makes our model system difficult to solve due to the existence of 0-1 indicator function I(.). Hence, we propose the following combination of linear constraints mixed with 0-1 integer variables to replace constraint Eq. (2):(11)s.t.Lt,ωda=∑i=1NLLi,thi,t,ω,1≤∀t≤T,∀ω∈Ω(12)hi,t,ω∈0,1,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω(13)λi,t-λt,ω∗≤M,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω(14)-λi,t+λt,ω∗≤M1-hi,t,ω,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ωwhere hi,t,ω (1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω) are the newly introduced 0-1 binary variables;M is an exogenously given parameter with a positive and large value. Clearly, in order to enable the constraints Eq. (13) and Eq. (14) to be satisfied at the same time under λi,t≥λt,ω∗, the integer variable hi,t,ω can only be equal to 1, meaning that the scheduled day-ahead load Lt,ωda is bound to contain theith block in bidding curve corresponding to time unitt (represented by Li,t). Otherwise, in order to enable the constraints Eq. (13) and Eq. (14) to be satisfied at the same time under λi,t≤λt,ω∗, the scheduled day-ahead load Lt,ωda cannot contain theith block in bidding curve corresponding to time unitt. Thus it can be seen that constraints Eq. (11) to Eq. (14) are equivalent to constraint Eq. (2).In summary, the inner decision-making model after the reformulation of stochastic mixed-integer optimization can be integrated into the following:Max
Eq. (8)s.t.
Eq. (9) to Eq. (10): stochastic constraintsEq. (11) to Eq. (14): stochastic mixed-integerconstraintsEq. (3) to Eq. (4): conventional constraintsThe stochastic constraints mean that stochastic scenarios are needed to be considered in constraints Eq. (9) to Eq. (10); stochastic mixed-integer constraints mean that both the stochastic scenarios and binary variables are involved in constraints Eq. (11) to Eq. (14). By directly solving this reformulated inner decision-making model under given NLt (∀t) values, ER’s piecewise staircase bidding curves can be easily obtained.Evidently,{(NLt)t=1T} are exogenous parameters in our reformulated inner decision-making model. That is to say, if neglecting the outer decision-making model, our proposed approach in this subsection can be directly applied to the market situation in which a fixed number of blocks in bidding curve are stipulated (values of {(NLt)t=1T} are exogenously fixed beforehand).In summary, our proposed model system can be directly used by a newborn ER in China (or ER with fixed or strictly supervised retail prices in other existing EMs worldwide). However, it is easy to be extended to ER under real-time retail prices mechanism by adding the following linear constraints into our inner decision-making model [7]:(15)Λre,t,ω=1+rλt,ω∗,1≤∀t≤T,∀ω∈Ω(16)Lt,ω=Lt,ω0+Lt,ω0∑i=1Tet,iΛre,i,ω-Λre,i0Λre,i0,1≤∀t≤T,∀ω∈Ωwhere Λre,t,ω (1≤∀t≤T) indicates the real-time retail price parameter under joint stochastic scenario ω (∀ω∈Ω); r represents an exogenously given coefficient [7]; Lt,ω(0) (1≤∀t≤T) stands for an exogenous reference value of forecasted real-time load in time unitt under joint stochastic scenario ω (∀ω∈Ω) [7]; et,i (1≤∀t,i≤T) describes the elasticity coefficient of the response of real-time load in time unitt to retail price in time uniti[7].


## 2.1. Relevant Explanation and Hypothesis

In this Section,the inner-outer 2-layer model system based on stochastic mixed-integer optimizationis mathematically formulated for ER to make bidding decisions in spot EM. For the sake of simplicity and without loss of generality, we make some assumptions and explanations listed as follows before conducting any further research:( 1 ) Similar to [6, 7, 9–21], this paper considers the ER as a “price taker” participating in spot EMs. This is equivalent to the fact that the bidding behaviors of ER will not affect clearing prices in spot EMs.( 2 ) Similar to [6–20], the spot EMs are assumed to contain only 2 market stages: the day-ahead and balancing markets. Intraday market stages are neglected due to their small trading amounts.( 3 ) Due to the lack of demand response incentive mechanisms in China (the retail prices will still be fixed or under the government’s strict supervision in the near future [5]), ERs cannot control the real-time loads of consumers quickly and accurately in the stage of balancing markets.


## 2.2. The Day-Ahead Bidding Decision-Making Model for ER

According to the assumptions and explanations mentioned above, for a delivery day, a “price taker” ER is assumed to successively participate in 1 day-ahead market andT balancing markets. In the day-ahead market stage, ER needs to make decision on itsT piecewise staircase bidding curves corresponding toTtime units of the next day (delivery day), where uncertainties of day-head and balancing clearing prices as well as real-time load must be taken into consideration. As time goes on, balancing markets for the delivery day are launched one by one. In the tth (1≤t≤T) balancing market stage, ER can only passively counterbalance the deviations from the scheduled day-ahead load to the corresponding real-time one. Active bidding decision-making is impossible due to the uncontrollable real-time load of consumers [20, 21].In summary, bidding decision-making of ER in spot EMs is mainly reflected in the day-ahead market stage. Hence, the key problem to be solved in this paper is how to optimally determine the day-ahead price-energy piecewise staircase bidding curves for ER, which can be mathematically formulated as follows:(1) Objective Function.For a delivery day, an ER pursues the maximization of its own profit [6–21]: (1)maxLtda,λi,t,∀tR~RET=∑t=1TΛL~t-∑t=1Tλ~t∗Ltda-∑t=1Tλ~tB∗L~t-Ltdawhere R~RET represents ER’s total profit which is uncertain in the day-ahead decision-making stage due to the uncertainties of day-head and balancing clearing prices (λ~t∗ and λ~tB∗(1≤t≤T)) as well as real-time load (L~t(1≤t≤T)); Λre means retail price; Ltda (1≤t≤T) indicates the scheduled day-ahead load in time unitt.(2) Day-Ahead Clearing Price-Scheduled Energy Constraints.In the price-energy piecewise staircase bidding curves, Ltda can be further formulated as follows: (2)Ltda=∑i=1NLtLi,tIλi,t≥λ~t∗,1≤∀i≤NLt,1≤∀t≤Twhere Li,t, λi,t (1≤∀i≤NLt,1≤∀t≤T) represent the maximum load and bidding price for theith block of ER’s bidding curve corresponding to time unitt, respectively; NLt (1≤∀t≤T) is the total number of blocks in ER’s bidding curve corresponding to time unitt. According to [20, 21], {(NLt)t=1T} is a set of exogenous parameters. However, this paper will discuss the optimal decision-making problem of NLt in Section 2.3. Under a given NLt value, Li,t can be easily obtained by sharing daily maximum load forecast on NLt blocks [20, 21]. In addition, I(.) is an indicator function that returns only 0 or 1, whose specific meaning in Eq. (2) is that if λi,t≥λ~t∗, then return 1; otherwise, return 0.(3) Shaping Constraints for Bidding Curves. For time unitt (1≤t≤T), the shape of an ER’s day-ahead price-energy piecewise staircase bidding curve should conform to the downward or horizontal trend [20, 21]. Moreover, ER’s bidding prices should be restricted within reasonable limits by relevant regulatory authorities:(3)λi+1,t≤λi,t,1≤∀i≤NLt-1,1≤∀t≤T(4)λmin≤λi,t≤λmax,1≤∀i≤NLt,1≤∀t≤Twhere λmax, λmin represent the exogenous upper and lower bounds for bidding prices, respectively.Theoretically, the outputs of modelEq. (1) to Eq. (4) are ER’s day-ahead price-energy piecewise staircase bidding curves for all time units (namely, {(Li,t,λi,t∗)i=1NLt}, where 1≤t≤T, λi,t∗ means the determined bidding price). However, on the premise of allowing ER to adjust the number of blocks in its bidding curves, it is difficult to directly determine the optimal values of {(NLt)t=1T}. Moreover, due to the existence of stochastic parameters (L~t, λ~t∗ and λ~tB∗, 1≤t≤T) and 0-1 indicator function (I(.)), model Eq. (1) to Eq. (4) still cannot be directly solved even when the values of {(NLt)t=1T} are exogenously fixed beforehand. Therefore, method for reformulating model Eq. (1) to Eq. (4) must be applied.


## 2.3. Outer-Inner 2-Layer Structure Reformulation

Whether or not an ER is allowed to adjust the number of blocks in its bidding curves, the value ofNLt (1≤t≤T) can only be a positive integer. In addition, this paper holds that it is necessary to set an upper limit for the value of NLt, which means that bidding curves cannot be “segmented” indefinitely:(5)NLt∈1,…,NLmax,1≤∀t≤Twhere NLmax (NLmax∈N+) represents the exogenous upper bound for NLt (1≤t≤T). Evidently, in the case of not setting other objectives for ER, the determination of block quantities for bidding curves is also to pursue the maximization of its profit. Moreover, any adjustment to NLt (1≤t≤T) shall not exceed the scope specified by Eq. (5). Hence, Eq. (5) defines the feasible region of decision variables NLt (1≤t≤T).According to the above analysis, modelEq. (1) to Eq. (4) proposed in Section 2.2 can be further reformulated as the following outer-inner 2-layer model structure:(6)maxNLt,∀tmaxLtda,λi,t,∀tR~RETNL1,…,NLT=∑t=1TΛreL~t-∑t=1Tλ~t∗Ltda-∑t=1Tλ~tB∗L~t-Ltdas.t.Ltda=∑i=1NLtLi,tIλi,t≥λ~t∗,1≤∀i≤NLt,1≤∀t≤Tλi+1,t≤λi,t,1≤∀i≤NLt-1,1≤∀t≤Tλmin≤λi,t≤λmax,1≤∀i≤NLt,1≤∀t≤Ts.t.NLt∈1,…,NLmax,1≤∀t≤Twhere R~RET(NL1,…,NLT) means, in addition to the bidding prices λi,t, that ER’s profit is also an implicit function of {(NLt)t=1T}. In the above outer-inner 2-layer model structure, the inner decision-making model (model contained in the braces) is equivalent to model Eq. (1) to Eq. (4). It optimally determines the bidding prices λi,t (1≤∀i≤NLt,1≤∀t≤T) on the premise of a group of given values of NLt (1≤t≤T). The outer decision-making model uses the output objective function value R~RET(NL1,…,NLT) of the inner layer model as the fitness function (objective function) to pursue its maximization via adjusting NLt (1≤t≤T) in the feasible region defined by Eq. (5). When the inner decision variables λi,t (1≤∀i≤NLt,1≤∀t≤T) and the outer decision variables NLt (1≤t≤T) have been adjusted to no further increase in the profit of ER, the whole decision-making process of our proposed outer-inner 2-layer model structure is finished. The final outputs of our model structure are the optimal day-ahead price-energy piecewise staircase bidding curves of all time units {(Li,t,λi,t∗)i=1NLt∗} (1≤∀t≤T).


## 2.4. Stochastic Mixed-Integer Optimization Reformulations

The core part of the outer-inner 2-layer model structureEq. (6) lies in its inner decision-making model (model Eq. (1) to Eq. (4)). As mentioned in Section 2.2, the inner decision-making model cannot be solved directly due to the existence of stochastic parameters and 0-1 indicator function. For this problem, reasonable reformulation is necessary. Our method is the following:( 1 ) Joint distributed stochastic scenarios about day-ahead, balancing clearing prices, and real-time load are generated based on historical data of those 3 parties [20, 21]. Accordingly, a corresponding stochastic optimization reformulation can be easily implemented (the objective function pursues the expected profit maximization according to the stochastic scenarios, and some constraints should be satisfied in each stochastic scenario).( 2 ) 0-1 binary variables for replacing the 0-1 indicator function are introduced so that a corresponding integer programming reformulation can also be easily implemented.Moreover, method of conditional value-at-risk (CVaR) is introduced by us for properly hedging ER’s financial-risk caused by the influence of clearing prices and real-time load fluctuations on profit.The specific approach for reformulating our inner decision-making model is as follows:(1) Objective Function. Based on the abovementioned joint stochastic scenarios and 0-1 binary variables, the inner decision-making model can be reformulated as a stochastic mixed-integer optimization model. If the values of confidence level α and ER’s subjective preference γ (0≤γ≤1) are given, the objective function can simultaneously pursue the maximization of the expectation and CVaR of profit: (7)maxLtda,λi,t,∀tγER~RET+1-γCVaRαR~RETwhere E(R~RET) represents the expected value of profit under the joint distribution of clearing prices and real-time load; CVaRα(R~RET) indicates the CVaR value of profit under the joint distribution of clearing prices and real-time load. Similar to [22], in the case of discrete stochastic scenarios, the objective function Eq. (7) can be equivalently transformed into a linear programming problem Eq. (8) to Eq. (10) as follows:(8)maxLt,ωda,λi,t,∀t,υ,zω,∀ω∈Ωγ∑ω∈Ωρω∑t=1TΛreLt,ω-∑t=1Tλt,ω∗Lt,ωda-∑t=1Tλt,ωB∗Lt,ω-Lt,ωda+1-γχ+11-α∑ω∈Ωρωzωs.t.(9)zω≤∑t=1TΛreLt,ω-∑t=1Tλt,ω∗Lt,ωda-∑t=1Tλt,ωB∗Lt,ω-Lt,ωda-χ,∀ω∈Ω(10)zω≤0,∀ω∈Ωwhere Ω is the set of all joint stochastic scenarios; ρω represents the probability of the occurrence of joint stochastic scenario ω; χ and zω (∀ω∈Ω) are intermediate variables introduced in the process of linearizing CVaRα(R~RET) and have no physical and economic implications.(2) The Constraint Conditions.As mentioned in Section 2.2, constraint Eq. (2) makes our model system difficult to solve due to the existence of 0-1 indicator function I(.). Hence, we propose the following combination of linear constraints mixed with 0-1 integer variables to replace constraint Eq. (2):(11)s.t.Lt,ωda=∑i=1NLLi,thi,t,ω,1≤∀t≤T,∀ω∈Ω(12)hi,t,ω∈0,1,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω(13)λi,t-λt,ω∗≤M,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω(14)-λi,t+λt,ω∗≤M1-hi,t,ω,1≤∀i≤NL,1≤∀t≤T,∀ω∈Ωwhere hi,t,ω (1≤∀i≤NL,1≤∀t≤T,∀ω∈Ω) are the newly introduced 0-1 binary variables;M is an exogenously given parameter with a positive and large value. Clearly, in order to enable the constraints Eq. (13) and Eq. (14) to be satisfied at the same time under λi,t≥λt,ω∗, the integer variable hi,t,ω can only be equal to 1, meaning that the scheduled day-ahead load Lt,ωda is bound to contain theith block in bidding curve corresponding to time unitt (represented by Li,t). Otherwise, in order to enable the constraints Eq. (13) and Eq. (14) to be satisfied at the same time under λi,t≤λt,ω∗, the scheduled day-ahead load Lt,ωda cannot contain theith block in bidding curve corresponding to time unitt. Thus it can be seen that constraints Eq. (11) to Eq. (14) are equivalent to constraint Eq. (2).In summary, the inner decision-making model after the reformulation of stochastic mixed-integer optimization can be integrated into the following:Max
Eq. (8)s.t.
Eq. (9) to Eq. (10): stochastic constraintsEq. (11) to Eq. (14): stochastic mixed-integerconstraintsEq. (3) to Eq. (4): conventional constraintsThe stochastic constraints mean that stochastic scenarios are needed to be considered in constraints Eq. (9) to Eq. (10); stochastic mixed-integer constraints mean that both the stochastic scenarios and binary variables are involved in constraints Eq. (11) to Eq. (14). By directly solving this reformulated inner decision-making model under given NLt (∀t) values, ER’s piecewise staircase bidding curves can be easily obtained.Evidently,{(NLt)t=1T} are exogenous parameters in our reformulated inner decision-making model. That is to say, if neglecting the outer decision-making model, our proposed approach in this subsection can be directly applied to the market situation in which a fixed number of blocks in bidding curve are stipulated (values of {(NLt)t=1T} are exogenously fixed beforehand).In summary, our proposed model system can be directly used by a newborn ER in China (or ER with fixed or strictly supervised retail prices in other existing EMs worldwide). However, it is easy to be extended to ER under real-time retail prices mechanism by adding the following linear constraints into our inner decision-making model [7]:(15)Λre,t,ω=1+rλt,ω∗,1≤∀t≤T,∀ω∈Ω(16)Lt,ω=Lt,ω0+Lt,ω0∑i=1Tet,iΛre,i,ω-Λre,i0Λre,i0,1≤∀t≤T,∀ω∈Ωwhere Λre,t,ω (1≤∀t≤T) indicates the real-time retail price parameter under joint stochastic scenario ω (∀ω∈Ω); r represents an exogenously given coefficient [7]; Lt,ω(0) (1≤∀t≤T) stands for an exogenous reference value of forecasted real-time load in time unitt under joint stochastic scenario ω (∀ω∈Ω) [7]; et,i (1≤∀t,i≤T) describes the elasticity coefficient of the response of real-time load in time unitt to retail price in time uniti[7].


## 3. Solution Procedure

Nesting modelEq. (8) to Eq. (14), Eq. (3) to Eq. (4) inside model Eq. (6), our proposed inner-outer 2-layer model system can be formed based on stochastic mixed-integer optimization for “price taker” ER bidding in day-ahead EM. For the inner decision-making model, once the number of blocks in bidding curve is determined for each time unit, it essentially has the mathematical structure characteristics of the mixed-integer linear programming. Hence, conventional methods for solving the mixed-integer linear programming problem are suitable for solving the inner decision-making model. For the outer decision-making model, once the fitness value γE[R~RET(NL1,…,NLT)]+(1-γ)CVaRα[R~RET(NL1,…,NLT)] of any interior point (NL1,…,NLT) in feasible region Eq. (5) can be calculated quickly by the inner decision-making model, then it can be optimized by many improved heuristic algorithms (e.g., Hybrid Evolutionary Algorithm, HEA [23]) for solving the integer programming problem (determining the optimal block quantities for bidding curves eventually).It must be noted that to solve our proposed model system needs to solve the inner and outer decision-making models alternately and iteratively so as to get the optimal day-ahead price-energy piecewise staircase bidding curves{(Li,λi,t∗)i=1NLt∗} (1≤∀t≤T) for ER. Step by step solution procedure can be depicted as follows:( 1 ) Let k represent the number of iterations and set k=0; randomly select S interior points (NL1,1,…,NLT,1)k,(NL1,2,…,NLT,2)k,…,( N L 1 , s , … , N L T , s ) k , … , ( N L 1 , S , … , N L T , S ) k in feasible region Eq. (5) for initial iteration.( 2 ) Solve the inner decision-making model based on every interior point (NL1,s,…,NLT,s)k (1≤∀s≤S) (in essence, it is a problem to solve mixed-integer linear programming problems), and, correspondingly, the fitness values γE[R~RET(NL1,…,NLT)]+(1-γ)CVaRα[R~RET(NL1,…,NLT)] (1≤∀s≤S) of the outer decision-making model can be obtained.( 3 ) Through related improved heuristic algorithm (e.g., HEA [23]), update the interior points of the outer decision-making model according to the fitness values; thus the following results can be obtained:(17)NL1,1,…,NLT,1k+1,NL1,2,…,NLT,2k+1,…,NL1,s,…,NLT,sk+1,…,NL1,S,…,NLT,Sk+1( 4 ) k=k+1.( 5 ) Test whether the termination condition of the iteration is satisfied (e.g., the maximum number of iterations or/and the maximum fitness value difference between adjacent 2 iterations is/are smaller than the preset tolerance Δ.); if it is satisfied, then go to step (6); otherwise, return to step (2).( 6 ) Output the obtained values of decision variables in outer and inner decision-making models corresponding to max⁡{[γE[R~RET(NL1,s,…,NLT,s)k]+(1-γ)CVaRα[R~RET(NL1,s,…,NLT,s)k]]s=1S}, which are the final decision results of our proposed model system {(Li,λi,t∗)i=1NLt∗} (1≤∀t≤T).The abovementioned step by step solution procedure can also be summarized by using Figure1.Figure 1
Flowchart for the solution procedure.


## 4. Simulation and Discussion

### 4.1. Case Description

In this section, for the purpose of demonstrating our simulation and comparisons more lucidly, we introduce an experimental case design concretely. In our case, an ER participates as a “price taker” in both the day-ahead and one-price balancing markets. A delivery day is discretized into 24 time units with 1 hour for the duration of each time unit.The “price taker” characteristic means that day-ahead and balancing clearing prices are not affected by this ER’s power procurements. Hence, real-time load uncertainty is independent of day-ahead and balancing clearing prices uncertainties, respectively, and the stochastic scenarios for these 2 parties can be generated separately. With respect to day-ahead and balancing clearing prices, method in [22] is adopted by us to generate the joint stochastic scenarios based on hourly historical data (the specific scenarios generation procedure is detailed in [22]). Due to the inexistence of spot EM in China, the ones from DK-West area in the Nord Pool market are applied as the historical day-ahead and balancing prices data from September 1st to November 30th, 2016. Because the Nord Pool market is of two-price balancing market, up-/downregulation prices are different and one or the other of them is equal to the day-ahead one at any specific time unit. So we take the different one as the balancing price in the one-price balancing market [22]. On the generation of real-time load stochastic scenarios, we assume that this ER represents 26816 households in a certain area of Tianjin city (China). The ER purchases electricity in spot EMs and then sells to these households in retail market in accordance with the current residential step tariff (with 3 price steps) in Tianjin. For the sake of simplicity, this section further assumes that the households that bear the price of each step are fixed, and the corresponding relationship between every household and price step undertaken by this household can be accurately predicted by ER beforehand. Therefore, in addition to unified model solving, our proposed model system can also be decomposed into 3 independent sub-model systems and solved separately. That is to suppose that this ER can represent different group of households (bearing the same price step) to bid in spot EMs separately. As a result, the total profit of this ER should be equal to the sum of calculation results of the 3 sub-model systems. Based on the data collected for the above households in 2014 and combined with the households partition principle of residential step tariff in Tianjin, these 26816 households can be divided into 3 groups. The 1st household group has 18631 households bearing the 1st price step (0.79¥/KWh) in the retail market, each one with annual electricity consumption less than 2640 KWh. The 3rd household group has 3511 households bearing the 3rd price step (0.79¥/KWh) in the retail market, each one with annual electricity consumption more than 4800 KWh. The 2nd household group has 4674 households bearing the 2nd price step (0.54¥/KWh) in the retail market, each one with annual electricity consumption between 2640 KWh and 4800 KWh. Hourly historical data for generating the stochastic scenarios about real-time total load or real-time loads for each household group are collected from September 1st to November 30th, 2016. Load profiles of each of these 3 household groups during the abovementioned date are depicted in Figure 2. Furthermore, method for generating real-time load stochastic scenarios is the same as that for generating clearing prices stochastic scenarios.Figure 2
Load profiles of each of 3 household groups during September 1st to November 30th, 2016.Before carrying out the simulations, it is needed to pay more attention to the following:( 1 ) As the historical data of spot and retail EMs involved in this section are derived from 2 different data sources, we have transformed the clearing prices and retail prices into the same measurement unit (DKK) at the current exchange rate before applying these data in later simulations.( 2 ) In our simulations, the proposed inner-outer 2-layer model system is calculated for 30 test days (from November 1st to November 30th) to obtain ER’s decision-making results and for comparisons of decision effects. For a certain test day, historical data of clearing prices and real-time loads from September 1st to the day before that date are applied to generate the joint stochastic scenarios. When the bidding process is completed for this test day, the actual profit of ER is calculated on the basis of this day’s actual clearing prices and real-time load as well as the decision-making results obtained by implementing our model system.( 3 ) For any test day, whether ER represents 21899 households in a unified way or separately represents different groups of households to bid in spot EMs, the number of joint stochastic scenarios about day-ahead, balancing clearing prices, and real-time load is set to 20. For scenario ω (ω=1,2,…,20), the load of 21899 households is equal to the sum of the loads of all household groups.( 4 ) The value of confidence level α in CVaRα(R~RET) is set to 0.05, and the weight coefficient (subjective preference) γ is initially set to 0.5.( 5 ) Other parameters can be seen in Table 1.Table 1
Model parameter setting.
λ m i n (DKK/MWh) λ m a x (DKK/MWh) N L m a x 0 800 10Moreover, all simulations and comparisons are implemented by utilizing the Matlab R2014a software on a PC laptop with an Intel Core i7 at 2.1 GHz and 8 GB memory.


### 4.2. Calculation Results Analysis

In this and the next subsections, ER is deemed as representing all the 21899 households to bid in spot EMs. Accordingly, our proposed model system must be solved in a unified way. Because ER will make 24 day-ahead piecewise staircase bidding curves for every test day, it is difficult to clearly display all these30×24 bidding curves in the form of a graph or a table. Hence, some representative bidding curves determined by implementing our model system are shown in Figures 3–6.Figure 3
Day-ahead bidding curve for hour 2 on November 1st.Figure 4
Day-ahead bidding curve for hour 7 on November 1st.Figure 5
Day-ahead bidding curve for hour 15 on November 2nd.Figure 6
Day-ahead bidding curve for hour 17 on November 7th.In Figures3–6, the red staircase lines represent the decision-making results of ER’s day-ahead bidding curves for some certain time units. The hollow dots represent the joint stochastic scenarios for these corresponding time units. Because every joint stochastic scenario contains the information of 3 uncertain parameters (day-ahead, balancing clearing prices, and real-time load) and in order to facilitate the demonstration in a 2-dimensional plane, we set the ordinate of a hollow dot to be the difference between day-ahead and balancing clearing prices.The analysis of Figures3–6 shows the following:( 1 ) It can be concluded from comparing Figure 3 with Figure 4 that when the joint stochastic scenarios are mostly manifested as day-ahead clearing price is lower than the corresponding balancing one; ER is inclined to bid high prices in the day-ahead market. The number of blocks in its piecewise staircase bidding curve tends to decrease relatively. This paper holds that the fundamental cause of the abovementioned tendency lies in the following: when the “price-taker” ER has a premonition that the probability of the balancing clearing price higher than the corresponding day-ahead one is relatively large, the motivation to pursue profit maximization makes it tend to buy “cheap electricity” in the day-ahead market. On one hand, high bidding prices can increase the possibility of buying large quantities of electricity in the day-ahead market; on the other hand, it is unnecessary to increase the number of blocks in bidding curve because ER undertakes relatively small risk of financial losses caused by large purchased electricity quantities in day-ahead market (even if the quantities purchased in day-ahead market exceed the real-time load, ER is still likely to benefit from the balancing market in the way of “buying at low price and selling at high price”). Therefore, relatively high bidding prices and small number of blocks together become the characteristics of ER’s bidding curve in Figure 3.( 2 ) It can be concluded from comparing Figure 4 with Figure 5 that, on the premise of high possibility that day-ahead clearing price is higher than the corresponding balancing one and the random fluctuation degree of real-time load is large, the number of blocks in ER’s piecewise staircase bidding curve tends to increase relatively. This paper holds that the fundamental cause of the abovementioned tendency lies in the following: large random fluctuation degree of real-time load in joint stochastic scenarios is likely to lead to higher probability of “purchasing excess” in day-ahead market and “returning back” in balancing market. Therefore, in the case that day-ahead clearing price is higher than the corresponding balancing one, the financial risk of causing “buying at high price and selling at low price” losses will be greater. By increasing the number of blocks in its piecewise staircase bidding curve, ER can further suppress the occurrence of “excessive” electricity purchases in day-ahead market and thus to some extent evade the above risks.( 3 ) It can be concluded from comparing Figure 3 with Figure 6 that when the joint stochastic scenarios are mostly manifested as day-ahead clearing price is lower than the corresponding balancing one; the number of blocks in ER’s piecewise staircase bidding curve does not change significantly with the increase of the random fluctuation degree of real-time load. This paper holds that the fundamental cause of the abovementioned phenomenon lies in the following: regardless of the random fluctuation degree of real-time load, the “price taker” ER is always beneficial in purchasing electricity in day-ahead market in the case that the day-ahead clearing price is lower than the corresponding balancing one. Therefore, the real-time load random fluctuation degree does not cause a significant change in the shape of ER’s day-ahead bidding curve.Furthermore, it must be noted that, whenCVaRα(R~RET) in the objective function (Eq. (7)) is removed (correspondingly, the constraints Eq. (9) to Eq. (10) should also be removed), ER will “degenerate" into a risk-neutral decision maker. This means that the 720 day-ahead bidding curves obtained by our proposed model system for the 30 test days are “degraded” into horizontal lines (however, the vertical positions of these curves are different). This finding is similar to that in [21], the reason for which is detailed in the relevant analysis in [20].In summary, by using our proposed model system (CVaRα(R~RET) is contained in objective function, and Eq. (9) to Eq. (10) are also contained in constraints) for day-ahead bidding decision-making, the actual profits of ER in the abovementioned 30 test days are listed and demonstrated in Table 2 and Figure 7, respectively.Table 2
ER’s actual daily profits of these 30 test days.
Date Nov. 1 2 3 4 5 6 7 8 9 10 Profit(DKK) 46227.92 43185.06 29775.23 35450.51 42256.79 45668.17 38381.74 18403.31 29371.08 24425.45 Date 11 12 13 14 15 16 17 18 19 20 Profit(DKK) 30493.52 49281.22 48338.59 50369.16 52106.68 52192.16 52843.47 60393.29 54959.43 83085.42 Date 21 22 23 24 25 26 27 28 29 30 Profit(DKK) 50367.96 54553.63 54503.93 45923.54 52888.17 60044.74 56236.43 39688.21 55952.02 55945.49Figure 7
ER’s actual daily profits of these 30 test days.The contents shown in Table2 and Figure 7 are very important, which is a quantitative premise to further analyze the decision-making effect of the model system in this paper. In the subsequent Section 4.3, the contents of Table 2 and Figure 7 will be compared (day by day) with the actual profits obtained based on other decision-making methods. The decision-making effect of our proposed model system will also be reflected in the following relevant analysis.Finally, through the simulation for the above 30 test days, it can be found that the average calculation time of our model system for one delivery day is 4.73 minutes. According to the relevant theory in [1], the implementation of day-ahead market is usually at least 12 hours in advance. Therefore, it is completely feasible to apply our model system for day-ahead bidding decision-making by ER.


### 4.3. Decision-Making Methods Comparison

In this subsection, under the same experimental case designed in Section4.1, the contents shown in Table 2 and Figure 7 will be compared with the simulation results of the model proposed in [20]. As mentioned in Section 1, the model function in [20] is similar to that of our model system in this paper. Specifically, the decision-making results of the day-ahead bidding curves for “price taker” ER are also the piecewise staircase ones. The difference between these 2 methods is as follows:( 1 ) In [20], the model cannot make the decision on the optimal number of blocks in ER’s day-ahead bidding curves, but input it into the model as a preset parameter value (it is set to 7 for block quantity parameter required by model proposed in [20]).( 2 ) Because it does not introduce the concept of CVaR in [20], the decision-making process does not consider the problem of hedging financial risk of profit loss caused by joint randomness of day-ahead, balancing clearing prices, and real-time load.In order to simplify the description, we refer to the decision-making results generated based on our model system as strategy 1 and those generated based on model in [20] as strategy 2. The advantages of strategy 2 compared to other methods (e.g., Expected Maximization Bid (ExpBid), Unconstrained Risk (UncRisk), etc.) in terms of decision-making effects have been fully verified in [20]. Therefore, it has high experimental persuasiveness and rationality by comparing strategy 1 with strategy 2 to verify the decision-making effect of our model system.Both of the actual profits of ER obtained from strategy 1 and strategy 2 over these 30 test days are depicted in Figure8, respectively.Figure 8
Comparison of ER’s actual daily profits obtained from strategies 1 and 2.As can be seen from Figure8, in most test days, the actual profit obtained from strategy 1 is higher than strategy 2. This basically verifies that the model system proposed in this paper has better decision-making effect in helping ER to obtain more profits. We believe that the main reasons are the following:( 1 ) Our model system can optimize ER’s piecewise staircase bidding curve from both the number of blocks and bidding price of every block, which can be hardly realized by using model in [20] (model in [20] can only determine the optimal bidding prices by solving a mixed-integer linear programming problem). In fact, if the outer decision-making model in our model system is removed, the vertical position difference between the 2 curves in Figure 8 will be significantly reduced. Therefore, in addition to optimizing bidding prices, the reasonable adjustment of the number of blocks is also an important means to improve the profit of ER.( 2 ) Due to the application of CVaR in this paper, the robustness of strategy 1 is reinforced in terms of resisting joint randomness of clearing prices and real-time load. This means that profit obtained from strategy 1 has low sensitivity to random fluctuations in clearing prices and real-time load. Conversely, by implementing model in [20], the robustness of strategy 2 is weakened in terms of resisting joint randomness of clearing prices and real-time load due to the neglect of CVaR. This means that profit obtained from strategy 2 has high sensitivity to random fluctuations in clearing prices and real-time load. In fact, in the day-ahead decision-making stage, the deviations between the estimated and realized values in terms of day-ahead, balancing clearing prices, and real-time load can hardly be avoided. This makes our model system comprehensively controlling financial risk through CVaR beforehand, which is more conducive to guarantee reasonable profits under various uncertain conditions.


### 4.4. Bidding Methods Comparison

As mentioned in Section4.1, if it is assumed that ER can be allowed to represent different household groups at different residential price steps to separately bid in spot EMs, the decision-making effect of our model system may be affected by changes in this bidding method. If the separate bidding method can result in higher actual profits for ER than the unified one (as in Sections 4.2 and 4.3), then this bidding method has the potential to be suggested, and vice versa. In order to carry out preliminary verification of the above ideas, we will compare ER’s obtained actual daily profits under the abovementioned 2 bidding methods in this subsection. For simplifying the description, we further refer to the decision-making results under the separate bidding method as strategy 3.Both of the actual profits of ER obtained from strategy 1 and strategy 3 over these 30 test days are depicted in Figure9, respectively.Figure 9
Comparison of ER’s actual daily profits obtained from strategies 1 and 3.As can be seen from Figure9, in most test days, the actual profit obtained from strategy 3 is higher than strategy 1. To a certain extent, this preliminarily verifies that the separate bidding method can result in higher actual profits for ER than the unified one. This paper believes that the main reasons may be the following: different types of users have differences in terms of power usage habits which make their load curve shape and random fluctuation characteristics different. By representing different user groups to bid in spot EMs separately, ER can make its decision-making results more targeted. Equivalently, this means that different bidding curves adapt to the load curve shape and its random fluctuation characteristics of different types of users so as to make ER more beneficial.However, on the one hand, it is not enough to verify the conclusion that the separate bidding method is better than the unified one only through an “orphan case.” On the other hand, the “market power” of many participants cannot be completely ignored in reality. Even if the change of bidding method is beneficial to a certain ER, it may bring “infringement" to the interests of other market participants. Therefore, whether the way that ER can separately represent different type of users to bid is more reasonable or not requires further theoretical argumentation and experimental analysis.


### 4.5. Sensitivity Analysis

In our proposed model system, the weighting factor (subjective preference)γ (0≤γ≤1) reflecting the trade-off between the expectation and CVaR of profit is set exogenously based on the subjective judgment and preference of ER for risk. The change in value of γ will affect the decision result of ER’s day-ahead piecewise staircase bidding curves, which will lead to different actual profits. In this subsection, we use the expectation and CVaR (with the confidence level α=0.05) of actual profits in 30 test days as 2 specific indicators to show the impact of different γ values. Figure 10 shows the Pareto frontier curve formed by the expectations and CVaRs of actual profits under different settings of γ. The calculation results used to form this curve are listed in Table 3.Table 3
Values of the expectation and CVaR of ER’s daily actual profit asγ increases.
γ 0 0.1 0.2 0.3 0.4 0.5 Profit (DKK) 45838.62 45981.48 46103.83 46306.75 46725.59 47107.73 CVaR (DKK) 46683.28 46591.84 46319.76 45903.15 45572.68 45348.36 γ 0.6 0.7 0.8 0.9 1 - Profit (DKK) 47592.41 47904.75 48352.09 48834.17 49013.61 - CVaR (DKK) 45079.29 44836.82 44209.15 43791.98 43286.53 -Figure 10
Pareto frontier between the expectation and CVaR of power retailer’s daily profit asγ increases.Analysis of Figure10 and Table 3 indicates that the expectation of ER’s actual profits increases with the increase of γ, while the CVaR decreases with the increase of γ. This is mainly because in our model system the larger the value of γ is set, the more the ER tends to have a “risk-neutral” behavior tendency. Although the decision-making results can better reflect the pursuit of expected profit maximization, it is increasingly unable to resist the interference of clearing prices and real-time load random fluctuation on profit. Conversely, the smaller the value of γ is set, the more the ER tends to have a “risk-aversion” behavior tendency. Although the decision-making results can better resist the interference of clearing prices and real-time load random fluctuation on profit, it is increasingly unable to pursue the goal of expected profit maximization. Hence, in the Pareto frontier curve reflected in Figure 10, it is no longer possible for ER to pursue further improvement of one objective without jeopardizing another one.


## 4.1. Case Description

In this section, for the purpose of demonstrating our simulation and comparisons more lucidly, we introduce an experimental case design concretely. In our case, an ER participates as a “price taker” in both the day-ahead and one-price balancing markets. A delivery day is discretized into 24 time units with 1 hour for the duration of each time unit.The “price taker” characteristic means that day-ahead and balancing clearing prices are not affected by this ER’s power procurements. Hence, real-time load uncertainty is independent of day-ahead and balancing clearing prices uncertainties, respectively, and the stochastic scenarios for these 2 parties can be generated separately. With respect to day-ahead and balancing clearing prices, method in [22] is adopted by us to generate the joint stochastic scenarios based on hourly historical data (the specific scenarios generation procedure is detailed in [22]). Due to the inexistence of spot EM in China, the ones from DK-West area in the Nord Pool market are applied as the historical day-ahead and balancing prices data from September 1st to November 30th, 2016. Because the Nord Pool market is of two-price balancing market, up-/downregulation prices are different and one or the other of them is equal to the day-ahead one at any specific time unit. So we take the different one as the balancing price in the one-price balancing market [22]. On the generation of real-time load stochastic scenarios, we assume that this ER represents 26816 households in a certain area of Tianjin city (China). The ER purchases electricity in spot EMs and then sells to these households in retail market in accordance with the current residential step tariff (with 3 price steps) in Tianjin. For the sake of simplicity, this section further assumes that the households that bear the price of each step are fixed, and the corresponding relationship between every household and price step undertaken by this household can be accurately predicted by ER beforehand. Therefore, in addition to unified model solving, our proposed model system can also be decomposed into 3 independent sub-model systems and solved separately. That is to suppose that this ER can represent different group of households (bearing the same price step) to bid in spot EMs separately. As a result, the total profit of this ER should be equal to the sum of calculation results of the 3 sub-model systems. Based on the data collected for the above households in 2014 and combined with the households partition principle of residential step tariff in Tianjin, these 26816 households can be divided into 3 groups. The 1st household group has 18631 households bearing the 1st price step (0.79¥/KWh) in the retail market, each one with annual electricity consumption less than 2640 KWh. The 3rd household group has 3511 households bearing the 3rd price step (0.79¥/KWh) in the retail market, each one with annual electricity consumption more than 4800 KWh. The 2nd household group has 4674 households bearing the 2nd price step (0.54¥/KWh) in the retail market, each one with annual electricity consumption between 2640 KWh and 4800 KWh. Hourly historical data for generating the stochastic scenarios about real-time total load or real-time loads for each household group are collected from September 1st to November 30th, 2016. Load profiles of each of these 3 household groups during the abovementioned date are depicted in Figure 2. Furthermore, method for generating real-time load stochastic scenarios is the same as that for generating clearing prices stochastic scenarios.Figure 2
Load profiles of each of 3 household groups during September 1st to November 30th, 2016.Before carrying out the simulations, it is needed to pay more attention to the following:( 1 ) As the historical data of spot and retail EMs involved in this section are derived from 2 different data sources, we have transformed the clearing prices and retail prices into the same measurement unit (DKK) at the current exchange rate before applying these data in later simulations.( 2 ) In our simulations, the proposed inner-outer 2-layer model system is calculated for 30 test days (from November 1st to November 30th) to obtain ER’s decision-making results and for comparisons of decision effects. For a certain test day, historical data of clearing prices and real-time loads from September 1st to the day before that date are applied to generate the joint stochastic scenarios. When the bidding process is completed for this test day, the actual profit of ER is calculated on the basis of this day’s actual clearing prices and real-time load as well as the decision-making results obtained by implementing our model system.( 3 ) For any test day, whether ER represents 21899 households in a unified way or separately represents different groups of households to bid in spot EMs, the number of joint stochastic scenarios about day-ahead, balancing clearing prices, and real-time load is set to 20. For scenario ω (ω=1,2,…,20), the load of 21899 households is equal to the sum of the loads of all household groups.( 4 ) The value of confidence level α in CVaRα(R~RET) is set to 0.05, and the weight coefficient (subjective preference) γ is initially set to 0.5.( 5 ) Other parameters can be seen in Table 1.Table 1
Model parameter setting.
λ m i n (DKK/MWh) λ m a x (DKK/MWh) N L m a x 0 800 10Moreover, all simulations and comparisons are implemented by utilizing the Matlab R2014a software on a PC laptop with an Intel Core i7 at 2.1 GHz and 8 GB memory.


## 4.2. Calculation Results Analysis

In this and the next subsections, ER is deemed as representing all the 21899 households to bid in spot EMs. Accordingly, our proposed model system must be solved in a unified way. Because ER will make 24 day-ahead piecewise staircase bidding curves for every test day, it is difficult to clearly display all these30×24 bidding curves in the form of a graph or a table. Hence, some representative bidding curves determined by implementing our model system are shown in Figures 3–6.Figure 3
Day-ahead bidding curve for hour 2 on November 1st.Figure 4
Day-ahead bidding curve for hour 7 on November 1st.Figure 5
Day-ahead bidding curve for hour 15 on November 2nd.Figure 6
Day-ahead bidding curve for hour 17 on November 7th.In Figures3–6, the red staircase lines represent the decision-making results of ER’s day-ahead bidding curves for some certain time units. The hollow dots represent the joint stochastic scenarios for these corresponding time units. Because every joint stochastic scenario contains the information of 3 uncertain parameters (day-ahead, balancing clearing prices, and real-time load) and in order to facilitate the demonstration in a 2-dimensional plane, we set the ordinate of a hollow dot to be the difference between day-ahead and balancing clearing prices.The analysis of Figures3–6 shows the following:( 1 ) It can be concluded from comparing Figure 3 with Figure 4 that when the joint stochastic scenarios are mostly manifested as day-ahead clearing price is lower than the corresponding balancing one; ER is inclined to bid high prices in the day-ahead market. The number of blocks in its piecewise staircase bidding curve tends to decrease relatively. This paper holds that the fundamental cause of the abovementioned tendency lies in the following: when the “price-taker” ER has a premonition that the probability of the balancing clearing price higher than the corresponding day-ahead one is relatively large, the motivation to pursue profit maximization makes it tend to buy “cheap electricity” in the day-ahead market. On one hand, high bidding prices can increase the possibility of buying large quantities of electricity in the day-ahead market; on the other hand, it is unnecessary to increase the number of blocks in bidding curve because ER undertakes relatively small risk of financial losses caused by large purchased electricity quantities in day-ahead market (even if the quantities purchased in day-ahead market exceed the real-time load, ER is still likely to benefit from the balancing market in the way of “buying at low price and selling at high price”). Therefore, relatively high bidding prices and small number of blocks together become the characteristics of ER’s bidding curve in Figure 3.( 2 ) It can be concluded from comparing Figure 4 with Figure 5 that, on the premise of high possibility that day-ahead clearing price is higher than the corresponding balancing one and the random fluctuation degree of real-time load is large, the number of blocks in ER’s piecewise staircase bidding curve tends to increase relatively. This paper holds that the fundamental cause of the abovementioned tendency lies in the following: large random fluctuation degree of real-time load in joint stochastic scenarios is likely to lead to higher probability of “purchasing excess” in day-ahead market and “returning back” in balancing market. Therefore, in the case that day-ahead clearing price is higher than the corresponding balancing one, the financial risk of causing “buying at high price and selling at low price” losses will be greater. By increasing the number of blocks in its piecewise staircase bidding curve, ER can further suppress the occurrence of “excessive” electricity purchases in day-ahead market and thus to some extent evade the above risks.( 3 ) It can be concluded from comparing Figure 3 with Figure 6 that when the joint stochastic scenarios are mostly manifested as day-ahead clearing price is lower than the corresponding balancing one; the number of blocks in ER’s piecewise staircase bidding curve does not change significantly with the increase of the random fluctuation degree of real-time load. This paper holds that the fundamental cause of the abovementioned phenomenon lies in the following: regardless of the random fluctuation degree of real-time load, the “price taker” ER is always beneficial in purchasing electricity in day-ahead market in the case that the day-ahead clearing price is lower than the corresponding balancing one. Therefore, the real-time load random fluctuation degree does not cause a significant change in the shape of ER’s day-ahead bidding curve.Furthermore, it must be noted that, whenCVaRα(R~RET) in the objective function (Eq. (7)) is removed (correspondingly, the constraints Eq. (9) to Eq. (10) should also be removed), ER will “degenerate" into a risk-neutral decision maker. This means that the 720 day-ahead bidding curves obtained by our proposed model system for the 30 test days are “degraded” into horizontal lines (however, the vertical positions of these curves are different). This finding is similar to that in [21], the reason for which is detailed in the relevant analysis in [20].In summary, by using our proposed model system (CVaRα(R~RET) is contained in objective function, and Eq. (9) to Eq. (10) are also contained in constraints) for day-ahead bidding decision-making, the actual profits of ER in the abovementioned 30 test days are listed and demonstrated in Table 2 and Figure 7, respectively.Table 2
ER’s actual daily profits of these 30 test days.
Date Nov. 1 2 3 4 5 6 7 8 9 10 Profit(DKK) 46227.92 43185.06 29775.23 35450.51 42256.79 45668.17 38381.74 18403.31 29371.08 24425.45 Date 11 12 13 14 15 16 17 18 19 20 Profit(DKK) 30493.52 49281.22 48338.59 50369.16 52106.68 52192.16 52843.47 60393.29 54959.43 83085.42 Date 21 22 23 24 25 26 27 28 29 30 Profit(DKK) 50367.96 54553.63 54503.93 45923.54 52888.17 60044.74 56236.43 39688.21 55952.02 55945.49Figure 7
ER’s actual daily profits of these 30 test days.The contents shown in Table2 and Figure 7 are very important, which is a quantitative premise to further analyze the decision-making effect of the model system in this paper. In the subsequent Section 4.3, the contents of Table 2 and Figure 7 will be compared (day by day) with the actual profits obtained based on other decision-making methods. The decision-making effect of our proposed model system will also be reflected in the following relevant analysis.Finally, through the simulation for the above 30 test days, it can be found that the average calculation time of our model system for one delivery day is 4.73 minutes. According to the relevant theory in [1], the implementation of day-ahead market is usually at least 12 hours in advance. Therefore, it is completely feasible to apply our model system for day-ahead bidding decision-making by ER.


## 4.3. Decision-Making Methods Comparison

In this subsection, under the same experimental case designed in Section4.1, the contents shown in Table 2 and Figure 7 will be compared with the simulation results of the model proposed in [20]. As mentioned in Section 1, the model function in [20] is similar to that of our model system in this paper. Specifically, the decision-making results of the day-ahead bidding curves for “price taker” ER are also the piecewise staircase ones. The difference between these 2 methods is as follows:( 1 ) In [20], the model cannot make the decision on the optimal number of blocks in ER’s day-ahead bidding curves, but input it into the model as a preset parameter value (it is set to 7 for block quantity parameter required by model proposed in [20]).( 2 ) Because it does not introduce the concept of CVaR in [20], the decision-making process does not consider the problem of hedging financial risk of profit loss caused by joint randomness of day-ahead, balancing clearing prices, and real-time load.In order to simplify the description, we refer to the decision-making results generated based on our model system as strategy 1 and those generated based on model in [20] as strategy 2. The advantages of strategy 2 compared to other methods (e.g., Expected Maximization Bid (ExpBid), Unconstrained Risk (UncRisk), etc.) in terms of decision-making effects have been fully verified in [20]. Therefore, it has high experimental persuasiveness and rationality by comparing strategy 1 with strategy 2 to verify the decision-making effect of our model system.Both of the actual profits of ER obtained from strategy 1 and strategy 2 over these 30 test days are depicted in Figure8, respectively.Figure 8
Comparison of ER’s actual daily profits obtained from strategies 1 and 2.As can be seen from Figure8, in most test days, the actual profit obtained from strategy 1 is higher than strategy 2. This basically verifies that the model system proposed in this paper has better decision-making effect in helping ER to obtain more profits. We believe that the main reasons are the following:( 1 ) Our model system can optimize ER’s piecewise staircase bidding curve from both the number of blocks and bidding price of every block, which can be hardly realized by using model in [20] (model in [20] can only determine the optimal bidding prices by solving a mixed-integer linear programming problem). In fact, if the outer decision-making model in our model system is removed, the vertical position difference between the 2 curves in Figure 8 will be significantly reduced. Therefore, in addition to optimizing bidding prices, the reasonable adjustment of the number of blocks is also an important means to improve the profit of ER.( 2 ) Due to the application of CVaR in this paper, the robustness of strategy 1 is reinforced in terms of resisting joint randomness of clearing prices and real-time load. This means that profit obtained from strategy 1 has low sensitivity to random fluctuations in clearing prices and real-time load. Conversely, by implementing model in [20], the robustness of strategy 2 is weakened in terms of resisting joint randomness of clearing prices and real-time load due to the neglect of CVaR. This means that profit obtained from strategy 2 has high sensitivity to random fluctuations in clearing prices and real-time load. In fact, in the day-ahead decision-making stage, the deviations between the estimated and realized values in terms of day-ahead, balancing clearing prices, and real-time load can hardly be avoided. This makes our model system comprehensively controlling financial risk through CVaR beforehand, which is more conducive to guarantee reasonable profits under various uncertain conditions.


## 4.4. Bidding Methods Comparison

As mentioned in Section4.1, if it is assumed that ER can be allowed to represent different household groups at different residential price steps to separately bid in spot EMs, the decision-making effect of our model system may be affected by changes in this bidding method. If the separate bidding method can result in higher actual profits for ER than the unified one (as in Sections 4.2 and 4.3), then this bidding method has the potential to be suggested, and vice versa. In order to carry out preliminary verification of the above ideas, we will compare ER’s obtained actual daily profits under the abovementioned 2 bidding methods in this subsection. For simplifying the description, we further refer to the decision-making results under the separate bidding method as strategy 3.Both of the actual profits of ER obtained from strategy 1 and strategy 3 over these 30 test days are depicted in Figure9, respectively.Figure 9
Comparison of ER’s actual daily profits obtained from strategies 1 and 3.As can be seen from Figure9, in most test days, the actual profit obtained from strategy 3 is higher than strategy 1. To a certain extent, this preliminarily verifies that the separate bidding method can result in higher actual profits for ER than the unified one. This paper believes that the main reasons may be the following: different types of users have differences in terms of power usage habits which make their load curve shape and random fluctuation characteristics different. By representing different user groups to bid in spot EMs separately, ER can make its decision-making results more targeted. Equivalently, this means that different bidding curves adapt to the load curve shape and its random fluctuation characteristics of different types of users so as to make ER more beneficial.However, on the one hand, it is not enough to verify the conclusion that the separate bidding method is better than the unified one only through an “orphan case.” On the other hand, the “market power” of many participants cannot be completely ignored in reality. Even if the change of bidding method is beneficial to a certain ER, it may bring “infringement" to the interests of other market participants. Therefore, whether the way that ER can separately represent different type of users to bid is more reasonable or not requires further theoretical argumentation and experimental analysis.


## 4.5. Sensitivity Analysis

In our proposed model system, the weighting factor (subjective preference)γ (0≤γ≤1) reflecting the trade-off between the expectation and CVaR of profit is set exogenously based on the subjective judgment and preference of ER for risk. The change in value of γ will affect the decision result of ER’s day-ahead piecewise staircase bidding curves, which will lead to different actual profits. In this subsection, we use the expectation and CVaR (with the confidence level α=0.05) of actual profits in 30 test days as 2 specific indicators to show the impact of different γ values. Figure 10 shows the Pareto frontier curve formed by the expectations and CVaRs of actual profits under different settings of γ. The calculation results used to form this curve are listed in Table 3.Table 3
Values of the expectation and CVaR of ER’s daily actual profit asγ increases.
γ 0 0.1 0.2 0.3 0.4 0.5 Profit (DKK) 45838.62 45981.48 46103.83 46306.75 46725.59 47107.73 CVaR (DKK) 46683.28 46591.84 46319.76 45903.15 45572.68 45348.36 γ 0.6 0.7 0.8 0.9 1 - Profit (DKK) 47592.41 47904.75 48352.09 48834.17 49013.61 - CVaR (DKK) 45079.29 44836.82 44209.15 43791.98 43286.53 -Figure 10
Pareto frontier between the expectation and CVaR of power retailer’s daily profit asγ increases.Analysis of Figure10 and Table 3 indicates that the expectation of ER’s actual profits increases with the increase of γ, while the CVaR decreases with the increase of γ. This is mainly because in our model system the larger the value of γ is set, the more the ER tends to have a “risk-neutral” behavior tendency. Although the decision-making results can better reflect the pursuit of expected profit maximization, it is increasingly unable to resist the interference of clearing prices and real-time load random fluctuation on profit. Conversely, the smaller the value of γ is set, the more the ER tends to have a “risk-aversion” behavior tendency. Although the decision-making results can better resist the interference of clearing prices and real-time load random fluctuation on profit, it is increasingly unable to pursue the goal of expected profit maximization. Hence, in the Pareto frontier curve reflected in Figure 10, it is no longer possible for ER to pursue further improvement of one objective without jeopardizing another one.


## 5. Conclusion

In this paper, an inner-outer 2-layer model system based on stochastic mixed-integer optimization has been proposed for ER’s day-ahead EM bidding decision-making. This model system not only can help to make ERs more beneficial under China’s EM circumstances in the near future, but also can be applied for improving their profits under many other deregulated EM circumstances (e.g., PJM and Nord Pool) if slight transformation is implemented. The decision-making results are the day-ahead piecewise staircase bidding (price-energy) curves, which is in line with the EM trading rules of many countries including China [1, 3, 4, 20, 21]. Simulations based on historical data have verified that our model system can further improve the actual profit of ER compared to other methods. The main reasons are the following:( 1 ) Our model system can optimize both the number of blocks in day-ahead piecewise staircase bidding curves and the bidding price of every block by solving its inner and outer models alternately and iteratively. This function can hardly be carried out by implementing other methods.( 2 ) Our model system can comprehensively control financial risk through CVaR (in the inner layer model) beforehand. This guarantees reasonable profits under clearing prices and real-time load uncertainties.Meanwhile, in addition to profit improvement, low computational complexity (average calculation time of our model system for one delivery day is 4.73 minutes) also indicates that it is feasible and reasonable to apply our model system for ER’s day-ahead bidding decision-making.After all, our proposed model system is partially based on stochastic optimization. As the uncertainty sampling space increases, computational efficiency will be inevitably affected. For example, in our simulation, when the number of stochastic scenarios is set to 30, 40, and 50, the average calculation time of our model system for one delivery day will increase to 6.29, 8.82, and 10.91 minutes. Hence, exploiting approaches with higher computational efficiency for ER’s bidding decision-making problem in spot EM will be one of our future research directions.



---

*Source: 4185952-2019-03-03.xml*