0% found this document useful (0 votes)
29 views

Cosc309 - Video Clip 03 - Linear Programming-1

This document introduces linear programming, covering its assumptions, basic steps for constructing linear programming models, and methods for solving linear programming problems. It provides an example problem demonstrating the graphical, algebraic, and simplex methods.

Uploaded by

Omar Austin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Cosc309 - Video Clip 03 - Linear Programming-1

This document introduces linear programming, covering its assumptions, basic steps for constructing linear programming models, and methods for solving linear programming problems. It provides an example problem demonstrating the graphical, algebraic, and simplex methods.

Uploaded by

Omar Austin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

MODULE 2 - LINEAR PROGRAMMING

• This module introduces you to linear


programming.
• At the end of this module, you will be able to
– state the assumptions of, and the basic steps in
constructing, linear programming models,
– state the procedures of Graphical, Algebraic and
Simplex methods of solving linear programming
problems, and
– solve linear programming problems that resolve
naturally into the standard form.
Unit 2.1: General Introduction to Linear Programming

• At the end of this unit, you will be able to


– state the assumptions of linear programming
problems, and
– state the basic steps in constructing linear
programming models
Linear Programming (LP) Defined
• Programming Problems
– Allocation of Scarce Resources
– Achievement of Objective(s) in the best possible
manner
• LP Problems
– Programming Problems
– Linear
LP Model Construction Basic Steps

• Identification of the decision variables (or level


of activities) and their representation in algebraic
symbols.
• Identification of the objective and its expression
as a function of the decision variables.
• Identification of all the constraints of the
problem and their expression as linear
inequalities or equations (Adewoye & Okwa,
2005; Hillier & Lieberman, 1995).
General Form of LP Model
Objective: Min/Max Z = f(x1,x2,…,xn)
i.e. Min/Max Z = b1x1 + b2x2 + … + bnxn
Constraints: Subject to
a11 x1 + a12 x2 + … + a1nxn ≤/≥/= c1
a21 x1 + a22 x2 + … + a2nxn ≤/≥/= c2
⁞ ⁞ ⁞
am1 x1 + am2 x2 + … + amnxn ≤/≥/= cm
x1, x2, …, xn ≥ 0 (non-negativity constraint)
Where x1, x2, … , xn are decision variables and ci , bj & aij
(i = 1, …, m; j = 1, … , n) are constants or parameters
of the model
Standard Form of LP Model
Objective: Max Z = f(x1,x2,…,xn)
i.e. Max Z = b1x1 + b2x2 + … + bnxn
Constraints: Subject to
a11 x1 + a12 x2 + … + a1nxn ≤ c1
a21 x1 + a22 x2 + … + a2nxn ≤ c2
⁞ ⁞

am1 x1 + am2 x2 + … + amnxn ≤ cm


x1, x2, …, xn ≥ 0 (non-negativity constraint)
Where x1, x2, … , xn are decision variables and ci , bj & aij
(i = 1, …, m; j = 1, … , n) are constants or parameters
of the model.
Assumptions of LP

• Things the System/Problem of Interest


Must Meet to Fit LP
–Proportionality
–Additivity
–Divisibility
–Certainty (Hillier & Lieberman, 1995).
• Minor disparities
–To be overlooked.
Assumptions of LP

• Proportionality
–Contribution of Each Activity (Decision Variable) is
proportional to the level of the activity
Objective:
Maximize Z = b1x1 + b2x2 + … + bnxn ................. (i)

Constraints:
Subject to
a11 x1 + a12 x2 + … + a1nxn ≤ c1 ........................(ii)
a21 x1 + a22 x2 + … + a2nxn ≤ c2 .........................(iii)
⁞ ⁞

am1 x1 + am2 x2 + … + amnxn ≤ cm ......................(m+i)


x1, x2, …, xn ≥ 0 (non-negativity constraint)
Assumptions of LP

•Additivity
–Every function in a linear programming model is the sum
of the individual contributions of the respective activities.
Objective:
Maximize Z = b1x1 + b2x2 + … + bnxn ................. (i)

Constraints:
Subject to
a11 x1 + a12 x2 + … + a1nxn ≤ c1 ........................(ii)
a21 x1 + a22 x2 + … + a2nxn ≤ c2 .........................(iii)
⁞ ⁞

am1 x1 + am2 x2 + … + amnxn ≤ cm ......................(m+i)


x1, x2, …, xn ≥ 0 (non-negativity constraint)
Assumptions of LP

•Divisibility
–Decision Variables in a linear programming model are
allowed to have any values that satisfy the functional and
non-negativity constraints
Objective:
Maximize Z = b1x1 + b2x2 + … + bnxn ................. (i)

Constraints:
Subject to
a11 x1 + a12 x2 + … + a1nxn ≤ c1 ........................(ii)
a21 x1 + a22 x2 + … + a2nxn ≤ c2 .........................(iii)
⁞ ⁞

am1 x1 + am2 x2 + … + amnxn ≤ cm ......................(m+i)


x1, x2, …, xn ≥ 0 (non-negativity constraint)
Assumptions of LP

•Certainty
–value assigned to each parameter of a linear
programming model is assumed to be a known constant.
Objective:
Maximize Z = b1x1 + b2x2 + … + bnxn ................. (i)

Constraints:
Subject to
a11 x1 + a12 x2 + … + a1nxn ≤ c1 ........................(ii)
a21 x1 + a22 x2 + … + a2nxn ≤ c2 .........................(iii)
⁞ ⁞

am1 x1 + am2 x2 + … + amnxn ≤ cm ......................(m+i)


x1, x2, …, xn ≥ 0 (non-negativity constraint)
Unit 2.2: Graphical, Algebraic and Simplex Methods of Solution

• At the end of this unit, you will be able to


– state the procedures of Graphical, Algebraic and
Simplex methods of solving linear programming
problems, and
– solve linear programming problems that resolve
naturally into the standard form using any of the
procedures.
Linear Programming Methods of Solution
1. Graphical (decision variables limited to two)
2. Algebraic/Quadratic
3. Simplex (used to solve larger
problems/models that occur in practical
management situations)
4. Interior-Point Approach (used to solve much
larger problems/models that occur in
practical management situations – runs faster
than simplex in such cases)
Demonstration (Demo)
• A tailor has 16m2 of cotton, 11m2 of silk and
15m2 of wool available. A suit requires 2m2 of
cotton, 1m2 of silk and 1m2 of wool. A gown
requires 1m2 of cotton, 2m2 of silk and 3m2 of
wool. If a suit sells for N3, 000 and a gown for
N5, 000, what number of each garment should
the tailor make to maximize gains in Naira terms
(Adewoye & Okwa, 2005), using the graphical,
Algebraic and Simplex methods?
Demonstration cont’d
• Let x, y & z be the number of suits, gowns and total
money generated, respectively.
• The Model
– The objective:
maximize z = 3000x + 5000y ................(i)
– Constraints:
Subject to
2x + y ≤ 16 ……………………………..(ii)
x + 2y ≤ 11 ……………………………... (iii)
x + 3y ≤ 15 ……………………………... (iv)
x ≥ 0, y ≥ 0 non-negativity
Demo - Graphical Method
• Draw the graph of the constraints
• Select the corner points of the feasible area
• Set these points into the objective function, and
select the one that produces the best solution
• Deduce the recommended solution
Demo - Graphical Method cont’d
• Finding points to plot:
Take Equation (ii); when x = 0, y ≤ 16
And when y = 0, x ≤ 8
Take Equation (iii); when x = 0, y ≤ 5.5
And when y = 0, x ≤ 11
Take Equation (iv); when x = 0, y ≤ 5
And when y = 0, x ≤ 15
Chart of X Vs Y of Constraints
18

16

14

12

10
Y Axis

A(0,5)
4 B(3,4
)
2 C(7,2)

0
D(8,0)
0 2 4 6 8 10 12 14 16

X Axis

Figure 3: Graph of the Constraints


Demo - Graphical Method End
• The corner points of the feasible solution area
are (0, 5), (3, 4), (7, 2) and (8, 0).
• The Values in the Objective Function:
z(0,5) = 3000(0) + 5000(5) = 25, 000
z(3,4) = 3000(3) + 5000(4) = 29, 000
z(7,2) = 3000(7) + 5000(2) = 31, 000
z(8,0) = 3000(8) + 5000(0) = 24, 000
• Hence, the maximum amount of money the
tailor can get is N31, 000, and this will happen
when he makes 7 suits and 2 gowns.
Demo - Algebraic/Quadratic Method

• Find the set(s) of valid values of the decision variables by solving


the constraint inequalities:
i. If the number of constraints (excluding the non-negativity) is
smaller than the number of decision variables, we have insufficient
information to find a solution.
ii. If the number of constraints is equal to the number of decisions
variables, find the values of the decision variables by solving the
inequalities simultaneously.
iii. If the number of constraints is larger than the number of decision
variables, solve for possible set(s) of values of the decision variables
using sufficient number of inequalities each time, and setting values
gotten into unutilized inequalities to ascertain their validity.
• Set the set(s) of valid values of the decision variable into the
objective function and select the one that best satisfy the
objective function.
Demo - Algebraic Method cont’d

Recall the Model:


The objective:
Maximize z = 3000x + 5000y .....................(i)
Constraints:
Subject to
2x + y ≤ 16 ……………………………. (ii)
x + 2y ≤ 11 …………………………… (iii)
x + 3y ≤ 15 …………………………… (iv)
x ≥ 0, y ≥ 0 non-negativity
Demo - Algebraic Method cont’d

• 2 times Equation (iii) minus Equation (ii)


 2* (x + 2y ≤ 11) – (2x + y ≤ 16)
 (2x + 4y ≤ 22) – (2x + y ≤ 16)
 3y ≤ 6 y ≤ 2--- (v)
• Set y = 2 into equation (iii);
 x + 2*2 ≤ 11  x ≤ 7 --- (vi)
• Set x = 7, y = 2 into Equation (iv) unutilized:
 7 + 3*2 ≤ 15  13 ≤ 15
• Hence, Equations (v) & (vi) gives feasible solution
x = 7, y = 2.
Demo - Algebraic Method cont’d

• Similarly, Equation (iv) – Equation (iii)


y ≤ 4 --- (vii)
Set y = 4 into equation (iii);
x ≤ 3 --- (viii)
• Set x = 3, y = 4 into Equation (ii) unutilized:
 2*3 + 4 ≤ 16  10 ≤ 16
• Hence, Equations (iii) & (iv) gives Feasible
solution
x = 3, y = 4
Demo - Algebraic Method cont’d

• Again, 2 times Equation (iv) – Equation (ii)


5y ≤ 14 y ≤ 2.8 --- (ix)
Set y = 2.8 into equation (iv);
 x ≤ 6.6 --- (x)
• Set x = 6.6, y = 2.8 into equation (iii) unutilized:
 6.6+2(2.8) ≤ 11  12.2 ≤ 11, which is invalid.
• Hence, Equations (ii) & (iv) gives infeasible
solution
x = 6.6, y = 2.8.
Demo - Algebraic Method End

• Feasible solutions are, therefore,


x = 7, y = 2 and x = 3, y = 4
• When set into the objective function:
Z (7, 2)  z = N (3000* 7 + 5000*2) = N31, 000
Z (3, 4)  z = N (3000*3 + 5000*4) =N29, 000

• Therefore, the maximum amount of money is


N31, 000, and this will happen when 7 suits and 2
gowns are made.
Demo - Simplex Method

1. Express the linear programming problem in its


