You are on page 1of 69

CHAPTER TWO:

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.

• 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.
History of linear programming
• It started in 1947 when G. B. Dantzig designed the
“simplex method” for solving linear programming
formulations of U.S. Air Force planning problems.
• It soon became clear that a surprisingly wide range of
apparently unrelated problems in production
management could be stated in linear programming
terms and solved by the simplex method.
Linear Programming: Problem
Formulation
 Objectives of business decisions frequently involve maximizing profit or
minimizing costs.

 Linear programming uses linear algebraic relationships to represent a firm’s


decisions, given a business objective, & resource constraints

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

Step 1 : Clearly define the decision


variables

Step 2 : Construct the objective function

Step 3 : Formulate the constraints

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

 Proportionality - The rate of change (slope) of the objective


function and constraint equations is constant.
 Additivity - Terms in the objective function and constraint
equations must be additive.
 Divisibility -Decision variables can take on any fractional value
and are therefore continuous as opposed to integer in
nature.
 Certainty - Values of all the model parameters are assumed to
be known with certainty (non-probabilistic).

2-9
Advantages of Linear Programming Model

 It helps decision - makers to use their productive resource


effectively.
 The decision-making approach of the user becomes more
objective and less subjective.
 In a production process, bottle necks may occur. For example, in a
factory some machines may be in great demand while others may lie
idle for some time. A significant advantage of linear programming is
highlighting of such bottle necks.

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)

The decision variables, XI, X2, ..., XN, represent levels of n


competing activities.
EXAMPLES OF LP PROBLEMS
(1)
A product mix problem

A manufacturer has fixed amounts of different resources such


as raw material, labor, and equipment.
These resources can be combined to produce any one of several
different products.
The quantity of the ith resource required to produce one unit of the
jth product is known.
The decision maker wishes to produce the combination of
products that will maximize total income.
EXAMPLES OF LP PROBLEMS (2)

A blending problem

Blending problems refer to situations in which a number of


components (or commodities) are mixed together to yield one or
more products.
Typically, different commodities are to be purchased. Each
commodity has known characteristics and costs.
The problem is to determine how much of each commodity should
be purchased and blended with the rest so that the characteristics
of the mixture lie within specified bounds and the total cost is
minimized.
EXAMPLES OF LP PROBLEMS (3)

3. A production scheduling problem

A manufacturer knows that he must supply a given number of


items of a certain product each month for the next n months.
They can be produced either in regular time, subject to a
maximum each month, or in overtime. The cost of producing an
item during overtime is greater than during regular time. A
storage cost is associated with each item not sold at the end of
the month.
The problem is to determine the production schedule that
minimizes the sum of production and storage costs.
LINEAR PROGRAMMING MODEL
FORMULATION
The variety of situations to which linear programming has been
applied ranges from agriculture to zinc smelting.
Steps involved:

Determine the objective of the problem and describe it by a


criterion function in terms of the decision variables.
Find out the constraints.
Do the analysis which should lead to the selection of values for
the decision variables that optimize the criterion function while
satisfying all the constraints imposed on the problem.
LINEAR PROGRAMMING
Example: product mix problem
The N. Dustrious company produces two products: I and II. The raw material
requirements, space needed for storage, production rates, and selling prices for
these products are given in table 1.

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

Labor Clay Profit


Product
(Hr./Unit (Lb./Unit) ($/Unit)
)
Bowl 1 4 40

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:

Maximize Z = $40x1 + $50x2

subject to: 1x1 + 2x2 40


4x2 + 3x2
120
x1, x2 0

2-27
Feasible Solutions

A feasible solution does not violate any of the


constraints:

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

An infeasible solution violates at least one of


the constraints:

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

decreased indefinitely, Such solutions are called Unbounded solution.


 Inconsistent Solution: It means the solution of problem does not exist. This is

possible when there is no common feasible region.


Graphical method of solving a LPP
Step 1: Formulate the linear programming problem.
Step 2: Graph the feasible region and find the corner points.
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 3: Make a table listing the value of the objective function at each
corner point.
Step 4: Determine the optimal solution from the table in step 3. If the
problem is of maximization (minimization) type, the solution
corresponding to the largest (smallest) value of the objective function is
the optimal solution of the LPP.
Coordinate Axes
Graphical Solution of Maximization Model (1 of
12)

X2 is mugs

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

X1 is0bowls
Figure 2.2 Coordinates for Graphical
Analysis 2-34
Labor Constraint
Graphical Solution of Maximization Model (2 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.3 Graph of Labor Constraint


2-35
Labor Constraint Area
Graphical Solution of Maximization Model (3 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.4 Labor Constraint Area


2-36
Clay Constraint Area
Graphical Solution of Maximization Model (4 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.5 Clay Constraint Area


2-37
Both Constraints
Graphical Solution of Maximization Model (5 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.6 Graph of Both Model Constraints


2-38
Feasible Solution Area
Graphical Solution of Maximization Model (6 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0
Figure 2.7 Feasible Solution
Area 2-39
Objective Function Solution = $800
Graphical Solution of Maximization Model (7 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.8 Objection Function Line for Z = $800


2-40
Alternative Objective Function Solution Lines
Graphical Solution of Maximization Model (8 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.9 Alternative Objective Function Lines


2-41
Optimal Solution
Graphical Solution of Maximization Model (9 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.10 Identification of Optimal Solution Point


2-42
Optimal Solution Coordinates
Graphical Solution of Maximization Model (10 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.11 Optimal Solution Coordinates


2-43
Extreme (Corner) Point Solutions
Graphical Solution of Maximization Model (11 of
12)

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0 Figure 2.12 Solutions at All Corner


Points 2-
Optimal Solution for New Objective Function
Graphical Solution of Maximization Model (12 of
12)

Maximize Z = $70x1 + $20x2


subject to: 1x1 + 2x2
40
4x2 + 3x2

120
x1, x2

0
Figure 2.13 Optimal Solution with Z = 70x1 + 20x2
2-45
Slack Variables

 Standard form requires that all constraints be in the form


of equations (equalities).
 A slack variable is added to a constraint
(weak inequality) to convert it to an equation (=).
 A slack variable typically represents an unused
resource.
 A slack variable contributes nothing to the objective
function value.

2-46
Linear Programming Model: Standard Form

Max Z = 40x1 + 50x2 + s1 + s2


subject to:1x1 + 2x2 + s1 = 40
4x2 + 3x2 + s2 = 120
x1, x2, s1, s2

0
Where:
x1 = number of bowls
x2 = number of mugs
s1, s2 are slack variables

Figure 2.14 Solution Points A, B, and C with


2-47
LP Model Formulation – Minimization (1 of
8)
 Two brands of fertilizer available - Super-gro, Crop-quick.
 Field requires at least 16 pounds of nitrogen and 24 pounds of
phosphate.
 Super-gro costs $6 per bag, Crop-quick $3 per bag.
 Problem: How much of each brand to purchase to minimize total
cost of fertilizer given following data ?
Chemical Contribution

Nitrogen Phosphate
Brand
(lb/bag)
Super-gro (lb/bag)
2 4
Crop-quick 4 3

2-48
LP Model Formulation – Minimization (2 of
8)

Figure 2.15 Fertilizing


farmer’s field

2-49
LP Model Formulation – Minimization (3 of
8)
Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick

The Objective Function:


Minimize Z = $6x1 + 3x2
Where: $6x1 = cost of bags of Super-Gro
$3x2 = cost of bags of Crop-Quick
Model Constraints:
2x1 + 4x2 16 lb (nitrogen constraint)
4x1 + 3x2 24 lb (phosphate
x1, x2 0 (non-negativity
constraint)
constraint)
2-50
Constraint Graph – Minimization (4 of
8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2
16
4x2 + 3x2
24
x1, x2 0

Figure 2.16 Graph of Both Model Constraints


2-51
Feasible Region– Minimization (5 of
8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2
16
4x2 + 3x2
24
x1, x2 0

Figure 2.17 Feasible Solution


Area 2-52
Optimal Solution Point – Minimization (6 of
8)

Minimize Z = $6x1 + $3x2


subject to: 2x1 + 4x2
16
4x2 + 3x2
24
x1, x2 0

Figure 2.18 Optimum Solution Point


2-53
Surplus Variables – Minimization (7 of
8)
 A surplus variable is subtracted from a constraint
to convert it to an equation (=).
 A surplus variable represents an excess above a
constraint requirement level.
 A surplus variable contributes nothing to the calculated
value of the objective function.
 Subtracting surplus variables in the farmer problem
constraints:
2x1 + 4x2 - s1 = 16 (nitrogen)
4x1 + 3x2 - s2 = 24 (phosphate)

2-54
Graphical Solutions – Minimization (8 of
8)

Minimize Z = $6x1 + $3x2 + 0s1 + 0s2


subject to: 2x1 + 4x2 – s1 = 16
4x2 + 3x2 – s2 = 24
x1, x2, s1, s2 0

Figure 2.19 Graph of Fertilizer Example


2-55
Irregular Types of Linear Programming Problems

For some linear programming models, the general rules


do not apply.
 Special types of problems include those with:
 Multiple optimal solutions
 Infeasible solutions
 Unbounded solutions

2-56
Multiple Optimal Solutions Beaver Creek Pottery

The objective function is


parallel to a constraint line.
Maximize Z=$40x1 + 30x2
subject to: 1x1 + 2x2 40
4x2 + 3x2
120
Where: x1, x2 0
x1 = number of bowls
x2 = number of mugs

Fig
2-57
An Infeasible Problem

Every possible solution


violates at least one constraint:
Maximize Z = 5x1 + 3x2
subject to: 4x1 + 2x2
8
x1

4
x2

6
Figure 2.21 Graph of an Infeasible Problem
x1, x2
2-58
An Unbounded Problem

Value of the objective


function increases
indefinitely:
Maximize Z = 4x1 + 2x2
subject to: x1 4
x2

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)

Maximize Z = 4x1 + 5x2


subject to: x1 + 2x2
10
6x1 + 6x2

36
x1

4
x1, x2

0 Figure 2.24 Feasible Solution Space and Extreme


Points 2-64
Example Problem No. 2 (3 of
3)
Maximize Z = 4x1 + 5x2
subject to: x1 + 2x2 10
6x1 + 6x2

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

This section demonstrates the general idea of


sensitivity analysis. Two cases will be considered:
1. Sensitivity of the optimum solution to changes
in the availability of the resources (right-hand side
of the constraints).
2. Sensitivity of the optimum solution to changes
in unit profit or unit cost (coefficients of the
objective function).

Figure 2.25 Optimal Solution Point


2-66
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

• A farmer have 240 acres of land and the profit is $40/acre


corn, $30/ acre oats. The total available hour is 320 hr. Corn
takes 2 hr. of labor per acre, and oats requires 1 hr. per acre.
How many acres of each should be planted to maximize
profits?

You might also like