SlideShare a Scribd company logo
A Software approach to
Mathematical Programming
Arian Razmi Farooji
4 March 2015
List of Contents
• Introduction
• Mathematical Programming
• Mathematical Programming techniques
• Solving a Mathematical Model
• Mathematical Programming Software
• GAMS Software
• Heuristics and Metaheuristics
• References
A Software Approach to Mathematical Programming-Arian Razmi Farooji 1
Introduction
A Software Approach to Mathematical Programming-Arian Razmi Farooji 2
Operations
Research
Mathematical
Optimizations
Simulations
Markov Chains
Data Analysis
Statistics
Neural Networks
Queuing Theory
Expert Systems
Economic Methods
Decision Analysis
Mathematical Programming
A Software Approach to Mathematical Programming-Arian Razmi Farooji 3
Problem Definition
Model Construction
Model Solution
Model Validity
Implementation
Real World
Assumed
Real World
Model
Mathematical Programming techniques
1.Linear Programming
2.Integer Programming
3.Mixed Integer Programming
4.Dynamic Programming
5.Network Programming
6.Nonlinear programming
A Software Approach to Mathematical Programming-Arian Razmi Farooji 4
Solving a Mathematical Programming
• Goal :
“ To find an Optimum solution ”
• Algorithms:
− provides fixed computational rules
− are applied repeatedly to the problem
− each repetition (iteration) moving the solution closer
to the optimum.
A Software Approach to Mathematical Programming-Arian Razmi Farooji 5
Solving a Mathematical Programming
• Simplex Method
− solves LP problems
− tests adjacent vertices of the feasible sets
− at each iteration Simplex chooses the variable that
will produce the largest change towards optimum
solution
• Software
− GAMS
− AMPL
− Lingo
− …
A Software Approach to Mathematical Programming-Arian Razmi Farooji 6
GAMS Software
What is GAMS?
• General Algebraic Modeling System
• High-level modeling system for mathematical
optimization
• GAMS solves
−Linear optimizations
−Non-linear optimizations
−Mixed-integer optimizations
• Tailored for large scales optimization problems
A Software Approach to Mathematical Programming-Arian Razmi Farooji 7
GAMS Software
Transportation Problem
A Software Approach to Mathematical Programming-Arian Razmi Farooji 8
1
2
m
1
n
Sources (𝑖) Destinations (𝑗)
.
.
.
.
.
.
𝑐11
𝑐1𝑛
𝑐21
𝑐2𝑛
𝑐 𝑚1
𝑐 𝑚𝑛
𝑎1
𝑎2
𝑎 𝑚
𝑏1
𝑏 𝑛
GAMS Software
Decision Variable
𝑥𝑖𝑗
𝑐𝑖𝑗
𝑎𝑖
𝑏𝑗
A Software Approach to Mathematical Programming-Arian Razmi Farooji 9
The amount shipped from i to j
min 𝑧 =
𝑖=1
𝑚
𝑗=1
𝑛
𝑐𝑖𝑗 𝑥𝑖𝑗
𝑗=1
𝑛
𝑥𝑖𝑗 ≤ 𝑎𝑖 𝑓𝑜𝑟 𝑖 = 1, , , , , 𝑚
𝑖=1
𝑚
𝑥𝑖𝑗 ≥ 𝑏𝑗 𝑓𝑜𝑟𝑗 = 1, , , , , 𝑛
Mathematical Formulation
Parameters
Shipping Cost from i to j
Supply Capacity of source i
Demand of Destination j
𝑥𝑖𝑗 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 𝑎𝑛𝑑 𝑗
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
GAMS Software
Example (Hamdy Taha, 2011)
A Software Approach to Mathematical Programming-Arian Razmi Farooji 10
LA
Detroit
New
Orleans
Denver
Miami
Sources
Destinations
1000
1500
1200
2300
1400
GAMS Software
Example-Parameters
A Software Approach to Mathematical Programming-Arian Razmi Farooji 11
Table (1). Transportation Cost per Car
Denver Miami
Los Angeles $80 $215
Detroit $100 $108
New Orleans $102 $68
GAMS Software
Mathematical Formulation
min 𝑧 = 80𝑥11 + 215𝑥12 + 100𝑥21 + 108𝑥22 + 102𝑥31 + 68𝑥32
𝑥11 + 𝑥12 = 1000
𝑥21 + 𝑥22 = 1500
𝑥31 + 𝑥32 = 1200
𝑥11 + 𝑥21 + 𝑥31 = 2300
𝑥12 + 𝑥22 + 𝑥32 = 1400
A Software Approach to Mathematical Programming-Arian Razmi Farooji 12
Los Angeles
Detroit
New Orleans
Denver
Miami
𝑥𝑖𝑗 ≥ 0 𝑓𝑜𝑟 𝑖 = 1,2,3 𝑎𝑛𝑑 𝑗 = 1,2
Heuristics and Metaheuristics
• Both find “good and satisfactory” solutions in
shorter time
• The quality of algorithms is usually based on a
tradeoff between:
−Optimality
−Completeness
−Accuracy
−Execution Time
A Software Approach to Mathematical Programming-Arian Razmi Farooji 13
Assignment
• Formulate the following transportation problem and
solve it in GAMS.
• Download GAMS here
A Software Approach to Mathematical Programming-Arian Razmi Farooji 14
Shipping Costs
Warehouses Supply
1 2 3 4
Factories
1 470 520 654 890 75
2 350 416 690 750 100
3 995 670 350 685 125
Demand 85 70 65 80
References
1. Taha, H., Operations Research an Introduction, Pearson,
New Jersey, 2011
2. INFORMS: What is Operations Research?
3. GAMS Website
4. Richard E. Rosenthal’s GAMS Tutorial
5. Wikipedia: General Algebraic Modeling System
6. Education.com: Algorithms and Heuristics
A Software Approach to Mathematical Programming-Arian Razmi Farooji 15
Thank You for Your Attention
A Software Approach to Mathematical Programming-Arian Razmi Farooji
Question and Answer
A Software Approach to Mathematical Programming-Arian Razmi Farooji
A Software approach to
Mathematical Programming
Arian Razmi Farooji
4 March 2015
arian.razmifarooji@student.oulu.fi

