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)
{
return 1;
}
else if(c>=11 && c<31)
{
return 2;
}
else if(c>=31 && c<61)
{
return 3;
}
else if(c>=61 && c<86)
{
return 4;
}
else if(c>=86 && c<96)
{
return 5;
}
return 6;
}
int lookup1(int c)
{
if(c>=0 && c<13)
{
return 1;
}
else if(c>=13 && c<25)
{
return 2;
}
else if(c>=25 && c<38)
{
return 3;
}
else if(c>=38 && c<50)
{
return 4;
}
else if(c>=50 && c<63)
{
return 5;
}
else if(c>=63 && c<75)
{
return 6;
}
else if(c>=75 && c<87)
{
return 7;
}
return 8;
}
void printlist(customer c)
{
printf("\n");
printf("%d\t",c.cust_no);
printf("%d\t",c.int_arrival);
printf("%d\t",c.arrival);
printf("%d\t",c.service);
printf("%d\t",c.tsb);
printf("%d\t",c.tse);
printf("%d\t",c.tsis);
printf("%d\t",c.wait);
printf("%d\t",c.idle);
}
customer initialize(customer c)
{
c.cust_no=1;
c.int_arrival=0;
c.arrival=0;
c.service=lookup2(rand()%100);
c.tsb=0;
c.tse=c.service;
c.wait=0;
c.idle=0;
c.tsis=c.service;
printlist(c);
return c;
}
typedef struct
{
char ename;
int time;
}event;
int max(int a,int b)
{
return a>=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<3;i++)
{
temp[i]=fel[i];
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if(temp[i].time
Introduction to System Analysis and Design (SAD) System are created to solve Problems. One can think of the systemsapproch as an organised way of dealing with a problem. In this dynamic world , the subject system analysis and design, mainly deals with the software development activities. This post include:- What is System? What are diffrent Phases of System Development Life Cycle? What are the component of system analysis? What are the component of system designing? What is System? A collection of components that work together to realize some objectives forms a system. Basically there are three major components in every system, namely input, processing and output. In a system the different components are connected with each other and they are interdependent. For example, human body represents a complete natural system. We are also bound by many national systems such as political system, economic system, educational system and so forth. The objective of the system demands tha...
Comments