Name :-Khushboo Roll no:-MCA/4518/10 #include #include #include #define MAX 5 typedef struct arrival { float prob; float c_prob; int min; }; typedef struct service { float prob; float c_prob; int min; }; typedef struct simulation { int cust_no; float random; int inter_arr; int c_inter_arr; float rand_no; int service_tym; int s_start; int s_end; int w_tym; int t_s_tym; int idle_tym; }; typedef struct FEL { char ch; int min; int cust_no; }; FEL fel[(MAX*2)]; arrival arr[8]; service ser[6]; simul ation sim[MAX]; void arr_prob() { int i; for(i=0;i { arr[i].min=i+1; arr[i].prob=.125; if(i==0) arr[i].c_prob=0.0; else arr[i].c_prob=arr[i-1].c_prob+arr[i-1].prob; } } void ser_prob() { int i; ser[0].prob=0.1;ser[1].prob=0.2;ser[2].prob=0.3; ser[3].prob=0.25;ser[4].prob=0.1; ser[5].prob=0.05; for(i=0;i { ser[i].min=i+1; if(i==0) ser[i].c_prob=0.0; else ser[i].c_prob=ser[i-1].c_prob+ser[i-1].pro...
Data and Tech notes for students and professionals