Question

In: Computer Science

You need to make 1000 units of a product in 1 day.  If you make more than...

You need to make 1000 units of a product in 1 day.  If you make more than 1000 units, you must pay a carrying cost of $1.5 per unit extra.  If you make less than 1000 units, you must pay a penalty cost of $5 per unit missed.    You can make the product in one of two workstations (you cannot use both).    The first workstation (W1) contains a single machine, whose output is characterized by a discrete uniform random variable with a lower bound of 1 and an upper bound of 2000.    The second workstation (W2) contains 10 machines.  Each of these machines outputs are characterized by a discrete uniform random variable with a lower bound of 1 and an upper bound of 200.  The outputs of the set of machines for W2 are independent of the other machines.   

You need to answer the following question: Which workstation should you use?   

Thus, your job is to create a Monte Carlo simulation of the two workstations in R to test your intuition.     If you use R, a useful function is to use the sample function, which “takes a sample of the specified size from the elements of x using either with or without replacement.” If you use Excel, =randbetween() generates a random whole number between two boundaries.    

For Workstation 1, simulate the daily output of workstation 1 by setting the lower bound to 1, upper bound to 2000. Repeat your simulation 100 times (i.e., consider 100 replications).     For Workstation 2, simulate the daily output of workstation 2. To do this you should create 10 separate samples taken with a lower bound of 1 and an upper bound of 200 for each of the 10 machines. The total output of Workstation 2 is the sum of the 10 machines’ output cells. Again perform 100 replications.   

Tasks:

1. Provide a plot of the daily outputs of the two workstations. Also, provide the average daily outputs of the two workstations. Comment about the difference between the two workstations average performance.

2. For both workstations, compute the amount of penalty and carrying cost you occur for each replication. Provide the average and standard deviation over the 100 replications. R hints: computing the penalty and carrying costs can be done with “ifelse” statements in R. Also, mean and sd functions in R provide the mean and standard deviations, respectively.

3. Also, provide a histogram of the frequency of days based on units produced. The function hist in R can be used to generate each histogram for each workstation.   

4. Answer the following questions and justify your answers. Which is the better workstation to use? Briefly explain why, relying on both your simulation results and intuition. What implications might this have for replacing a group of old machines with a single “flexible machine”? Is flexibility the problem, or something else?  

Solutions

Expert Solution

1)

The following code is the Monte Carlo simulation of the two workstation W1 and W2

set.seed(13)

w1.machine <- seq(from=1, to=2000)
w2.machine <- seq(from=1, to=200)

w1 <- replicate(100, sample(w1.machine, 1))
w2 <- replicate(100, sum(sample(w2.machine, 10)))

plot(w1, type="o", col="red", xlab="Days", ylab="Count", main = "Product count per day")
lines(w2, type = "o", col = "blue")

mean.of.w1 <- mean(w1)  #[1] 1141.47
mean.of.w2 <- mean(w2)  #[1] 1035.52

We have set the seed to 13 so that we can replicate the results. After that we set the range of the number of products, each machine in workstation W1 and W2, can produce, which are, 2000 and 200 respectively.

We use replicate to make 100 cases of the number of products produced per day by the two workstations. Now, we have created the data of 100 days using which we will solve other parts of the question.

Before, we have to plot the number of products produced per day by the two workstations. In the above code, we achieved that by using the function plot and lines. The plot looks like follows:

We are also asked to calculate the average daily outputs of the two workstations which we have calculated in the above code by using the function mean.

2)

Now, we are dealing with the calculation of the penalty and carrying cost. We have been asked to calculate both of them separately. The code is as follows:

extra.or.lack.w1 <- w1 - 1000
extra.or.lack.w2 <- w2 - 1000

penalty.w1 <- extra.or.lack.w1[which(extra.or.lack.w1 < 0)]
penalty.w1 <- abs(penalty.w1) * 5
penalty.w1
carrying.cost.w1 <- extra.or.lack.w1[which(extra.or.lack.w1 > 0)]
carrying.cost.w1 <- carrying.cost.w1 * 1.5
carrying.cost.w1

penalty.w2 <- extra.or.lack.w2[which(extra.or.lack.w2 < 0)]
penalty.w2 <- abs(penalty.w2) * 5
penalty.w2
carrying.cost.w2 <- extra.or.lack.w2[which(extra.or.lack.w2 > 0)]
carrying.cost.w2 <- carrying.cost.w2 * 1.5
carrying.cost.w2

average.penalty.w1 <- mean(penalty.w1)
average.penalty.w1 #[1] 1845.568
std.div.penalty.w1 <- sd(penalty.w1)
std.div.penalty.w1 #[1] 1310.969

average.carrying.cost.w1 <- mean(carrying.cost.w1)
average.carrying.cost.w1 #[1] 813.9643
std.div.carrying.cost.w1 <- sd(carrying.cost.w1)
std.div.carrying.cost.w1 #[1] 447.7601

average.penalty.w2 <- mean(penalty.w2)
average.penalty.w2 #[1] 754.1667
std.div.penalty.w2 <- sd(penalty.w2)
std.div.penalty.w2 #[1] 534.5946

average.carrying.cost.w2 <- mean(carrying.cost.w2)
average.carrying.cost.w2 #[1] 255.6983
std.div.carrying.cost.w2 <- sd(carrying.cost.w2)
std.div.carrying.cost.w2 #[1] 174.9719

This seems like a long code but it is mostly repetitive.

In the extra.or.lack.w1 and extra.or.lack.w2, all we are doing is we are subtracting 1000 from each value from w1 and w2 respectively.

