Unit 2
Unit 2
Unit 2
LINEAR PROGRAMMING
TERM PAPER
LINEAR PROGRAMMING
Linear programming is a mathematical technique designed to aid managers in allocating scarce resources (such as labor, capital, or energy) among competing activities. It reflects, in the form of a model, the organization's attempt to achieve some objective (frequently, maximizing profit contribution, maximizing rate of return, minimizing cots) in view of limited or constrained resources (available capital or labor, service levels, available machine time, budgets). The linear programming technique can be said to have a linear objective function that is to be optimized (either maximized or minimized) subject to linear equality or inequality constraints and sign restrictions on the variables. The term linear describes the proportionate relationship of two or more variables. Thus, a given change in one variable will always cause a resulting proportional change in another variable. Some areas in which linear programming has been applied will be helpful in setting the climate for learning about this important technique. (i) A company produces agricultural fertilizers. It is interested in minimizing costs while meeting certain specified levels of nitrogen, phosphate, and potash by blending together a number of raw materials. (ii) An investor wants to maximize his or her rate of return by investing in stocks and bonds. The investor can set specific conditions that have to be met including availability of capital. (iii) A company wants the best possible advertising exposure among a number of national magazines, and radio and television commercials within its available capital requirements. (iv) An oil refinery blends several raw gasoline and additives to meet a car manufacturer's specifications while still maximizing its profits.
(v) A city wants to maximize the daytime use of recreational properties being proposed for purchase with a limited capital available This technique, called linear programming (L.P), is solved in a step-by-step manner called iterations. Each step of the procedure is an attempt to improve on the solution until the "best answer" is obtained or until it is shown that no feasible answer exists.The art and science of allocating scarce resources, decision making and maximization problems to the best possible effect is called optimization. It is a branch of computational science, its target is to find the best solution for a problem expressed in a numerical value, which can be economics, engineering, industrial, management, biological, physical etc.Linear programming is the most widely used technique from the major techniques for optimization. The techniques of optimization can be brought into sight when doing scheduling, decision making, resource allocations, industrial planning, profit maximization, etc.
Important Terms
Some of the important terms commonly used is linear programming are disclosed as follows: (i) Solution Any specification in the values for the decision variables (x1, x2, ,xn) is called a solution. (ii) Feasible solution Out of the total available solution a solution that also satisfies the nonnegativity restrictions of the linear programming problem is called a feasible solution. (iii) Infeasible solution A solution for which atleast one constraint is violated. (iii) Basic solution The variables which take zero values at any solution are detained as non-basic variables & remaining are known as-basic variables, often called basic. (iv) Basic feasible solution A feasible solution to a general linear programming problem which is also basic solution is called a basic feasible solution. (v) Optimal feasible solution Any basic feasible solution which optimizes (i.e.: maximize or minimizes) the objective function of a linear programming model is known as the optimal feasible solution to that linear programming model.
3. The LP is infeasible. It has no feasible solutions (The feasible region contains no points). 4. The LP is unbounded. In the feasible region there are points with arbitrarily large (in a max problem) objective function values.
Example - Bicycle Factories A small business makes 3-speed and 10-speed bicycles at two different factories. Factory A produces 16 3-speed and 20 10-speed bikes in one day while factory B produces 12 3-speed and 20 10-speed bikes daily. It costs $1000/day to operate factory A and $800/day to operate factory B. An order for 96 3-speed bikes and 140 10-speed bikes has just arrived. How many days should each factory be operated in order to fill this order at a minimum cost? What is the minimum cost?
Objective Function:
C = 1000x + 800y
i. ii. iii.
(0,8) 1000*0 + 800*8 = 6400 (7,0) 1000*7 + 800*0 = 7000 (3,4) 1000*3 + 800*4 = 6200
Important Terms
Augmented Solution: It is a solution for original decision variables as well as slack variables. Basic Feasible Solution: This is same as the augmented solution. Degrees of Freedom: D.o.f = no of variables - no of equations = no of non basic variables. Non Basic Variable Variables set to arbitrary (zero) value. Basic Variables: Variables used to solve the system of equations.
Example A baker is selling raisin bread and raisin cake and has 100 units of flour and 90 units of raisins. Raisin bread requires one unit of flour and 2 units of raisins while raisin cake requires 2 units of flour and 3.5 units of raisins. Bread will be sold for eighty-eight cents while cake will be sold for $1.90. X1 = Raisin bread X2 = Raisin cake X1 > 0 X2 > 0
2X1 + 3.5X2 < 90 units of raisins(Add slack variable X4) 2X1 + 3.5X2 + X4 =90 Maximize .88X1 + 1.9X2 Z .88X1 1.9X2 = 0
Big M Approach
If an LP has any > or = constraints, a starting bfs may not be readily apparent. When a bfs is not readily apparent, the Big M method or the two-phase simplex method may be used to solve the problem. The Big M method is a version of the Simplex Algorithm that first finds a bfs by adding "artificial" variables to the problem. The objective function of the original LP must, of course, be modified to ensure that the artificial variables are all equal to 0 at the conclusion of the simplex algorithm.
Let M denote a very large positive number. If the LP is a min problem, add (for each artificial variable) Mai to the objective function. If the LP is a max problem, add (for each artificial variable) -Mai to the objective function. All artificial variables must be eliminated from row 0 before beginning the simplex. Now solve the transformed problem by the simplex.
SOLUTION:
Let x1 and x2 be the quantity of ounces of orange soda and orange juice (respectively) in a bottle of Oranj. Min z = 2x1+3x2 s.t. 0.5 x1+ 0.25 x2 < 4 (sugar const.) x1+ 3 x2 > 20 x1+ x2 = 10 (vit. C const.) (10 oz in bottle)
x1,x2 > 0 1. Modify the constraints so that the RHS of each constraint is nonnegative The RHS of each constraint is non-negative 2. Convert each inequality constraint to standard form z 2 x1 3 x2 = 0 0.5 x1+ 0.25 x2 + s1 = 4 x1+ 3 x2 - e2 = 20 x1+ x2 = 10 3. Add ai to the constraints identified as > or = constants z 2 x1 3 x 2 = 0 0.5 x1+ 0.25 x2 + s1 = 4 x1+ 3 x2 - e2 + a2 = 20 x1+ x2 + a3 = 10 all variables are non-negative 4. Add Mai to the objective function (min problem) Min z = 2 x1 + 3 x2 + M a2 + M a3 Row 0 will change to z 2 x1 3 x2 M a2 M a3 = 0 5. Since each artificial variable are in our starting bfs, they must be eliminated from row 0 - Row 0 - Row 1 - Row 2 - Row 3
New Row 0 = Row 0 + M * Row 2 + M * Row 3 z + (2M2) x1 + (4M3) x2 M e2 = 30M New Row 0
z 1
0 0 0
x1 2M-2
0.5 1 1
x2 4M-3
0.25 3 1
s1 0
1 0 0
e2 -M
0 -1 0
a2 0
0 1 0
a3 0
0 0 1
RHS 30M
4 20 10
BV Z=30m
s 1=4 a2=20 a3=10
Ratio
16 20/3* 10
Linear Programming Duality Concept Formulation: Given the primal problem (in standard form) Maximize
z c1 x1 c2 x2 ... cn xn
a11 x1 a12 x2 ... a1n xn b1 a21 x1 a22 x2 ... a2 n xn b2 . . am1 x1 am 2 x2 ... amn xn bm x1 , x2 ,..., xn 0, b1 , b2 ,..., bm 0
Subject to
w b1 y1 b2 y2 ... bm ym
a11 y1 a21 y2 ... am1 ym c1 a12 y1 a22 y2 ... am 2 ym c2 . . a1n y1 a2 n y2 ... amn ym cn y1 , y2 ,..., yn unrestricted in sign
Subject to
THEOREMS
The dual of the dual is primal. Weak duality theorem: If x is a feasible soln. to primal and y is a feasible soln. to dual, then cxyb i.e. is maximum profit you could make is constrained by the value of your resources. Strong duality theorem: If x and y are feasible to primal and dual respectively and cx=yb then x and y are optimal to primal and dual respectively.
Fundamental theorem of duality: If the primal or dual has a finite optimum solnution then the other problem possesses a finite optimum soln. and the optimum values of the objective functions of the two problems are equal. Existence theorem: If either the primal or the dual problem has an unbounded objective function value then the other problem has no feasible solution. ILLUSTRATION Write the dual of the LPP
Maximize Subject to
z x1 x2
2 x1 x2 5 3x1 x2 6 x1 , x2 unrestricted in sign
w 5 y1 6 y2
2 y1 3 y2 1
Subject to
2 y1 3 y2 1 y1 y2 1 y1 y2 1 y1 , y2 unrestricted in sign
2 y1 3 y2 1
y1 y2 1
Travelling Salesman Problem Given a set of cities, find the shortest route that visits each city exactly once and returns to the home city. Largest problem solved to date has more than 24000 cities.