CE 191: Civil & Environmental Engineering Systems Analysis. LEC 17 : Final Review

Similar documents
CE 191: Civil and Environmental Engineering Systems Analysis. LEC 05 : Optimality Conditions

Lecture 18: Optimization Programming

CHAPTER 2: QUADRATIC PROGRAMMING

Constrained Optimization

MATH 4211/6211 Optimization Basics of Optimization Problems

minimize x subject to (x 2)(x 4) u,

ICS-E4030 Kernel Methods in Machine Learning

Gradient Descent. Dr. Xiaowei Huang

Numerical Optimization. Review: Unconstrained Optimization

CS-E4830 Kernel Methods in Machine Learning

Nonlinear Optimization: What s important?

ISM206 Lecture Optimization of Nonlinear Objective with Linear Constraints

Numerical Optimization

In the original knapsack problem, the value of the contents of the knapsack is maximized subject to a single capacity constraint, for example weight.

Quiz Discussion. IE417: Nonlinear Programming: Lecture 12. Motivation. Why do we care? Jeff Linderoth. 16th March 2006

Optimization Problems with Constraints - introduction to theory, numerical Methods and applications

Algorithms for nonlinear programming problems II

Lecture 3. Optimization Problems and Iterative Algorithms

Generalization to inequality constrained problem. Maximize

Convex Optimization. Dani Yogatama. School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, USA. February 12, 2014

Stochastic Programming Math Review and MultiPeriod Models

Constrained Optimization and Lagrangian Duality

NONLINEAR. (Hillier & Lieberman Introduction to Operations Research, 8 th edition)

Scientific Computing: Optimization

MATH2070 Optimisation

Computational Finance

Support Vector Machines: Maximum Margin Classifiers

Algorithms for nonlinear programming problems II

Part 4: Active-set methods for linearly constrained optimization. Nick Gould (RAL)

Math 273a: Optimization Basic concepts

Optimality Conditions

Network Flows. 6. Lagrangian Relaxation. Programming. Fall 2010 Instructor: Dr. Masoud Yaghini

Lecture 6: Conic Optimization September 8

More on Lagrange multipliers

The Karush-Kuhn-Tucker conditions

ECE580 Solution to Problem Set 6

UC Berkeley Department of Electrical Engineering and Computer Science. EECS 227A Nonlinear and Convex Optimization. Solutions 5 Fall 2009

CHAPTER 3: INTEGER PROGRAMMING

Outline. Roadmap for the NPP segment: 1 Preliminaries: role of convexity. 2 Existence of a solution

Motivation. Lecture 2 Topics from Optimization and Duality. network utility maximization (NUM) problem:

Optimization. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30

Introduction to Machine Learning Lecture 7. Mehryar Mohri Courant Institute and Google Research

Multidisciplinary System Design Optimization (MSDO)

Lecture 2: Linear SVM in the Dual

Constrained optimization: direct methods (cont.)

Lecture: Duality of LP, SOCP and SDP

Optimization: an Overview

CONSTRAINED NONLINEAR PROGRAMMING

Additional Exercises for Introduction to Nonlinear Optimization Amir Beck March 16, 2017

Optimality conditions for unconstrained optimization. Outline

Machine Learning A Geometric Approach

5 Handling Constraints

Numerical optimization. Numerical optimization. Longest Shortest where Maximal Minimal. Fastest. Largest. Optimization problems

Optimality Conditions for Constrained Optimization

Mathematical Economics. Lecture Notes (in extracts)

Applied Lagrange Duality for Constrained Optimization

10 Numerical methods for constrained problems

N. L. P. NONLINEAR PROGRAMMING (NLP) deals with optimization models with at least one nonlinear function. NLP. Optimization. Models of following form:

Statistical Machine Learning from Data

Solution Methods. Richard Lusby. Department of Management Engineering Technical University of Denmark

Lectures 9 and 10: Constrained optimization problems and their optimality conditions

Algorithms for Constrained Optimization

Chapter 3 Numerical Methods

Convex Optimization & Lagrange Duality

Structured Problems and Algorithms

Module 04 Optimization Problems KKT Conditions & Solvers

2.098/6.255/ Optimization Methods Practice True/False Questions

University of California, Davis Department of Agricultural and Resource Economics ARE 252 Lecture Notes 2 Quirino Paris

Algorithms for constrained local optimization

I.3. LMI DUALITY. Didier HENRION EECI Graduate School on Control Supélec - Spring 2010

Math (P)refresher Lecture 8: Unconstrained Optimization

Interior Point Methods. We ll discuss linear programming first, followed by three nonlinear problems. Algorithms for Linear Programming Problems

Nonlinear Optimization for Optimal Control

Lagrange Relaxation and Duality

Linear Support Vector Machine. Classification. Linear SVM. Huiping Cao. Huiping Cao, Slide 1/26

Semidefinite Programming Basics and Applications

IE 5531: Engineering Optimization I

Numerical Optimization: Basic Concepts and Algorithms

Sufficient Conditions for Finite-variable Constrained Minimization

Methodological Foundations of Biomedical Informatics (BMSC-GA 4449) Optimization

Optimization. Yuh-Jye Lee. March 21, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 29

Appendix A Taylor Approximations and Definite Matrices

Lecture 16: October 22

Optimization Tutorial 1. Basic Gradient Descent

AM 205: lecture 18. Last time: optimization methods Today: conditions for optimality

Introduction to Machine Learning Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods

Chapter 2. Optimization. Gradients, convexity, and ALS

Optimality, Duality, Complementarity for Constrained Optimization

Structural and Multidisciplinary Optimization. P. Duysinx and P. Tossings

Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012

Optimization. Yuh-Jye Lee. March 28, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 40

Numerical optimization

Duality Theory of Constrained Optimization

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods

CSCI : Optimization and Control of Networks. Review on Convex Optimization

Numerical Optimization Professor Horst Cerjak, Horst Bischof, Thomas Pock Mat Vis-Gra SS09

EC /11. Math for Microeconomics September Course, Part II Problem Set 1 with Solutions. a11 a 12. x 2

A Brief Review on Convex Optimization

Optimization Methods

Transcription:

CE 191: Civil & Environmental Engineering Systems Analysis LEC 17 : Final Review Professor Scott Moura Civil & Environmental Engineering University of California, Berkeley Fall 2014 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 1

Logistics Date/Time: Tuesday December 16, 2013, 3:00p-6:00p Where: 406 Davis Hall Format/Rules: See Practice Final (bcourses) Topics Covered: Everything Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 2

Topics Covered - 1 Unit 1: Linear Programming Formulation Graphical Solutions to LP Transportation & Shortest Path Problems Applications (e.g. Water Supply Network) Unit 2: Quadratic Programming Least Squares Optimality Conditions Applications (e.g. Energy Portfolio Optimization) Unit 3: Integer Programming Dijkstra s Algorithm Branch & Bound Mixed Integer Programming and Big-M method Applications (e.g. Construction Scheduling) Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 3

Topics Covered - 2 Unit 4: Nonlinear Programming Convex functions and convex sets Local/global optima Gradient Descent Barrier Functions KKT Conditions Applications (e.g. WIFI tower location) Unit 5: Dynamic Programming Principle of Optimality Shortest Path Problems Applications (e.g. knapsack, smart appliances, Cal Band) Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 4

Outline 1 Unit 1: Linear Programming 2 Unit 2: Quadratic Programming 3 Unit 3: Integer Programming 4 Unit 4: Nonlinear Programming 5 Unit 5: Dynamic Programming Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 5

Linear Program Formulation Matrix notation : Minimize: subject to: c T x Ax b where x = [x 1, x 2,..., x N ] T c = [c 1, c 2,..., c N ] T [A] i,j = a i,j, A R M N b = [b 1, b 2,..., b M ] T Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 6

