Anonymous
public text v1 · immutablefrom math import factorial
def mmc(lam,mu,c):
if lam < mu :
if c>=1:
RO=(1.0)*lam/mu
P0=1/((sum(RO**(c-1))/factorial(c-1))+((RO**c)/factorial(c))*(1/(1-RO/c))
a=RO**c
b=factorial(c)
d=a/b
e=d*P0
g=RO/c
h=(1-RO/c)**2
f=e*(g/h)
#Lq=(((RO**c)/factorial(c))*P0)*((RO/c)/((1-RO/c)**2))#
L=Lq+RO#
Wq=Lq/lam
Ws=1/mu
W=Wq+Ws
else:
print 'lam > or = to mu, so system do not exist, please try
again !'