Linear Programming
Lhars M. Barsala
Learning Objectives
6S-2
Describe the type of problem tha would lend itself to
solution using linear programming
Formulate a linear programming model from a
description of a problem
Solve linear programming problems using the
graphical method
Interpret computer solutions of linear programming
problems
Do sensitivity analysis on the solution of a linear
progrmming problem
Linear Programming
6S-3
Used to obtain optimal solutions to problems
that involve restrictions or limitations, such as:
Materials
Budgets
Labor
Machine time
Linear Programming
6S-4
Linear programming (LP) techniques consist
of a sequence of steps that will lead to an
optimal solution to problems, in cases where
an optimum exists
Linear Programming Model
6S-5
Objective Function: mathematical
statement of profit or cost for a given solution
Decision variables: amounts of either
inputs or outputs
Feasible solution space: the set of all
feasible combinations of decision variables as
defined by the constraints
Constraints: limitations that restrict the
available alternatives
Parameters: numerical values
Linear Programming Assumptions
6S-6
Linearity: the impact of decision variables is
linear in constraints and objective function
Divisibility: noninteger values of decision
variables are acceptable
Certainty: values of parameters are known and
constant
Nonnegativity: negative values of decision
variables are unacceptable
Linear Programming
6S-7
A company is manufacturing two products A and B. The
manufacturing time required to make them, the profit and capacity
available at each work centre are given as follows:
ProductMatching Fabrication Assembly Profit per unit
A 1 Hour 5 Hours 3 Hours 80
B 2 Hours 4 Hours 1 Hour 100
Total Capacity 720 Hours 1800 Hours 900 Hours
Linear Programming
6S-8
Maximize, Z = 80x1 + 100x2 subject to the constraints:
x1 + 2x2 ≤ 720
5x1 + 4x2 ≤ 1800
3x1 + x2 ≤ 900
x1 , x2 ≥ 0.
Linear Programming
6S-9
A company produces three products P, Q, and R from
three raw materials: A, B and C. One unit of product P
requires 2 units of A and 3 units of B. One unit of
product Q requires 2 units of B and 5 units of C and
one unit of product R requires 3 units A, 2 units of B
and 4 units of C. The company has 8 units of material
A, 10 units of material B and 15 units of material C
available to it. Profits per unit of products P, Q and R
are Tk3, Tk.5, and Tk4 respectively. Formulate the
program mathematically.
Linear Programming
6S-
10
Decision Product Types of raw material Profit per
variable A B C Unit (Tk)
x1 P 2 3 - 3
x2 Q - 2 5 5
x3 R3 2 4 4
Unit of materials Max 8 10 15
available
Linear Programming
6S-
11
Maximize, Z = 3x1 + 5x2 + 4x3 subject to the constraints:
2x1 + 3x3 ≤ 8
3x1 + 2x2 + 2x3 ≤ 10
5x2 + 4x3 ≤ 15
x1 , x 2 , x 3 ≥ 0
Linear Programming
6S-
12
A diet conscious housewife wishes to ensure certain
minimum intake of vitamins A, B, and C for the family.
The minimum daily (quantity) needs of the vitamins A, B,
C for the family are respectively 30, 20, and 16 units. For
the supply of these minimum vitamin requirements, the
housewife relies on two fresh foods. The first one provides
7, 5, 2 units of the three vitamins per gram respectively
and the second one provides 2, 4, 8 units of the same
three vitamins per gram respectively. The first foodstuff
costs Tk.3 per gram and the second Tk.2 per gram. How
many grams of each foodstuff should the housewife buy
everyday to keep her food bill as low as possible ?
Linear Programming
6S-
13
Minimize, Z = 3x1 + 2x2 subject to the constraints:
7x1 + 2x2 ≥ 30
5x1 + 4x2 ≥ 20
2x1 + 8x2 ≥ 16
x1 , x2 ≥ 0.
Linear Programming
6S-
14
A factory manufactures two articles A and B. To
manufacture the article A, a certain machine has to be
worked for 1.5 hours and in addition a craftsman has to
work for 2 hours. To manufacture the article B, the
machine has to be worked for 2.5 hours and in addition a
craftsman has to work for 1.5 hours. In a week the factory
can avail of 80 hours of machine time and 70 hours of
craftsman’s time. The profit on each article A is Tk.5 and
that on each article B is Tk.4. If all the articles produced
can be sold away, find how many of each kind should be
produced to earn the maximum profit per week.
Linear Programming
6S-
15
Decision Article Hours on Hours on Profit per
variable Machine Craftsman (Tk)
x1 A 1.5 2 5
x2 B 2.5 1.5 4
Hours Available 80 70
(per week) Maximum Maximum
x1 = number of units of Article A
x2 = number of units of Article B
Linear Programming
6S-
16
Maximize, Z = 5x1 + 4x2 subject to the constraints:
1.5x1 + 2.5x2 ≤ 80
2x1 + 1.5x2 ≤ 70
x1 , x 2 ≥ 0.
Graphical Linear Programming
6S-
17
Graphical method for finding optimal
solutions to two-variable problems
1. Set up objective function and constraints in
mathematical format
2. Plot the constraints
3. Identify the feasible solution space
4. Plot the objective function
5. Determine the optimum solution
Linear Programming Example
6S-
18
Objective - profit
Maximize, Z = 60X1 + 50X2
Subject to:
Assembly 4X1 + 10X2 ≤ 100 hours
Inspection 2X1 + 1X2 ≤ 22 hours
Storage 3X1 + 3X2 ≤ 39 cubic feet
X1, X2 ≥ 0
Linear Programming Example
6S-
19
Assembly Constraint
4X1 +10X2 = 100
12
10
Product X2
8
6
4
2
0
Product X1
Linear Programming Example
6S-
20
Add Inspection Constraint
2X1 + 1X2 = 22
25
20
Product X2
15
10
5
0
Product X1
Linear Programming Example
6S-
21
Add Storage Constraint
3X1 + 3X2 = 39
25
Inspection
20
Product X2
15
Storage
Assembly
10
5
0
0 2 4 6 8 10 12 14 16 18 20 22 24
Feasible solution space Product X1
Linear Programming Example
6S-
22
Add Profit Lines
25
20
Z=900
Product X2
15
10
0
0 2 4 6 8 10 12 14 16 18 20 22 24
Product X1
Z=300 Z=600
Solution
6S-
23
The intersection of inspection and storage
Solve two equations in two unknowns
2X1 + 1X2 = 22
3X1 + 3X2 = 39
X1 = 9
X2 = 4
Z = $740
Constraints
6S-
24
Redundant constraint: a constraint that
does not form a unique boundary of the
feasible solution space
Binding constraint: a constraint that
forms the optimal corner point of the
feasible solution space
Solutions and Corner Points
6S-
25
Feasible solution space is usually a polygon
Solution will be at one of the corner points
Enumeration approach: Substituting the
coordinates of each corner point into the objective
function to determine which corner point is optimal.
Slack and Surplus
Surplus: when the optimal values of decision
variables are substituted into a greater than
or equal to constraint and the resulting value
exceeds the right side value
Slack: when the optimal values of decision
variables are substituted into a less than or
equal to constraint and the resulting value is
less than the right side value
Solve the problem below using the linear programming process
Cagayan State University had acquired two sets of medical
laboratories that can be utilized to test any type of virus . Lab. A
and Lab. B.
Lab A operates for 8 hours and it is managed by 3 medical
technologies, while Lab. B is available for 12 hours and manage
by 4 medical technologies. Each type of virus to be tested
requires to pass through Lab A and Lab B. Each type X virus
requires 20minutes in Lab A. and 30minutes in Lab B and each
type of virus Y requires 40minutesin Lab A and 30 minutes in
Lab B. If the maximum number of test to be performed per day
in each Lab is 20. Determine a program of schedule to be utilize
in order to maximize the number of test performed.