Linear programming

advertisement
Chapter 2
Linear Programming
By
1
Mohammad Shahid Khan
M.Eco, MBA, B.Cs, B.Ed.
Lecturer in Economics & Business Administration
Department of Economics
Kardan Institute of Higher Education, Kabul
Introduction to Linear Programming:
 Linear Programming is a mathematical technique that seeks to
maximize or minimize a linear function, subject to a set of linear
constraints.
 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).
2
Introduction to Linear Programming:
 The linear model consists of the following components:



A set of decision variables.
An objective function.
A set of constraints.
Min C=3x + 4y
Subject to
3
5x + 8y  24 ,
x0,
y0
Terminology:
 Decision variables: e.g., x and y.
 In general, there are quantities you can control to improve your
objective which should completely describe the set of decisions to be
made.
 Objective Function. The Objective Function is a linear function of
variables which is to be optimized i.e., maximized or
minimized. e.g., profit function, cost function etc. The
objective function may be expressed as a linear expression.
e.g., Min C=3x + 4y
 Constraints: e.g., 5x + 8y  24 , x  0 , y  0
4
 Limitations on the values of the decision variables.
Feasible Solution: A set of values of the variables x1, x2, x3,….,xn
which satisfy all the constraints is called the feasible solution of the
LPP.
Optimal Solution. A feasible solution that makes the value of
the objective function an optimum (maximum or minimum) is
called an optimal solution.
Steps in Linear Programming:
1.
Identifying the problem:
The first step in Linear Programming is to identify the problem and it
causes. problem may be vague, find appropriate objective of the
problem.
 Identify the decision variables and assign symbols x and y to them.
These decision variables are those quantities whose values we wish
to determine.
 Identify the set of constraints and express them as linear equations
in terms of the decision variables. These constraints are the given
conditions.
Steps in Linear Programming:
2.
Construct a (math) model and data acquisition.
Find model appropriate for objective.
Identify the objective function and express it as a linear function of
decision variables. It might take the form of maximizing profit or
production or minimizing cost.
3.
Deriving a solution (optimal or good enough solution)
using the substitution or graphical or simultaneous equation methods
to solve the constraints equations to find the feasible solutions for the
decision variables of the model.
Steps in Linear Programming:
4.
Test the model and the solution:
check the function value for the various feasible solutions and find the
optimum value which satisfies the objective of the function.
5.
Implementation of the solution:
The last step is to practically implement the solution to the problem for
which the model was constructed and optimal value of the decision
variable is derived.
Advantages of Linear Programming
i. The linear programming technique helps to make the best possible
use of available productive resources (such as time, labour,
machines etc.)
Limitations of Linear Programming
(a). Linear programming is applicable only to problems where the
constraints and objective function are linear i.e., where they can be
expressed as equations which represent straight lines. In real life
situations, when constraints or objective functions are not linear, this
technique cannot be used.
(b). Factors such as uncertainty, weather conditions etc. are not taken
into consideration.
Graphical Analysis of Linear Programming
 In the graphical technique, each inequality constraint is graphed as an equality
constraint.
 The Feasible Region is determined from the points where constraints intersect
each other. The Feasible Solution Space is the area which satisfies all of the
inequality constraints.
 The Optimal Feasible Solution occurs along the boundary of the Feasible Solution