Ex 1: Transportation Problem - General LP Formulation M N min: c ij x ij i=1 j=1 M s. to x ij = d j, j = 1,, N i=1 N x ij = s i, i = 1,, M j=1 x ij 0, i, j 3 3 3 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 7

Example 2: Shortest Path Minimize: J = j NA c Aj x Aj + 10 i=1 c ij x ij + c jb x jb j N i j N B subject to: x ji = x ij, i = 1,, 10 j N i j N i x Aj = 1 j N A x jb = 1 j N B x ij 0, x Aj 0, x jb 0 N i : Set of nodes j with direct connections to node i Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 8

Graphical Solns to LP Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 9

Outline 1 Unit 1: Linear Programming 2 Unit 2: Quadratic Programming 3 Unit 3: Integer Programming 4 Unit 4: Nonlinear Programming 5 Unit 5: Dynamic Programming Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 10

Conditions for Optimality Consider an unconstrained QP min f(x) = x T Qx + Rx Recall from calculus (e.g. Math 1A) the first order necessary condition (FONC) for optimality: If x is an optimum, then it must satisfy d dx f(x ) = 0 = 2Qx + R = 0 x = 1 2 Q 1 R Also recall the second order sufficiency condition (SOSC): If x is a stationary point (i.e. it satisfies the FONC), then it is also a minimum if 2 x 2 f(x ) Q positive definite positive definite Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 11

Nature of stationary point based on SOSC Hessian matrix Quadratic form Nature of x positive definite x T Qx > 0 local minimum negative definite x T Qx < 0 local maximum positive semi-definite x T Qx 0 valley negative semi-definite x T Qx 0 ridge indefinite x T Qx any sign saddle point Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 12

Outline 1 Unit 1: Linear Programming 2 Unit 2: Quadratic Programming 3 Unit 3: Integer Programming 4 Unit 4: Nonlinear Programming 5 Unit 5: Dynamic Programming Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 13

Fractional solution What should one do? 9 drivers 2 trucks 9 drivers 3 trucks 8.9 8 drivers 2 trucks 2.2 8 drivers 3 trucks Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 14

Fractional solution What should one do? Feasible candidate solu/on 1 Feasible candidate solu/on 2 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 15

Dijkstra s Algorithm Example - Final Result Result: Shortest path and distance from A 50 B E 10 20 90 30 A G F 40 80 20 20 D 50 10 10 C 20 H A B C D E F G H (1) A 20 80 90 (2) B 20 80 30 90 (3) F 20 40 70 30 90 (4) C 20 40 50 30 90 60 (5) D 20 40 50 30 70 60 (6) H 20 40 50 30 70 60 (7) G 20 40 50 30 70 60 (8) E 20 40 50 30 70 60 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 16

Branch and bound: summary min x 1 2x 2 s. to 4x 1 + 6x 2 9 x 1 + x 2 4 x 1 0 x 2 0 x 1, x 2 Z P0 (1.5,2.5) f =-3.5 P1 P2 (0.75,2) f =-3.25 P3 P4 (0,1.5) (1,2) f =-3 f =-3 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 17

