SlideShare a Scribd company logo
Linear Programming
Vikash Singh
Senior Data Scientist, MBA, BSc (Statistics), UGC Net
18+ years of experience in DS, ML, AI and Strategy
Session 7
• Introduction to Linear Programming Problems
• LPP Formulations
• Graphical Solution
Session 8
• Simplex method
• Training on Excel
What we will cover:
• Linear Programming Problems (LPP): Linear programming or linear optimization is a process
which takes into consideration certain linear relationships to obtain the best possible solution
to a mathematical model. It is also denoted as LPP.
• Linear programming is a process that is used to determine the best outcome of a linear
function. It is the best method to perform linear optimization by making a few simple
assumptions.
• The linear function is known as the objective function.
• Real-world relationships can be extremely complicated. However, linear programming can be
used to depict such relationships, thus, making it easier to analyze them.
LPP
• Simplex Method is one of the most powerful & popular
methods for linear programming.
• The simplex method is an iterative procedure for getting the
most feasible solution. In this method, we keep transforming
the value of basic variables to get maximum value for the
objective function.
Simplex Method
Simplex Solution
Maximize P: 6x + 5y + 4z
subject to 2x + y + z <= 180
x + 3y + 2z <= 300
2x + y + 2z <= 240
x, y, z >=0
Simplex Solution - Steps
Maximize P: 6x + 5y + 4z
subject to 2x + y + z <= 180
x + 3y + 2z <= 300
2x + y + 2z <= 240
x, y, z >=0
1 Slack Variables
2x + y + z + u = 180
x + 3y + 2z + v = 300
2x + y + 2z + w = 240
2 Rewrite the objective function
P - 6x - 5y - 4z = 0
177 < 180
177 + 3 = 180
1. Simplex Table
x y z u v w P C
2 1 1 1 0 0 0 180
1 3 2 0 1 0 0 300
2 1 2 0 0 1 0 240
-6 -5 -4 0 0 0 1 0
Maximize P: 6x + 5y + 4z
subject to 2x + y + z <= 180
x + 3y + 2z <= 300
2x + y + 2z <= 240
x, y, z >=0
1 Slack Variables
2x + y + z + u = 180
x + 3y + 2z + v = 300
2x + y + 2z + w = 240
2 Rewrite the objective function
P - 6x - 5y - 4z = 0
x y z u v w P C
2 1 1 1 0 0 0 180
1 3 2 0 1 0 0 300
2 1 2 0 0 1 0 240
-6 -5 -4 0 0 0 1 0
2. Pivot Column
Pivot column is the one with smallest value which is -6 so this becomes my
pivot column.
2. Pivot Row
Divide the constants by corresponding values of the pivot column.
Coefficients and constants
x y z u v w P C
2 1 1 1 0 0 0 180 180/2
1 3 2 0 1 0 0 300 300/1
2 1 2 0 0 1 0 240 240/2
-6 -5 -4 0 0 0 1 0
Pivot Row
Divide the constants by corresponding values of the pivot column.
x y z u v w P C
2 1 1 1 0 0 0 180 180/2 90
1 3 2 0 1 0 0 300 300/1 300
2 1 2 0 0 1 0 240 240/2 120
-6 -5 -4 0 0 0 1 0
this is smallest,
so becomes
pivot row.
2 is the pivot cell
Multiply the pivot row so that the pivot cell becomes 1
x y z u v w P C
2 1 1 1 0 0 0 180 180/2
1 3 2 0 1 0 0 300 300/1
2 1 2 0 0 1 0 240 240/2
-6 -5 -4 0 0 0 1 0
x y z u v w P C
1/2 R1 1 1/2 1/2 1/2 0 0 0 90
1 3 2 0 1 0 0 300
2 1 2 0 0 1 0 240
-6 -5 -4 0 0 0 1 0
No change anything in 2nd and 3rd row
Make the other elements of the pivot column to zero
x y z u v w P C
1/2 R1 1 1/2 1/2 1/2 0 0 0 90
1 3 2 0 1 0 0 300
2 1 2 0 0 1 0 240
-6 -5 -4 0 0 0 1 0
Make the other elements of the pivot column to zero
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
R2 - 1 R1 0 5/2 3/2 -1/2 1 0 0 210
R3 - 2 R1 0 0 1 -1 0 1 0 60
R4 + 6 R1 0 -2 -1 3 0 0 1 540
x y z u v w P C
1/2 R1 1 1/2 1/2 1/2 0 0 0 90
1 3 2 0 1 0 0 300
2 1 2 0 0 1 0 240
-6 -5 -4 0 0 0 1 0
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
0 5/2 3/2 -1/2 1 0 0 210
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
Now which column is the pivot column????
Now this is the new table.
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
0 5/2 3/2 -1/2 1 0 0 210
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
we have two negatives, and the largest negative is -2. so that becomes now
a pivot column.
Now this is the new table.
Find the pivot row???
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90 90/(1/2)
0 5/2 3/2 -1/2 1 0 0 210 210/(5/2)
0 0 1 -1 0 1 0 60 60/0 this does not count, so 84 is the smallest.
0 -2 -1 3 0 0 1 540
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
0 5/2 3/2 -1/2 1 0 0 210
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
Make pivot cell equal to 1
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
0 5/2 3/2 -1/2 1 0 0 210
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
2/5 R2 0 1 3/5 -1/5 2/5 0 0 84
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
Make other cells of pivot row zero
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
2/5 R2 0 1 3/5 -1/5 2/5 0 0 84
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
x y z u v w P C
R1 - 1/2 R2 1 0 1/5 3/5 -1/5 0 0 48
0 1 3/5 -1/5 2/5 0 0 84
0 0 1 -1 0 1 0 60
R4 + 2 R2 0 0 1/5 13/5 4/5 0 1 708
Make other cells of pivot row zero
x y z u v w P C
1 1/2 1/2 1/2 0 0 0 90
2/5 R2 0 1 3/5 -1/5 2/5 0 0 84
0 0 1 -1 0 1 0 60
0 -2 -1 3 0 0 1 540
x y z u v w P C
R1 - 1/2 R2 1 0 1/5 3/5 -1/5 0 0 48
0 1 3/5 -1/5 2/5 0 0 84
0 0 1 -1 0 1 0 60
R4 + 2 R2 0 0 1/5 13/5 4/5 0 1 708
Now we have no negative cells in last row
Final simplex matrix
x y z u v w P C
1 0 1/5 3/5 -1/5 0 0 48
0 1 3/5 -1/5 2/5 0 0 84
0 0 0 -1 0 1 0 60
0 0 1/5 13/5 4/5 0 1 708
• In a simplex matrix, the variables that have a unit column are called basic variables.
• A unit column is a column that is all zeros except for a single one.
• The variables that are not a unit column, i.e. a column of junk, are called non-basic variables.
Final simplex matrix
x y z u v w P C
1 0 1/5 3/5 -1/5 0 0 48
0 1 3/5 -1/5 2/5 0 0 84
0 0 0 -1 0 1 0 60
0 0 1/5 13/5 4/5 0 1 708
• In a simplex matrix, the variables that have a unit column are called basic variables.
• A unit column is a column that is all zeros except for a single one.
• The variables that are not a unit column, i.e. a column of junk, are called non-basic variables.
• The non-basic variables act like parameters and thus in the simplex process, we set their values to
zero.
Final simplex matrix
Maximize P: 6x + 5y + 4z: This is happening at x = 48, y = 84, z =0, P = 708
x y z u v w P C
1 0 1/5 3/5 -1/5 0 0 48
0 1 3/5 -1/5 2/5 0 0 84
0 0 0 -1 0 1 0 60
0 0 1/5 13/5 4/5 0 1 708
x 48 u 0
y 84 v 0
z 0 w 60
max 708
Maximize P: 6x + 5y + 4z
subject to 2x + y + z <= 180
x + 3y + 2z <= 300
2x + y + 2z <= 240
x, y, z >=0
Formulation of LPP in MS-Excel
Problem:
The World Light Company produces two light fixtures (product 1 and 2) that require both metal frame parts and
electrical components. Management wants to determine how many units of each product to produce so as to maximize
profit. For each unit of the product 1, 1 unit of frame parts and 2 units of electrical components are required. For each
unit of product 2, 3 units of frame parts and 2 units of electrical components are required. The company has 200 units
of frame parts and 300 units of electrical components. Each unit of product 1 gives a profit of $1, and each unit of
product 2, upto 60 units, gives a profit of $2. Any excess over 60 units of product 2 brings no profit, so such an
excess has to be ruled out.
(a) Formulate the LP model for this problem
(b) Use the graphical method to solve this model. What is the resulting total profit?
(c) Solve this using MS-Excel solver, Python and R-programing (optional).
Problem Definition
The WorldLight Company produces two light fixtures (product 1 and 2) that require both metal frame parts and
electrical components. Management wants to determine how many units of each product to produce so as to maximize
profit.
Number of units of Product 1 and Product 2.
Let X1, be the number of units of Product 1
X2, be the number of units of Product 2
Identifying the variables
Problem Definition
Each unit of product 1 gives a profit of $1, and each unit of product 2, upto 60 units,
gives a profit of $2.
Objective of the problem is to maximize the profit
Max Z = P = 1 * X1 + 2 * X2
5 units of pr 1 = x1 = 5
4 units of pr 2 = x2 = 4
P = 5 * 1 + 4 * 2 = 13dollars
Identify the objective of the problem:
Problem Definition
For each unit of the product 1, 1 unit of frame parts and 2 units of electrical components are required. For each unit of
product 2, 3 units of frame parts and 2 units of electrical components are required. The company has 200 units of
frame parts and 300 units of electrical components.
Any excess over 60 units of product 2 brings no profit, so such an excess has to be ruled out.
Constraints:
Constraints Product 1 Product 2 Availabilit
y
Raw material
constraint:
Metal frame parts 1 3 200
Electrical
components
2 2 300
Production
constraint:
<=60
Problem Definition
Raw material constraint:
For Metal frame:
1X1 + 3X2 <=200
For Electrical component:
2X1 + 2X2 <=300
Production constraint:
For Product 2:
X2<=60
Constraints:
Constraints Product 1 Product 2 Availability
Raw material
constraint:
Metal frame parts 1 3 200
Electrical
components
2 2 300
Production
constraint:
<=60
Non-negativity condition:
X1,X2>=0
Problem Definition
Objective function:
Max Z = 1X1 + 2X2
Subject to the constraint:
Raw material constraint:
For Metal frame:
1X1 + 3X2 <=200
For Electrical component:
2X1 + 2X2 <=300
Production constraint:
For Product 2:
X2<=60
Non-negativity condition:
X1,X2>=0
Problem:
Problem Definition – In Excel
Problem:
Problem Definition – In Excel
Problem:
Problem Definition – In Excel
Solver in MS-Excel:
Installing Solver in Windows
Installing Solver in Mac OS
Problem Definition – In Excel
Problem:
Problem Definition – In Excel
Solver Parameters:
Objective function
Decision variables
Constrains
Solving method
Problem Definition – In Excel
Solver Parameters:
Objective function
Decision variables
Constrains
Solving method
Problem solving – In Excel
Solver in MS-Excel:
Objective function
Decision variables
Constrains
Solving method
Problem solving – In Excel
Problem:
Solution– In Excel
Problem:
Hence the company should produce 1 unit of X1 and 2 units of X2 to make the maximum profit of 180.
This is achieved by using 180 units of metal frame and 300 units of electrical component.
The number of units of product 2 has not exceeded 60 units as defined in the constraint
MBA Semester linear analysis and programming function
• https://www.cuemath.com/algebra/linear-programming/
• https://www.analyticsvidhya.com/blog/2017/02/lintroductory-guide-on-linear-programming-
explained-in-simple-english/
• https://www.spiceworks.com/tech/it-strategy/articles/linear-
programming/#:~:text=Linear%20programming%20(LP)%20uses%20many,restrictions%20of%20sup
plies%20and%20personnel.
• https://www.youtube.com/watch?v=rQt_SWrOktg&ab_channel=TimMelvin
• https://www.youtube.com/watch?v=y9WWTi5sffo&ab_channel=DrD%E2%80%99sMathHelp
• Study material- https://drive.google.com/drive/folders/1J_eV95KDwMDlGvvlGkCpEZM2Taial-Db
References

