Answered step by step
Verified Expert Solution
Question
1 Approved Answer
% Test and validation code lambda = 2 ; % Arrival rate: 2 calls per minute mu = 0 . 1 ; % Service rate:
Test and validation code
lambda ; Arrival rate: calls per minute
mu ; Service rate: calls per minute per agent
c ; Placeholder, needs adjustment based on system requirements
Placeholder, needs adjustment based on system requirements
Nwait lambda mu lambda;
Calculate System Capacity N
N c Nwait;
Call the MMCQ function with the given parameters
Ws Wq cutil, pdrop, pstate MMCQlambda mu c Nwait;
Display the results
dispWs: numstrWs;
dispWq: numstrWq;
dispcutil: numstrcutil;
disppdrop: numstrpdrop;
disppstate: numstrpstate
function Ws Wq cutil, pdrop, pstate MMCQlambda mu c Nwait
Calculate rho: the traffic intensity per server
rho lambda mu;
Calculate p the probability of having zero customers in the system
p sumc rho:c factorial:cc rhoc factorialc;
Initialize pstate
pstate zeros Nwait ;
pstate p;
Calculate pstate based on the number of customers relative to the number of servers c
for i :Nwait
ci mini c;
if i c
pstatei ci c pstatei rho factoriali;
else
pstatei cci factorialci pstatei rhoi factorialc;
end
end
pstate pstate sumpstate;
Calculate pN: the probability of dropping a customer the system being full
pN pstateNwait ;
Calculate the rate of lost customers due to the system being full
lambdaloss lambda pN;
Calculates the effective arrival rate, considering the lost customers
lambdaeff lambda lambdaloss;
Calculate Lq: the average number of customers in the queue, calculated using the state probabilities
Lq sum:Nwait pstate;
Calculates Ls: the total average number of customers in the system, both in service and in the queue
Ls Lq lambdaeff mu;
Calculate cbar Average Busy Servers and cutil Utilization Factor
cbar Ls Lq;
cutil cbar c;
pdrop pN;
Calculate Ws: the average time a customer spends in the system
Ws Ls lambdaeff;
Calculate Wq: the average time a customer spends in the queue
Wq Lq lambdaeff;
end
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