canonical form.
2. Obtain the initial basic feasible solution
expressed in tabular form called “Initial Simplex
Tableau”.
3. Optimize (iteration), while the current solution
is not the best (a positive coefficient in the
Objective function exists)
4. Write Decision variable = corresponding
Quantity value for all decision variables.
Simplex Method Optimizing Iteration

• Locate the decision variable of the objective


function with the highest positive coefficient to
become entering basic variable, and make its
column the current pivot column.
• Determine which of the current basic variables will
be leaving, which would be replaced in the new
tableau by entering basic variable, and make its row
the current pivot row:
– use each of the positive (non-negative, non-zero) values
in the pivots column to divide its corresponding right-
hand side value
– The basic variable associated with the least derived
value is selected to leave
Simplex Method Optimizing End
• The element/value at the intersection of the pivot row
and pivot column becomes the pivot element.
• Construct a new tableau; each element in the pivot row
becomes its previous value divided by the value of the
pivot element, and each element in the pivot column,
except the pivot, becomes zero, in the new table.
• The values of the other elements are derived using the
formula N = F – (RC/P), Where N = the new value, F = the
former value, R = the corresponding value in the pivot
row which is in the same column as F, C = the
corresponding value in the pivot column which is in the
same row as F, and P = the current pivot element.
• The new solution becomes the current solution.
Demo - Simplex Method cont’d
Recall the Model:
The objective:
Maximize z = 3000x + 5000y .....................(i)
Constraints:
Subject to
2x + y ≤ 16 ……………………………. (ii)
x + 2y ≤ 11 …………………………… (iii)
x + 3y ≤ 15 …………………………… (iv)
x ≥ 0, y ≥ 0 non-negativity
Demo - Simplex Method cont’d
• First, slack variables are introduced to remove
the inequalities and put the model in canonical
form:
Maximize z = 3000x + 5000y + a(0) + b(0) + c(0)
Subject to 2x + y + a = 16
x + 2y + b = 11
x + 3y + c = 15
x, y ≥ 0
Demo - Simplex Method cont’d
• The initial basic feasible solution is easily
gotten by assuming no production i.e. x = y = 0
• i.e. z = 3000(0) + 5000(0) + 0*(a=16) +
0*(b=11) + 0*(c=15) = 0
Demo - Simplex Method cont’d
• The Initial Simplex Tableau:
Basic
x y a b c quantity

a 2 1 1 0 0 16

b 1 2 0 1 0 11

c 1 3 0 0 1 15

Z 3, 000 5, 000 0 0 0 0

•The current Solution is not optimal


Demo - Simplex Method cont’d

New Tableau in Development


 
Basic X y a b c quantity

A 0
B 0
y 1 1 0 0 1ൗ 5
/3 3
Z 0

Next, the remaining elements of rows a, b & z have to be replaced with new values

using the formula;

N = F – RC
P
Demo - Simplex Method cont’d
• The Old Tableau:
Basic
x y a b c quantity

a 2 1 1 0 0 16

b 1 2 0 1 0 11

c 1 3 0 0 1 15

Z 3, 000 5, 000 0 0 0 0
Demo - Simplex Method cont’d
The new simplex tableau is

 
Basic x y a b c quantity

A 12/3 0 1 0 - 1 /3 11
1
B /3 0 0 1 - 2 /3 1
1 1
y /3 1 0 0 /3 5
Z 1,3331/3 0 0 0 -1,6662/3 -25, 000

This current solution, produce 5 units of y alone, is not optimal. x is the variable of

the objective function z with a positive coefficient; therefore, x is the entering basic variable,

and the x column becomes the pivot column.


Demo - Simplex Method cont’d

Current Tableau
  Basic
x Y a b c quantity

a 12/3 0 1 0 -1/3 11

b 1
/3 0 0 1 -2/3 1

y 1
/3 1 0 0 1
/3 5

Z 1,3331/3 0 0 0 -1,6662/3 -25, 000