More Related Content

DOCX
Simplex method - Maximisation Case
PPTX
Linear programming manzoor nabi
PPT
OR Linear Programming
PPT
L20 Simplex Method
PPT
4-The Simplex Method.ppt
PPTX
Solution of LPP by Simplex Method with Examples
PDF
simplex method for operation research .pdf
PPTX
Scientific Computing and linear programming
Simplex method - Maximisation Case
Linear programming manzoor nabi
OR Linear Programming
L20 Simplex Method
4-The Simplex Method.ppt
Solution of LPP by Simplex Method with Examples
simplex method for operation research .pdf
Scientific Computing and linear programming

Similar to MBA Semester linear analysis and programming function (20)

PPTX
Or graphical method, simplex method
PPTX
Operations Research
PPTX
performance management and Resource optimization part-2.pptx
PPTX
Operation reasearch
PPTX
Operation Research
PPT
n7-LP-simplex.ppt
PDF
simplex method ppt_ibh.pdfjjsjjsjskhhsjjjj
PPT
Simplex Method
PPTX
Management Science
PDF
BCom(Hons)_2year_BMaths_1&2_Harish Kumar.pdf
PDF
Linearprog, Reading Materials for Operational Research
PPTX
Linear programming
PPT
Simplex Method for Linear Programming - Operations Research
 
PDF
Determination of Optimal Product Mix for Profit Maximization using Linear Pro...
PDF
Determination of Optimal Product Mix for Profit Maximization using Linear Pro...
PPTX
Linear Programming
PPT
Solving Linear programming problem by Simplex method.ppt
PPTX
MFCS2-Module1.pptx
Or graphical method, simplex method
Operations Research
performance management and Resource optimization part-2.pptx
Operation reasearch
Operation Research
n7-LP-simplex.ppt
simplex method ppt_ibh.pdfjjsjjsjskhhsjjjj
Simplex Method
Management Science
BCom(Hons)_2year_BMaths_1&2_Harish Kumar.pdf
Linearprog, Reading Materials for Operational Research
Linear programming
Simplex Method for Linear Programming - Operations Research
 
Determination of Optimal Product Mix for Profit Maximization using Linear Pro...
Determination of Optimal Product Mix for Profit Maximization using Linear Pro...
Linear Programming
Solving Linear programming problem by Simplex method.ppt
MFCS2-Module1.pptx
Ad

Recently uploaded (20)

PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPTX
joggers park landscape assignment bandra
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PDF
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PPTX
AD Bungalow Case studies Sem 2.pptxvwewev
PPTX
EDP Competencies-types, process, explanation
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
DOCX
actividad 20% informatica microsoft project
PPT
Machine printing techniques and plangi dyeing
PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PDF
Urban Design Final Project-Site Analysis
PPTX
Media And Information Literacy for Grade 12
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
joggers park landscape assignment bandra
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
BRANDBOOK-Presidential Award Scheme-Kenya-2023
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
AD Bungalow Case studies Sem 2.pptxvwewev
EDP Competencies-types, process, explanation
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
mahatma gandhi bus terminal in india Case Study.pptx
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
actividad 20% informatica microsoft project
Machine printing techniques and plangi dyeing
Wisp Textiles: Where Comfort Meets Everyday Style
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
pump pump is a mechanism that is used to transfer a liquid from one place to ...
Urban Design Final Project-Site Analysis
Media And Information Literacy for Grade 12
Ad

MBA Semester linear analysis and programming function

  • 1. Linear Programming Vikash Singh Senior Data Scientist, MBA, BSc (Statistics), UGC Net 18+ years of experience in DS, ML, AI and Strategy
  • 2. Session 7 • Introduction to Linear Programming Problems • LPP Formulations • Graphical Solution Session 8 • Simplex method • Training on Excel What we will cover:
  • 3. • Linear Programming Problems (LPP): Linear programming or linear optimization is a process which takes into consideration certain linear relationships to obtain the best possible solution to a mathematical model. It is also denoted as LPP. • Linear programming is a process that is used to determine the best outcome of a linear function. It is the best method to perform linear optimization by making a few simple assumptions. • The linear function is known as the objective function. • Real-world relationships can be extremely complicated. However, linear programming can be used to depict such relationships, thus, making it easier to analyze them. LPP
  • 4. • Simplex Method is one of the most powerful & popular methods for linear programming. • The simplex method is an iterative procedure for getting the most feasible solution. In this method, we keep transforming the value of basic variables to get maximum value for the objective function. Simplex Method
  • 5. Simplex Solution Maximize P: 6x + 5y + 4z subject to 2x + y + z <= 180 x + 3y + 2z <= 300 2x + y + 2z <= 240 x, y, z >=0
  • 6. Simplex Solution - Steps Maximize P: 6x + 5y + 4z subject to 2x + y + z <= 180 x + 3y + 2z <= 300 2x + y + 2z <= 240 x, y, z >=0 1 Slack Variables 2x + y + z + u = 180 x + 3y + 2z + v = 300 2x + y + 2z + w = 240 2 Rewrite the objective function P - 6x - 5y - 4z = 0 177 < 180 177 + 3 = 180
  • 7. 1. Simplex Table x y z u v w P C 2 1 1 1 0 0 0 180 1 3 2 0 1 0 0 300 2 1 2 0 0 1 0 240 -6 -5 -4 0 0 0 1 0 Maximize P: 6x + 5y + 4z subject to 2x + y + z <= 180 x + 3y + 2z <= 300 2x + y + 2z <= 240 x, y, z >=0 1 Slack Variables 2x + y + z + u = 180 x + 3y + 2z + v = 300 2x + y + 2z + w = 240 2 Rewrite the objective function P - 6x - 5y - 4z = 0
  • 8. x y z u v w P C 2 1 1 1 0 0 0 180 1 3 2 0 1 0 0 300 2 1 2 0 0 1 0 240 -6 -5 -4 0 0 0 1 0 2. Pivot Column Pivot column is the one with smallest value which is -6 so this becomes my pivot column.
  • 9. 2. Pivot Row Divide the constants by corresponding values of the pivot column. Coefficients and constants x y z u v w P C 2 1 1 1 0 0 0 180 180/2 1 3 2 0 1 0 0 300 300/1 2 1 2 0 0 1 0 240 240/2 -6 -5 -4 0 0 0 1 0
  • 10. Pivot Row Divide the constants by corresponding values of the pivot column. x y z u v w P C 2 1 1 1 0 0 0 180 180/2 90 1 3 2 0 1 0 0 300 300/1 300 2 1 2 0 0 1 0 240 240/2 120 -6 -5 -4 0 0 0 1 0 this is smallest, so becomes pivot row. 2 is the pivot cell
  • 11. Multiply the pivot row so that the pivot cell becomes 1 x y z u v w P C 2 1 1 1 0 0 0 180 180/2 1 3 2 0 1 0 0 300 300/1 2 1 2 0 0 1 0 240 240/2 -6 -5 -4 0 0 0 1 0 x y z u v w P C 1/2 R1 1 1/2 1/2 1/2 0 0 0 90 1 3 2 0 1 0 0 300 2 1 2 0 0 1 0 240 -6 -5 -4 0 0 0 1 0 No change anything in 2nd and 3rd row
  • 12. Make the other elements of the pivot column to zero x y z u v w P C 1/2 R1 1 1/2 1/2 1/2 0 0 0 90 1 3 2 0 1 0 0 300 2 1 2 0 0 1 0 240 -6 -5 -4 0 0 0 1 0
  • 13. Make the other elements of the pivot column to zero x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 R2 - 1 R1 0 5/2 3/2 -1/2 1 0 0 210 R3 - 2 R1 0 0 1 -1 0 1 0 60 R4 + 6 R1 0 -2 -1 3 0 0 1 540 x y z u v w P C 1/2 R1 1 1/2 1/2 1/2 0 0 0 90 1 3 2 0 1 0 0 300 2 1 2 0 0 1 0 240 -6 -5 -4 0 0 0 1 0
  • 14. x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 0 5/2 3/2 -1/2 1 0 0 210 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540 Now which column is the pivot column???? Now this is the new table.
  • 15. x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 0 5/2 3/2 -1/2 1 0 0 210 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540 we have two negatives, and the largest negative is -2. so that becomes now a pivot column. Now this is the new table.
  • 16. Find the pivot row??? x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 90/(1/2) 0 5/2 3/2 -1/2 1 0 0 210 210/(5/2) 0 0 1 -1 0 1 0 60 60/0 this does not count, so 84 is the smallest. 0 -2 -1 3 0 0 1 540 x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 0 5/2 3/2 -1/2 1 0 0 210 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540
  • 17. Make pivot cell equal to 1 x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 0 5/2 3/2 -1/2 1 0 0 210 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540 x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 2/5 R2 0 1 3/5 -1/5 2/5 0 0 84 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540
  • 18. Make other cells of pivot row zero x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 2/5 R2 0 1 3/5 -1/5 2/5 0 0 84 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540 x y z u v w P C R1 - 1/2 R2 1 0 1/5 3/5 -1/5 0 0 48 0 1 3/5 -1/5 2/5 0 0 84 0 0 1 -1 0 1 0 60 R4 + 2 R2 0 0 1/5 13/5 4/5 0 1 708
  • 19. Make other cells of pivot row zero x y z u v w P C 1 1/2 1/2 1/2 0 0 0 90 2/5 R2 0 1 3/5 -1/5 2/5 0 0 84 0 0 1 -1 0 1 0 60 0 -2 -1 3 0 0 1 540 x y z u v w P C R1 - 1/2 R2 1 0 1/5 3/5 -1/5 0 0 48 0 1 3/5 -1/5 2/5 0 0 84 0 0 1 -1 0 1 0 60 R4 + 2 R2 0 0 1/5 13/5 4/5 0 1 708 Now we have no negative cells in last row
  • 20. Final simplex matrix x y z u v w P C 1 0 1/5 3/5 -1/5 0 0 48 0 1 3/5 -1/5 2/5 0 0 84 0 0 0 -1 0 1 0 60 0 0 1/5 13/5 4/5 0 1 708 • In a simplex matrix, the variables that have a unit column are called basic variables. • A unit column is a column that is all zeros except for a single one. • The variables that are not a unit column, i.e. a column of junk, are called non-basic variables.
  • 21. Final simplex matrix x y z u v w P C 1 0 1/5 3/5 -1/5 0 0 48 0 1 3/5 -1/5 2/5 0 0 84 0 0 0 -1 0 1 0 60 0 0 1/5 13/5 4/5 0 1 708 • In a simplex matrix, the variables that have a unit column are called basic variables. • A unit column is a column that is all zeros except for a single one. • The variables that are not a unit column, i.e. a column of junk, are called non-basic variables. • The non-basic variables act like parameters and thus in the simplex process, we set their values to zero.
  • 22. Final simplex matrix Maximize P: 6x + 5y + 4z: This is happening at x = 48, y = 84, z =0, P = 708 x y z u v w P C 1 0 1/5 3/5 -1/5 0 0 48 0 1 3/5 -1/5 2/5 0 0 84 0 0 0 -1 0 1 0 60 0 0 1/5 13/5 4/5 0 1 708 x 48 u 0 y 84 v 0 z 0 w 60 max 708 Maximize P: 6x + 5y + 4z subject to 2x + y + z <= 180 x + 3y + 2z <= 300 2x + y + 2z <= 240 x, y, z >=0
  • 23. Formulation of LPP in MS-Excel Problem: The World Light Company produces two light fixtures (product 1 and 2) that require both metal frame parts and electrical components. Management wants to determine how many units of each product to produce so as to maximize profit. For each unit of the product 1, 1 unit of frame parts and 2 units of electrical components are required. For each unit of product 2, 3 units of frame parts and 2 units of electrical components are required. The company has 200 units of frame parts and 300 units of electrical components. Each unit of product 1 gives a profit of $1, and each unit of product 2, upto 60 units, gives a profit of $2. Any excess over 60 units of product 2 brings no profit, so such an excess has to be ruled out. (a) Formulate the LP model for this problem (b) Use the graphical method to solve this model. What is the resulting total profit? (c) Solve this using MS-Excel solver, Python and R-programing (optional).
  • 24. Problem Definition The WorldLight Company produces two light fixtures (product 1 and 2) that require both metal frame parts and electrical components. Management wants to determine how many units of each product to produce so as to maximize profit. Number of units of Product 1 and Product 2. Let X1, be the number of units of Product 1 X2, be the number of units of Product 2 Identifying the variables
  • 25. Problem Definition Each unit of product 1 gives a profit of $1, and each unit of product 2, upto 60 units, gives a profit of $2. Objective of the problem is to maximize the profit Max Z = P = 1 * X1 + 2 * X2 5 units of pr 1 = x1 = 5 4 units of pr 2 = x2 = 4 P = 5 * 1 + 4 * 2 = 13dollars Identify the objective of the problem:
  • 26. Problem Definition For each unit of the product 1, 1 unit of frame parts and 2 units of electrical components are required. For each unit of product 2, 3 units of frame parts and 2 units of electrical components are required. The company has 200 units of frame parts and 300 units of electrical components. Any excess over 60 units of product 2 brings no profit, so such an excess has to be ruled out. Constraints: Constraints Product 1 Product 2 Availabilit y Raw material constraint: Metal frame parts 1 3 200 Electrical components 2 2 300 Production constraint: <=60
  • 27. Problem Definition Raw material constraint: For Metal frame: 1X1 + 3X2 <=200 For Electrical component: 2X1 + 2X2 <=300 Production constraint: For Product 2: X2<=60 Constraints: Constraints Product 1 Product 2 Availability Raw material constraint: Metal frame parts 1 3 200 Electrical components 2 2 300 Production constraint: <=60 Non-negativity condition: X1,X2>=0
  • 28. Problem Definition Objective function: Max Z = 1X1 + 2X2 Subject to the constraint: Raw material constraint: For Metal frame: 1X1 + 3X2 <=200 For Electrical component: 2X1 + 2X2 <=300 Production constraint: For Product 2: X2<=60 Non-negativity condition: X1,X2>=0 Problem:
  • 29. Problem Definition – In Excel Problem:
  • 30. Problem Definition – In Excel Problem:
  • 31. Problem Definition – In Excel Solver in MS-Excel:
  • 34. Problem Definition – In Excel Problem:
  • 35. Problem Definition – In Excel Solver Parameters: Objective function Decision variables Constrains Solving method
  • 36. Problem Definition – In Excel Solver Parameters: Objective function Decision variables Constrains Solving method
  • 37. Problem solving – In Excel Solver in MS-Excel: Objective function Decision variables Constrains Solving method
  • 38. Problem solving – In Excel Problem:
  • 39. Solution– In Excel Problem: Hence the company should produce 1 unit of X1 and 2 units of X2 to make the maximum profit of 180. This is achieved by using 180 units of metal frame and 300 units of electrical component. The number of units of product 2 has not exceeded 60 units as defined in the constraint
  • 41. • https://www.cuemath.com/algebra/linear-programming/ • https://www.analyticsvidhya.com/blog/2017/02/lintroductory-guide-on-linear-programming- explained-in-simple-english/ • https://www.spiceworks.com/tech/it-strategy/articles/linear- programming/#:~:text=Linear%20programming%20(LP)%20uses%20many,restrictions%20of%20sup plies%20and%20personnel. • https://www.youtube.com/watch?v=rQt_SWrOktg&ab_channel=TimMelvin • https://www.youtube.com/watch?v=y9WWTi5sffo&ab_channel=DrD%E2%80%99sMathHelp • Study material- https://drive.google.com/drive/folders/1J_eV95KDwMDlGvvlGkCpEZM2Taial-Db References