Operations Research Solving LPs. Dr. Özgür Kabak

Similar documents
Linear Programming Notes VII Sensitivity Analysis

Linear Programming. Solving LP Models Using MS Excel, 18

Chapter 6: Sensitivity Analysis

56:171 Operations Research Midterm Exam Solutions Fall 2001

Sensitivity Report in Excel

Special Situations in the Simplex Algorithm

4.6 Linear Programming duality

Simplex method summary

CHAPTER 11: BASIC LINEAR PROGRAMMING CONCEPTS

3. Evaluate the objective function at each vertex. Put the vertices into a table: Vertex P=3x+2y (0, 0) 0 min (0, 5) 10 (15, 0) 45 (12, 2) 40 Max

IEOR 4404 Homework #2 Intro OR: Deterministic Models February 14, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #2

Chapter 2 Solving Linear Programs

Linear Programming. March 14, 2014

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS

Question 2: How do you solve a linear programming problem with a graph?

Linear Programming Notes V Problem Transformations

OPRE 6201 : 2. Simplex Method

Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood

Duality in Linear Programming

What is Linear Programming?

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Linear Programming Supplement E

Standard Form of a Linear Programming Problem

Sensitivity Analysis with Excel

Solving Linear Programs

Linear Programming. April 12, 2005

Chapter 5. Linear Inequalities and Linear Programming. Linear Programming in Two Dimensions: A Geometric Approach

1 Solving LPs: The Simplex Algorithm of George Dantzig

15.053/8 February 26, 2013

3 Introduction to Linear Programming

1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Linear Programming: Theory and Applications

Linear Programming in Matrix Form

Using EXCEL Solver October, 2000

Module1. x y 800.

LINEAR PROGRAMMING WITH THE EXCEL SOLVER

Operation Research. Module 1. Module 2. Unit 1. Unit 2. Unit 3. Unit 1

Linear Programming II: Minimization 2006 Samuel L. Baker Assignment 11 is on page 16.

Question 2: How will changes in the objective function s coefficients change the optimal solution?

LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS. 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method

Lecture 2: August 29. Linear Programming (part I)

Linear programming. Learning objectives. Theory in action

Solving Linear Programs in Excel

Linear Programming Sensitivity Analysis

Practical Guide to the Simplex Method of Linear Programming

Solving Linear Programs using Microsoft EXCEL Solver

0.1 Linear Programming

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

CPLEX Tutorial Handout

Chapter 4. Duality. 4.1 A Graphical Example

Nonlinear Programming Methods.S2 Quadratic Programming

Linear Programming I

Chapter 2: Introduction to Linear Programming

Chapter 3: Section 3-3 Solutions of Linear Programming Problems

Study Guide 2 Solutions MATH 111

Modeling and solving linear programming with R. Jose M Sallan Oriol Lordan Vicenc Fernandez

EXCEL SOLVER TUTORIAL

Chapter 13: Binary and Mixed-Integer Programming

The Graphical Method: An Example

Using CPLEX. =5 has objective value 150.

CONTENTS. CASE STUDY W-3 Cost Minimization Model for Warehouse Distribution Systems and Supply Chain Management 22

9.4 THE SIMPLEX METHOD: MINIMIZATION

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Network Models 8.1 THE GENERAL NETWORK-FLOW PROBLEM

3.1 Solving Systems Using Tables and Graphs

information available. There is a tremendous amount of sensitivity information, or information

5 Systems of Equations

Offered to MAN ECN IRL THM IBT Elective. Course Level Course Code Year Semester ECTS Weekly Course Hours

Solutions Of Some Non-Linear Programming Problems BIJAN KUMAR PATEL. Master of Science in Mathematics. Prof. ANIL KUMAR

Mathematical finance and linear programming (optimization)

SENSITIVITY ANALYSIS AS A MANAGERIAL DECISION

Linear Programming Problems

Linear Programming. Before studying this supplement you should know or, if necessary, review

Optimization Modeling for Mining Engineers

24. The Branch and Bound Method

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

In this section, we will consider techniques for solving problems of this type.

Eleonóra STETTNER, Kaposvár Using Microsoft Excel to solve and illustrate mathematical problems

3. Linear Programming and Polyhedral Combinatorics

LU Factorization Method to Solve Linear Programming Problem

Reduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:

Review of Production and Cost Concepts

4.2 Description of the Event operation Network (EON)

4 UNIT FOUR: Transportation and Assignment problems

Linear Program Solver

26 Linear Programming

Nonlinear Optimization: Algorithms 3: Interior-point methods

