Tutorial: MSBA7003 Quantitative Analysis Methods

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

MSBA7003 Quantitative Analysis Methods

Tutorial 03
Haobo Yu
2021 – 2022

1
2

Agenda

• Solution to assignment 02
• Linear Programming
• Distributing Goods through a Distribution Network

• Mixed Integer Programming


• Violating Proportionality
• Logical Constraint
3

Solution to Assignment 02

• Q1. Which of the following statement(s) is(are) true about Kroger in


the required reading material?
• A) Kroger pharmacy employs a periodic review reorder point (s) and
order-up-to-level (S) policy to manage its inventory because it has
too many product categories and the inventory cannot be monitored
continuously.
• The reason is not that it has too many product categories and the inventory
cannot be monitored continuously.

• B) In most cases, a unimodal distribution is not appropriate for


modeling the lead-time demand of a drug.
• Each instance demand falls mostly into a few discrete values and a
multimodal is more appropriate.
4

Solution to Assignment 02

• C) In Kroger’s Simulation-Optimization model, a replenishment order


will be placed whenever the inventory position falls below the
reorder point.
• If a replenishment order has been placed and not arrived yet, the pharmacy
will not place another order even though the inventory position falls below
the reorder point.

• D) In Kroger’s Simulation-Optimization model, the demand is


simulated from the true historical demand at each store.
• According to the article, on a weekly basis, the simulation-optimization
inventory management system reads the demand transaction history for up
to 220 days, reviews delivery schedules for each store.
5

Solution to Assignment 02

• Q2
• Dumoor Appliance Center sells and services several brands of major appliances.
Past sales for a particular model of refrigerator have resulted in the following
probability distribution for demand:
Demand per Week 0 1 2 3 4

Probability 0.20 0.20 0.20 0.35 0.05

• The replenishment lead time, in weeks, is described by the following distribution:


Lead Time (weeks) 1 2 3

Probability 0.15 0.50 0.35


6

Solution to Assignment 02
• Based on cost considerations as well as storage space, the company has decided
to order 15 units each time. The shipping cost for each order is $30. The holding
cost is $5 per week per unit that is left in inventory at the end of the week. The
stock-out cost is $40 per unit. The company has decided to place an order
whenever there are only two or fewer refrigerators left at the end of the week.
No order can be placed when refrigerators are being shipped on the way.
Simulate 10 weeks of operation for Dumoor Appliance by hand assuming that
there are currently 5 units in inventory. You must use the random numbers listed
in the table below to generate demand and lead time values, respectively.

• Continuous inventory monitoring: (r, Q) policy


7

Solution to Assignment 02
Week Order Total R.N. Demand Sales Lost Ending Place R.N. Lead Time
Received Available Sales Inventory Order
1 0 5 0.52 0.56

2 0.37 0.45

3 0.82 0.07

4 0.98 0.16

5 0.96 0.48

6 0.33 0.61

7 0.50 0.31

8 0.88 0.43

9 0.90 0.28

10 0.06 0.31
8

Solution to Assignment 02

• Only C is correct.
9

Solution to Assignment 02

• Q3. Which of the following statement(s) is(are) true about Monte


Carlo Tree Search?
• A) Monte Carlo Tree Search must start from the root of the tree.
• Search can be started from any decision node. Choice (A) is wrong.
• B) For UCB1 strategy, we should update the B value of every node of
a tree after a simulation.
• For UCB1 strategy, not every node of a tree will be updated after a simulation.
Nodes which have not been visited and whose parent node has not been
visited during the simulation will not be updated. Choice (B) is wrong.
• C) If the first decision (i.e., the root) has 100 options, then after 100
simulations with UCB1 strategy, the B value for some child nodes of
the root could still be infinity.
• Choice (C) is wrong.
10

Solution to Assignment 02

• D) As long as an enough amount of simulation is done, the Monte


Carlo Tree Search algorithm can always give us the optimal decision
no matter how we set the constant C.
• For choice (D), the constant C should be at least positive. When C is negative,
the Monte Carlo Tree Search algorithm may not give the optimal decision.
11

Solution to Assignment 02

