Presentation is loading. Please wait.

Presentation is loading. Please wait.

What’s in the Focus file and how do we edit it? Project 2, 115a.

Similar presentations


Presentation on theme: "What’s in the Focus file and how do we edit it? Project 2, 115a."— Presentation transcript:

1 What’s in the Focus file and how do we edit it? Project 2, 115a

2 Update Files http://business.math.arizona.edu/MBD/mbd.html Click on “Update Your Files” in the upper right- hand corner.

3 Update Your Files Release 1.5a, 2005 –Are you a licensed user of Release 1.5a, and do you still accept the terms of that license agreement? YES –Queuing Files Click and save, then double-click queue_focus.exe to extract files. You are now ready to begin editing the Queue Focus.xls file.

4 1 ATM The Monte Carlo Method (for simulating times between arrivals) is broken down into 2 steps in the simulation. First, in Column C we just generate a probability--a random number between 0 and 1, using RAND(). Mean Time Between Arrivals Waiting Time Cut-Off (in Minutes) 0.525 Allowable CustomersCustomers and Service Index Random Number for Simulation Customer Number Time of Arrival After Start of Hour Length of Service Start of Service After Start of Hour End of Service After Start of Hour 10.6629229210.571.210.571.78 20.7772799921.350.781.782.56 Mean Time Between arrivals, and the cut-ff for Waiting Time (as we’ve defined it) in B30:E31 for easy reference.

5 1 ATM Customer Number –If we generate a time of arrival before the hour is up (in column F), then we’ll give the arriviving customer the index number in column B. –If he arrives after the hour, we won’t note him at all, and we’ll leave it blank Customer NumberTime of Arrival After Start of Hour =IF(ISNUMBER(F35),B35,"")=IF(-$B$31*LN(1-C35)<=60,-$B$31*LN(1-C35),"") =IF(ISNUMBER(F36),B36,"")=IF(ISNUMBER(F35),IF(F35-$B$31*LN(1-C36)<=60,F35-$B$31*LN(1-C36),""),"")

6 1 ATM Time of Arrival After Start of the Hour –1 st Customer: Using the inverse cdf for our time between arrivals distribution,, if this number is within the first hour, we’ll use this value as his time of arrival, otherwise we’ll leave his time blank. –Subsequent Customers: If the previous customer arrived before the end of the hour, then we’ll try simulating another time between arrivals. We’ll add this time to the previous customer’s time of arrival. If this new time is within the first hour, we’ll note this value. Otherwise we’ll leave the cell blank. Customer NumberTime of Arrival After Start of Hour =IF(ISNUMBER(F35),B35,"")=IF(-$B$31*LN(1-C35)<=60,-$B$31*LN(1-C35),"") =IF(ISNUMBER(F36),B36,"")=IF(ISNUMBER(F35),IF(F35-$B$31*LN(1-C36)<=60,F35-$B$31*LN(1-C36),""),"")

7 1 ATM Bootstrapping For each customer’s length of service, we’ll use the “bootstrapping” method, sampling from our records of past service times (Why not use Monte Carlo?) –VLOOKUP and RANDBETWEEN Length of Service =IF(ISNUMBER(F35),VLOOKUP(RANDBETWEEN(1,7634),Data!$G$45:Data!$H$7678,2),"") =IF(ISNUMBER(F36),VLOOKUP(RANDBETWEEN(1,7634),Data!$G$45:Data!$H$7678,2),"")

8 1 ATM Time of Start of Service (after the hour) –1 st customer: By assumption, nobody is already at the ATM when the 1 st customer arrives. He may start using the ATM as soon as he arrives (IF he arrives within 60 minutes of the start of the hour). –Subsequent customers: They will either start using the ATM as soon as the previous customer leaves (end of service time) or when they arrive (their time of arrival) if nobody is currently using the ATM. They will start the later of the two (MAX(F36,I35)). Of course, if they don’t arrive before 60 minutes though, we’ll leave it blank. Time of End of Service (after the hour) –Simply the start of service plus the length of service, for all customers. Start of Service After Start of HourEnd of Service After Start of Hour =IF(ISNUMBER(F35),F35,"")=IF(ISNUMBER(F35),H35+G35,"") =IF(ISNUMBER(F36),MAX(F36,I35),"")=IF(ISNUMBER(F36),H36+G36,"")

