Uploaded by aldenlee 300

opimrevision2

advertisement
What have
we
learned
OPIM101 Revision
Mixed Integer
Programming
Transportation
Model
Project
Management
Decision Analysis.
A 0 - 1 Integer Model (3 of 5)
• Some variations in modeling:
1) Multiple-choice constraints:
- Only Swimming pool or Tennis center or athletic field
must be built.
x1 + x2 + x3 =1
OPIM101 - Session 6
2
A 0 - 1 Integer Model (4 of 5)
2) Conditional constraints:
- The tennis center (x2) is conditional upon construction of swimming
pool (x1)
x2 ๏‚ฃ x1
i.e.
x1=0 implies x2=0. If x1=1, then x2 can be 0 or 1
OPIM101 - Session 6
3
A 0 - 1 Integer Model (5 of 5)
3) Corequisite constraints:
- The tennis center (x2) and swimming pool (x1) must
be constructed together or not constructed together.
x2 = x 1
OPIM101 - Session 6
4
Exercise
A Fixed-Cost Problem
• A company is considering making 3 products. Let x1, x2, x3
denote the quantity (not necessarily integer) of each product
to be produced.
• The fixed cost and unit profit for each product are as follows:
OPIM101 - Session 6
6
Constraints
• Suppose we have the following constraints:
• Formulate a model for determining the maximum
profit production policy.
OPIM101 - Session 6
7
Final Formulation
OPIM101 - Session 6
8
6.3 Example: Fixed Cost
• M co. is currently selling two products, 1 and 2, for unit
revenue $5 and $8 respectively. There is a possibility of selling
product 3 with revenue, $15, by investing in specialized
machinery, which has a fixed cost of $500. However, M co. can
only keep 1000 products as inventory.
The predicted sales of product 1 is more than 500. Formulate
a suitable model to help the manager make a decision.
OPIM101 - Session 6
9
Transportation Example
Parameters of the problem
• We can formulate the problem as an LP.
OPIM101 - Session 9
11
Transportation Example
• Decision Variables:
xij = no. of units of product from source i to
destination j
OPIM101 - Session 9
12
Transportation Example
• Constraints:
Note that we have
equalities for all the
constraints in a balanced
problem.
OPIM101 - Session 9
13
Transportation Problem
Without penalty
5๐‘ฅ1๐ด + 3๐‘ฅ1๐ต + 4๐‘ฅ1๐ถ
• min +2๐‘ฅ2๐ต + 10๐‘ฅ2๐ต + 3๐‘ฅ2๐ถ
+4๐‘ฅ3๐ด + 2๐‘ฅ3๐ต + 5๐‘ฅ3๐ถ
• Subject to
With penalty
5๐‘ฅ1๐ด + 3๐‘ฅ1๐ต + 4๐‘ฅ1๐ถ
+2๐‘ฅ2๐ต + 10๐‘ฅ2๐ต + 3๐‘ฅ2๐ถ
• min
+4๐‘ฅ3๐ด + 2๐‘ฅ3๐ต + 5๐‘ฅ3๐ถ
+11๐‘ ๐ด + 12๐‘ ๐ต + 13๐‘ ๐ถ
• ๐‘ฅ๐‘–๐‘— ≥ 0
• Subject to
• ๐‘ฅ๐‘–๐‘— ≥ 0, ๐‘ ๐‘– ≥ 0
• ๐‘ฅ1๐ด + ๐‘ฅ1๐ต + ๐‘ฅ1๐ถ = 50
• ๐‘ฅ1๐ด + ๐‘ฅ1๐ต + ๐‘ฅ1๐ถ = 50
• ๐‘ฅ2๐ด + ๐‘ฅ2๐ต + ๐‘ฅ2๐ถ = 50
• ๐‘ฅ2๐ด + ๐‘ฅ2๐ต + ๐‘ฅ2๐ถ = 50
• ๐‘ฅ3๐ด + ๐‘ฅ3๐ต + ๐‘ฅ3๐ถ = 50
• ๐‘ฅ3๐ด + ๐‘ฅ3๐ต + ๐‘ฅ3๐ถ = 50
• ๐‘ฅ1๐ด + ๐‘ฅ2๐ด + ๐‘ฅ3๐ด ≤ 100
• ๐‘ฅ1๐ด + ๐‘ฅ2๐ด + ๐‘ฅ3๐ด + ๐‘ ๐ด = 100
• ๐‘ฅ1๐ต + ๐‘ฅ2๐ต + ๐‘ฅ3๐ต ≤ 20
• ๐‘ฅ1๐ต + ๐‘ฅ2๐ต + ๐‘ฅ3๐ต + ๐‘ ๐ต = 20
• ๐‘ฅ1๐ถ + ๐‘ฅ2๐ถ + ๐‘ฅ3๐ถ ≤ 60
• ๐‘ฅ1๐ถ + ๐‘ฅ2๐ถ + ๐‘ฅ3๐ถ + ๐‘ ๐ถ = 60
Check whether you are able
to solve this problem.
Remember nonnegative
constraint.
Which part should be
equality, which part is <=?
Don’t have to write integer
constraint since all the
parameters are integer.
Transhipment
• Decision Variables:
xij = number of tons of wheat shipped from location
i to location j
OPIM101 - Session 9
16
Transshipment Model Example
Model Formulation
Minimize Z = $16x13 + 10x14 + 12x15 + 15x23 + 14x24
+ 17x25 + 6x36 + 8x37 + 10x38 + 7x46 + 11x47
+ 11x48 + 4x56 + 5x57 + 12x58
subject to:
x13 + x14 + x15 = 300
x23 + x24 + x25 = 300
x36 + x46 + x56 = 200
x37 + x47 + x57 = 100
x38 + x48 + x58 = 300
x13 + x23 - x36 - x37 - x38 = 0
x14 + x24 - x46 - x47 - x48 = 0
x15 + x25 - x56 - x57 - x58 = 0
xij ๏‚ณ 0
OPIM101 - Session 9
17
Check if supply is equal to
demand.
Remember nonnegative
constraints, supply constraints,
demand constraints, conservation
of flow.
No need to impose integer
constraints.
Extra practice
A Multi-Period Scheduling Example
Decision Variables
Decision Variables:
rj = regular production of computers in week j
(j = 1, 2, …, 6)
oj = overtime production of computers in week j
(j = 1, 2, …, 6)
ij = extra computers carried over as inventory in week j
(j = 1, 2, …, 5)
OPIM101 - Session 9
20
A Multi-Period Example
Model Summary
Minimize Z = $190(r1 + r2 + r3 + r4 + r5 + r6) + $260(o1+o2
+o3 +o4+o5+o6) + 10(i1 + i2 + i3 + i4 + i5)
subject to:
rj ๏‚ฃ 160 computers in week j (j = 1, 2, 3, 4, 5, 6)
oj ๏‚ฃ 50 computers in week j (j = 1, 2, 3, 4, 5, 6)
r1 + o1 - i1 = 105
week 1
r2 + o2 + i1 - i2 = 170 week 2
r3 + o3 + i2 - i3 = 230 week 3
r4 + o4 + i3 - i4 = 180 week 4
r5 + o5 + i4 - i5 = 150 week 5
r6 + o6 + i5 = 250
week 6
rj, oj, ij ๏‚ณ 0
OPIM101 - Session 9
21
Extra exercise.
Just define your variables
carefully.
Capacity constraint.
Inventory Definition.
Assignment Problem
Special case of transportation problem.
It might be unbalanced or comes with special constraint.
OPIM101 - Session 9
23
Assignment 3 Question 2
Using Networks.
There are two ways of presenting project networks:
1.
2.
AOA (Activity-on-Arrow) convention
AON (Activity-on-Node) convention
Advantage of using networks over the Gantt chart is that the former provides a
better picture of the activities by the use of a network.
OPIM101 - Session 10
28
Dummy Arc is
needed.
OPIM101 - Session 10
29
OPIM101 - Session 10
30
Recall:
EF = ES + t
Compute the
Earliest Time from
start point
OPIM101 - Session 10
31
Recall:
LS = LF - t
Compute the Latest
Time from end
point
OPIM101 - Session 10
32
OPIM101 - Session 10
33
Also, convert to AOA, write an LP
to minimize cost.
OPIM101 - Session 10
35
We repeat the process by looking at the critical path.
Check if there is any change to the critical path.
Which activity should be crashed next ?
How much can we reduce this activity by?
OPIM101 - Session 10
36
Using LP Model to minimize project duration
The objective is to minimize the project duration (critical path time).
General linear programming model with AOA convention:
Minimize Z = ๏“xi
subject to:
xj - xi ๏‚ณ tij for all activities i ๏‚ฎ j
xi, xj ๏‚ณ 0
Where:
xi = earliest event time of node i
xj = earliest event time of node j
tij = time of activity i ๏‚ฎ j
OPIM101 - Session 11
37
Project Crashing with Linear Programming
Example Problem – Model Formulation
Minimize Z = $400y12 + 500y23 + 3000y24 + 200y45 + 7000y46
+ 200y56 + 7000y67
subject to:
y12 ๏‚ฃ 5
y12 + x2 - x1 ๏‚ณ 12
x7 ๏‚ฃ 30 Requirement
y23 ๏‚ฃ 3
y23 + x3 - x2 ๏‚ณ 8
xi, yij ≥ 0
y24 ๏‚ฃ 1
y24 + x4 - x2 ๏‚ณ 4
Allowable
y34 ๏‚ฃ 0
y34 + x4 - x3 ๏‚ณ 0
Objective is to
crashing
y45 ๏‚ฃ 3
y45 + x5 - x4 ๏‚ณ 4
minimize the
y46 ๏‚ฃ 3
y46 + x6 - x4 ๏‚ณ 12
cost of crashing
y56 ๏‚ฃ 3
y56 + x6 - x5 ๏‚ณ 4
y67 ๏‚ฃ 1
y67 + x7 - x6 ๏‚ณ 4
xi = earliest event time of node i
xj = earliest event time of node j
yij = amount of time by which activity i ๏‚ฎ j is crashed
OPIM101 - Session 11
38
Expected Value
• Select the decision with the biggest expected value.
• Expected value is computed by multiplying each decision outcome under each state of nature
by the probability of its occurrence.
OPIM101 - Session 12
39
Note:
The expected value and expected opportunity loss criteria will
always result in the same decision.
Decision is highly dependent on the probability estimate of the states of
nature. Thus, if probability estimate is bad, wrong decisions will be made.
OPIM101 - Session 12
40
EV(Large Plant)
EV(Small Plant)
EV(Do Nothing)
= $380,000P – $180,000
= $120,000P – $20,000
= $0
EV Values
$300,000
$200,000
$100,000
Point 2
EV (large plant)
EV (small plant)
Point 1
0
EV (do nothing)
–$100,000
–$200,000
How do you get point 1 and 2?
OPIM101 - Session 12
41
Also, suppose probability of
overcast is 0. Probability of
rain is p, probability of
sunshine is 1-p. Practice
sensitivity analysis.
If we know that economic conditions will be Good,
the best decision will be to select Office Building.
If we know that economic conditions will be Poor,
the best decision will be to select Apartment Building
OPIM101 - Session 12
43
If we have perfect information, the expected value
= $ 100,000 (.60) + $ 30,000 (.40) = $72,000
60% of time, we
choose Office
40% of time, we
choose
Apartment
OPIM101 - Session 12
Expected Value with
Perfect Information
44
Therefore, the maximum amount a decision maker would pay for additional
information is
Expected Value OF Perfect Information
OPIM101 - Session 12
45
Decision Trees
• Decision trees are used on models where there is a sequence
of decisions, each of which could lead to one of several
uncertain outcomes.
• A decision tree is useful in providing a pictorial representation
of the decision-making process.
Represent
probability/events.
Represent the
point to make
decision.
Branches from it
indicate the states of
nature that can
happen
OPIM101 - Session 12
46
• Decision might change if we have more information regard the states of
nature. Note that we cannot control the states of nature.
• Recall: A conditional probability is the probability that an event will occur
given that another event has already occurred.
• Economic analyst provides additional information for real estate
investment decision, forming conditional probabilities:
g = good economic conditions
p = poor economic conditions
P = positive economic report
N = negative economic report
P(P๏‚ฝg) = .80
P(P๏‚ฝp) = .10
P(N๏‚ฝg) = .20
P(N๏‚ฝp) = .90
OPIM101 - Session 12
47
• A posterior probability is the altered marginal probability of an event based on
additional information.
• Prior probabilities for good or poor economic conditions in real estate decision:
P(g) = .60
P(p) = .40
This is given before we know any additional information.
• Posterior probabilities by Bayes’ rule:
P(g๏‚ฝP) =
๐‘ƒ ๐‘ƒ๏‚ฝ๐‘” ๐‘ƒ ๐‘”
[๐‘ƒ(๐‘ƒ๏‚ฝ๐‘”)๐‘ƒ(๐‘”) + ๐‘ƒ(๐‘ƒ๏‚ฝ๐‘)๐‘ƒ(๐‘)]
(.80)(.60)
= [(.80)(.60) + (.10)(.40)]= .923
• Posterior (revised) probabilities for decision:
P(g๏‚ฝN) = .250
P(p๏‚ฝP) = .077
P(p๏‚ฝN) = .750
OPIM101 - Session 12
48
Decision Analysis with more Information
๏ฎPreviously, we make a decision. Upon observing the state of nature, we
get a outcome.
Make a
decision
State of nature
Outcome
๏ฎWith additional information, we expect to make the decision after
analyzing the additional information given.
Info outcome 1
Make a
decision
Info outcome 2
Make a
decision
Add
Info
OPIM101 - Session 12
State of
nature
Outcome
State of
nature
Outcome
49
Expected value of the decision strategy
• $63,194 is the expected value of the decision strategy, which is the final
step to the decision analysis.
Find P(P), probability that we have positive report and P(N), probability that
we have negative report.
We know P(Pp) = P(P|p) P(p)
(from conditional probability formula)
We also know P(Pp) and P(Pg) are mutually exclusive, and
collectively exhaustive. (see Probability notes)
P(P) = P(Pg) + P(Pp)
= P(P|g) P(g) + P(P|p) P(p)
OPIM101 - Session 12
50
Expected value of the decision strategy
• Therefore,
Bayes’ formula
P(P) = P(P|g) P(g) + P(P|p) P(p)
= (0.8) (0.6) + (0.1)(0.4)=0.52
P(N) = P(N|g) P(g) + P(N|p) P(p)
= (0.2) (0.6) + (0.9)(0.4)=0.48
• EV (strategy)
= $89,220(.52) + 35,000(.48) = $63,194
Systematic way to
present your
solution:
OPIM101 - Session 12
51
Expected Value of Sample Information
• The expected value of sample information (EVSI) is the maximum amount a
decision maker would pay for a particular sample information.
• The expected value of sample information (EVSI) is the difference between the
expected value with and without information:
For example in the investment problem,
=$63,194 - 44,000 = $19,194
The efficiency of sample information is the ratio of the expected value of sample
information to the expected value of perfect information:
efficiency = EVSI /EVPI = $19,194/ 28,000 = .69
OPIM101 - Session 12
52
Exam format
• 5 questions
• 2 hours
• No formula sheets
• Bring a calculator and a ruler.
• Write everything in the exam booklet provided.
• Strategy: Focus on understanding, go through your homework once before exam. More
exercises on Taylor textbook.
• Consultation by appointment
• Just telegram me.
• I might miss your messages
sometimes as during exam, my
telegram is flooded.
• Just ping again if I don’t get back
to you.
There are some unconventional questions in the exam and
slightly more tedious maths in exam.
Don’t worry too much about those.
Last message
• Do not be late for your exam. Find a buddy NOW to wake you up.
• What if you are still late?
• Do not miss your exam. Do not cheat in the exam.
• Do not over-practice, the worst education system makes you practice without understanding and make sure
you forget it after exam ๏Š
• Most marks are given by illustrating your ideas/ thoughts/ understanding, some marks for correct answers.
• Go in the exam hall with a clear mind.
• Keep in touch with your group if they are good.
Bell curve for your grade. May you be on the right side of the
bell curve.
Download