More Related Content

Viewers also liked

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
rupali_2bonde
 
Gomory's cutting plane method
Gomory's cutting plane methodGomory's cutting plane method
Gomory's cutting plane method
Rajesh Piryani
 
Unit 7 dynamic programming
Unit 7   dynamic programmingUnit 7   dynamic programming
Unit 7 dynamic programming
Nageswara Rao Thots
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16
Kumar
 
IEEE IoT Business USE CASES in India
IEEE IoT Business USE CASES in India IEEE IoT Business USE CASES in India
IEEE IoT Business USE CASES in India
Manjunatha Hebbar
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Shakil Ahmed
 
Numerical analysis dual, primal, revised simplex
Numerical analysis  dual, primal, revised simplexNumerical analysis  dual, primal, revised simplex
Numerical analysis dual, primal, revised simplex
SHAMJITH KM
 
3. linear programming senstivity analysis
3. linear programming senstivity analysis3. linear programming senstivity analysis
3. linear programming senstivity analysis
Hakeem-Ur- Rehman
 
Prioritization Techniques for Agile Teams
Prioritization Techniques for Agile TeamsPrioritization Techniques for Agile Teams
Prioritization Techniques for Agile Teams
Tarang Baxi
 
IOT and smart city in India
IOT and smart city in India IOT and smart city in India
IOT and smart city in India
Soumya Gupta
 
Sensitivity Analysis
Sensitivity AnalysisSensitivity Analysis
Sensitivity Analysis
Bhargav Seeram
 
Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical Method
Joseph Konnully
 
Tbs910 linear programming
Tbs910 linear programmingTbs910 linear programming
Tbs910 linear programming
Stephen Ong
 

Viewers also liked (13)

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
Gomory's cutting plane method
Gomory's cutting plane methodGomory's cutting plane method
Gomory's cutting plane method
 
