Download Practice midterm for CO 370

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Simplex algorithm wikipedia , lookup

Transcript
Practice midterm for CO 370
October 21, 2015
1. Daniel Jack produces two types of whiskeys. Both whiskeys are produced using corn, rye and barley.
There are 50kgs of corn, 40kgs of rye and 60kgs of barley available. The ingredients are mashed together,
then fermented and distilled. Out of every kg of mashed ingredients for whiskey type 1, Daniel obtains
0.5l of whiskey. Out of every kg of mashed ingredients for whiskey type 2, Daniel obtains 0.3l of whiskey.
Whiskey type 1 is sold for $30 per litre and whiskey type 2 is sold for $40 per litre. In addition, whiskey
type 1 must have at least 50% of its mashed ingredients being corn and at least 10% of the mashed
ingredients being rye. Whiskey type 2 must have at least 55% of its mashed ingredients being corn and
at least 15% of its mashed ingredients being rye.
Write an LP that Daniel can use to maximize his revenue in selling whiskeys of type 1 and 2. Clearly
define your decision variables.
2. Lizzie’s Dairy produces cream cheese and cottage cheese. Milk and cream are blended to produce these
two products. Both high-fat and low-fat milk can be used to produce cream cheese and cottage cheese.
High-fat milk is 60% fat; low-fat milk is 30% fat. The milk used to produce cream cheese must average
at least 50% fat and that for cottage cheese, at least 35% fat. At least 40% (by weight) of the inputs to
cream cheese and at least 20% (by weight) of the inputs to cottage cheese must be cream. Both cottage
cheese and cream cheese are produced by putting milk and cream through the cheese machine. It costs
40cents to process 1lb of inputs into a pound of cream cheese. It costs 40cents to produce 1lb of cottage
cheese, but every pound of input for cottage cheese yields 0.9lb of cottage cheese and 0.1lb of waste.
Cream can be produced by evaporating high-fat and low-fat milk. It costs 40cents to evaporate 1lb of
low-fat milk. Each pound of low-fat milk that is evaporated yields 0.3lb of cream. It costs 40cents to
evaporate 1 lb of high-fat milk. Each pound of high-fat milk that is evaporated yields 0.6lb of cream.
Each day, up to 3,000 lbs of input may be sent through the cheese machine. Each day, at least 1,000 lbs
of cottage cheese and 1,000 lbs of cream cheese must be produced. Up to 1,500 lbs of cream cheese and
2,000 lbs of cottage cheese can be sold each day. Cottage cheese is sold for $1.20/lb and cream cheese
for $1.50/lb. High-fat milk is purchased for 80cents per pound and low-fat milk for 40cents per pound.
The evaporator can process at most 2,000 lbs of milk daily.
Formulate an LP that can be used to maximize Lizzie’s daily profit.
3. A pottery manufacturer manufactures three types of dining sets: English, Currier and Primrose. Each
set uses clay, dry-room time, and kiln time in the quantities given by the following table.
Clay (lbs.)
Dry room (hours)
Kiln (hours)
Price ($/set)
English
10
3
2
51
Currier
15
1
4
85
Primrose
10
6
5
66
Availability
130
45
30
Having taken CO370 in his UW-days, the manufacturer quickly recognizes that the problem of finding a
manufacturing plan that maximizes profit can be modeled and solved as a linear program (ignoring the
integrality constraints on the number of dinner sets produced of each type). He obtains the following
LP.
1
max 85x1 +51x2 +66x3
s.t.
15x1 +10x2 +10x3
x1
+3x2
+6x3
4x1
+2x2
+5x3
x1 , x2 , x3 ≥ 0
≤ 130
≤ 45
≤ 30
(1)
Here x1 , x2 , and x3 denote respectively the number of Currier, English and Primrose dinner sets manufactured. After adding slack variables x4 , x5 , x6 corresponding to the first, second, and third constraints
of the LP respectively, and running the simplex method on this LP yields the following LP in canonical
form for the optimal basis B = {1, 2, 5}:
max
s.t.
(0,
 0, −10.5, −3.4, 0, −8.5)x + 697 


1 0 3
−0.1 0 1
4
 0 1 −3.5 0.4
0 −1.5  x =  7 
0 0 13.5 −1
1 3.5
20
x≥0
(2)
(a) What is the optimal plan and revenue? What are the shadow prices of the resource constraints?
(b) By how much should the price of Primrose dinner sets increase before it becomes optimal to produce
them?
(c) What is the range of price values of English dinner sets for which the current production plan
remains optimal?
(d) Argue that it is worthwhile for the manufacturer to sell clay to a competitor as long as the selling
price is at least $3.4 per lb. and at most 17.5 lbs. are sold. Similarly argue that it is profitable to
buy at most 20 lbs. of clay at the rate of $3.4 per lb. (or lower).
(e) If the manufacturer decides to re-price the dinner sets in order to increase profits, which of the
following options would be most profitable: increase the price of English sets by $4 per set, increase
the price of Currier sets by $5 per set, or increase the price of Primrose sets by $6 per set?
(f) The manufacturer is considering investing in a new technology that will allow him to manufacture
Primrose dinner sets by a second method that uses 10 lbs. of clay, 6 dry-room hours, and 3 kiln
hours per dinner set. Should the manufacturer invest in this technology?
(g) Suppose the manufacturer considers pricing the Primrose sets manufactured by this new technology
at a rate different from the $66-per-set price of the old Primrose sets. What is the least price that
makes investment in the technology worthwhile?
4. A company has n distribution centers F = {1, . . . , n}, and a set of m clients C = {1, . . . , m}. Each client
has a demand of dj units that must be assigned to the distribution centers; assigning one unit of client
j’s demand to a distribution center i incurs an assignment cost of cij . Distribution center i can handle
a total demand of at most ui , and generates a revenue of πi per unit demand assigned to it. If a client
is assigned to a center it incurs a certain waiting time, and the maximum amount of time any client is
willing to wait at a center is T . The waiting time at a distribution center i is given by the following
convex function of the total demand handled by the center:
ai x,
if x ≤ Di ,
waiti (x) =
bi (x − Di ) + ai Di , otherwise
where 0 ≤ ai ≤ bi . (The ai , bi , Di are not variables, but real numbers used to specify the function
waiti ). Also, do NOT consider the x above as decision variables of your problem! The x above is just a
way to specify a function waiti : R → R.
(a) Formulate a linear program that maximizes the total profit earned (revenue - cost). You may assume
that any fraction of demand can be assigned to a distribution center.
Page 2
(b) Suppose that, at the optimal solution (which you may assume to be nondegenerate), distribution
center k does not get assigned any demand from any client, for some k ∈ F . What is the range of
values of such that if πk gets changed to πk + , the current optimal solution remains optimal?
(You may write your answer as a function of the problem data, the current optimal solution, the
current shadow prices, the current reduced costs. Please define clearly what is the notation you are
using, for example, if you use shadow price of constraint i, you must say something like: “Let yi∗
be the shadow price of constraint i”)
5. Optima Inc has asked John Doe, a CO370 student, for his help in optimizing their production plan for
producing 3 different products. Being a smart student, he realized that it was an instance of a resource
constrained problem and he modeled it as
max 6x1 + 5x2 + 7x3
s.t. 3x1 + 2x2 + 2x3 ≤ 20
x1 + 5x2 + 2x3 ≤ 15
x≥0
(3)
where the constraints correspond to each of the resources available for Optima Inc (say resource 1 and
2 respectively for constraints 1 and 2) and the objective corresponds to the total profit generated by
producing each product.
He implemented the model in OPL and below is the log he obtained when he used the commands his
Professor gave.
Log started (V12.4.0.0) Fri Jun 07 10:42:18 2013
Dual simplex - Optimal: Objective = 5.8750000000e+001
Deterministic time = 0.00 ticks (0.00 ticks/sec)
Variable Name
Solution Value
x(1)
2.500000
x(3)
6.250000
All other variables in the range 1-3 are 0.
Variable Name
x(1)
x(2)
x(3)
Constraint Name
ct(1)
ct(2)
Reduced Cost
zero
-8.7500
zero
Down
3.5000
***
4.3077
OBJ Sensitivity Ranges
Current
6.0000
5.0000
7.0000
Up
10.5000
***
12.0000
Dual Price
1.2500
2.2500
Down
15.0000
6.6667
RHS Sensitivity Ranges
Current
20.0000
15.0000
Up
45.0000
20.0000
Unfortunately, when he printed out the logfile, a few entries were smudged and he could not read them.
These are marked by ***. Answer the following questions (you must justify all your answers). In all of
the following questions, assume that slack variables x4 and x5 have been added to constraints 1 and 2
respectively.
(a) What are the values of x4 and x5 at the optimal solution?
(b) What are the basic and nonbasic variables at the optimal solution?
(c) What should be the entry in columns “Down” and “Up” in row x(3)? (some of the entries may be
plus/minus infinity)
Page 3
(d) Optima has the option of increasing the amount of resource 1 by 10, increasing the amount of
resource 2 by 5 or increasing the per unit profit of product 1 by 4. Which option is more profitable?
(e) Suppose that Optima is considering producing product 4, which consumes 3 units of resource 1 and
2 units of resource 2. What should be the minimum per unit profit that product 4 must have so
that it is worth producing it?
6. (20 points) Company X sells two products for company Y. It is assumed that any production that
company X produces will be sold to company Y.
Producing product i consumes ai man-hours, for every i = 1, 2. There is a total of 1000 man-hours
available every month.
Product 1 sells for $20 per unit. However, due to contractual reasons, the total sell price p of selling u
units of product 2 will be calculated as the following function (this is the total price, not the per unit
price):

for u ∈ [0, 1000]
 20u
20, 000 + 17(u − 1, 000) for u ∈ [1000, 1500]
p=

28, 500 + 15(u − 1, 500) for u ∈ [1500, +∞)
Write an LP that Company X can use to determine a plan for producing and selling products 1 and 2
to company Y in order to maximize company X’s profit.
NOTE: p and u above are just general expressions to indicate to you how the price of product 2 will
be calculated. They are not your decision variables. You are the one who must decide what are the
appropriate decision variables and what do they mean.
7. (20 points) ACME Inc. produces 5 different products. Each product j ∈ {1, . . . , 5} produced uses aj
units of capacity of a given machine. There are a total of 30 units of capacity available for that machine
daily. Now ACME Inc. wants to find their optimal production plan for the next 10 days. All the
production will be sold at the end of the 10 days for a price of pj dollars per unit of product j, for
j = 1, . . . , 5. The production can be stored from one day to the next in a warehouse at a cost of q dollars
per unit. You may assume that there are no units of any products stored currently.
Finally, the machine has an optimal operating range, which happens when between 10 and 20 units of
its capacity are being used on that day. For every unit outside that range, it is estimated that it will cost
r dollars extra. For instance, if 23 units of capacity are being used in a day, it will cost (23 − 20)r = 3r
extra dollars that day. If 5 units of capacity are being used in a day, it will cost (10 − 5)r = 5r extra
dollars that day.
Formulate an LP that ACME Inc. can use to maximize the profit that it can make while producing the
5 products.
8. C&O Inc. has factories located in a set F of cities. Every month it must decide which factories to
operate to supply its customers with a given product. Its customers are located in a set C of cities. For
every city c ∈ C, there is a monthly demand dc for that product. Each factory can produce at most M
units of the product every month. Operating factory in city f ∈ F has a cost hf . Also, supplying 1 unit
of the product from factory in city f ∈ F to a customer in a city c ∈ C has a cost of sf,c . Every month
the operation is the same and the data does not change through time nor there is any relationship from
what is done in a previous month to the next, so C&O Inc. wants to find the least cost strategy to
satisfy all its customers demands every month.
The following IP can be used to model this problem:
min
P
s.t.
fP
∈F
fP
∈F
hf yf +
P P
sf,c xf,c
f ∈F c∈C
xf,c ≥ dc
, ∀c ∈ C
xf,c ≤ M yf
, ∀f ∈ F
c∈C
x ≥ 0, y ∈ {0, 1}F
Page 4
(IP-CO)
where decision variable yf is 1 if factory in city f is open and 0 otherwise, and xf,c represents the amount
of product to send from factory in city f to client in city c.
(a) Modify (IP-CO) to take into account the following condition: If factories in cities f1 and f2 are
open then at least one of the following two conditions must be satisfied:
1. Factories f3 or f4 must be closed
2. Factory f1 must not supply any units of the product to clients c1 , c2 and c3 .
You may only write what needs to be modified and not the entire model. Clearly define any
additional decision variables you may need and what they represent.
(b) Modify (IP-CO) to take into account the following condition. Supplying u units of the product
from factory in city f ∈ F to a customer in a city c ∈ C has a piecewise linear cost of:

, if u ∈ [0, dc /5]
 u
2u − dc /5 , if u ∈ [dc /5, 3dc /5]

u + 2dc /5 , if u ∈ [3dc /5, dc ]
You may only write what needs to be modified and not the entire model. Clearly define any
additional decision variables you may need and what they represent.
Page 5