To: Seymore Butts
From: Afsar Ali
Date: September 21, 2018
RE: Analysis of the Proposals to reduce average level of in-process inventory

# Title: Artie's Dream
# Purpose: Final Project 
# Date: May 31, 2018
# Author: Afsar Ali

# Clear packages 
if(is.null(sessionInfo()$otherPkgs) == FALSE)lapply(
  paste("package:", names(sessionInfo()$otherPkgs), sep=""), 
  detach, character.only = TRUE, unload = TRUE)

# Clear environment
rm(list = ls(all = TRUE)) 

# Load packages
library(tidyverse)
library(queueing)
library(kableExtra)
library(formattable)

Executive Summary

How can we reduce the average number of poster sheets waiting to complete inspection? I was tasked with analyzing and producing solutions to reduce the backlog by taking into account the cost associated with each task and cost of in-process inventory. According to my findings, we should only use 8 printing press, increase the print time by 15 mins and hire an additional inspector. This will reduce our Total cost by $50.63 per hour from current the total cost of $203.14 per hour to $152.51 per hour and optimizes our overall operation. With the task of analyzing the two initial proposals we discussed, I was able to create a third solution that maximizes the poster sheet flow while minimizing our cost.

#Current Status:

# Evaluating the status quo print reproductions of the paintings and photographs
lam_f <- 7 # The poster sheets arrive randomly to the group of presses at a mean rate of 7 per hour 
mu_f <- 1  #The time required to make a print has an exponential distribution with a mean of 1 hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 7 #the cost of the power for running each press $7.00
s <- ceiling(lam_f/mu_f)+1 # lam < s*mu in steady state, so rearrange to find min s 
n <- 12 # Max number of servers
p4_p <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  L <- q1_f$L   # Mean number of print in queue system
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_p <- rbind(p4_p, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}
colnames(p4_p) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_p)
##   Servers      L     Lq      W     Wq     CS    CLq     CL    TCq     TC
## A    8.00  11.45   4.45  98.12  38.12  56.00  35.58  91.58  91.58 147.58
## B    9.00   8.35   1.35  71.55  11.55  63.00  10.78  66.78  73.78 129.78
## C   10.00   7.52   0.52  64.43   4.43  70.00   4.14  60.14  74.14 130.14
## D   11.00   7.21   0.21  61.82   1.82  77.00   1.70  57.70  78.70 134.70
## E   12.00   7.09   0.09  60.75   0.75  84.00   0.70  56.70  84.70 140.70
# Evaluating the status quo inspection station
lam_f <- 7  #the prints arrive randomly at an inspection station at the same mean rate as the sheets arrived at the presses (7 per hour)
mu_f <- 8 #Each inspection takes him 7.5 minutes, so he can inspect 8 prints per hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 17 # the current inspector is in a lower job classification where the compensation is $17 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 3 # Max number of servers
p4_i <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  #L is the all inventory (work in process) of the queue system while Lq is the portion of L that is idle (queue waiting)
  L <- q1_f$L   # Mean number of print in queue system 
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_i <- rbind(p4_i, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}

colnames(p4_i) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_i)
##   Servers     L    Lq     W    Wq    CS   CLq    CL   TCq    TC
## A    1.00  7.00  6.12 60.00 52.50 17.00 49.00 56.00 66.00 73.00
## B    2.00  1.08  0.21  9.28  1.78 34.00  1.66  8.66 35.66 42.66
## C    3.00  0.90  0.03  7.73  0.23 51.00  0.21  7.21 51.21 58.21
rbind(p4_i[1, 9:10]+p4_p[2,9:10], #using 9 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[2,9:10]) #using 9 presses and 2 inspector
##         TCq     TC
## [1,] 139.78 202.78
## [2,] 109.44 172.44
rbind(p4_i[1, 9:10]+p4_p[3,9:10], #using 10 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[3,9:10]) #using 10 presses and 2 inspector
##         TCq     TC
## [1,] 140.14 203.14
## [2,] 109.80 172.80

Current Status Report

Table 1 breaks down our status quo. Our current total cost is $203.14 per hour (highlighted green). There is an average of 7 to 8 posters in Printing Press and 7 posters in the Inspection Station, which we can call work-in-process inventory (WIP). The inventory waiting in the queue (WIQ) for service is an average of 0 to 1 posters at Printing Press and 6 posters at the Inspection Station. The wait time of the inventory in the queue for service is in average 4 minutes 25 seconds at Printing Press and 52 minutes 30 seconds in the Inspection Station. We are already aware that there is a backlog at the Inspection Station. Excluding the Cost of servers, the result shows that the main impact on in-process inventory cost comes from the Inspection Station $49 per hour for inventory waiting to be serviced (highlighted red).

Table 1: Currently the Total Cost is $203.14 per hour

now <- as.data.frame(cbind(p4_p[3,],#using 10 presses and 1 inspector
                           p4_i[1,])) #using 10 presses and 1 inspector
#L is the all inventory (work in process) of the queue system while Lq (ork To Process)is the portion of L that is idle (queue waiting)
rownames(now) <- c( "Servers",
                    "Average number of posters (WIP)", 
                    "Average number of posters in queue (WIQ)", 
                    "Average wait time (WIP) (in Minutes)",
                    "Average wait time in queue waiting for service (WIQ) (in Minutes)",
                    "Cost of servers",
                    "Cost of in-process inventory waiting for service (WIQ) ($ Per Hour)",
                    "Cost of all in-process inventory (WIP) ($ Per Hour)",
                    "Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour)",
                    "Total Cost ($ Per Hour)")
colnames(now)<- c("Printing Press","Inspection Station")
now$Total = rowSums(now)

options(knitr.kable.NA = '')
now %>%
  kable("html", row.names = TRUE, escape = F) %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left") %>%
  row_spec(nrow(now), bold = T, color = "white", background = "green") %>%
  row_spec(nrow(now)-3, bold = T, color = "white", background = "darkred") %>%
  column_spec(4, bold = T) 
Printing Press Inspection Station Total
Servers 10.00 1.00 11.00
Average number of posters (WIP) 7.52 7.00 14.52
Average number of posters in queue (WIQ) 0.52 6.12 6.64
Average wait time (WIP) (in Minutes) 64.43 60.00 124.43
Average wait time in queue waiting for service (WIQ) (in Minutes) 4.43 52.50 56.93
Cost of servers 70.00 17.00 87.00
Cost of in-process inventory waiting for service (WIQ) ($ Per Hour) 4.14 49.00 53.14
Cost of all in-process inventory (WIP) ($ Per Hour) 60.14 56.00 116.14
Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour) 74.14 66.00 140.14
Total Cost ($ Per Hour) 130.14 73.00 203.14
##Proposal 4: Take slightly longer to make the prints (which would increase their average time to make a print to 1.2 hours), so that the inspector can keep up with his output better. This also would reduce the  cost of the power for running each press from $7.00 to $6.50 per hour. (By contrast, decreasing the time would increase this cost to $7.50 per hour while decreasing the average time to make a print to 0.8 hour.):

# Evaluating the status quo print reproductions of the paintings and photographs
lam_f <- 7 # The poster sheets arrive randomly to the group of presses at a mean rate of 7 per hour 
mu_f <- 1/1.2  #The time required to make a print has an exponential distribution with a mean of 1 hour; increase their average time to make a print to 1.2 hours
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 6.5 #the cost of the power for running each press $7.00 to $6.50 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 12 # Max number of servers
p4_p <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  L <- q1_f$L   # Mean number of print in queue system
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_p <- rbind(p4_p, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}
colnames(p4_p) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_p)
##   Servers      L     Lq      W     Wq     CS    CLq     CL    TCq     TC
## A    9.00  19.36  10.96 165.94  93.94  58.50  87.68 154.88 146.18 213.38
## B   10.00  11.05   2.65  94.69  22.69  65.00  21.18  88.38  86.18 153.38
## C   11.00   9.41   1.01  80.62   8.62  71.50   8.05  75.25  79.55 146.75
## D   12.00   8.83   0.43  75.68   3.68  78.00   3.43  70.63  81.43 148.63
# Evaluating the status quo inspection station
lam_f <- 7  #the prints arrive randomly at an inspection station at the same mean rate as the sheets arrived at the presses (7 per hour)
mu_f <- 8 #Each inspection takes him 7.5 minutes, so he can inspect 8 prints per hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 17 # the current inspector is in a lower job classification where the compensation is $17 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 3 # Max number of servers
p4_i <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  #L is the all inventory (work in process) of the queue system while Lq is the portion of L that is idle (queue waiting)
  L <- q1_f$L   # Mean number of print in queue system 
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_i <- rbind(p4_i, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}

colnames(p4_i) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_i)
##   Servers     L    Lq     W    Wq    CS   CLq    CL   TCq    TC
## A    1.00  7.00  6.12 60.00 52.50 17.00 49.00 56.00 66.00 73.00
## B    2.00  1.08  0.21  9.28  1.78 34.00  1.66  8.66 35.66 42.66
## C    3.00  0.90  0.03  7.73  0.23 51.00  0.21  7.21 51.21 58.21
rbind(p4_i[1, 9:10]+p4_p[1,9:10], #using 9 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[1,9:10]) #using 9 presses and 2 inspector
##         TCq     TC
## [1,] 212.18 286.38
## [2,] 181.84 256.04
rbind(p4_i[1, 9:10]+p4_p[2,9:10], #using 10 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[2,9:10]) #using 10 presses and 2 inspector
##         TCq     TC
## [1,] 152.18 226.38
## [2,] 121.84 196.04

Proposed: Decreasing print time

If we were to take slightly longer time to make the prints, so that the inspector can keep up with the output and reduce the cost of the power for running each press from $7.00 to $6.50 per hour, the total cost would increase by $23.24 per hour, from current total cost of $203.14 per hour to $226.38 per hour (highlighted green in table 2). This increase is due to the cost of in-process inventory, by decreasing the print time the average WIP inventory goes from 7-8 posters to about 11 posters in printing press. Although the cost of printing press gets reduced by $5, the result shows that cost of in-process inventory WIQ increases from $4.14 per hours to $21.18 per hour (highlighted red in table 2).

Table 2: Decreasing print time by 10 mins would increase Total Cost by $23.24 per hour

p4a <- as.data.frame(cbind(p4_p[2,],#using 10 presses and 1 inspector
                           p4_i[1,])) #using 10 presses and 1 inspector
#L is the all inventory (work in process) of the queue system while Lq (ork To Process)is the portion of L that is idle (queue waiting)
rownames(p4a) <- c( "Servers",
                    "Average number of posters (WIP)", 
                    "Average number of posters in queue (WIQ)", 
                    "Average wait time (WIP) (in Minutes)",
                    "Average wait time in queue waiting for service (WIQ) (in Minutes)",
                    "Cost of servers",
                    "Cost of in-process inventory waiting for service (WIQ) ($ Per Hour)",
                    "Cost of all in-process inventory (WIP) ($ Per Hour)",
                    "Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour)",
                    "Total Cost ($ Per Hour)")
colnames(p4a)<- c("Printing Press","Inspection Station")
p4a$Total = rowSums(p4a)

now1 <- cbind(now, p4a)

options(knitr.kable.NA = '')
now1 %>%
  kable("html", row.names = TRUE) %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left") %>%
  row_spec(nrow(now1), bold = T, color = "white", background = "green") %>%
  row_spec(nrow(now1)-3, bold = T, color = "white", background = "darkred") %>%
  column_spec(4, bold = T) %>%
  column_spec(7, bold = T) %>%
  add_header_above(c(" ", "Current" = 3, "Proposed: Decreasing print time" = 3))
Current
Proposed: Decreasing print time
Printing Press Inspection Station Total Printing Press Inspection Station Total
Servers 10.00 1.00 11.00 10.00 1.00 11.00
Average number of posters (WIP) 7.52 7.00 14.52 11.05 7.00 18.05
Average number of posters in queue (WIQ) 0.52 6.12 6.64 2.65 6.12 8.77
Average wait time (WIP) (in Minutes) 64.43 60.00 124.43 94.69 60.00 154.69
Average wait time in queue waiting for service (WIQ) (in Minutes) 4.43 52.50 56.93 22.69 52.50 75.19
Cost of servers 70.00 17.00 87.00 65.00 17.00 82.00
Cost of in-process inventory waiting for service (WIQ) ($ Per Hour) 4.14 49.00 53.14 21.18 49.00 70.18
Cost of all in-process inventory (WIP) ($ Per Hour) 60.14 56.00 116.14 88.38 56.00 144.38
Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour) 74.14 66.00 140.14 86.18 66.00 152.18
Total Cost ($ Per Hour) 130.14 73.00 203.14 153.38 73.00 226.38
##Proposal 4: Take slightly longer to make the prints (which would increase their average time to make a print to 1.2 hours), so that the inspector can keep up with his output better. This also would reduce the  cost of the power for running each press from $7.00 to $6.50 per hour. (By contrast, decreasing the time would increase this cost to $7.50 per hour while decreasing the average time to make a print to 0.8 hour.):

# Evaluating the status quo print reproductions of the paintings and photographs
lam_f <- 7 # The poster sheets arrive randomly to the group of presses at a mean rate of 7 per hour 
mu_f <- 1/.8  #The time required to make a print has an exponential distribution with a mean of 1 hour; decrease their average time to make a print to .8 hours
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 7.5 #the cost of the power for running each press $7.00 to $7.50 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 12 # Max number of servers
p4_p <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  L <- q1_f$L   # Mean number of print in queue system
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_p <- rbind(p4_p, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}
colnames(p4_p) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_p)
##   Servers      L     Lq      W     Wq     CS    CLq     CL    TCq     TC
## A    6.00  17.12  11.52 146.73  98.73  45.00  92.15 136.95 137.15 181.95
## B    7.00   7.54   1.94  64.66  16.66  52.50  15.55  60.35  68.05 112.85
## C    8.00   6.23   0.63  53.41   5.41  60.00   5.05  49.85  65.05 109.85
## D    9.00   5.83   0.23  50.00   2.00  67.50   1.87  46.67  69.37 114.17
## E   10.00   5.69   0.09  48.76   0.76  75.00   0.71  45.51  75.71 120.51
## F   11.00   5.63   0.03  48.28   0.28  82.50   0.26  45.06  82.76 127.56
## G   12.00   5.61   0.01  48.10   0.10  90.00   0.10  44.90  90.10 134.90
# Evaluating the status quo inspection station
lam_f <- 7  #the prints arrive randomly at an inspection station at the same mean rate as the sheets arrived at the presses (7 per hour)
mu_f <- 8 #Each inspection takes him 7.5 minutes, so he can inspect 8 prints per hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 17 # the current inspector is in a lower job classification where the compensation is $17 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 3 # Max number of servers
p4_i <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  #L is the all inventory (work in process) of the queue system while Lq is the portion of L that is idle (queue waiting)
  L <- q1_f$L   # Mean number of print in queue system 
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_i <- rbind(p4_i, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}