• Q4.
• We are solving a dynamic decision-making problem for a project, for
which the final outcome is either success or failure. In the process to
build a search tree with the Monte Carlo Tree Search algorithm to
maximize the success rate (V), after the 22nd round of selection-
expansion-simulation-backpropagation is finished, the first 4 rows of
the table that stores the search tree is given below. The UCB1
selection strategy is used, and the constant 𝐶 = 1/2.
12

Solution to Assignment 02

• Solution:
• The upper confidence bound (UCB) for node 𝑖 (an option) is given by
ln 𝑁𝑖
𝐵𝑖 = 𝑉𝑖 +
𝑛𝑖
• For choice (A), suppose the 22nd search started from node 4 and
failed. Before the 22nd search,
0.1667
• 𝑛2 = 6, 𝑉2 = 6 ∗ = 0.1667, 𝑁2 = 21, 𝐵2 = 0.879.
6
0
• 𝑛3 = 4, 𝑉3 = 4 ∗ = 0, 𝑁3 = 21, 𝐵3 = 0.8724.
4
0.4167
• 𝑛4 = 11, 𝑉4 = 12 ∗ = 0.4545, 𝑁4 = 21, 𝐵4 = 0.9806.
11
• The 22nd search started from node 4. Choice (A) is wrong.
13

Solution to Assignment 02
• For choice (B), since the node 4 has the highest UCB value, the 23rd
search will surely start from node 4. Choice (B) is correct.
• For choice (C), since the 23rd search will start from node 4, the UCB
values for node 2 and 3 will increase. For node 4, if the 23rd search is
successful, the updated UCB value is as follows.
6
• 𝑛4 = 13, 𝑉4 = = 0.4615, 𝑁4 = 23, 𝐵4 = 0.9526.
13
• Choice (C) is correct.
• For choice (D), suppose the 23rd search fails. The updated UCB values
are as follows.
0.1667
• 𝑛2 = 6, 𝑉2 = 6 ∗ = 0.1667, 𝑁2 = 23, 𝐵2 = 0.8896.
6
0
• 𝑛3 = 4, 𝑉3 = 4 ∗ = 0, 𝑁3 = 23, 𝐵3 = 0.8854.
4
0.4167
• 𝑛4 = 13, 𝑉4 = 12 ∗ = 0.3846, 𝑁4 = 23, 𝐵4 = 0.8757.
13
• Choice (D) is correct.
14

Distributing Goods
• The DISTRIBUTION UNLIMITED CO. will be producing the same new
product at two different factories, and then the product must be
shipped to two warehouses, where either factory can supply either
warehouse.

• The decision to be made concerns how much to ship through each


shipping lane. The objective is to minimize the total shipping cost.
15

Distributing Goods

• Decision variables
• 𝑥𝐹1−𝐹2 , 𝑥𝐹1−𝐷𝐶 , 𝑥𝐹1−𝑊1 , 𝑥𝐹2−𝐷𝐶 , 𝑥𝐷𝐶−𝑊2 , 𝑥𝑊1−𝑊2 , 𝑥𝑊2−𝑊1 : the amounts
shipped through the respective lanes
• Constraints
• Upper-bound constraints: 𝑥𝐹1−𝐹2 ≤ 10 and 𝑥𝐷𝐶−𝑊2 ≤ 80
• Net flow constraints:
• Factory: amount shipped out - amount shipped in = amount produced
• DC: amount shipped out = amount shipped in
• Warehouse: amount shipped in - amount shipped out = amount needed
• Nonnegativity constraints
• Objective
• To minimize the total shipping cost
16

Distributing Goods
• Programming model
17

Distributing Goods

• Final solution

• The resulting total shipping cost is $49,000.


18

Violating Proportionality

• The SUPERSUDS CORPORATION is developing its marketing plans for


next year’s new products. For three of these products, the decision
has been made to purchase a total of five TV spots for commercials
on national television networks. The problem we will focus on is how
to allocate the five spots to these three products, with a maximum of
three spots (and a minimum of zero) for each product.
Profit

Number of TV Spots Product

1 2 3

0 0 0 0
1 1 0 -1

2 3 2 2

3 3 3 4
19

