Sei sulla pagina 1di 21

BBM 501

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.

History of Linear Programming


History of linear programming dates back from 1940s. Main motivation for the need of linear programming goes back to the war time when it was necessary to solve many complex planning problems. The Simplex method which is used to solve linear programming was developed by George B. Dantzig, in 1947. Applications can be found in many different industries such as airline scheduling, shipping of telecommunication networks, oil refining and blending, stock and bond portfolio selection 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.

SOLUTION TO LINEAR PROGRAMMING PROBLEMS


Having formulated a linear programming problem, we have to find the solution for the same. To find the solution to a linear programming model, we have the graphical and the algebraic methods that can be applied successfully. If the problem involves only two decision variables, graphical method of solution is quite adequate. Even when three decision variables are involved, a graphical solution can be resorted to. But this involves three-dimensional representation. Therefore we can conveniently restrict the graphical method to problems involving two decision variables. The second method is the algebraic procedure or simplex method, which involves an iterative procedure. This can be applied to linear programming problems involving two or more variables. This is the most versatile method of solving linear programming models. In this method, an initial solution is assumed and this solution is modified progressively through a well-defined iterative process until we get the optimal solution. The procedure is simple and so mechanical that it requires time and patience to execute it manually. However, an electronic computer with the readymade programmes can be used as a handy tool for solving LP problems involving many variables.

LP Solutions: Four Cases


When an LP is solved, one of the following four cases will occur: 1. The LP has a unique optimal solution. 2. The LP has alternative (multiple) optimal solutions. It has more than one (actually an infinite number of) optimal solutions

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.

GRAPHICAL SOLUTION TO LPP


We all know that a point can be represented by two co-ordinates namely and x and y in a graph. From the origin we have to go x units along x axis and y units along yaxis. If we plot two points in a graph and join them we get a segment of a straight line. A minimum of two points is needed to a draw a straight line. In a linear programming problem, the objective function and constraints are linear, so that we can plot the straight lines representing constraints and the objectives function. The graphic solution procedure consists of the following steps: STEP 1: Consider all the constraints. Taking the equality relationship, plot all the straight lines in a graph and get feasible solution space satisfying the inequality. Usually we get a bounded solution space. STEP 2: Assign an arbitrary value for the objective function. Plot the straight line to represent the objective function, with the arbitrary value for Z. STEP 3: Move the objective line parallel in the appropriate direction in the solution space to maximize and in the opposite direction to minimize the objective function under consideration. STEP 4: In this process, the moving objective line may meet an extreme point (or corner point) beyond which we cannot proceed as this violates the constraints. Note the co-ordinates of this extreme point, which will give maximum or minimum value of the objective function.

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?

Calculating the corner points


(0,8) (7,0) (3,4)* * 16x + 12y > 96 20x + 20y >140 x=3 y=4

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

LINEAR PROGRAMMING SIMPLEX APPROACH


The simplex method is an algebraic procedure involving a well-defined iterative process, which leads progressively to an optimal solution in a few numbers of finite steps. Essentially the simplex algorithm starts at one vertex of the feasible region and moves (at each iteration) to another (adjacent vertex),improving (or leaving unchanged) the objective function as it does so, until it reaches the vertex corresponding to the optimal LP solution. Revised simplex algorithm sometimes known as the "product form of the inverse" simplex algorithm) forms the basis of most modern computer packages for solving LP's.

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.

Slack: Excess of availability of resource over its usage.

Decisions of simplex method


Optimality Test Entering Variable Rule Leaving Variable Rule

Simplex Approach - Steps


1. Determine the objective function (also known as the maximization equation) 2. Write all necessary constraints (inequalities) 3. Convert each constraint into an equation by adding slack variables 4. Set up the initial simplex tableau (matrix) 5. Locate the most negative integer 6. Find the pivot 7. Transform the tableau (matrix) so that the pivot becomes 1 and all other numbers in the column become 0 8. If no indicators are negative, go to step 9. If there are negative indicators, go back to step 5 9. The maximum value of the function is the number in the lower right corner of the final tableau

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

X1 + 2X2 < 100 units of flour X1 + 2X2 + X3 = 100

(Add slack variable X3)

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

Using the Pivot

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.

Big M Approach - Steps


Modify the constraints so that the RHS of each constraint is non-negative. Convert each inequality constraint to standard form. Add an artificial variable ai to the constraints identified as > or = constraints at the end of Step 1. Also add the sign restriction ai > 0.

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.

Big M Approach Illustration


Bevco manufactures an orange flavored soft drink called Oranj by combining orange soda and orange juice. Each ounce of orange soda contains 0.5 oz of sugar and 1 mg of vitamin C. Each ounce of orange juice contains 0.25 oz of sugar and 3 mg of vitamin C. It costs Bevco 2 to produce an ounce of orange soda and 3 to produce an ounce of orange juice. Marketing department has decided that each 10 oz bottle of Oranj must contain at least 20 mg of vitamin C and at most 4 oz of sugar. Use LP to determine how Bevco can meet marketing dept.s requirements at minimum cost.

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 Theorem


Associated with LPP(Max. or Min.) , there exists another LPP based upon the same data & having the same solution. Original Problem: Primal Problem. Associated Problem: Dual Problem. LLP must be first put in standard form before solving by the Simplex method. Since all Primal-Dual computations are obtained directly from the simplex table, we define the dual that may be constituent with the standard form of the primal. NOTE: Either of the two LPPs can be treated as primal and the other as its dual.

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

Formulation: The dual problem is: Minimize

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

Some Important Points:


In the dual, there are as many (decision) variables as there are constraints in the primal.We usually say yi is the dual variable associated with the ith constraint of the primal. There are as many constraints in the dual as there are variables in the primal. If the primal is maximization then the dual is minimization and all constraints are and vice versa. In the primal, all variables are 0 while in the dual all the variables are unrestricted in sign. The objective function coefficients cj of the primal are the RHS constants of the dual constraints. The RHS constants bi of the primal constraints are the objective function coefficients of the dual. The coefficient matrix of the constraints of the dual is the transpose of the coefficient matrix of the constraints of the primal.

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

The dual of the LPP is Minimize

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

Linear Programming Applications


The Diet Problem Find the cheapest combination of foods that will satisfy all your nutritional requirements. Portfolio Optimization Minimize the risk in your investment portfolio subject to achieving a certain return. Many investment companies are now using optimization and linear programming extensively to decide how to allocate assets. Crew scheduling An airline has to assign crews to its flights. Make sure that each flight is covered. Meet regulations, eg, each pilot can only fly a certain amount each day. Minimize costs, eg: accommodation for crews staying overnight out of town, crews deadheading. Would like a robust schedule. Telecommunications Call routing: How should the calls be routed through the telephone network? Network design: If we need to build extra capacity, which links should we concentrate on? Should we build new switching stations? Internet traffic: For example, there was a great deal of construction of new networks for carrying internet traffic a few years ago.

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.

Potrebbero piacerti anche