An introduction to Optimization for Malaysian insurance audience held on 20th April 2017 at the Malaysian Insurance Institute (MII), Kuala Lumpur, Malaysia.
More information here: https://www.theoptimizationexpert.com
Boost PC performance: How more available memory can improve productivity
Competitive Advantage with Optimization MII
1. Breakfast Talk, Malaysian Insurance Institute
20th April 2017 Kuala Lumpur
Dr. Anwar Ali
www.theoptimizationexpert.com
2. My Background
Studied engineering and worked as an engineer
Bachelor in Mechanical Eng, major in Industrial Engineering (IE)
Held various engineering positions including process, machine
vision, equipment development, factory IE, systems IE
27 years in American multinational companies (1988-2015)
2 years at Texas Instruments KL
25 years at Intel Penang & Kulim, including 2 years in Arizona
Created in-house Operations Research group in 2002
Have done simulation, math optimization, and the relevant data
integration to enable simulation and optimization
Completed 2 post graduate degrees while working full time
M.Sc. in Decision Science, UUM in 2005
Doctor in Engineering (Eng Biz Mgt), UTM KL in 2014
Competitive Advantage with Optimization - Anwar Ali 2
3. Agenda
Current Business and Technological Landscapes
Analytics Evolution
Introduction to Operations Research
A Primer on Optimization
Formulating and Solving Optimization Models
Identifying Opportunities with Business Values
How to Get Started
Competitive Advantage with Optimization - Anwar Ali 3
4. The Forces Driving Our Future
Digital future
Entrepreneurship rising
Global marketplace
Urban world
Resourceful planet
Health reimagined
Competitive Advantage with Optimization - Anwar Ali 4
Ernest & Young Megatrends 2015
5. The Forces Driving Our Future
Digital future
Convergence of social, mobile, cloud, big data
Growing demand for anytime anywhere access to
information
Entrepreneurship rising
Technology enabling machines and software to
substitute for humans
High-impact entrepreneurs are building innovative and
scalable enterprises
Many new enterprises are digital from birth with young
faces
Competitive Advantage with Optimization - Anwar Ali 5
Ernest & Young Megatrends 2015
6. The Forces Driving Our Future
Global marketplace
Innovation will increasingly take place in rapid-growth
markets
War for talent; greater workforce diversity providing
competitive advantage
Urban world
More cities across the globe
Competitive Advantage with Optimization - Anwar Ali 6
Ernest & Young Megatrends 2015
7. The Forces Driving Our Future
Resourceful planet
Increasing global demand for natural resources
Growing concern over environmental degradation
Health reimagined
Increasing cost pressure require more sustainable
approach
Explosion in big data and mobile health technologies
From delivery of health care to management of health
Competitive Advantage with Optimization - Anwar Ali 7
Ernest & Young Megatrends 2015
8. Digital Future
Technology is also changing the ways people work, and
is increasingly enabling machines and software to
substitute for humans. Enterprises and individuals
who can seize the opportunities offered by digital
advances stand to gain significantly, while those
who cannot may lose everything
Competitive Advantage with Optimization - Anwar Ali 8
Ernest & Young Megatrends 2015
9. Competitive Advantage with Optimization - Anwar Ali 9
Anytime anywhere access to information.
Machines and software substitute humans.
How should we adapt?
10. Today’s Technology Buzzwords
Competitive Advantage with Optimization - Anwar Ali 10
Big Data
Data Visualization
Data Scientist
Business Intelligence
Analytics
Internet of Things
Cloud
Apps
Wearable
11. Big Data and Traditional Analytics
Competitive Advantage with Optimization - Anwar Ali 11
big data @ work, Thomas H. Davenport, 2014
12. Terminology for Using and Analyzing Data
Competitive Advantage with Optimization - Anwar Ali 12
big data @ work, Thomas H. Davenport, 2014
15. Data Science
Data Science is an interdisciplinary field about processes
and systems to extract knowledge or insights from large
volumes of data in various forms, either structured or
unstructured, which is a continuation of some of the
data analysis fields such as data mining and predictive
analytics, as well as Knowledge Discovery in Databases
Wikipedia
Competitive Advantage with Optimization - Anwar Ali 15
16. Data Scientist
Similar training like business/data analyst
Computer science, modeling, statistics, analytics, math
Somebody who can stare at data and spot trends,
discovering previously hidden insights, which can
provide a competitive advantage or address a problem
Data scientists are inquisitive: exploring, asking
questions, doing “what if” analysis, questioning
existing assumptions and processes. Armed with data
and analytical results, a top-tier data scientist will then
communicate informed conclusions and
recommendations across an organization.
IBM
Competitive Advantage with Optimization - Anwar Ali 16
17. Data Scientist at Work
Competitive Advantage with Optimization - Anwar Ali 17
18. Business Intelligence
Business intelligence (BI) is a broad category of
applications, technologies, and processes for
gathering, storing, accessing, and analyzing data to
help business users make better decisions
The term was first used in 1865
Business Analytics (BA), a newer term, is a subset of
BI, focusing on statistics, prediction, and
optimization, rather than the reporting functionality
BI / BA are used interchangeably by different vendors
with their own definition
Competitive Advantage with Optimization - Anwar Ali 18
19. Analytics
The extensive use of data, statistical and quantitative
analysis, explanatory and predictive models, and fact-
based management to drive decisions and actions
Competing on Analytics: The New Science of Winning, Davenport and Harris, 2007
Competitive Advantage with Optimization - Anwar Ali 19
20. Business Analytics
Business analytics can be defined as the broad use of data
and quantitative analysis for decision-making within
organizations. It encompasses query and reporting, but
aspires to greater levels of mathematical sophistication. It
includes analytics, of course, but involves harnessing them to
meet defined business objectives. Business analytics
empowers people in the organization to make better
decisions, improve processes and achieve desired outcomes.
It brings together the best of data management, analytic
methods, and the presentation of results – all in a closed-
loop cycle for continuous learning and improvement
The New World of “Business Analytics”, Thomas H. Davenport, March 2010
Competitive Advantage with Optimization - Anwar Ali 20
21. Analytics Landscape
Competitive Advantage with Optimization - Anwar Ali 21
Descriptive
Prescriptive
Predictive
Degree of Complexity
CompetitiveAdvantage
Standard Reporting
Ad hoc reporting
Query/drill down
Alerts
Simulation
Forecasting
Predictive modeling
Optimization
What exactly is the problem?
What will happen next if ?
What if these trends continue?
What could happen…. ?
What actions are needed?
How many, how often, where?
What happened?
Stochastic Optimization
How can we achieve the best outcome?
How can we achieve the best outcome
including the effects of variability?
Source: IBM, Based on: Competing on Analytics,
Davenport and Harris, 2007
22. Analytics
Descriptive analytics (what has occurred)
The simplest class of analytics, condense big data into
smaller, more useful nuggets of information
e.g. counts, likes, posts, views, sales, finance
Predictive analytics (what will occur)
Use available data to predict data we don’t have using variety
of statistical, modeling, data mining, and machine learning
techniques
Prescriptive analytics (what should occur)
Recommend one or more courses of action and showing the
likely outcome of each decision so that the business decision-
maker can take this information and act
Adapted from Information Week, definitions by Dr Michael Wu
http://www.informationweek.com/big-data/big-data-analytics/big-data-analytics-descriptive-vs-predictive-vs-prescriptive/d/d-id/1113279
Competitive Advantage with Optimization - Anwar Ali 22
23. MS Excel Examples
Descriptive aggregate functions:
SUM(), MIN/MAX(), COUNT(), STDEV(), AVERAGE()
Pivot tables
Predictive:
FORECAST(), TREND()
Analysis ToolPak add-in (comes with Excel)
Data Mining add-in (downloadable from Microsoft)
XLMiner add-in (need to purchase from FrontlineSolvers)
Prescriptive:
Solver add-in (comes with Excel, limited capability)
Open Solver add-in (open source, unlimited capability)
Competitive Advantage with Optimization - Anwar Ali 23
24. No Crystal Ball Required
Competitive Advantage with Optimization - Anwar Ali 24
25. Business Intelligence Framework
Competitive Advantage with Optimization - Anwar Ali 25
Back in Business, by Ronald K. Klimberg and Virginia Miori, OR/MS Today, Vol 37, No 5, October 2010,
[http://www.informs.org/ORMS-Today/Public-Articles/October-Volume-37-Number-5/Back-in-Business]
OR/MS =
Operations Research/
Management Science
26. What is Operations Research?
O.R. is the discipline of applying advanced analytical
methods to help make better decisions
Also called Management Science or Decision Science,
O.R. is the science of Decision-Making
Employing techniques from mathematical sciences,
O.R. arrives at optimal or near-optimal solutions to
complex decision-making problems
Determine the maximum (e.g. profit, performance, or
yield) or minimum (e.g. loss, risk, or cost)
Competitive Advantage with Optimization - Anwar Ali 26
27. O.R. Leading Edge Techniques
Simulation
Giving you the ability to try out approaches and test
ideas for improvement
Optimization
Narrowing your choices to the very best where there are
virtually innumerable feasible options and comparing
them is difficult
Probability and statistics
Helping you measure risk, mine data to find valuable
connections and insights, test conclusions, and make
reliable forecasts
Competitive Advantage with Optimization - Anwar Ali 27
28. O.R. Leading Edge Techniques
Simulation (predictive)
Giving you the ability to try out approaches and test
ideas for improvement
Optimization (prescriptive)
Narrowing your choices to the very best where there are
virtually innumerable feasible options and comparing
them is difficult
Probability and statistics (predictive)
Helping you measure risk, mine data to find valuable
connections and insights, test conclusions, and make
reliable forecasts
Competitive Advantage with Optimization - Anwar Ali 28
29. O.R. Leading Edge Techniques
Simulation
Giving you the ability to try out approaches and test
ideas for improvement
Optimization – THIS TALK
Narrowing your choices to the very best where there
are virtually innumerable feasible options and
comparing them is difficult
Probability and statistics
Helping you measure risk, mine data to find valuable
connections and insights, test conclusions, and make
reliable forecasts
Competitive Advantage with Optimization - Anwar Ali 29
30. Analytics Landscape
Competitive Advantage with Optimization - Anwar Ali 30
Descriptive
Prescriptive
Predictive
Degree of Complexity
CompetitiveAdvantage
Standard Reporting
Ad hoc reporting
Query/drill down
Alerts
Simulation
Forecasting
Predictive modeling
Optimization
What exactly is the problem?
What will happen next if ?
What if these trends continue?
What could happen…. ?
What actions are needed?
How many, how often, where?
What happened?
Stochastic Optimization
How can we achieve the best outcome?
How can we achieve the best outcome
including the effects of variability?
Source: IBM, Based on: Competing on Analytics,
Davenport and Harris, 2007
31. Analytics Landscape
Descriptive
Prescriptive
Predictive
Degree of Complexity
CompetitiveAdvantage
Standard Reporting
Ad hoc reporting
Query/drill down
Alerts
Simulation
Forecasting
Predictive modeling
Optimization
What exactly is the problem?
What will happen next if ?
What if these trends continue?
What could happen…. ?
What actions are needed?
How many, how often, where?
What happened?
Stochastic Optimization
How can we achieve the best outcome?
How can we achieve the best outcome
including the effects of variability?
Source: IBM, Based on: Competing on Analytics,
Davenport and Harris, 2007
Operations Research
Competitive Advantage with Optimization - Anwar Ali 31
32. Three Eras of Analytics
Competitive Advantage with Optimization - Anwar Ali 32
big data @ work, Thomas H. Davenport, 2014
33. Competitive Advantage with Optimization - Anwar Ali 33
In 2013 Gartner called prescriptive
analytics 'the final frontier for big
data’, where companies can finally
turn the unprecedented levels of
data in the enterprise into
powerful action
36. Examples of Optimization Application
Deciding where to invest capital in order to grow
Figuring out the best way to run a call center
Locating a warehouse or depot to deliver materials
over shorter distances at reduced cost
Solving complex scheduling problems
Deciding when to discount, and how much
Getting more out of manufacturing equipment
Optimizing a portfolio of investments
Competitive Advantage with Optimization - Anwar Ali 36
37. What are the Benefits?
Operations Research is called “The Science of Better”,
i.e. using science to make:
bold decisions and run everyday operations with less
risk and better outcomes (no more gut-feel)
repeatable, quantitative decision analysis
Adapted from: The Guide to Operational Research, http://www.scienceofbetter.co.uk/
Competitive Advantage with Optimization - Anwar Ali 37
38. Signs O.R. Could Be Beneficial
The management face complex decision making
The management is not sure what the main problem is
The management is uncertain about potential
outcomes
The organization is having problems with decision
making processes
Management is troubled by risk
The organization is not making the most of its data
The organization needs to beat stiff competition
The Guide to Operational Research, http://www.scienceofbetter.co.uk/
Competitive Advantage with Optimization - Anwar Ali 38
39. Key Messages
Seize the opportunities offered by digital advances
Anytime anywhere access to information
Machines and software substitute humans
Be part of analytics initiatives
Optimization is at the top of Analytics
Optimization is the final frontier for big data
Competitive Advantage with Optimization - Anwar Ali 39
40. Agenda
Current Business and Technological Landscapes √
Analytics Evolution √
Introduction to Operations Research √
A Primer on Optimization
Formulating and Solving Optimization Models
Identifying Opportunities with Business Values
How to Get Started
Competitive Advantage with Optimization - Anwar Ali 40
41. Optimization Modeling
Optimization models have
Objective function
Decision variables
Constraints
Formulated as mathematical equations
Solved graphically (if 2 decision variables) or using Excel
Solver, CPLEX, LPSolve, LINDO/LINGO, etc.
41Competitive Advantage with Optimization - Anwar Ali
43. Linear Programming
A linear programming (LP) problem is an optimization
problem which
Attempt to maximize (or minimize) a linear function
(called the objective function) of the decision variables
The values of the decision variables must satisfy a set of
constraints. Each constraint must be a linear equation or
inequality
A sign restriction is associated with each variable. For
any variable xi, the sign restriction specifies either that xi
must be nonnegative (xi ≥ 0) or that xi may be
unrestricted in sign
Competitive Advantage with Optimization - Anwar Ali 43
44. Example 1: Dorian Auto
Operations Research:
Applications and
Algorithms
Wayne L. Winston
Duxbury Press; 4th
edition (2003)
Competitive Advantage with Optimization - Anwar Ali 44
45. Example 1: Dorian Auto
Dorian Auto manufactures luxury cars and trucks
The company believes that its most likely customers
are high-income women and men
To reach these groups, Dorian Auto has embarked on
an ambitious TV advertising campaign and will
purchase 1-minute commercial spots on two type of
programs: comedy shows and football games
Competitive Advantage with Optimization - Anwar Ali 45
46. Example 1: Dorian Auto
Each comedy commercial is seen by 7 million high
income women and 2 million high-income men and
costs $50,000
Each football game is seen by 2 million high-income
women and 12 million high-income men and costs
$100,000
Dorian Auto would like for commercials to be seen by
at least 28 million high-income women and 24 million
high-income men
We will use LP to determine how Dorian Auto can
meet its advertising requirements at minimum cost
Competitive Advantage with Optimization - Anwar Ali 46
47. Example 1: Solution
Decision variables:
x = the number of 1-minute comedy ads
y = the number of 1-minute football ads
The objective is to minimize advertising cost
Minimize z = 50x + 100y
Constraints:
Ads must be seen by at least 28 million high-income
women; 7x + 2y ≥ 28
Ads must be seen by at least 24 million high-income
men; 2x + 12y ≥ 24
Competitive Advantage with Optimization - Anwar Ali 47
49. Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 49
High-income women constraint; 7x + 2y ≥ 28
50. Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 50
High-income women constraint; 7x + 2y ≥ 28
High-income men constraint; 2x + 12y ≥ 24
51. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 51
High-income women constraint; 7x + 2y ≥ 28
High-income men constraint; 2x + 12y ≥ 24
52. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 52
High-income women constraint; 7x + 2y ≥ 28
High-income men constraint; 2x + 12y ≥ 24
53. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 53
High-income women constraint; 7x + 2y ≥ 28
High-income men constraint; 2x + 12y ≥ 24
x = 3.6
y = 1.4
54. Optimal Answer
To minimize advertising cost, purchase
3.6 slots of comedy ads (x)
1.4 slots of football ads (y)
The total advertising cost (in thousands) is
z = 50x + 100 y
z = 50(3.6) + 100(1.4)
z = 320
But in reality, it is not possible to purchase fractional
number of 1-minute ads. The decision variables x and
y must be integers
Competitive Advantage with Optimization - Anwar Ali 54
55. Integer Programming
When an LP model has integer decision variable(s), it is
called integer linear programming (ILP). Why ILP?
We cannot buy 3.6 slots of ads, must be either 3 or 4
Yes/no decisions can be modeled as 0 or 1 variables
When an LP model has mixture of continuous and integer
variables, it is called mixed integer linear programming
(MILP)
ILP and MILP models are harder and take longer to solve
compared to LP models
We will use the term “math programming” to represent LP,
ILP, and MILP
Competitive Advantage with Optimization - Anwar Ali 55
56. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 56
Feasible integer solutions
57. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 57
Feasible integer solutions
Optimal integer solutions
Lowest z value
in feasible region
58. Unbounded
feasible region
Graphical Solution
x (comedy ads)
y(footballads)
4 8 12 16
4
12
16
8
2
6
10
14
2 6 10 14
Competitive Advantage with Optimization - Anwar Ali 58
2 solutions with
z = 400
x = 6, y = 1
x = 4, y = 2
59. Graphical Integer Solutions
There are 2 solutions with z = 400
4 slots of comedy ads (x) and 2 slots of football ads (y); z
= 50(4) + 100(2) = 400
6 slots of comedy ads (x) and 1 slot of football ads (y); z
= 50(6) + 100(1) = 400
For more complex problems which cannot be solve
graphically, branch-and-bound method is used
Competitive Advantage with Optimization - Anwar Ali 59
60. Example 2: Diet Problem
Introduction to
Management Science
Bernard W. Taylor III
Prentice Hall, 7th edition
(2002)
Latest is 11th edition
(2012)
Competitive Advantage with Optimization - Anwar Ali 60
61. Example 2: Diet Problem
Breakfast to include at least 420 calories, 5 milligrams
of iron, 400 milligrams of calcium, 20 grams of
protein, 12 grams of fiber, and must have no more than
20 grams of fat and 30 milligrams of cholesterol
Competitive Advantage with Optimization - Anwar Ali 61
62. Example 2: Diet Problem
The objective is to minimize meal cost while meeting
the following nutritional requirement:
Calories ≥ 420
Iron ≥ 5
Calcium ≥ 400
Protein ≥ 20
Fiber ≥ 12
Fat ≤ 20
Cholesterol ≤ 30
Competitive Advantage with Optimization - Anwar Ali 62
63. Example 2: Decision Variables
x1 = cups of bran cereal
x2 = cups of dry cereal
x3 = cups of oatmeal
x4 = cups of oat bran
x5 = eggs
x6 = slices of bacon
x7 = oranges
x8 = cups of milk
x9 = cups of orange juice
x10 = slices of wheat toast
Competitive Advantage with Optimization - Anwar Ali 63
65. Example 2: Solution
The diet problem cannot be solved graphically as it has
10 decision variables
We will use ‘Solver’ to find solution for the problem
Competitive Advantage with Optimization - Anwar Ali 65
66. Solver
Mathematical software, either stand-alone or library,
that 'solves' a mathematical programming problem
Uses algorithms such as SIMPLEX and branch-and-
bound to solve the problem
May include Integrated Development Environment
(IDE), e.g. GUI and editor
Solvers used in this presentation:
Excel Solver add-in (free, limited capability)
Excel OpenSolver add-in (free, open source)
IBM ILOG CPLEX Optimization Studio
Competitive Advantage with Optimization - Anwar Ali 66
78. Key Take Away
In university, we were taught how to model and then
solve the problem by hand
In practice, solvers like Excel Solver, ILOG CPLEX and
LPSolve can find the solution(s) very quickly
It is important to understand the modeling concepts
and able to formulate the problems correctly
But real-world models are a lot more complex than the
textbook examples
May have multiple conflicting objectives
Many (thousands) decision variables and constraints
Competitive Advantage with Optimization - Anwar Ali 78
80. Choice of Solver
The choice of solver depends on the problem size and
the ability to integrate with enterprise system
Excel Solver is recommended for rapid prototyping
and quick-wins
Demonstrate the concept to users and management
Can be used if the problem is small
When all data is local and no database interface is required
IBM ILOG CPLEX is very good for integrating the
solver solution with large enterprise system
Scalable with powerful database interfaces
Competitive Advantage with Optimization - Anwar Ali 80
81. Agenda
Current Business and Technological Landscapes √
Analytics Evolution √
Introduction to Operations Research √
A Primer on Optimization √
Formulating and Solving Optimization Models
Identifying Opportunities with Business Values
How to Get Started
Competitive Advantage with Optimization - Anwar Ali 81
82. Problem Formulation
Problem formulation is the most challenging part in
math programming
Once the problem has been formulated correctly,
putting the problem into solvers is easy
Need to use the correct approach in developing the
mathematical equations of a problem
The more experience we have in problem formulation,
the easier it becomes
Competitive Advantage with Optimization - Anwar Ali 82
83. The formulation of a
problem is often more
essential than its
solution, which may be
merely a matter of
mathematical or
experimental skill
Albert Einstein
Competitive Advantage with Optimization - Anwar Ali 83
84. Recommended Modeling Approach
First, must understand the problem well
e.g. business rules, objective(s), constraints, input data and
output/decisions required
Talk to the experts how decisions are made without a model
Relate the problem to the relevant model types
Look at examples of the relevant model types
Many Excel Solver examples are downloadable from Frontline
Systems
IBM ILOG CPLEX has examples of different complexity
Develop and refine the model until it represents the
problem faithfully
Competitive Advantage with Optimization - Anwar Ali 84
85. Additional Reference – Williams
Model Building in
Mathematical
Programming
H. Paul Williams
John Wiley & Sons, Ltd.
5th edition (2013)
Competitive Advantage with Optimization - Anwar Ali 85
86. Model Types (from H. Paul Williams)
Competitive Advantage with Optimization - Anwar Ali 86
Network models
- Transportation problem
- Assignment problem
- Transhipment problem
- Minimim cost problem
- Shortest path problem
- Maximum flow through a network
- Critical path analysis
Integer programming models
- Set covering problems
- Set packing problems
- Set partitioning problems
- Knapsack problem
- Travelling salesman problem
- Vehicle routing problem
87.
88. Bin packing / knapsack problem
Competitive Advantage with Optimization - Anwar Ali 88
89. Cut into different sizes and shapes and minimize the waste
Cutting stock problem
Competitive Advantage with Optimization - Anwar Ali 89
90. Start from a city, visit each city only once, and return to the original city
after all cities visited. Minimize the travel distance / cost
Traveling salesman problem (TSP)Competitive Advantage with Optimization - Anwar Ali 90
91. Assign gates to planes considering plane type, schedule, domestic/international, airlines
Assignment problemCompetitive Advantage with Optimization - Anwar Ali 91
93. Minimize breakfast cost and include at least 420
calories, 5 milligrams of iron, 400 milligrams of
calcium, 20 grams of protein, 12 grams of fiber, and
must have no more than 20 grams of fat and 30
milligrams of cholesterol
Diet problem which is blending problem
Competitive Advantage with Optimization - Anwar Ali 93
94. Summary of Problems
Linear Programming
Blending problem
Integer Programming
Bin packing / knapsack problem
Cutting stock problem
Traveling salesman problem (TSP)
Assignment problem
We pick the interesting knapsack problem and
demonstrate how it is formulated and solved
Competitive Advantage with Optimization - Anwar Ali 94
95. Knapsack Problem
The original name came from a problem where a hiker tries
to pack the most valuable items without overloading the
knapsack. Each item has a certain value/benefit and
weight. An overall weight limitation gives the single
constraint
Competitive Advantage with Optimization - Anwar Ali 95
Picture from Wikipedia
96. Knapsack Problem
This is a combinatorial optimization problem and has
been studied since 1897. Several algorithms have been
developed to solve this problem
Application examples:
Stocking warehouse to the space limit
Finding the least wasteful way to cut raw materials
Portfolio selection in investment decision
Capital budgeting allocation decision
Project selection
Competitive Advantage with Optimization - Anwar Ali 96
99. Knapsack Problem Exercise
Since the formulation has been given, let’s solve this
problem using Excel Solver
Competitive Advantage with Optimization - Anwar Ali 99
Items Weight Value Take?
1 12 4
2 1 2
3 4 10
4 1 1
5 2 2
Weight of items taken 0
Weight limit 15
Total value 0
100. From math model to OPL model
Competitive Advantage with Optimization - Anwar Ali 100
int n = 5;
range items = 1..n;
int w[items] = [12,1,4,1,2];
int v[items] = [4,2,10,1,2];
int W = 15; // weight limit
dvar boolean x[items];
maximize sum(i in items) v[i]*x[i];
subject to {
sum(i in items) w[i]*x[i] <= W;
}
𝑥𝑖 = 𝑐𝑜𝑝𝑖𝑒𝑠 𝑜𝑓 𝑒𝑎𝑐ℎ 𝑘𝑖𝑛𝑑 𝑜𝑓 𝑖𝑡𝑒𝑚
𝑣𝑖 = 𝑣𝑎𝑙𝑢𝑒
𝑤𝑖 = 𝑤𝑒𝑖𝑔ℎ𝑡
𝑊 = 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑤𝑒𝑖𝑔ℎ𝑡 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦
𝑖 = 𝑖𝑡𝑒𝑚𝑠 𝑛𝑢𝑚𝑏𝑒𝑟𝑒𝑑 1. . 𝑛
Items Weight Value Take?
1 12 4
2 1 2
3 4 10
4 1 1
5 2 2
Weight of items taken 0
Weight limit 15
Total value 0
101. From math model to OPL model
Competitive Advantage with Optimization - Anwar Ali 101
𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑣𝑖
𝑛
𝑖=1
𝑥𝑖
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑤𝑖
𝑛
𝑖=1
𝑥𝑖 ≤ 𝑊, 𝑥𝑖 ∈ 0,1
int n = 5;
range items = 1..n;
int w[items] = [12,1,4,1,2];
int v[items] = [4,2,10,1,2];
int W = 15; // weight limit
dvar boolean x[items];
maximize sum(i in items) v[i]*x[i];
subject to {
sum(i in items) w[i]*x[i] <= W;
}
0-1 knapsack
102. From math model to OPL model
Competitive Advantage with Optimization - Anwar Ali 102
int n = 5;
range items = 1..n;
int w[items] = [12,1,4,1,2];
int v[items] = [4,2,10,1,2];
int W = 15; // weight limit
dvar int+ x[items];
maximize sum(i in items) v[i]*x[i];
subject to {
sum(i in items) w[i]*x[i] <= W;
}
𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑣𝑖
𝑛
𝑖=1
𝑥𝑖
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑤𝑖
𝑛
𝑖=1
𝑥𝑖 ≤ 𝑊, 𝑥𝑖 ≥ 0
Unbounded
103. Agenda
Current Business and Technological Landscapes √
Analytics Evolution √
Introduction to Operations Research √
A Primer on Optimization √
Formulating and Solving Optimization Models √
Identifying Opportunities with Business Values
How to Get Started
Competitive Advantage with Optimization - Anwar Ali 103
104. Waste neither time nor
money, but make the
best use of both
Benjamin Franklin
Competitive Advantage with Optimization - Anwar Ali 104
106. 3 Classes of Business Value
Cost reductions
Decision improvements
Improvements in products and services
Competitive Advantage with Optimization - Anwar Ali 106
107. Examples
Cost reductions
Capital dollars (e.g. fixed assets, buildings)
Manpower optimization (e.g. call centre)
Decision improvements
What-if analyses speed
Pricing decisions
Improvements in products and services
Customers retention
New products
Competitive Advantage with Optimization - Anwar Ali 107
108. Competitive Advantage with Optimization - Anwar Ali 108
The capability to conduct Advanced Analytics
will no longer be viewed as a competitive
advantage – it will become a necessity for
survival and a requirement to stay
competitive in the marketplace
2016 Big Data Survey Respondent,
North American Chief Risk Officers Council
110. Optimization in Insurance
Product profitability
Cost reduction
Portfolio selection
Manpower planning
Site location
Capital/assets optimization
Scenario analysis
Competitive Advantage with Optimization - Anwar Ali 110
111. Identifying Opportunities
Whenever there is a need to iterate many possibilities
or scenarios before making recommendation to the
management, it means there is opportunity to use
Optimization
Competitive Advantage with Optimization - Anwar Ali 111
112. Agenda
Current Business and Technological Landscapes √
Analytics Evolution √
Introduction to Operations Research √
A Primer on Optimization √
Formulating and Solving Optimization Models √
Identifying Opportunities with Business Values √
How to Get Started
Competitive Advantage with Optimization - Anwar Ali 112
113. Getting Started with Optimization
Get management sponsors
Convince management the benefits of optimization
Identify the challenges in decision making process
Unable to predict the outcome?
Complexity in decision making
Drill down the decision making process
Objectives, rules, and boundary conditions
Input data required
What kind of outcomes/decisions needed
Build and demo quick-win optimization model(s)
Refine it until it can replace the current process
Competitive Advantage with Optimization - Anwar Ali 113
114. Competencies Required
Spreadsheet modeling
Mathematical optimization
Data integration
Business acumen
Hire consultant or upskill / train employees
Competitive Advantage with Optimization - Anwar Ali 114
115. Training Offering
Current offering of SBL claimable training
1-day “Decision Optimization for Managers”
3-day “Decision Optimization”
Upcoming courses
“Decision Optimization Non-Linear Programming”
“Decision Optimization Stochastic Programming”
Competitive Advantage with Optimization - Anwar Ali 115
116. Expected Learning Outcome
You will learn:
Where O.R. fits in the analytics big picture and how it
helps decision making
Algebraic expressions and spreadsheet modeling
techniques
Linear Programming (LP) concepts and modeling
techniques
How to formulate decision-making problems as LP
models and solve with various solvers
Competitive Advantage with Optimization - Anwar Ali 116
117. Course Outline – Fundamentals
Introduction to Analytics and O.R.
Algebraic Expressions
Basic Spreadsheet Modeling
LP and Solvers
Model Types
Competitive Advantage with Optimization - Anwar Ali 117