2.2.2. Minimum Surplus Conditions

#### Minimum Surplus Conditions for Uncertain Energy Supply Bids

In the proposed setup, without any additional considerations, it is possible that a submitted energy bid is rejected, while the connected SRDB(s) is/are accepted—this would naturally imply loss for the respective order, for the bidder is obliged to pay for the SRDB(s). Furthermore, even if the primary energy bid and the implied SRDB(s) is/are accepted, depending on the resulting MCPs, the surplus from the energy bid (originating from the energy sub-market) may not cover the cost of the SRDB(s) (originating from the reserve sub-markets) or the remaining surplus of the order (after extracting the costs of the SRDBs) may be very small. As the first step in the solution of this problem, we must calculate the incomes of the individual energy/reserve bids.

In order to formulate a linear computational framework, we take advantage of the dependence between MCPs and bid acceptance indicators (*y*) and use the description of income introduced in References [21,22], as follows. Let us denote the income of the bid corresponding to *yESUb j* by *IESUb j* Intuitively *IESUb j*may be calculated as

$$I\_j^{ESIIb} = M \mathcal{C} P^E q\_j^{ESIIb} y\_j^{ESIIb} \tag{7}$$

.

where *MCP<sup>E</sup>* stands for the market clearing price of energy.

Equation (7) holds however a quadratic expression of variables, namely the product of *MCP<sup>E</sup>* and *yESUb j* , which would result in a computationally demanding quadratically constrained problem (MIQCP). To overcome this issue we formulate the expressions for income as

$$y\_j^{ESllb} > 0 \quad \rightarrow \quad I\_j^{ESllb} = y\_j^{ESllb} q\_j^{ESllb} p\_j^{ESllb} + q\_j^{ESllb} M \text{CP}^E - q\_j^{ESllb} p\_j^{ESllb} \tag{8}$$

$$y\_j^{ESIIb} < 1 \quad \rightarrow \quad l\_j^{ESIIb} = y\_j^{ESIIb} q\_j^{ESIIb} p\_j^{ESIIb} \tag{9}$$

We implement the logical relations in the optimization framework based on the so called big-M method [23], using integer logical variables (denoted by *z*) as described in Appendix A.

To elucidate the Formulas (8) and (9), let us enumerate the following three possibilities:


The above considerations may be naturally formulated also for income of bids corresponding to *yESU*<sup>+</sup> *j* and *yESU*<sup>−</sup> *j* —and also for bids corresponding to *yES j* but their income wont be important in the proposed framework.

The incomes of uncertain energy demand bids *IEDUb j* , *IEDU*<sup>+</sup> *j* , *IEDU*− *j* and incomes of positive and negative SRDBs connected to energy bids, denoted by, *IRD*<sup>+</sup> *SRDB j* and *IRD*− *SRDB j* (*SRDB* ∈ {*EDUb*, *EDU* +, *EDU*−}) respectively, may be formulated similarly, taking into consideration in the latter two case that in the case of demand bids *qRD*<sup>+</sup> *SRDB j* and *qRD*<sup>−</sup> *SRDB j* < 0, thus the income will mean practically expense because of the resulting negative sign.

According to these income calculations, now we may formulate constraints which exclude the scenario when the surplus of the primary energy bid does not meet the expense of the SRDB(s). In addition, we assume that for every uncertain order a surplus constant (*S* > 0) is defined, which describes how much the surplus of the primary bid must exceed the expenses (in other words it gives a lower bound for the total resulting surplus). In the proposed approach we assume that this constant may be determined by the bidder, thus it is diverse. However, under certain market conditions, it may be also plausible to assume that *S* is a parameter regulated by the central authority (system/market operator). Regarding the bid corresponding to *yESUb j* , we denote this constant by *SESUb j* (the notation is similar in the case of *yESU*<sup>+</sup> *j* and *yESU*<sup>−</sup> *j* ). The constant *SESUb j* > 0, will represent the minimum surplus value, which is required in the case of the acceptance of the order. According to this we may formulate the minimum surplus condition (MSC) for bi-uncertain energy supply bids as

$$S\_j^{ESllb} - I\_j^{RD+} \, ^{ESllb} - I\_j^{RD-ESllb} \le I\_j^{ESllb} - p\_j^{ESllb} q\_j^{ESllb} y\_j^{ESllb} \,\tag{10}$$

where the right side is the surplus of the bid and the left side is the sum of the costs of the connected SRDBs (the incomes are negative because of demand) and the parameter *SESUb j* . In the case of positively uncertain *ES* bids, we may write

$$S\_j^{ESI+} - I\_j^{RD-} 
mathbb{+} \le I\_j^{ESI+} - p\_j^{ESI+} q\_j^{ESI+} y\_j^{ESI+},\tag{11}$$

while in the case of negatively uncertain *ES* bids, the formula becomes

