排队论计算代码
MMS:
lamuda=1; s=1; miu=2; ro=lamuda/(s*miu); P0=0; for j=0:s-1 P0=P0+(s*ro)^j/factorial(j); end P0=P0+(((s*ro)^s)/factorial(s))*(1/(1-ro)); P0=1/P0 Pj=[]; for j=0:s Pj(j+1)=((s*ro)^j/factorial(j))*P0 end D=1; for j=0:s-1 D=D-Pj(j+1); end Lq=(ro/(1-ro)^2)*Pj(s+1); L=Lq+s*ro; Wq=Lq/lamuda; W=Wq+1/miu; DMMsk
lamuda=1/2; s=4; miu=1/4; k=4; ro=lamuda/(s*miu); P0=0; for j=0:k if j<s P0=P0+(s*ro)^j/factorial(j); else P0 = P0+(ro^j)*(s^s)/factorial(s); end end P0=1/P0; Pj=[]; for j=0:k if j<s+1 Pj(j+1)=((s*ro)^j/factorial(j))*P0 else Pj(j+1)=((ro^j)*(s^s)/factorial(s))*P0 end end L=0; for