Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Programming 2011 1 IE 531 Linear Programming Spring 2011 박 성 수박 성 수.

Similar presentations


Presentation on theme: "Linear Programming 2011 1 IE 531 Linear Programming Spring 2011 박 성 수박 성 수."— Presentation transcript:

1 Linear Programming 2011 1 IE 531 Linear Programming Spring 2011 박 성 수박 성 수

2 Linear Programming 2011 2 Course Objectives  Why need to study LP?  Important tool by itself  Theoretical basis for later developments (IP, Network, Graph, Nonlinear, scheduling, Sets, Coding, Game, … )  Formulation + package is not enough for advanced applications and interpretation of results  Objectives of the class:  Understand the theory of linear optimization  Preparation for more in-depth optimization theory  Modeling capabilities  Introduction to use of software (Xpress-MP and/or CPLEX)

3 Linear Programming 2011 3  Prerequisite: basic linear algebra/calculus, earlier exposure to LP/OR helpful, mathematical maturity (reading proofs, logical thinking)  Be steady in studying.

4 Linear Programming 2011 4  Mathematical Programming Problem: min/max f(x) subject to g i (x)  0, i = 1,..., m, (h j (x) = 0, j = 1,..., k,) ( x  X  R n ) f, g i, h j : R n  R  If f, g i, h j linear (affine) function  linear programming problem If f, g i, h j (or part of them) nonlinear function  nonlinear programming problem If solution set restricted to be integer points  integer programming problem Chapter 1 Introduction

5 Linear Programming 2011 5  Linear programming: problem of optimizing (maximize or minimize) a linear (objective) function subject to linear inequality (and equality) constraints.  General form: {max, min} c'x subject toa i 'x  b i, i  M 1 a i 'x  b i, i  M 2 a i 'x = b i, i  M 3 x j  0, j  N 1, x j  0, j  N 2 c, a i, x  R n (There may exist variables unrestricted in sign)  inner product of two column vectors x, y  R n : x’y =  i = 1 n x i y i If x’y = 0, x, y  0, then x, y are said to be orthogonal. In 3-D, the angle between the two vectors is 90 degrees. ( vectors are column vectors unless specified otherwise)

6 Linear Programming 2011 6  Big difference from systems of linear equations is the existence of objective function and linear inequalities (instead of equalities)  Much deeper theoretical results and applicability than systems of linear equations.  x 1, x 2, …, x n : (decision) variables b i : right-hand-side a i 'x { , ,  } b i : i th constraint x j { ,  } 0 : nonnegativity (nonpositivity) constraint c'x : objective function  Other terminology: feasible solution, feasible set (region), free (unrestricted) variable, optimal (feasible) solution, optimal cost, unbounded

7 Linear Programming 2011 7 Important submatrix multiplications  Interpretation of constraints: see as submatrix multiplication. A: m  n matrix denote constraints as Ax { , ,  } b, where e i is i-th unit vector