$$S\_j^{ESI-} - I\_j^{RD+} \stackrel{ESI-}{\leq} I\_j^{ESI-} - p\_j^{ESI-} q\_j^{ESI-} y\_j^{ESI-}.\tag{12}$$

Minimum Surplus Conditions for Uncertain Energy Demand Bids

In the case of bi-uncertain energy demand bids, the minimum surplus condition will state that total cost of the bid must be no more than the maximal potential cost of the bid, which would have been realized in the energy sub-market in the particular case if *MCP<sup>E</sup> i* = *pED j* , minus a similar surplus constant (*SEDUb j*) as in the case of supply bids.

$$-I\_j^{EDllb} - I\_j^{RD+EDllb} - I\_j^{RD-EDllb} \le -p\_j^{EDllb} q\_j^{EDllb} y\_j^{EDllb} - S\_j^{EDllb},\tag{13}$$

In the case of positively uncertain *ED* bids, we may write

$$-I\_j^{EDU+} - I\_j^{RD-EDU+} \le -p\_j^{EDU+} q\_j^{EDU+} y\_j^{EDU+} - S\_j^{EDU+},\tag{14}$$

while in the case of negatively uncertain *ED* bids, we may write

$$-I\_j^{EDI-} - I\_j^{RD+} \stackrel{EDI-}{\leq} -p\_j^{EDI-} q\_j^{EDI-} y\_j^{EDI-} - S\_j^{EDI-}.\tag{15}$$

## 2.2.3. Bid Acceptance Constraints

For energy supply bids with no uncertainty - • *yESj*> 0 → *MCP<sup>E</sup>* ≥ *pESj*.

For bi-uncertain energy supply bids

• *yESUb* > 0 → Inequality (10) holds. This also implies *MCP<sup>E</sup>* ≥ *pESUb* .

*j j* •*yESUb j*< 1 → *MCP<sup>E</sup>* ≤ *pESUb j*or *yESUb j*= 0, *yRD*<sup>+</sup> *ESUb j*= 0 and *yRD*<sup>−</sup> *ESUb j*= 0.

.

.

For positively uncertain energy supply bids


For negatively uncertain energy supply bids


For energy demand bids with no uncertainty

.


For bi-uncertain energy demand bids

• *yEDUb j*> 0 → Inequality (13) holds. This also implies *MCP<sup>E</sup>* ≤ *pEDUb j*.

$$\bullet \quad y\_j^{'EDllb} < 1 \rightarrow M \\ \text{CP}^E \ge p\_j^{EDllb} \\ \text{or } y\_j^{EDllb} = 0, y\_j^{RD + EDllb} = 0 \\ \text{and } y\_j^{'RD - EDllb} = 0.$$

For positively uncertain energy demand bids

• *yEDU*<sup>+</sup> > 0 → Inequality (14) holds. This also implies *MCP<sup>E</sup>* ≤ *pEDU*<sup>+</sup> 

*j j* • *yEDU*<sup>+</sup> *j*< 1 → *MCP<sup>E</sup>* ≤ *pEDU*<sup>+</sup> *j*or *yEDU*<sup>+</sup> *j*= 0, and *yRD*<sup>−</sup> *EDU*+ *j*= 0.

For negatively uncertain energy demand bids


For positive reserve supply bids


For negative reserve supply bids

$$\bullet \quad y\_{\backslash\_{\dots}}^{RS-} > 0 \to M \mathcal{C}P^{R-} \ge p\_{\backslash\_{\dots}}^{RS-}$$

$$\bullet \quad y\_j^{RS-} < 1 \to M \mathcal{C} P^{R-} \le p\_j^{RS-}$$

For not SRDB positive reserve demand bids

$$\bullet \qquad y\_j^{RD+} > 0 \to M \mathbb{C}P^{R+} \le p\_j^{RD+} $$

 • *yRD*<sup>+</sup> *j* < 1 → *MCPR*<sup>+</sup> ≥ *pRD*<sup>+</sup> *j*

> For not SRDB negative reserve demand bids

$$\bullet \qquad y\_j^{RD-} > 0 \to M \mathcal{C} P^{R-} \le p\_j^{RD-}$$

 •*yRD*<sup>−</sup> *j* < 1 → *MCPR*− ≥ *pRD*<sup>−</sup> *j*

> For positive SRDBs


For negative SRDBs


The structure of the variable vector and the formulation of logical implications based thereon may be found in Appendix A.

2.2.4. Energy and Reserve Balances

> The energy and reserve balances may be formulated as

$$\sum\_{j=1}^{n\_{ES}} y\_j^{ES} q\_j^{ES} + \sum\_{j=1}^{n\_{ESID}} y\_j^{ESlb} q\_j^{ESlb} + \sum\_{j=1}^{n\_{ESl+}} y\_j^{ESl+} q\_j^{ESl+} + \sum\_{j=1}^{n\_{ESl-}} y\_j^{ESl-} q\_j^{ESl-}$$

$$+ \sum\_{j=1}^{n\_{ED}} y\_j^{ED} q\_j^{ED} + \sum\_{j=1}^{n\_{ED}} y\_j^{EDID} q\_j^{EDID} + \sum\_{j=1}^{n\_{EDl+}} y\_j^{EDl+} q\_j^{EDl+} + \sum\_{j=1}^{n\_{EDl-}} y\_j^{EDl-} q\_j^{EDl-} q\_j^{EDl-} = 0,\tag{16}$$

$$\sum\_{j=1}^{n\_{E+}} y\_j^{\text{ES+}} q\_j^{\text{ES+}} + \sum\_{j=1}^{n\_{RD+}} y\_j^{\text{RD+}} q\_j^{\text{RD+}} + \sum\_{j=1}^{n\_{ESllb}} y\_j^{\text{RD+}} + \text{ESllb}\_q q\_j^{\text{RD+}} + \sum\_{j=1}^{n\_{EDlb}} y\_j^{\text{RD+}} + \text{EDllb}\_q q\_j^{\text{RD+}} + \text{EDllb}\_q$$
 
$$+ \sum\_{j=1}^{n\_{ESll-}} y\_j^{\text{RD+}} + \text{ESll} - q\_j^{\text{RD+}} + \sum\_{j=1}^{n\_{EDll}} y\_j^{\text{RD+}} + \text{EDll} - q\_j^{\text{RD+}} + \text{EDll} - = 0,\tag{17}$$

$$\sum\_{j=1}^{n\_{E8-}} y\_j^{RS-} q\_j^{RS-} + \sum\_{j=1}^{n\_{RD-}} y\_j^{RD-} q\_j^{RD-} + \sum\_{j=1}^{n\_{E8ll}} y\_j^{RD-} \, ^{ESllb} q\_j^{RD-} \, ^{ESllb} + \sum\_{j=1}^{n\_{EDb}} y\_j^{RD-} \, ^{EDlb} q\_j^{RD-} \, ^{ElD-} \, ^{Ellb}$$

$$+ \sum\_{j=1}^{n\_{E8ll}} y\_j^{RD-} \, ^{ESll+} q\_j^{RD-} \, ^{ElD+} + \sum\_{j=1}^{n\_{EDl}} y\_j^{RD-} \, ^{ElD+} q\_j^{RD-} \, ^{ElD+} = 0. \tag{18}$$

2.2.5. The Objective Function

The objective function to maximize is the total social welfare (TSW). By definition the TSW is the total utility of consumption minus the total costs of production [24]. The TSW equals in this case the sum of the social welfare in the three sub-markets.

$$\begin{aligned}TSW &= TSW^E + TSW^{R+} + TSW^R \\TSW^E &= -\sum\_{j=1}^{n\_{E\mathcal{S}}} y\_j^E \, q\_j^{ES} p\_j^{ES} - \sum\_{j=1}^{n\_{E\mathcal{U}}} y\_j^{ED} q\_j^{ED} p\_j^{ED} - \sum\_{\substack{T\mathcal{E}\mathcal{U} \\ T\mathcal{E}\mathcal{U}}} \sum\_{j=1}^{n\_{E\mathcal{U}}} y\_j^{T\mathcal{U}} q\_j^{RD} + \sum\_{j=1}^{n\_{E\mathcal{U}}} y\_j^{RD} + q\_j^{RD} + p\_j^{RD} \\ &- \sum\_{\substack{T\mathcal{E}\mathcal{U} \\ T\mathcal{E}\mathcal{U}}}^{n\_{E\mathcal{U}}} y\_j^{RD} + TEU\_q q\_j^{RD} + TEU\_p p\_j^{RD} + TEU \\TSW^{R-} &= -\sum\_{j=1}^{n\_{E\mathcal{U}}} y\_j^{RS-} q\_j^{RS-} - p\_j^{RS-} - \sum\_{j=1}^{n\_{E\mathcal{U}}} y\_j^{RD-} q\_j^{RD-} p\_j^{RD-} \\ &- \sum\_{\substack{T\mathcal{U}\mathcal{U} \\ T\mathcal{U}\mathcal{U}}}^{n\_{E\mathcal{U}}} y\_j^{RD-} T^{\mathcal{U}\mathcal{U}} q\_j^{RD-} P\_j^{\mathcal{D}\mathcal{U}} \end{aligned} \tag{19}$$

where *TEU* ∈ { *ESUb*, *ESU p*, *ESUn*, *EDUb*, *EDUp*, *EDUn*} denotes set of possible types of uncertain energy bids. Negative signs are needed because of the quantity convention of bids: the amount of demand bids is negative (while supply is positive).
