SlideShare a Scribd company logo
1 of 12
1
INTRODUCTION TO LINEAR PROGRAMMING
MAIN LEARNING OBLECTIVES
•Basic concept of linear optimization, and associated terminology
•Meaning and possible use of marginal values
•Strengths, weakness and limitations of LP technique
SUPPORTING EXAMPLES
•Two-Tanks Blending Problem : doing hand calculations
•Simple Refinery : using the computer
2
TWO-TANKS BLENDING PROBLEM
FLOW SCHEME
TANK 1
TANK 2
180 $/T
500 T
0.8% S
150 $/T
600 T
2.5% S
TANK 3
170 $/T
MAX 800 T
MAX 2.0% S
3
TWO-TANKS BLENDING PROBLEM
Supply X1 LT/EQ 500
X2 LT/EQ 600
Demand X1+X2 LT/EQ 800
Quality 0.8*X1+2.5*X2 LT/EQ 2.0*(X1+X2)
or -1.2*X1+0.5*X2 LT/EQ 0
Objective (170-180)*X1 + (170-150)*X2 MAX
Equations (1/2)
4
TWO-TANKS BLENDING PROBLEM
0
200
400
300 600
lines of constant proceeds
increasing
profit
feasible
region
optimum
S spec
Demand
Max X1
Max X2
X1
X2
A
B C
D
GRAPHICAL SOLUTION
5
TWO-TANKS BLENDING PROBLEM
Transform the inequalities into equalities
Supply +X1 +S1 = 500
+X2 +S2 = 600
Demand +X1 +X2 +S3 = 800
Quality +X1*(-1.2) +X2*(0.5) +S4 = 0
Objective +X1*170 +X2*170 +S1*180 +S2*150 = P
or +X1*(-10) +X2*20 +180000 = P
Si’s are called slack variables.
Equations (2/2)
6
TWO-TANKS BLENDING PROBLEM
Columns : X1 X2 S1 S2 S3 S4 RHS
Rows :
E1 Supply1 1 1 500
E2 Supply2 1 1 600
E3 Demand 1 1 1 800
E4 Quality -1.2 0.5 1 0
E5 Stock value 170 170 180 150 P
LP MATRIX
7
TWO-TANKS BLENDING PROBLEM
E1'=E1*(-180) : Supply1 -180 -180 -90000
E2'=E2*(-150) : Supply2 -150 -150 -90000
E5'=E5+E1'+E2’: Proceeds -10 20 0 0 0 0 P- 180000
E1 Supply1 1 1 500
E2 Supply2 1 1 600
E3 Demand 1 1 1 800
E4 Quality -1.2 0.5 1 0
E5 = E5’ Proceeds -10 20 0 0 0 0 P- 180000
Canonical form of the LP matrix : S1, S2, S3, S4 in the BASIS
X1 X2 S1 S2 S3 S4 RHS
Make objective function of X1 and X2 only
Increase X2 to increase proceeds:
•lowest max X2 is 0 (see E4);
•pivot column is X2; pivot row E4; pivot element is 0.5.
SIMPLEX METHOD (1/6)
8
TWO-TANKS BLENDING PROBLEM
E1 Supply1 1 1 500
E2-E4’=E2’ Supply2 2.4 1 -2 600
E3-E4’=E3’ Demand 3.4 1 -2 800
E4’=E4/0.5 Quality -2.4 1 2 0
E5-20*E4’=E5’ Objective 38 0 0 0 0 -40 P- 180000
X1 X2 S1 S2 S3 S4 RHS
Bring X2 into the basis; take S4 out:
•make coeff de X2 in E4 equal to 1
•eliminate X2 from other equations
Increase X1 to increase objective function:
•lowest max X1 is 235 (see E3’);
•pivot column is X1; pivot row E3’; pivot element is 3.4.
SIMPLEX METHOD (2/6)
9
TWO-TANKS BLENDING PROBLEM
E1=E1’-E3 Supply1 0 1 0.3 -0.6 265
E2=E2’-2.4*E3 Supply2 0 1 -0.7 -0.6 35
E3= E3’/3.4 Demand 1 0.3 -0.6 235
E4=E4’ Quality 0 1 0.7 0.6 565
E5=E5’-38*E3 Proceeds 0 0 0 0 -11 -18 P- 188941
X1 X2 S1 S2 S3 S4 RHS
Bring X1into the basis; take S3 out:
•make coeff of X1in E3 equal to 1
•eliminate X1from other equations
P max=188941 for S3 and S4 =0
Optimal solution:
•X1=235; S1=265
•X2=565; S2=35
SIMPLEX METHOD (3/6)
10
TWO-TANKS BLENDING PROBLEM
SIMPLEX METHOD (4/6)
Canonical form of the LP matrix with basic variables X1, ….., X9:
X1 + A1,10 * X10 + ………+ A1,j * Xj + ……….+ A1,n * Xn = B1
X2 + A2,10 * X10 + ………+ A2,j * Xj + ……….+ A2,n * Xn = B2
. . . . .
. . . . .
. . . . .
. . . . .
X9 + A9,10 * X10 + ……….+ A9,j * Xj + ………+ A9,n * Xn = B9
Basic Variables Non-basic (or independent) variables RHS
Objective (max), P - M10 * X10 - ……… - Mj * Xj - …… - Mn * Xn + constant = P
Mj’s = Dj’s in the mathematical LP theory
= marginal or dual values at the optimum (positive for non-basic variables;
zero for basic variables)
11
TWO-TANKS BLENDING PROBLEM
SIMPLEX METHOD (5/6)
RELATIONSHIP BETWEEN MARGINAL VALUES
Mi’s = marginal values for the rows
= marginal values of corresponding slack variables;
called dual prices (by LAMPS), or shadow prices …
Mj’s = marginal values for the columns
= marginal values of corresponding primary variables;
called reduced costs, or shadow costs …
(Input Cost)j
= coefficient of Xj in original objective (in original canonical equation) e.g.
input cost of X1 is -10, the cost of downgrading 1 ton of component 1
Mj = (reduced cost)j = Sum (Mi * Ai,j) - (input cost)j e.g.
M1 = +1*(marg.val.S1 = 0) + (+1)*(marg.val.S3 = 11.18) + (-1.2)*(marg.val.S4 = 17.65)
- (-10) = 0
12
TWO-TANKS BLENDING PROBLEM
SIMPLEX METHOD (6/6)
USING MARGINAL VALUES
•Marginal values are useful to understand constraints’ impact on objective function;
hence to conduct a ‘what if’ analysis.
•Marginal value of a non-basic - constrained - variable is meaningful when the
constraint is met i.e. at the margin, or for the last unit produced / used.
It does not represent the average unit contribution of that variable. It should not be used
to predict a (large) quantified change of the objective function.

More Related Content

Similar to Twotanks.ppt

chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
Surendra Loya
 
Duel simplex method_operations research .pptx
Duel simplex method_operations research .pptxDuel simplex method_operations research .pptx
Duel simplex method_operations research .pptx
Raja Manyam
 

Similar to Twotanks.ppt (20)

Aplicaciones de las derivadas
Aplicaciones de las  derivadasAplicaciones de las  derivadas
Aplicaciones de las derivadas
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
 
Electrical Engineering Assignment Help
Electrical Engineering Assignment HelpElectrical Engineering Assignment Help
Electrical Engineering Assignment Help
 
Lp (2)
Lp (2)Lp (2)
Lp (2)
 
Solution of matlab chapter 3
Solution of matlab chapter 3Solution of matlab chapter 3
Solution of matlab chapter 3
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
 
Simplex Method.pptx
Simplex Method.pptxSimplex Method.pptx
Simplex Method.pptx
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
 
simplex method for operation research .pdf
simplex method for operation research .pdfsimplex method for operation research .pdf
simplex method for operation research .pdf
 
SG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptxSG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptx
 
Management Science
Management ScienceManagement Science
Management Science
 
4. linear programming using excel solver
4. linear programming using excel solver4. linear programming using excel solver
4. linear programming using excel solver
 