8 Linear Programming 2011 8  Any LP can be expressed as min c'x, Ax  b max c'x  min (-c'x) and take negative of the optimal cost a i 'x  b i  -a i 'x  -b i a i 'x = b i  a i 'x  b i, -a i 'x  -b i nonnegativity (nonpositivity) are special cases of inequalities which will be handled separately in the algorithms. Feasible solution set of LP can always be expressed as Ax  b (or Ax  b) (called polyhedron, a set which can be described as a solution set of finitely many linear inequalities)  We may sometimes use max c'x, Ax  b form (especially, when we study polyhedron)

9 Linear Programming 2011 9 Brief History of LP (or Optimization)  Gauss: Gaussian elimination to solve systems of equations Fourier(early 19C) and Motzkin(20C) : solving systems of linear inequalities Farkas, Minkowski, Weyl, Caratheodory, … (19-20C): Mathematical structures related to LP (polyhedron, systems of alternatives, polarity) Kantorovich (1930s) : efficient allocation of resources (Nobel prize in 1975 with Koopmans) Dantzig (1947) : Simplex method 1950s : emergence of Network theory, Integer and combinatorial optimization, development of computer 1960s : more developments 1970s : disappointment, NP-completeness, more realistic expectations Khachian (1979) : ellipsoid method for LP

10 Linear Programming 2011 10 1980s : personal computer, easy access to data, willingness to use models Karmarkar (1984) : Interior point method 1990s : improved theory and software, powerful computers software add-ins to spreadsheets, modeling languages, large scale optimization, more intermixing of O.R. and A.I. Markowitz (1990) : Nobel prize for portfolio selection (quadratic programming) Nash (1994) : Nobel prize for game theory 21C (?) : Lots of opportunities more accurate and timely data available more theoretical developments better software and computer need for more automated decision making for complex systems need for coordination for efficient use of resources (e.g. supply chain management, APS, traditional engineering problems, bio, finance,...)

11 Linear Programming 2011 11 Application Areas of Optimization  Operations Managements Production Planning Scheduling (production, personnel,..) Transportation Planning, Logistics Energy Military Finance Marketing E-business Telecommunications Games Engineering Optimization (mechanical, electrical, bioinformatics,... ) System Design …

12 Linear Programming 2011 12 Resources  Societies:  INFORMS (the Institute for Operations Research and Management Sciences) : www.informs.org  MPS (The Mathematical Programming Society) : www.mathprog.org  Korean Institute of Industrial Engineers : kiie.org  Korean Operations Research Society : www.korms.or.kr  Journals: Operations Research, Management Science, Mathematical Programming, Networks, European Journal of Operational Research, Naval Research Logistics, Journal of the Operational Research Society, Interfaces, …

13 Linear Programming 2011 13 Standard form problems  Standard form : min c'x, Ax = b, x  0 Two view points:  Find optimal weights (nonnegative) from possible nonnegative linear combinations of columns of A to obtain b vector  Find optimal solution that satisfies linear equations and nonnegativity  Reduction to standard form Free (unrestricted) variable x j  x j + - x j -, x j +, x j -  0  j a ij x ij  b i   j a ij x ij + s i = b i, s i  0 (slack variable)  j a ij x ij  b i   j a ij x ij - s i = b i, s i  0 (surplus variable)

14 Linear Programming 2011 14  Any (practical) algorithm can solve the LP problem in equality form only (except nonnegativity)  Modified form of the simplex method can solve the problem with free variables directly (w/o using difference of two variables). It gives more sensible interpretation of the behavior of the algorithm.

15 Linear Programming 2011 15 1.2 Formulation examples  See other examples in the text.  Minimum cost network flow problem Directed network G=(N, A), (|N| = n ) arc capacity u ij, (i, j)  A, unit flow cost c ij, (i, j)  A b i : net supply at node i (b i > 0: supply node, b i < 0: demand node), (  i b i = 0) Find min cost transportation plan that satisfies supply, demand at each node and arc capacities. minimize  (i, j)  A c ij x ij subject to  {j : (i, j)  A} x ij -  {j : (j, i)  A} x ji = b i,i = 1, …, n (out flow - in flow = net flow at node i) (some people use, in flow – out flow = net flow) x ij  u ij,(i, j)  A x ij  0,(i, j)  A

16 Linear Programming 2011 16  Choosing paths in a communication network ( (fractional) multicommodity flow problem)  Multicommodity flow problem: Several commodities share the network. For each commodity, it is min cost network flow problem. But the commodities must share the capacities of the arcs. Generalization of min cost network flow problem. Many applications in communication, distribution / transportation systems  Several commodities case  Actually one commodity. But there are multiple origin and destination pairs of nodes (telecom, logistics,..)  Given telecommunication network (directed) with arc set A, arc capacity u ij bits/sec, (i, j)  A, unit flow cost c ij /bit, (i, j)  A, demand b kl bits/sec for traffic from node k to node l. Data can be sent using more than one path. Find paths to direct demands with min cost.

17 Linear Programming 2011 17 Decision variables: x ij kl : amount of data with origin k and destination l that traverses link (i, j)  A Let b i kl = b kl if i = k -b kl if i = l 0 otherwise  Formulation (flow formulation) minimize  (i, j)  A  k  l c ij x ij kl subject to  {j : (i, j)  A} x ij kl -  {j : (j, i)  A} x ji kl = b i kl,i, k, l = 1, …, n (out flow - in flow = net flow at node i for commodity from node k to node l)  k  l x ij kl  u ij,(i, j)  A (The sum of all commodities should not exceed the capacity of link (i, j) ) x ij kl  0, (i, j)  A, k, l =1, …, n

18 Linear Programming 2011 18  Alternative formulation (path formulation) Let K: set of origin-destination pairs (commodities) P(k): set of all possible paths for sending commodity k  K P(k;e): set of paths in P(k) that traverses arc e  A E(p): set of links contained in path p Decision variables: y p k : fraction of commodity k sent on path p minimize  k  K  p  P(k) w p k y p k subject to  p  P(k) y p k = 1, for all k  K  k  K  p  P(k; e) b k y p k  u e,for all e  A 0  y p k  1, for all p  P(k), k  K where w p k = b k  e  E(p) c e  If y p k  {0, 1}, it is a single path routing problem (path selection, integer multicommodity flow).

19 Linear Programming 2011 19  path formulation has smaller number of constraints, but enormous number of variables. can be solved easily by column generation technique (later). Integer version is more difficult to solve.  Extensions: Network design - also determine the number and type of facilities to be installed on the links (and/or nodes) together with routing of traffic.  Variations: Integer flow. Bifurcation of traffic may not be allowed. Determine capacities and routing considering rerouting of traffic in case of network failure, Robust network design (data uncertainty),...

20 Linear Programming 2011 20  Pattern classification (Linear classifier) Given m objects with feature vector a i  R n, i = 1, …, m. Objects belong to one of two classes. We know the class to which each sample object belongs. We want to design a criterion to determine the class of a new object using the feature vector. Want to find a vector (x, x n+1 )  R n+1 with x  R n such that, if i  S, then a i 'x  x n+1, and if i  S, then a i 'x < x n+1. (if it is possible)

21 Linear Programming 2011 21  Find a feasible solution (x, x n+1 ) that satisfies a i 'x  x n+1, i  S a i 'x < x n+1. i  S for all sample objects i Is this a linear programming problem? ( no objective function, strict inequality in constraints)

22 Linear Programming 2011 22  Is strict inequality allowed in LP? consider min x, x > 0  no minimum point. only infimum of objective value exists  If the system has a feasible solution (x, x n+1 ), we can make the difference of the rhs and lhs large by using solution M(x, x n+1 ) for M > 0 and large. Hence there exists a solution that makes the difference at least 1 if the system has a solution. Remedy: Use a i 'x  x n+1, i  S a i 'x  x n+1 -1, i  S  Important problem in data mining with applications in target marketing, bankruptcy prediction, medical diagnosis, process monitoring, …

23  Variations  What if there are many choices of hyperplanes? any reasonable criteria?  What if there is no hyperplane separating the two classes?  Do we have to use only one hyperplane?  Use of nonlinear function possible? How to solve them? SVM (support vector machine), convex optimization  More than two classes? Linear Programming 2011 23

24 Linear Programming 2011 24 1.3 Piecewise linear convex obj. functions  Some problems involving nonlinear functions can be modeled as LP.  Def: Function f : R n  R is called a convex function if for all x, y  R n and all  [0, 1] f( x + (1- )y)  f(x) + (1- )f(y). ( the domain may be restricted) f called concave if -f is convex (picture: the line segment joining (x, f(x)) and (y, f(y)) in R n+1 is not below the locus of f(x) )

25 Linear Programming 2011 25  Def: x, y  R n, 1, 2  0, 1 + 2 = 1 Then 1 x + 2 y is said to be a convex combination of x, y. Generally,  i=1 k i x i, where  i=1 k i = 1 and i  0, i = 1,..., k is a convex combination of the points x 1,..., 타  Def: A set S  R n is convex if for any x, y  S, we have 1 x + 2 y  S for any 1, 2  0, 1 + 2 = 1. Picture: 1 x + 2 y = 1 x + (1 - 1 ) y, 0  1  1 = y + 1 (x – y), 0  1  1 (line segment joining x, y lies in S) x ( 1 = 1) y ( 1 = 0) (x-y)

26  If we have 1 x + 2 y, 1 + 2 = 1 (without 1, 2  0), it is called an affine combination of x and y. Picture: 1 x + 2 y = 1 x + (1 - 1 ) y, = y + 1 (x – y),( 1 is arbitrary) (line passing through x, y) Linear Programming 2011 26

27 Linear Programming 2011 27 Picture of convex function

28 Linear Programming 2011 28  relation between convex function and convex set  Def: f: R n  R. Define epigraph of f as epi(f) = { (x,  )  R n+1 :   f(x) }  Then previous definition of convex function is equivalent to epi(f) being a convex set. When dealing with convex functions, we frequently consider epi(f) to exploit the properties of convex sets.  Consider operations on functions that preserve convexity and operations on sets that preserve convexity.

29 Linear Programming 2011 29  Example: Consider f(x) = max i = 1, …, m (c i 'x + d i ), c i  R n, d i  R (maximum of affine functions, called a piecewise linear convex function.) c 1 'x+d 1 c 2 'x+d 2 c 3 'x+d 3 x

30 Linear Programming 2011 30  Thm: Let f 1, …, f m : R n  R be convex functions. Then f(x) = max i = 1, …, m f i (x) is also convex. pf) f( x + (1- )y) = max i=1, …, m f i ( x + (1- )y )  max i=1, …, m ( f i (x) + (1- )f i (y) )  max i=1, …, m f i (x) + max i=1, …, m (1- )f i (y) = f(x) + (1- )f(y)

31 Linear Programming 2011 31  Min of piecewise linear convex functions Minimize max I=1, …, m (c i 'x + d i ) Subject to Ax  b Minimize z Subject to z  c i 'x + d i, i = 1, …, m Ax  b

32 Linear Programming 2011 32  Q: What can we do about finding max of a piecewise linear convex function? maximum of a piecewise linear concave function (can be obtained as min of affine functions)? Min of a piecewise linear concave function?

33 Linear Programming 2011 33  Convex function has a nice property such that a local min point is a global min point. (when domain is R n or convex set) (HW later) Hence finding min of a convex function defined over a convex set is usually easy. But finding a max of a convex function is difficult to solve. Basically, we need to examine all local max points. Similarly, finding a max of concave function is easy, but finding min of a concave function is difficult.

34 Linear Programming 2011 34  In constraints, f(x)  h where f(x) is piecewise linear convex function f(x) = max i=1, …, m (f i 'x + g i ).  f i 'x + g i  h, i = 1, …, m Q: What about constraints f(x)  h ? Can it be modeled as LP?  Def: f: R n  R, convex function,   R The set C = { x: f(x)   } is called the level set of f  level set of a convex function is a convex set. (HW later) solution set of LP is convex (easy)  non-convex solution set can’t be modeled as LP.

35 Linear Programming 2011 35 Problems involving absolute values  Minimize  i = 1, …, n c i |x i | subject to Ax  b(assume c i  0) More direct formulations than piecewise linear convex function is possible. (1) Min  i c i z i subject to Ax  b x i  z i, i = 1, …, n -x i  z i, i = 1, …, n (2) Min  i c i (x i + + x i - ) subject to Ax + - Ax -  b x +, x -  0 (want x i + = x i if x i  0, x i - = -x i if x i < 0 and x i + x i - = 0, i.e., at most one of x i +, x i - is positive in an optimal solution. c i  0 guarantees that.)

36 Linear Programming 2011 36 Data Fitting  Regression analysis using absolute value function Given m data points (a i, b i ), i = 1, …, m, a i  R n, b i  R. Want to find x  R n that predicts results b given a with function b = a'x Want x that minimizes prediction error | b i - a i 'x | for all i. minimize z subject to b i - a i 'x  z, i = 1, …, m -b i + a i 'x  z, i = 1, …, m

37 Linear Programming 2011 37  Alternative criterion minimize  i = 1, …, m | b i - a i 'x | minimize z 1 + … + z m subject to b i - a i 'x  z i, i = 1, …, m -b i + a i 'x  z i, i = 1, …, m Quadratic error function can't be modeled as LP, but need calculus method (closed form solution)

38 Linear Programming 2011 38  Special case of piecewise linear objective function : separable piecewise linear objective function. function f: R n  R, is called separable if f(x) = f 1 (x 1 ) + f 2 (x 2 ) + … + f n (x n ) xixi f i (x i ) a3a3 a2a2 a1a1 0 c3c3 c2c2 c1c1 c4c4 slope: c i x 1i x 2i x 3i x 4i c 1 < c 2 < c 3 < c4

39 Linear Programming 2011 39  Express x i in the constraints as x i  x 1i + x 2i + x 3i + x 4i, where 0  x 1i  a 1, 0  x 2i  a 2 - a 1, 0  x 3i  a 3 - a 2, 0  x 4i In the objective function, use : min c 1 x 1i + c 2 x 2i + c 3 x 3i + c 4 x 4i Since we solve min problem, it is guaranteed that we get x ki > 0 in an optimal solution implies x ji, j < k have values at their upper bounds.

40 Linear Programming 2011 40 1.4 Graphical representation and solution  Let a  R n, b  R. Geometric intuition for the solution sets of { x : a’x = 0 } { x : a’x  0 } { x : a’x  0 } { x : a’x = b } { x : a’x  b } { x : a’x  b }

41 Linear Programming 2011 41 { x : a’x  0 } { x : a’x  0 }  Geometry in 2-D a { x : a’x = 0 } 0

42 Linear Programming 2011 42  Let z be a (any) point satisfying a’x = b. Then { x : a’x = b } = { x : a’x = a’z } = { x : a’(x – z) = 0 } Hence x – z = y, where y is any solution to a’y = 0, or x = y + z. Similarly, for { x : a’x  b }, { x : a’x  b }. { x : a’x  b } { x : a’x  b } a { x : a’x = 0 } 0 { x : a’x = b } z

43 Linear Programming 2011 43  min c 1 x 1 + c 2 x 2 s.t. -x 1 + x 2  1, x 1  0, x 2  0 c=(-1, -1) c=(1, 1) c=(1, 0) c=(0, 1) {x: x 1 + x 2 = 0} {x: x 1 + x 2 = z} x1x1 x2x2

44 Linear Programming 2011 44  Representing complex solution set in 2-D ( n variables, m equations (coefficient vectors are linearly independent), nonnegativity, and n – m = 2 ) x1x1 x3x3 x2x2 x 1 = 0 x 2 = 0 x 3 = 0  See text sec. 1.5, 1.6 for more backgrounds


Download ppt "Linear Programming 2011 1 IE 531 Linear Programming Spring 2011 박 성 수박 성 수."

Similar presentations


Ads by Google