 This video is supposed to help you do your assignment on simulating the checkout stand using MS Excel, Microsoft Excel. We're going to talk a little bit more in depth later on in the course about the software that we can use for simulation. And we're going to use a few different software products in this course. You can you can see that we're starting off with something relatively simple that we're all kind of born knowing today and certainly it's available everywhere. But we need to use some sort of software. We don't want to continue doing these things by hand. We're going to be playing in this video with the same program, same problem, the checkout stand that we used in the lecture called simulating by hand where we did it manually with pencil and paper. But just in general, we could use specialized simulation software and we will look at some of them during the semester. We could write simulations in general purpose languages and we will look at at least Python later in the semester. Or we can use Excel. We can use a spreadsheet tool and we're going to see how to do that. You can there's a page on the course website called software and it would be instructive to look at that when you want to learn more about different kinds of software to use for simulation. This problem is on the assignments page of the course website and it's also in the simulating by hand lecture that you presumably already looked at. It's a checkout stand in a small store let's say a hotel gift shop or an airport gift shop. It's a single server, a single cashier. It's not large enough for more than that. And we're not looking at the time customers spend browsing, but only when they're ready to pay. And that's what we consider them service or waiting for service if there's another customer there and they have to wait in order to pay. The measures of effectiveness that we're interested in the average time that a customer spends in the system, including both waiting and in service. And the percentage of time that the checkout clerk is idle. The input parameters of the time between arrivals of the customers is uniformly distributed between one and 10 minutes. Those are integers. And what we did before was we used poker chips labeled 1 to 10 and thrown in a hat. The other input would be the service time also uniformly distributed this time between 1 and 6 minutes. And so it was a simple thing to say we're going to take a die six sided the numbers 1 to 6 and that'll be the device to model the randomness that we need. Piece of what we had before just for the first eight customers in the system. You can see the the time since last arrival that was generated by the chips, the service time that was generated by the die. The clock time, the first customer comes in and we call it time zero. The first customer service time is one so service ends at one. The customer goes into service at time zero and so on. At the end of the whole thing we get the required averages, the measures of effectiveness, the average time the customer spent in the system on the average three and a half minutes. Percent of time cashier is idle 48% of the time in this particular replication. This is only for eight customers and only one replication. Here are some hints to help you get started with your program in Excel, your model. How do we model randomness? We're going to be using the random function that's part of Excel and when you want to generate variants from a uniform distribution between certain limits A and B, you can generate them by using the RAND function and you can see the formula right here on the slide. RAND times in prens B minus A plus A. That'll give you a random number. The RAND function gives you a random number on a zero one distribution, but if you want one between A and B, you manipulate it that way. The best way to do this, the only way you can really do this in Excel, you take the first customer row, input it manually. You can see how the first customer comes in at time zero. You generate the service time. You can do all of that manually. And then in the second row, you apply the formulas that you want to based on the first row. And then you just drag down in order to generate as many customers as you want. How do you know how many customers you want? How do you know when to stop? Well, when you look at the assignment, I believe that I'm asking, I'm pretty sure I'm asking you, to do it two ways. A certain number of customers, whatever it says there, I don't remember, 20, 50, whatever. And also for a certain amount of time, two hours, five hours, eight hours would be, you know, a full day, let's say. You want to, both of those are legitimate ways to end the simulation run. You can see how you already know how to do the first. The second might be, might give you a little more trouble. Here you see the first 10 customers in the simulation in Excel, the checkout stand using Excel. We've got all the same columns, the same labels as before. Nothing really has changed. The only thing that has changed is that we're making use of Excel to do the calculations. As we saw previously, the suggestions in the last slide, most of the first customer you put in manually. Because there's no previous customer to boot up on. The first customer is the one you boot the system up on. You still have, even with the first customer, you can figure out when service ends, that service begins plus service. You can figure out how long the customer is in the system, right? Service ends minus the arrival, the end time minus the arrival time. But the others have to be put in manually. Except for the random, obviously, the first two columns are done using the ran function. The first one is the inter-arrival times, the second one is service times per customer. And then on customer two line, there are three cells highlighted. Think about those, you have to think about those and how you're going to model it in the simulation. The arrival one is the easiest, really. How do I get the customer's arrival time? Well, you already have the inter-arrival time, which means the time since the last arrival. How do I know when customer time begins? That's not so simple. Because customers only go into service right away if there isn't already a customer in service. You have to think about that one a little bit. You may want to do this yourself manually for five customers, six customers, and see what you look at and what you do and what formula you can use for that. And the same thing is true of Clerk Idle. How do I know how many minutes the clerk has been idle since the last time he was idle? If you've completed your simulation run, you're not finished. You still need replications. It's a statistical experiment. You're not going to be able to get a good estimate of the parameters, the average time in system, and the average checkout utilization. If you only have a sample of one, we never work with a sample of size one, as you know. So we have to look into replications. It turns out there's a really cool way to do that in Excel. If you've used an Excel data table already, perhaps for what-if analysis, you're a little bit ahead of the game, but it's not difficult to learn. And I have two instructional videos listed there, links to YouTube. They're not mine, but they're so good that it really doesn't pay for me to do my own. As long as these still remain up, I'm going to be linking to them for your benefit. The first one is by someone called Danny Rocks, and it's in general just about using a data table and not for simulation, although what-if analysis is a type of simulation, according to many. And the next one is by, I don't have a name, it's by the YouTube handle, Space Over Time. And it specifically shows you how to use a data table to generate replications in simulation. So that's going to be very valuable for you. As you will see, Excel works very well for certain things when you're doing a simulation, especially a discrete event simulation, and not so well for others. So why do we start out with Excel in this course? We will need something that's more directly applicable to the kinds of simulation models we want to work with. It's a good way to get started quickly. We all know Excel. Everybody's now, if you're in a quant program, you're practically born knowing Excel. It's ubiquitous. It's everywhere. Everyone has a version of it on their laptop and tablet. We use it all the time anyway, so we might as well get started using Excel in order to build our first simulation model. Well, maybe the second, if you count simulating by hand. What have we learned here? We've learned that Excel is a quick and easy way to get started doing simulation models. We've also learned that, well, it may not be the best. You may not have learned it yet, but you will as soon as you do your assignment. But it's still usable. It's in certain situations, it might be the way to go. It's easily available, and I hope that you gained from this. I hope you will be able to easily and quickly program the checkout stand so that it runs in Excel and report on your observations. And submit it, if you're in my class, submit it through Blackboard in the assignment section. Thank you for attending this lecture.