# grocery: Simulation of grocery store profits for a single product In pid: Process Improvement using Data

## Description

The hourly profit made when selling the product at price `P` and the product is displayed at height `H` [cm] on the shelf.

## Usage

 `1` ```grocery(P=3.46, H=150) ```

## Arguments

 `P` the selling price of the product. The default amount, if unspecified, is €3.46. `H` the display height of the product, as measured from the ground up. The default value, if unspecified, is 150cm.

## Details

This function simulates the hourly profit in a grocery store of selling a particular product.
Two factors can be adjusted by the user to determine the optimum:

• `P`: The selling price of the product (must be a positive value).

• `H`: The height that the product is displayed at (must be a positive value).

Can you determine the best combination of conditions, using a systematic method (i.e. not by trial and error)?

## Value

Returns the hourly profit made. Random noise is added for some realism.

## Author(s)

Kevin Dunn, <[email protected]>

## References

Please see Chapter 5 of the following book: Kevin Dunn, 2010 to 2015, Process Improvement using Data, http://learnche.org/pid

`popcorn`, `manufacture`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```# Selling at the default settings of price (€3.46) # and shelf height (150cm): grocery() # Let's try selling for a low price, €2.75, # and put the product 120 cm off the ground grocery(P=2.75, H=120) # What happens if the product is too high # for the average person? grocery(P=1.25, H=200) # Can you find the optimum combination of settings to # maximize the profit, but using only a few experiments? ```