function W = W_MM1_queue(lambda,mu,N) % W_MM1_QUEUE - The average total waiting time in steady-state in a M/M/1 queue with capacity N % % Written by: % -- % John L. Weatherwax 2007-09-10 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- rho = lambda/mu; L = L_MM1_queue(lambda,mu,N); W = ( 1 - rho^(N+1) )/( 1 - rho^N )*( L / lambda );