Download presentation
Presentation is loading. Please wait.
Published byNela Němcová Modified over 5 years ago
1
TBF 122 - General Mathematics - II Lecture – 9 : Linear Programming
Prof. Dr. Halil İbrahim Karakaş Başkent University
2
Linear programming is a mathematical process that has been developed to help managers and administrators in decision making. We will explain this topic by several examples. The idea of linear programming has begun by Russian mathematician L. W. Kantarovich in 1939 when he solved a manufacturing problem. In his article “The best use of economic resources”, Kantarovich discusses several “optimization” techniques. That article was written in 1942 and published in Wassily Leontief also developed some linear programming techniques that have applications in economics. In 1947, Dantzig also invented the simplex method that for the first time efficiently tackled the linear programming problem in most cases. In the present lecture, we will discuss very simple (two variables) linear programming problems and their solutions using an intuitive geometric approach. In the forthcoming lectures we will consider linear programming problems in several variables using algebraic approach (simplex method). We will see that insight gained from geometric approach will help us understand the algebraic approach.
3
Maximum labor-hours available
Linear Programming in two variables. Let us construct the mathematical model of the following problem. Problem(Production Scheduling). A manufacturer of leather garments makes jackets and vests. Each leather jacket requires 2 labor-hours from the cutting department and 4 labor-hours from sewing department. Each leather vest requires 1 labor-hour from the cutting department and 3 labor-hours from sewing department. The maximum labor-hours available per day in the cutting department and the sewing department are 16 and 36, respectively. If the manufacturer makes a profit of 120 TL on each jacket and 70 TL on each vest, assuming that all jackets and vests produced will be sold, how many jackets and how many vests should be manufactured each day to maximize the total daily profit? It will be useful to summarize the data of the problem in a table: Labor-hours needed Jacket Vest Maximum labor-hours available Cutting Department 16 Sewing Department 36 Profit per product 120 TL TL
4
Maximum labor-hours available
Labor-hours needed Jacket Vest Maximum labor-hours available Cutting Department 16 Sewing Department 36 Profit per product 120 TL TL Let us assume that the number of jackets produced per day is x and the number of vests produced per day is y (assigning variables). Profit: Cutting: Sewing: Taking into consideration the fact that x and y can’t be negative, the following system of inequalities should be satisfied. The problem is to find the solution of the above system of linear inequalities at which the linear function P(x,y)=120x+70y attains its maximum value and also to find that maximum value. This kind of problems are called linear programming problems.
5
Nonnegative Constraints
Every linear programming problem has the following components(constituents). A function to be maximized (or minimized) Objective function Desicion Variables A system of linear inequalities Problem Constraints Nonnegative Constraints
6
The mathematical model of a linear programming problem is expressed mostly in the following format:
Maximize subject to The aim in solving a linear programming problem is to determine the maximum (or the minimum) value of the objective function subject to the problem const-raints and nonnegative constraints. That value is called the optimal value. In our sample problem, the optimal value is the maximum value of the objective function. Therefore, the expression begins with “Maximize..”. In problems requiring the minimum value of the objective function, the mathematical model begins with “Minimize..”. We will have examples of minimization problems, too.
7
As for our sample problem, a linear programming problem in two variables is solved by investigating the maximum (or minimum) value of the objective function on the solution region of the system of linear inequalities given by the constraints of the problem. That solution region is also called the feasible region of the problem. The method of solving a problem by using the feasible region is called the geometric method. Geometric Solution. By our discussions in the previous lecture about the maxi-mum and minimum values of linear functions on solution regions of systems of linear inequalities, we have Teorem. If the optimal value of the objective function of a linear programming problem exists, then that value must occur at one (or more) corner points of the feasible region of the problem. Teorem. a) If the feasible region of a linear programming problem is bounded, then both the maximum value and the minimum value of the objective function always exist. b) If the feasible region of a linear programming problem is unbounded and the coefficients of the objective function are all positive, the minimum value of the objective function exists, but the maximum value does not.
8
Optimal value Feasible Region Corner P(x,y) (0,0) (0,12) 840 (6,4)
(0,12) 840 (6,4) 1000 (8,0) 960 Optimal value Since the feasible region is bounded, optimal solution exists and occurs at a corner point. Thus the manufacturer should produce 6 jackets and 4 vests each day for maximum profit. Maximum daily profit is TL .
9
To solve a linear programming problem in two variables by geometric method one can follow the steps below: Step 1 . Make a table of data (this step may be omitted if the problem is clear). Step 2 . Construct the mathematical model: a) Assign the decision variables and express the objective function. b) Express the problem constraints as inequalities or equalities. c) Express the nonnegative constraints Step 3 . Graph the feasible region and decide whether an optimal solution exists or not (use the above theorems). If an optimal solution exists, find the coordinates of the corner points of the feasible region. Step 4 . Find the value of the objective function at each corner point and make a table listing them. Step 5 . Determine the optimal solution(s) from the table in Step 4. Step 6 . For an applied problem, interpret the optimal solution and answer the questions in the original problem.
10
An example of a minimization problem.
Problem. 36 tons of potatoes will be transported to a trade center from three different producers. Transportation of 1 ton of potato costs 40 TL from the first producer, 30 TL from the second and 10 TL from the third. The transporter has each day at most 120 minutes to load 36 tons of potatoes to the vheicles. Loading a ton of potatoes takes 1 minute for the first producer, 4 minutes for the second and 3 minutes for the third. The first producer can give at most 30 tons, the second producer can give at most 24 tons and the third producer can give at most 18 tons of potatoes. How much potatoes should be taken from each producer so that the daily transportation cost will be minimum? What is the minimum daily cost? Solution. Data table First Second Third Total Time 1 4 3 120 capacity 30 24 18 36 Cost 40 TL 30 TL 10 Although there seems to be thre variables at the first sight, the problem can be modeled as linear programming problem in two variables. Let x tons of potatoes be loded each day from the first producer and y tons from the second producer. Then 36 – (x + y) tons of potatoes will be loaded from the third producer. Thus the daily transportation cost is
11
Solution. Data table First Second Third Total Time 1 4 3 120 capacity 30 24 18 36 Cost 40 TL 30 TL 10 Although there seems to be three variables at the first sight, the problem can be modeled as a linear programming problem in two variables. Let x tons of potatoes be loded each day from the first producer and y tons from the second producer. Then 36 – (x + y) tons of potatoes will be loaded from the third producer. Thus the daily transportation cost is As for the problem constraints, we have and .
12
Taking into consideration the nonnegative constraints
and The mathematical model of the problem is obtained as: Minimize subject to Next slide
13
Corner C(x,y) (18,0) 900 (30,0) 1260 (30,6) 1380 (12,24) 1200 (6,24)
(0,0) x y (6,24) (12,24) (2,16) Corner C(x,y) (30,6) (18,0) 900 (30,0) 1260 (30,6) 1380 (18,0) (30,0) (12,24) 1200 (6,24) 1020 (2,16) 740 We see from the table that the objective function takes its minimum value at (2,16). The minimum value is 740. Thus the minimum daily transportation cost is minimum if the amount of potoes taken from the first, second and the third producer are 2, 16 and18 tons, respectively. The minimum cost is 740 TL .
14
Problem(Production Scheduling)
Problem(Production Scheduling). An electronics company manufactures desk-top and lap-top computers. The production of a desk-top computer requires a capital expenditure of 300 TL and 30 hours of labor; a lap-top computer requires a capital expenditure of 600 TL and 40 hours of labor. The company has TL capital and 4200 hours of labor available for production of desk-top and lap-top computers. The company expects that all computers it produces will have customers; each desk-top computer contributes a profit of 150 TL and each lap-top computer contributes a profit of 250 TL. How many computers of each type should the company produce to maximize its profit? What is the maximum profit? . Data table Desk-top Lap-top Source available Capital 300 600 48000 Labor 30 40 4200 Profit 150 TL 250 TL
15
Desk-top Lap-top Source available Capital 300 600 48000 Labor 30 40 4200 Profit 150 TL 250 TL Let x be the number of desk-top computers produced, y the number of lap-tops (assigning variables). Profit: Capital: Labor: With the nonnegative constraints, the mathematical model is obtained as follows: Maximize P(x,y) = 150x + 250y subject to
16
Optimal solution Feasible Region Corner P(x,y) (0,0) (0,80) 20000
(0,80) 20000 (100,30) 22500 (140,0) 21000 Optimal solution Since the feasible region is bounded, optimal solution exists and it occurs at corner points. To maximize its profit, the company should produce 100 desk-top and ve 30 lap-top com-puters. Maximum profit is TL .
17
Problem. A plant has two benches and two types of product, called A and B, are produced there. Both benches are used for the production of both products. If the first bench is run only for the production of A, in one day it can do the work necessary for 40 units of A ; if that bench is run only for the production of B, in one day it can do the work necessary for 60 units of B. Similarly, if the second bench is run only for A, in one day it can do the work necessary for 50 units of A; if it is run only for B, in one day it can do the work necessary for 50 units of B. Each unit of A contributes a profit of 20 TL and each unit of B contributes a profit of 40 TL. Assuming that all the products will be sold, how many units of A and B should be produced to maximize the profit? Let x1 units of A and x2 units of B be produced. Then the mathematical model of the problem can be obtained as follows: To get the problem constraints, note for instance that if the first bench is run only for A the whole day, the work of 40 units of A is done, therefore the time needed for the work of x1 units of A is (1/40)x1 day. The same bench needs (1/60) x2 day to do the work of x2 units of B. Thus Maximize subject to
18
x2 x1 (20,30) (0,60 (0,50) (0,0) (40,0) (50,0) FEASIBLE REGION CORNER
P (0,0) (40,0) 800 (20,30) 1600 (0,50) 2000 (0,0) (40,0) (50,0) x1 We see from the table above that maximum profit occurs when x1=0 and x2 = 50. Therefore, to maximize the profit, only 50 units of B should be produced. Maximum profit isr TL.
19
Example. Maximize and minimize subject to 2x1+x2 = 20 x1+x2 = 12
Corner C(x1,x2) (0,0) (0,10) 300 (3,9) 330 (8,4) 280 (10,0) 200
20
Example. Maximize and minimize subject to
21
Preparaion for Simplex Method.
Let us consider the mathematical model of the problem of “production scheduling” in the beginning by substituting x1 for x, x2 for y : Maximize subject to By adding new variables to the left hand side of the problem constraints, we obtain the following system of linear equations: Decision variables
22
Decision variables Slack variables If 3 jackets (x1 = 3), and 4 vests (x2 = 4) are produced a day, in cutting department, =10 hours of labor is used, 6 hours of labor is not used (s1 = 6). Similarly, in sewing department, = 24 labor hour is used, 12 labor hour is not used (s2 = 12). If the decision variables x1 and x2 satisfy the problem constraints and nonnegative constraints, then the slack variables can not be negative. It follows that the optimal solution of the linear programming problem is among the solutions of the system of linear equations obtained by adding slack variables to the problem constraints such that x1, x2, s1, s2 ≥ 0. Given a system of linear equations with the number of equations less than the number of variables, we choose variables as many as the number of equations in the system and call them the basic variables, and call the remaining variables the nonbasic variables In a system of linear equations as above, the solutions obtained by substituting zero for nonbasic variables and solving for the basic variables are called basic solutions.
23
Example. For the system choose x1 and x2 as basic variables. Then s1 and s2 are nonbasic. Setting s1 = 0 and s2 = 0, we obtain which leads to the basic solution below All basic solutions obtained in this way will be shown on a table.
24
Basic variables basic solution x x s s2 x1 , x2 x1 , s1 x1 , s2 x2 , s1 x2 , s2 s1 , s2 For each basic solution we see that the pair (x1 , x2 ) gives the coordinates of the point of intersection of two of the lines corresponding to two of the constraints of the problem. This will be demonstrated in the next slide:
25
x1 x2 s1 s2 (x1 , x2) (6,4) (9,0) (8,0) (0,12) (0,16) (0,0) 8 0 0 4
Basic variables basic solution x x s s2 (x1 , x2) Intersecting lines (6,4) (9,0) (8,0) (0,12) (0,16) (0,0) x1 , x2 x1 , s1 x1 , s2 x2 , s1 x2 , s2 s1 , s2
26
When we consider the basic solutions and the corresponding pairs (x1,x2) together with the feasible region of the problem (you see below, the table of basic solutions and the feasible region of the problem of production scheduling side by side), we notice that if all components of a basic solution are nonnegative, then (x1,x2 ) gives coordinates of a corner point of the feasible region. Conversely, each corner point of the feasible region corresponds to a basic solution all components of which are nonnegative. This correspondence is one to one. If a basic solution has negative components, then (x1,x2) is formed by the coordinates of a point outside the feasible region. Basic Solutions x x s s2 (x1 , x2) 6 4 (6,4) 9 -2 (9,0) 8 (8,0) 12 (0,12) 16 -12 (0,16) 36 (0,0)
27
Basic Solutions x x s s2 (x1 , x2) 6 4 (6,4) 8 (8,0) 9 -2 (9,0) 16 -12 (0,16) 12 (0,12) 36 (0,0) A basic solution is called a feasible basic solution if it contains no negative component. If a basic solution has negative components, then it is called a nonfeasible basic solution. Feasible basic solutions correspond to the corner points of the feasible region. The theorem about the solutions of linear programming problems (Corner Point Theorem) can be stated now as: Theorem. If a linear programming problem has an optimal solution, it occurs among the basic feasible solutions.
28
Example. Maximize subject to x1+3x2 = 30 2x1+x2 = 20 x1+x2 = 12
Basic variables x1 x2 s1 s2 s3 x1, x2, s1 3 9 5 x1, x2, s2 6 8 -2 x1, x2, s3 4 10 x1, s1, s2 30 -40 -18 x1, s1, s3 12 -4 18 x1, s2, s3 2 20 x2, s1, s2 x2, s1 , s3 -6 x2, s2 ,s3 -8 -30 s1, s2, s3
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.