Skip to main content

Posts

Grocery Shop by simulation

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...

One ofd best FEL by Kalpana

#include #include #include int ia(int a) { if(a>=0 && a =26 && a =51 && a =76 && a =0 && a =26 && a =51 && a =76 && a b[i]) f[i]=d[i-1]; else f[i]=b[i]; } c[i]=sa(s1[i]); e[i]=65+i; d[i]=f[i]+c[i]; notice[1][0]=b[i]; notice[1][1]=e[i]; if(i>0 && notice[1][0] 0 && notice[1][0]>notice[0][0]) printf( " (%d,%c)(%d,%c)\n",notice[0][0],notice[0][1],notice[1][0],notice[1][1]); if(i==0) printf("InterArr Arrival EventNtc ServTime ServComp Notice\n"); printf("%6d%9d (%c,%4d)%8d%8d",ia(a[i]),b[i],e[i],f[i],c[i],d[i]); notice[0][0]=d[i]; notice[0][1]=e[i]; } printf(" (%d,%c)",notice[0][0],notice[0][1]); getch(); }

Grocery Shop FEL example

Name: Mukesh H Mulani Roll No : MCA/4527/10 #include #include #include typedef struct { int cno,in_arr,arr,ser_time,tsb,tse,wait,tsis,idle; }customer; int lookup1(int c) { if(c>=0 && c =13 && c =25 && c =38 && c =50 && c =63 && c =75 && c =0 && c =11 && c =31 && c =61 && c =86 && c =b?a:b; } void prtfel(event fel[],int t,int in,int dp) { event temp[3],temp2; int i,j; for(i=0;i

FEL example

Sumit Prasad (MCA/4521/10) #include #include #include int interarr(int rand) { if(rand>=0&&rand<=12) return 1; if(rand>=13&&rand<=25) return 2; if(rand>=26&&rand<=37) return 3; if(rand>=38&&rand<=50) return 4; if(rand>=51&&rand<=62) return 5; if(rand>=63&&rand<=75) return 6; if(rand>=76&&rand<=87) return 7; if(rand>=88&&rand<=99) return 8; return 0; } int main() { int arrival=0,s[10],ia,idle=0,st,servend,servbegin=0,r[10],i,wt=0,notice[2][2]; char ch='A'; clrscr(); for(i=0;i   {   r[i]= rand()%100;   s[i]=rand()%100;   } printf("Sno.Interarr Arr Servtime Servbegin Servend WT Idle  Event     Fel\n"); for(i=0;i { ia=interarr(r[i]); st=interarr(s[i]); servend=servbegin+st; wt=servbegin-arrival; if(i>0) printf("(%d,%c),(%d,%c)\n\n",notice[0][0],notice[0][1],notice[1][0],notice[1][1]); printf("%3d%5d...

FEL grocery

FEL by Saurabh Piyush MCA/4509/10 */ FEL GENERATED FOR 500 CUSTOMERS------TIME =1000 mins */ #include #include #include typedef struct { int cust_no,int_arrival,arrival,service,tsb,tse,wait,tsis,idle; }customer; int lookup2(int c) { if(c>=0 && c =11 && c =31 && c =61 && c =86 && c =0 && c =13 && c =25 && c =38 && c =50 && c =63 && c =75 && c =b?a:b; } void sort_fel(event fel[],int t,int in,int dp) { event temp[3],temp2; int i,j; for(i=0;i

Web technology LAB Question bank

1. WAP to determine length of string input by the user. 2. WAP TO Return the position of the first occurrence of a text in a string. 3. wap TO Search for a text in a string and return the text if found? 4. wap to replace characters in a string? 5. WAP to return today's date and time 6. WAP to calculate the years since 1970 7. WAP to set a specific date 8. WAP to convert today's date (according to UTC) to a string 9. WAP to write a weekday, and not just a number 10. WAP to Display a clock 11. Write a program to create and display an array 12. WAP to concat arrays 13. WAP to join elements of array using JOIN() 14. WAP to Remove the last element of an array 15. WAP to Add new elements to the end of an array 16. WAP to Reverse the order of the elements in an array? 17. WAP Remove the first element of an array? 18. WAP to Select elements from an array, sort an array (alphabetically and ascending)/ sort numbers (numerically and ascending)/Sort numbers (numericall...