CH-2 Linear Programming
CH-2 Linear Programming
Linear Programming
2-1
Introduction
• Linear Programming is a mathematical modeling technique used
to determine a level of operational activity in order to achieve an
objective.
Steps in Application
1. Identify problem as solvable by linear programming.
2. Formulate a mathematical model of-the unstructured problem.
3. Solve the model.
4. Implementation
2-4
Model Components
Decision variables - mathematical symbols representing levels of
activity of a firm. Or mathematical symbols representing levels of activity of an
operation
Objective function - a linear mathematical relationship describing
an objective of the firm, in terms of decision variables - this function
is to be maximized or minimized.
a linear relationship reflecting the objective of an operation
most frequent objective of business firms is to maximize profit
most frequent objective of individual operational units (such as a
production or packaging department) is to minimize cost.
Model Components
Constraints – requirements or restrictions placed on the firm
by the operating environment, stated in linear relationships of
the decision variables.
a linear relationship representing a restriction on decision making
Parameters - numerical coefficients and constants used in
the objective function and constraints.
Summary of Model Formulation Steps
2-7
Characteristics of Linear
Programming Problems
A decision amongst alternative courses of action is required.
The decision is represented in the model by decision variables.
The problem encompasses a goal, expressed as an objective
function, that the decision maker wants to achieve.
Restrictions (represented by constraints) exist that limit the
extent of achievement of the objective.
The objective and constraints must be definable by linear
mathematical functional relationships.
2-8
Assumptions of linear programming model
2-9
Advantages of Linear Programming Model
2-10
Limitations of Linear Programming Model
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.
Factors such as uncertainty, and time are not taken
into consideration.
Parameters in the model are assumed to be constant but in real
life situations they are not constants.
Linear programming deals with only single objective , whereas
in
real life situations may have multiple and conflicting
objectives.
In solving a LPP there is no guarantee that we get an integer
value. In some cases of no of men/machine a non-integer value
2-11
LINEAR PROGRAMMING
Mathematical programming is used to find the best or optimal
solution to a problem that requires a decision or set of decisions
about how best to use a set of limited resources to achieve a state
goal of objectives.
Steps involved in mathematical programming
Conversion of stated problem into a mathematical model that
abstracts all the essential elements of the problem.
Exploration of different solutions of the problem.
Finding out the most suitable or optimum solution.
Linear programming requires that all the mathematical
functions in the model be linear functions.
THE LINEAR PROGRAMMING MODEL (1)
Let X1, X2, X3, ………, XN = decision variables
Z = objective function or linear function
Requirement: maximization/Minimization of the linear function
Z.
Z = c1x1 + c2x2 + c3x3 + ………+ cnxn …..Eq (1)
Subject to the following constraints:
……EQ2
LINEAR PROGRAMMING
The linear programming model can be written in more efficient
notation as:
…..Eq (3)
A blending problem
The total amount of raw material available per day for both products is
15751b. The total storage space for all products is 1500 ft2, and a maximum of
7 hours per day can be used for production.
LINEAR PROGRAMMING
Example problem
All products manufactured are shipped out of the storage area at the end of the day.
Therefore, the two products must share the total raw material, storage space, and
production time. The company wants to determine how many units of each product to
produce per day to maximize its total income.
Solution
• The company has decided that it wants to maximize its sale income, which depends
on the number of units of product I and II that it produces.
• Therefore, the decision variables, x1 and x2 can be the number of units of products i and ii,
respectively, produced per day.
CONT…..LINEAR PROGRAMMING
The objective is to maximize the equation:
Z = 13x1+11x2
Subject to the constraints on storage space, raw materials, and production time.
Each unit of product i requires 4 ft2 of storage space and each unit of product ii
requires 5 ft2. Thus a total of 4x1 + 5x2 ft2 of storage space is
Needed each day. This space must be less than or equal to the available
storage space, which is 1500 ft2. Therefore,
4x1 + 5x2 ≤ 1500
Similarly, each unit of product I and II produced requires 5 and 3 1bs, respectively,
of raw material. Hence a total of 5xl + 3x2 ib of raw material is used.
CONT….LINEAR PROGRAMMING
This must be less than or equal to the total amount of raw material available, which
is 1575 Lb. Therefore,
5x1 + 3x2 ≤ 1575
Product I can be produced at the rate of 60 units per hour. Therefore, it must take I
minute or 1/60 of an hour to produce I unit. Similarly, it requires 1/30 of an hour
to produce 1 unit of product II. Hence a total of x1/60 + x2/30 hours is required for
the daily production. This quantity
Must be less than or equal to the total production time available each day.
Therefore,
X1 / 60 + X2 / 30 ≤7
Or X1 + 2X2 ≤420
Finally, the company cannot produce a negative quantity of any product, therefore
x1 and x2 must each be greater than or equal to zero.
LINEAR PROGRAMMING
The linear programming model for this example can be
summarized as:
…..Eq (4)
LP Model Formulation
A Maximization Example (1 of
4)
Product mix problem - Beaver Creek Pottery Company
How many bowls and mugs should be produced to maximize
profits given labor and materials constraints?
Product resource requirements and unit profit:
Resource Requirements
Mug 2 3 50
2-24
LP Model Formulation
A Maximization Example (2 of
4)
2-25
LP Model Formulation
A Maximization Example (3 of
4)
Resource 40 hrs of labor per day
Availability 120 lbs of clay
:
x1 = number of bowls
Decision
Variables: x
to2 =produce
numberper
ofday
mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Where Z = profit per day
Function:
1x1 + 2x2 40 hours of labor
Resource 4x1 + 3x2 120 pounds of
Constraints clay
Non-Negativity x1
:
Constraints: 0; x2 0
2-26
LP Model Formulation
A Maximization Example (4 of
4)
Complete Linear Programming Model:
2-27
Feasible Solutions
Example: x1 = 5 bowls
x2 = 10 mugs
Z = $40x1 +
Labor constraint
$50xcheck:
= $700 1(5) + 2(10) = 25 < 40 hours
2
Clay constraint check: 4(5) + 3(10) = 70 < 120
pounds
2-28
Infeasible Solutions
Example: x1 = 10 bowls
x2 = 20
mugs
Z = $40x1 +
Labor constraint
$50xcheck:
= 1(10) + 2(20) = 50 > 40
2
hours $1400
2-29
Graphical Solution of LP
Models
Graphical solution is limited to linear programming models
containing only two decision variables (can be used with three
variables but only with great difficulty).
Graphical methods provide visualization of how a solution for
a linear programming problem is obtained.
Graphical methods can be classified under two
categories:
1. Iso-Profit(Cost) Line Method
2. Extreme-point evaluation Method.
2-30
Limitation of of solving LPP
using Graphical Method
Graphical solution is limited to linear
programming models containing only two
decision variables.
Procedure of Graphical Method
Step I: Convert each inequality as equation [Formulate the linear
programming problem.]
Step II: Plot each equation on the graph [The coordinates of the
corner points can be obtained by either inspection or by solving the
two equations of the lines intersecting at that point.]
Step III: Shade the ‘Feasible Region’. Highlight the common Feasible region.
Feasible Region: Set of all possible solutions.
Step IV: Compute the coordinates of the corner points (of the feasible region). These corner
points will represent the ‘Feasible Solution’.
Feasible Solution: If it satisfies all the constraints and non negativity restrictions.
Step V: Substitute the coordinates of the corner points into the objective function to see
which gives the Optimal Value. That will be the ‘Optimal Solution’.
Optimal Solution: If it optimizes (maximizes or minimizes) the objective
function.
Unbounded Solution: If the value of the objective function can be increased or
X2 is mugs
120
x1, x2
X1 is0bowls
Figure 2.2 Coordinates for Graphical
Analysis 2-34
Labor Constraint
Graphical Solution of Maximization Model (2 of
12)
120
x1, x2
120
x1, x2
120
x1, x2
120
x1, x2
120
x1, x2
0
Figure 2.7 Feasible Solution
Area 2-39
Objective Function Solution = $800
Graphical Solution of Maximization Model (7 of
12)
120
x1, x2
120
x1, x2
120
x1, x2
120
x1, x2
120
x1, x2
120
x1, x2
0
Figure 2.13 Optimal Solution with Z = 70x1 + 20x2
2-45
Slack Variables
2-46
Linear Programming Model: Standard Form
0
Where:
x1 = number of bowls
x2 = number of mugs
s1, s2 are slack variables
Nitrogen Phosphate
Brand
(lb/bag)
Super-gro (lb/bag)
2 4
Crop-quick 4 3
2-48
LP Model Formulation – Minimization (2 of
8)
2-49
LP Model Formulation – Minimization (3 of
8)
Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick
2-54
Graphical Solutions – Minimization (8 of
8)
2-56
Multiple Optimal Solutions Beaver Creek Pottery
Fig
2-57
An Infeasible Problem
4
x2
6
Figure 2.21 Graph of an Infeasible Problem
x1, x2
2-58
An Unbounded Problem
2
x1, x2
Figure 2.22 Graph of an Unbounded Problem
0
2-59
Problem Statement
Example Problem N o. 1 (1 of
3)
■ Hot dog mixture in 1000-pound batches.
■ Two ingredients, chicken ($3/lb) and beef
($5/lb).
■ Recipe requirements:
at least 500 pounds of “chicken”
at least 200 pounds of “beef ”
■ Ratio of chicken to beef must be at least 2 to
1.
■ Determine optimal mixture of ingredients that
will minimize costs. 2-60
Solution
Example Problem N o. 1 (2 of
3)
Step 1:
Identify decision variables.
x1 = lb of
chicken in mixture x2 = lb
of
beef in mixture
Step 2:
Formulate the objective function.
Minimize Z = $3x1 + $5x2
where Z = cost per 1,000-lb 2-61
Solution
Example Problem N o. 1 (3 of
3)
Step 3:
Establish Model Constraints
x1 + x2 = 1,000 lb
x1 500
lb of chicken x2 200
x1/x
lb2 of 2/1
beefor x1 - 2x2
x1, x20
The Model: Minimize 0 Z = $3x1 + 5x2
subject to: x1 +
x2 = 1,000 lb
x1
50 2-62
Example Problem No. 2 (1 of
3)
Solve the following model
graphically:
Maximize Z = 4x1 + 5x2
subject to: x1 + 2x2
10
6x1 + 6x2
36
x1
4
x1, x2
0 2-63
Example Problem No. 2 (2 of
3)
36
x1
4
x1, x2
36
x1
4
x1, x2
0
Step 3 and 4: Determine the Figure 2.25 Optimal Solution Point
solution points and optimal 2-65
Graphical Sensitivity Analysis
Letting x1 and x2 represent the daily number of units of products 1 and 2, respectively, the
LP model is given as
Next Figure: illustrates the change in the optimum
Maximize Z = 30x1 + 20x2 solution when changes are made in the capacity of
machine 1. If the daily capacity is increased from 8 to
subject to: 2x1 + x2 ≤ 8 9 hrs, the new optimum will move to point G. The
x1 + 3x2 ≤ 8 rate of change in optimum z resulting from changing
machine 1 capacity from 8 to 9 hrs can be computed
x1, x2≥0 as:
The computed rate provides a direct link between the model input (resources) and its output
(total revenue). It says that a unit increase (decrease) in machine 1 capacity will increase
(decrease) revenue by $14.
Graphical Sensitivity Analysis
Letting x1 and x2 represent the daily number of units of products 1 and 2, respectively, the
LP model is given as
EXERCISE