SlideShare a Scribd company logo
Linear optimization
• As a manager of a company, you always have finite or
limited resources, and top management's expectation is
for you to make the most out of it. From time
productivity to capital utilization, land to labor, and
from supply chain to production-almost everything you
do is to optimize productivity.
• A majority of airlines optimize flight schedules to get
the highest revenue and lowest cost. These airlines
schedules involve a lot of situations and restrictions
such as the number of planes at a particular location,
fuel, crew, and type of route (popular and profitable
routes). These situations and restrictions are known as
the constraints of flying planes on the most popular and
profitable route. Linear programming is used to find the
solution for the given constrained problem.
• Mathematically, linear programming optimizes
(minimizes or maximizes) the objective of several
variables subject to the given conditions/constraints
that satisfies a set of linear inequalities.
• Linear programming can be applied in planning
economic activities such as transportation of goods
and services, manufacturing products, optimizing the
electric power systems, and network flows.
• LP problems can be solved using different techniques
such as Graphical, Simplex, and Karmakar's method.
Introduction
• Optimization is the way of life. We all have
finite resources and time and we want to
make the most of them.
• From using your time productively to solving
supply chain problems for your company –
everything uses optimization.
• Linear programming (LP) is one of the simplest
ways to perform optimization.
Linear Programming
• Linear programming is a simple technique
where we depict complex relationships
through linear functions and then find the
optimum points.
• In linear programming, we formulate our real-
life problem into a mathematical model. It
involves an objective function, linear
inequalities with subject to constraints.
Example of a linear programming
problem
• Let’s say a FedEx delivery man has 6 packages to
deliver in a day. The warehouse is located at point A.
• The 6 delivery destinations are given by U, V, W, X, Y,
and Z.
• The numbers on the lines indicate the distance
between the cities.
• To save on fuel and time the delivery person wants to
take the shortest route.
• In this case, the objective of the delivery person is to
deliver the parcel on time at all 6 destinations. The
process of choosing the best route is called Operation
Research.
Formulating a problem
Example: Consider a chocolate manufacturing company that
produces only two types of chocolate – A and B. Both the
chocolates require Milk and Choco only. To manufacture each
unit of A and B, the following quantities are required:
• Each unit of A requires 1 unit of Milk and 3 units of Choco
• Each unit of B requires 1 unit of Milk and 2 units of Choco
The company kitchen has a total of 5 units of Milk and 12
units of Choco. On each sale, the company makes a profit of
• Rs 6 per unit A sold
• Rs 5 per unit B sold.
• Now, the company wishes to maximize its profit. How many
units of A and B should it produce respectively?
Solution
Milk Choco Profit per unit
A 1 3 Rs 6
B 1 2 Rs 5
Total 5 12
• Let the total number of units produced by A be =
X
• Let the total number of units produced by B be =
Y
• Now, the total profit is represented by Z
• The total profit the company makes is given by
the total number of units of A and B produced
multiplied by its per-unit profit of Rs 6 and Rs 5
respectively.
• Profit: Max Z = 6X+5Y
• which means we have to maximize Z.
• As per the above table, each unit of A and B requires 1
unit of Milk. The total amount of Milk available is 5
units. To represent this mathematically,
• X+Y ≤ 5
• Also, each unit of A and B requires 3 units & 2 units of
Choco respectively. The total amount of Choco
available is 12 units. To represent this mathematically,
• 3X+2Y ≤ 12
• Also, the values for units of A can only be integers.
• So we have two more constraints,
• X ≥ 0 & Y ≥ 0
Terminologies used in Linear
Programming
• Decision Variables: The decision variables are the variables that will
decide my output. They represent my ultimate solution.
For the above example, the total number of units for A and B
denoted by X & Y respectively are my decision variables.
• Objective Function: It is defined as the objective of making
decisions.
In the above example, the company wishes to increase the total
profit represented by Z. So, profit is my objective function.
• Constraints: The constraints are the restrictions or limitations on
the decision variables.
In the above example, the limit on the availability of resources Milk
and Choco are my constraints.
• Non-negativity restriction: For all linear programs, the decision
variables should always take non-negative values. This means the
values for decision variables should be greater than or equal to 0.
The process to formulate a Linear
Programming problem
• Identify the decision variables
• Write the objective function
• Mention the constraints
• Explicitly state the non-negativity restriction
Solve Linear Program using
OpenSolver
• In reality, a linear program can contain 30 to
1000 variables and solving it either Graphically
or Algebraically is next to impossible.
• Companies generally use OpenSolver to tackle
these real-world problems.
• OpenSolver is an open-source linear and
optimizer for Microsoft Excel. It is an
advanced version of a built-in Excel Solver.
Example: Below there is a diet chart that gives me calories,
protein, carbohydrate and fat content for 4 food items. Sara
wants a diet with minimum cost. The diet chart is as follows:
Food Item 1 Food Item 2 Food Item 3 Food Item 4
Calories 400 200 150 500
Protien (in
grams)
3 2 0 0
Carbohydrates (
in grams)
2 2 4 4
Fat (in grams) 2 4 1 5
Cost $0.50 $0.20 $0.30 $0.80
• The chart gives the nutrient content as well as
the per-unit cost of each food item. The diet
has to be planned in such a way that it should
contain at least 500 calories, 6 grams of
protein, 10 grams of carbohydrates and 8
grams of fat.
Step 1: Identify the decision variables. Here my decision
variables are the food items. Add the headers. For trial purposes,
we are entering arbitrary values. Let’s say, Sara consumes 3 units
of Food Item 1, 0 unit of Food Item 2, 1 unit of Food Item 3 and
0 unit of Food Item 4. These are called variable cells.
Step 2: Now we will write our objective function. For the diet to
be optimal we must have minimum cost along with required
calories, protein, carbohydrate, and fat.
In cell B7:E7 we take the reference to the number of units. And
in cell B8:E8 we put the per-unit cost of each food item.
In cell B10, we want the total cost of the diet.
The total cost is given by the sumproduct of the number of units
eaten and per-unit cost. Sumproduct is given by =
B7*B8+C7*C8+D7*D8+E7*E8. Let’s see this in a spreadsheet.
Step 3: Now, we will enter the constraints. Column F contains a total of
calories, protein, carbohydrate, and fat. The total number of calorie intake in
given by sumproduct the number of food items eaten and the calorie
consumed per food item. For cell F13= Sumprodcut($B$7:$F$7, B13:F13).
Similarly for others. Column G gives the inequality since the problem
demands Calories, Protein, Carbohydrate and Fat to be at least 500, 6, 10 and
8 respectively. Column H gives the required nutrient content.
Step 4: Now, we will enter the Linear program into the solver.
Now, once you have installed OpenSolver. When you click on the
Data tab, on the right you will see Model. Click on the model,
then enter the values one by one. First, we will enter the
objective function,$B10 i.e in the objective cell. Select minimize
because we want to minimize the diet cost.
Step 5: Now enter the decision variables in the
variable cells.
Step 6: Now, we will add the constraints. The first constraint is
the F13 ≥ H13. Add all the constraints one by one.
Step 7: Now, you have to enter one important constraint. The
non-negativity restriction. All the decision variables will be
greater than 0.
Step 8: Now, click on Save Model to finish the modeling process.
Once you save the model, it will look something like this.
Step 9: Once the model is saved click on the Data tab then click solve. The
optimal solution and values are displayed in the corresponding cells. The
optimal minimum cost is US$0.90. Sara should consume 3 units of Food Item
2 and 1 unit of Food Item 3 for the required nutrient content at the minimum
cost. This solves our linear program.

More Related Content

What's hot

Statistical tests
Statistical testsStatistical tests
Statistical tests
martyynyyte
 
Introduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioIntroduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R Studio
Azmi Mohd Tamil
 
Sample Size Determination
Sample Size DeterminationSample Size Determination
Chi square test and its types
Chi square test and its typesChi square test and its types
Chi square test and its types
Rizwan S A
 
Sample size
Sample sizeSample size
Sample size
Har Jindal
 
Validity & reliability of screening & diagnostic tests
Validity & reliability of screening & diagnostic testsValidity & reliability of screening & diagnostic tests
Validity & reliability of screening & diagnostic tests
TanveerRehman4
 
Sample size calculation
Sample  size calculationSample  size calculation
Sample size calculation
Swati Singh
 
COPE General Intro Core Practices
COPE General Intro Core PracticesCOPE General Intro Core Practices
COPE General Intro Core Practices
C0pe
 
Topic7 research ethics (1)
Topic7 research ethics (1)Topic7 research ethics (1)
Topic7 research ethics (1)
Dr Ghaiath Hussein
 
Ethics in Research
Ethics in ResearchEthics in Research
Ethics in Research
Maria Kalyvaki, PhD,MBA,MEd
 
Sample size calculations
Sample size calculationsSample size calculations
Cross validation
Cross validationCross validation
Cross validation
RidhaAfrawe
 
Duplicate publications and simultaneous submissions
Duplicate publications and simultaneous submissionsDuplicate publications and simultaneous submissions
Duplicate publications and simultaneous submissions
Editage Insights (Resources for authors and journals)
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
Azmi Mohd Tamil
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overview
Rizwan S A
 
Chi squared test
Chi squared testChi squared test
Chi squared test
Ramakanth Gadepalli
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with R
ShareThis
 
Model selection and cross validation techniques
Model selection and cross validation techniquesModel selection and cross validation techniques
Model selection and cross validation techniques
Venkata Reddy Konasani
 
Arima
ArimaArima
Basic survival analysis
Basic survival analysisBasic survival analysis
Basic survival analysis
Mike LaValley
 

What's hot (20)

Statistical tests
Statistical testsStatistical tests
Statistical tests
 
Introduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioIntroduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R Studio
 
Sample Size Determination
Sample Size DeterminationSample Size Determination
Sample Size Determination
 
Chi square test and its types
Chi square test and its typesChi square test and its types
Chi square test and its types
 
Sample size
Sample sizeSample size
Sample size
 
Validity & reliability of screening & diagnostic tests
Validity & reliability of screening & diagnostic testsValidity & reliability of screening & diagnostic tests
Validity & reliability of screening & diagnostic tests
 
Sample size calculation
Sample  size calculationSample  size calculation
Sample size calculation
 
COPE General Intro Core Practices
COPE General Intro Core PracticesCOPE General Intro Core Practices
COPE General Intro Core Practices
 
Topic7 research ethics (1)
Topic7 research ethics (1)Topic7 research ethics (1)
Topic7 research ethics (1)
 
Ethics in Research
Ethics in ResearchEthics in Research
Ethics in Research
 
Sample size calculations
Sample size calculationsSample size calculations
Sample size calculations
 
Cross validation
Cross validationCross validation
Cross validation
 
Duplicate publications and simultaneous submissions
Duplicate publications and simultaneous submissionsDuplicate publications and simultaneous submissions
Duplicate publications and simultaneous submissions
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overview
 
Chi squared test
Chi squared testChi squared test
Chi squared test
 
Data analysis with R
Data analysis with RData analysis with R
Data analysis with R
 
Model selection and cross validation techniques
Model selection and cross validation techniquesModel selection and cross validation techniques
Model selection and cross validation techniques
 
Arima
ArimaArima
Arima
 
Basic survival analysis
Basic survival analysisBasic survival analysis
Basic survival analysis
 

Similar to linear optimization.pptx

Linear programming
Linear programmingLinear programming
Linear programming
polast
 
session 3 OR_L1.pptx
session 3 OR_L1.pptxsession 3 OR_L1.pptx
session 3 OR_L1.pptx
ssuser28e8041
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
DejeneDay
 
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
Blue Elephant Consulting
 
Linear programming
Linear programmingLinear programming
Linear programming
Surekha98
 
LP examples.pdf
LP examples.pdfLP examples.pdf
LP examples.pdf
Mengstagegnew
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
DejeneDay
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
DejeneDay
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
Young Alista
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
Luis Goldster
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
Fraboni Ec
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
Harry Potter
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
Tony Nguyen
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
James Wong
 
IENG 302 Lecture 11_Benefit cost analysis.ppt
IENG 302 Lecture 11_Benefit cost analysis.pptIENG 302 Lecture 11_Benefit cost analysis.ppt
IENG 302 Lecture 11_Benefit cost analysis.ppt
VitaliyBondar4
 
Linear programming with excel
Linear programming with excelLinear programming with excel
Linear programming with excel
Hilda Isfanovi
 
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docxECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
madlynplamondon
 
unit 5 dynamic programming.pptx
unit 5 dynamic programming.pptxunit 5 dynamic programming.pptx
unit 5 dynamic programming.pptx
LEELAKUMARKONDA
 
Ees 300
Ees 300Ees 300
Ees 300
AgwonaMAllan
 
Lpp through graphical analysis
Lpp through graphical analysis Lpp through graphical analysis
Lpp through graphical analysis
YuktaBansal1
 

Similar to linear optimization.pptx (20)

Linear programming
Linear programmingLinear programming
Linear programming
 
session 3 OR_L1.pptx
session 3 OR_L1.pptxsession 3 OR_L1.pptx
session 3 OR_L1.pptx
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
 
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
 