Then for calculating penalty what we did was we filtered out all the values that were greater than 0 using the function which. The output of which function is a boolean. Then we passed that list of boolean in the extra.or.lack.w list and that gave us a list of products that are less than 0. We then took the absolute of all the values in the list using the function abs and multiplied it by 5 as that is the penalty we face if we underachieve our target.

For carrying.cost.w it is very similar. Just that in which condition we select values greater than 0 and our penalty multiplier is 1.5 instead of 5.

For calculating the average and standard deviation we use the function mean and sd respectively.

3)

The code for showing the histogram is as follows:

hist(w1, col = "red", main = "Distribution of days as per count of W1",
     xlab = "Count", ylab = "No. of Days")
hist(w2, col = "blue", main = "Distribution of days as per count of W2",
     xlab = "Count", ylab = "No. of Days")

This gives us two plots which look like follows:

4)

Which is the better workstation to use?

As per the calculations, Workstation 2 is clearly the better choice. The average and standard deviation of penalty and carrying costs are way lesser than for workstation 2.

Workstation 1 Workstation 2
Average Penalty 1845.568 754.1667
Standard Deviation of Penalty 1310.969 534.5946
Average of Carrying Cost 813.9643 255.6983
Standard Deviation of Carrying Cost 447.7601 174.9719

Also, the histogram of Workstation 2 shows that the frequency of days is higher for production count near to 1000 whereas for Workstation 1 it is dispersed throughout, and in our case, it is actually maximum for values near to 2000. This is bad as it will add a lot of carrying costs if we choose Workstation 1.

Also if we see our line graph Workstation 1 is very volatile whereas Workstation 2 is comparatively stable and varies around 1000.

If we replace a few old machines with one "flexible machine" it would be like replacing workstation 2 with Workstation 1. It would largely increase the penalty and carrying costs and would result in further loss to the company.

Over here flexibility is not the problem. Here the problem is excess or lack of produced unit which ultimately results in costs. So instead of using one highly flexible machine, it will be recommended to use multiple, less flexible machines.

I hope this answered your queries. Any further question do let me know. regards


Related Solutions

This a short essay of no more than one 1 page. Consider a product that you...
This a short essay of no more than one 1 page. Consider a product that you currently use or have used in the past. Identify where you think that product is on the product life cycle. Now, imagine that the owner of this brand has hired you to develop a new marketing strategy for this brand. Consider the 4 Ps of the Marketing Mix. What might you do with this brand? USE MONAT COMPANY WHICH IS A HAIR AND SKIN...
Do people under 40 defecate more than 3 times a day? I need to find a...
Do people under 40 defecate more than 3 times a day? I need to find a proper hypothesis testing and I am unsure of what data to actually use to construct the claim, NULL, ALT, SIGNIFICANCE LEVEL and appropiate test statistics. (AGE/TIMES PER DAY) 40 4 43 1 42 2 70 1 66 3 27 2 69 4 70 1 47 3 48 1 43 2 28 2 37 6 20 1 20 0 39 5 24 5 21 3...
5 Logical Fallacies That Make You Wrong More Than You Think
5 Logical Fallacies That Make You Wrong More Than You Think
You go for a run on a really hot day, which makes you sweat more than...
You go for a run on a really hot day, which makes you sweat more than usual. What is happening to the water balance in your body? Include: the difference between intracellular and extracellular fluid compartment. The movement of the fluids and water between the compartments. What role sodium plays in water balance, how is the sodium regulated and how it aids in the bodys homeostatic equilibrium.How is the bodys response to the disruption in watwr balance and how is...
Make decisions to make the product more marketable in the United States. The product is Korean...
Make decisions to make the product more marketable in the United States. The product is Korean red ginseng extract from CheongKwanJang. Place yourself in the role of the product manager who is searching for products to import to the United States. You can approach from finding out what the new market will be or the potential size of the current market for the product. Describe why you want to proceed with this product: a.     Give the pros and cons b.    ...
1. What price will you sell your repackage product? Make predictions of your sales in units...
1. What price will you sell your repackage product? Make predictions of your sales in units in which of the upcoming three months. 2. Estimate how many hours you spend in each of the upcoming three months doing the purchasing, the packaging, and selling. Select a reasonable wage rate for yourself. What will your total labor cost be in which of the upcoming three months? 3. Prepare a sales budget for each of the upcoming three months. 4. Prepare the...
Write an integrative literature review of no more than 1000 words using the thematic structure. You...
Write an integrative literature review of no more than 1000 words using the thematic structure. You can use the following structure for your literature review; 1. Introduction 1.1 Background 1.2 Research Questions 2. Methodology 2.1 Search strategy for sources 3. Results Organize the findings of your review into themes according to your research questions 4. Discussion 5. Conclusion 5.1 Recommendation for future research 5.2 Practical implications the topic about Implementing e-learning with adult English language learners
write no more than 1000 word assignment relates to S.A.P on the topic below: 1- write...
write no more than 1000 word assignment relates to S.A.P on the topic below: 1- write the difference between Sage and S.A.P accounting software
You need to test a claim that more than 18% of students at your campus do...
You need to test a claim that more than 18% of students at your campus do not know their blood types. Which sampling method would you use? Where would you collect the sample? Describe how you plan to use the chosen sampling method to collect the data.
You need to test a claim that more than 18% of students at your campus do...
You need to test a claim that more than 18% of students at your campus do not know their blood types. Which sampling method would you use? Where would you collect the sample? Describe how you plan to use the chosen sampling method to collect the data.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT