Uploaded by ULRICA ANG JIA YI _

Lecture 1- Intro to LP

advertisement
OPIM 101 Decision
Analysis
Decision Making Under
Certainty
LP Formulation
Reference: Textbook Chapters 2 and 4 (Model formulation only)
SMU Classification: Restricted
Fighting Crime and Diseases
Smart policing technology that is based on criminal historical trends, such as where and
when certain crimes were committed. The system can help police forces understand
where crime types are most likely to occur and plan their resources accordingly.
“ With more available data, software and human expertise, the hospitals have been able
to take on problems ranging from the simple to the increasingly complex. They have been
able to analyse workloads at various departments and clinics, categorise patients by
medical history and their outcomes, and identify the best groups to target for various
programmes.”
OPIM 101 Decision Analysis
2
SMU Classification: Restricted
◼ In the past, managers depended on intuition
as the primary vehicle for making decisions.
Management
Problems
intuition
Decision
QUESTION:
Is there a more systematic and optimal way to make the
decision?
OPIM 101 Decision Analysis
3
SMU Classification: Restricted
Relating Our Intuition with Theory
◼ Example:
Set A:
2 x chicken + fries + drinks = $2.95
Set B:
1 x chicken + 1 x fish + fries + drinks=$3.95
Set C:
1 x chicken + 4xshrimps + 1xfish + drinks=$5.95
Additional side dish:
1x chicken = $1.10
1x fish = $1.80
What is the most economical combination, assuming I want at
least a 2 x chicken, 1 x fish meal, a drink? Let’s suppose I
want to go for at least a set meal.
OPIM 101 Decision Analysis
4
SMU Classification: Restricted
Relating Our Intuition with
Theory
Combination 1:
Set A + 1 x fish = $2.95 + $1.80 = $4.75
Combination 2:
Set B + 1 x chicken = $3.95 + $1.10 = $5.05
Intuition: Go for Combination 1. Savings of $0.30.
OPIM 101 Decision Analysis
5
SMU Classification: Restricted
Optimization example
Backpack/Knapsack Problem
◼ You are backpacker who is going on
a trip to Mt Kinabalu.
◼ Maximum Backpack Load : 10kg
◼ Each item adds value to your
survival
◼ Can only take one of each item
Problem: To find the combination of
items that will maximize the value for
your trip
Item
map
compass
water
sandwich
glucose
Canned
food
banana
apple
cheese
beer
suntan
cream
camera
T-shirt
trousers
Weight
0.09
0.15
8
1.0
2.0
Value
150
35
200
160
60
4
45
0.35
0.50
0.25
0.50
60
40
30
10
0.10
70
1
0.20
0.80
30
15
10
SMU Classification: Restricted
Relating Our Intuition with Theory
How to choose the combination
of items?
Heuristic Method:
◼ For each item, divide the value
by the weight of each item
◼ Choose the item which has the
highest value to weight ratio
(most worth it) until the highest
weight is obtained
◼ Also known as a greedy
search algorithm
Item
Weight
Value
map
compass
water
sandwich
glucose
Canned
food
banana
apple
cheese
beer
suntan
cream
camera
T-shirt
trousers
0.09
0.15
8
1
2
150
35
200
160
60
Value to
Weight
Ratio
1666.667
233.3333
25
160
30
4
45
11.25
0.35
0.5
0.25
0.5
60
40
30
10
171.4286
80
120
20
0.1
70
700
1
0.2
0.8
30
15
10
30
75
12.5
SMU Classification: Restricted
Relating to Intuition
OPIM 101 Decision Analysis
8
SMU Classification: Restricted
◼ Management science applies a logical,
systematic approach to making decisions
and thereby, solving management
problems.
◼ It involves the building of explicit models for
analysis and managerial decision making.
OPIM 101 Decision Analysis
9
SMU Classification: Restricted
Iterative Decision Analysis Process
Model
Analysis
Results
Analyst’s role
Interpretation of results
Manager’s role
Management
Problems
intuition
Decision
OPIM 101 Decision Analysis
10
SMU Classification: Restricted
The “Management Science” Approach
◼ Management science uses a scientific approach to
make decisions.
◼
It is used in a variety of organizations to solve many
different types of problems. Decision, decisions,
decision
◼ It encompasses a logical mathematical approach to
problem solving.
◼ Management science, also known as operations
research, quantitative methods, etc., involves a
philosophy of problem solving in a logical manner.
OPIM 101 Decision Analysis
11
SMU Classification: Restricted
BREAK
OPIM 101 Decision Analysis
12
SMU Classification: Restricted
Observation
Observation –
Identification of a problem that
exists (or may occur soon) in a
system or organization.
OPIM 101 Decision Analysis
13
SMU Classification: Restricted
Observation
Problem Definition
Problem Definition Problem must be clearly and
consistently defined, showing its
boundaries and interactions with
the objectives of the
organization.
Define the goal/objective clearly.
Identify decision variables,
variables, parameters, data.
OPIM 101 Decision Analysis
14
SMU Classification: Restricted
Observation
Problem Definition
Model Construction Model construction
Development of the functional
mathematical relationships that
describe the decision variables,
objective function and
constraints of the problem.
OPIM 101 Decision Analysis
15
SMU Classification: Restricted
Observation
Problem Definition
Model construction
Solution
Model Solution –
Models solved using management
science techniques.
In reality, solution may be a
recommended “decision” that
helps a manager make decision.
Why?
OPIM 101 Decision Analysis
16
SMU Classification: Restricted
Observation
Problem Definition
Model Implementation Model construction
Solution
Actual use of the model or its
solution.
In practice, solution derived
may not be used. Why?
Implementation
OPIM 101 Decision Analysis
17
SMU Classification: Restricted
Observation
Problem Definition
Management Science
Techniques
Model construction
Solution
Implementation
Feedback
OPIM 101 Decision Analysis
18
SMU Classification: Restricted
The “Management Science” Approach
This direct decision-support use of models
leads to better management decisions,
because the manager must address the
following issues:
(a) what questions to ask
(b) what alternatives to investigate
(c) where to focus attention
OPIM 101 Decision Analysis
19
SMU Classification: Restricted
Problems of Implementation of MS
solutions
◼ Usually, the manager and analyst
are not the same person.
◼ Hence, an analyst is responsible of
not only solving the problem, but
explaining the benefits of the
solution. – Selling? Change
management?
OPIM 101 Decision Analysis
20
SMU Classification: Restricted
◼ That is why you are learning:
Decision Analysis encompassing
Management Science ideas and techniques
◼ There are now many computers and software tools
available.
◼ But the crucial first step is always to frame a
management situation as a mathematical model.
◼ In this course you will be introduced to a variety of
models along with appropriate concepts.
◼
Often, you will find these models to be overly-simplified
or difficult to apply to the real world.
◼ Importance of implementation, or Change
Management!
OPIM 101 Decision Analysis
21
SMU Classification: Restricted
Relating Our Intuition with Theory
◼ Example:
Set A:
2 x chicken + fries + drinks = $2.95
Set B:
1 x chicken + 1 x fish + fries + drinks=$3.95
Set C:
1 x chicken + 4xshrimps + 1xfish + drinks=$5.95
Additional side dish:
1x chicken = $1.10
1x fish = $1.80
What is the most economical combination, assuming I want at
least 2 x chicken, at least 1 x fish, at least a drink? Let’s
suppose I want to go for a set meal.
OPIM 101 Decision Analysis
22
SMU Classification: Restricted
Back to Problem Formulation for the
most economical meal.
◼ Problem: Choose the most economical combination
with drinks
◼ Parameters: Cost of each set meal, side dish
◼ Decision Variables:
xa: number of set A
xb: number of set B
xc: number of set C
yc: number of additional chicken
yf: number of additional fish
OPIM 101 Decision Analysis
23
SMU Classification: Restricted
Model
Min 2.95 xa+ 3.95 xb+ 5.95 xc + 1.10 yc + 1.80 yf
s.t.
2 xa + 1 xb + 1 xc + 1 yc  2 (chicken constraint)
1 xb + 1 xc + 1 yf
1 (fish constraint)
xa + xb + xc = 1
xa + xb + xc ≥ 1
(set meal constraint (only set meal comes with drinks))
xa, xb, xc, yc, yf
0


OPIM 101 Decision Analysis
24
SMU Classification: Restricted
Questions
◼ Is the model still valid if “
 “ in constraint is
changed to “=“? What does this mean?
◼ What does (xa,xb,xc,yc,yf)= (0,1,0,0,0) mean?
◼ What if there is a promotion in set A which now
gives 3 pieces of chicken for the same price?
OPIM 101 Decision Analysis
25
SMU Classification: Restricted
BREAK
OPIM 101 Decision Analysis
26
SMU Classification: Restricted
Linear Programming: An Overview
◼ Steps in application:
◼
◼
◼
◼
Identify problem as solvable by linear
programming.
Formulate a mathematical model of the
unstructured problem.
Solve the model.
Implementation
OPIM 101 Decision Analysis
27
SMU Classification: Restricted
Model Components: D.O.C.
◼ Decision variables - mathematical symbols representing
levels of activity of a firm.
◼ Objective function - a linear mathematical relationship
describing an objective of the firm, in terms of decision variables
- this function is to be maximized or minimized.
◼ Constraints – requirements or restrictions placed on the firm
by the operating environment, stated in linear relationships of
the decision variables.
OPIM 101 Decision Analysis
28
SMU Classification: Restricted
Model Components
◼ Parameters - numerical coefficients and
constants used in the objective function and
constraints.
OPIM 101 Decision Analysis
29
SMU Classification: Restricted
Summary of Model Formulation
Steps: D.O.C.
◼ Step 1 : Clearly define the Decision variables
-very important. Spend more time on it.
◼ Step 2 : Construct the Objective function
◼ Step 3 : Formulate the Constraints
-Can breakdown into different types
of constraints
OPIM 101 Decision Analysis
30
SMU Classification: Restricted
LP Model Formulation Example
Resource Requirements
product
Labor
(Hr./Unit)
Clay
(Lb./Unit)
Profit
($/Unit)
Bowl
1
4
40
Mug
2
3
50
Clay availability: 120lbs/day
Labour availability: 40 hours/day
◼ Product mix problem - Beaver Creek Pottery Company
◼ How many bowls and mugs should be produced to maximize
profits given labor and materials constraints?
◼ Product resource requirements and unit profit is given in the
tables above
SMU Classification: Restricted
LP Model Formulation Example
Decision Variables:
x1 = number of bowls to produce per day
x2 = number of mugs to produce per day
Objective Function:
Maximize Z = $40x1 + $50x2
Where Z = profit per day
Resource Constraints:
1x1 + 2 x2  40 hours of labor
4 x1 + 3 x2  120 pounds of clay
Non-Negativity Constraints:
x1  0; x2  0
Resource Availability:
40 hrs of labor per day
120 lbs of clay
SMU Classification: Restricted
LP Model Formulation Example
Complete Linear Programming Model:
Maximize
subject to:
Z = $40 x1 + $50 x2
1x1 + 2x2 ≤ 40
4x1 + 3x2 ≤ 120
x1 , x2 ≥ 0
SMU Classification: Restricted
Example: Product-Mix Problem
of BM
◼ For coming week, BM has commitment to produce at least 1000
lb of Airtex, 500 lb of Extendex, and 400 lb of Resistex, but BM
knows it can sell more of each product.
◼ Current inventories of ingredients are 500 lb of polymer A, 425
lb of polymer B, 650 lb of polymer C, and 1100 lb of base.
◼ Each lb of Airtex nets a profit of $7, each lb of Extendex a profit
of $7, and each lb of Resistex a profit of $6.
◼ As production manager, you need to determine optimal
production plan for coming week.
OPIM 101 Decision Analysis
34
SMU Classification: Restricted
Product-Mix Problem of BM
◼ The amount (in oz) of each ingredient used per lb of
each product is given in following Table.
(Note: 1 lb = 16 oz )
Resource Requirement
OPIM 101 Decision Analysis
35
SMU Classification: Restricted
Decision Variables
◼ What can you control ? What is a plan ?
-variables which requires your planning/decision
Decision Variables:
A = no. of lb of Airtex to produce
E = no. of lb of Extendex to produce
R = no. of lb of Resistex to produce
OPIM 101 Decision Analysis
36
SMU Classification: Restricted
Objective Function
◼ What do we mean by optimal plan ?
Maximize Profit = 7A + 7E + 6R (in $)
◼ Objective: To choose decision variables such
that profit is maximized.
OPIM 101 Decision Analysis
37
SMU Classification: Restricted
Constraints
◼ In order to maximize profit we would like to
choose values of our decision variables A, E,
and R to be as large as possible.
◼ However, the problem has imposed some
restrictions on the values which these
variables can take.
◼ Such restrictions are called constraints.
OPIM 101 Decision Analysis
38
SMU Classification: Restricted
Demand and Non-negativity
Constraints:
DEMAND CONSTRAINTS:
A ≥ 1,000
E ≥ 500
Already implies non-negativity
R ≥ 400
NON-NEGATIVITY CONSTRAINTS:
A, E, R, ≥ 0
May be very obvious!
In this course, we will still state these constraints.
OPIM 101 Decision Analysis
39
SMU Classification: Restricted
Resource Constraints:
Amount of polymer A used = 4A + 3E + 6R (oz)
Amount available = 500 lb = 8,000 oz
Therefore, 4A + 3E + 6R ≤ 8,000 (polymer A)
Similarly,
2A + 2E + 3R ≤ 6,800 (polymer B)
4A + 2E + 5R ≤ 10,400 (polymer C)
6A + 9E + 2R ≤ 17,600 (base)
OPIM 101 Decision Analysis
40
SMU Classification: Restricted
Formulation of BM’s Product-Mix Problem
OPIM 101 Decision Analysis
41
SMU Classification: Restricted
Exercise 1: Product-Mix Problem of BM
◼ What if the problem changes to the following?
◼
◼
Each kg of Airtex nets a profit of $20, each kg
of Extendex a profit of $20, and each kg of
Resistex a profit of $15.
Every kg of Airtex produced, you have to
produce at least 2 kg of Resistex
OPIM 101 Decision Analysis
42
SMU Classification: Restricted
Exercise 1: Product-Mix Problem of BM
– One Solution
◼ 1 lb = 0.453592kg
Decision Variables
A= no. of kg of Airtex to produce
E= no. of kg of Extendex to produce
R= no. of kg of Resistex to produce
Max Z =20 A + 20 E + 15 R (in $)
s.t
Demand Constraints
A ≥ 1,000 X 0.453592
E ≥ 500 X 0.453592
R ≥ 400 X 0.453592
www.wooclap.com
Write down the constraint to describe this: “Every kg of Airtex produced,
R ≥ 2Ayou
(every
lb to
of produce
A produced,
produce
at Resistex”
least 2lb R)
have
at least
2 kg of
OPIM 101 Decision Analysis
43
SMU Classification: Restricted
Exercise 1: Product-Mix
Problem of BM – One Solution
Resource Constraints
4A + 3E + 6R ≤ 8,000 X 0.453592 (polymer A)
2A + 2E + 3R ≤ 6,800 X 0.453592 (polymer B)
4A + 2E + 5R ≤ 10,400 X 0.453592 (polymer C)
6A + 9E + 2R ≤ 17,600 X 0.453592 (base)
Non-Negativity Constraints
A, E, R, ≥ 0
OPIM 101 Decision Analysis
44
SMU Classification: Restricted
Recap
◼ Although the nonnegativity conditions are clearly
redundant here, they are often included unless other
conditions are required.
◼ Note that the objective function and constraints are
all linear in the decision variables.
◼ Hence, we call the above a linear program (LP) or
linear programming problem (LP problem).
* Good practice to retain only the constants on the RHS
OPIM 101 Decision Analysis
45
SMU Classification: Restricted
LP Example
◼ A company produces two products that are processed on a
assembly line with 100 available hours. Each product requires
10 hours on the assembly line. The profit for product 1 is $6 per
unit and profit for product 2 is $4 per unit.
Formulate a linear programming model for the problem.
OPIM 101 Decision Analysis
46
SMU Classification: Restricted
LP Example
X1: Number of Product 1 to produce
X2: Number of Product 2 to produce
Max Z = 6X1 + 4X2
s.t.
10X1 + 10X2 <= 100
X1, X2 >= 0
Based on your model, what is a possible decision?
OPIM 101 Decision Analysis
47
SMU Classification: Restricted
Exercise 2: Extension
◼ A company produces two products that are processed on two
assembly lines.
◼
◼
Line 1 has 100 available hours
Line 2 has 42 available hours.
◼ Each product requires 10 hours on line 1, and on line 2, product
1 requires 7 hours and product 2 requires 3 hours.
◼ The profit for product 1 is $6 per unit and profit for product 2 is
$4 per unit.
Formulate a linear programming model for the problem.
OPIM 101 Decision Analysis
48
SMU Classification: Restricted
Exercise 2: Extension
X1: Number of Product 1 to produce
X2: Number of Product 2 to produce
Max Z = 6X1 + 4X2
s.t.
10X1 + 10X2 <= 100 [LINE 1 constraint]
Write down
the additional
7X1+3X2
<= 42
[LINE 2constraint(s)
constraint]
X1, X2 >= 0
www.wooclap.com
Based on your model, what is a possible decision?
OPIM 101 Decision Analysis
49
SMU Classification: Restricted
Exercise 3:
A furniture maker makes chairs and tables from two resources –
teak wood and labour. The company has 80 hours of labour and 36
board-ft of wood available each data. Each chair requires 8 hours
of labour and 2 board ft of wood. Each table requires 10 hours of
labour and 6 board ft of wood. The profit derived from each chair is
$400 and from each table is $100. The company wishes to
determine the number of chairs and tables to produce each day in
order to maximize profit.
Formulate a linear programming model for this problem.
OPIM 101 Decision Analysis
50
SMU Classification: Restricted
Exercise 3:
Xt: Number of Tables Produced
Xc: Number of Chairs Produced
Max Z = 400Xc + 100Xt
s.t.
8Xc + 10Xt <= 80 [LABOUR]
Write down the missing constraints
2Xc + 6Xt <= 36 [WOOD]
www.wooclap.com
Xc, Xt >= 0
OPIM 101 Decision Analysis
51
SMU Classification: Restricted
Blending Problem:
Problem Definition (TextBk Page 156)
•
A petroleum company produces 3 grades of motor oil –
Super, Premium, Extra.
•
3 Components of Raw Materials
•
Determine the optimal mix of the three components in each
grade of motor oil that will maximize profit.
•
Company wants to produce at least 3,000 barrels of each
grade of motor oil.
Decision variables: The quantity of each of the three
components used in each grade of gasoline (9 decision
variables):
xij = barrels of component i used in motor oil grade j per day,
where i = 1, 2, 3 and j = s (super), p (premium), and e (extra).
SMU Classification: Restricted
Problem Definition and Data
Component
Maximum Barrels
Available/day
Cost/barrel
1
4,500
$12
2
2,700
$10
3
3,500
$14
Grade
Component Specifications
Selling Price ($/bbl)
Super
At least 50% of 1
Not more than 30% of 2
$23
Premium
At least 40% of 1
Not more than 25% of 3
Extra
At least 60% of 1
At least 10% of 2
20
18
SMU Classification: Restricted
Problem Statement and Variables
Blend specification constraint for super, which
must contain 50% of component 1.
x1s
 0.50
x1s + x2 s + x3 s
SMU Classification: Restricted
Model Summary
Maximize Z = 11x1s + 13x2s + 9x3s + 8x1p + 10x2p + 6x3p + 6x1e
+ 8x2e + 4x3e
subject to:
x1s + x1p + x1e  4,500 bbl.
x2s + x2p + x2e  2,700 bbl.
x3s + x3p + x3e  3,500 bbl.
0.50x1s - 0.50x2s - 0.50x3s  0
0.70x2s - 0.30x1s - 0.30x3s  0
0.60x1p - 0.40x2p - 0.40x3p  0
0.75x3p - 0.25x1p - 0.25x2p  0
0.40x1e- 0.60x2e- - 0.60x3e  0
all xij  0
0.90x2e - 0.10x1e - 0.10x3e  0
x1s + x2s + x3s  3,000 bbl.
x1p+ x2p + x3p  3,000 bbl.
x1e+ x2e + x3e  3,000 bbl.
SMU Classification: Restricted
Summary on LP Modeling
◼ An LP problem (or simply LP) is an optimization
problem where :
1. We maximize (or minimize) a linear function (called
the objective function) of the decision variables.
2. The values of the decision variables must satisfy a
set of constraints. Each constraint must be a linear
equation ( = ) or linear inequality ( ≤ or ≥ ).
3. A sign restriction is associated with each decision
variable. For each variable x, either x ≥ 0 or x ≤ 0 or x
may be unrestricted in sign
OPIM 101 Decision Analysis
56
SMU Classification: Restricted
Summary on LP Modeling
◼ Note:
By convention, constraints are written such
that all the decision variables are on the LHS,
while the constant is on the RHS.
So far, we have only learn how to model the problem.
We will learn how to solve in the next lecture.
OPIM 101 Decision Analysis
57
SMU Classification: Restricted
Take Home Exercise:
Write down the formulation and
submit to TA as a group
◼ Read Case Problem in Chapter 2, Page 93:
Design of Metropolitan Police Patrol Area
Formulate a model to find the best patrol area to
minimize the average time it took to respond to a call?
(If you are adventurous, you can try to solve the model. Read ahead if
possible)
Discuss in the next lecture
HINT: Look at 1 rectangular area and formulate the model with
information provided. Follow the D.O.C. process. It’s a simple model.
OPIM 101 Decision Analysis
58
SMU Classification: Restricted
OPIM 101 Decision Analysis
59
Download