You are on page 1of 24

Midterm review

Session 15

1
Announcement
• There will be NO class on 5/7 (earlier this semester, I announced that there
would be a class).

• The midterm is take-home and it will be posted on Blackboard on 3:30 pm 5/7.


• The midterm covers the materials from the beginning of the course to the decision trees.
• You are NOT allowed to collaborate with others (I highly value the academic integrity).
• You may use course materials while taking the exam.

• The submission is due 3:30 pm 5/8.


• Submit your work through Blackboard as you have submitted your homework assignments.
• Make sure to submit a .docx or .pdf file.
• You can submit your work multiple times and your last attempt will be graded.

2
Correction
• Market research example
• In the last recording, I told that the pay-off the scenario of low regional response
after choosing the regional test was 80. This was wrong and the correct number is
180 (200-20).

3
Work in process
• Draw work in process for the entire system.
• Draw work in process for the assembly station.
• Suppose there is one worker at this station who processes a batch of 20 hamburgers at once
and it takes 27 minutes to finish a batch.
Order Wait time before Cooking Wait time before Assembly Total
number cooking time assembly time time

1 57 60 0 27 144

2 54 60 0 27 141

3 51 60 0 27 138

4 48 60 0 27 135

5 45 60 0 27 132

6 42 60 0 27 129

7 39 60 0 27 126

8 36 60 0 27 123

9 33 60 0 27 120

10 30 60 0 27 117

11 27 60 0 27 141

12 24 60 0 27 138

13 21 60 0 27 135

… … … … … …

20 0 60 0 27 114

21 57 60 0 27 144
4
Linear programming
• Decision variables, constraints, optimal decision variables, and optimal (objective)
value
• Suppose you are solving
max 𝑥 + 2𝑦 + 3𝑧
such that (1) 𝑥 + 𝑦 + 𝑧 ≤ 1, (2) 𝑦 + 3𝑧 ≤ 1
• Objective function: max 𝑥 + 2𝑦 + 3𝑧
• Decision variables: 𝑥, 𝑦, 𝑧
• Feasible decision variables are any 𝑥, 𝑦, 𝑧 that satisfy the two constraints listed above.
• Infeasible decision variables are any 𝑥, 𝑦, 𝑧 that violate any of constraints listed above.
• Binding and non-binding: for feasible decision variables 𝑥, 𝑦, 𝑧 we say
• (1) is binding if 𝑥 + 𝑦 + 𝑧 = 1. Otherwise, that is 𝑥 + 𝑦 + 𝑧 < 1, then (1) is non-binding.
• (2) is binding if 𝑦 + 3𝑧 = 1. Otherwise, that is 𝑦 + 3𝑧 < 1, then (2) is non-binding.
• Optimal decision: 𝑥 ⋆ , 𝑦 ⋆ , 𝑧 ⋆
• 𝑥 ⋆ , 𝑦 ⋆ , 𝑧 ⋆ are feasible and
• 𝑥 ⋆ + 2𝑦 ⋆ + 3𝑧 ⋆ ≥ 𝑥 + 2𝑦 + 3𝑧 for any other feasible decision variables 𝑥, 𝑦, 𝑧.
• Optimal (objective) value: 𝑥 ⋆ + 2𝑦 ⋆ + 3𝑧 ⋆

5
Linear programming
• A computer manufacturer produces 2 types of computers HS (High Speed)
and LS (Low Speed).

• The profit margin for HS computer is $100 per unit and for LS computer is
$75 per unit.

• One assembling machine is used for both models. The machine operates
600 minutes a day. A HS unit needs 30 minutes, and A LS unit needs 10 minutes.

• One packaging machine is used for both models. The machine operates
600 minutes a day. Both a HS unit and a LS unit need 20 minutes for packing.

• How many of HS and LS do we need to produce to maximize the daily profit?

6
Linear programming
• Decision variables
• Number of HS to produce a day (𝑥" )
• Number of LS to produce a day (𝑥# )

• Objective function
• Maximize daily profit (100𝑥" + 75𝑥# )

• Constraints
• Assembling machine works 600 minutes a day (30𝑥" + 10𝑥# ≤ 600)
• Packaging machine works 600 minutes a day (20𝑥" + 20𝑥# ≤ 600)
• We cannot produce negative number of HS and LS (𝑥" ≥ 0 and 𝑥# ≥ 0)

7
Example 1
• Feasible solutions

𝑥3

60

30

0 20 30 𝑥2 8
Example 1
• Recall the objective was to maximize 100𝑥, + 75𝑥-.
• Let’s draw a line 100𝑥, + 75𝑥- = 0.
𝑥3 Only feasible decision variables in this line are 𝑥" = 0, 𝑥# = 0.
We still have a room for an improvement.

60

30

0 20 30 𝑥2 9
Example 1
• Recall the objective was to maximize 100𝑥, + 75𝑥-.
• Let’s draw a line 100𝑥, + 75𝑥- = 1000.
𝑥3 We still have a room for an improvement.

60

30

0 20 30 𝑥2 10
Example 1
• Recall the objective was to maximize 100𝑥, + 75𝑥-.
• Let’s draw a line 100𝑥, + 75𝑥- = 2625.
𝑥3 Only feasible decision variables in this line are 𝑥" = 15, 𝑥# = 15.
We have NO room for a further improvement.
That is, if we draw a line 100𝑥" + 75𝑥# = 2625 + 𝑎 for any 𝑎 > 0,
then none of 𝑥" and 𝑥# on that line are feasible.
60
Therefore, 𝑥"⋆ = 15 and 𝑥#⋆ = 15 are the optimal decision variables
and 2625 is the optimal objective value.

30 𝑥" , 𝑥# = 15,15

0 20 30 𝑥2 11
Sensitivity analysis - constraints

Original Suppose we now have


30𝑥" + 10𝑥# ≤ 600 30𝑥" + 10𝑥# ≤ 660
𝑥3 20𝑥" + 20𝑥# ≤ 600 20𝑥" + 20𝑥# ≤ 600

We can now operate the assembling machine for 60 more minutes.


Does it help us increase profit or not? If it does, how does it impact
60 our previous analysis?

Note that the feasible set has expanded and the question is will 𝑥"⋆ =
15, 𝑥#⋆ = 15 still be the optimal decision variables?

30

15,15

0 20 30 𝑥2 12
Sensitivity analysis - constraints

Original Suppose we now have


30𝑥" + 10𝑥# ≤ 600 30𝑥" + 10𝑥# ≤ 660
𝑥3 20𝑥" + 20𝑥# ≤ 600 20𝑥" + 20𝑥# ≤ 600

𝑥"⋆ = 15, 𝑥#⋆ = 15 are no longer the optimal decision variables


because we can shift the red line upward for a better outcome.
60
The new optimal decision variables are 𝑥"⋆ = 18, 𝑥#⋆ = 12 and
the new optimal objective value is 2700.

30
𝑥"⋆ , 𝑥#⋆ = 18,12

15,15

0 20 30 𝑥2 13
Sensitivity analysis - constraints
• A change in the right hand side of the constraints of the form ax+by<=c changes
the feasible set (either expand or shrink) and the constraints part of
the sensitivity report helps us understand how large the impact is.

14
Sensitivity analysis – coefficients in the objective function

Original Suppose we now have


100𝑥" + 75𝑥# 150𝑥" + 75𝑥#
𝑥3 Now, the profit for selling one HS computer is 150. That is, selling
HS computers become more profitable.
How does this change impact our original decision?
60 Note that the red line becomes steeper
(previously the absolute value of the slope of the red line was 100/75
and it is now 150/75).

30 𝑥" , 𝑥# = 15,15

0 20 30 𝑥2 15
Sensitivity analysis – coefficients in the objective function

Original Suppose we now have


100𝑥" + 75𝑥# 150𝑥" + 75𝑥#
𝑥3 Even after the change, 𝑥"⋆ = 15, 𝑥#⋆ = 15 remain as
the optimal decision variables
while the optimal objective value has changed to 3375 (150*15+75*15).
60

30 𝑥" , 𝑥# = 15,15

0 20 30 𝑥2 16
Sensitivity analysis – coefficients in the objective function

Original Suppose we now have


100𝑥" + 75𝑥# 300𝑥" + 75𝑥#
𝑥3 Now, the profit for selling one HS computer is 300.
How does this change impact our original decision?

Note that the red line becomes steeper


60 (previously the absolute value of the slope of the red line was 100/75
and it is now 300/75).
And it is now steeper than the blue line.

30

15,15

0 20 30 𝑥2 17
Sensitivity analysis – coefficients in the objective function

Original Suppose we now have


100𝑥" + 75𝑥# 300𝑥" + 75𝑥#
𝑥3 Now we see a room for an improvement and 𝑥" = 15, 𝑥# = 15 are
no longer optimal.
In fact, 𝑥"⋆ = 20, 𝑥#⋆ = 0 are the optimal decision variables and 6000
is the new optimal objective value.
60

30
𝑥"⋆ , 𝑥#⋆ = 20,0
15,15

0 20 30 𝑥2 18
Sensitivity analysis - coefficients in the objective function
• A change in a coefficient from an objective function of the form ax+by changes
which product is more profitable (or attractive) among all products and
the variable cells part of the sensitivity report helps us understand
how this change impact our decisions.

19
Linear programming – example 2 from session 8
• A microbrewer makes four beers: light, dark, ale, and premium.

• The products require water, malt, hops, and yeast. Assume that
the supply of water is free.

• The following table gives the pound of each resource required in the production
of 1 gallon of each product, the pounds of each resource available, and
the revenue received for 1 gallon of each product.
Light Dark Ale Premium Available
Malt 1 lb 1 lb 0 lb 3 lbs 50 lbs
Hops 2 lbs 1 lb 2 lbs 1 lb 150 lbs
Yeast 1 lb 1 lb 1 lb 1 lb 80 lbs
Revenue $6 USD $5 USD $3 USD $7 USD

20
Linear programming – example 2 from session 8
• What are the decision variables?
• Amount (in gallons) of each beer type produced: 𝑥$%&' for 𝑡𝑦𝑝𝑒 ∈ {𝐿𝑖𝑔ℎ𝑡, 𝐷𝑎𝑟𝑘, 𝐴𝑙𝑒
, 𝑃𝑟𝑒𝑚𝑖𝑢𝑚}

• What is the objective?


• Maximize the total revenue: 6𝑥()*+$ + 5𝑥,-./ + 3𝑥01' + 7𝑥2.'3)43

• What are constraints?


• Non-negativity constraint: 𝑥$%&' ≥ 0 for 𝑡𝑦𝑝𝑒 ∈ 𝐿𝑖𝑔ℎ𝑡, 𝐷𝑎𝑟𝑘, 𝐴𝑙𝑒, 𝑃𝑟𝑒𝑚𝑖𝑢𝑚
• Malt inventory: 𝑥()*+$ + 𝑥,-./ + 3𝑥2.'3)43 ≤ 50
• Hops inventory: 2𝑥()*+$ + 𝑥,-./ + 2𝑥01' + 𝑥2.'3)43 ≤ 150
• Yeast inventory: 𝑥()*+$ + 𝑥,-./ + 𝑥01' + 𝑥2.'3)43 ≤ 80

21
Linear programming – example 2 from session 8
• Solver solution

• Which constraints are binding when 𝑥6789: = 40, 𝑥;<=> = 10, 𝑥<6? = 30
, 𝑥@=?A7BA = 0?
• All of them.
• Increasing the right hand side of 𝑥()*+$ + 𝑥,-./ + 3𝑥2.'3)43 ≤ 50 (or of other constraints)
would change the solution of LP.
• How much does the change in binding constraints affect the outcome?

22
Linear programming – example 2 from session 8
• Sensitivity report from Solver answers those questions.

• Shadow price of Malt (the logic is the same for other constraints)
• By fixing all other numbers, an increase (decrease) of 1 on the right hand side of
the malt constraint increases (decreases) the optimal objective value by the shadow price of Malt.
• As long as the increase and the decrease are with in the allowable increase and
the allowable decrease, we can use the same shadow price without resolving the LP.
• If we increase the right hand side of the malt constraint from 50 to 50+a for any 0<=a<=30 (allowable
increase), without resolving the LP, we know that the optimal objective value increases by 3a.
• If we decrease the right hand side of the malt constraint from 50 to 50-a for any 0<=a<=40 (allowable
decrease), without resolving the LP, we know that the optimal objective value decreases by 3a.
• If the change is outside of the allowable increase and decrease, we need to resolve the LP.

You can think a shadow price as how much you are willing to pay for an additional unit of resource.
23
Linear programming – example 2 from session 8
• What about the changes in the coefficients in the objective function maximize (6
𝑥C789: + 5𝑥D<=> + 3𝑥E6? + 7𝑥F=?A7BA )?
• Suppose the revenue received from selling 1 gallon of ale increases from 3 to 4.
What is the optimal solution? Do we need to resolve LP to figure out?
• We can use again the sensitivity report from the solver

• By fixing the coefficients of other variables, making the coefficient of 𝑥$%& any values from 2 to 5 do
es not affect the optimal solution (40,10,30,0). Note that the optimal objective value changes.

24

You might also like