9 1 ATM Waiting Time –Simply the time between the start of service (Column H) and time of arrival (Column F), if the customer arrives in the first hour. Delayed? –If the wait time is greater than the cut-off (D31), then “yes”, the customer is delayed. Otherwise we’ll note “no”. Waiting TimeDelayed =IF(ISNUMBER(F35),H35-F35,"")=IF(ISNUMBER(F35),IF(J35>$D$31,"yes","no"),"") =IF(ISNUMBER(F36),H36-F36,"")=IF(ISNUMBER(F36),IF(J36>$D$31,"yes","no"),"")

10 1 ATM Number in Queue –1 st customer: No one is at the ATM when the first customer arrives. Therefore, the number in queue =0 –Subsequent customers: If the end of service time of previous customers is greater than the time of arrival of current customer, then the current customer will have to wait. This function counts how many “End of Service” times are after the time of arrival. Number in Queue 0 =IF(ISNUMBER(F36),DCOUNT($I$34:I35,,Y35:Y36),"") =IF(ISNUMBER(F37),DCOUNT($I$34:I36,,Y37:Y38),"") Ranges =($F$36<=I35) =($F$37<=I35)

11 Modifications DO NOT ADD OR DELETE CELLS, ROWS, OR COLUMNS! It messes up the macros. Make note of Queue Focus.xls values: –range of cells for Service Times Data (7,634 values in Data!G45:H7678) –simulation accommodates 160 customers –note Excel row number of 161 st customer (last row)

12 Modifications 1.Copy your team’s Service Times data into Data!G45:H???? –make note of your last service time, and clear any extraneous data (i.e. if you have 7,600 times, there are 34 more times in the original data set. Clear these values—DO NOT DELETE CELLS!) 2.Change your team’s average time between arrivals in cell B31 of the Simulation sheet.

13 Modifications 3.Cell G35 (Length of Service) makes reference to the list of service times data. Modify this formula to make reference to the range of cells that you modified in Step 1. Copy this down the column (to row 194).

14 Modifications Select the last two full rows, from B193:L194. Drag the fill handle down until you see that the bottom index number is at the number of customers you need to accommodate from your initial data.

15 Modifications For example, your team’s data may look like the excerpt above. This specifies that the simulation must accommodate 200 arrivals per hour. Remember the Focus file only accommodates 160. You will therefore need to add 40 rows. (i.e. whereas customer #160 was in Row 194 of Excel, customer #200 should be in Row 234)

16 Modifications 4.All formulas from column B to column K should fill with appropriate cell references. Column L needs extra modifications though. L =IF(ISNUMBER(F190),DCOUNT($I$34:I189,,Y343:Y344),"") =IF(ISNUMBER(F191),DCOUNT($I$34:I190,,Y345:Y346),"") =IF(ISNUMBER(F192),DCOUNT($I$34:I191,,Y347:Y348),"") =IF(ISNUMBER(F193),DCOUNT($I$34:I192,,Y349:Y350),"") =IF(ISNUMBER(F194),DCOUNT($I$34:I193,,Y351:Y352),"") Note the pattern in the cell references: Y343:Y344, Y345:Y346, Y347:Y348, Y349:Y340, … Notice the first cell always starts with an odd number, the next is an even number. There is no overlap in these cell ranges. When you copy this formula down, Excel will just increment each cell reference by 1 value, not two: Y353:Y354, Y354:Y355, Y355:Y356, …. You will need to edit the rows you’ve added. Just make sure you are consistent with the original pattern.

17 Modifications 5.Modify the criteria in column Y Select the last 4 rows of column Y. Note that these were in rows 349-352. Drag the fill handle down until you have added 2 times the number of rows you had to add before (in our example we added 40 rows, so now we need to add 80. Therefore we should end on row 432.) FALSE

18 Modifications The first cell reference is an absolute reference and counts up by one number every other space. The second cell reference stays at I35. This is not an absolute reference though. =($F$191<=I35) =($F$192<=I35) =($F$193<=I35) =($F$194<=I35) Of course, when you do this, Excel will again increment the row values as it sees fit. NOTE THE PATTERN IN THE ORIGINAL CELLS!

19 Modifications The simulation for one hour is complete for your data now. However the Simulation worksheet is not complete. We want to generate 2,000 of these hours. We do this by simulating 100 hours, tallying the results, then run this 20 times and tally all these results. We have 20  100 simulations, in essence giving us 2,000 simulated hours.

20 Modifications 6.Modify the summary cells for 100 hours (cells N35:S35). What’s needs to be changed to account for your data? Number That Arrive Sum of Waiting Times Maximum Waiting Time =IF(MAX(E35:E195)=161,"Overflow",MAX(E35:E195))=SUM(J35:J194)=MAX(J35:J194) Number Delayed Sum of Numbers in Queue Maximum Number in Queue =COUNTIF(K35:K194,"yes")=SUM(L35:L194)=MAX(L35:L194)

21 Modifications 7.Click Tools>>Macro>>Macros>>One_ATM then click RUN. This should take 8-12 minutes (roughly) depending on how fast your computer is. If you see in your summary results that you had an Overflow, then you need to troubleshoot your modifications. Start by making sure you accommodated the correct number of customers!

22 Modifications At this point, if you do not understand why you entered a particular formula into a cell, ASK. Although we will most likely not ask you to create a simulation from start to finish, you should understand the logic involved in each column of the spreadsheet!

23 Modifications 8.Modify appropriate cells in 2 ATMs, run the macro Two_ATMs. 9.Modify appropriate cells in 3 ATMs, run the macro Three_ATMs. 10.Modify appropriate cells in the worksheet 3 ATMs Serpentine, and run the macro Three_ATMs_Serpentine.

24 Modifications You will be running 4 simulations (1 ATM- 3 ATMs Serpentine), for both hours, giving you a total of 8 simulations so far. IMPORTANT: Create a folder for the first hour Delayed simulation. Save this Queue Focus.xls file into it. COPY this file into another folder for the second hour Delayed simulation. The only difference between these two will be the average time between arrivals in cell B31. The reason for separate folders is that the macros will not work if you rename the file itself. At the same time, you want to save your work for each hour separately so that if you need to re-do one of the simulations, you don’t have to start over again.

25 Modifications You may have noticed that the summary cells for the 100 and 2,000 hours of simulation only keep track of whether or not the customer was delayed, average wait time, number in queue, and number present. You also have a claim for the number irritated. You need a new simulation for this. This means that you need 4 more simulations for the 1 st hour, and 4 more for the 2 nd hour.

26 Modifications Create new folders for 1 st hour Irritated and 2 nd hour Irritated. Copy your Queue Focus.xls file into the 1 st hour only. (We’ll modify this one first for the Irritated claim, then copy this file into the 2 nd hour Irritated folder.)

27 Modifications 11.Change from Delayed to Irritated Change headers in cells E30, K34, Q34, Q38, V34, and V38 to reflect that you’re keeping track of number of people irritated. (The Cut-Off is now in people, not minutes!) Cell K35 says “=IF(ISNUMBER(F35),IF(J35>$D$31,"yes","no"),"")” It is comparing the waiting time to the cut-off for Delayed. You want it to compare the number in queue (L35) to the Irritated cut-off, which is now in $D$31.

28 Modifications 12.Make a summary table like the one in the Focus section in the text:

29 Modifications We’ll discuss the Gift Certificate program on Monday. Good luck!


Download ppt "What’s in the Focus file and how do we edit it? Project 2, 115a."

Similar presentations


Ads by Google