Unit 7 dynamic programming
Unit 7   dynamic programmingUnit 7   dynamic programming
Unit 7 dynamic programming
 
Dynamic programming class 16
Dynamic programming class 16Dynamic programming class 16
Dynamic programming class 16
 
IEEE IoT Business USE CASES in India
IEEE IoT Business USE CASES in India IEEE IoT Business USE CASES in India
IEEE IoT Business USE CASES in India
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Numerical analysis dual, primal, revised simplex
Numerical analysis  dual, primal, revised simplexNumerical analysis  dual, primal, revised simplex
Numerical analysis dual, primal, revised simplex
 
3. linear programming senstivity analysis
3. linear programming senstivity analysis3. linear programming senstivity analysis
3. linear programming senstivity analysis
 
Prioritization Techniques for Agile Teams
Prioritization Techniques for Agile TeamsPrioritization Techniques for Agile Teams
Prioritization Techniques for Agile Teams
 
IOT and smart city in India
IOT and smart city in India IOT and smart city in India
IOT and smart city in India
 
Sensitivity Analysis
Sensitivity AnalysisSensitivity Analysis
Sensitivity Analysis
 
Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical Method
 
Tbs910 linear programming
Tbs910 linear programmingTbs910 linear programming
Tbs910 linear programming
 

Similar to A software approach to mathematical programming

AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
INAM352782
 
Design and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdfDesign and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdf
HarshNagda5
 
OR Slide
OR SlideOR Slide
OR Slide
Shreesha Shetty
 
chapter 1
chapter 1chapter 1
chapter 1
yatheesha
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques
Lijin Mathew
 
Scaling Personalization via Machine-Learned Assortment Optimization
Scaling Personalization via Machine-Learned Assortment OptimizationScaling Personalization via Machine-Learned Assortment Optimization
Scaling Personalization via Machine-Learned Assortment Optimization
rosentep
 
Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01
Prashanth Shivakumar
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Simplilearn
 
How to Design an Algorithm
How to Design an AlgorithmHow to Design an Algorithm
How to Design an Algorithm
Afaq Mansoor Khan
 
Using Interactive Genetic Algorithm for Requirements Prioritization
Using Interactive Genetic Algorithm for Requirements PrioritizationUsing Interactive Genetic Algorithm for Requirements Prioritization
Using Interactive Genetic Algorithm for Requirements Prioritization
Francis Palma
 
Classification of optimization Techniques
Classification of optimization TechniquesClassification of optimization Techniques
Classification of optimization Techniques
shelememosisa
 
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective OptimizationHybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
eArtius, Inc.
 
Datascience101presentation4
Datascience101presentation4Datascience101presentation4
Datascience101presentation4
Salford Systems
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
Nisha Soms
 
Aspiring Minds | Automata
Aspiring Minds | Automata Aspiring Minds | Automata
Aspiring Minds | Automata
Aspiring Minds
 
Fdp session rtu session 1
Fdp session rtu session 1Fdp session rtu session 1
Fdp session rtu session 1
sprsingh1
 
the application of machine lerning algorithm for SEE
the application of machine lerning algorithm for SEEthe application of machine lerning algorithm for SEE
the application of machine lerning algorithm for SEE
KiranKumar671235
 
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
Jim Jimenez
 
01 intro to algorithm--updated 2015
01 intro to algorithm--updated 201501 intro to algorithm--updated 2015
01 intro to algorithm--updated 2015
Hira Gul
 
data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)
shahghanikhan
 

Similar to A software approach to mathematical programming (20)

AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
 
Design and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdfDesign and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdf
 
OR Slide
OR SlideOR Slide
OR Slide
 
chapter 1
chapter 1chapter 1
chapter 1
 
Operation Research Techniques
Operation Research Techniques Operation Research Techniques
Operation Research Techniques
 
Scaling Personalization via Machine-Learned Assortment Optimization
Scaling Personalization via Machine-Learned Assortment OptimizationScaling Personalization via Machine-Learned Assortment Optimization
Scaling Personalization via Machine-Learned Assortment Optimization
 
Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
 
