Tutorials on Advanced Optimization Methods
Total Page:16
File Type:pdf, Size:1020Kb
Wei Wei, Tsinghua University Tutorials on Advanced Optimization Methods July 19, 2020 Springer Tutorials on Advanced Optimization Methods Wei Wei, Tsinghua University This material is the appendix part of my book collaborated with Professor Jianhui Wang at Southern Methodist University: Wei Wei, Jianhui Wang. Modeling and Optimization of Interdependent Energy Infrastructures. Springer Nature Switzerland, 2020. https://link.springer.com/book/10.1007%2F978-3-030-25958-7 This material provides thorough tutorials on some optimization techniques frequently used in various engineering disciplines, including Convex optimization | Linearization technique and mixed-integer linear programming | Robust optimization | Equilibrium/game problems | It discusses how to reformulate a difficult (non-convex, multi-agent, min- max) problem to a solver-compatible form (semidefinite program, mixed- integer linear program) via convexification, linearization, and decomposition, so the original problem can be reliably solved by commercial/open-source software. Fundamental algorithms (simplex algorithm, interior-point algo- rithm) are not the main focus. This material is a good reference for self-learners who have basic knowledge in linear algebra and linear programming. It is one of the main references for an optimization course taught at Tsinghua University. If you need teaching slides, please contact [email protected] or find the up-to-date contact information at https://sites.google.com/view/weiweipes/ 1 Contents A Basics of Linear and Conic Programs ..................... 7 A.1 Basic Notations . 8 A.1.1 Convex Sets . 8 A.1.2 Generalized Inequalities . 13 A.1.3 Dual Cones and Dual Generalized Inequalities . 14 A.1.4 Convex Function and Epigraph. 16 A.2 From Linear to Conic Program . 18 A.2.1 Linear Program and its Duality Theory . 18 A.2.2 General Conic Linear Program . 23 A.2.3 Second-order Cone Program . 27 A.2.4 Semidefinite Program . 34 A.3 Convex Relaxation Methods for Non-convex QCQPs . 39 A.3.1 SDP Relaxation and Valid Inequalities . 40 A.3.2 Successively Tightening the Relaxation . 43 A.3.3 Completely Positive Program Relaxation . 47 A.3.4 MILP Approximation . 49 A.4 MILP Formulation of Nonconvex QPs . 50 A.4.1 Nonconvex QPs over polyhedra . 50 A.4.2 Standard Nonconvex QPs . 53 A.5 Further Reading . 55 References . 57 B Formulation Recipes in Integer Programming . 61 B.1 Piecewise Linear Approximation of Nonlinear Functions . 62 B.1.1 Univariate Continuous Function . 62 B.1.2 Bivariate Continuous Nonlinear Function . 67 B.1.3 Approximation Error . 70 B.2 Linear Formulation of Product Terms . 72 B.2.1 Product of Two Binary Variables . 72 B.2.2 Product of Integer and Continuous Variables . 73 B.2.3 Product of Two Continuous Variables . 74 3 4 Contents B.2.4 Monomial of Binary Variables . 76 B.2.5 Product of Functions in Integer Variables . 77 B.2.6 Log-sum Functions . 78 B.3 Other Frequently used Formulations . 79 B.3.1 Minimum Values . 79 B.3.2 Maximum Values . 79 B.3.3 Absolute Values . 80 B.3.4 Linear Fractional of Binary Variables . 80 B.3.5 Disjunctive Inequalities . 81 B.3.6 Logical Conditions. 85 B.4 Further Reading . 86 References . 87 C Basics of Robust Optimization ............................ 89 C.1 Static Robust Optimization . 90 C.1.1 Basic Assumptions and Formulations . 91 C.1.2 Tractable Reformulations . 93 C.1.3 Formulation Issues . 97 C.2 Adjustable Robust Optimization . 104 C.2.1 Basic Assumptions and Formulations . 104 C.2.2 Affine Policy Based Approximation Model . 108 C.2.3 Algorithms for Fully Adjustable Models . 110 C.3 Distributionally Robust Optimization . 119 C.3.1 Static Distributionally Robust Optimization . 120 C.3.2 Adjustable Distributionally Robust Optimization . 129 C.4 Data-driven Robust Stochastic Program . 133 C.4.1 Robust Chance Constrained Stochastic Program . 134 C.4.2 Stochastic Program with Discrete Distributions . 148 C.4.3 Formulations based on Wasserstein Metric . 153 C.5 Further Reading . 168 References . 170 D Equilibrium Problems .................................... 175 D.1 Standard Nash Equilibrium Problem . 176 D.1.1 Formulation and Optimality Condition . 176 D.1.2 Variational Inequality Formulation . 177 D.1.3 Best Response Algorithms . 180 D.1.4 Nash Equilibrium of Matrix Games . 182 D.1.5 Potential Games . 186 D.2 Generalized Nash Equilibrium Problem . 189 D.2.1 Formulation and Optimality Condition . 190 D.2.2 Best-Response Algorithm . 195 D.3 Bilevel Programs . 198 D.3.1 Bilevel Programs with a Convex Lower Level . 198 D.3.2 Special Bilevel Programs . 204 Contents 5 D.3.3 Bilevel Mixed-integer Program . 212 D.4 Mathematical Programs with Equilibrium Constraints . 217 D.4.1 Mathematical Formulation. 217 D.4.2 Linear Complementarity Problem . 218 D.4.3 Linear Programs with Complementarity Constraints . 222 D.5 Equilibrium Programs with Equilibrium Constraints . 222 D.5.1 Mathematical model . 223 D.5.2 Methods for Solving an EPEC . 223 D.6 Conclusions and Further Reading . 229 References . 230 Appendix A Basics of Linear and Conic Programs The great watershed in optimization isn't between linearity and nonlinearity, but convexity and non-convexity. −Ralph Tyrrell Rockafellar The mathematical programming theory has been thoroughly developed in width and depth since its birth in 1940s, when George Dantzig invented simplex algorithm for linear programming. The most influential findings in the field of optimization theory can be summarized as [1]: 1) Recognition of the fact that under mild conditions, a convex optimiza- tion program is computationally tractable: the computational effort under a given accuracy grows moderately with the problem size even in the worst case. In contrast, a non-convex program is generally computationally intractable: the computational effort of the best known methods grows prohibitively fast with respect to the problem size, and it is reasonable to believe that this is an intrinsic feature of such problems rather than a limitation of existing optimization techniques. 2) The discovery of interior-point methods, which was originally developed in 1980s to solve LPs and could be generalized to solve convex optimization problems as well. Moreover, between these two extremes (LPs and general convex programs), there are many important and useful convex programs. Although nonlinear, they still possess nice structured properties, which can be utilized to develop more dedicated algorithms. These polynomial-time interior-point algorithms turn out to be considerably more efficient than those exploiting only the convex property. The superiority of formulating a problem as a convex optimization prob- lem is apparent. The most appealing advantage is that the problem can be solved reliably and efficiently. It is also convenient to build the associated dual problem, which gives insights on sensitivity information and may help develop distributed algorithm for solving the problem. Convex optimization has been applied in a number of energy system operational issues, and well acknowledged for its computational superiority. We believe that it is imper- ative for researchers and engineers to develop certain understanding on this important topic. As we have already learnt in previous chapters, many optimization prob- lems in energy system engineering can be formulated as or converted to con- 7 8 A Basics of Linear and Conic Programs vex programs. The goal of this chapter is to help readers develop necessary background knowledge and skills to apply several well-structured convex op- timization models, including LPs, SOCPs, and SDPs, i.e., to formulate or transform their problems as these specific convex programs. Certainly, convex transformation (or convexification) may be rather tricky and require special knowledge and skills. Nevertheless, the attempt often turns out to be worth- while. We also pay special attention to nonconvex QCQPs, which can model various decision-making problems in engineering, such as optimal power flow in Chap. ?? and optimal gas flow in Chap. ??. We discuss convex relaxation technique based on SDP,which is shown to be very useful to get a high-quality objective lower bound. We also present MILP formulations for some special QPs; because of the special problem structure, these MILP models can tackle practically sized problems in reasonable time. Most materials regarding convex sets and functions come from [2] and its solution manual [3]; extensions of duality theory from linear programming to conic programming follows from [1]. We consolidate necessary contents in a convenient way to make this book self-contained and easy to follow. A.1 Basic Notations A.1.1 Convex Sets A set C Rn is convex if the line segment connecting any two points in C 2 is contained in C, i.e., for any x1; x2 C, we have θx1 + (1 θ)x2 C, θ [0; 1]. Roughly speaking, standing2 at anywhere in a convex− set, you2 can see8 2 every other point in the set. Fig. A.1 illustrates a simple convex set and a non-convex set in R2. Fig. A.1 Left: the circle is convex; right: the ring is non-convex. The convex combination of k points x ; ; xk is defined as θ x + + 1 ··· 1 1 ··· θkxk, where θ ; ; θk 0, and θ + + θk = 1. A convex combination 1 ··· ≥ 1 ··· of points can be regarded as a weighted average of the points, with θi the weight of xi in the mixture. A.1 Basic Notations 9 The convex hull of set C, denoted conv(C), is the smallest convex set that contains C. Particularly, if C has finite elements, then conv(C) = θ x + +θkxk xi C; θi 0; i = 1; ; k; θ + +θk = 1 f 1 1 ··· j 2 ≥ ··· 1 ··· g Fig. A.2 illustrates the convex hulls of two sets in R2. Some useful convex sets are briefly introduced. Fig. A.2 Left: The convex hull of eighteen points. Right: The convex hull of a kidney shaped set.