LECTURE: INTRO TO LINEAR PROGRAMMING AND THE SIMPLEX METHOD, KEVIN ROSS MARCH 31, 2005

Spreadsheets have become the principal software application for teaching decision models in most business

Using Excel s Solver

Introduction to Linear Programming (LP) Mathematical Programming (MP) Concept

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Integer Programming. subject to: (i = 1, 2,..., m),

GENERALIZED INTEGER PROGRAMMING

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

USING EXCEL 2010 TO SOLVE LINEAR PROGRAMMING PROBLEMS MTH 125 Chapter 4

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

Transcription:

Operations Research Solving LPs Dr. Özgür Kabak

Solving LPs } The Graphical Solution } The Simplex Algorithm } Software } Lindo } Excel Solver } QM for Windows 2

LP Solutions: Four Cases } The LP has a unique optimal solution. } The LP has alternative (multiple) optimal solutions. } It has more than one (actually an infinite number of) optimal solutions. } The LP is infeasible. } It has no feasible solutions. The feasible region contains no points. } The LP is unbounded. } In the feasible region there are points with arbitrarily large (in a max problem) objective function values. 3

The Graphical Solution } Any LP with only two variables can be solved graphically. X2 4 3 2 1 X1-1 1 2 3 4-1 4

The Graphical Solution Giapetto Example } Giapetto Example } Since the Giapetto LP has two variables, it may be solved graphically. } The feasible region is the set of all points satisfying the constraints. max z = 3x 1 + 2x 2 s.t. 2x 1 + x 2 100 (Finishing constraint) x 1 + x 2 80 (Carpentry constraint) x 1 40 (Demand constraint) x 1, x 2 0 (Sign restrictions) 5

6 The set of points satisfying the LP is bounded by the five sided polygon DGFEH. Any point on or in the interior of this polygon (the shade area) is in the feasible region.

Isoprofit / Isocost } Having identified the feasible region for the LP, a search can begin for the optimal solution which will be the point in the feasible region with the largest z-value (maximization problem). } To find the optimal solution, graph a line on which the points have the same z-value. In a max problem, such a line is called an isoprofit line while in a min problem, this is called the isocost line } (The figure shows the isoprofit lines for z = 60, z = 100, and z = 180)

Binding } A constraint is binding (active, tight) if the left-hand and right-hand side of the constraint are equal when the optimal values of the decision variables are substituted into the constraint. } The finishing and carpentry constraints are binding. } A constraint is nonbinding (inactive) if the left-hand side and the righthand side of the constraint are unequal when the optimal values of the decision variables are substituted into the constraint. } The demand constraint for wooden soldiers is nonbinding since at the optimal solution x 1 < 40 (x 1 = 20).

Basic Variables } Nonbasic variable } a chosen set of variables where variables equal to 0 } Basic variable } the remaining variables that satisfy the system of equations at the standard form

Advertisement Example (Winston 3.2, p.61) } Since the Advertisement LP has two variables, it may be solved graphically. } The feasible region is the set of all points satisfying the constraints. min z =50x 1 + 100x 2 s.t. 7x 1 + 2x 2 28 (high income women) 2x 1 + 12x 2 24 x 1,x 2 0 (high income men) 10

11

Advertisement Example Solution } Since Dorian wants to minimize total advertising costs, the optimal solution to the problem is the point in the feasible region with the smallest z value. } An isocost line with the smallest z value passes through point E and is the optimal solution at x 1 = 3.6 and x 2 = 1.4 giving z = 320 } Both the high-income women and high-income men constraints are satisfied, both constraints are binding. } x 1 and x 2 are basic variables 12

Two Mines Example } min 180x + 160y } S.t. } 6x + y >= 12 } 3x + y >= 8 } 4x + 6y >= 24 } x <= 5 } y <= 5 } x,y >= 0 13

14

Modified Giapetto (1) } maks z = 4x 1 + 2x 2 } s.t. } 2x 1 + x 2 100 (Finishing constraint) } x 1 + x 2 80 (Carpentry constraint) } x 1 40 (Demand constraint) } x 1, x 2 0 (Sign restrictions) 15

Points on the line between points G (20, 60) and F (40, 20) are the alternative optimal solutions. (z=200) 16 Thus, for 0 c 1, c [20 60] + (1-c) [40 20] = [40-20c, 20+40c] will be optimal

Modified Giapetto (2) } max z = 3x1 + 2x2 } s.t. } 2x1 + x2 100 (Finishing constraint) } x1 + x2 80 (Carpentry constraint) } x1 40 (Soldier Demand constraint) } x2 90 (Train demand constraint) } x1, x2 0 (Sign restrictions) 17

No points satisfy all constraints Infeasible LP 18

