Linear Programming 3.1 INTRODUCTION Linear programming (LP) is a quantitative method for solving problems concerning resource allocation. This study is about managing the resources – how the management should allocate the resources efficiently so that maximum benefits can be obtained from the limited resources available. Examples of resources are raw materials, employees, labor hours, machine hours, financial budgets, etc. Since the resources are limited, the management must utilize and allocate them efficiently so that the firm could obtain maximum profit. 3.2 REQUIREMENTS OF A LINEAR PROGRAMMING PROBLEM The linear programming problems have four important properties in common. 1. All Linear Programming problems in practice seek to maximize or to minimize certain quantity, usually profit or cost. We refer to this property as the objective function of a Linear Programming problem. 54 CHAPTER 3
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Linear Programming
3.1 INTRODUCTION
Linear programming (LP) is a quantitative method for solving problems concerning
resource allocation. This study is about managing the resources – how the management
should allocate the resources efficiently so that maximum benefits can be obtained from
the limited resources available. Examples of resources are raw materials, employees,
labor hours, machine hours, financial budgets, etc. Since the resources are limited, the
management must utilize and allocate them efficiently so that the firm could obtain
maximum profit.
3.2 REQUIREMENTS OF A LINEAR PROGRAMMING PROBLEM
The linear programming problems have four important properties in common.
1. All Linear Programming problems in practice seek to maximize or to minimize
certain quantity, usually profit or cost. We refer to this property as the objective
function of a Linear Programming problem.
2. All problems have certain restrictions, or constraints that limit the degree to
which we can achieve our objective. Therefore, we want to maximize or minimize
the objective function, subject to some limited resources available (constraints).
3. There must be some alternative courses of action to choose from in the
solution. If there is no alternative solution to choose from, then we would not
need LP.
4. The objective and constraints in Linear Programming problems must be
expressed in terms of linear equations or inequalities. The linear mathematical
54
CHAPTER
3CHAPTER
3
relationship requires all terms used in the objective functions and the constraints
involved to be of the first degree.
3.3 FORMULATING LINEAR PROGRAMMING PROBLEMS
Three components of Linear Programming are the variables, objective and constraints.
The variables are continuous, controllable, and non-negative. X1 represents the first
variable, X2 represents the second variable, and so on; X1, X 2, …X n… > 0.
The objective of the Linear Programming problem is a mathematical representation of
the goals in terms of a measurable objective such as the amount of profit, cost, revenue,
or quantity. It must be in a linear function and is represented by one of these two forms:
i) Maximize C1X1 + C 2X 2 +….. + C nX n,
or ii) Minimize C 1X 1 + C 2X 2 +….. + C nX n.
The constraints are a set of mathematical expressions representing the restrictions
imposed on the controllable variables and thereby limiting the possible values of those
variables. The mathematical expressions of the constraints can be given either as linear
equations (=) or as linear inequalities (<, >, >, <).
A linear programming model will be structured to find the values of controllable
variables that maximize or minimize a defined linear objective function, subject to a set
of defined linear constraints and subject to the non-negativity restrictions.
Example 3.1 The owner of a small company that manufactures clocks must decide how many clocks
of each type to produce daily in order to maximize profit. The company manufactures
two types of clocks, that is regular clocks and alarm clocks. The resources required to
produce the clocks are labor and processing machine. The limited resources available
every day are as follows:
Labor hours = 1,600 hours
Machine hours = 1,800 hours
55
The requirement for resources for each type of clocks is as follows:
To produce one unit of regular clock requires 2 hours of labor, and 6 hours of machine
time. While to produce one unit of alarm clock requires 4 hours of labor, and 2 hours of
machine time. The profit for each unit of regular clock sold is RM 3.00, while the profit
for each unit of alarm clock sold is RM 8.00. Determine how many units of each type of
clock should be manufactured every day so that the profit is maximum?
Solution:
First of all we need to define the decision variables involved:
Let X1 = number of regular clocks to manufacture per day,
Let X2 = number of alarm clocks to manufacture per day.
Now we should construct a table to present the total resources available, the required
resources for each clock, and the profit obtained if each unit of the respective clocks is
sold.
Refer to Table 3.1. The manager must now determine the values of X1 and X2.
Table 3.1: The resources, the requirements, and the profitsResourcesrequired
X1
(regular clock)X2
(alarm clock)Total resources
available
Labor hours 2 4 1600
Machine hours 6 2 1800
Profit per unit 3 8
The objective function is to maximize the profit: Maximize profit 3X1 + 8X2
Subject to the constraints: Labor hours constraint : 2X1 + 4X2 < 1600
Machine hours constraint : 6X1 + 2X2 < 1800
non-negativity conditions : X1 > 0, X2 > 0.
56
This is a two-variable Linear Programming problem. The manager’s job is to determine
how many regular clocks (X1) and how many alarm clocks (X2) to produce in order to
maximize the profit. We can solve this problem using a graphical method.
Example 3.2
A manufacturer produces two types of cotton cloth: Denim and Corduroy. Corduroy is a
heavier grade cotton cloth and, as such, requires 3.5kg of raw cotton per meter whereas
Denim requires 2.5kg of raw cotton per meter. A meter of Corduroy requires 3.2 hours of
processing time, and a meter of Denim requires 3 hours. Although the demand for Denim
is practically unlimited, the maximum demand for Corduroy is 510 meters per month.
The manufacturer has 3250kg of cotton and 3000 hours of processing time available each
month. The manufacturer makes a profit of RM4.50 per meter from Denim and RM6 per
meter from Corduroy. The manufacturer wants to know how many meters of each type of
cloth to produce to maximize profit.
(a) Formulate a linear programming model for the above problem.
Solution:
Let X1 be the quantity of denim cloth type to be produced
Let X2 be the quantity of corduroy cloth type to be produced
Resources required
X1
(Denim)X2
(Corduroy)Total resources
available
Cotton cloth 2.5 3.5 3250
Processing time 3.0 3.2 3000
Profit 4.5 6.0
Maximize Profit = 4.50X1 + 6.00X2
Subject to constraints:
2.5X1 + 3.5X2 < 3250 (cotton cloth constraint)
3.0X1 + 3.2X2 < 3000 (processing time constraint)
X1 > 0
57
0 < X2 < 510
(the production of courdroy should not exceed the maximum demand of 510 meters)
Example 3.3
A non-profit organization is raising fund for AIDS victims. They plan to sell two types of
soft drinks namely cherry fizz and lemon pop. They decided to set up a soft drink stall in
Kuala Lumpur. The resources required to produce the drinks are ingredient A and B.
To produce one batch of cherry fizz requires 5 liters of ingredient A and 5 liters of
ingredient B, while to make one batch of lemon pop requires 3 liters of ingredient A and
11 liters of ingredient B. There are 30 liters of ingredient A and 55 liters of ingredient B
available for use. Due to some marketing strategy, the organization has decided not to
produce more than 4 batches of lemon pop at any one time.
Profit is made at RM 3 for each batch of cherry fizz and RM 4 for each batch of lemon
pop. How many batches of each type should be produced every time so that the profit is
maximum?
Solution:
Define the decision variables:
Let X1 = number of batches of cherry fizz to produce,
and X2 = number of batches of lemon pop to produce.
Resources required Cherry fizz(X1)
Lemon pop(X2)
ResourcesAvailable
Ingredient A 5 3 30
Ingredient B 5 11 55
Profit 3 4
From the table we can write the mathematical inequalities as follows:
Constraints :
5X1 + 3X2 < 30;
58
5X1 + 11X1 < 55;
X1 > 0,
X2 < 4 (not more than 4 batches of lemon pop to be produced)
Objective function :
The total profit made is 3X1 + 4X2, and this is to be maximized
Thus, the linear programming model may be written as:
Maximize 3X1 + 4X2
subject to:
5X1 + 3X2 < 30;
5X1+ 11X2 < 55;
X2 < 4;
X1 > 0.
3.4 GRAPHICAL SOLUTION TO A LINEAR PROGRAMMING PROBLEM
If a linear programming problem involves only two decision variables (X1 and X2), the
solution may be found using the graphical technique. In practice, this technique is not
commonly employed since most LP problems involve more than two variables. However,
the technique is illustrated using the problem in Examples 3.1.
In the graphical solution method, what you need to do is:
a) Obtain the linear equation for each constraint in the problem
b) Plot the linear equations of the constraints on the graph
c) Determine the feasible region based on the inequalities in (a)
d) Obtain the feasible solution points based on the feasible region in (c)
e) Obtain an optimal solution for the problem by applying each feasible solution point
into the objective function.
59
3.4.1 THE FEASIBLE REGION AND CORNER POINTS METHOD
Example 3.4
Consider the problem in Example 3.1.
Find the optimal solution to the problem by using the graphical method.
The objective is to maximize the profit:
Maximize 3x1 + 8x2.
Subject to:
The Constraints:
labor hours : 2x1 + 4x2 < 1600 -----(1)
machine hours : 6x1 + 2x2 < 1800 -----(2)
non-negativity conditions : x1, x2 > 0.
Solution:
Firstly, plot all linear equations of the constraints on the graph. Secondly, shade the area
covered by the respective inequality (, etc) of the constraints. Thirdly, determine the
feasible region, that is the common region which belongs to the inequalities. The feasible
region is the common area or the area that overlapps all constraints.
Find all coordinates (X1 and X2) that fall in the feasible region. The coordinates that fall
in the feasible region are the feasible solutions for the problem at hand. Solve all
intersections between constraints and also determine their coordinates.
Finally, input each coordinate of the feasible solution into the objective function and
determine its value.
For the maximization objective function, the optimal solution occurs at the feasible
solution that yields the maximum value.
And for the minimization objective function, the optimal solution occurs at the feasible
solution that yields the minimum value.
60
Applying to Example 3.4.
The first thing to do is to draw both equations (Equation 1 and Equation 2) on the same
graph. In order to draw any equation, we need to obtain at least two coordinates from the
respective equation.
Constraint Equation (1)
2X1 + 4X2 = 1600
Let X2 = 0, then we have 2X1 + 4(0) = 1600 ↔ 2X1 = 1600 or X1 = 800
Then (800, 0) will be the first coordinate on the graph.
Let X1 = 0, then we have 2(0) + 4X2 = 1600 ↔ 4X2 = 1600 or X2 = 400
Then (0, 400) will be the second coordinate on the graph. Now, you can draw
the linear equation 2X1 + 4X2 = 1600 by connecting the two coordinates.
Constraint Equation (2)
6X1 + 2X2 = 1800
Let X2 = 0, then we have 6X1 + 2(0) = 1800 ↔ 6X1 = 1800 or X1 = 300
Then (300, 0) will be the first coordinate on the graph.
Let X1 = 0, then we have 6(0) + 2X2 = 1800 ↔ hence 2X2 = 1800 or X2 = 900
Then (0, 900) will be the second coordinate on the graph. Now, you can draw
the linear equation 6X1 + 2X2 = 1800 by connecting the two coordinates.
X2
(0,900) 900
(0,400) 400
61
(300,0) (800,0)0 X1
Once we have plotted the two constraints, we will find the two equations intercept with
one another. In this case, we have to solve the two equations simultaneously to determine
the coordinate where the two equations intercept.
How to estimate the coordinate of interceptions between the two equations:
The equation of constraints:
Machine Hours : 6X1 + 2X2 = 1800
Labor Hours : 2X1 + 4X2 = 1600
Non negativity conditions : X1 > 0, X2 > 0
Divide the second equation (labor hours) by 2, we have:
1/2 [2X1 + 4X2 = 1600] » X1 + 2X2 = 800
Machine Hours : 6X1 + 2X2 = 1800 ----(1)
Labor Hours : X1 + 2X2 = 800 ----(2)
Subtract the two equations (1) – (2), we obtain:
6X1 + 2X2 = 1800 ----(1)
(-) X1 + 2X2 = 800 ----(2)
5X1 = 1000
Therefore X1 = 200
Then, substitute X1 = 200 into equation (2):
200 + 2X2 = 800
2X2 = 800 – 200
2X2 = 600
Therefore X2 = 300
62
So the interception point beween the two equations occurs at (200, 300)
Figure 3.1: Feasible Region as defined by all constraints for Example 3.4
X2
(0,900)
900
(0,400) 400
(200,300)
(0,0) (300,0) (800,0)0 X1
300 800
From Figure 3.1, the feasible solutions are (0, 400), (200, 300), and (300, 0).
For your information, the feasible solution only occurs at the coordinates in the feasible
region. The feasible region is the region covered by all constraints requirement in the
problem (in this case there are two constraints).
Applying the objective function Maximize 3X1 + 8X2 on the feasible solution,
we have:
At (0, 400) the profit is 3(0) + 8(400) = RM3,200 *
At (200, 300) the profit is 3(200) + 8(300) = RM3,000
At (300, 0) the profit is 3(300) + 8(0) = RM900
The objective of the above linear programming problem is to maximize the profit. The
maximum profit RM3,200 occurs at (0, 400). Hence, the company should decide to
63
produce X1 = 0 (regular clock) and X2 = 400 (alarm clock) in order to maximize the profit
based on the current constraints.
3.4.2 SOLVING THE MINIMIZATION PROBLEMS
Sometimes the problem is stated in terms of the cost of materials used in production
instead of the profit contribution for each product. In this case the objective function
should be changed to minimizing the cost.
Example 3.5
A firm produces 2 types of chemicals namely AA and BB. Chemical AA costs RM2 per
liter and chemical BB costs RM3 per liter to manufacture. Over the week, at least 6
liter of AA and 2 liter of BB must be produced. One of the raw materials needed to make
each chemical is in short supply and only 30gm are available. Each liter of AA requires
3gm of this material while each liter of BB requires 5gm. How many liters of AA and BB
should the firm produce in order to minimize the total cost?
Solution:
Define decision variables: Let x1 = number of liters of chemical AA to be produced Let x2 = number of liters of chemical BB to be produced
Define the objective function; Minimize total cost = 2x1+ 3x2
Define the constraints; x1 > 6 (at least 6 litres of AA should be produced) x2 > 2 (at least 2 litres of BB should be produced) 3x1+ 5x2 < 30;
Thus, the problem becomes: Minimize total cost = 2x1 + 3x2
Subject to constraints: x1 > 6 (at least 6 liters of x1 to be produced)
x2 > 2 (at least 2 liters of x2 to be produced)
64
3x1+ 5x2 < 30 (each x1 requires 3gm while each x2 requires 5gm and the
supply is limited to 30gm in total)
x1, x2 > 0 (the non-negativity constraints)
Again, we should plot the equation of constraints, obtain the feasible region, the feasible
solution points, and finally apply the objective function on the feasible solution points to
determine the optimal solution.
Figure 3.2: Feasible Region for Example 3.5
From the graph (Figure 3.3), the feasible solution points occur at
(6, 12/5), (6, 2), and (20/3, 2)
Applying the objective function 2X1 + 3X2, we have:
At (6, 12/5) : 2(6) + 3(12/5) = RM19.2
At (6, 2) : 2(6) + 3(2) = RM18.0 (minimum cost)
At (20/3, 2) : 2(20/3) + 3(2) = RM19.3
Hence the optimal solution occurs at X1 = 6, X2 = 2
x1 = number of liters of chemical X to be produced
x2 = number of liters of chemical Y to be produced
65
Example 3.6
AGM Super-Bike Company (ASC) has the latest product on the upscale toy market;
boys’, girls’ and toddlers’ bike in bright fashion colors, a strong padded frame, chrome-
plated chairs, brackets and valves, and a non-slip handle bar. Due to the best sellers
market for high quality toys, ASC is confident that it can sell all the bicycles produced, at
the following prices; boys’ bike at RM 420, girls’ bike at RM 350 and toddlers’ bike at
RM 150.
The company’s accountant has determined that direct labor costs will be 45% of the price
ASC receives from the boys’ model, 40% of the price ASC receives from the girls’ model
and 30% from the toddlers’ model. Production costs other than labor, but excluding
painting and packaging are RM 45 per boys’ bike, RM 35 per girls’ bike and RM 20 per
toddlers’ bike. Painting and packaging cost is RM 25 per bike regardless of the model.
ASC plant’s overall production capacity is 400 bicycles per day. However realizing that
the demand for boys’ bikes are more than girls’ bikes, the marketing manager insists that
ASC must produce not more than 200 units of girls’ bikes, and not more than 100 units of
toddlers’. Each boys’ bikes requires 3 labor hours, each girls’ bike requires 2.4 hours and
each toddlers’ bike requires 2 hours to complete. ASC currently employs 120 workers,
who work 8-hours per day. Assume the company does not retrench workers since the
company believes its stable work force is one of its biggest assets.
(a) Formulate the above Linear Programming problem.
Solution: First of all, we need to define the decision variables as follows:
Let:
X1 be the number of boys’ bikes produced per day.
X2 be the number of girls’ bikes produced per day.
66
X3 be the number of toddlers’ bikes produced per day.
Variables X1 X2 X3
Selling price (RM) 420 350 150
LaborCost
-189 -140 -45
Production Cost -45 -35 -20
PaintingCost
-25 -25 -25
Net Profit 161 150 60
Requirements Variables Resources
X1 X2 X3 X1 X2 X3 400X2 - X2 - 200
X3 - - X3 100
Labor 3.0 2.4 2.0 960 hours120 workers x 8 hours
Objective function is:
Maximize profit: 161X1 + 150X2 + 60X3
Subject to (constraints) :
X1 + X2 + X3 < 400 (capacity constraints)
X2 < 200 (production constraint for X2 girl’s bike)
Where,X1= number of units of Product 1 produced per weekX2= number of units of Product 2 produced per weekX3= number of units of Product 3 produced per weekS1= Slack variable for labor hours in Department AS2= Slack variable for labor hours in Department BS3= Slack variable for labor hours in Department C
i) Complete the optimal simplex table
ii) Determine the optimal production level and the maximum profit obtained.
iii) The firm is considering hiring an extra labor on a part time basis at a rate of RM3.50
per hour in Department C. What would be the daily profit obtained by the firm?
(Assume the firm operates 8 hours daily)
14. (OCT 2008)
a) A housing developer has purchased 20,000 m2 of land on which he is planning to
build two types of houses, detached and semi-detached within an overall budget of
RM3 million. A detached house costs RM60,000 to build and requires 650 m2 of land
and a semi-detached house costs RM40,000 to build and requires 300 m2 of land.
From past experience, the developer estimates the profits of a detached house and a
semi-detached house to be about RM9,000 and RM6,000 respectively.
i) Formulate a linear programming (LP) model for this problem.
ii) Write down the dual for this LP primal problem.
95
b) The following is the optimal simplex table for the linear programming problem
of a company manufacturing two products X1 and X2. S1 , S2 and S3 are the slack
variables of the three resources A, B and C respectively involved in the manufacturing
process.
Cj
Solution
Mix
40 30 0 0 0
QuantityX1 X2 S1 S2 S3
X2 0 1 3.33 0 -2.22 20
S2 0 0 -0.67 1 0.44 1
X1 1 0 -1.67 0 2.78 25
Zj
Cj- Zj
i) Complete the above simplex table
ii) State the optimal solution, including the total profit.
iii) Is it worthwhile to purchase additional units of resource A at a cost of RM35.00 per