s05b-01-rad

advertisement
Solution to Radio Advertising1
Music radio WABC has commercials of the following lengths (in seconds): 15, 15,
20, 25, 30, 35, 40, 57. The commercials must be assigned to 60-second breaks.
What is the fewest number of breaks that are needed to air all of the
commercials?
Managerial Formulation
Decision Variables
Which commercials get assigned to which programming breaks.
Objective
Minimize the total number of breaks.
Constraints
Every advertisement must be aired.
No break can be longer than 60 seconds.
Mathematical Formulation
Decision Variables
Define xi to be an integer variable identifying the break to which commercial i is
assigned. For example, if commercial 1 is assigned to break 4, then x1 = 4.
It should be clear that we won’t need any more than eight breaks, because there
are only eight commercials. These eight x variables are the decision variables.
Based on 8.25 (p. 444) in Practical Management Science (2nd ed., Winston and Albright, 2001
Duxbury Press). Solution by David Juran, 2002.
1
Objective
Define yj to be a binary variable, such that yj = 0 if no commercials are assigned to
break j, and yj = 1 if any commercials are assigned to break j.
Define vij to be a binary variable such that vij = 1 if commercial i is assigned to
break j, and vij = 0 otherwise.
Define wi to be the duration of commercial i.
Note that the duration of break j is equal to
8
w v
i 1
i
ij
. Let tj be the amount of
“overtime” in break j. That is,
 8

t j  max  w i v ij  60 , 0 
 i 1

Our objective, then, is to:
Minimize Z =
8
8
j 1
j 1
 
 y j  m t j ,
where m is a “large number”.
This is a good example of an advanced optimization trick: taking a constraint
and building it into the objective function. It doesn’t really matter what value we
use for m, as long as it is sufficiently large as to prevent any tj > 0. As it happens,
in this problem m = 100 works fine.
Constraints
For all xi, 1≤ xi ≤ 8.
For all xi, xi is an integer.
For all yj, yj is binary.
B60.2350
2
Prof. Juran
Solution Methodology
Here’s the spreadsheet model:
A
B
C
D
E
1 Length of break (seconds)
60
2
3
Lengths of commercials
Assignments of commercials to breaks
4
Commercial
Length
Commercial
Break
5
1
15
1
1
6
2
15
2
1
7
3
20
3
1
8
4
25
4
1
9
5
30
5
1
10
6
35
6
1
11
7
40
7
1
12
8
57
8
1
13
=SUMIF($E$5:$E$12,A16,$B$5:$B$12)
14
Information on breaks
15
Break
Seconds
Used?
Amt over max
16
1
237
1
177
17
2
0
0
0
18
3
0
0
0
19
4
0
0
0
20
5
0
0
0
21
6
0
0
0
22
7
0
0
0
23
8
0
0
0
24
=IF(B23>0,1,0)
25
Total "cost"
17701
=MAX(B23-$B$1,0)
26
=SUM(C16:C23)+100*SUM(D16:D23)
27
The decision variables (xi) are in the range E5:E12 (in the spreadsheet shown, all
commercials are assigned to break 1, so xi = 1 for all i).
The range B5:B12 contains the durations of each commercial (wi), and the range
B16:B23 uses the Excel SUMIF function to calculate the duration of each
commercial break.
The range C16:C23 keeps track of which breaks have any assignments (the yi
variables), while the range D16:D23 keeps track of how much the breaks go over
the maximum limit (the tj variables). Recall that the yi and tj variables are the
basic ingredients of the objective function. Notice how the use of the IF function
in C16:C23 precludes the need to have an explicit binary constraint in Solver for
the yi variables.
The objective function is in B25, including a penalty of 100 units per second if
any breaks go over 60 seconds.
B60.2350
3
Prof. Juran
The standard simplex algorithm (Solver’s default method) won’t work on this
problem. The GRG Nonlinear algorithm will make an honest effort, but is likely
to give up without finding the optimal solution. This is because of our use of
MAX, IF, and SUMIF functions, resulting in discontinuities in our objective
function and constraints as functions of the decision variables.
However, the Evolutionary Solver, a genetic algorithm, can do a good job with a
problem like this.
The Evolutionary Solver operates in a completely different way from the other
types. Instead of searching in a structured way guaranteed to reach the optimal
solution, genetic algorithms operate somewhat like biological evolutionary
processes, with some degree of randomness in the steps taken from one solution
to the next. In a finite period of time, the Evolutionary Solver is not guaranteed to
find the optimal solution, but it will find very good solutions and try to improve
upon them.
Note: there are a large number of options involved in the Evolutionary Solver,
which are not necessary for this problem and which are beyond the scope of this
course.
B60.2350
4
Prof. Juran
Here is the optimized spreadsheet:
A
1 Length of break (seconds)
2
3
Lengths of commercials
4
Commercial
5
1
6
2
7
3
8
4
9
5
10
6
11
7
12
8
13
14
Information on breaks
15
Break
16
1
17
2
18
3
19
4
20
5
21
6
22
7
23
8
24
25
Total "cost"
B
60
C
Length
15
15
20
25
30
35
40
57
Seconds
0
0
57
60
60
60
0
0
D
E
Assignments of commercials to breaks
Commercial
Break
1
5
2
5
3
4
4
6
5
5
6
6
7
4
8
3
Used?
0
0
1
1
1
1
0
0
Amt over max
0
0
0
0
0
0
0
0
4
Conclusions
The solution indicates that commercials 1, 2, and 5 should go in one break, 3 and
7 should go in another, 4 and 6 should go in another, and 8 should go by itself.
A reasonably bright person could solve this problem in their head, of course. The
trick here was to set it up so that a computer could solve it, providing a method
for the solution of much larger problems with the same basic structure.
B60.2350
5
Prof. Juran
Download