Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please help with the MATLAB Code to calculate the correct customer arrival and agent service rates. for the given requirements and MMCQ Validation

Can you please help with the MATLAB Code to calculate the correct customer arrival and agent service rates. for the given requirements and MMCQ Validation code ? System Requirements The first part of the design process is to capture how a customer uses the system, and then derive system requirements including the key performance parameters (KPP). The key performance parameters for system are given as Key Performance Parameters 1. The call center shall be able to handle on average at least 2 calls per minute. 2. The call center shall maintain a customer satisfaction score of greater than 5 3. A customer shall have no more than a 1% chance of the hold lines being full. 4. A customer shall have no more than a 1 min average hold time. 5. The call center shall have an availability greater than 0.999 6. The call center shall average maintenance cost per call shall be less than $0.015 The purpose of this notebook is to use modeling and simulation to define the following derived system requirements. Each system requirement is mapped back to a KPP. System Requirements 1. The call center shall have TBD inbound call hold lines. 2. The call center shall have TBD agents (servers). Assumptions A phone call takes on an average 10 mins. % Run this test case to check your code % = Lambda = Total number of calls / Total time % = mu = Total number of calls serviced / Total service time % Nwait = / ( - ) % c_util = / (c * ) % c = Total service time / Total time lambda = 2; % arrival rate mu = 5; % service rate c = 3; % number of servers Nwait = 15 % Call the MMCQ function with the given parameters % [Ws, Wq, c_util, p_drop, p_state] = MMCQ(lambda, mu, c, Nwait); [Ws, Wq, c_util, p_drop, p_state] = MMCQ(1, 0.5, 4, 5); % Define a relative error function rel_error = @(x, y) abs(x - y) / y; % Validate the results and print "PASS" or "FAIL" for each metric if rel_error(Ws, 2.1557) < 0.005 fprintf('Ws = %6.3f PASS ', Ws); else fprintf('Ws = %6.3f FAIL ', Ws); end if rel_error(Wq, 0.1557) < 0.005 fprintf('Wq = %6.3f PASS ', Wq); else fprintf('Wq = %6.3f FAIL ', Wq); end if rel_error(c_util, 0.4986) < 0.005 fprintf('c_util = %6.3f PASS ', c_util); else fprintf('c_util = %6.3f FAIL ', c_util); end if rel_error(p_drop, 0.00272) < 0.005 fprintf('p_drop = %8.5f PASS ', p_drop); else fprintf('p_drop = %8.5f FAIL ', p_drop); end fprintf('p_state: %s ', num2str(p_state)); fprintf('sum(p_state): %f ', sum(p_state)); % Extra Tests: p_state % p_state should have Nwait+1 probabilities % disp(['The probability of being in state ', num2str(Nwait), ' is ', num2str(p_state(Nwait + 1))]); disp(['The probability of being in state ', ' is ', num2str(p_state)]); % Check that the probabilities sum to 1 if abs(sum(p_state) - 1) < 1e-5 disp('The probabilities sum to 1. Test PASSED.'); else disp('The probabilities do not sum to 1. Test FAILED.'); endfunction [Ws, Wq, c_util, p_drop, p_state] = MMCQ(lambda, mu, c, Nwait) rho = lambda / (c * mu); p0_denom = sum((c * rho).^(0:(c - 1)) / factorial(0:(c - 1))) + (c * rho)^c / factorial(c) / (1 - rho); p0 = 1 / p0_denom; p_state = zeros(1, Nwait + 1); p_state(1) = p0; for i = 1:Nwait ci = min(i, c); if i <= c p_state(i + 1) = ci / c * p_state(i) * rho / factorial(i); else p_state(i + 1) = c^ci / factorial(ci) * p_state(i) * rho^i / factorial(c); end end p_state = p_state / sum(p_state); pN = p_state(Nwait + 1); lambda_loss = lambda * p_state(Nwait + 1); lambda_eff = lambda - lambda_loss; Lq = sum((0:Nwait) .* p_state); Ls = Lq + lambda_eff / mu; c_bar = Ls - Lq; c_util = c_bar / c; p_drop = p_state(Nwait + 1); Ws = Ls / lambda_eff; Wq = Lq / lambda_eff; end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions