An Exact Solution Algorithm for Integer Bilevel Programming with Application in Energy Market Optimization

We develop an exact cutting plane solution algorithm for a special class of bilevel programming models utilized for optimal price-bidding of energy producers in day-ahead electricity markets. The proposed methodology utilizes a suitable reformulation in which a key prerequisite for global optimality, termed bilevel feasibility, is relaxed. Solving the problem to global optimality involves finding the price-offers of the strategic producer (upper-level decision variables) which maximize his self-profit upon clearing of the market and identification of the optimal energy quantity distribution (lower-level decision variables). To exclude from consideration the encountered bilevel infeasible solutions, the algorithm employs a special type of valid cuts drawn from the theory of integer parametric programming. The generation of these cuts involves finding the truly optimal lower-level solution using the strategic price-offers at the bilevel infeasible solution subject to exclusion and devising range intervals for these offers such that the optimality of this solution is retained when each of them lies in its corresponding interval. Each cut imposes a suitable part of this solution, under the condition that each price-offer belongs to its associated interval, which renders the bilevel infeasible solution invalid. We establish the theoretical framework for the development of the proposed algorithm, we illustrate its application on a small case study, and we present extensive computational results demonstrating its behavior and performance on random problem instances. These results indicate that the algorithm is capable of solving to global optimality considerably larger problems than those that a previous elementary version of the same algorithm could solve. This constitutes significant research contribution, considering the lack of generic optimization software for bilevel programming, as well as the fact that the applicability of specialized algorithms on problems of realistic size is rather limited.


Introduction
We develop an exact cutting plane solution algorithm for a class of bilevel programming models utilized in day-ahead electricity markets for optimal price-bidding of energy producers. Typically, the upper-level of these models is controlled by a single producer, so called strategic, who aims to devise optimal price-offers for maximizing his profit upon clearing of the market. Given the price-offers of the participating producers, an independent system operator (ISO) controls the lower-level problem, aiming to find the energy distribution that satisfies the demand at minimum total bidcost. A key characteristic of these models, distinguishing them from general bilevel programming formulations, is that the upper-level variables affect the objective but not the feasibility of lower-level solutions. This holds true due to the fact that the upper-level variables appear at the lower-level objective but not in any lower-level constraint.
The proposed methodology utilizes the widely used high-point relaxation, which does not guarantee a key condition for global optimality termed bilevel feasibility. This condition states that the values of the lower-level variables must comprise an optimal lower-level solution for the corresponding values of the upper-level variables. Special optimality conditions are embedded into the model formulation for excluding a-priori certain energy distributions that cannot be part of an optimal solution. The correctness of these conditions is based on special properties proven to hold true at the problem's global optimum. Utilizing cutting planes for additionally excluding the encountered bilevel infeasible solutions in successive iterations, the algorithm succeeds in identifying the global optimum upon termination. The validity of these cuts is justified by key fundamental results drawn from integer parametric programming theory.
An exact solution algorithm for the single-period version of the problem under consideration has been proposed in [23]. The extension to the multi-period planning horizon considered in the current work adds a strongly combinatorial nature to the problem, increasing substantially its complexity. This is due to the fact that the unit commitment decisions increase the size of the feasible region in a combinatorial fashion. The theoretical groundwork we develop in the present work extends that of [22], both in terms of the problem characteristics embedded within the model formulation, as well as in terms of the key features the proposed algorithm is equipped with. With respect to the problem definition, the current model setting includes additionally minimum up/down times and ramp-up/down constraints for the generation units, which comprise important realistic problem characteristics.
As far as the solution methodology is concerned, the current algorithmic version embodies special optimality conditions into the model formulation, which render a-priori infeasible a large collection of suboptimal lower-level solutions. For the exclusion of the bilevel infeasible encountered solutions, an enhanced integer parametric programming technique is utilized, which imposes optimal lower-level unit commitments, as well as upper bounds on the strategic producer energy quantities. Moreover, a significantly enhanced search procedure for the generation of these cuts is implemented, which succeeds in eliminating an increased number of such solutions at each iteration.
In order to establish the validity of these algorithmic enhancements, we prove several key theoretical results in what follows. The new version of the solution algorithm exhibits significantly improved computational performance compared to the previous one, as clearly demonstrated by the extended computational results on random problem instances that we report. These results reveal that it is capable of handling medium-sized problems quite efficiently, which constitutes significant contribution, considering the inevitable lack of generic optimization software for the treatment of bilevel problems with this purely integer special structure, as well as the fact that the applicability of specialized solution methodologies on problems of realistic size appears rather limited.
The remainder of this work is organized as follows. In Sect. 2, we review the existing related literature, while, in Sect. 3, we present the model formulation, elaborating on its special structure. In Sect. 4, we develop the proposed solution methodology, while in Sect. 5, we illustrate its application on a small case study, and we present computational results demonstrating its behavior and performance. In Sect. 6, we discuss some interesting model variations, and finally, in Sect. 7, we summarize the research contribution of this work, and we suggest interesting directions for future research.

Bilevel Programming in Energy Markets
One of the most common approaches for handling bilevel optimization models in the context of energy markets is their reformulation as single-level models using the KKT optimality conditions of the lower-level problem [4,33]. The inevitable nonlinearities this transformation involves are typically handled with clever integer programming modeling techniques. KKT-based solution approaches are also the ones that have been proposed in [19,26], with the nature of the underlying methodologies of these two works being heuristic.
Gross and Finlay [17] consider a fully competitive energy pool with application in the England and Wales power markets. By exploiting a Lagrangian relaxation, they develop a solution methodology that succeeds in identifying the global optimal bidding strategy. Fernández-Blanco et al. [14] formulate a mixed integer nonlinear bilevel program for a day-ahead electricity market with locational marginal pricing. The proposed solution approach is based on a single-level model reformulation that exploits duality theory of linear programming, KKT optimality conditions and integer algebra.
The most crucial difference the present work exhibits with respect to the above ones is that it considers a purely integer model formulation. This makes typically employed techniques such as the KKT-approach or linear programming duality not directly applicable. Similar formulations with the one that we address in the current work are those that have been studied in [13,32], but the lower level of these models is also purely continuous, which allows their reformulation as single-level problems through the KKT optimality conditions. The authors employ clever integer programming modeling techniques to eliminate the ensuing nonlinearities and transform the problem into a mixed integer linear program which they then solve with generic optimization software.
Kwon and Frances [25] recently published a review on mathematical programs modeling the optimal bidding problem faced by power producers participating in day-ahead electricity auction markets. This review considers both price taking and non-price taking energy producers, deterministic and stochastic problem settings, as well as a large collection of modeling approaches such as linear/nonlinear integer programming and mathematical programs with equilibrium constraints. The review focuses primarily on models that combine price-offer with self-scheduling decisions.
The development of bilevel programming solution methodologies for energy market optimization models is also considered in [6]. After presenting a general background on the operation of energy markets and on existing solution techniques for bilevel optimization, the author addresses a bilevel programming model in which both the primal and the dual lower-level optimal solutions affect the upper-level objective. For this model formulation, a parametric programming solution methodology is proposed [7], which, under suitable conditions, enables the decomposition of the lower-level problem and the reformulation of the original problem as a mixed integer linear program.