Demo - Simplex Method cont’d

Final Tableau after two more Iterations


  Basic
x Y a b c quantity

c 0 0 1
/3 -5/3 1 2

x 1 0 2
/3 -1/3 0 7

y 0 1 -1/3 2
/3 0 2

Z 0 0 -1, 000/3 -7, 000/3 0 -31, 000


Demo - Simplex Method End
Simplex method Choice rule -
• Tie for the entering basic variable
• Tie for the leaving basic variable – degeneracy
• No leaving basic variable – unbounded Z
• Multiple optimal solutions (Hillier & Lieberman,
1995).
Linear Programming cont’d

Exercise

JKL Ltd produces two types of personal computer – Laptop and Desktop. The contribution to profit of
 
a laptop is N5, 000 and of a desktop N 4, 000. Each personal computer is produced through three

departments; the hours required per product, and available hours are given below –

Product Laptop Desktop Available


Department Hours
A 6 3 36
B 1 2 12
C 1 1 7

Determine the quantities of laptops and desktops to achieve to maximize profit.


References
• Adewoye, S.O. & Okwa, L.I. (2005). Introduction to
Operational Research. Yaba, Lagos, Ng: Authors
• Hillier, F S & Lieberman, G J (1995). Introduction
to Operations Research. Singapore: McGraw-Hill
Assignment
• Each group is required to meet, at least, 4 times,
each meeting lasting, at least, 2 hours.
• A report of attendance and contribution of each
member is required, first week of November.
• Tabulated report should have columns for name,
class number, date (value for member would be
fraction of time the individual was present at
the meeting), and whether active/partially
active/partially passive/passive.
Test 01 – CS (10 marks) 20 Min.
1. What decisions would you recommend employing the MaxiMin (3 marks), Maximum
Likelihood (3 marks) and the Expected Value methods (7 marks), given the following
payoff matrix? Which decision will you go with, and why? (2 marks)
Poor Weather Fair Weather Good Weather
Plant A 24 35 40
Plant B 18 30 45
Plant C 30 25 25
Plant D 50 20 20
Probability 0.3 0.2 0.5
TEST – CS(B) 2017/18
You sell tomatoes in a market. You do not know in advance the number of
cases of tomatoes that will be sold tomorrow, but you must decide today
how many cases to stock in order to maximize profits. You can purchase
tomatoes for =N=3,000 per case and sell them for =N=8,000 per case. The
tomatoes have no value after the first day that they are offered for sale. An
analysis of past sales has given you the following information:
Cases Sold Daily Probability
10 0.2
11 0.4
12 0.3
13 0.1

A. Construct the pay-off matrix. (6 marks)


B. What decision is recommended by Maximum Likelihood approach? (4
marks)
Test CIS-2016/17

Fayol is playing against Olu, and intends to deploy


strategy A, B, or C against Olu’s strategy X, Y, or Z. If
Olu employs strategy X, strategy A, B, or C will grant
Fayol 100, 40, or 90 points, respectively; if Olu
employs strategy Y, strategy A, B, or C will grant Fayol
60, 150, or 50 points, respectively; and if Olu employs
strategy Z, strategy A, B, or C will grant Fayol 75, 50,
or 125 points, respectively.
A. Construct the pay-off matrix (3 marks).
B. What optimistic and what pessimistic (naïve)
decision(s) would you recommend for Olu? (7
Marks)
Test CS(A) 2017/18

You are deciding which one of four crops to grow on 2,000 acres of
land. You are given the following estimate of crop yields and your
prices per bushel under various weather conditions:

Weather Expected Yield, Bushel/Acre


Crop 1 Crop 2 Crop 3 Crop 4
Dry 20 15 30 40
Moderate 35 20 25 40
Damp 40 30 25 40
Price per 100 150 100 50
bushel, =N=

A. Develop a payoff matrix of this problem. (6 marks)


B. What pessimistic decision is recommended? (4 marks)

You might also like