Question
Due to rising energy prices, the government of World Kingdom (WK) encourages its citizens to install solar panels on their roofs. They offer full or
Due to rising energy prices, the government of World Kingdom (WK) encourages its citizens to install solar panels on their roofs. They offer full or partial funding of solar panel costs to support the initiative. They created a government department, Solar Panel Funding (SPF), that processes these applications. However, complaints were made by citizens about the times spent inside the SPF offices when applicants were dropping their applications for processing. You are hired to investigate this. The SPF offices are open on a weekday 9-5pm. Applicants arrive during these hours at the offices according to a Poisson process with rate per hour. As the application forms for funding are quite complex and there is a high chance the applicants made a mistake, the government recommends an application checking services (ACS) that the applicants can utilise for a small fee. SPF estimates that there is a probability p that an applicant used ACS. When an applicant that has used ACS arrives at the SPF offices, they go straight to a server SF that processes their application. They queue to see SF in a FIFO fashion and when service completes they leave the offices with their application successfully submitted. If an applicant has not used ACS, they queue (FIFO) to see server SC that will check their application and correct any errors. There are two outcomes from the SC server: either they are satisfied with the application (with probability q) and they send the applicant to queue at SF , or they are not satisfied and they send them to another server SW to queue (FIFO) for an interview. When server SW completes the interview, either they are satisfied (with probability r) and they send them to SF , or they think they dont satisfy the criteria and they reject them, in which case they leave the offices. The doors to the offices close to incoming applicants at 5pm every day, however, the applicants that are already inside the offices will be served as normal. When all applicants leave, then the offices close. The servers SF , SC, SW have service times that follow exponential distributions with rates F , C, W per hour respectively.
1 Find applicants expected waiting times. The head of the department wants to know the waiting times of applicants. Let Ta be the random variable that measures the time spent by an applicant in the SPF offices. And let Tc and Tr be the random variables for time spent by completed customers (that successfully submitted their application) and the time spent by rejected customers. (i) Build a simulation model to help SPF estimate E[Ta], E[Tc], and E[Tr]. When you build your simulation model define your variables, events, event lists, output variables. Write down the pseudocode of each event case as we did in lecture. Use K = 500 iterations and the following data: = 8, F = 6, C = 5, W = 4, p = 0.5, q = 0.6, r = 0.4. Report the estimates that you found for E[Ta], E[Tc], and E[Tr]. For a state variable use a n 3 matrix S, where n is the current number of customers that have arrived so far on a particular day. Each row i of the matrix corresponds to customer i. There are 3 columns: for j = 1, 2, 3 the entry in the j th column of customer i is in {1, 2, ...} if customer is queueing/served by corresponding server (servers SF , SC, SW correspond to columns j = 1, 2, 3) and 0 otherwise (where a 1 means at the server, 2 next one queueing, and so on). So a row of (0, 0, 0) means the customer is with neither servers and thus they left the system. A row of (0, 2, 0) means that the customer is the first in the queue for SC. (ii) Find an estimate of E[Ta] for which you are 95% confident that it is within 10 minutes of its true value. In how many iterations did you get this value and what is the standard deviation of the estimator? (iii) Give an interval centered around the estimate given in (ii) above where we are 90% confident that the true value of E[Ta] is within this interval. (iv) Use K = 500 iterations to simulate the percentage of customers completed and percentage of customers rejected. Do the same analytically and compare your answers. How many iterations do you need to run the simulation to get very close to the analytical answer? 2 Improve the estimator of E[Ta]. How would you use variance reduction to improve the estimator E[Ta]. Write a paragraph proposing a variance reduction estimator (no more than one) and explain why it would reduce the variance. (Do not perform any simulations). Some further rules and pointers: 1. For generating random variables, you are only allowed to use the function runif(n) for n a positive integer. If you use any other function to generate random variables you will be penalised. 2. Start every R script with the command set.seed(1). 4. Each R script should have detailed comments and explanations so that someone who does not understand R can figure out what the code does at each step. 5. The technical part of the report should explain what each corresponding R script does so that someone that has not seen the R code can read the report and understand what you have done. Include all necessary graphs in the report. Make sure the graphs is at the correct position in the report. please give detailed solution
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started