Linear Programming.ppt
Linear Programming.pptLinear Programming.ppt
Linear Programming.ppt
 
Duel simplex method_operations research .pptx
Duel simplex method_operations research .pptxDuel simplex method_operations research .pptx
Duel simplex method_operations research .pptx
 
Functional Regression Analysis
Functional Regression AnalysisFunctional Regression Analysis
Functional Regression Analysis
 
4-The Simplex Method.ppt
4-The Simplex Method.ppt4-The Simplex Method.ppt
4-The Simplex Method.ppt
 
Derivada aplicada en la carrera de electrónica y automatización.
Derivada aplicada en la carrera de electrónica y automatización.Derivada aplicada en la carrera de electrónica y automatización.
Derivada aplicada en la carrera de electrónica y automatización.
 
qmb12ch08.pptx
qmb12ch08.pptxqmb12ch08.pptx
qmb12ch08.pptx
 
APLICACIONES DE LA DERIVADA EN LA CARRERA DE (Mecánica, Electrónica, Telecomu...
APLICACIONES DE LA DERIVADA EN LA CARRERA DE (Mecánica, Electrónica, Telecomu...APLICACIONES DE LA DERIVADA EN LA CARRERA DE (Mecánica, Electrónica, Telecomu...
APLICACIONES DE LA DERIVADA EN LA CARRERA DE (Mecánica, Electrónica, Telecomu...
 

Recently uploaded

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 

Recently uploaded (20)

2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 

Twotanks.ppt

  • 1. 1 INTRODUCTION TO LINEAR PROGRAMMING MAIN LEARNING OBLECTIVES •Basic concept of linear optimization, and associated terminology •Meaning and possible use of marginal values •Strengths, weakness and limitations of LP technique SUPPORTING EXAMPLES •Two-Tanks Blending Problem : doing hand calculations •Simple Refinery : using the computer
  • 2. 2 TWO-TANKS BLENDING PROBLEM FLOW SCHEME TANK 1 TANK 2 180 $/T 500 T 0.8% S 150 $/T 600 T 2.5% S TANK 3 170 $/T MAX 800 T MAX 2.0% S
  • 3. 3 TWO-TANKS BLENDING PROBLEM Supply X1 LT/EQ 500 X2 LT/EQ 600 Demand X1+X2 LT/EQ 800 Quality 0.8*X1+2.5*X2 LT/EQ 2.0*(X1+X2) or -1.2*X1+0.5*X2 LT/EQ 0 Objective (170-180)*X1 + (170-150)*X2 MAX Equations (1/2)
  • 4. 4 TWO-TANKS BLENDING PROBLEM 0 200 400 300 600 lines of constant proceeds increasing profit feasible region optimum S spec Demand Max X1 Max X2 X1 X2 A B C D GRAPHICAL SOLUTION
  • 5. 5 TWO-TANKS BLENDING PROBLEM Transform the inequalities into equalities Supply +X1 +S1 = 500 +X2 +S2 = 600 Demand +X1 +X2 +S3 = 800 Quality +X1*(-1.2) +X2*(0.5) +S4 = 0 Objective +X1*170 +X2*170 +S1*180 +S2*150 = P or +X1*(-10) +X2*20 +180000 = P Si’s are called slack variables. Equations (2/2)
  • 6. 6 TWO-TANKS BLENDING PROBLEM Columns : X1 X2 S1 S2 S3 S4 RHS Rows : E1 Supply1 1 1 500 E2 Supply2 1 1 600 E3 Demand 1 1 1 800 E4 Quality -1.2 0.5 1 0 E5 Stock value 170 170 180 150 P LP MATRIX
  • 7. 7 TWO-TANKS BLENDING PROBLEM E1'=E1*(-180) : Supply1 -180 -180 -90000 E2'=E2*(-150) : Supply2 -150 -150 -90000 E5'=E5+E1'+E2’: Proceeds -10 20 0 0 0 0 P- 180000 E1 Supply1 1 1 500 E2 Supply2 1 1 600 E3 Demand 1 1 1 800 E4 Quality -1.2 0.5 1 0 E5 = E5’ Proceeds -10 20 0 0 0 0 P- 180000 Canonical form of the LP matrix : S1, S2, S3, S4 in the BASIS X1 X2 S1 S2 S3 S4 RHS Make objective function of X1 and X2 only Increase X2 to increase proceeds: •lowest max X2 is 0 (see E4); •pivot column is X2; pivot row E4; pivot element is 0.5. SIMPLEX METHOD (1/6)
  • 8. 8 TWO-TANKS BLENDING PROBLEM E1 Supply1 1 1 500 E2-E4’=E2’ Supply2 2.4 1 -2 600 E3-E4’=E3’ Demand 3.4 1 -2 800 E4’=E4/0.5 Quality -2.4 1 2 0 E5-20*E4’=E5’ Objective 38 0 0 0 0 -40 P- 180000 X1 X2 S1 S2 S3 S4 RHS Bring X2 into the basis; take S4 out: •make coeff de X2 in E4 equal to 1 •eliminate X2 from other equations Increase X1 to increase objective function: •lowest max X1 is 235 (see E3’); •pivot column is X1; pivot row E3’; pivot element is 3.4. SIMPLEX METHOD (2/6)
  • 9. 9 TWO-TANKS BLENDING PROBLEM E1=E1’-E3 Supply1 0 1 0.3 -0.6 265 E2=E2’-2.4*E3 Supply2 0 1 -0.7 -0.6 35 E3= E3’/3.4 Demand 1 0.3 -0.6 235 E4=E4’ Quality 0 1 0.7 0.6 565 E5=E5’-38*E3 Proceeds 0 0 0 0 -11 -18 P- 188941 X1 X2 S1 S2 S3 S4 RHS Bring X1into the basis; take S3 out: •make coeff of X1in E3 equal to 1 •eliminate X1from other equations P max=188941 for S3 and S4 =0 Optimal solution: •X1=235; S1=265 •X2=565; S2=35 SIMPLEX METHOD (3/6)
  • 10. 10 TWO-TANKS BLENDING PROBLEM SIMPLEX METHOD (4/6) Canonical form of the LP matrix with basic variables X1, ….., X9: X1 + A1,10 * X10 + ………+ A1,j * Xj + ……….+ A1,n * Xn = B1 X2 + A2,10 * X10 + ………+ A2,j * Xj + ……….+ A2,n * Xn = B2 . . . . . . . . . . . . . . . . . . . . X9 + A9,10 * X10 + ……….+ A9,j * Xj + ………+ A9,n * Xn = B9 Basic Variables Non-basic (or independent) variables RHS Objective (max), P - M10 * X10 - ……… - Mj * Xj - …… - Mn * Xn + constant = P Mj’s = Dj’s in the mathematical LP theory = marginal or dual values at the optimum (positive for non-basic variables; zero for basic variables)
  • 11. 11 TWO-TANKS BLENDING PROBLEM SIMPLEX METHOD (5/6) RELATIONSHIP BETWEEN MARGINAL VALUES Mi’s = marginal values for the rows = marginal values of corresponding slack variables; called dual prices (by LAMPS), or shadow prices … Mj’s = marginal values for the columns = marginal values of corresponding primary variables; called reduced costs, or shadow costs … (Input Cost)j = coefficient of Xj in original objective (in original canonical equation) e.g. input cost of X1 is -10, the cost of downgrading 1 ton of component 1 Mj = (reduced cost)j = Sum (Mi * Ai,j) - (input cost)j e.g. M1 = +1*(marg.val.S1 = 0) + (+1)*(marg.val.S3 = 11.18) + (-1.2)*(marg.val.S4 = 17.65) - (-10) = 0
  • 12. 12 TWO-TANKS BLENDING PROBLEM SIMPLEX METHOD (6/6) USING MARGINAL VALUES •Marginal values are useful to understand constraints’ impact on objective function; hence to conduct a ‘what if’ analysis. •Marginal value of a non-basic - constrained - variable is meaningful when the constraint is met i.e. at the margin, or for the last unit produced / used. It does not represent the average unit contribution of that variable. It should not be used to predict a (large) quantified change of the objective function.