scieee AI-readable full text Open interactive document viewer

Why there is no need to use a big-M in linear bilevel optimization: a computational study of two ready-to-use approaches

Kleinert, Thomas,Schmidt, Martin

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Kleinert, Thomas; Schmidt, Martin Article — Published Version Why there is no need to use a big-M in linear bilevel optimization: a computational study of two ready-to-use approaches Computational Management Science Provided in Cooperation with: Springer Nature Suggested Citation: Kleinert, Thomas; Schmidt, Martin (2023) : Why there is no need to use a big-M in linear bilevel optimization: a computational study of two ready-to-use approaches, Computational Management Science, ISSN 1619-6988, Springer, Berlin, Heidelberg, Vol. 20, https://doi.org/10.1007/s10287-023-00435-5 This Version is available at: https://hdl.handle.net/10419/307511 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/ Vol.:(0123456789) Computational Management Science (2023) 20:3 https://doi.org/10.1007/s10287-023-00435-5 1 3 ORIGINAL PAPER Why there isnoneed touse abig‑M inlinear bilevel optimization: acomputational study oftwo ready‑to‑use approaches ThomasKleinert1,2 · MartinSchmidt3 Received: 7 June 2022 / Accepted: 28 December 2022 / Published online: 7 February 2023 © The Author(s) 2023 Abstract Linear bilevel optimization problems have gained increasing attention both in theory as well as in practical applications of Operations Research (OR) during the last years and decades. The latter is mainly due to the ability of this class of problems to model hierarchical decision processes. However, this ability makes bilevel problems also very hard to solve. Since no general-purpose solvers are available, a “best-prac- tice” has developed in the applied OR community, in which not all people want to develop tailored algorithms but “just use” bilevel optimization as a modeling tool for practice. This best-practice is the big-M reformulation of the Karush–Kuhn–Tucker (KKT) conditions of the lower-level problem—an approach that has been shown to be highly problematic by Pineda and Morales (2019). Choosing invalid values for M yields solutions that may be arbitrarily bad. Checking the validity of the big-Ms is however shown to be as hard as solving the original bilevel problem in Kleinert etal. (2019). Nevertheless, due to its appealing simplicity, especially w.r.t. the required implementation effort, this ready-to-use approach still is the most popular method. Until now, there has been a lack of approaches that are competitive both in terms of implementation effort and computational cost. In this note we demonstrate that there is indeed another competitive ready-to-use approach: If the SOS-1 technique is applied to the KKT complementarity conditions, adding the simple additional root-node inequality developed by Kleinert etal. (2020) leads to a competitive performance—without having all the possible theoretical disadvantages of the big-M approach. Keywords Bilevel optimization· Big-M· SOS-1· Valid inequalities· Computational analysis Mathematics Subject Classification 90Cxx· 90-08· 90C11· 90C46 * Martin Schmidt [email protected] Extended author information available on the last page of the article T.Kleinert, M.Schmidt 1 3 3 Page 2 of 12 1 The big‑M reformulation: convenient buterror‑prone We consider linear bilevel problems of the form where Ψ(x) denotes the set of optimal solutions of the x-parameterized linear program with c∈ℝn , d,f∈ ℝ m , A∈ℝk×n , B∈ℝk×m , a∈ℝk , C∈ℝ𝓁×n , D∈ℝ𝓁×m , and b∈ℝ𝓁 . In this setting, the upper-level player (or leader) anticipates the optimal reaction y of the lower-level player (or follower). The set of optimal solutions Ψ(x) is not a singleton if the follower is indifferent for a given x . In this case, Problem (1) establishes the so-called optimistic solution, i.e., the leader may select the solution y∈ Ψ(x) that is the most favorable one for the upper-level problem; see Dempe (2002). In general, bilevel problems are intrinsically nonconvex due to their hierarchical structure and even linear bilevel problems (1) are known to be strongly NP-hard; see Hansen etal. (1992). Although specialized techniques for this problem class exist, the “best-practice” still is the well-known mixed-integer single-level reformulation that relies on big-M values; see, e.g., Baringo and Conejo (2011), Garces etal. (2009), Baringo and Conejo (2011), Wogrin etal. (2011), Kazempour et al. (2011, 2012), Kazempour and Conejo (2012), Jenabi et al. (2013), Wogrin et al. (2013), Pozo et al. (2013), Pisciella et al. (2016), Maurovich-Horvat et al. (2015), Morales etal. (2014), Jaber Valinejad (2015), and the references therein for bilevel optimization problems in the field of power systems that are tackled with the classic big-M approach. 1.1 The method This single-level reformulation is derived as follows. First, the lower-level problem(2) is replaced by its necessary and sufficient Karush–Kuhn–Tucker (KKT) conditions. This yields the mathematical program with complementarity constraints(MPCC) (1) min x∈ ℝn ,y∈ ℝmc ⊤ x+d ⊤ ys.t. Ax +By ≥a,y∈ Ψ(x) , (2) max y f ⊤ ys.t. Dy ≤b−Cx , (3a) min x , y , 𝜆c ⊤ x+d ⊤y (3b) s.t. Ax +By ≥a,Cx +Dy ≤b, (3c) 𝜆 ∈Ω D ∶={𝜆≥0∶D ⊤ 𝜆=f} , (3d) 𝜆⊤(b−Cx −Dy)=0, 1 3 Why there isnoneed touse abig‑M inlinear bilevel… Page 3 of 12 3 in which Constraint(3c) denotes dual feasibility and (3d) are the KKT complementarity conditions of the lower-level problem. Next, the complementarity conditions are replaced by the mixed-integer reformulation with sufficiently large big-M constants MP and MD . Problem (3) as well as the mixed-integer reformulation (4) have been mentioned first by Fortuny-Amat and McCarl (1981). The advantage of this approach for OR practitioners is obvious: The single-level problem(3) in which the complementarity conditions(3d) are replaced by(4) can be easily implemented and the resulting model can be solved without further ado by standard mixed-integer solvers. However, this approach has some severe issues. On the one hand, choosing the big-M constants too small can result in suboptimal solutions of Problem (1) as shown in Pineda and Morales (2019). Their counterexample also shows that the loss of optimality can be arbitrarily large in terms of the resulting objective function values. Unfortunately, many works do not discuss the selection of the constants at all or use trial-and-error procedures without any guarantee that the derived values yield a correct reformulation; see, e.g., the references compiled in Pineda and Morales (2019). Recently, it is shown in Kleinert etal. (2019) that verifying the correctness of given big-M values is as hard as solving the original bilevel problem, which is strongly NP-hard in general. Thus, unless valid big-M constants can be derived from problem-specific knowledge as it is done, e.g., in Böttger etal. (2021); Kleinert and Schmidt (2019) or Siddiqui and Gabriel (2013), the stated mixed-integer reformulation cannot be expected to yield correct results. On the other hand, large values of MP and MD may cause numerical instabilities. In the extreme case, too large values can indeed yield “solutions” that are actually infeasible for the original bilevel problem due to the products in(4) of very large constants and binary variables that are relaxed up to a certain tolerance by mixed-integer solvers. We illustrate the impact of different values for MP and MD in the following computational study. 1.2 Performance andreliability evaluation We first briefly describe the computational setup that we use throughout this work as well as the details of our evaluation procedure. All computations in this and the remaining sections are carried out on a compute cluster with Xeon E3-1240 v6 CPUs at 3.7 GHz and 32 GB RAM; see Regionales Rechenzentrum Erlangen (2020) for more details. The code used for the computational studies in this work is implemented in C++-11 and has been compiled with GCC 7.3.0. All optimization problems are solved by CPLEX12.10. For the evaluation of the computational results, we mainly use performance profiles according to Dolan and Moré (2002). For every test instancei, we compute ratios ri,s=ti,s∕min{ti,s∶s∈S} , whereS is the set of solution approaches under consideration and ti,s is the running time required by approach s∈S for instancei. (4) b−Cx −Dy ≤ MP(1−u), 𝜆≤ MDu,u∈{0, 1}𝓁, T.Kleinert, M.Schmidt 1 3 3 Page 4 of 12 Each performance profile plot in this work shows the percentage of instances (y-axis) for which the performance ratio ri,s of approachs is within a factor 𝜏≥1 (log-scaled x-axis) of the best possible ratio. For our analysis we use the linear bilevel instances described in Kleinert and Schmidt (2020). All of these instances stem from relaxing the integrality conditions of mixed-integer bilevel instances from the literature. We denote the various instance classes along with a reference to its original mixed-integer test set and relevant characteristics in Table1. For our analysis, we clean up this instance set in the following way. We exclude 353instances that can be solved by any of the methods tested in this work in less than 5 s. In addition, we exclude 26instances that cannot be solved by any of the tested methods within the time limit of 1 h. This yields a total number of 698instances in the cleaned test set I . We are now ready to compare the big-M approach for the choices M =M D =M P ∈{10 4 , 10 5 , 10 6} . For better readability, we refer to the three instantiations by BigM-4, BigM-5, and BigM-6. As just discussed, the big-M approach may deliver wrong “solutions” in case the value M is chosen too small or “too large”. The latter may result in infeasible points because the lower-level complementarity may in fact not be fulfilled due to numerical tolerances. In order to circumvent this behavior, we tightened the integer feasibility tolerance of CPLEX to 10−9 . An ex-post evaluation of the complementarity conditions revealed that with this setting, all solutions fulfill every complementarity condition up to a tolerance of 10−6 . Thus, we consider these solutions to be feasible. In contrast, too small values for M may produce suboptimal solutions. Therefore, we run the following sanity check for every instance in I . Let Fs i be the objective value of the best feasible solution, i.e., the best upper bound, and let Fs i be the best lower bound found by approach s∈{BigM-4, BigM-5, BigM-6} for instance i∈I . We set unavailable values to +∞ and −∞ , respectively. Further, let F∗ i and F∗ i be the best upper and lower bound found by a provably correct solution approach. We will consider this provably correct approach as a black box for the moment and discuss it in more detail in the next section. We then check for every instance i and approachs, if hold. If this is not the case, we consider instance i as not solved by s. Out of the 698instances in I , this happened 29times for BigM-6, 50times for BigM-5, and 147times for BigM-4. Figure1 shows two performance profiles of the running times of the methods BigM-4, BigM-5, and BigM-6. The left performance profile is based on those 377 instances in I that all three methods solve. Apparently, a lower big- M value is beneficial w.r.t. the running time and BigM-4 dominates the other two methods. Thus, there is an incentive to choose a small value ofM. However, the picture changes, if we consider the 549instances in I that at least one of the three methods solves; see Fig.1(right). It can be seen that BigM-6 solves the largest number of instances among the three tested approaches. To be more specific, BigM-6 solves 524, BigM-5 solves 503, and BigM-4 solves 411 instances. The reason is, as discussed above, that for a smaller value ofM, the ex-post optimality check fails more often. This results in more instances counted as Fs i ≥F ∗ i and F s i ≤F ∗ i 1 3 Why there isnoneed touse abig‑M inlinear bilevel… Page 5 of 12 3 Table 1 Instance classes with relevant sizes and references Reference # Instances n m k 𝓁 Total In I min max min max min max min max CLIQUE Fischetti etal. (2018) 60 60 546 1593 586 1653 1 1 1326 3363 IMKP Fischetti etal. (2019) 144 134 10 105 10 105 1 29 11 106 INTER-ASSIG DeNegre (2011) 24 19 25 25 25 25 1 1 45 45 INTER-CLIQUE Tang etal. (2016) 80 80 19 94 27 109 1 1 53 280 INTER-KP DeNegre (2011) 99 65 10 50 10 50 1 1 11 51 KP Fischetti etal. (2018) 450 219 100 500 100 500 1 1 101 501 MIPLIB Fischetti etal. (2019) 60 22 3 78734 2 78733 0 0 15 4944 XULARGE Xu and Wang (2014) 60 60 500 1000 500 1000 200 400 200 400 XUWANG Fischetti etal. (2017) 100 39 10 460 10 460 4 184 4 184 T.Kleinert, M.Schmidt 1 3 3 Page 6 of 12 not solved. Note that there is, however, no dominance across the three methods w.r.t. the solved instances. There are 18 instances that BigM-5 solves but BigM-6 does not and 21 instances that BigM-4 solves but BigM-5 does not. Consequently, although it is not the fastest method, from a practical point of view, BigM-6 is the best choice. This is in line with results of a comparison of various values for M on a different test set in Pineda etal. (2018). We recap however that even BigM-6 produces 29“solutions” that are indeed not optimal. 2 The SOS1 reformulation: alame duck? Another way to solve the MPCC(3) is to omit the complementarity conditions(3d) initially and then branch on them instead. 2.1 The method A first sketch of this approach has been proposed by Fortuny-Amat and McCarl (1981) and a more detailed evaluation along with first numerical results can be found in Bard and Moore (1990). A modern and convenient way to apply this method is to exploit special ordered sets of type 1 (SOS1). Such sets are introduced in Beale and Tomlin (1970) and require that at most one variable of a set of variables takes a nonzero value. With this, the complementarity conditions(3d) can be rephrased as follows: This technique is proposed in a more general MPCC context in Siddiqui and Gabriel (2013) and used in a bilevel context in Pineda et al. (2018). We highlight that it is big-M-free and fairly easy to implement. Modern mixed-integer solvers handle SOS1 constructs by automatically reformulating it to the mixed-integer formulation (4) if provably correct bounds on si and 𝜆i are available or by branching on si and 𝜆i otherwise. In this way, the benefits of using a highly evolved mixed-integer (5) si=(b−Cx −Dy)i,{si,𝜆i}is SOS1, i=1, …,𝓁. Fig. 1 Performance profile of running times of the big- M -based methods for the instances in I that all three methods solve (left) and at least one method solves (right) 1 3 Why there isnoneed touse abig‑M inlinear bilevel… Page 7 of 12 3 solver can be exploited, while the correctness of the obtained solutions is guaranteed—in contrast to the approach stated in Sect.1. However, the theoretical worstcase complexity is the same for both approaches. We label this big-M-free method as SOS1 and evaluate its performance in comparison to BigM-6 in the following. 2.2 Performance evaluation All results presented in this section follow the setup described in Sect. 1.2. Figure2 shows a performance profile of the running times of BigM-6 and SOS1 on the 566instances that at least one of the two methods solves. It can be seen that BigM-6 is the fastest method for more than 50% of the instances (see the leftmost point of the solid curve). In addition, it solves around 90% of the instances (see the rightmost point of the solid curve), although some “solved” instances are considered as not solved due to the ex-post optimality check described in Sect.1.2. The valid black box used in this optimality check is exactly the SOS1-based approach. According to Fig.2, BigM-6 can be considered the distinct winner approach, which is in line with the analysis in Pineda etal. (2018). Overall, this justifies why the big-M approach equipped with a large constantM is chosen instead of SOS1 in a lot of applications of OR. 3 The game changer: valid inequalities The results presented up to this point only re-iterate folklore knowledge: Although it has its downsides, the big-M approach is the method of choice in practical linear bilevel optimization. This section aims to change this thinking. We show that adding a simple inequality to the MPCC(3) changes the results drastically. This inequality has been proposed recently in Kleinert etal. (2020) and exploits the strong-duality condition of the follower problem. We briefly summarize its derivation in the following. For any leader decision x , the dual follower problem is given by min 𝜆 𝜆 ⊤ (b−Cx)s.t. 𝜆∈Ω D={𝜆≥0∶D ⊤ 𝜆=f} . Fig. 2 Performance profile of running times of the methods BigM-6 and SOS1 for the instances in I that at least one method solves T.Kleinert, M.Schmidt 1 3 3 Page 8 of 12 For every lower-level primal-dual feasible point (y,𝜆) , weak duality holds. Thus, strong duality can be enforced by This is a bilinear constraint with products of primal leader variables x and dual follower variables 𝜆 . However, one can derive a linear valid inequality from it by replacing each term Ci⋅ x with an upper bound C+ i ≥C i ⋅ x ; see Kleinert etal. (2020). This yields the inequality in which C+ denotes the vector of upper bounds C+ i . The linearization of the bilinear term 𝜆⊤Cx in (6) can be seen as a special case of a McCormick inequality McCormick (1976) as discussed inKleinert etal. (2020). Of course, other techniques to deal with these bilinearities are possible as well such as spatial branching Horst and Tuy (2013) or other iterative approaches based on convex optimization, see, e.g., Constante-Flores etal. (2022). The bounds required in(6) can be obtained, e.g., by exploiting variable bounds on x or by solving auxiliary linear problems see also Kleinert et al. (2020). This requires the joint feasible set {(x,y)∶Ax +By ≥a,Cx +Dy ≥b} of the upper and lower level to be bounded, which is the case for every tested instance in our instance set I . Although solving the additional auxiliary LPs(7) can be done in polynomial time in general, it might be time consuming in practice. However, it has been shown inKleinert etal. (2020) to pay off to add Inequality(6) to the SOS1 reformulation of Problem (1). A preliminary computational analysis revealed that this strategy is also very effective for the BigM-6 approach. Consequently, 688instances in I are solved by at least one of the two methods BigM-6-R and SOS1-R compared to 566for the methods BigM-6 and SOS1. More precisely, BigM-6-R solves 642 instances compared to 524instances solved by BigM-6 and SOS1-R solves 615instances compared to 421 instances solved by SOS1. Note that the “R” denotes that the valid inequality(6) has been added at the root node. In more detail, this means that the problem solved by the BigM-6 method is Problem(3) with (3d) replaced with (4) and the additional constraint (6). The SOS1 method solves Problem (3), extended by (6), with (3d) replaced with(5). Figure 3 shows a performance profile that compares the running times of BigM-6-R and SOS1-R on the 688instances that at least one method solves. We observe several interesting aspects. First, the SOS1-based approach is the faster method for over 65% of the instances (see the leftmost point of the dashed curve). This is very much in contrast to the results without the valid inequality. Second, the reliability advantage of the big-M-based approach decreases significantly. f⊤y ≤𝜆 ⊤b− 𝜆 ⊤Cx f⊤y ≥𝜆 ⊤b− 𝜆 ⊤Cx. (6) f⊤y ≥𝜆 ⊤b− 𝜆 ⊤C+ , (7) max Ci⋅xs.t. Ax +By ≥ a,Cx +Dy ≥ b,