Violating Proportionality
• One Formulation with Auxiliary Binary Variables.
• A natural formulation would be to let 𝑥1 , 𝑥2 , 𝑥3 be the number of TV
spots allocated to the respective products.
• However, we cannot write a linear objective function in terms of
these integer decision variables. For example, the profit function of
product 1, 𝐹1 𝑥1 , is not linear.
• Now we introduce an auxiliary binary variable 𝑦𝑖𝑗 to replace the
1 if 𝑥𝑖 = 𝑗
original decision variables, where 𝑦𝑖𝑗 = ቊ
0 otherwise.
• The values of 𝑦𝑖𝑗 can imply the value of 𝑥𝑖 .
• For example, 𝑦21 = 0, 𝑦22 = 0, and 𝑦23 = 1 mean that 𝑥2 = 3.
• These definitions are enforced by adding the constraints.
• 𝑦𝑖1 + 𝑦𝑖2 + 𝑦𝑖3 ≤ 1 for 𝑖 = 1, 2, 3.
20

Violating Proportionality

• The resulting linear integer programming model is

• and each 𝑦𝑖𝑗 is binary. And the optimal solution is


21

Violating Proportionality

• Another Formulation with Auxiliary Binary Variables.


• We now redefine the above auxiliary binary variables 𝑦𝑖𝑗 as follows:
1 if 𝑥𝑖 ≥ 𝑗
𝑦𝑖𝑗 = ቊ
0 otherwise.
• Therefore,

• for 𝑖 = 1, 2, 3.
• These definitions are enforced by adding the constraints
22

Violating Proportionality

• The new definition of the 𝑦𝑖𝑗 also changes the objective function.

Number of TV Spots of Product 1 Profit of Product 1

0 0
1 1

2 3
3 3
23

Violating Proportionality

• The new linear integer programming problem is

• and each 𝑦𝑖𝑗 is a binary variable.


24

Violating Proportionality

• Solving this problem gives an optimal solution of


25

Logical Constraint
• How to formulate the following shaded area in a linear programming
problem?
26

Logical Constraint
• Constraint Feasibility
• Possibly the simplest logical question that can be asked in mathematical
programming is whether a given choice of the decision variables satisfies a
constraint. More precisely, when is the general constraint satisfied?

𝑓 𝑥1 , 𝑥2 , … , 𝑥𝑛 ≤ 𝑏
• We introduce a binary variable 𝑦 with the interpretation:

0 if the constraint is known to be satisfied,


𝑦=ቊ
1 otherwise,
• and write

𝑓 𝑥1 , 𝑥2 , … , 𝑥𝑛 − 𝐵𝑦 ≤ 𝑏,
• where the constant 𝐵 is chosen to be large enough so that the constraint
is always satisfied if 𝑦 = 1.
27

Logical Constraint

• A direct way for the target question is as follows.

𝑓1 𝑥1 , 𝑥2 − 𝐵1 𝑦1 ≤ 𝑏1
𝑓2 𝑥1 , 𝑥2 − 𝐵2 𝑦2 ≤ 𝑏2
𝑦1 + 𝑦2 ≤ 1
𝑦1 , 𝑦2 binary
• The variables 𝑦1 and 𝑦2 and constants 𝐵1 and 𝐵2 are chosen as above
to indicate when the constraints are satisfied.
• The multiple-choice constraint 𝑦1 + 𝑦2 ≤ 1 implies that at least one
variable 𝑦𝑗 equals 0, so that, as required, at lease on constraint must
be satisfied.
• For this case, we can save one integer variable. Actually, 𝑦1 + 𝑦2 = 1.
28

Logical Constraint
• As an illustration, consider the problem in Session 5. If at least only
one of the first two constraints is required.

4𝑇 + 3𝐶 ≤ 240 or 2𝑇 + 𝐶 ≤ 100
𝑇, 𝐶 ≤ 100
𝑇, 𝐶 ≥ 0
• the integer-programming formulation

4𝑇 + 3𝐶 − 700𝑦 ≤ 240
2𝑇 + 𝐶 − 300 1 − 𝑦 ≤ 100
𝑇, 𝐶 ≤ 100
𝑇, 𝐶 ≥ 0
𝑦 = 0 or 1
• In this case, 𝐵1 = 700 and 𝐵2 = 300, which are large enough so that
the constraint is not limiting for the production process not used.
29

Logical Constraint

• Actually, we use this way to formulate compound alternatives.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy