C++
Lists, and a little queuing theory
The MegaMicroMart (a subsidiary of Fly-By-Night Industries) is planning their next Big Small-Box
Store. They want to ensure good customer service, and you've been hired to do some simulations to
advise them on how to set up their checkout lines.
This is a
discrete-time
simulation. This means that for our purposes, time advances in discrete 'ticks'.
Each tick, everyone who's going to arrive arrives all at once, while at the same time everyone who's
finished and ready to leave, does so all at once. Once everything for this tick has happened, we move
on to the next tick.
To simplify the simulation, we'll make some assumptions:
•
Each tick of the simulation is 10 seconds (so there are six 'ticks' per minute)
•
Customers arrive independently. Each tick, zero or more customers will arrive and want to
check out.
•
Unless specified otherwise, customers will go to the checkout line (cash register) with the
fewest customers waiting. Ties can be broken via any convenient method.
•
Customers will not jump lines from one register to the next.
•
Customers will have varying numbers of items in their cart. Checkers can check 3 items per
tick. When determining how many ticks will be needed to check out all the customer's items,
round all fractions up.
•
After all items are checked, the customer will pay. Some customers will have scanned their
credit cards while the order was being checked and need almost no time to finish; others will
wait until all items are checked to start looking for their card. Thus, payment will take 0-3
additional ticks (random, uniform probability).
•
Payment completes the simulation. Once a customer has paid, they leave and the next waiting
customer can begin on the next tick.
•
For this simulation, all registers are open all the time; we will not incorporate real-world rules
such as “if your register is idle for more than a minute, close it and go do something else.” But
the MegaMicroManagers at MegaMicroMart do want to track how much idle time the registers
have, so they know how much their customer-service policy is costing them.
You have 3 input files:
steadystate.txt: The number of customers arriving is about what the system is expected to be able to
handle.
bigcrunch.txt: The number of customers is fairly low, then there is an abrupt rush as a large number of
customers arrive in a short time. The question here is how long the lines can get.
bigtickets.txt: Similar to the steady-state data, but a few customers in this data set have their carts
rounded over, with many more items (and thus more time needed to check out).
In each case, you will process the data in order; once the end of the input is reached you will continue
processing the customers already in line until the last customer has left the system. You will report, for
each data set and each operating condition (discussed below), the following data:
•
The number of customers served
•
The maximum length of any line
•
The average length of time customers spent waiting in line
•
The maximum length of time any customer spent waiting in line
•
The total amount of time registers were idle. (Note that if 3 registers were idle for 2 ticks, that's
a total of 6 idle ticks.)
You will report these statistics for each of these 3 data files under 2 different operating assumptions:
The first is that all registers are functionally identical. The second is that the first register is reserved as
an express line and may only be used by customers with 10 items or fewer. If a customer has 10 items
or fewer, they may go to any empty register; if no register is empty, they will go to the express line.
Customers with more than 10 items must select something other than the express line, even if the
express line is idle. (note: This may lead to some odd behavior, depending on the data. You may want
to experiment with other rules, such as “if the express line has no more than 3 more than the shortest
regular line, use the express line, otherwise use the shortest regular line.” If you try different rules,
discuss them in your final writeup.)
input files "steadystate.txt":
3 11 4 5 5 11
input files "bigcrunch.txt":
0 10 0 8 0 14 1 6 2 16 3 9 3 6
input file "bigtickets.txt":
0 8 1 14 3 9 4 15 4 8
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
C++ Lists, and a little queuing theory The MegaMicroMart (a subsidiary of Fly-By-Night Industries) is planning...
Consider a simple queuing system in which customers arrive randomly such that the time between successive arrivals is exponentially distributed with a rate parameter l = 2.8 per minute. The service time, that is the time it takes to serve each customer is also Exponentially distributed with a rate parameter m = 3 per minute. Create a Matlab simulation to model the above queuing system by randomly sampling time between arrivals and service times from the Exponential Distribution. If a...
Jim McDonald, manager of the fast-food hamburger restaurant McBurger, realizes that providing fast service is a key to the success of the restaurant. Customers who have to wait very long are likely to go to one of the other fast-food restaurants in town next time. He estimates that each minute a customer has to wait in line before completing service costs him an average of 30 cents in lost future business. Therefore, he wants to be sure that enough cash...
To be written in C++. A local movie theater has three ticket windows and two computerized ticket kiosks. Some transactions, such as group discounts, can only be done at the ticket windows. An arriving customer looks at the lines, and chooses to stand in the shortest one that can handle his or her transaction. Group sales take four minutes to process. Normal ticket sales take two minutes at a window and three minutes at a kiosk. Internet ticket sales pickups...
C++
Sample run might look like this:
How many minutes should the simulation run? 10
Running simulation for 10 minutes.
minute 1: nothing happens
minute 2: customer 1 arrives and will need 3 minutes to check out
minute 3: nothing happens
minute 4: customer 2 arrives and will need 1 minute to check out
minute 5: customer 3 arrives and will need 1 minute to check out
minute 5: customer 1 has checked out
minute 6: customer 2 has checked...
Java Project For this assignment, you will write a simulation program to determine the average waiting time at a grocery store checkout while varying the number of customers and the number of checkout lanes. Classes needed: SortedLinked List: Implement a generic sorted singly-linked list which contains all of the elements included in the unsorted linked list developed in class, but modifies it in the following way: delete the addfirst, addlast, and add(index) methods and instead include a single add method...
Needs Help with Java programming language For this assignment, you need to write a simulation program to determine the average waiting time at a grocery store checkout while varying the number of customers and the number of checkout lanes. Classes needed: SortedLinked List: Implement a generic sorted singly-linked list which contains all of the elements included in the unsorted linked list developed in class, but modifies it in the following way: • delete the addfirst, addlast, and add(index) methods and...
C++ -- Event processing simulation using a transaction queue Hi! it is queue simulation please read the instructions, write codes, and explain the code with comments. Thank you Transactions enter the system and are stored in a queue. Each transaction represents some work that needs to be accomplished. Servers exist which process transactions. Servers take transactions off the queue and process them. you’re building the simulation framework. The idea is that somebody would take your framework, and add the specifics...
Hi! it is c++ queue simulation please read the instructions, write codes, and explain the code with comments. Thank you Transactions enter the system and are stored in a queue. Each transaction represents some work that needs to be accomplished. Servers exist which process transactions. Servers take transactions off the queue and process them. you’re building the simulation framework. The idea is that somebody would take your framework, and add the specifics for whatever type of system it was going...
A graduate research assistant "moonlights" at the short order counter in the student union snack bar in the evenings. He isconsidering asking for help taking orders, but needs to convince the management that they should hire another student.Because he is taking a simulation class, he thinks it may be the perfect way to convince management to hire more help if hecan show that customers have to wait a long time. When a customer arrives, he takes their order and their...
Hello, I am having some trouble with a supermarket checkout simulation program in C++. What I have so far just basically adds customers to the queue and prints when they arrive. I am struggling with how to implement a way of keeping track of when a given customer finishes(I will attach what I have so far). I had already created queue and node classes (with headers and cpp files) that I modified in my attempt. I would be very grateful...