Solution Methodologies for Integer Bilevel Programming
One of the earliest specialized methodologies for integer bilevel programming is the branch and bound algorithm by Moore and Bard [31]. The authors also elaborate on the key theoretical properties of single-level integer programming that do not carry over to multi-level integer programming. Being one of the first successful attempts for the unified treatment of this problem, this algorithm is considered seminal; nevertheless, it necessitates substantial branching in our case, which inevitably needs to be performed repetitively on the same variables due to the presence of the general integralities.
Gümüs and Floudas [18] develop various solution methodologies for the treatment of several classes of bilevel optimization models, which, among others, employ enumeration techniques, model reformulations, and valid inequalities. Mitsos [30] proposes a global optimization solution methodology for mixed integer nonlinear bilevel programming, which utilizes fixed value and optimal value function reformulations. Kleniati and Adjiman [21] develop a branch and bound algorithm for mixed integer bilevel programming, which performs branching on both leader and follower decision variables. The above works illustrate the application of the proposed methodologies on test problem instances which are considerably smaller than those considered in the current work.
Köppe et al. [24] develop a parametric solution procedure for pure and mixed integer bilevel programming, while Domínguez and Pistikopoulos [12] develop a solution methodology for integer bilevel programming which tries to identify the global optimum through the parametric incorporation of the lower-level problem into the upper-level problem. The elimination of the general integer variables is a task that poses considerable difficulties on the application of these algorithms for our problem.
DeNegre and Ralphs [11], Caramia and Mari [9], and Fischetti et al. [15] develop solution methodologies for integer bilevel programming, which apply valid cuts on the high-point relaxation. Although these works exhibit some similarities with respect to the current one, the nature of the cuts they employ is significantly different and somewhat more standardized than the ones we utilize in our proposed algorithm.
Xu and Wang [37] develop a branch and bound algorithm for mixed integer linear bilevel programming, in which each branching decision is associated with several subproblems. Branch and bound algorithms for bilevel integer linear programming are also the ones proposed by Wang and Xu [35] and Liu et al. [27]. The former methodology, termed watermelon algorithm, utilizes disjunctive cuts to eliminate bilevel infeasible solutions, while the latter one utilizes an enhanced branching rule in order to keep the size of the search tree manageable. On the other hand, our proposed algorithm involves no branching, due to the fact that the solution of the employed relaxation is always integer.
Yue et al. [38] present a reformulation and decomposition algorithm for mixed integer linear bilevel programming, which implements a column and constraint generation methodology on a projection-based single-level problem reformulation. The absence of continuous variables limits considerably the applicability of this algorithm in our case. Finally, Lozano and Smith [29] present an exact solution algorithm for mixed integer bilevel programming, which implements a single-level value function reformulation in order to obtain bounds on the optimal objective.

Problem Definition and Model Formulation
We consider a multi-period day-ahead electricity market, in which the energy demand is satisfied by a set of generation units. The market is regulated by an ISO, who is responsible for collecting the energy price-offers (bids) of the producers and fairly clearing the market at the minimum total bid-cost. After the optimal energy plan is determined, the system compensates each energy producer by fully paying his startup cost, as well as a market clearing price for each energy unit he contributes. This price is equal to the corresponding price-offer submitted. Aiming to maximize his own profit upon clearing of the market, each individual producer must select his optimal price-offers for each time period of the planning horizon. Under the assumption that an individual producer has full knowledge of the market's technical parameters and has come up, in some way, with the exact price-offers his competitors have submitted (we comment on how realistic this assumption is in the following paragraphs), the problem he is faced with is a bilevel optimization problem. The upper-level objective of this problem maximizes the producer's profit, subject to the restriction that the total bid-cost for energy satisfaction is minimized at the lower level.
The mathematical notation and formulation of the optimization problem the ISO is faced with are as follows:

Sets:
I production units, indexed by i.

Parameters:
T number of time periods of the planning horizon, p i,t unit price-offer of producer i for energy in time period t (i ∈ I, t 1,…,T ), s i startup cost of unit i (i ∈ I), m i technical minimum of unit i (i ∈ I), M i technical maximum of unit i (i ∈ I), d t demand for energy in time period t (t 1,…,T ), z i,0 binary parameter denoting the status of unit i in the last time period of the previous planning horizon (i ∈ I), q i,0 energy quantity of unit i in the last time period of the previous planning horizon (i ∈ I), y i,k binary parameter denoting if unit i was switched on in time period k which is part of the previous planning horizon or not (i ∈ I, k 0, − 1,…), o i,k binary parameter denoting if unit i was switched off in time period k which is part of the previous planning horizon or not (i ∈ I, k 0, − 1,…), mu i minimum uptime (number of time periods) of unit i (i ∈ I), md i minimum downtime (number of time periods) of unit i (i ∈ I), ru i ramp-up value for energy quantity of unit i (i ∈ I), rd i ramp-down value for energy quantity of unit i (i ∈ I), Decision Variables: q i,t energy quantity of unit i in time period t (i ∈ I, t 1,…,T ), z i,t status or commitment of unit i in time period t: binary variable that takes the value 1 if the energy quantity of unit i in time period t is positive, and 0 otherwise (i ∈ I, t 1,…,T ), y i,t binary variable that takes the value 1 if unit i is switched on in time period t while being off in time period t-1, and 0 otherwise (i ∈ I, t 1,…,T ), o i,t binary variable that takes the value 1 if unit i is switched off in time period t while being on in time period t-1, and 0 otherwise (i ∈ I, t 1,…,T ).

Independent System Operator Optimization Problem (ISOOP):
Min Objective (1) minimizes the total system bid-cost for the energy demand satisfaction. Constraint set (2) ensures that the total energy production equals the total energy demand. Constraint set (3) limits the energy dispatch of each generation unit based on its technical characteristics. It ensures that the energy dispatch of a unit is 0 when this unit is off, and at least equal to its technical minimum but not greater than its technical maximum when it is on. Constraints (4)-(6) ensure correct values for variables y i,t modeling the start-up of generation unit i in time period t. Variable y i,t should be equal to 1 when unit i is switched on in time period t after being off in period t-1, and this is correctly imposed by constraint (4). In any other case, variable y i,t should be equal to 0 and this is ensured by constraints (5) and (6). In an identical way, constraints (7)-(9) ensure correct values for variables o i,t modeling the shut-down of generation unit i in time period t. Constraints (10) and (11) impose the minimum up/down times of the generation units. More specifically, constraint (10) states that generation unit i must be on in time period t if it has been switched on within the last (including t) mu i time periods. Similarly, constraint (11) states that generation unit i must be off in time period t if it has been switched off within the last (including t) md i time periods. Constraints (12) and (13) impose the ramp-up/down limits on the unit energy quantities. More specifically, constraints (12) dictate that if unit i is active both in time periods t-1 and t, then q i,t cannot exceed q i,t-1 by more than ru i units. On the other hand, they ensure that if unit i is switched on in time period t, then q i,t cannot exceed m i + 0.5ru i , a typical adjustment of the restriction for that case. In any other case, these constraints are redundant. Similarly, constraints (13) dictate that if unit i is active both in time periods t-1 and t, then q i,t-1 cannot exceed q i,t by more than rd i units. In a similar fashion with the ramp-up case, they also ensure that a unit can be switched off in time period t only if q i,t-1 does not exceed m i + 0.5rd i . In any other case, these constraints are redundant. Finally, the lower-level decision variables are constrained to binary and non-negative integer values by constraints (14) and (15), respectively. In the above formulation, parameters m i , M i , ru i , rd i , p i,t and d t always take positive integer values for all i and t, with 1 < m i < M i . In what follows, we call generation unit i active in time period t if and only if z i,t 1.
The additional mathematical notation and the formulation of the profit maximizing bilevel optimization problem the strategic producer is faced with are as follows: Parameters: C 1 : price cap for the price-offers of the strategic producer, c 1 : unit variable production cost of the strategic producer, Decision Variables: P 1,t : price-offer of the strategic producer for one unit of energy in time period t (t 1,…,T ). Strategic Producer Bilevel Optimization Problem (SPBOP): The SPBOP includes as part of its constraint set the ISOOP. The producer maximizes his individual profit at the upper-level (16), having control of his price bids only, since his energy quantities are determined at the lower-level. The start-up costs do not appear at the upper-level objective, since energy producers are typically compensated in full for them. Constraint set (17) states that the price-offers of the strategic producer cannot be lower than his unit production cost and cannot exceed a value, also known as pricecap, determined by the market's regulator. The price-offers are additionally restricted to non-negative integer values by constraint set (18). Although the energy producers can manipulate strategically their technical characteristics aiming to achieve greater profits, the problem definition requires truthful associated values for all generation units. This requirement is ensured by the regulating authority through the imposition of the consensus to auditable technical characteristics as an absolute prerequisite for market participation.
The SPBOP is a purely integer model. In practice, variables p 1,t and/or q 1,t do not undeniably need to be integer, but may be allowed to be continuous, in which case the problem fits the mixed integer bilevel model setting. In this work, we restrict these variables to integer values for two main reasons. On the one hand, it makes the model more elegant, since the occurrence of continuous values for these variables appears rather odd in practice, and almost always necessitates some proper form of rounding, especially in the presence of many decimals. Someone could claim that this mimics, in some sense, the choice of imposing integralities. On the other hand, the pool of solution methodologies for pure integer bilevel programming is quite more limited than that for mixed integer. Thus, our pure integer framework could potentially assist the treatment of similar problems fitting in this special setting for which fewer algorithmic options stand available. Of course, this comes at a not negligible price, since the solution of the problem becomes naturally much harder. Nevertheless, it should be indicated at this point that the proposed solution algorithm exploits wisely the integrality of the decisions variables.
While the above formulation is aimed to model the strategic bidding problem an energy producer participating in an electricity market is faced with, it should be made clear that it does not address every possible aspect a realistic problem may exhibit. For example, network constraints, recovery schemes, block-bids, step-wise offers, etc., may also be present in practice. Nevertheless, we believe that the inherent complexity of the problem under consideration combined with the difficulties introduced by its bilevel structure demonstrates significant research interest and can serve as the basis for future research endeavors pursuing the development of bilevel solution algorithms to even more complex models than the above.
Although it is rarely the case that a particular producer will have full knowledge of the other producers' price-offers, in practice each competing producer may end-up solving several optimization problems such as the above, each time with different input parameters and assumptions, in order to comparatively evaluate alternative selfbidding strategies and scenarios. In the course of doing so, he may choose to estimate his competitors' bids based on educated values from historic data. Additionally, the optimization model introduced above could also be a valuable tool for discovering equilibrium points within an iterative game setting, in which each producer responds to the last set of bids submitted by the other producers by devising and announcing in return his optimal set of self-bids. The pursuit of such a research endeavor appears to exhibit significant research interest, which is, nevertheless, beyond the scope of this work.
The mathematical model defined above belongs to the bilevel programming modeling framework, which consists of optimization problems including a second optimization problem in their constraint set. Distinct sets of decision variables, as well as distinct decision makers, are associated with each of these two problems. In our application context, the first one, termed upper-level optimization problem, is the one controlled by the strategic producer, also called upper-level decision maker or leader. The second one, termed lower-level optimization problem, is the one controlled by the ISO, also called lower-level decision maker or follower.
In our case, the ISOOP is nonconvex, as a consequence of the integralities. In the absence of these constraints, however, the feasible region of this problem would be convex, since the constraint set is comprised of linear functions only. The fact that the feasible region is closed and compact while all decision variables have finite bounds ensures the existence of the optimal solution to the lower-level problem. Under suitable assumptions, the existence of the optimal solution to the bilevel problem is also ensured. Note that, since all decision variables are constrained to integer values with finite bounds, the feasible set of both the upper-level and that of the lower-level optimization problem are of finite cardinality.
A key characteristic of the above bilevel formulation is the absence of upper-level decision variables from the lower-level constraint set; this implies that the leader's decisions do not influence the feasible set of the lower-level problem. On the other hand, the price-offers of the strategic producer appear as coefficients of his energy quantities in the lower-level objective; thus, the leader's decisions affect the effectiveness of alternative lower-level solutions. In bilevel programming theory, the term reaction set refers to the lower-level optimal solution(s) for a particular set of upperlevel decision variable values. The term inducible region (IR) is used to denote the set over which the leader may optimize his objective, i.e., the set of every upper-level feasible solution and its corresponding reaction set. Solutions which belong to the IR, i.e., pairs of upper-level feasible values and corresponding lower-level optimal solutions, are called bilevel feasible. The objective of the upper-level problem is quadratic. The same is true for the objective of the lower-level problem, too, which becomes linear though once the upper-level decision variable values become known.
Note that the optimal solution of a bilevel problem may not exist even under the assumption of a non-empty and compact feasible region. It is widely known [5] that this pitfall may arise in bilevel programming when the lower-level problem has multiple optimal solutions, since fundamental bilevel programming theory [8] disallows any cooperation, whatsoever, between the two decision makers. This implies that the leader has no way of forcing the follower to select a specific lower-level optimal solution and thus may not be able to attain his maximum profit. In the related literature, many alternative techniques have been suggested for overcoming this difficulty by slightly altering the problem definition and its corresponding mathematical formulation. One of the most common ones, termed optimistic (pessimistic) approach, has been proposed in [28]. It involves the selection of the most (least) favorable lower-level solution to the upper-level decision maker. In the case of our problem, this is not an issue of concern. More specifically, since both the lower-and the upper-level problems are discrete optimization problems and the feasible region is bounded, the upper-level objective is optimized over a discrete set in both the optimistic and the pessimistic setting; consequently, optimal solutions exist [10].
In the particular application context under study, such conflicts are typically resolved by favoring the lowest production cost unit, since this leads to lower system costs and motivates the units to become more price-competitive. For the remainder of the present work, we adopt the optimistic approach for resolving such conflicts. Note that adopting alternatively the pessimistic approach [36] would only alter the optimal solution returned by the algorithm, and not the validity of the proposed methodology. Although the ISOOP needs proper adjustments for identifying as optimal the least favorable to the strategic producer in case multiple optimal lower-level solutions exist, the procedure for the identification of the range intervals with unchanged optimal ISOOP solutions remains unaltered; of course, these intervals will be naturally different than those identified in the optimistic version of the problem in such a case.

Relaxing Bilevel Feasibility
One of the most common relaxations of a bilevel optimization model is the one in which bilevel feasibility is suppressed. In our application context, bilevel feasibility translates to the requirement that the set of unit commitments and energy quantities over the planning horizon must comprise an optimal ISOOP solution for the associated set of strategic price-offers. Many specialized bilevel programming algorithms utilize this relaxation. The most typical way of formulating it is the suppression of the lowerlevel objective, which transforms the problem into a single-level optimization model. The following is a key-related result exploited by the solution methodology we develop next for the treatment of the problem: The optimal objective value of the single-level problem that results after suppressing the ISO objective from the SPBOP is a valid upper bound on the optimal SPBOP objective.
Proof The validity of this corollary stems from the fact that the resulting problem is the high-point relaxation for which this result is well known in the context of general bilevel programming theory, see also [31].
Naturally, the optimal solution to this relaxation may fail to include truly optimal active producers or energy quantities for the ISOOP. Although these two discrepancies are equivalent due to the fact that a non-optimal unit commitment designates a nonoptimal associated energy quantity, too, each of them is accommodated in a separate but similar manner by the proposed solution methodology, as illustrated in what follows.

