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

PDF
GAMS 2015 Vienna
PPT
Lp and ip programming cp 9
PDF
A Mathematical Programming Approach for Selection of Variables in Cluster Ana...
PPTX
Training of agile project management with scrum king leong lo (100188178)
PDF
SPM 5 - Release Planning
PDF
The Internet of Things
PPT
Searchadditional2
PDF
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization
GAMS 2015 Vienna
Lp and ip programming cp 9
A Mathematical Programming Approach for Selection of Variables in Cluster Ana...
Training of agile project management with scrum king leong lo (100188178)
SPM 5 - Release Planning
The Internet of Things
Searchadditional2
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization

Viewers also liked (13)

PPTX
Daa:Dynamic Programing
PDF
Gomory's cutting plane method
DOCX
Unit 7 dynamic programming
PPTX
Dynamic programming class 16
PPTX
IEEE IoT Business USE CASES in India
PPT
Dynamic programming
PDF
Numerical analysis dual, primal, revised simplex
PDF
3. linear programming senstivity analysis
PDF
Prioritization Techniques for Agile Teams
PPTX
IOT and smart city in India
PPTX
Sensitivity Analysis
PPTX
Linear programming - Model formulation, Graphical Method
PPT
Tbs910 linear programming
Daa:Dynamic Programing
Gomory's cutting plane method
Unit 7 dynamic programming
Dynamic programming class 16
IEEE IoT Business USE CASES in India
Dynamic programming
Numerical analysis dual, primal, revised simplex
3. linear programming senstivity analysis
Prioritization Techniques for Agile Teams
IOT and smart city in India
Sensitivity Analysis
Linear programming - Model formulation, Graphical Method
Tbs910 linear programming
Ad

Similar to A software approach to mathematical programming (20)

PPT
AOA Week 01.ppt
PDF
Design and Analysis Algorithms.pdf
PPT
OR Slide
PPTX
AoA Lec Design of algorithm spresentation
PPT
chapter 1
PPTX
Operation Research Techniques
PPTX
Scaling Personalization via Machine-Learned Assortment Optimization
PPS
Data Structures and Algorithms Unit 01
PPTX
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
PPTX
How to Design an Algorithm
PDF
Using Interactive Genetic Algorithm for Requirements Prioritization
PDF
Classification of optimization Techniques
PDF
Mathematical Modeling using MATLAB, by U.M. Sundar Senior Application Enginee...
PPTX
Algorithm and data science foundation ISC
PDF
Lecture one for introducing to c programming for first Year
PDF
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
PDF
Datascience101presentation4
PPTX
Notion of an algorithm
PPTX
Aspiring Minds | Automata
PDF
Introduction to data structure and algorithm
AOA Week 01.ppt
Design and Analysis Algorithms.pdf
OR Slide
AoA Lec Design of algorithm spresentation
chapter 1
Operation Research Techniques
Scaling Personalization via Machine-Learned Assortment Optimization
Data Structures and Algorithms Unit 01
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
How to Design an Algorithm
Using Interactive Genetic Algorithm for Requirements Prioritization
Classification of optimization Techniques
Mathematical Modeling using MATLAB, by U.M. Sundar Senior Application Enginee...
Algorithm and data science foundation ISC
Lecture one for introducing to c programming for first Year
Hybrid Multi-Gradient Explorer Algorithm for Global Multi-Objective Optimization
Datascience101presentation4
Notion of an algorithm
Aspiring Minds | Automata
Introduction to data structure and algorithm
Ad

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Current and future trends in Computer Vision.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Sustainable Sites - Green Building Construction
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Artificial Intelligence
PDF
R24 SURVEYING LAB MANUAL for civil enggi
additive manufacturing of ss316l using mig welding
UNIT 4 Total Quality Management .pptx
Current and future trends in Computer Vision.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Internet of Things (IOT) - A guide to understanding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CYBER-CRIMES AND SECURITY A guide to understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Sustainable Sites - Green Building Construction
Operating System & Kernel Study Guide-1 - converted.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Artificial Intelligence
R24 SURVEYING LAB MANUAL for civil enggi

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