Professional Documents
Culture Documents
Modeling & Solving LP Problems in A Spreadsheet
Modeling & Solving LP Problems in A Spreadsheet
Chapter 3
Modeling & Solving LP Problems In A Spreadsheet
1. In general, it does not matter what is placed in a variable (changing) cell. Ultimately, Solver will
determine the optimal values for these cells. If the model builder places formulas in changing cells,
Solver will replace the formulas with numeric constants representing the optimal values of the decision
variables. An exception to this general principle is found in Chapter 8 where, when solving nonlinear
programming problems, the values placed in the changing cells represent the initial starting point for the
optimizer.
2. Communication - once the user understands the first formula in a range of copied cells, he or she should
understand all the formulas in the range.
Reliability - assuming the first formula is entered correctly, all the copied formulas should be correct also.
Auditability - once the user understands the first formula in a range of copied cells, he or she should
understand (and audit) all the formulas in the range
Maintainability - if a change needs to be made, it can be made in one formula and then copied as
necessary.
8. Acres planted in watermelons = 60, Acres planted in cantaloupes = 40, Maximum profit = $26,740
See file: Prb3_8.xls
10. Desktops = 46.15, Laptops = 69.23, Maximum profit = $90,000 (alternate optimal solutions exist)
See file: Prb3_10.xls
ST 1.5 X1 + 2 X2 1,000
3 X1 + 4.5 X2 2,000
2.5 X1 + 1.5 X2 1,500
Chapter 3 - Modeling & Solving LP Problems In A Spreadsheet : S-2
Many students attempt to implement the ratio constraints in their original form; resulting in a
division by zero error at the null solution and a message from Solver that the model is not linear. The
algebraic equivalence of the alternate form of these constraints (given parenthetically above) should
be noted.
16. a. Xij = Square feet of space rented in month i (i=1, 2, 3, 4, 5) through month j (j=i, i+1, , 5)
MIN 55X11 + 95X12 + 130X13 + 155X14 + 185X15 + 55X22 + 95X23 + 130X24 + 155X25 + 55X33 + 95X34
+ 130X35 + 55X44 + 95X45 + 55X55
ST X11 + X12 + X13 + X14 + X15 > 20000
X12 + X13 + X14 + X15 + X22 + X23 + X24 + X25> 30000
X13 + X14 + X15 + X23 + X24 + X25 + X33 + X34 + X35 > 40000
X14 + X15 + X24 + X25 + X34 + X35 + X44 + X45 > 35000
X15 + X25 + X35 + X45 + X55 > 50000
Xij > 0
b. See file: Prb3_16.xls
c. X15 = 20000, X25 = 10000, X33 = 5000, X35 = 5000, X55 = 15000
Total leasing cost = $7 million
d. $9.625 million
MAX 53 X1 + 48 X2 + 33 X3 + 32 X4 + 38 X5
ST 20 X1 + 15 X2 + 10 X3 + 8 X4 + 5 X5 80,000
28 X1 + 24 X2 + 18 X3 + 12 X4 + 16 X5 100,000
8 X1 + 8 X2 + 4 X3 + 4 X4 + 6 X5 30,000
0.75 X1 + 0.6 X2 + 0.5 X3 + 0.65 X4 + 1 X5 5,000
Chapter 3 - Modeling & Solving LP Problems In A Spreadsheet : S-4
2 X1 - 1 X2 0
Xi 500
MIN 55M1 + 85 M2 + 67 B1 + 95 B2
ST M1 + B1 = 30,000
M2 + B2 = 15,000
0.20M1 + 0.40M2 10,000
0.30M1 + 0.50M2 15,000
0.10M1 + 0.10M2 5,000
Mi, Bi 0
MAX: (21-17.25)X1R+(21-15.75)X2R+(21-17.75)X3R+(25-17.25)X1S+(25-15.75)X2S+(25-17.75)X3S
ST: X1R + X1S 150
X2R + X2S 350
X3R + X3S 300
X1R + X2R + X3R = 300
X1S + X2S + X3S = 450
(100X1R + 87X2R + 110X3R)/300 90
(100X1S + 87X2S + 110X3S)/450 97
Xij 0
Teaching Note: As an interesting extension to this problem, ask students to consider how to minimize the
maximum number of excess employees on any shift while holding the total number of employees used at
its optimal value of 640.
MAX 75 X1 + 50 X2 + 40 X3
ST 3 X1 + 2 X2 + 1 X3 400,000
50,000 X1 150,000
50,000 X2 100,000
50,000 X3 90,000
From\To Tacoma San Diego Dallas Denver St. Louis Tampa Baltimore
Macon 0 0 0 0 0 12000 6000
Louisville 600 0 0 0 14400 0 0
Detroit 400 0 10800 12600 0 0 1200
Chapter 3 - Modeling & Solving LP Problems In A Spreadsheet : S-8
Note that the Xi can be computed directly from the Ai. Therefore, the Ai are the only decision
variables (changing cells) in the model. The Xi can be computed in the spreadsheet using the
conditions imposed by the first three constraints. Therefore, it is not necessary to indicate these as
constraints cells for Solver.
ST I1 =120 + P1 - 420
I2 = I1+ P2 - 580
I3 = I2+ P3 - 310
I4 = I3+ P4 - 540
400 P1 500
400 P2 520
400 P3 450
400 P4 550
Ii 50
Note that the Ii can be computed directly from the Pi. Therefore, the Pi are the only decision variables
(changing cells) in the model. The Ii can be computed in the spreadsheet using the conditions
imposed by the first four constraints. Therefore, it is not necessary to indicate these as constraints
cells for Solver. However, note that lower bounds of 50 must be indicated for these cells.
b. See file: Prb3_34.xls
c. X1 = 410, X2 = 520, X3 = 400, X4 = 450, I1 = 110, I2 = 50, I3 = 140, I4 = 50
Minimum cost = $83,617
36. a. Xij = Square feet (in 1000s) leased at beginning of month i for j months
MIN 300 (X11 + X21 + X31 + X41 + X51) + 525 (X12 + X22 + X32 + X42 ) + 775 (X13 + X23 + X33 )
Chapter 3 - Modeling & Solving LP Problems In A Spreadsheet : S-10
Note that the Ij can be computed directly from the Pj and Sj . Therefore, the Pj and Sj are the only
decision variables (changing cells) in the model. The I j can be computed in the spreadsheet using the
conditions imposed by the first six constraints. Therefore, it is not necessary to indicate these as
constraints cells for Solver. However, note that lower bounds of 0 and upper bounds of 400 apply to
these cells. Some students will want to know how much Earl paid for the 70 tons of soybeans in the
beginning inventory. This represents a sunk cost that is irrelevant for the problem at hand.
c. There is no feasible solution if the company is restricted to borrowing no more than $100,000 at each
level in the term / rate structure. Ask students to determine what the borrowing limit would need to
Chapter 3 - Modeling & Solving LP Problems In A Spreadsheet : S-12
be increase to in order to obtain a feasible solution. The answer (of $101,257) can be obtained by: 1)
making the borrowing limit a changing cell, and 2) also making it the set cell and minimizing its
value.
42. a. Ti = Number of people in group i surveyed by telephone
Wi = Number of people in group i surveyed in person vai web-cam
Teaching note: Some students may want to know how much money the company paid for the
150,000 cf of gas in storage. Because this represents a sunk cost, it is irrelevant for decision making
purposes.