How to Design an Algorithm
How to Design an AlgorithmHow to Design an Algorithm
How to Design an Algorithm
 
Using Interactive Genetic Algorithm for Requirements Prioritization
Using Interactive Genetic Algorithm for Requirements PrioritizationUsing Interactive Genetic Algorithm for Requirements Prioritization
Using Interactive Genetic Algorithm for Requirements Prioritization
 
Classification of optimization Techniques
Classification of optimization TechniquesClassification of optimization Techniques
Classification of optimization Techniques
 
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective OptimizationHybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
 
Datascience101presentation4
Datascience101presentation4Datascience101presentation4
Datascience101presentation4
 
Notion of an algorithm
Notion of an algorithmNotion of an algorithm
Notion of an algorithm
 
Aspiring Minds | Automata
Aspiring Minds | Automata Aspiring Minds | Automata
Aspiring Minds | Automata
 
Fdp session rtu session 1
Fdp session rtu session 1Fdp session rtu session 1
Fdp session rtu session 1
 
the application of machine lerning algorithm for SEE
the application of machine lerning algorithm for SEEthe application of machine lerning algorithm for SEE
the application of machine lerning algorithm for SEE
 
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
A Real Coded Genetic Algorithm For Solving Integer And Mixed Integer Optimiza...
 
01 intro to algorithm--updated 2015
01 intro to algorithm--updated 201501 intro to algorithm--updated 2015
01 intro to algorithm--updated 2015
 
data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)
 

Recently uploaded

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
PIMR BHOPAL
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
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
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
Kamal Acharya
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
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
 
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
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
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
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
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
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
mahaffeycheryld
 

Recently uploaded (20)

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
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
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
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
 
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
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
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...
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
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
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
 