Modified Giapetto (3) } max z = 3x1 + 2x2 } s.t. } 2x1 + x2 100 (Finishing constraint) } x1 + x2 80 (Carpentry constraint) } x1 40 (Soldier Demand constraint) } x2 90 (Train demand constraint) } x1, x2 0 (Sign restrictions) 19

90 x 2 Isoprofit line never lose contact with the feasible region: Unbounded LP! H 40 x 1 20

Wyndor Glass Example } The WYNDOR GLASS CO. produces high-quality glass products, including windows and glass doors. It has three plants. Aluminum frames and hardware are made in Plant 1, wood frames are made in Plant 2, and Plant 3 produces the glass and assembles the products. } Because of declining earnings, top management has decided to revamp the company s product line. Unprofitable products are being discontinued, releasing production capacity to launch two new products having large sales potential: } Product 1: An 8-foot glass door with aluminum framing } Product 2: A 4 6 foot double-hung wood-framed window } Product 1 requires some of the production capacity in Plants 1 and 3, but none in Plant 2. Product 2 needs only Plants 2 and 3. The marketing division has concluded that the company could sell as much of either product as could be produced by these plants. However, because both products would be competing for the same production capacity in Plant 3, it is not clear which mix of the two products would be most profitable. } Suppose that the new products had been required to return a net profit of at least $50,000 per week to justify discontinuing part of the current product line. TABLE 3.1 Data for the Wyndor Glass Co. problem Production Time per Batch, Hours Product Production Time Plant 1 2 Available per Week, Hours 1 1 0 4 2 0 2 12 3 3 2 18 Profit per batch $3,000 $5,000

Wyndor Glass Example - Solution x 2 10 8 3x 1 5x 2 50 Maximize Z 3x 1 5x 2, subject to x 1 4 2x 2 3x 1 2x 2 3x 1 5x 2 12 18 50 and x 1 0, x 2 0 6 2x 2 12 4 3x 1 2x 2 18 2 x 1 0 x 2 0 x 1 4 0 2 4 6 8 10 x 1

Operations Research Sensitivity Analysis Dr. Özgür Kabak

Reduced Cost } The reduced cost for any nonbasic variable: } the amount by which the nonbasic variable's objective function coefficient must be improved } before that variable will become a basic variable in some optimal solution to the LP. } If the objective function coefficient of a nonbasic variable x k is improved by its reduced cost, } then the LP will have alternative optimal solutions } at least one in which x k is a basic variable, } and at least one in which x k is not a basic variable.

Reduced Cost } If the objective function coefficient of a nonbasic variable x k is improved by more than its reduced cost, } then any optimal solution to the LP will have x k as a basic variable (x k >0). } Reduced cost of a basic variable is zero (see definition)!

Shadow Price } The shadow price for the ith constraint } the amount by which the optimal z value is "improved" (increased in a max problem and decreased in a min problem) } if the RHS of the ith constraint is increased by 1. } This definition applies only if the change in the RHS of the constraint leaves the current basis optimal! } A constraint will always have a nonpositive shadow price; } A constraint will always have a nonnegative shadow price.

Conceptualization max z = 6 x 1 + x 2 + 10 x 3 x 1 + x 3 100 x 2 1 All variables 0 This is a very easy LP model and can be solved manually without utilizing Simplex. } x 2 = 1 } x 1 = 0, x 3 = 100 } The optimal solution: z = 1001, [x 1, x 2, x 3 ] = [0, 1, 100]

Conceptualization max z = 6 x 1 + x 2 + 10 x 3 x 1 + x 3 100 x 2 1 All variables 0 Similarly, sensitivity analysis can be executed manually. } Reduced Cost } As x 2 and x 3 are in the basis, their reduced costs are 0. } Reduced cost of x 1 is equal to 4 (10-6). } Shadow Price } If the RHS of the first constraint is increased by 1, new optimal solution of x3 would be 101 instead of 100. } new z value would be 1011. } If we use the definition: 1011-1001 = 10 is the shadow price of the first constraint. } The shadow price of the second constraint is 1.

Utilizing Lindo Output MAX 6 X1 + X2 + 10 X3 SUBJECT TO 2) X1 + X3 <= 100 3) X2 <= 1 END LP OPTIMUM FOUND AT STEP 2 OBJECTIVE FUNCTION VALUE 1) 1001.000 NOTICE: The objective function which is regarded as Row 0 in Simplex is accepted as Row 1 in Lindo. Therefore the first constraint of the model is always second row in Lindo!!! VARIABLE VALUE REDUCED COST X1 0.000000 4.000000 X2 1.000000 0.000000 X3 100.000000 0.000000 ROW SLACK OR SURPLUS DUAL PRICES 2) 0.000000 10.000000 3) 0.000000 1.000000

Utilizing Lindo Output RANGES IN WHICH THE BASIS IS UNCHANGED: OBJ COEFFICIENT RANGES VARIABLE CURRENT ALLOWABLE ALLOWABLE COEF INCREASE DECREASE X1 6.000000 4.000000 INFINITY X2 1.000000 INFINITY 1.000000 X3 10.000000 INFINITY 4.000000 RIGHTHAND SIDE RANGES ROW CURRENT ALLOWABLE ALLOWABLE RHS INCREASE DECREASE 2 100.000000 INFINITY 100.000000 3 1.000000 INFINITY 1.000000

Utilizing Lindo Output } Lindo output reveals the reduced costs of x 1, x 2, and x 3 as 4, 0, and 0 respectively. } In the maximization problems, the reduced cost of a nonbasic variable can also be read from the allowable increase value of that variable at obj. coefficient ranges. Here, the corresponding value of x 1 is 4. } In the minimization problems, the reduced cost of a nonbasic variable can also be read from the allowable decrease value of that variable at obj. coefficient ranges.

Utilizing Lindo Output } The same Lindo output reveals the shadow prices of the constraints in the "dual price" section. } The shadow price of the first constraint (Row 2) equals 10. } The shadow price of the second constraint (Row 3) equals 1.

Some Important Equations } If the change in the RHS of the constraint leaves the current basis optimal (within the allowable RHS range), the following equations can be used to calculate new objective function value: } for maximization problems new obj. fn. value = old obj. fn. value + (new RHS old RHS) shadow price } for minimization problems new obj. fn. value = old obj. fn. value (new RHS old RHS) shadow price

Some Important Equations } For Lindo example, as the allowable increases in RHS ranges are infinity for each constraint, we can increase RHS of them as much as we want. But according to allowable decreases, RHS of the first constraint can be decreased by 100 and that of second constraint by 1. } Lets assume that new RHS value of the first constraint is 60. As the change is within allowable range, we can use the first equation (max. problem): z new = 1001 + ( 60-100 ) 10 = 601

Sensitivity Anlysis using Lindo Example!Dakota Furniture!x1, x2, x3 production amounts of desk, table, chair. Weekly profit: $z Max 60x1+ 30x2 + 20x3 st LUMBER) 8x1 + 6x2 + x3 <= 48 FINISH) 4x1 + 2x2 + 1.5x3 <= 20 CARPNT) 2x1 + 1.5x2 + 0.5x3 <= 8 DEMAND) x2 <= 5 END 37

LP OPTIMUM FOUND AT STEP 2 OBJECTIVE FUNCTION VALUE 1) 280.0000 VARIABLE VALUE REDUCED COST X1 2.000000 0.000000 X2 0.000000 5.000000 X3 8.000000 0.000000 ROW SLACK OR SURPLUS DUAL PRICES LUMBER) 24.000000 0.000000 FINISH) 0.000000 10.000000 CARPNT) 0.000000 10.000000 DEMAND) 5.000000 0.000000 NO. ITERATIONS= 2 RANGES IN WHICH THE BASIS IS UNCHANGED: 38 OBJ COEFFICIENT RANGES VARIABLE CURRENT ALLOWABLE ALLOWABLE COEF INCREASE DECREASE X1 60.000000 20.000000 4.000000 X2 30.000000 5.000000 INFINITY X3 20.000000 2.500000 5.000000 RIGHTHAND SIDE RANGES ROW CURRENT ALLOWABLE ALLOWABLE RHS INCREASE DECREASE LUMBER 48.000000 INFINITY 24.000000 FINISH 20.000000 4.000000 4.000000 CARPNT 8.000000 2.000000 1.333333 DEMAND 5.000000 INFINITY 5.000000

Examples } What will be maximum total profit (Z) if the unit profit of the desk (x1) increases to 70? } What will be maximum total profit (Z) if the unit profit of the table (x2) decreases to 25? } What will be maximum total profit (Z) if the unit profit of the chair (x3) decreases to 10? } What will be maximum total profit (Z) if available lumber is equal to 30? } What will be maximum total profit (Z) if available finishing hours is equal to 22? } What will be maximum total profit (Z) if available carpentary hours s equal to 6? 39

Tomorrow } Topics: } Software to solve LPs and other mathematical programs. } Lindo } Excel Solver } QM for windows } Download them from the link: } http://web.itu.edu.tr/~topcuil/ya/yonyaz.htm } Bring your laptops!