Download as pdf or txt
Download as pdf or txt
You are on page 1of 77

Lesson 3.

2
LINEAR PROGRAMMING
Objectives:

1. Understand the basic assumptions and properties of


linear programming (LP).
2. Graphically solve any LP problem that has only two
variables by corner point method.
3. Understand special issues in LP such as infeasibility,
unboundedness, redundancy, and alternative optimal
solutions.
Introduction
Programming refers to
▪ modeling and solving a problem mathematically.

Linear programming (LP) is


▪ a widely used mathematical modeling technique
▪ designed to help managers in planning and decision
making relative to resource allocation.
▪ LP is a technique that helps in resource allocation
decisions.
Linear Programming (Taylor, 2017)

• Is a model that consists of linear relationships


representing a firm’s decision(s), given an objective
and resource constraints.
It was developed by George B.
Dantzig in 1947.
Requirements of a Linear
Programming Problem

All LP problems have 4 properties in common:

▪ All problems seek to maximize or minimize some quantity (the


objective function).
▪ The presence of restrictions or constraints limits the degree to
which we can pursue our objective.
▪ There must be alternative courses of action to choose from.
▪ The objective and constraints in linear programming problems
must be expressed in terms of linear equations or inequalities.
5 Basic Assumptions of Linear
Programming

1. Certainty:
▪ numbers in the objective and constraints are known
with certainty and do not change during the period
being studied
2. Proportionality:
▪ exists in the objective and constraints
▪ constancy between production increases and
resource utilization
3. Additivity:
▪ the total of all activities equals the sum of the
individual activities
5 Basic Assumptions of Linear
Programming.. Contd.

4. Divisibility:
▪ solutions need not be in whole numbers (integers)
▪ solutions are divisible, and may take any fractional value

5. Non-negativity:
▪ all answers or variables are greater than or equal to (≥) zero
▪ negative values of physical quantities are impossible
LP Modeling
Some Types of LP Problems/ Applications of LP

• Allocation and Blending Problems


• Covering/Workforce Scheduling Problems
• Transportation Problems
• Transshipment Problems
• Assignment Problems
• Maximum Flow Problems
• Shortest Route Problems
Examples of Successful LP
Applications
1. Development of a production schedule that will
▪ satisfy future demands for a firm’s production
▪ while minimizing total production and inventory costs
2. Selection of product mix in a factory to
▪ make best use of machine-hours and labor-hours available
▪ while maximizing the firm’s products
3. Determination of grades of petroleum products to
yield the maximum profit

https://www.britannica.com/to
pic/list-of-petroleum-products-
2069393
4. Selection of different blends of raw materials combinations at
minimum cost
5. Determination of a distribution system that
will minimize total shipping cost from several
warehouses to various market locations
Ex. LP of LP Application: The Product Mix Problem

▪ Two or more products are usually produced using limited


resources such as
- personnel, machines, raw materials, and so on.
▪ The profit that the firm seeks to maximize is based on the
profit contribution per unit of each product.
▪ The company would like to determine how many units of
each product it should produce so as to maximize overall
profit given its limited resources.
▪ A problem of this type is formulated in the following
example on the next slide.
Formulating Linear Programming
Problems

▪ Formulating a linear program involves developing a


mathematical model to represent the managerial
problem.

▪ Once the managerial problem is understood, begin to


develop the mathematical statement of the problem.
Steps in LP Model Formulation

1. Define the Decision variables


▪ mathematical symbols representing levels of activity
of an operation

Example: an electrical manufacturing firm desires to


produce X1 radios, X2 toasters, and X3 clocks, where X1, X2,
and X3 are symbols representing unknown variable
quantities of each item. The final values of X1, X2, and X3, as
determined by the firm, constitute a decision (e.g., the
equation X1 = 100 radios is a decision by the firm to
produce 100 radios).
LP Model Formulation

2. Define the Objective function


▪ 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
LP Model Formulation

3. Define the Constraints


▪ a linear relationship representing a restriction on decision
making

Example: only 40 hours of labor may be available to produce


radios during production. The actual numeric values in the
objective function and the constraints, such as the 40 hours
of available labor, are parameters.
Ex 1. Beaver Creek Pottery Company

The two products have the following resource requirements for


production and profit per item produced:

⮚ There are 40 hours of labor and 120 pounds of clay available each
day for production.
Example 1: Product Mix Problem
Remember: Summary of LP Model
Formulation Steps

Step 1: Define the decision variables


How many bowls and mugs to produce?
Step 2: Define the objective function
Maximize profit
Step 3: Define the constraints
The resources (clay and labor) available
Decision Variables
The decision confronting
management in this problem is how
many bowls and mugs to produce.
The two decision variables represent
the number of bowls and mugs to be
produced on a daily basis. The
quantities to be produced can be
represented symbolically as:

X1= number of bowls to


produce
X2= number of mugs to
produce
Objective Function
• Maximize z= $40X1 + $50X2

• Where:
z= total profit per day
$40X1= profit from bowls
$50X2= profit from mugs
Model Constraints

Labor: 1X1 + 2X2 ≤ 40


Clay: 4X1 + 3X2 ≤ 120

X1= number of bowls to produce


X2= number of mugs to produce

Given: There are 40 hours of labor and 120


pounds of clay available each day for
production.
Complete Linear Programming
Model
Maximize Z= $40X1 + $50X2

Subject to
1X1 + 2X2 ≤ 40
4X1 + 3X2 ≤ 120
X1, X2 ≥ 0
Feasible Solution

X1 =5 bowls and X2=10 mugs

For labor
1X1 + 2X2 ≤ 40 Z= $40X1 + $50X2
1(5) + 2(10) ≤ 40 Z = 40(5) + 50(10) = $700
25 ≤ 40
For Clay
4X1 + 3X2 ≤ 120
4(5) + 3(10) ≤ 120
50 ≤ 120
Infeasible Solution

X1= 10 bowls and X2 = 20 mugs

Z= $40X1 + $50X2
Z= $40(10) + $50(20)
Z= $400 + $1,000
Z= $1,400
1X1 + 2X2 ≤ 40
1(10) + 2(20) ≤ 40
10 + 40 ≤ 40
50 ≤ 40
Graphical Solution
x2 are mugs

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

x1 are bowls Coordinates of Graphical Analysis


Graphical Solution con’t

For Labor (hrs)

The first step in drawing the graph of the model is to plot the constraints on the graph. This
is done by treating both constraints as equations (or straight lines) and plotting each line on
the graph. Let’s consider the labor constraint line first:
x1 + 2x2 ≤ 40

A simple procedure for plotting this line is to determine two points that are on the line and
then draw a straight line through the points. One point can be found by letting x1=0 and
solving for x2:
(0) + 2x2 = 40
X2 = 20
Graphical Solution con’t

Thus, one point is at the coordinates


x1=0 and x2=20. A second point can be
found by letting x2=0 and solving for x1:

x1 + 2(0) = 40
X1 = 40

Labor constraint line


To test the correctness of the
constraint area, we check any two
points—one inside the constraint
area and one outside. For
example, check point A in the
figure, which is at the intersection
of x1=10 and x2=10 . Substituting
these values into the following
labor constraint,

10 + 2(10) ≤ 40
30 ≤ 40 hr.
Labor constraint area
Graphical Solution con’t

Next, we check point B at x1=40 and x2=30:


40 + 2(30) ≤ 40
100 ≤ 40 hr.

Point B is obviously outside the constraint area because the


values for x1 and x2 yield a quantity (100) that exceeds the limit
of 40 hours.
Graphical Solution con’t
For Clay

We draw the line for the clay constraint the same way as the one for
the labor constraint— by finding two points on the constraint line and
connecting them with a straight line. First, let x1=0 and solve for x2 :
4(0) + 3x2 = 120
x2 = 40
Performing this operation results in a point, x1=0, x2=40. Next, we let
x2=0, and then solve for x1:
4x1 + 3(0) = 120
x1 = 30
Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

The constraint area for clay


Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

Graph of both model constraints


Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

The feasible solution area constraints


Graphical Solution con’t

To begin the solution analysis, we first plot the objective function


line for an arbitrarily selected level of profit. For example, if we
say profit, Z, is $800, the objective function is

$800 = 40x1 + 50x2

Isoprofit Approach
-“iso” means equal/same
-the profit anywhere on the
line is the same.
Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

Objective function line for Z =$800


Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

Alternative objective function lines for profits, Z, of $800, $1,200, and


Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
X1 , X2 ≥ 0

Where
X1 = number of bowls produced
X2 = number of mugs produced

Identification of optimal solution point


Graphical Solution con’t

The third step in the graphical solution approach is to solve for


the values of x1 and x2 once the optimal solution point has been
found. It is possible to determine the coordinates of point B
directly in the graph as shown in the next figure.
Graphical Solution con’t

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
x1 , x2 ≥ 0

Point B coordinates:
x1 = 24
x2 = 8

Optimal solution coordinates


Graphical Solution con’t

Thus, the optimal solution at point B in the previous figure is x1


= 24 and x2 = 8. Substituting these values into the objective
function gives the maximum profit,

Z = $40x1 + $50x2
Z = $40(24) + $50(8)
= $1,360
Finding the optimal solution:
Corner Point Solution

-the optimal solution to a


LPP, if it exists, occurs at the
corners (vertex) of the
feasible region.

Maximize Z = P40x1 + P50x2


subject to:
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
x1 , x2 ≥ 0
From the graph shown in the Figure of Identification of optimal
solution point, we know that the optimal solution point is B.
Because point B is formed by the intersection of two constraint
lines, as shown in Figure 2.11, these two lines are equal at point
B. Thus, the values of and at that intersection can be found by
solving the two equations simultaneously.

First, we convert both equations to functions of X1 :

x1 + 2x2 = 40
x1 = 40 - 2x2
and
4x1 + 3x2 = 120
4x1 = 120 - 3x2
x1 = 30 - (3x2/4)
Now, we let in the first equation equal in the second equation,
40 - 2x2 = 30 - (3x2/4)
and solve for :
5x2/4 = 10
x2 = 8
Substituting into either one of the original equations gives a value for :
x1 = 40 - 2x2
x1 = 40 - 2(8)
x1 = 24
Thus, the optimal solution at point B is x1 = 24 and x2 = 8.
Substituting these values into the objective function gives the
maximum profit,
Z = $40x1 + $50x2
Z = +40(24) + 50(8)
= $1,360
A Minimization Model
Example:
A farmer is preparing to plant a crop in the spring and needs to
fertilize a field. There are two brands of fertilizer to choose
from, Super-gro and Crop-quick. Each brand yields a specific
amount of nitrogen and phosphate per bag, as follows:
The farmer’s field requires at least 16 pounds of nitrogen and at least 24
pounds of phosphate. Super-gro costs $6 per bag, and Crop-quick costs $3.
The farmer wants to know how many bags of each brand to purchase in
order to minimize the total cost of fertilizing.

Fertilizing
farmer’s
field
Summary of LP Model Formulation
Steps
Step 1: Define the decision variables
How many bags of Super-gro and Crop-quick to buy
Step 2: Define the objective function
Minimize cost
Step 3: Define the constraints
The field requirements for nitrogen and phosphate
Decision Variables

This problem contains two decision variables,


representing the number of bags of each brand of
fertilizer to purchase:

x1 = bags of Super-gro
X2 = bags of Crop-quick
The Objective Function

The farmer’s objective is to minimize the total cost of fertilizing.


The total cost is the sum of the individual costs of each type of
fertilizer purchased. The objective function that represents total
cost is expressed as

minimize Z = $6x1 + $3x2

Where
$6x1 = cost of bags of Super-gro
$3x2 = cost of bags of Crop-quick
Model Constraints

The requirements for nitrogen and phosphate represent the


constraints of the model. Each bag of fertilizer contributes a
number of pounds of nitrogen and phosphate to the field. The
constraint for nitrogen is

2x1 + 4x2 ≥ 16 lbs.


Where
2x1 = the nitrogen contribution (lb.) per bag of Super-gro
4x2 = the nitrogen contribution (lb.) per bag of Crop-quick
The constraint for phosphate is constructed like the constraint
for nitrogen:
4x1 + 3x2 ≥ 24 lb.
For example, if the farmer had said that the phosphate
requirement for the field was exactly 24 pounds, the constraint
would have been
4x1 + 3x2 = 24 lb.

As in our maximization model, there are also nonnegativity


constraints in this problem to indicate that negative bags of
fertilizer cannot be purchased:
x1, x2 ≥ 0
The complete model formulation for this minimization
problem is

minimize Z = $6x1 + $3x2

subject to
2x1 + 4x2 ≥ 16 lbs. of nitrogen
4x1 + 3x2 ≥ 24 lb. of phosphate
x1, x2 ≥ 0
Graphical Solution of a Minimization
Model

FIGURE 2.16. Constraint lines for fertilizer model FIGURE 2.17. Feasible solution area
The final step in the graphical
solution approach is to solve
for the values of x1 and x2 at
point A. Because point A is on
the x2 axis, x1=0; thus,

4(0) + 3x2 =24


X2 = 8

FIGURE 2.18 The optimal solution point


Given that the optimal solution is x1=0, x2=8, the minimum cost,
Z, is

Z = $6x1 + $3x2
Z = $6(0) + $3(8)
Z=$24
Irregular Types of Linear Programming Problems

1. Multiple Optimal Solutions

The objective function is


parallel to a constraint line.

Maximize Z=40x1 + 30x2


subject to:
1x1 + 2x2 ≤ 40
4x2 + 3x2 ≤ 120
x1 , x2 ≤ 0
Where:
x1 = number of bowls FIGURE 2.20. Graph of the Beaver Creek Pottery Company
x2 = number of mugs example with multiple optimal solutions
Irregular Types of Linear Programming Problems

2. Infeasible Solutions
Every possible solution violates
at least one constraint:

Maximize Z = 5x1 + 3x2


subject to:
4x1 + 2x2 ≤ 8
x1 ≥ 4
x2 ≥ 6
x1 , x2 ≥ 0

FIGURE 2.21 Graph of an infeasible problem


Irregular Types of Linear Programming Problems

3. An Unbounded Problem

The objective function can increase


indefinitely without reaching a maximum
value.
Maximize Z = 4x1 + 2x2
subject to: x1 ≥ 4
x2 ≤ 2
x1 , x2 ≥ 0

FIGURE 2.22 An unbounded problem


Sensitivity analysis or Postoptimality
Analysis

• Sensitivity analysis determines the effect on the


optimal solution of changes in parameter values of
the objective function and constraint equations.

• Involves a series of what if questions


Computer Solt’n to LP Problem Using QM for
Windows – Example: Beaver Creek Pottery
Company
Computer Solt’n to LP Problem Using
QM for Windows
Questions: a. For the optimal solution, how much of the advertising budget is
spent?
Answer: In the optimal solution, 𝑋1 = 60 and 𝑋2 = 40. Using these values in the
first constraint gives, 2𝑋1 + 4 𝑋2= (60)+ 4(40) = 280
Another way to find this is by looking at the slack: Slack for constraint 1= 120
so the amount used is 400-120=280
b. For the optimal solution, how much square footage will be used?
Answer: For the second constraint we have, 100𝑋1 + 50𝑋2 = 100(60)+50(40)=
8,000 square feet Instead of computing this, you may simply observe that
the slack is 0, so all of the 8,000 square feet will be used
Question: Would the solution change if the advertising budget were only $300 instead of
$400?
Answer: No, the solution would not change. The dual price is 0 and there is slack available.
The value 300 is between the lower bound of 280 and the upper bound of infinity. Only
the slack for this constraint would change
Question: How much would earnings increase if the square footage requirement were
increased from 8,000 to 9,000?
Answer: The dual price for this constraint is 0.4, and the upper bound is 9,500. The increase
of 1,000 units will result in an increase in earnings of 1,000(0.4 per unit) $400
Thank You for Listening!

You might also like