Shopping Model

This is a model of a supermarket process. The process is:

  1. Shopper arrives
  2. Shopper gets trolley
  3. Shopper shops
  4. Shopper queues for till
  5. Shopper pays for goods
  6. Shopper returns trolley

We start with the following metrics:

Parameter Value Interpretation
numCarts 10 Number of shopping carts available to the shoppers. This could also be interpreted as a software resource, such as a resource lock or a thread from a pool.
numShopAssistants 2 Number of active shop assistants at the checkouts. Could also be interpreted as a processor.
shoppingTime 600.0 Mean amount of time spent shopping. This is basically a delay sampled from an exponential distribution which occurs outside the scope of the model, and could thus be interpreted as a backend response time.
tillTime 120.0 The mean number of seconds of time spent at the till. Also can be interpreted as the service time in the processor.
shopperArrival 60.0 The interarrival time in seconds at which the shoppers arrives at the store. This is based on a Poisson clock with a mean time given by the parameter.
  1. Review the model
  2. Scroll down to the 'run' portion of the screen. Click the Go button to execute the model
  3. Notice that the graphs fill up. Review these results. A few things to notice:
    1. There's a bit too much queueing at the tills - increase the number of shop assistants to 4 and re-run.
    2. This exposes larger queues for shopping carts - fix this by increasing the number of carts to 15.
    To review the graphs in more detail, select the third button above the chart. This enables you to resize the graph data. Alternatively, hit the fourth button to auto-size the graph.
    In order, the graphs are:
    1. Queue Length for Carts and Tills. Realtime display of number of shoppers waiting for the respective resources.
    2. Resources - carts. How many carts are left in the trolley park
    3. Utilisation - average and realtime utilisation of the tills. You can never use half a till at any given point in time, so (for example) a utilisation of 75% when there are only two shop assistants is impossible. The utilisation, which we are used to dealing, is an average over a period of time.
    4. Time to complete shop - this is a combination of a couple of exponential distributions and some queueing. Not surprisingly it's a bit busy. The average is ot easy to see, unfortunately.
  4. Increase the arrival rate by a factor of three by setting shopperArrival to 40.0 seconds. Rerun the model and notice that the queue length for carts has increased. Significantly. The effect on the shopping time is rather detrimental to the mission of customer care. Also notice that the tills are pretty heavily utilised.
    1. Solve the cart queue by increasing the number of carts to 100 - carts are cheap, after all... Re-run the model
    2. Now we have some queueing at the tills. We could increase the number of shop assistants to a huge number to solve this, but we'd have to pay them. a value of 7-8 appears to suffice.
  5. Now the model looks much better. We've got a large number of unused carts, though. Looking at the resource utilisation for the carts, it appears that this could easily be reduced to 40 without affecting the overall time to complete the shop. Try it to check.