Modelling the Income of the Coffee Shop

John would like to invest $10,000 and open his own coffee shop. John’s good friend Jack will contribute his coffee machine to the start-up. However, Jack does not like risks and therefore wants to be employed by John rather than partnering. They have already found the location, but they believe they need 10 weeks to set it up as a café.

From market research, John knows that the demand for coffee in his area is a function of price. He has determined that the quantity of cups demanded per month equals approximately to 3500 – 100 * [Price per Cup]^2. However, this function does not describe his observation fully. The demand for coffee also seems to be affected by a random “noise” that John cannot explain. He decides to model this noise through a standard distribution with a mean of 0 and a standard deviation of 50.

John is wondering when he will make a return on his investment and Jack wants to know what the price for a cup of coffee should be.

To start modelling John’s coffee shop we need to first define what parameters contribute to the operational income. These parameters are:

  • The Cost per Cup;
  • Price per Cup;
  • The Demand Noise; and
  • How long it will take to set up the cafe.

We then need to work out what the costs to the cafe are. Currently they are the shop rent and Jack’s salary. We also know that we have a start capital of $10000. Most of these will be float values in Python, two will be asset values, and a few of our parameters will be put into a tabular entry.

Switch back to the Build tab, open the main.py file, and overwrite the contents of the file with the following code

def akumen(start_day, periods, 
           cost_per_cup, price_per_cup, demand_noise, fract_of_month_operating, 
           shop_rent, jacks_salary, start_capital, 
           **kwargs): 
    """ 
    Parameters: 
    - Input: start_day [datetime] 
    - Input: periods [float]          

    Operational Income: 
    - Input: cost_per_cup [float] 
    - Input: price_per_cup [float] 
    - Input: demand_noise [float] 
    - Input: fract_of_month_operating [tabular] (xlsx)        

    Fix costs and Accounting: 
    - Input: shop_rent [float] 
    - Input: jacks_salary [float] 
    - Input: start_capital [float]        

    Output data: 
    - Output: monthly_incomes [file] (monthly_incomes.csv) 
    - Output: monthly_balances [file] (monthly_balances.csv)
    """  
return{} 

We have a number of float values in our Python code. Float values can be assigned as Assets or can be entered as numbers or dates by users. These are the values we are going to enter first. After the float values we will address adding assets and editing tabulars to finish modelling the operational income of the coffee shop.

First we will look at entering in our float values:

  1. Go back to the Research Grid and enter the following values into the Application Level Parameters row:
    • start_day: [Select today’s date]
    • periods: 12
    • demand_noise: 50
    • jacks_salary: 2400
    • start_capital: 10000
  2. Enter 3 into the price_per_cup row at the scenario level.