For the Love of Linear Programming
Total Page:16
File Type:pdf, Size:1020Kb
A presentation in the field of mathematics known as Linear Programming Mari M. Peddycoart Professor of Mathematics Lone Star College – Kingwood [email protected] Linear programming is a case of mathematical The problem of solving a system of linear programming inequalities dates back at least as far as Fourier A technique for optimizing a linear function, subject Leonid Kantorovich developed the earliest linear to linear equality and linear inequality constraints programming problems in 1939 for use during The expression to be maximized or minimized is World War II to plan expenditures and returns in called the objective function order to reduce costs to the army and increase losses to the enemy. A Little Bit of History The inequalities are the constraints which specify a feasible region over which the objective function is The method was kept secret until 1947 when to be optimized George B. Dantzig published the simplex method Non-negative inequalities ensure that variables are John von Neumann established the theory of duality positive that same year The Nobel prize in economics was awarded in Many practical problems in operations research 1975 to the mathematician Leonid Kantorovich can be modeled as linear programming problems (USSR) and the economist Tjalling Koopmans Linear programming inspired many of the central (USA) for their contributions to the theory of concepts of optimization theory optimal allocation of resources It is used in microeconomics and company The problems were first shown to be solvable in management, such as planning, production, polynomial time by Leonid Khachiyan in 1979 What is it used for? transportation, technology and other issues A larger theoretical and practical breakthrough in Modern management issues are ever-changing, the field came in 1984 when Narendra Karmarkar but most companies want to maximize profits or introduced a new interior-point method minimize costs with limited resources 1 Cell Phone Cover Manufacturing – The Percival Phone Protector Company makes two types of cell phone covers. It produces an essential cover (EC) that sells for a $25 profit and an essential deluxe cover (EDC) that sells for a $40 profit. On the manufacturing line the EC requires 2 hours and the EDC takes 3 hours. The finishing area spends 1 hour on the EC and 2 hours on the EDC. Both Maximization of Profit covers require 1 hour for testing and packing. On a particular production run, the Percival Company has at An Example most 900 work hours on the manufacturing line, 550 work hours in the finishing area, and 400 work hours in the testing and packing area. How many phone covers of each type should be produced to maximize profit? What is the maximum profit? Cell Phone Cover Manufacturing – The Percival Phone Protector Company makes two types of cell phone covers. It produces an essential cover (EC) that sells for a $25 Cover profit and an essential deluxe cover (EDC) that sells for a Type $40 profit. On the manufacturing line the EC requires 2 Profit Testing and Testing Finishing Packing hours and the EDC takes 3 hours. The finishing area Manufacturing spends 1 hour on the EC and 2 hours on the EDC. Both Essential cover (EC) x 2 1 1 $25 covers require 1 hour for testing and packing. On a 1 particular production run, the Percival Company has at Essential deluxe most 900 work hours on the manufacturing line, 550 work cover 3 2 1 $40 x hours in the finishing area, and 400 work hours in the (EDC) 2 testing and packing area. How many phone covers of each type should be produced to maximize profit? What is the Total ≤ 900 ≤ 550 ≤ 400 maximum profit? 2 Maximize P = 25x1 + 40x2 2x12 + 3x ≤ 900 subject to : x1 + 2x2 ≤ 550 x +x≤ 400 1 2 Solving the Problem x12, x ≥0 Method 1 – Graphically This is termed A Standard Maximization Problem in Standard Form The linear inequalities and non-negative Start by constraints are graphed on the x-y axis; graph the graphing and line and then shade the region that gives a true shading statement the The intersection of the shaded regions define the non- negative feasible region constraints This feasible region can be termed as bounded (the region can be enclosed in a circle) or unbounded If the feasible region is bounded then both a maximum and a minimum value exist 3 2x12 + 3x ≤ 900 x12 + 2x ≤ 550 450,0 , 0,300 550,0 , 0,275 Graph Graph each of each of the the constraints constraints using the x using the x and y and y intercepts intercepts and shade and shade x + x ≤ 400 12 The 400,0 , 0,400 feasible region is the intersection of the Graph shaded each of regions the constraints The corner using the x points are and y the points of intercepts intersection and shade of the boundary lines of the feasible region 4 The feasible region is The Fundamental Theorem of Linear programming the states; if the optimal value exists then that value intersection must occur at one or more of the corner points of of the shaded the feasible region regions There are two additional possibilities for the The corner existence of an optimal solution points are First, if there is no feasible region the optimal value the points of intersection does not exist of the Second, if the feasible region is unbounded there is boundary no maximum value but the minimum value exists or lines of the feasible vice versa but this depends on the coefficients of region the objective function Corner Points P = 25x12 + 40x (0, 0) 0 (0, 275) 11,000 (150, 200) 11,750 (300, 100) 11,500 Solving the Problem (450, 0) 11,250 Method 2 – The Simplex Method Therefore, the maximum profit is $11,750 when 150 essential covers and 200 essential deluxe covers are produced 5 The Simplex Method as mentioned previously was First you introduce slack variables to change the developed by George Dantzig in 1947 linear inequalities to equations The simplex method is an algorithmic process The number of slacks is equal to the number of (algebraic) of solving a linear programming problem constraints The simplex method is used on a standard linear programming problem in standard form The fundamental theorem of linear programming 2x1 + 3x21 +s = 900 states that if the optimal value exists, then the value must occur at one or more of the basic feasible x1 + 2x 2 + s 2 = 550 solutions x + x +s = 400 To start the simplex method 1 2 3 Second you set the objective function to zero Keep in mind the previous slide… maintaining a positive P Form the initial Simplex Tableau To do this move everything from the right side to s s s P the left side in the objective function 1 2 3 2 3 1 0 0 0 900 2x1 + 3x 2 +s 1 = 900 1 2 0 1 0 0 550 x1 1 1 0 0 1 0 400 x12 + 2x + s2 = 550 -25 -40 0 0 0 1 0 x1 + x 2 + s 3 = 400 x2 Notice the negative numbers in the bottom row, -25x12-40x + P = 0 this tells us we are not at the maximum value 6 Now we must perform a pivot Basic variables – column is a single 1 and zeros The pivot element is the intersection of the pivot and the value is found by “grabbing” the 1 and column (the most negative from bottom row) with shooting to the far right the pivot row (the smallest quotient of the number Non-basic variables – column is random numbers on the right divided by the pivot column element) and the value is always zero A pivot consists of making the pivot element a 1 As pivoting is performed a basic variable will and everything above and below the 1 a zero become non-basic and vice versa; this is referred This process is repeated until there are no to as entering and exiting variables negatives in the bottom row Keep in mind… you will never get a negative on Very important, you can never pivot on a negative the right and your maximum P value will never go or zero down P = 0at x12 = 0 x = 0 2 3 1 0 0 0 900 ← s s s P 2 3 1 0 0 0 900 1 2 3 20 1/2 1 0 1/2 0 0 275 -3 1 -1 1 2 0 1 0 0 550 2 1 1 0 0 1 0 400 ← 1 1 0 0 1 0 400 x1 -25 -40 0 0 0 1 0 ← -25 -40 0 0 0 1 0 -32 -3 0 -32 0 0 -825 -12 -1 0 -12 0 0 -275 x2 So the pivot element is the 2; so make it a 1 20 40 0 20 0 0 11000 and everything above and below the 1 a zero 7 P =11000at x12 = 0 x = 275 1/2 0 1 -3/2 0 0 75 2 5 1 0 2 -3 0 0 150 -1 2 1/2 1 0 1/2 0 0 275 1/2 1 0 1/2 0 0 275 1/2 0 0 -1/2 1 0 125 1/2 0 0 -1/2 1 0 125 -5 0 0 20 0 1 11000 -5 0 0 20 0 1 11000 -12 0 -1 32 0 0 -75 We are not finished as there is still a negative in 5 0 10 -15 0 0 750 the bottom row so find the next pivot element So the pivot element is the 1/2 1 0 2 -3 0 0 150 s1 s2 s3 P 0 1 -1 2 0 0 200 ← 0 0 -1 1 1 0 50 ← x1 0 0 10 5 0 1 11750 ← The simplex method is complete x Therefore, the maximum profit is $11,750 when 2 150 essential covers and 200 essential deluxe covers are produced 8 Today linear programming is taught in universities, There are numerous areas where operations most business schools, industrial engineering research has been applied; for example, optimal departments, and operations research departments, depreciation strategies; communication network as well as some mathematics departments design; computer network design; water resource As increasingly more complex problems involving project selection; bidding models for offshore oil more variables are attempted, the number of leases; classroom size mix to meet student Today and Future necessary operations expanded exponentially and demand; electric utility fuel management; air- exceeded the computational capacity of even the traffic-control simulations; optimal strategies in most powerful computers sports, and many others Today most linear programming work is nonlinear based programming, which is beyond the scope of this discussion In real life situations, when constraints or objective functions are not linear, the simplex method cannot be used Factors such as uncertainty, weather conditions, human issues, etc.