Space, at the extreme points or corner points.
Note:
The feasible region will be Left to the Feasible Region Curve when constraints include
< sign
The Feasible region will be Right to the Feasible Region Curve if the constraints include
> sign
10
GRAPHICAL
Corner Points
A, B, and C
X2
A
Feasible
Region OABC
O
B
C
X1
GRAPHICAL
Corner Points
A, B, and C
X2
A
B
Feasible
Region OABC
O
C
X1
Example: Graphical Solution
Consider the product mix problem
Maximize
5 x1  4 x2
subject to
3x1  2 x2  60
1x1  2 x2  40
x1  0, x2  0
We obtain x1 *  10, x2 *  15. The optimal value of the objective function
is VOF ( x*)  5(10)  4(15)  110.
Graphical Solution:
Practice to
Formulate the
Objective Function
and Constraints
Example 1: Product Mix
The Regal China Company produces two products daily plates and mugs. The
company has limited amounts of two resources used in the production of these
products clay and labor. Given these limited resources, the company desires to know
how many plates and Mugs to produce each day, in order to Maximize profit. The two
products have the following resource requirements for production and profit per item
produced (i.e., the model parameters).
Product
Plate
Mug
Labor
(hours/unit)
1
2
Clay
(lbs./unit)
4
3
Profit
(Rs./unit)
4
5
There are 40 hours of labour and 120 pounds of clay available each day for
production.
The objective of the company is to Maximize total profit.
The company's profit is the sum of the individual profits gained from each plate
and mug. As such, profits from plates is determine by multiplying the unit profit
for each plate, 4, by the number of plates produced, X1. Likewise, profit derived
from mugs is the unit profit of a mug, 5, multiplied by the number of mugs
produced, X2.
Thus, total profit, Z, can be expressed mathematically as
Maximize Z = 4X1 + 5X2
where
Z = total profit per day
4X1 = profit from plates ;
5X2 = profit from mugs
By placing the term Maximize in front of the profit function, the relationship
expresses the objective of the firm to Maximize total profit.
Model Constraints
This problem has two resources used for production, which are limited,
labor and clay. Production of plates and mugs require both labor and
clay.
For each plate produce, one hour of labor is required. Therefore, the labor
used for the production of plates is 1X1 hours. Similarly, each mug requires
two hours of labor; the labor used for the production of mugs is 2X2 hours.
Thus, the labor used by the company is the sum of the individual amounts
of labor used for each product.
1X1 + 2X2
However, the amount of labor represented "1X1 + 2X2" is limited to 40 hrs
per day, thus, the complete labor constraint is
1X1 + 2X2 < 40 hours
Constraints……. continued
The constraint for clay is formulated in the same way as the labor
constraint. Since each plate requires four pounds of clay, the amount of
clay used daily for the production of plates is 4X1 pounds, and since each
mug requires three pounds of clay, the amount of clay used for mugs daily
is 3X2. Given that amount of clay available for production each day is 120
pounds, the material constraint can be formulated as
4X1 + 3X2 < 120 pounds
A final restriction is that the number of plates and mugs produced be either
zero or a positive value, since it would be impossible to produce negative
items. These restrictions are referred to as nonnegative constraints and are
expressed mathematically as
X1 > 0, X2 > 0
The complete linear programming model for this problem can
now be summarized as
Maximize Z = 4X1 + 5X2
Subject to
1X1 + 2X2 < 40
4X1 + 3X2 < 120
X1, X2 > 0
Example. A Product Mix Problem
 A firm produces two different products P1 and P2. Every unit of P1
uses 3 units of resource(R1) and 1 unit of resource(R2) and earns a
profit of 5 Afs. Similarly every unit of P2 uses 2 units of resources (R1)
and 2 units of resource (R2) and earns a profit of 4 Afs. Resources R1
and R2 are available in quantities as 60, 40 respectively. The firm
wants to determine how many of the two products must be
manufactured each week in order to maximize profit subject to
resource availability.
Product Mix Problem…continued
 A firm produces two different products P1 and P2.
Every unit of P1 uses 3 units of resource(R1) and 1 unit of
resource(R2) and earns a profit of 5 Afs.
Similarly every unit of P2 uses 2 units of resources (R1) and 2 units of
resource (R2) and earns a profit of 4 Afs.
Resources R1 and R2 are available in quantities as 60, 40
respectively.
The firm wants to determine how many of the two products must be
manufactured each week in order to maximize profit subject to
resource availability.
Product Mix Problem….. continued
R1
R2
Unit Profit
Product1 P1
(per unit)
Product2 P2
(per unit)
Available
Resource
3
1
5
2
2
4
60
40
Let xi (i  1,2) represent the weekly production of Pi . Profit P is given by
P  5 x1  4 x2 .
The available resources constrain the values of x1 and x2 , i.e.,
3x1  2 x2  60
1x1  2 x2  40
60
Since xi is output, then x1  0 and x2  0.
The problem is formally stated as follows:
Maximize
5 x1  4 x2
subject to
3x1  2 x2  60
1x1  2 x2  40
x1  0, x2  0
Example. A Nutrition Aid Problem
 A Nutrition Aid Program is considering two food supplements
S1 and S2 for distribution among a population deficient in
nutrients N1, N2, and N3.
 Each unit of S1 provides 4 units of N1, 8 units of N2, 5 units of
N3, and costs $6. Similarly each unit of S2 provides 12 units
of N1, 4 units of N2, 5 units of N3, and costs $4.
 The minimum daily requirement per person of N1, N2, N3 are
96, 112 and 100 respectively.
 The problem is to determine the daily quantities of the food