A software approach to mathematical programming

  • 1. A Software approach to Mathematical Programming Arian Razmi Farooji 4 March 2015
  • 2. List of Contents • Introduction • Mathematical Programming • Mathematical Programming techniques • Solving a Mathematical Model • Mathematical Programming Software • GAMS Software • Heuristics and Metaheuristics • References A Software Approach to Mathematical Programming-Arian Razmi Farooji 1
  • 3. Introduction A Software Approach to Mathematical Programming-Arian Razmi Farooji 2 Operations Research Mathematical Optimizations Simulations Markov Chains Data Analysis Statistics Neural Networks Queuing Theory Expert Systems Economic Methods Decision Analysis
  • 4. Mathematical Programming A Software Approach to Mathematical Programming-Arian Razmi Farooji 3 Problem Definition Model Construction Model Solution Model Validity Implementation Real World Assumed Real World Model
  • 5. Mathematical Programming techniques 1.Linear Programming 2.Integer Programming 3.Mixed Integer Programming 4.Dynamic Programming 5.Network Programming 6.Nonlinear programming A Software Approach to Mathematical Programming-Arian Razmi Farooji 4
  • 6. Solving a Mathematical Programming • Goal : “ To find an Optimum solution ” • Algorithms: − provides fixed computational rules − are applied repeatedly to the problem − each repetition (iteration) moving the solution closer to the optimum. A Software Approach to Mathematical Programming-Arian Razmi Farooji 5
  • 7. Solving a Mathematical Programming • Simplex Method − solves LP problems − tests adjacent vertices of the feasible sets − at each iteration Simplex chooses the variable that will produce the largest change towards optimum solution • Software − GAMS − AMPL − Lingo − … A Software Approach to Mathematical Programming-Arian Razmi Farooji 6
  • 8. GAMS Software What is GAMS? • General Algebraic Modeling System • High-level modeling system for mathematical optimization • GAMS solves −Linear optimizations −Non-linear optimizations −Mixed-integer optimizations • Tailored for large scales optimization problems A Software Approach to Mathematical Programming-Arian Razmi Farooji 7
  • 9. GAMS Software Transportation Problem A Software Approach to Mathematical Programming-Arian Razmi Farooji 8 1 2 m 1 n Sources (𝑖) Destinations (𝑗) . . . . . . 𝑐11 𝑐1𝑛 𝑐21 𝑐2𝑛 𝑐 𝑚1 𝑐 𝑚𝑛 𝑎1 𝑎2 𝑎 𝑚 𝑏1 𝑏 𝑛
  • 10. GAMS Software Decision Variable 𝑥𝑖𝑗 𝑐𝑖𝑗 𝑎𝑖 𝑏𝑗 A Software Approach to Mathematical Programming-Arian Razmi Farooji 9 The amount shipped from i to j min 𝑧 = 𝑖=1 𝑚 𝑗=1 𝑛 𝑐𝑖𝑗 𝑥𝑖𝑗 𝑗=1 𝑛 𝑥𝑖𝑗 ≤ 𝑎𝑖 𝑓𝑜𝑟 𝑖 = 1, , , , , 𝑚 𝑖=1 𝑚 𝑥𝑖𝑗 ≥ 𝑏𝑗 𝑓𝑜𝑟𝑗 = 1, , , , , 𝑛 Mathematical Formulation Parameters Shipping Cost from i to j Supply Capacity of source i Demand of Destination j 𝑥𝑖𝑗 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 𝑎𝑛𝑑 𝑗 𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
  • 11. GAMS Software Example (Hamdy Taha, 2011) A Software Approach to Mathematical Programming-Arian Razmi Farooji 10 LA Detroit New Orleans Denver Miami Sources Destinations 1000 1500 1200 2300 1400
  • 12. GAMS Software Example-Parameters A Software Approach to Mathematical Programming-Arian Razmi Farooji 11 Table (1). Transportation Cost per Car Denver Miami Los Angeles $80 $215 Detroit $100 $108 New Orleans $102 $68
  • 13. GAMS Software Mathematical Formulation min 𝑧 = 80𝑥11 + 215𝑥12 + 100𝑥21 + 108𝑥22 + 102𝑥31 + 68𝑥32 𝑥11 + 𝑥12 = 1000 𝑥21 + 𝑥22 = 1500 𝑥31 + 𝑥32 = 1200 𝑥11 + 𝑥21 + 𝑥31 = 2300 𝑥12 + 𝑥22 + 𝑥32 = 1400 A Software Approach to Mathematical Programming-Arian Razmi Farooji 12 Los Angeles Detroit New Orleans Denver Miami 𝑥𝑖𝑗 ≥ 0 𝑓𝑜𝑟 𝑖 = 1,2,3 𝑎𝑛𝑑 𝑗 = 1,2
  • 14. Heuristics and Metaheuristics • Both find “good and satisfactory” solutions in shorter time • The quality of algorithms is usually based on a tradeoff between: −Optimality −Completeness −Accuracy −Execution Time A Software Approach to Mathematical Programming-Arian Razmi Farooji 13
  • 15. Assignment • Formulate the following transportation problem and solve it in GAMS. • Download GAMS here A Software Approach to Mathematical Programming-Arian Razmi Farooji 14 Shipping Costs Warehouses Supply 1 2 3 4 Factories 1 470 520 654 890 75 2 350 416 690 750 100 3 995 670 350 685 125 Demand 85 70 65 80
  • 16. References 1. Taha, H., Operations Research an Introduction, Pearson, New Jersey, 2011 2. INFORMS: What is Operations Research? 3. GAMS Website 4. Richard E. Rosenthal’s GAMS Tutorial 5. Wikipedia: General Algebraic Modeling System 6. Education.com: Algorithms and Heuristics A Software Approach to Mathematical Programming-Arian Razmi Farooji 15
  • 17. Thank You for Your Attention A Software Approach to Mathematical Programming-Arian Razmi Farooji
  • 18. Question and Answer A Software Approach to Mathematical Programming-Arian Razmi Farooji
  • 19. A Software approach to Mathematical Programming Arian Razmi Farooji 4 March 2015 arian.razmifarooji@student.oulu.fi