Single Period Necessary Optimality Conditions
In this subsection, we develop special optimality conditions pertaining to the energy distribution of any single time period of the planning horizon in isolation. Despite not being sufficient for global optimality, these conditions are nevertheless necessary, expediting considerably the search for the optimal solution. Their incorporation into the model formulation reduces significantly the cardinality of the feasible region, since it eliminates in advance a large number of energy distributions that cannot be part of an optimal solution. In order to express these conditions, we introduce the following additional decision variables: w i,t binary decision variable that takes the value 1 if and only if the energy quantity of unit i in time period t is strictly greater than m i , and 0 otherwise, i ∈ I, t 1,…,T , ν i,t binary decision variable that takes the value 1 if and only if the energy quantity of unit i in time period t is strictly less than M i , and 0 otherwise, i ∈ I, t 1,…,T .
Constraints (19)- (22) ensure correct values for variables w i,t and v i,t , for i ∈ I and t 1,…,T: Constraints ( Consider the case that z i,t z i,t-1 1 first. Constraints (23) impose the restriction Thus, IRu i,t is correctly forced to 0-value, since the ramp-up constraint cannot be binding in this case. Next, consider the case With the help of the auxiliary decision variables w i,t , v i,t , IRu i,t and IRd i,t , Proposition 4.1 defines the necessary optimality condition for any two generation units i > 1 and j > 1 such that p i,t < p j,t . (27) is satisfied by an optimal SPBOP solution.
Proof By default, an optimal SPBOP solution will be bilevel feasible. Increasing in an ISOOP optimal solution the energy quantity of a producer i who is active in time period t by one unit can only violate the demand constraint of period t (2), his technical maximum constraint in period t (3), his ramp-up constraint in period t (12), and his ramp-down constraint in period t + 1 (13). Constraints (4)- (11) are not affected, since they only involve the status of this producer, which remains unchanged by this increase. The same is also true for the ramp-up constraint in period t + 1 and the ramp-down constraint in period t, since q i,t appears with a negative sign in the left hand side of both these less-or-equal constraints. Similarly, decreasing in the same ISOOP optimal solution the energy quantity of a producer j who is active in time period t by one unit can only violate the demand constraint of period t, his technical minimum constraint in period t, his ramp-up constraint in period t + 1, and his ramp-down constraint in period t. Clearly, since constraint (27) includes only binary variables, the only way it can be violated is if z i,t z j,t w j,t v i,t 1 and IRu i,t IRd i,t+1 IRd j,t IRu j,t+1 0. From z i,t 1, v i,t 1, IRu i,t 0 and IRd i,t+1 0, we conclude that it is possible to increase q i,t by one unit without violating the technical maximum constraint of unit i in period t, or its ramp-up constraint in period t, or its ramp-down constraint in period t + 1. Similarly, from z j,t 1, w j,t 1, IRd j,t 0 and IRu j,t+1 0, we conclude that it is possible to decrease q j,t by one unit without violating the technical minimum constraint of unit j in period t, or its ramp-down constraint in period t, or its ramp-up constraint in period t + 1. Moreover, exchanging this unit of energy between the two corresponding producers ensures that the demand constraint will not be violated either.
Consequently, such an exchange leads to an alternative ISOOP feasible solution. This, however, contradicts the bilevel feasibility of the associated SPBOP solution, since the assumption p i,t < p j,t implies that it also leads to an ISOOP solution with lower cost. Therefore, constraint (27) must be satisfied at an optimal SPBOP solution.
The incorporation of constraint (27) for any time period t and units i and j such that i > 1, j > 1 and p i,t < p j,t into the relaxed problem reduces considerably the size of the feasible region, through the elimination of those solutions that do not comply with it. Consider now the case of constraint (27) for pairs of generation units which include the strategic producer. In this case, things become a little trickier, due to the fact that the strategic producer's price-offer in time period t is subject to optimization at the upper-level and thus not known in advance. In order to address this difficulty, we introduce the following decision variables for each i > 1 and t 1,…,T : x i,t binary decision variable that takes the value 1 if and only if p i,t < p 1,t , and 0 otherwise.
Correct values for variables x i,t are ensured through the following two constraints: Constraints (28) Proof If x i,t 1, then constraint (30) reduces to constraint (27) with unit i being the one with the lowest price-offer in time period t, while constraint (31) becomes redundant. Similarly, if x i,t 0, then constraint (31) reduces to constraint (27) with unit 1 being the one with the lowest price-offer in time period t, while constraint (30) becomes redundant. Note that, in alignment with the optimistic assumption, the case that p 1,t p i,t is treated likewise as the case that p 1,t < p i,t .

Valid Inequalities for Excluding Bilevel Infeasible Solutions
Consider the problem formulation that results after suppressing the lower-level objective from the SPBOP and appending the optimality conditions for every pair of generation units over the entire planning horizon, as defined above. We call this the Relaxed Strategic Producer Optimization Problem (RSPOP). If the optimal solution to this problem is bilevel feasible, it is clearly the exact optimal solution of the SPBOP. If not, this implies that there exists at least one unit energy quantity (q i,t ) which is not ISOOP optimal for the associated set of strategic producer price-offers. In such a case, one needs to exclude this solution from further consideration in order to pursue the search for the optimal SPBOP solution.
Although from a strictly mathematical point of view any incorrect q i,t value renders a RSPOP solution bilevel infeasible, the identification of the optimal strategic producer profit necessitates correct values for variables q 1,t only. Hence, as soon as the RSPOP includes optimal q 1,t values for the associated p 1,t values, the algorithmic procedure can terminate even if the solution at hand is not bilevel feasible. Of course, this assumes that the trivial task of finding the truly optimal ISOOP solution will be performed next separately. In order to eliminate the RSPOP solutions that do not include correct q 1,t values, we employ a suitable modification of the approach that has been proposed for eliminating bilevel infeasible solutions in [22], as explained below.
The strategic producer price-offers act as objective coefficients of his energy quantities in the ISOOP. One can find the truly optimal ISOOP solution for the strategic producer price-offer values of the bilevel infeasible solution subject to exclusion. Fundamental integer parametric programming theory dictates that this solution remains optimal for a sufficiently small simultaneous perturbation of the decision variables' objective coefficients. More specifically, it has been shown [16] that when the objective coefficients of an integer minimization problem are linearly perturbed through a single scalar parameter, then its optimal objective is piecewise-linear, continuous, and concave on its finite domain as a function of this parameter. We utilize this crucial theoretical result to find maximum length intervals for the strategic producer price-offers, such that the ISOOP optimal solution remains unchanged when all these intervals are respected.
As far as the bilevel feasibility check is concerned, the algorithm inspects the unit commitments of the strategic producer first. If at least one of them is found to be nonoptimal, it devises the largest price-offer intervals within which their truly optimal values remain unchanged. Otherwise, it proceeds to inspect the strategic producer energy quantities, identifying the largest price-offer intervals within which their truly optimal values remain unchanged if at least one of them is found to be non-optimal. This is a significant advancement with respect to the previous algorithmic version [22], in which even a single change of any producer's energy quantity signified the end of the corresponding interval, because it avoids the overloading of the RSPOP with an excessive number of valid inequalities that can potentially worsen computational performance.
After detecting the strategic price-offer intervals in question, the algorithm employs integer programming modeling techniques to generate a valid cut which is appended to the relaxed model. Not only does each of these cuts exclude the current bilevel infeasible solution from further consideration, but it also imposes a suitable part of the truly optimal ISOOP solution for a large number of combinations of the strategic producer price-offers. The specific details of the procedure for the generation of these cuts are presented in what follows.
Let's assume that, for t 1,…,T , the strategic producer's price-offer in time period t in the current bilevel infeasible solution is p 1,t b . We solve the ISOOP to identify optimal strategic unit commitments or energy quantities (whichever of these two fails, in this order) for these T values. We then perform a simple bidirectional search to identify maximum values L and R, such that these values remain optimal for the ISOOP, when each price-bid p 1,t simultaneously decreases by L or simultaneously increases by R. Of course, we are only interested in integer values in each of these intervals, as well as values such that p 1,t b -L ≥ c 1 and p 1,t b + R ≤ C 1 . Once the maximum values by which the initial price-offers can be simultaneously increased/decreased without altering the ISOOP optimal solution are discovered, the following crucial result justifies the validity of the proposed valid inequalities: Proof The validity of this result is a direct consequence of the validity of Proposition 3 in [22].
As it turns out, the proposed procedure for the generation of the valid inequalities can be further enhanced to enable the elimination of an even larger number of bilevel infeasible solutions, thus expediting the performance of the proposed algorithm. More specifically, consider the left endpoints of the above intervals first, which depend on the exact value of L. Once the maximum L value defined above has been identified, it is often the case that the corresponding part of the optimal ISOOP solution remains unchanged when the values of a proper subset of the strategic producer price-offers are further decreased for a sufficiently small value. Consequently, at that point, the proposed algorithm investigates whether any such subset exists. This procedure is successfully repeated, until the point where it is not possible to decrease even a single price-offer by one unit without altering the ISOOP optimal solution. This implies that the maximum perturbation with respect to its original value that will be identified upon completion may be different for each price-offer. It is typically the case that distinct maximal such perturbations may exist, depending on the exact order in which alternative price-offer subsets are considered. Of course, one can consider all possible subsets and choose the perturbation that results in the elimination of the maximum number of bilevel infeasible solutions. Nevertheless, in the proposed algorithmic implementation we do not adopt this approach because it exhibits a combinatorial nature that can potentially lead to performance degradation. Instead, the algorithm considers these subsets arbitrarily, approving any subset that provides an interval extension without reversing any intermediate involved decision. The same exact logic is utilized for identifying the maximum positive perturbations of the strategic price-offers that do not alter the part of the ISOOP optimal solution. As a consequence of this algorithmic improvement, the values L and R of Proposition 4.2 are not necessarily equal for all intervals, but are price-offer specific. Once the maximum L t and R t value for each price-offer, p 1,t , has been identified, Proposition 4.2 can be restated as follows:

Corollary 4.3 The part of the solution which is optimal to the ISOOP for (p 1,1 b , p 1,2 b ,…, p 1,T b ) remains optimal when each price-offer p 1,t takes an integer value that belongs to the interval [p 1,t b -L t , p 1,t b + R t ].
Proof The validity of this corollary is justified through the repetitive application of Proposition 4.2 on each subset of price-offers approved by the proposed procedure, assuming that only the coefficients of the corresponding energy quantities are perturbed in the ISOOP optimization problem from their previous to their current values and that this perturbation is unidirectional in each repetition.
Note that, for the remainder of this manuscript, we use the term extend to denote this procedure for extending the intervals within which a part of the bilevel feasible solution remains unchanged by considering proper subsets of the strategic producer offers. After the above intervals have been identified, the generation of the valid inequality for the exclusion of the bilevel infeasible solution is straightforward. In words, it imposes particular ISOOP optimal unit-commitments or energy quantities, under the condition that each strategic producer price-offer lies within its associated interval, as prescribed by Corollary 4.3.
Consider the associated interval [p 1,t b -L t , p 1,t b + R t ] of each price-offer p 1,t . If p 1,t b -L t > c 1 , the generation of the valid cut necessitates the introduction of a binary variable, call it PL t , denoting whether p 1,t is greater or equal to p 1,t b -L t . Otherwise, p 1,t b -L t c 1 holds, and no such variable is necessary, since p 1,t respects the lower bound c 1 by default in any feasible solution. The correct definition of variable PL t is ensured through the following two constraints: More specifically, these constraints impose that PL t 1 if and only if p 1,t ≥ p 1,t b -L t , which is related to the left endpoint of the interval. If PL t 0, then constraint (32) states that p 1,t ≤ p 1,t b -L t -1, while constraint (33) becomes redundant. If PL t 1, on the other hand, then constraint (33) states that p 1,t ≥ p 1,t b -L t , while constraint (32) becomes redundant.
Similarly, if p 1,t b + R t < C 1 , the generation of the valid cut necessitates the introduction of a binary variable, call it PR t , denoting whether p 1,t is less or equal to p 1,t b + R t . Otherwise, p 1,t b + R t C 1 holds, and no such variable is necessary, since p 1,t respects the upper bound C 1 by default in any feasible solution. The correct definition of variables PR t can be ensured through two constraints similar with (32)- (33). Alternatively, one can use constraints (32)-(33) to define a binary variable denoting whether p 1,t ≥ p 1,t b + R t + 1, and define PR t as 1 minus this variable. Note that a PL t or a PR t variable may already be present in the relaxed problem due to a valid cut added in a previous iteration. If this is the case, then its re-introduction is naturally skipped. After the introduction of the above auxiliary decision variables for each time period t, the imposition of a unit commitment equal to 0 for production unit i in period τ (τ 1,…,T ) is accomplished through the introduction of the following constraint: Constraint (34) refers to the most general case in which 2 auxiliary decision variables have been added for each time period of the planning horizon. If the endpoints of some of the identified intervals coincide with c 1 or C 1 , the number of auxiliary variables appearing in constraint (34) will obviously be smaller than 2 T . Similarly, the imposition of a unit commitment equal to 1 for a production unit i in period τ (τ 1,…,T ) is accomplished through the introduction of the following constraint: If all auxiliary decision variables PL t and PR t are equal to 1, then the summation which appears in both these constraints is eliminated and z i,t is set equal to 0 in constraint (34), or 1 in constraint (35). If at least one of these variables is equal to 0, then both constraints become redundant. Note that any particular unit commitment that pertains to a single time period is imposed using a collective combination of the values of variables p 1,t in all time periods.
Introducing suitably such constraints, one can impose a particular unit commitment, thus eliminating a solution that does not provide the truly optimal strategic producer profit because it fails in some z 1,t value. Consider now the case of a solution for which this profit is still not optimal although all z 1,t values are optimal. In this case, we utilize the following crucial result:

Proposition 4.3 If the strategic producer profit at the optimal RSPOP solution is not equal to the one in the truly optimal associated ISOOP solution, then the RSPOP solution includes at least one larger q 1,t value for the associated p 1,t values.
Proof If the two profits are not equal, then the profit at the RSPOP solution will be greater than that of the ISOOP solution, since the RSPOP is a relaxation of the SPBOP. This implies that at least one q 1,t variable value will be larger in the RSPOP optimal solution, since the p 1,t values are common in both problems.
Utilizing Proposition 4.3, we introduce the following constraint for each time period τ (τ 1,…,T ), in order to exclude a RSPOP solution which does not provide correct strategic profit, although it includes optimal z 1,t values: where Q 1,t is the truly optimal ISOOP q 1,t value for the associated p 1,t values. With k, we denote the total number of decision variables PL t and PR t in this constraint. If all of them are equal to 1, then this constraint imposes the upper bound Q 1,t on variable q 1,t ; otherwise, the constraint is redundant, since it imposes an upper bound at least equal to M 1 . Note that, in contrast with valid inequalities (34) and (35), constraint (36) imposes an upper bound on q 1,t rather than its truly optimal value. Proposition 4.3 justifies the sufficiency of this modeling choice for eliminating a bilevel infeasible solution.
After the incorporation of the proposed valid inequalities into the model formulation, the relaxed problem is re-solved again so as to discover the next candidate solution for optimality. The procedure continues similarly, eventually terminating as soon as the first solution providing correct strategic profit is encountered. A SPBOP global optimum is comprised of the associated strategic producer price-offers combined with the corresponding ISOOP optimal solution these offers produce.

The Proposed Solution Algorithm
The algorithmic methodology we propose for the solution of the problem under consideration is comprised of the various steps described in the above subsections. For reasons of completeness, we conclude the present section with the pseudocode that outlines the flow of the proposed implementation. Note that this pseudocode corresponds to the default design, since we also consider some alternative designs in the computational results section. Proposition 4.4 proves that the algorithm returns a SPBOP global optimal solution after a finite number of iterations.

Cutting Plane Solution Algorithm for the SPBOP
Step 0 (Initialization). Form the single-level optimization model that results after suppressing the lowerlevel objective from the SPBOP.
For each i ∈ I and t 1,…,T , introduce the binary decision variables w i,t , v i,t , IRu i,t , and IRd i,t , as well as their definition constraints.
For each i ∈ I: i > 1 and t 1,…,T such that p i,t < C 1 , add the binary decision variables x i,t , as well as their definition constraints.
Add the optimality condition (27) for each pair of units i > 1, j > 1 and t 1,…,T such that p i,t < p j,t .
Add the optimality condition (27) for i 1 and each unit j > 1 and t 1,…,T such that p j,t ≥ C 1 .
Add the optimality conditions (30)-(31) for each unit i > 1 and t 1,…,T such that p i,t < C 1 .
Find the optimal solution to the resulting RSPOP. For the set of strategic producer price-offers (say p 1,t b ) in this solution, solve the ISOOP problem and find the maximum strategic producer profit associated with an optimal ISOOP solution.
Step 1 (Iteration). While the set of strategic producer unit commitments and energy quantities in the relaxed solution does not coincide with that in the ISOOP optimal solution do { If there is a disagreement in at least one z1,t value do { Compute the maximum length range-interval [p1,t b -Lt, p1,t b + Rt] for each p1,t such that the truly optimal ISOOP strategic producer unit commitments remain unchanged. Add binary decision variables PLt for each t = 1,…,T such that p1,t b -Lt > c1, and PRt for each t = 1,…,T such that p1,t b + Rt < C1, as well as their corresponding definition constraints (skip the addition of every variable that alreadyexists in the relaxed problem). Add valid inequality (34) for each time period t such that z1,t = 0 in the ISOOP solution.
Add valid inequality (35) for each time period t such that z1,t = 1 in the ISOOP solution. } end do else if there is a disagreement in at least one q1,t value do { Compute the maximum length range-interval [p1,t b -Lt, p1,t b + Rt] for each p1,t such that the truly optimal ISOOP strategic producer energy quantities remain unchanged. Add binary decision variables PLt for each t = 1,…,T such that p1,t b -Lt > c1, and PRt for each t = 1,…,T such that p1,t b + Rt < C1, as well as their corresponding definition constraints (skip the addition of every variable that already exists in the relaxed problem). Add valid inequality (36) for each time period τ = 1,…,T, where Q1,τ is the q1,t value in the ISOOP solution. } end do Find the optimal solution to the resulting RSPOP. For the set of strategic producer price-offers (say p1,t b ) in this solution, solve the ISOOP problem and find the maximum strategic producer profit associated with an optimal ISOOP solution. } end while Step 2 (Report of final solution). A SPBOP global optimal solution comprises of the strategic producer price-offers in the last relaxed solution, combined with the optimal solution obtained when the ISOOP is solved with these price-offers.

Proposition 4.4 The above algorithm returns a SPBOP global optimum after a finite number of iterations.
Proof If the strategic producer profit at the optimal solution of the relaxed problem is not equal to that of the solution obtained when the ISOOP is solved with the associated strategic price-offers, then the relaxed solution contains at least one non-optimal strategic producer energy quantity. The cut generated by the algorithm renders this solution infeasible for the relaxed problem, both when it imposes optimal unit commitments, as well as when it imposes optimal energy quantities. The validity of the proposition follows from the fact that the cardinality of the RSPOP feasible region is finite.

Computational Considerations
We have implemented the proposed cutting plane algorithm using source code interacting with the Callable Library, which is the C application programming interface of the commercial optimization software IBM CPLEX [20]. All tests were performed on an AMD Ryzen 5 3500u processor with 12 GB system memory.
Both optimization problems considered at each iteration of the proposed algorithm are linearly constrained integer programs. Their objectives, however, are considerably different in nature, since the RSPOP objective is quadratic, while that of the ISOOP is linear. Naturally, this difference distinguishes considerably the computational effort required to reach the optimal solution. Although the RSPOP is nonconvex, CPLEX succeeds in finding its global optimal solution, utilizing a recent enhancement of the setting parameter optimality target, which enables the solution of nonconvex quadratic optimization problems to global optimality even under the presence of integralities.
Good feasible solutions are utilized for warm starting the CPLEX solvers and enhancing algorithmic performance, so that the software does not initiate from scratch the search for an optimal solution each time it is invoked. Since the BSPOP maximizes the strategic producer profit, for warm-starting the RSPOP we utilize the strategic producer price-offers associated with the maximum such profit that has been identified so far, as well as the corresponding energy quantities. On the other hand, we utilize solely the energy quantities for warm-starting the ISOOP. Both solutions are partial in that they do not include values for all decision variables of the associated optimization problem, but this does not constitute an issue of concern, since the values of all the remaining decision variables are unambiguously determined with this information known. Each warm start expedites the solution of the corresponding problem, eliminating in advance a large number of suboptimal solutions. The computational benefit becomes significant, when one considers that, for the solution of a single problem instance, both optimization models are solved numerous times by the proposed algorithm.
With respect to the price-offer intervals utilized for the generation of the valid inequalities, their endpoints are not extended by 1 when investigating how large these intervals can become without altering the current optimal ISOOP solution; binary search is employed to this end instead, for enhanced computational performance. The bilevel feasibility check involves finding the maximum strategic profit that can be attained with a specific set of strategic price-offers. To ensure that the optimistic assumption is respected, this is carried out by solving the corresponding ISOOP for the set of price-offers at hand, and then altering the ISOOP objective to express the maximization of the strategic profit, while also imposing a constraint ensuring that the total bid-cost does not exceed this optimal value.

A Small Case Study
For illustration purposes, we consider first a small case study based on the 3 production units-4 time periods case study considered in [22]. Note that minimum up/down times and ramp-up/down constraints were not included in the optimization model studied in that work. The data of the problem data are presented in Table 1. The values 50 and 70 e/MWh are used for parameters c 1 and C 1 , respectively, while the assumption that all units were OFF in the last two periods of the previous planning horizon is also adopted, i.e., that z i,-1 z i,0 0 for i 1,…,3.
After forming the high-point relaxation of the original formulation, we introduce the binary decision variables w i,t , v i,t , IRu i,t , IRd i,t (i ∈ I , t 1,…,T ), and x i,t (i ∈ I: i > 1, t 1,…,T ), their corresponding defining constraints, as well as the single period optimality conditions for every time period and generation unit pair, as explained in Sect. 4.2. The optimal solution to the relaxed problem is shown in Table 2.  The strategic producer profit of this solution is equal to 25,720, which is also a valid upper bound on the optimal BSPOP objective. It is easy to confirm that this profit does not correspond to a bilevel feasible solution, since solving the ISOOP for p 1,1 70, p 1,2 70, p 1,3 65, p 1,4 67, we get an optimal solution in which q 1,t (270, 200, 0, 0) with corresponding strategic profit 9400 and optimal ISOOP objective 222,492. Since at least one of the strategic unit commitments is not identified correctly in the relaxed solution, we focus on devising maximum length p 1,t intervals within which the truly optimal strategic unit commitments remain unchanged. The sensitivity analysis check shows that even a single-unit simultaneous decrease in the 4 strategic price-offers alters the ISOOP optimal solution in terms of the unit commitments z 1,t . If procedure extend was not in place, the simultaneous decrease in the price-offers would conclude at this point, with the corresponding left endpoints fixed at the values 70, 70, 65, and 67, respectively. Employing this enhanced search procedure, however, we next consider subsets of the 4 price-offers, and we find out that the resulting value-intervals within which the ISOOP optimal strategic producer unit commitment combination remains unchanged can be extended by considering first the subset (p 1,1 , p 1,2 ) with a 11-unit decrease, followed by the subset (p 1,1 ) next with a 9-unit decrease. Thus, the left endpoints we obtain for the 4 price-offer intervals are 50, 59, 65, and 67. As far as the increase in the 4 price-offers is concerned, the corresponding right endpoints we obtain are (70, 70, 70, 70). In summary, when p 1,1 ∈ [50, 70] and p 1,2 ∈ [59, 70] and p 1,3 ∈ [65, 70] and p 1,4 ∈ [67, 70], the ISOOP optimal unit commitment combination is z 1,1 z 1,2 z 2,1 z 2,2 z 2,3 z 2,4 z 3,1 z 3,2 z 3,3 z 3,4 1 and z 1,3 z 1,4 0. A single unit increase/decrease in any of the 4 price-offers outside these intervals results in a different ISOOP optimal unit commitment combination.
To impose the ensuing set of valid inequalities, we add binary variables PL t for t 2, 3, 4, such that PL 2 is equal to 1 if and only if p 1,2 ≥ 59, PL 3 is equal to 1 if and only if p 1,3 ≥ 65, and PL 4 is equal to 1 if and only if p 1,4 ≥ 67. No binary variables are necessary for the left endpoint of the p 1,1 interval or for any right endpoint of these intervals, since they coincide with c 1 and C 1 , respectively. Next, the ISOOP optimal unit commitment combination for the strategic producer is imposed by adding the constraints z 1,t ≤ 3 − PL 2 − PL 3 -PL 4 for t 3 and 4. This excludes the current bilevel infeasible solution from further consideration. Note that, under a slightly different algorithmic design, the user may choose to also impose correct strategic commitments for time periods 1 and 2 (although these are correct in the relaxed solution), or similar constraints imposing correct commitments for the remaining producers, too. Continuing similarly the addition of suitable cuts for excluding the encountered bilevel infeasible solutions, the algorithm eventually reaches the global optimal solution, which is p 1,t * (70, 60, 69, 62), q 1,t * (270, 478, 330, 500), with f * 220,164 and F 1 * 22,450. For the identification of this solution, the algorithm introduced 25 times valid cuts for imposing unit commitments and twice valid cuts for imposing energy quantity upper bounds. The total execution time was 58 seconds, whereas the optimal objective of the initial RSPOP is approximately 14% larger than the truly optimal strategic profit.

Randomly Generated Problems
In this subsection, we evaluate the computational performance and behavior of the proposed cutting plane algorithm using randomly generated problems. We don't use collections of existing problem instances from the related literature to this end, simply because they don't fit in the special structure our model exhibits. We tested the algorithm on instances with the following sizes expressed as A × B, where A number of generation units and B number of time periods: 3 × 4, 3 × 5, 4 × 3, 4 × 4, 4 × 5, 5 × 3, and 5 × 4. The procedure for the generation of the random problem instances was as follows. Each generation unit i (i > 1) was assigned randomly the technical characteristics (price-offers, start-up cost, technical minimum and technical maximum) of a factual generation unit participating in the operation of the Greek electricity market, according to the data reported in [3]. The minimum up/down times were set equal to 2 for all units, while the ramp-up/down limit of each unit i was set equal to 0.95r i , where r i M i − m i , rounded to the closest even integer. Although this value seems excessive, the rationale behind it is that setting this limit greater or equal to r i makes the ramp-up/down constraints redundant, but choosing small value instead limits considerably the size of the feasible space. Therefore, we have chosen to give to these parameters large enough values that do not render the corresponding constraints redundant.
As far as the technical parameters of the strategic producer are concerned, they were generated as follows: The following analysis provides some insight into the size of the initial RSPOP formulation. The number of decision variables p 1,t is equal to T , while the number of each of the decision variables z i,t , q i,t , y i,t , o i,t , w i,t , v i,t , IRu i,t and IRd i,t is equal to N * T . Considering that the number of decision variables x i,t is at most equal to (N − 1) * T , this brings the maximum initial total number of decision variables up to T + 8 * N * T + (N − 1) * T . Of course, this number pertains to the general case in which every p i,t (i > 1) is strictly less than C 1 . When this is not true, this figure will be slightly smaller, since the actual number of decision variables x i,t will be smaller than (N − 1) * T .
Similarly, the number of constraints (2) is equal to T , the number of constraints (3) is equal to 2 * N * T , while the number of each of the constraints (4)- (13) and   (17) do not count toward this sum, since they are not added explicitly but are satisfied through the imposition of proper bounds on variables p 1,t instead.
The results of the above analysis are depicted in Table 3, which shows the (maximum) number of variables and constraints, respectively, of the initial RSPOP formulation for each of the 7 problem sizes that we consider. Of course, these numbers pertain to the general case in which there do not exist two units i and j (i, j > 1) such that p i,t p j,t for some t, and every p i,t (i > 1) is strictly less than C 1 . When any of these two assumptions does not hold true, the actual number of constraints (27) or (28)- (29), respectively, is smaller, which in turn implies that this figure is slightly smaller, too. Of course, the number of decision variables and constraints of the RSPOP do not remain constant but gradually increase during execution, due to the subsequent addition of the valid inequalities.
We have conducted several experiments in order to thoroughly evaluate the computational performance and behavior of the proposed algorithm, as well as assess how these are affected by alternative algorithmic designs distinguished by specific combinations of 3 key design parameters. The first parameter determines whether procedure extend is active or not. The second parameter determines the strategy for the generation of the valid inequalities, for which three alternative options were considered. The first one enforces correct values for the variables z i,t of all generation units in case the unit commitment optimality fails, and valid upper bounds on the q i,t values of the strategic producer otherwise. The second option enforces correct z i,t values solely for the strategic producer in case the unit commitment optimality fails, and valid upper bounds on the q i,t values of the strategic producer otherwise. Finally, the third option imposes valid upper bounds on the q i,t values of the strategic producer always. The last design parameter determines whether the optimality conditions are introduced into the RSPOP for every pair of generation units or only for unit pairs that include the strategic producer. Note that this choice affects only the performance of the proposed algorithm but not its correctness, since these conditions are only added to the relaxed formulation for assisting the search toward the optimum.
Based on the study of these results, which we do not report here for space consideration, we can reach the following important conclusions. Procedure extend leads to substantially reduced computational times, an outcome that is not surprising; therefore, it should be exploited for enhancing computational performance. As far as the strategy for the valid inequalities is concerned, the first option appears to lead to superior computational performance compared to the other two. Finally, adding the single period optimality conditions for every pair of generation units seems to exhibit superior performance compared to the option of adding these conditions only for pairs that include the strategic producer. As a follow-up to this analysis, Tables 4 and 5 present computational results for the associated design in which these three parameters are adjusted accordingly, so that the algorithm exhibits the best computational performance. The algorithm was tested on 30 random instances for each problem size, with a time limit of 30 min set on the total execution time of each run. As soon as this limit was reached, the algorithmic execution was interrupted, with the best identified feasible strategic profit and the corresponding tightest upper bound on its optimal value being returned as the solution output. Table 4 presents results for the problem instances which terminated before the 30 min limit was reached. For each problem size shown in the first column, the second column of this table presents the corresponding number of such instances. The next four columns show the average and maximum number of decision variables and constraints upon termination of the algorithm, while the next two columns show the average and maximum computational times in seconds. Finally, the last four columns show the average and maximum number of times a bilevel infeasible solution was excluded through suitable cuts pertaining to z i,t and q i,t values, respectively. Note that the actual number of constraints added to this end is significantly larger, since a collection of such constraints is necessitated for excluding a single bilevel infeasible solution. All the average values have been rounded to the nearest integer, the only exception being the computational times which have been rounded to the first decimal digit.
The results of Table 5 pertain to the supplementary problem instances which did not terminate within the 30-min time limit, and their execution was therefore interrupted. These results are similar to those of Table 4, the main difference being that instead of the corresponding computational times, columns 7 and 8 (labeled s.p. perc. diff.) show the average and maximum percentage deviation between the best feasible strategic profit and the corresponding tightest upper bound on its optimal value at the time of interruption, rounded to the first decimal point. In few cases, the percentage difference is equal to 100%, which signifies that, upon interruption, the algorithm had not been able to identify a better feasible solution than the trivial in which the strategic profit is equal to 0.
As shown in the above two tables, approximately 60% of the problem instances tested collectively over all problem sizes terminated before the 30-min time limit was reached. With respect to more general observations one can make based on the study of the above results, the computational times seem to exhibit significant variance, which is not surprising, considering the strongly nonconvex nature of the problem under consideration. This also explains the fact that the recorded computational values (times,    variables, constraints, etc.) are not necessarily strictly increasing as the problem size increases. Another important observation pertains to the fact that, when both types of valid inequalities are in play, the number of the q i , t inequalities is almost always a very small, almost negligible, percentage of the total number of valid inequalities added. Thus, the algorithm seems to rely more heavily on valid inequalities imposing unit commitments for excluding bilevel infeasible solutions, than on those imposing upper bounds on the energy quantities. Finally, the increase in the number of constraints of the RSPOP formulation appears to be substantially larger during algorithmic execution than the corresponding increase in the number of decision variables.

Model Variations
In this section, we look at some interesting SPBOP variations, and we illustrate how the proposed solution methodology can be suitably adjusted to accommodate them.

Uniform Clearing Scheme
In practice, the exact price with which each producer is compensated for his energy production depends on the market clearing scheme in effect. The adopted SPBOP objective definition corresponds to the case that the market operates under a pay-asbid clearing scheme, according to which the market clearing price is equal to each corresponding submitted price-offer for energy. An alternative clearing scheme widely used in practical applications is the uniform clearing scheme, in which all producers are paid the same value for each unit of energy they contribute to the system. This value, which is termed system marginal price (smp), represents the marginal cost for energy, i.e., the extra cost that should be paid for increasing the energy demand by one unit. In a quite recent work, Akbari-Dibava et al. [1] provide a detailed comparison of the two alternative clearing schemes, explaining in detail their advantages and disadvantages. Under a uniform clearing scheme, the upper-level objective of the SPBOP is formulated as follows instead: Objective (37) differs from objective (16) in that the system marginal price of each period t has replaced the corresponding price-offer p 1,t . Mathematically, λ t (t 1,…,T ) is defined as the dual variable of the corresponding energy balance constraint (2) in order to properly express the true marginal cost of the associated time period t. This, however, raises considerable obstacles, since naturally no dual variables are defined for the ISOOP due to the presence of the integralities. In the related literature, several approaches have been proposed for overcoming these difficulties and devising meaningful values for variables λ t . Such approaches aim to clear the market fairly and discourage price manipulations by the energy producers. To attain this, they often resort to additional uplifts and side-payments in order to address the inevitable inequities caused by the discreteness of the problem (see [2,3], for example). The current work focuses on the algorithmic aspect of the problem under consideration and does not deal intentionally with such issues pertaining to the design and operation of the underlying energy market. For reasons of completeness, it is noted, however, that one of the most popular approaches for accommodating this involves solving the integer linear problem (1)- (15) first in order to find the optimal values of the energy variables, and then re-solving it again as purely continuous, after fixing the integer variables to their optimal values. According to marginal pricing theory [34], the system marginal price is set equal to the dual value of the corresponding energy balance constraint in the optimal solution of this problem.
Under a uniform pricing scheme, it is often the case that a transparent definition of the system marginal price is not readily available, due to the inevitable integralities, as well as the fact that the existence of alternative ISOOP optimal solutions may lead to different such definitions. For this reason, practical markets typically adopt a transparent set of rules for resolving such ambiguities, should they arise, which they publish to all interested parties in advance.
A natural difficulty that arises in the case of a uniform clearing scheme is the fact that the RSPOP lacks an explicit representation of the system marginal price. In order to circumvent this difficulty, special constraints can be introduced for enforcing the correct smp definition in each time period of the planning horizon, according to the actual set of rules in effect. These constraints are appended to the lower-level constraint set, ensuring correct values for the strategic producer profit. The proposed solution methodology proceeds similarly as in the case of the pay-as-bid clearing scheme thereafter. The incorporation of a uniform clearing scheme can be carried out using the modeling approach outlined in [22], although the absence of ramp-up/down constraints from that work, which differentiate considerably the associated smp rule definitions, necessitates the implementation of proper adjustments.

The Case of No Ramp-Up/Down Constraints
An interesting model variation in the SPBOP arises when no ramp-up/down constraints are present. The single-period optimality conditions developed in Sect. 4.2 simplify considerably in this case. More specifically, constraint (27) is expressed as follows: while constraints (30)-(31) are expressed as follows: z 1,t + z i,t + x i,t + w 1,t + ν i,t ≤ 4, i ∈ I : i1 : t 1, . . . , T z 1,t + z i,t − x i,t + ν 1,t + w i,t ≤ 3, i ∈ I : i1 : t 1, . . . , T .
The important differentiation also partly depicted in these constraints is the fact that once the optimal unit commitment in a particular time period is identified, then the optimal energy distribution of that time period is independent of the energy distributions of other time periods, and in particular of the adjacent ones. As it turns out, an even stronger result holds true as a result of the absence of the ramp-up/down limits. More specifically, as the following proposition shows, the above optimality conditions are also sufficient in that case, in the sense that they ensure an optimal strategic producer quantity in each time period, given that the associated set of active producers in that time period is optimal, too. Proposition 6.1 Under the assumption that no ramp-up/down constraints are present, the energy distribution of each time period in the optimal RSPOP solution corresponds to a truly optimal ISOOP solution for the associated set of active producers.
Proof Under the assumption that no ramp-up/down constraints are present, an optimal energy distribution for each time period t can be found by solving the following optimization problem, in which all variables z i,t are fixed to their corresponding optimal values: s.t.
Since constraints (42)-(45) are included in the RSPOP formulation, the energy distribution identified in an optimal RSPOP solution is feasible to the above model. The objective function (41) is the weighted sum of the active units' price-offers with the corresponding energy quantities. Since the sum of these quantities is always fixed in any feasible solution, this objective can only be decreased if a unit of energy is transferred from an active unit i to another active unit j such that p j,t < p i,t . The above optimality conditions exclude the existence of such a pair; thus, the energy distribution identified in the optimal RSPOP solution is optimal for the associated set of active producers.
The important consequence of Proposition 6.1 is that, in the absence of rampup/down constraints, finding the global optimal SPBOP solution reduces to finding the optimal set of active producers in each time period. Once these sets are identified in the RSPOP optimal solution, the associated strategic producer energy quantities will be the ones that correspond to the optimal SPBOP solution. This is a crucial result expediting significantly the performance of the proposed solution algorithm, since it limits the applicability of the bilevel feasibility checks solely on the status of the generation units. Consequently, the addition of valid inequalities enforcing part of an ISOOP optimal solution for specific strategic producer price-offers involves the sole imposition of correct unit commitments.
The inclusion of new problem characteristics encountered in actual problem settings has rendered the optimization model more realistic, while the algorithmic enhancements have rendered the solution methodology more efficient. This is strongly supported by the computational results that we present, which demonstrate that the new algorithmic version is capable of solving to global optimality problem instances of considerably larger size than those that the previous algorithmic version could solve.
The research presented in this work can be fruitfully pursued in many interesting directions. There are some additional realistic problem characteristics that can be embedded into the problem formulation, such as block-bids and step-wise offers. As far as the optimization algorithm is concerned, it would be interesting to investigate whether optimality conditions pertaining to the status of the generation units can also be devised. This would constitute a significant enhancement that would expedite considerably the computational performance of the proposed algorithm, thus enabling the solution of even larger problems.
Funding Open access funding provided by HEAL-Link Greece.

Data Availability Statement
Most of the data generated or analyzed during this study are included in this published article. Any additional information is available from the corresponding author upon reasonable request.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/ by/4.0/.