supplements for each person that meet the minimum daily
requirements and entail the least cost.
Table 3.1. Dietary and Price Data
S1
(Per Unit)
S2
(Per Unit)
N1
4
12
Minimum Daily
Requirement
(Per Person)
96
N2
8
4
112
N3
5
5
100
Price
6
4
To formulate this problem mathematically, let x i (i = 1,2)
denote the quantity of Si (i = 1,2) needed per person per day.
The cost C (assuming no discounts) is given by
C = 6x1 + 4x 2 .
To satisfy the.minimum.daily requirements, we must have
4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100.
Finally, the quantities x i must not be negative, i.e.,
x1 >0, x 2  0.
The problem is expressed formally as follows:
Minimize
6x1 + 4x 2
subject to
4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100
and
x1 >0, x 2  0.
Example 5 Marketing
The Bata Shoe Company has contracted with an advertising firm to determine the types and amount
of advertising it should have for its stores. The three types of advertising available are radio and
television commercials and newspaper ads. The retail store desires to know the number of each type
of advertisement it should purchase in order to Maximize exposure. It is estimated that each ad and
commercial will reach the following potential audience
and cost the following amount.
Type of Advertisement
Exposure
(people/ad or commercial)
Cost
Television commercial
20, 000
Rs. 15, 000
Radio commercial
12, 000
8, 000
Newspaper ad
9, 000
4, 000
The following resource constraints exist:
1. There is a budget limit of Rs. 100,000 available for advertising.
2. The television station has enough time available for four commercials.
3. The radio station has enough time available for ten radio commercials.
4. The newspaper has enough space available for seven ads.
5. The advertising agency has time and staff to produce at most a total of fifteen commercials ads.
Decision Variables
This model consists of three decision variables representing the number of each type of advertising
produced:
X1 = the number of television commercials
X2 = the number of radio commercials
X3 = the number of newspaper ads
The Objective Function
The objective of this problem is different from the objectives in the previous examples in which only
profit was Maximized (or cost minimized). In this problem profit is not Maximized, but rather the
audience exposure is Maximized.
This objective function demonstrates that although a linear programming model must either Maximize
or Minimize some objective, the objective itself can be in terms of any type of activity or valuation.
For this problem the objective of audience exposure is determined by summing the audience
exposure gained from each type of advertising
Maximize Z = 20, 000 X1 + 12, 000 X2 + 9, 000 X3
Where
Z = the total number of audience exposures
20, 000 X1 = the estimated number of exposures from television commercials
12, 000 X2 = the estimated number of exposures from radio commercials
9, 000 X3 = the estimated number of exposures from newspaper ads
Model Constraints
The first constraint in this model reflects the limited budget of Rs. 100, 000 allocated for
advertisement,
15, 000 X1 + 6, 000 X2 + 4, 000 X3 < 100, 000
where
15, 000 X1 = the amount spent for television advertising
6, 000 X2 = the amount spent for radio advertising
4, 000 X3 = the amount spent for newspaper advertising
The next three constraints represent the fact that television and radio commercials are limited to four
and ten, respectively, while newspaper ads are limited to seven.
X1 < 4 (TV commercials)
X2 < 10 (Radio commercials)
X3 < 7 (Newspaper ads)
The final constraint specifies that the total number of commercials and ads cannot exceed fifteen
due to the limitations of the advertising firm:
X1 + X2 + X3 < 15 commercials and ads
The complete linear programming model for this problem is
summarized as
Maximize Z = 20, 000 X1 + 12, 000 X2 + 9, 000 X3
Subject to
15, 000 X1 + 6, 000 X2 + 4, 000 X3 < Rs. 100, 000
X1 < 4
X2 < 10
X3 < 7
X1 + X2 + X3 < 15
X1, X2, X3 > 0
Question Practice:
 A Steel Mills produces two types of steel (g1, g2). The g1 type of steel
requires 2 hours for melting (m), 4 hours for rolling (r) and 10 hours
for cutting (c). While g2 type of steel requires 5 hours for m, 1 hour for
r and 5 for c. The firm has 40 hours for m, 20 hours for r and 60 hours
for c. The firm expects to yield the profit of 24Afs from g1 and 8Afs
from g2. Find the quantities of g1 and g2 where firm’s profits are
maximized.
Max π = 24g1 + 8g2
Constraints
2 g 1  5 g 2  40
4 g 1  g 2  20
10g 1  5 g 2  60
Answer: g1=4,
g2=4,
π=128
Questions for Practice……. continued
 A n agriculturalist wants to produce a fertilizer in such a way that it has
15 units of potash, 120 units of nitrate and 24 units of phosphate. The
first brand (X1) provides 3 units of potash, 1 unit of nitrate and 3 units
of phosphate. The other brand (X2) provides 1 unit of potash, 5 units of
nitrate and 2 units of phosphate. The first brand (X1) costs 120Afs and
the second brand (X2) costs 60Afs. How the agriculturalist costs can be
minimized.
Min C = 120X1 + 60X2
Constraints
3 X 1  X 2  15
X 1  5 X 2  20
3 X 1  2 X 2  24
Answer: X1=2,
X2=9,
C=780
Download