Chapter 2 - Linear Proramming
Chapter 2 - Linear Proramming
October 2023
Sheger, Oromia, Ethiopia
2.1. INTRODUCTION TO LINEAR
PROGRAMMING/LP
Management decisions in many organizations involve
trying to make most efficient and effective use of
resources (machinery, labor, money, time, warehouse
space, and raw materials) in order to:
Produce products - such as computers, automobiles,
or clothing or
Provide services - such as package delivery, health
services, or investment decisions.
To solve problems of resource allocation one may use
mathematical programming called Linear Programming.
LINEAR PROGRAMMING
Linear programming (LP) is the most common type of
mathematical programming.
LP seeks to maximize or minimize a linear objective function
subject to a set of linear constraints .
LP assumes all relevant input data and parameters are known
with certainty (deterministic models).
Computers play an important role in the solution of LP
problems.
LP applied extensively to problem areas like:-
medical, transportation, operations,
financial, marketing, accounting,
human resources, and agriculture
BASIC STEPS OF DEVELOPING A LP MODEL
1. Identification/understanding of the problem
– Identification/understanding of the problemas
solvable by LP: At this step, the problem that
needs solution to be identified and checked
whether to be solved by LP.
2. Formulation of the Model
One of the most important phases in the solution of
LP problem, which translates words in to an
objective function together with the set of
constraints.
It refers to the transformation of word problems in
to a mathematical model that needs solutions.
BASIC STEPS OF DEVELOPING A LP MODEL
The main steps in model formulation:
i. Determine what the specific objective is. That is maximize profit or
minimize cost, keeping in mind the limited resources available
through appropriate combination.
ii. Assign variables to each of the unknown quantities to be solved such
as profit, cost, number of products to be produced, etc.
iii. Find a mathematical expression that represents the objective in terms
of the unknowns.
iv. Find mathematical expressions that represent any limited resources
(constraints) in terms of unknowns.
v. Include any additional constraints that are not explicitly stated in the
problem ( Example: the decision variables must be non-negative).
BASIC STEPS OF DEVELOPING A LP MODEL
3. Solution
Mathematical relationships resulting from
formulation process are solved to identify optimal
solution.
4. Interpretation and What-if Analysis
Problem solver or analyst works with the manager to:
oInterpret results and implications of problem
solution.
o Investigate changes in input parameters and
model variables and impact on problem solution
results.
LINEAR EQUATIONS AND INEQUALITIES
Resource Requirements
Labor Clay Profit
Product
(hr/unit) (lb/unit) ($/unit)
Bowl 1 4 40
Mug 2 3 50
Resource 40 120
PROBLEM DEFINITION EXAMPLE CONT’D
x1, x2 0
FEASIBLE SOLUTIONS
A feasible solution does not violate any of the
constraints:
Example x1 = 5 bowls
x2 = 10 mugs
Z = $40x1 + $50x2 = $700
Labor constraint check:
1(5) + 2(10) = 25 < 40 hours, within constraint
Clay constraint check:
4(5) + 3(10) = 50 < 120 pounds, within constraint
INFEASIBLE SOLUTIONS:
An infeasible solution violates at least one of the
constraints:
Example x1 = 10 bowls
x2 = 20 mugs
Z = $1400
Labor constraint check:
1(10) + 2(20) = 50 > 40 hours, violates the cconstraint
The set of all points that satisfy all the constraints of the
model is called a feasible region.
The best solution to the problem among all feasible
solutions is called optimal solution.
2.3. GRAPHICAL SOLUTION OF LINEAR
PROGRAMMING MODELS
Graphical solution: is limited to linear programming
models containing only two decision variables.
Graphical methods: provide visualization of how a
solution for a linear programming problem is obtained.
Primary advantage of two-variable in LP models is
their solution can be graphically illustrated using two-
dimensional graph.
Allows one to provide an intuitive explanation of
how more complex solution procedures work for
larger LP models.
GRAPHICAL REPRESENTATION OF
CONSTRAINTS:
Lines Corner
2 and 4 (0,40)
1 and 3 (40, 0)
(3 and 4) (24, 8)
if no if yes stop
1. Initialization:
a. Transform all the constraints to equality by introducing slack,
surplus, and artificial variables as follows:
= + Artificial (A)
2.4 The Simplex Method for Solving LP
Models
1. Initialization:
b. Construct the initial simplex tableau:
Basic X1 … Xn S1 …... Sn A … A RHS
variable 1 . n
S b1
Coefficient of the constraints
A bm
Z Objective function coefficient Z
In different signs value
2.4 The Simplex Method for Solving LP
Models
2. Test for optimality:
0 S3 3 2 0 0 1 18 18/2=9
Zj 0 0 0 0 0 0
Cj - Zj -3 - 0 0 0
Leaving 5Most Pivot number/ Pivot/key row
variable Pivot/key column neg key element
2.4 The Simplex Method for Solving LP
Models
Notes:
The basic feasible solution at the initial tableau is
(0, 0, 4, 12, 18) where:
X1 = 0, X2 = 0, S1 = 4, S2 = 12, S3 = 18, and Z = 0
Where S1, S2, and S3 are basic variables.
X1 and X2 are non-basic variables.
The solution at the initial tableau is associated to
the origin point at which all the decision variables
are zero.
2.4 The Simplex Method for Solving LP
Models
Optimality test:
Iteration:
2. For the other row apply this rule:
New row = old row – (the coefficient of this row in the pivot column) x
(coefficient of new pivot row).
For S1
1 0 1 0 0 4
-
0 (0 1 0 1/2 0 6)
1 0 1 0 0 4
For S3
3 2 0 0 1 18
-
2 (0 1 0 1/2 0 6)
3 0 0 -1 1 6
for Z
-3 -5 0 0 0 0 Substitute this values in
- the table
-5(0 1 0 1/2 0 6)
-3 0 0 5/2 0 30
2.4. The Simplex Method for Solving LP Models
Iteration:
This solution is not optimal, since there is a negative numbers in
the last row
Basic X1 X2 S1 S2 S3 RHS
variable
S1 1 0 1 0 0 4
X2 0 1 0 1/2 0 6
S3 3 0 0 -1 1 6
Z -3 0 0 5/2 0 30
Iteration:
Apply the same rules we will obtain this solution:
Basic X1 X2 S1 S2 S3 RHS
variable
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 1/2 0 6
X1 1 0 0 -1/3 1/3 2
Z 0 0 0 3/2 1 36
This solution is optimal; since there is no negative solution in the last row: basic variables are X1 =
2, X2 = 6 and S1 = 2; the non-basic variables are S2 = S3 = 0, Z = 36.
Exercise:
The Plastic manufacturing company produces two products:
Bowls/Product I and mugs/Product II. The raw material
requirements, space needed for storage, production rates, and
selling prices for these products are given below:
Constraints Bowls / Product I Mugs/ Product II
Storage space (m2/unit 4 5
Raw material (Ib/ unit) 5 3
Production rate 1 2
(Units/hr=60 minutes)
Selling price ($/unit 13 11
The total amount of raw material available per day for both products is 1575Ib. The
total storage space for all products is 1500 m2, and a maximum of 420 minutes per
day can be used for production.
How many units of bowls/product I and mugs/product II should the company
to produce per day to maximize its total income/profit? ( Use simplex method).
2.5. Minimization by using Simplex LP Model
In either case, the final table of the dual problem will contain both
the solution to the dual problem and the solution to the original
problem.
1.The original greater than or equal to min” will be called the primal problem.
2. The less than or equal to max” to which we change will be called the dual
problem.
3. Convert the primal in to the dual and solve using the method developed ,
then read the solution of the primal from the solution of the dual.
3P1+ 7P2
2P1+2P2
Next change > to <, use the coefficients of X1 and X2 in -
row as the right- hand constant and write:
3P1+7P2 < 2
2P1+ 2P2 < 3
Maximize = 12P1+20P2
Subject to:
3P1+7P2 < 2
2P1+ 2P2 < 3
P1,P2 > 0
Note:
1). The dual is a “less than or equal to max” problem
2). X1 and X2 are as slack variables
3). This method is known as minimization by
maximizing the dual.
© 2002 Prentice-Hall, Inc Ch 2-63
2.5.1. Dual in LP Model
Thus, we will solve the LP dual problem of the following by
using simplex method.
Maximize = 12P1+20P2
Subject to:
3P1+7P2 < 2
2P1+ 2P2 < 3
P1,P2 > 0
Solve the model by forming equations with slack variables using simplex
method.
The equation with slack variables will be constructed as follows:
X1 3 7 1 0 2
X2 2 2 0 1 3
-12 -20 0 0 0