130 Gebauer/Matthews: MIS 213 Hands-on Tutorials and Cases, Spring 2015 Excel Solver Case: Beach Town Lifeguard Scheduling Purpose: Optimization under constraints. A. GETTING STARTED All Excel projects are graded with the help of a computer system (Entropy), which means that you must follow directions closely and place all formulas, headings etc. in the exact cells specified or the grading system will not find your work. In particular, do not insert extra rows or columns! To begin working through this tutorial, start a web browser and log into Entropy http://csbapp.uncw.edu/entropy, then locate the Upload Assignment / or Download Starting Template option, and proceed to downloading the starter file for the Solver Case. Save the file to your desktop, flash-drive, or timmy-directory. Do not share this file with anyone else; it has been created just for you; plagiarism has serious consequences for all involved! Background: In this tutorial, you are asked to help the manager of a beach town schedule the lifeguards on the beach, such that (a) the demands for each day of the week are covered, and (b) the total payroll costs are minimized. Lifeguards always work five days in a row, followed by two days off. The town uses a total of seven schedules (Schedule A-G), each of which has a different set of work days and days off: Schedule A: Days off: Sun, Mon, Work: Tue-Sat Schedule B: Days off: Mon, Tue, Work: Wed-Sun Schedule C: Days off: Tue, Wed, Work: Thu-Mon Schedule D: Days off: Wed, Thu, Work: Fri-Tue Schedule E: Days off: Thu, Fri, Work: Sat-Wed Schedule F: Days off: Fri, Sat, Work: Sun-Thu Schedule G: Days off: Sat, Sun, Work: Mon-Fri Each week, the beach manager needs to determine how many lifeguards are needed for each of the different schedules. Individual lifeguards are then recruited and sign up for a particular schedule or get assigned by the manager, in case that there are not enough volunteers for a particular schedule. Demand for lifeguards depends on the day of the week and on whether there is a holiday during the week (e.g., 4 th of July). Demand is generally higher in weeks where one day is a holiday. Your task is to help the manager determine the optimal set of lifeguard schedules, such that (a) demand is met and (b) the payroll costs for the lifeguards are minimized. Use Excel Solver to solve this problem. B. PREPARING THE SPREADSHEET FOR THE USE OF EXCEL SOLVER Before we begin, let s take a look at the starter-file that you downloaded from Entropy. Put your name in Cell B2 and then note the five parts of the worksheet: 1. Part 1: Changing Variable Cells (Decision Variables): Highlighted in yellow are the changing variable cells, i.e., the decision variables that the solution of the problem is based upon. Cells A5:A11 summarize the seven different schedules that the town uses, and the cells highlighted in yellow (B5:B11) will later contain the number of lifeguards needed for each of the seven schedules. As you have not solved the problem yet, you don t know what the correct values will be in B5:B11. So, to start out put a 1 into each of the highlighted cells B5:B11. Once you run the Solver, the system replaces these starting values with the correct values that optimize the solution and suggest to the decision maker how many lifeguards to assign to each schedule.
Gebauer/Matthews: MIS 213 Hands-on Tutorials and Cases, Spring 2015 131 2. Part 2: User Input: In B14, the user indicates whether the week that needs scheduling includes a holiday or not. Holiday-weeks require a greater number of lifeguards on each day of the week because of an additional number of visitors expected on the beach. Enter either Y or N into B14, and compare your screen with Figure 7-1 below. Figure 7-1: Parts 1 and 2, starting values (examples) 3. Part 3: Main Results: The manager is mainly interested in two figures: (a) the payroll/week, which is the figure that needs to be minimized as the objective in Solver (B17) highlighted in green; and (b) the total number of lifeguards scheduled for the week (B18). Both figures are calculated in the lower part of the spreadsheet and need to be copied here. Please note that the payroll information is critical for budgeting purposes and is the main result variable (highlighted in green). The total number of lifeguards, however, is listed primarily for information purposes because it helps the manager when advertising the open positions each week. 4. Part 4: Constants: This part contains various constants that remain unchanged for now. Numbers have already been filled in on your starter file: a. Rows 22-28 Lifeguard Schedules (Days off) contain the details of the seven different work schedules. For each day of the week (Sunday-Saturday) a 0 indicates a day off, whereas a 1 indicates a workday for a particular schedule. b. Row 30 Standard Demand (Lifegards/Day) contains the standard demand for lifeguards per day of the week. These figures have been entered based on experience from previous years. We note that Saturday is usually the busiest day on the beach with a total need of 24 lifeguards. In contrast, only 13 lifeguards are needed on Tuesdays. c. Row 32 Additional Demand for Holiday Weeks (per day) indicates the additional number of lifeguards needed on each day in weeks where there is holiday. The assumption is that more visitors come to the beach in holiday weeks. So for example, if the Fourth of July falls on a Wednesday, we assume that there is a higher demand for lifeguards on every day of that week (Sun-Sat). d. Row 33 Pay/Lifeguard/Day indicates the daily pay for each lifeguard. The assumption is that each lifeguard gets paid the same, all throughout the season.
132 Gebauer/Matthews: MIS 213 Hands-on Tutorials and Cases, Spring 2015 Part 5: Calculations contain the various formulas that are needed to determine the target variable (B17). They are explained next. 5. Rows 36 Actual Demand (Lifeguards/Day) For each day of the week, determine how many lifeguards are needed. This is based on the Standard Demand and on whether the week is a holidayweek. Remember, the demand is higher on every day of the week if one of the days is a holiday (A Y in B14). The resulting values provide you with the minimum number of lifeguards that need to be scheduled for each day. Tip: Use the IF-function, and use proper references (relative or absolute). If B36 is done correctly, you can copy the formula across to Column H. 6. Rows 37 Schedule Total (Lifeguards/Day) Here, you determine how many lifeguards are scheduled on each day of the week. This number depends (a) on the number of lifeguards that are put on each schedule (found in B5 through B11) and (b) on whether the lifeguard works or has the day off (Rows 22-28). Tip: A function that comes in handy here is SUMPRODUCT. EXCEL CONCEPT: SUMPRODUCT SUMPRODUCT(array1, [array2], [array3], ) multiplies the corresponding components in the given arrays and returns the sum of those products. An array is a list of values; this formula can handle up to 255 arrays. So, the way this works let s say for two arrays is as follows: the formula multiplies the first value of the first array with the first value of the second array, then multiplies the second value of the first array with the second value of the second array, and so on, until the last value of the first array is multiplied with the last value of the second array. Then the formula builds the sum of each of the products. Note that the arrays need to have the same length; otherwise a VALUE error is returned. Non-numeric values in the arrays are treated as zeros. Table 7-1: Example A B 1 4 1 2 5 2 3 6 3 Looking at Table 7-1 above, let s say you want to get the sum of A1 multiplied with B1 (4*1=4), A2 multiplied with B2 (5*2=10), and A3 multiplied with B3 (6*3=18) this would be: 4+10+18=32. Instead of entering each components separately like this: =(A1*B1)+(A2*B2)+(A3*B3), you can use the shorter form =SUMPRODUCT(A1:A3, B1:B3), where A1:A3 is the first array and B1:B3 is the second array. This makes a lot of sense if your list of components is long. To use a SUMPRODUCT in Row 37, you can use the Number of Lifeguards on Each Schedule as your first array and the Lifeguard Schedule (using the appropriate day) as your second array. If done properly in cell B37 (using proper relative and absolute references), the formula can be copied across to Column H. 7. Row 39 Payroll for the Week The payroll/week is calculated based on the number of all lifeguards scheduled for each day and on the daily pay for each lifeguard. 8. Row 40 Total Number of Lifeguards Scheduled this Week The total number of lifeguards is calculated based on the number of lifeguards assigned to each of the different schedules A-G. If your spreadsheet has the same setup for Parts 1 & 2 (Figure 7-1 above), then the lower part of the spreadsheet should now look like Figure 7-2 below (one lifeguard each for schedules A-G and holiday week [Y]es).
Gebauer/Matthews: MIS 213 Hands-on Tutorials and Cases, Spring 2015 133 Figure 7-2: Calculations for one lifeguard for each schedule (A-G) and holiday week [Y]es C. CONFIGURING AND RUNNING EXCEL SOLVER You are now ready to configure and run Solver to determine the number of lifeguards to assign to each schedule, such that the beach town can minimize payroll costs while meeting the need for lifeguards on the beach. Remember that Solver might not have been activated on your computer please refer to the Solver Tutorial for information about how to activate and start Solver. When configuring Solver, please keep the following instructions in mind: 9. Your objective variable is the Payroll for the Week 10. The objective variable needs to be minimized 11. The changing variable cells are the Number of Lifeguards on Each Schedule (Schedules A-G) 12. The Number of Lifeguards on Each Schedule must be greater than or equal to zero 13. The Number of Lifeguards on Each Schedule must be an Integer 14. For each day of the week, the Schedule Total must be greater than or equal to the Actual Demand for that day 15. Use GRG Non-Linear as the Solving Method 16. Once Solver is configured, please run it first for a holiday week (a Y in B14). Generate an Answer Report and name that worksheet Answer Report Holiday Week. Part of the answer report should look like Figure 7-3 below: Figure 7-3: Answer Report Holiday Week
134 Gebauer/Matthews: MIS 213 Hands-on Tutorials and Cases, Spring 2015 17. Change B14 to N (for No) to indicate a non-holiday week, and run Solver again. Generate an Answer Report and name that worksheet Answer Report Non-Holiday Week. Part of the answer report should look like Figure 7-4 below: Figure 7-4: Answer Report Non-Holiday Week 18. Save your work now, and upload the file to Entropy. Verify your upload.