Linear programming
Linear programmingLinear programming
Linear programming
 
LP examples.pdf
LP examples.pdfLP examples.pdf
LP examples.pdf
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
 
chapter 2 revised.pptx
chapter 2 revised.pptxchapter 2 revised.pptx
chapter 2 revised.pptx
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
IENG 302 Lecture 11_Benefit cost analysis.ppt
IENG 302 Lecture 11_Benefit cost analysis.pptIENG 302 Lecture 11_Benefit cost analysis.ppt
IENG 302 Lecture 11_Benefit cost analysis.ppt
 
Linear programming with excel
Linear programming with excelLinear programming with excel
Linear programming with excel
 
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docxECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
ECO 610 Managerial EconomicsChapters 3 and 4Makeup Residency.docx
 
unit 5 dynamic programming.pptx
unit 5 dynamic programming.pptxunit 5 dynamic programming.pptx
unit 5 dynamic programming.pptx
 
Ees 300
Ees 300Ees 300
Ees 300
 
Lpp through graphical analysis
Lpp through graphical analysis Lpp through graphical analysis
Lpp through graphical analysis
 

Recently uploaded

Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
Yasser Mahgoub
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
Prakhyath Rai
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
edwin408357
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 

Recently uploaded (20)

Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 

linear optimization.pptx

  • 2. • As a manager of a company, you always have finite or limited resources, and top management's expectation is for you to make the most out of it. From time productivity to capital utilization, land to labor, and from supply chain to production-almost everything you do is to optimize productivity. • A majority of airlines optimize flight schedules to get the highest revenue and lowest cost. These airlines schedules involve a lot of situations and restrictions such as the number of planes at a particular location, fuel, crew, and type of route (popular and profitable routes). These situations and restrictions are known as the constraints of flying planes on the most popular and profitable route. Linear programming is used to find the solution for the given constrained problem.
  • 3. • Mathematically, linear programming optimizes (minimizes or maximizes) the objective of several variables subject to the given conditions/constraints that satisfies a set of linear inequalities. • Linear programming can be applied in planning economic activities such as transportation of goods and services, manufacturing products, optimizing the electric power systems, and network flows. • LP problems can be solved using different techniques such as Graphical, Simplex, and Karmakar's method.
  • 4. Introduction • Optimization is the way of life. We all have finite resources and time and we want to make the most of them. • From using your time productively to solving supply chain problems for your company – everything uses optimization. • Linear programming (LP) is one of the simplest ways to perform optimization.
  • 5. Linear Programming • Linear programming is a simple technique where we depict complex relationships through linear functions and then find the optimum points. • In linear programming, we formulate our real- life problem into a mathematical model. It involves an objective function, linear inequalities with subject to constraints.
  • 6. Example of a linear programming problem • Let’s say a FedEx delivery man has 6 packages to deliver in a day. The warehouse is located at point A. • The 6 delivery destinations are given by U, V, W, X, Y, and Z. • The numbers on the lines indicate the distance between the cities. • To save on fuel and time the delivery person wants to take the shortest route. • In this case, the objective of the delivery person is to deliver the parcel on time at all 6 destinations. The process of choosing the best route is called Operation Research.
  • 7.
  • 8. Formulating a problem Example: Consider a chocolate manufacturing company that produces only two types of chocolate – A and B. Both the chocolates require Milk and Choco only. To manufacture each unit of A and B, the following quantities are required: • Each unit of A requires 1 unit of Milk and 3 units of Choco • Each unit of B requires 1 unit of Milk and 2 units of Choco The company kitchen has a total of 5 units of Milk and 12 units of Choco. On each sale, the company makes a profit of • Rs 6 per unit A sold • Rs 5 per unit B sold. • Now, the company wishes to maximize its profit. How many units of A and B should it produce respectively?
  • 9. Solution Milk Choco Profit per unit A 1 3 Rs 6 B 1 2 Rs 5 Total 5 12
  • 10. • Let the total number of units produced by A be = X • Let the total number of units produced by B be = Y • Now, the total profit is represented by Z • The total profit the company makes is given by the total number of units of A and B produced multiplied by its per-unit profit of Rs 6 and Rs 5 respectively. • Profit: Max Z = 6X+5Y • which means we have to maximize Z.
  • 11. • As per the above table, each unit of A and B requires 1 unit of Milk. The total amount of Milk available is 5 units. To represent this mathematically, • X+Y ≤ 5 • Also, each unit of A and B requires 3 units & 2 units of Choco respectively. The total amount of Choco available is 12 units. To represent this mathematically, • 3X+2Y ≤ 12 • Also, the values for units of A can only be integers. • So we have two more constraints, • X ≥ 0 & Y ≥ 0
  • 12. Terminologies used in Linear Programming • Decision Variables: The decision variables are the variables that will decide my output. They represent my ultimate solution. For the above example, the total number of units for A and B denoted by X & Y respectively are my decision variables. • Objective Function: It is defined as the objective of making decisions. In the above example, the company wishes to increase the total profit represented by Z. So, profit is my objective function. • Constraints: The constraints are the restrictions or limitations on the decision variables. In the above example, the limit on the availability of resources Milk and Choco are my constraints. • Non-negativity restriction: For all linear programs, the decision variables should always take non-negative values. This means the values for decision variables should be greater than or equal to 0.
  • 13. The process to formulate a Linear Programming problem • Identify the decision variables • Write the objective function • Mention the constraints • Explicitly state the non-negativity restriction
  • 14. Solve Linear Program using OpenSolver • In reality, a linear program can contain 30 to 1000 variables and solving it either Graphically or Algebraically is next to impossible. • Companies generally use OpenSolver to tackle these real-world problems. • OpenSolver is an open-source linear and optimizer for Microsoft Excel. It is an advanced version of a built-in Excel Solver.
  • 15. Example: Below there is a diet chart that gives me calories, protein, carbohydrate and fat content for 4 food items. Sara wants a diet with minimum cost. The diet chart is as follows: Food Item 1 Food Item 2 Food Item 3 Food Item 4 Calories 400 200 150 500 Protien (in grams) 3 2 0 0 Carbohydrates ( in grams) 2 2 4 4 Fat (in grams) 2 4 1 5 Cost $0.50 $0.20 $0.30 $0.80
  • 16. • The chart gives the nutrient content as well as the per-unit cost of each food item. The diet has to be planned in such a way that it should contain at least 500 calories, 6 grams of protein, 10 grams of carbohydrates and 8 grams of fat.
  • 17. Step 1: Identify the decision variables. Here my decision variables are the food items. Add the headers. For trial purposes, we are entering arbitrary values. Let’s say, Sara consumes 3 units of Food Item 1, 0 unit of Food Item 2, 1 unit of Food Item 3 and 0 unit of Food Item 4. These are called variable cells.
  • 18. Step 2: Now we will write our objective function. For the diet to be optimal we must have minimum cost along with required calories, protein, carbohydrate, and fat. In cell B7:E7 we take the reference to the number of units. And in cell B8:E8 we put the per-unit cost of each food item. In cell B10, we want the total cost of the diet.
  • 19. The total cost is given by the sumproduct of the number of units eaten and per-unit cost. Sumproduct is given by = B7*B8+C7*C8+D7*D8+E7*E8. Let’s see this in a spreadsheet.
  • 20. Step 3: Now, we will enter the constraints. Column F contains a total of calories, protein, carbohydrate, and fat. The total number of calorie intake in given by sumproduct the number of food items eaten and the calorie consumed per food item. For cell F13= Sumprodcut($B$7:$F$7, B13:F13). Similarly for others. Column G gives the inequality since the problem demands Calories, Protein, Carbohydrate and Fat to be at least 500, 6, 10 and 8 respectively. Column H gives the required nutrient content.
  • 21. Step 4: Now, we will enter the Linear program into the solver. Now, once you have installed OpenSolver. When you click on the Data tab, on the right you will see Model. Click on the model, then enter the values one by one. First, we will enter the objective function,$B10 i.e in the objective cell. Select minimize because we want to minimize the diet cost.
  • 22. Step 5: Now enter the decision variables in the variable cells.
  • 23. Step 6: Now, we will add the constraints. The first constraint is the F13 ≥ H13. Add all the constraints one by one.
  • 24. Step 7: Now, you have to enter one important constraint. The non-negativity restriction. All the decision variables will be greater than 0.
  • 25. Step 8: Now, click on Save Model to finish the modeling process. Once you save the model, it will look something like this.
  • 26. Step 9: Once the model is saved click on the Data tab then click solve. The optimal solution and values are displayed in the corresponding cells. The optimal minimum cost is US$0.90. Sara should consume 3 units of Food Item 2 and 1 unit of Food Item 3 for the required nutrient content at the minimum cost. This solves our linear program.