Linear Programming
Linear Programs - example 1 • Optimization problem • x 1 ,x 2 = variables • z=x 1 +x 2 = objective - linear in x variables • “subject to” constraints • 4x 1 -x 2 ⩽ 8 • 2x 1 +x 2 ⩽ 10 • 5x 1 -2x 2 ⩾ -2 • x 1 ,x 2 ⩾ 0 - also linear in x variables
Linear programs - feasible region x 2 • Each linear constraint “splits” unsatisfied the space into two halves 2 x 1 + satisfied x - “satisfied” half 2 ⩽ 1 0 (constraint holds) x 1 - “unsatisfied” half (constraint doesnt hold) - separation is a line given by the constraint
Linear programs - feasible region • Feasible region = intersection of “satisfied” halfs for all constraints • clearly solution(s) (x1,x2) must be in this feasible region - any other (x1,x2) outside this region violates some constraint(s)
Linear Programs - Objective • z = x1+x2 is objective, to be maximized (want the max z) - other times want the min, “minimized”
Linear Programs - Objective • z = x1+x2 is objective, to be maximized (want the max z) - other times want the min, “minimized” • for a fixed z, z=x1+x2 is a line - “z line” or “objective line” - 3 z lines drawn for z=0, z=4, z=8 - on each such line, any (x1,x2) gives in the same objective
Linear Programs - Objective • z = x1+x2 is objective, to be maximized (want the max z) - other times want the min, “minimized” • for a fixed z, z=x1+x2 is a line - “z line” or “objective line” - 3 z lines drawn for z=0, z=4, z=8 - on each such line, any (x1,x2) gives in the same objective • only interested in y objective lines that intersect the feasible region - out of these we want the “last” line that intersects FR, in the direction of max objective (dotted red direction) - the last intersection objective line is y=8
Linear Programs - example 2
Linear Programs - example 2 x 2 x 1
Linear Programs - example 2 x 2 x 1 ⩽ 4 x 1
Linear Programs - example 2 x 2 2 2 x 1 2 ⩽ x 1 ⩽ 4 x 1 ⩾ 0 x 1 x 0 2 ⩾
Linear Programs - example 2 x 2 2 2 x 1 2 ⩽ x 1 ⩽ 4 x 1 ⩾ 0 3x 1 +2x 2 ⩽ 18 x 1 x 0 2 ⩾
Linear Programs - example 2 x 2 • objective max objective direction z=3x 1 +5x 2 z=3x 1 +5x 2 =36 - 4 objective lines drawn: z=0,15,25,36 z=3x 1 +5x 2 =25 • last z line intersecting feasible reagion: z=36 - intersection point is x 1 =2,x 2 =6 z=3x 1 +5x 2 =15 z=3x 1 +5x 2 =0 x 1
Linear Programs - example 2 x 2 • objective max objective direction z=3x 1 +5x 2 z=3x 1 +5x 2 =36 - 4 objective lines drawn: z=0,15,25,36 z=3x 1 +5x 2 =25 • last z line intersecting feasible reagion: z=36 - intersection point is x 1 =2,x 2 =6 z=3x 1 +5x 2 =15 z=3x 1 +5x 2 =0 x 1
Linear Programs - solution max objective direction solution z=36 x 2 x 1 =2;x 2 =6 z=3x 1 +5x 2 =36 objective line • last y line intersecting feasible reagion: z=36 - intersection point is x 1 =2,x 2 =6 x 1
Linear Programs - solution max objective direction solution z=36 x 2 x 1 =2;x 2 =6 z=3x 1 +5x 2 =36 objective line • last y line intersecting feasible reagion: z=36 - intersection point is x 1 =2,x 2 =6 x 1
LP - solution critical observations max objective direction solution z=36 x 2 x 1 =2;x 2 =6 z=3x 1 +5x 2 =36 • OBSERVATION 1: the objective line solution is in a corner(vertex) of the feasible region • precisely the corner that is furtest in the direction of max objective x 1
LP - solution critical observations • OBSERVATION 2: feasible region is a convex polygon max objective multidimensional direction solution - think of a ball in 3 dimensions, only not round but with triangle sides
LP - solution critical observations • OBSERVATION 2: feasible region is a convex polygon max objective multidimensional direction solution - think of a ball in 3 z = 3 6 z = 3 0 dimensions, only not round z = 2 8 but with triangle sides z = 2 4 z = 2 3 • write objective for each z = 2 0 z = 1 9 z = 1 8 corner z = 1 6 z = 1 4 z = 1 3 z = 1 0 z = 7 z = 7 z = 3 z = 1
LP - solution critical observations • OBSERVATION 2: feasible region is a convex polygon max objective multidimensional direction solution - think of a ball in 3 z = 3 6 z = 3 0 dimensions, only not round z = 2 8 but with triangle sides z = 2 4 z = 2 3 • write objective for each z = 2 0 z = 1 9 z = 1 8 corner z = 1 6 z = 1 4 z = 1 3 • convexity means that each z = 1 0 vertex has : z = 7 z = 7 z = 3 z = 1
LP - solution critical observations • OBSERVATION 2: feasible region is a convex polygon max objective multidimensional direction solution - think of a ball in 3 z = 3 6 z = 3 0 dimensions, only not round z = 2 8 but with triangle sides z = 2 4 z = 2 3 • write objective for each z = 2 0 z = 1 9 z = 1 8 corner z = 1 6 z = 1 4 z = 1 3 • convexity means that each z = 1 0 vertex has : z = 7 z = 7 z = 3 - higher obj neighbors in z = 1 the max-obj direction (red)
LP - solution critical observations • OBSERVATION 2: feasible region is a convex polygon max objective multidimensional direction solution - think of a ball in 3 z = 3 6 z = 3 0 dimensions, only not round z = 2 8 but with triangle sides z = 2 4 z = 2 3 • write objective for each z = 2 0 z = 1 9 z = 1 8 corner z = 1 6 z = 1 4 z = 1 3 • convexity means that each z = 1 0 vertex has : z = 7 z = 7 z = 3 - higher obj neighbors in z = 1 the max-obj direction (red) - lower obj neighbors in opposite direction (blue)
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 z = 1 6 y = 1 4 z = 1 3 z = 1 0 z = 7 z = 7 z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 z = 1 0 z = 7 z = 7 z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 • “walk” to any adjacent corner z = 1 0 with higher objective z = 7 z = 7 z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 • “walk” to any adjacent corner z = 1 0 with higher objective z = 7 z = 7 z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 • “walk” to any adjacent corner z = 1 0 with higher objective z = 7 z = 7 • repeat z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 • “walk” to any adjacent corner z = 1 0 with higher objective z = 7 z = 7 • repeat z = 3 z = 1
LP - simplex algorithm idea • feasible region (FR) convexity means that each vertex has : max objective direction - higher obj neighbors in the solution z = 3 6 max-obj direction (red) z = 3 0 - lower obj neighbors in z = 2 8 z = 2 4 z = 2 3 opposite direction (blue) z = 2 0 z = 1 9 z = 1 8 • idea: start in any corner of FR z = 1 6 y = 1 4 z = 1 3 • “walk” to any adjacent corner z = 1 0 with higher objective z = 7 z = 7 • repeat z = 3 z = 1
Recommend
More recommend