Transformation of OR into an AND Pick a very large number M. Also consider a decision variable d {0, 1}. For sufficiently large M, the following two statements are equivalent: Statement 1: Statement 2: OR AND { t 1 t 2 if t 1 t 2 t 2 t 1 o.w. { t 1 t 2 Md t 1 t 2 + M(1 d) Transform an OR condition to an AND condition, at the expense of an added binary variable d. Variable d encodes the order. d = 0 Order : t 2, t 1. d = 1 Order : t 1, t 2. Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 18

Outline 1 Unit 1: Linear Programming 2 Unit 2: Quadratic Programming 3 Unit 3: Integer Programming 4 Unit 4: Nonlinear Programming 5 Unit 5: Dynamic Programming Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 19

Convex Functions Let D = {x R a x b}. Def n (Convex function) : The function f(x) is convex on D if and only if f(x) = f (λa + (1 λ)b) λf(a) + (1 λ)f(b) Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 20

Convex Sets Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 21

Definitions of minimizers Def n (Global minimizer) : x D is a global minimizer of f on D if f(x ) f(x) x D in English: x minimizes f everywhere in D. Def n (Local minimizer) : x D is a local minimizer of f on D if ɛ > 0 s.t. f(x ) f(x) x D {x R x x < ɛ} in English: x minimizes f locally in D. Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 22

Gradient Descent Algorithm Start with an initial guess Repeat Determine descent direction Choose a step size Update Until stopping criterion is satisfied GUESS Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 23

Log Barrier Functions Consider: min f(x) s. to: a x b. Convert hard constraints to soft constraints. Consider barrier function: b(x, ε) = ε log ((x a)(b x)) as ε 0. Modified optimization: min f(x) + εb(x, ε) Pick ε small, solve. Set ε = ε/2. Solve again. Repeat Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 24

Method of Lagrange Multipliers Equality Constrained Optimization Problem Lagrangian min f(x) s. to h j (x) = 0, j = 1,, l Introduce the so-called Lagrange multipliers λ j, j = 1,, l. The Lagrangian is L(x) = f(x) + l λ j h j (x) j=1 = f(x) + λ T h(x) First order Necessary Condition (FONC) If a local minimum x exists, then it satisfies L(x ) = f(x ) + λ T h(x ) = 0 Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 25

Karush-Kuhn-Tucker (KKT) Conditions General Constrained Optimization Problem min f(x) s. to g i (x) 0, i = 1,, m h j (x) = 0, j = 1,, l If x is a local minimum, then the following necessary conditions hold: f(x ) + µ T g(x ) + λ T h(x ) = 0, Stationarity (1) g(x ) 0, Feasibility (2) h(x ) = 0, Feasibility (3) µ 0, Non-negativity (4) µ T g(x ) = 0, Complementary slackness (5) Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 26

Outline 1 Unit 1: Linear Programming 2 Unit 2: Quadratic Programming 3 Unit 3: Integer Programming 4 Unit 4: Nonlinear Programming 5 Unit 5: Dynamic Programming Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 27

Formulation Discrete-time system x k+1 = f(x k, u k ), k = 0, 1,, N 1 k : discrete time index x k : state - summarizes current configuration of system at time k u k : control - decision applied at time k N : time horizon - number of times control is applied Additive Cost N 1 J = c k (x k, u k ) + c N (x N ) c k c N k=0 : instantaneous cost - instantaneous cost incurred at time k : final cost - incurred at time N Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 28

Principle of Optimality (in math) Define V k (x k ) as the optimal cost-to-go from time step k to the end of the time horizon N, given the current state is x k. Then the principle of optimality can be written in recursive form as: with the boundary condition V k (x k ) = min u k {c k (x k, u k ) + V k+1 (x k+1 )} V N (x N ) = c N (x N ) Admittedly awkward aspects: You solve the problem backward! You solve the problem recursively! Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 29

DP Application Examples Shortest Path in Networks Knapsack Problem Smart Appliances Resource Economics Cal Band formations Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 30

Flowchart of Methods-based Courses Math 54 Linear Alg, Diff EQs CE 155 Transporta(on Systems E 7 Matlab Intro CE 191 Op(miza(on CE 93 Eng. Data Analysis EE 127A Op(miza(on Models & Apps EE 120, C128 Control Systems CE 186 Cyber Physical Systems ME C134 Control Systems CE 268E Civil Systems & Environment CE 271 Sensors & Signals CE 295 Energy Systems & Control CE 290I Control & Info Management CE 291F Control of DPS IEOR 262A/B, 263A/B, 264 Math Programming ME C23X, EE 220-3 Control Systems EECS 227 Convex Op(miza(on Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 31

Why take CE 191? Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 32

Why take CE 191? Learn to abstract mathematical programs from physical systems to optimally design a civil engineered system. Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 32

Thank you for a fantastic semester! Prof. Moura UC Berkeley CE 191 LEC 17 - Final Review Slide 33