Skip to main content

Posts

Showing posts from October 25, 2013

M/M/1 Queuing Model code

Program code in C for M/M/1 queuing model #include<stdio.h> #include<conio.h> void main() { int lam,mu,n,i; float l,lq,ls,wq,ws,rho,p[20]; clrscr(); printf("\nEnter value for lam="); scanf("%d",&lam); printf("\nEnter value for mu="); scanf("%d",&mu); printf("\nEnter value for n="); scanf("%d",&n); l=(float)lam/(lam-mu); ws=(float)(lam/mu); wq=(float)(ws-(1/mu)); lq=(float)(pow(mu,2)/((mu)*(mu-lam))); rho=(float)lam/mu; p[0]=(float)(1-(lam/mu)); for(i=1;i<n;i++) p[i]=(float)(p[0]*(pow(rho,i))); printf("\n\n\nThe calculated results are=\n"); printf("\n l=%f",l); printf("\n ws=%f",ws); printf("\n wq=%f",wq); printf("\n lq=%f",lq); printf("\n p=%f",p); printf("\nThe probablities are!!\n"); for(i=0;i<n;i++) printf("\np[%d]=\t%f",i,p[i]); getch(); } by A

M/M/1 Queuing Simulator

Hi   All Its a very good simulator   for M/M/1. It brings t he power of Discrete Event Simulation and Web technologies for teaching and learning Queuing Theory and Queuing Networks.     Complex networks of M/M/1 queues can be modeled and simulated easily with this web-based simulator. The simulator runs a complete discrete event simulation to generate the statistics of queues and systems. http://www.simjs.com/queuing/