Introduction

After a long night, Santa woke up on Christmas morning with a request that you - his purchasing manager - begin planning for next year.

The North Pole produces two good - toys for the “nice” kids and coal for the “naughty” kids. All materials for the toys are produced in-house from elf dust.

It is your task to calculate the number of toys needed to be produced over the next year, the number of elves needed to be hired, and the income needed to pay the elves and Santa.

1. Setup Variables

Create variables associated with the following numbers:


## Current numbers into variables
ToyInventory <- 46312192
CoalInventory <- 19684311
LastYearToys <- 440000000
LastYearCoal <- 70000000
ToysDelivered <- 479199984
CoalDelivered <- 20800016

2. Inventories

Since the expected number of deliveries of toys and coal may not equal the actual deliveries, the North Pole maintains an inventory target of:

How many toys and how much coal needs to be produced to bring the North Pole’s inventories in line with its targets?

(This is the baseline level of production)


DISCUSS HERE

## Inventory compared to target
TargetToys <- 50000000
TargetCoal <- 20000000

ToyInventory - TargetToys #switching to put target before inventory
## [1] -3687808
TargetToys - ToyInventory
## [1] 3687808
#we get 3,687,808
TargetCoal - CoalInventory
## [1] 315689
#we get 315,689

3. Planning Production

Your next step is to determine the production of both toys and coal over the next year.

You estimate that the total population of children will grow by 5% next year. You also believe Santa was too generous this year due to the pandemic and will give 10% fewer toys next year (as a share of the population).

How many toys and how much coal should the North Pole produce over the next year?

(Don’t forget to include the baseline production to bring inventories up to target!)


DISCUSS HERE we learned that we need 3,687,808 more toys and 315,689 more coal to fulfill the inventory presently; however, we need to readjust for a 5% increase in population, and 10% fewer toys given *did we even need to find those numbers to determine the next steps?

## Finding the % adjustments going into the next year
(1 + 0.05)*ToysDelivered
## [1] 503159983
NewToyQuota <- 503159984

#variable named below: decr stands for decrease, meaning it is reflecting the 10% decrease in toys given out based on the generosity from the pandemic
NewToyQuotaAfterDecr <- 503159984*(.9) 
##i have no idea how this works

NewToyQuotaAfterDecr
## [1] 452843986
##so we need 452,843,986 toys for the upcoming year. This is less that the 479,199,984 quantity delivered last year, because we took a 5% increase in population, then took 10% of the toys off that new number to account for Santa delivering too many toys

(1 + 0.05)*CoalDelivered
## [1] 21840017
NewCoalQuota <- 21840017
#this doesn't make sense, the number is too high
#trying again

CoalDelivered*(1.05) #taking 105% of last year's coal delivered
## [1] 21840017
#this makes more sense, I don't know what happened above but it had an extra 0 in there. Last year Santa delivered 20,800,016 coal, and this year he will need a little bit more at 21,840,017 coals

4. How Many Elves to Hire?

The Elves get the next month off of work before production begins. Production needs to be finished one month before Christmas to give time for packages to be sorted and wrapped. This gives you one month to hire all of the elves needed for production.

Each elf can produce one of the following during each 8 hour day of work.

1 unit of elf dust can produce 1 toy. Union contracts state that elves can only work 20 days per month.

How many elves do you need to hire for the next year?

(round up to the nearest elf)


DISCUSS HERE

## PLACE CODE HERE

NewToyQuota/100 
## [1] 5031600
5031600
## [1] 5031600
#dividing how many we need by 100 to find out how many days of work is required to produce that quota of toys
#now going to divide that result by 20, because elves can only work 20 days a month
5031600/20
## [1] 251580
251580
## [1] 251580
#this means we need 251,580 elves to each work 20 days that month to fulfill the quantity of toys needed. Wait, we already have some inventory. I am so confused. Professor Mann I am really trying, but I just don't understand this at all

#I don't know what else to do so I am just going to keep moving forward

ElvesForToys <- 251580

NewCoalQuota/100
## [1] 218400.2
#rounded up we get 218,401. Now dividing that by 20

218401/20
## [1] 10920.05
#so, I think we need 10,921 elves for the coal
ElvesForCoal <- 10921


#Finding out how many elves we need total
ElvesForToys + ElvesForCoal
## [1] 262501
#so, the total number of elves we need to make toys & coal is 262,501. Now we can use that number moving forward to figure out what our funding request should be
#I realized that we need the separate numbers because they're paid differently, so the total number of elves isn't exactly necessary at this point


#Need to thin through the math before we get the financials. 251,580 elves is the total we'll need, but they are working 8 hours a day for 20 days. We need to take 160 times the amount of toys elves as well as coal elves to get the amount of hours worked, then we can calculate the funding request after we know how many hours

ElvesForToys*160
## [1] 40252800
#So, we get a total of 40,252,800 hours worked by the Toy making Elves
ToyHours <- 40252800


ElvesForCoal*160
## [1] 1747360
#and we get a total of 1,747,360 hours worked by Coal making Elves
CoalHours <- 1747360

5. Funding Request

Elves don’t work for free at Santa’s Workshop. Last year, the Elf Union requested $50/hour for elves in toy production & $75/hour for elves in coal and dust mining due to hazardous conditions. You expect them to request a 10% raise this year because of price inflation at the North Pole. Santa expects a 5% profit margin on production (as a percentage of costs).

How much money should the North Pole request from industrialized nations to finance present delivery this next year?


DISCUSS HERE

## Finding Funding

ToyHours*50 #taking the total number of hours times how much per hour
## [1] 2012640000
#gives us a total of $2,012,640,000 (2 billion) needing to be requested for Toy making Elves

CoalHours*75 #same thing for coal
## [1] 131052000
#total of $131,052,000 (1.3 million) needing to be requested for Coal making Elves

#Now accounting for the 10% expected raise increase
ToyHours *  #This isn't running for some reason so I will have to enter it manually
## 50*1.1
ToyHours*55
## [1] 8.911583e+16
#the new amount we should be requesting to pay the toy making elves is $2,213,904,000
#Storing a variable for this:
PayForToyElves <- 2213904000

## 75*1.1
CoalHours*82.5
## [1] 144157200
#New amount to pay the coal making elves is $144,157,200
#new variable
PayForCoalElves <- 144157200

#making the variable makes it easier to find the total
PayForToyElves + PayForCoalElves
## [1] 2358061200
#so, the total we should be requesting to pay all the elves is $2,358,061,200