colnames(p4_i) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_i)
##   Servers     L    Lq     W    Wq    CS   CLq    CL   TCq    TC
## A    1.00  7.00  6.12 60.00 52.50 17.00 49.00 56.00 66.00 73.00
## B    2.00  1.08  0.21  9.28  1.78 34.00  1.66  8.66 35.66 42.66
## C    3.00  0.90  0.03  7.73  0.23 51.00  0.21  7.21 51.21 58.21
rbind(p4_i[1, 9:10]+p4_p[1,9:10], #using 9 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[1,9:10]) #using 9 presses and 2 inspector
##         TCq     TC
## [1,] 203.15 254.95
## [2,] 172.81 224.61
rbind(p4_i[1, 9:10]+p4_p[2,9:10], #using 10 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[2,9:10]) #using 10 presses and 2 inspector
##         TCq     TC
## [1,] 134.05 185.85
## [2,] 103.71 155.51

Proposed: Increasing print time

By contrast, if we were increasing the print time, it would increase the cost of the power for running each press by $7.50 per hour but the total cost would decrease by $9.63 per hour, from current total cost of $203.14 per hour to $193.51.38 per hour (highlighted green in table 3). This decrease is due to the decrease in cost of in-process inventory, by increasing the print time the average WIP inventory goes from 7-8 posters to about 5-6 posters in printing press. Although the cost of printing press increases by $5, the result shows that the cost of in-process inventory WIP decreases from $60.14 per hours to $45.51 per hour (highlighted red in table 3). This proposed solution should be considered in our final decision.

Table 3: Increasing print time by 15 mins would decrease the Total Cost by $9.63 per hour

p4b <- as.data.frame(cbind(p4_p[5,],#using 10 presses and 1 inspector
                           p4_i[1,])) #using 10 presses and 1 inspector
#L is the all inventory (work in process) of the queue system while Lq (ork To Process)is the portion of L that is idle (queue waiting)
rownames(p4b) <- c( "Servers",
                    "Average number of posters (WIP)", 
                    "Average number of posters in queue (WIQ)", 
                    "Average wait time (WIP) (in Minutes)",
                    "Average wait time in queue waiting for service (WIQ) (in Minutes)",
                    "Cost of servers",
                    "Cost of in-process inventory waiting for service (WIQ) ($ Per Hour)",
                    "Cost of all in-process inventory (WIP) ($ Per Hour)",
                    "Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour)",
                    "Total Cost ($ Per Hour)")
colnames(p4b)<- c("Printing Press","Inspection Station")
p4b$Total = rowSums(p4b)

now2 <- cbind(now, p4b)

options(knitr.kable.NA = '')
now2 %>%
  kable("html", row.names = TRUE) %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left") %>%
  row_spec(nrow(now2), bold = T, color = "white", background = "green") %>%
  row_spec(nrow(now2)-2, bold = T, color = "white", background = "darkred") %>%
  column_spec(4, bold = T) %>%
  column_spec(7, bold = T) %>%
  add_header_above(c(" ", "Current" = 3, "Proposed: Increasing print time" = 3))
Current
Proposed: Increasing print time
Printing Press Inspection Station Total Printing Press Inspection Station Total
Servers 10.00 1.00 11.00 10.00 1.00 11.00
Average number of posters (WIP) 7.52 7.00 14.52 5.69 7.00 12.69
Average number of posters in queue (WIQ) 0.52 6.12 6.64 0.09 6.12 6.21
Average wait time (WIP) (in Minutes) 64.43 60.00 124.43 48.76 60.00 108.76
Average wait time in queue waiting for service (WIQ) (in Minutes) 4.43 52.50 56.93 0.76 52.50 53.26
Cost of servers 70.00 17.00 87.00 75.00 17.00 92.00
Cost of in-process inventory waiting for service (WIQ) ($ Per Hour) 4.14 49.00 53.14 0.71 49.00 49.71
Cost of all in-process inventory (WIP) ($ Per Hour) 60.14 56.00 116.14 45.51 56.00 101.51
Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour) 74.14 66.00 140.14 75.71 66.00 141.71
Total Cost ($ Per Hour) 130.14 73.00 203.14 120.51 73.00 193.51
#Proposal 5: Substitute a more experienced inspector for this task. She is somewhat faster at 7 minutes per poster, so she should keep up better. However, this inspector is in a job classification that calls for a total compensation (including benefits) of $19 per hour, whereas the current inspector is in a lower job classification where the compensation is $17 per hour:

# Evaluating the status quo print reproductions of the paintings and photographs
lam_f <- 7 # The poster sheets arrive randomly to the group of presses at a mean rate of 7 per hour 
mu_f <- 1  #The time required to make a print has an exponential distribution with a mean of 1 hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 7 #the cost of the power for running each press $7.00
s <- ceiling(lam_f/mu_f)+1 # lam < s*mu in steady state, so rearrange to find min s 
n <- 12 # Max number of servers
p4_p <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  L <- q1_f$L   # Mean number of print in queue system
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_p <- rbind(p4_p, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}
colnames(p4_p) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_p)
##   Servers      L     Lq      W     Wq     CS    CLq     CL    TCq     TC
## A    8.00  11.45   4.45  98.12  38.12  56.00  35.58  91.58  91.58 147.58
## B    9.00   8.35   1.35  71.55  11.55  63.00  10.78  66.78  73.78 129.78
## C   10.00   7.52   0.52  64.43   4.43  70.00   4.14  60.14  74.14 130.14
## D   11.00   7.21   0.21  61.82   1.82  77.00   1.70  57.70  78.70 134.70
## E   12.00   7.09   0.09  60.75   0.75  84.00   0.70  56.70  84.70 140.70
# Evaluating the status quo inspection station
lam_f <- 7  #the prints arrive randomly at an inspection station at the same mean rate as the sheets arrived at the presses (7 per hour)
mu_f <- 60/7 #Each inspection takes him 7 minutes, so he can inspect 8.57 prints per hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 19 # the current inspector is in a lower job classification where the compensation is $19 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 3 # Max number of servers
p4_i <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  #L is the all inventory (work in process) of the queue system while Lq is the portion of L that is idle (queue waiting)
  L <- q1_f$L   # Mean number of print in queue system 
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_i <- rbind(p4_i, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}

colnames(p4_i) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_i)
##   Servers     L    Lq     W    Wq    CS   CLq    CL   TCq    TC
## A    1.00  4.45  3.64 38.18 31.18 19.00 29.10 35.64 48.10 54.64
## B    2.00  0.98  0.16  8.40  1.40 38.00  1.31  7.84 39.31 45.84
## C    3.00  0.84  0.02  7.18  0.18 57.00  0.16  6.70 57.16 63.70
rbind(p4_i[1, 9:10]+p4_p[2,9:10], #using 9 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[2,9:10]) #using 9 presses and 2 inspector
##         TCq     TC
## [1,] 121.88 184.42
## [2,] 113.09 175.62
rbind(p4_i[1, 9:10]+p4_p[3,9:10], #using 10 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[3,9:10]) #using 10 presses and 2 inspector
##         TCq     TC
## [1,] 122.24 184.78
## [2,] 113.45 175.98

Proposed: Experienced inspector

If we were to substitute a more experienced inspector, the total cost would decrease by $18.36 per hour, from current total cost of $203.14 per hour to $184.78 per hour (highlighted green in table 4). Similar to the proposal to increase print time, increasing the process in the inspections station decreases the cost of in-process inventory. By increasing the inspection speed the average WIP inventory goes from 7 posters to about 4-5 posters in the inspections station. Although the cost of inspection increases by $2, the result shows that cost of in-process inventory WIP decreases from $56 per hour to $35.64 per hour (highlighted red in table 4). The results from these proposals demonstrates that we can minimize our cost by optimizing the in-process inventory in both printing press and inspection station.

Table 4: Experienced inspector would decrease the Total Cost by $18.36 per hour

p5a <- as.data.frame(cbind(p4_p[3,],#using 10 presses and 1 inspector
                           p4_i[1,])) #using 10 presses and 1 inspector
#L is the all inventory (work in process) of the queue system while Lq (ork To Process)is the portion of L that is idle (queue waiting)
rownames(p5a) <- c( "Servers",
                    "Average number of posters (WIP)", 
                    "Average number of posters in queue (WIQ)", 
                    "Average wait time (WIP) (in Minutes)",
                    "Average wait time in queue waiting for service (WIQ) (in Minutes)",
                    "Cost of servers",
                    "Cost of in-process inventory waiting for service (WIQ) ($ Per Hour)",
                    "Cost of all in-process inventory (WIP) ($ Per Hour)",
                    "Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour)",
                    "Total Cost ($ Per Hour)")
colnames(p5a)<- c("Printing Press","Inspection Station")
p5a$Total = rowSums(p5a)

now3 <- cbind(now, p4b, p5a)

options(knitr.kable.NA = '')
now3 %>%
  kable("html", row.names = TRUE) %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left") %>%
  row_spec(nrow(now3), bold = T, color = "white", background = "green") %>%
  row_spec(nrow(now3)-2, bold = T, color = "white", background = "darkred") %>%
  row_spec(2, bold = T, color = "white", background = "darkred") %>%
  column_spec(4, bold = T) %>%
  column_spec(7, bold = T) %>%
  column_spec(10, bold = T) %>%
  add_header_above(c(" ", "Current" = 3, "Proposed: Increasing print time" = 3, "Proposed: Experienced inspector" = 3))
Current
Proposed: Increasing print time
Proposed: Experienced inspector
Printing Press Inspection Station Total Printing Press Inspection Station Total Printing Press Inspection Station Total
Servers 10.00 1.00 11.00 10.00 1.00 11.00 10.00 1.00 11.00
Average number of posters (WIP) 7.52 7.00 14.52 5.69 7.00 12.69 7.52 4.45 11.97
Average number of posters in queue (WIQ) 0.52 6.12 6.64 0.09 6.12 6.21 0.52 3.64 4.16
Average wait time (WIP) (in Minutes) 64.43 60.00 124.43 48.76 60.00 108.76 64.43 38.18 102.61
Average wait time in queue waiting for service (WIQ) (in Minutes) 4.43 52.50 56.93 0.76 52.50 53.26 4.43 31.18 35.61
Cost of servers 70.00 17.00 87.00 75.00 17.00 92.00 70.00 19.00 89.00
Cost of in-process inventory waiting for service (WIQ) ($ Per Hour) 4.14 49.00 53.14 0.71 49.00 49.71 4.14 29.10 33.24
Cost of all in-process inventory (WIP) ($ Per Hour) 60.14 56.00 116.14 45.51 56.00 101.51 60.14 35.64 95.78
Cost of in-process inventory in queue including server cost (WIQ) ($ Per Hour) 74.14 66.00 140.14 75.71 66.00 141.71 74.14 48.10 122.24
Total Cost ($ Per Hour) 130.14 73.00 203.14 120.51 73.00 193.51 130.14 54.64 184.78
# My Proposal:

# Evaluating the status quo print reproductions of the paintings and photographs
lam_f <- 7 # The poster sheets arrive randomly to the group of presses at a mean rate of 7 per hour 
mu_f <- 1/.8  #The time required to make a print has an exponential distribution with a mean of 1 hour; decrease their average time to make a print to .8 hours
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 7.5 #the cost of the power for running each press $7.00 to $7.50 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 12 # Max number of servers
p4_p <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  L <- q1_f$L   # Mean number of print in queue system
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_p <- rbind(p4_p, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}
colnames(p4_p) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_p)
##   Servers      L     Lq      W     Wq     CS    CLq     CL    TCq     TC
## A    6.00  17.12  11.52 146.73  98.73  45.00  92.15 136.95 137.15 181.95
## B    7.00   7.54   1.94  64.66  16.66  52.50  15.55  60.35  68.05 112.85
## C    8.00   6.23   0.63  53.41   5.41  60.00   5.05  49.85  65.05 109.85
## D    9.00   5.83   0.23  50.00   2.00  67.50   1.87  46.67  69.37 114.17
## E   10.00   5.69   0.09  48.76   0.76  75.00   0.71  45.51  75.71 120.51
## F   11.00   5.63   0.03  48.28   0.28  82.50   0.26  45.06  82.76 127.56
## G   12.00   5.61   0.01  48.10   0.10  90.00   0.10  44.90  90.10 134.90
# Evaluating the status quo inspection station
lam_f <- 7  #the prints arrive randomly at an inspection station at the same mean rate as the sheets arrived at the presses (7 per hour)
mu_f <- 8 #Each inspection takes him 7.5 minutes, so he can inspect 8 prints per hour
p <- 8 #The cost of in-process inventory is estimated to be $8 per hour for each poster sheet at the presses or each print at the inspection station
cost <- 17 # the current inspector is in a lower job classification where the compensation is $17 per hour
s <- ceiling(lam_f/mu_f) # lam < s*mu in steady state, so rearrange to find min s 
n <- 3 # Max number of servers
p4_i <- vector() # Create matrix to hold data
# Loop to find low cost
for (i in s:n){
  q1_fi <- NewInput.MMC(lam_f, mu_f, i) # Set and check the inputs of the model
  q1_f <- QueueingModel.i_MMC(q1_fi) # Solve the queueing model
  #L is the all inventory (work in process) of the queue system while Lq is the portion of L that is idle (queue waiting)
  L <- q1_f$L   # Mean number of print in queue system 
  Lq <- q1_f$Lq     # Mean number of print in queue
  W <- q1_f$W*60  # Mean minutes print wait time in queue system
  Wq <- q1_f$Wq*60   # Mean minutes print wait time in queue waiting for service
  CL <- Lq*p   # Cost of in-process inventory in queue
  CL2 <- L*p  # Cost of in-process inventory 
  CS <- i*cost  # Cost of servers in queue system
  p4_i <- rbind(p4_i, round(c(i, L, Lq, W, Wq, CS, CL, CL2, CL + CS, CL2 + CS), 2))   # Organize in table
}

colnames(p4_i) <- c("Servers", "L", "Lq", "W", "Wq", "CS", "CLq", "CL", "TCq", "TC")
as.table(p4_i)
##   Servers     L    Lq     W    Wq    CS   CLq    CL   TCq    TC
## A    1.00  7.00  6.12 60.00 52.50 17.00 49.00 56.00 66.00 73.00
## B    2.00  1.08  0.21  9.28  1.78 34.00  1.66  8.66 35.66 42.66
## C    3.00  0.90  0.03  7.73  0.23 51.00  0.21  7.21 51.21 58.21
rbind(p4_i[1, 9:10]+p4_p[3,9:10], #using 8 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[3,9:10]) #using 8 presses and 2 inspector
##         TCq     TC
## [1,] 131.05 182.85
## [2,] 100.71 152.51
rbind(p4_i[1, 9:10]+p4_p[5,9:10], #using 10 presses and 1 inspector
      p4_i[2, 9:10]+p4_p[5,9:10]) #using 10 presses and 2 inspector
##         TCq     TC
## [1,] 141.71 193.51
## [2,] 111.37 163.17

Relevant Final Thoughts

Carrying the in-process inventory is very costly and reducing the time it’s in queue WIQ should be prioritized. The recommended proposal to only use 8 printing press, increasing the print time by 15 mins and hiring an additional inspector, reduces our inventory that’s waiting in queue by 87% this results in 25% decrease in our overall cost. We can also have 2 printing press ready for operation if there are any maintenance issue with the other 8 printing press.