Skip to main content

Posts

Simulation & Modeling Software

We can understand computer simulation language as the language which describes operation of a simulation on a computer. It can be broadly categorized in following two categories: 1. continuous 2. Discrete event Many lnguages have a graphical interface and are capable of performing simple statistical analysis of the results. While using discrete-event languages we can easily generate pseudo-random numbers and determine variables using different probability distributions. Some of the Discrete event and continuous language packages have been listed below: AutoMod eM-Plant Arena ExtendSim simulation environment for discrete event, continuous, discrete-rate and agent-based simulation.[1] GASP GPSS Plant Simulation Simio software for discrete event, continuous, and agent-based simulation.[2] SimPLE++ SimPy, an open-source package based on Python SIMSCRIPT II.5, a well established commercial compiler Simula Java Modelling Tools, an open-source package with grap...

Simulation Software

Discuss the following periods in simulation history? a. The period of Search: Simulation was conducted in FORTRAN and other gernal purpose languages. No specific simulation specific routines. Much effort was on expanding searcn for unifying concepts and the development of reusable routines to facilitate simulation(1955-60) b Advent : It is the period of forerunners of SPL we use today(1961-65) GPSS developd by Geoffery Gordon at IBM and appeared in 1961. General Purpose Simulation system was developed for quick simulation of communication and computer system. It is a block disgram based representation (similar to process flow diagram) and suited for queuing models. Phillip J Kiviat developed GASP (General Activity based simulation program). Originally it was based on GPL ALGOL but later based on FORTRAN. other SPL developed are SIhMULA(extension of ALGOL) c. The Formative period (from 1966-1970) Concepts were reviewed adn refined to promote more consistent re...

Linear Congruential method ( Random Number generation )

#include #include #define true 1 #define false 0 void main() { int x[30]; int flag=true,i,a,c,m,x0; float r[30]; printf("\n Enter a,c,m,x0"); scanf("%d%d%d%d",&a,&c,&m,&x0); x[0]=x0; i=1; while(flag==true) { x[i]=(a*x[i-1]+c)%m; r[i]=x[i]/(float)m; if(x[i]==x[0])//Now onwards series will repeat flag=false; i++; printf("x[i]=%d\n",x[i-1]); } getch(); } omprakash sharma 4552/09

Weibull Distribution Implementation (Simulation and Modeling)

#include #include #include double f(int x, double v, double a, double b) { if(x return 0; else { return b/a*(pow((x-v)/a,b-1))*exp(-pow((x-v)/a,b)); } } double F(int x, double v, double a, double b) { if(x return 0; else { return (1 - exp(-pow((x-v)/a,b))); } } int main() { int x; double v,a,b; clrscr(); printf("enter d value of x, location, shape & scale: "); scanf(" %d %lf %lf %lf",&x, &v, &b, &a); printf(" f(%d) = %f",x,f(x,v,a,b)); printf(" F(%d) = %f",x,F(x,v,a,b)); getch(); return 0; } Pankaj kumar mca4506/09

Future Event LIST (Simulation & Modeling)

BY NEHA BAHADUR MCA/4553/09 #include #include #include int inter[9] = {1,1,6,3,7,5,2,4,1}; int service[9] = {4,2,5,4,1,5,4,1,4}; int i=0,j=0; struct eventinfo { int type; int time; struct eventinfo *next; } * header; void addevent(int time, int type) { struct eventinfo * node = (struct eventinfo *)malloc(sizeof(struct eventinfo)); struct eventinfo *p, *q; node->type = type; node -> time = time; if(header->next == NULL) { header ->next = node; node->next = NULL; return ; } p = header->next; q = header; while((p->time next; } q->next = node; node -> next = p; } void print() { struct eventinfo * p = header->next; while(p!=NULL) { //printf("\n"); if(p->type ==1) printf("(A,"); else printf("(D,"); printf("%d)",p->time); p =p->next; } } void depart() { int nexttm; struct eventinfo * node =...

Future Event LIST (Simulation & Modeling) (Linked list Implementation)

by Himanshu Singla #include #include #include int inter[9] = {1,1,6,3,7,5,2,4,1}; int service[9] = {4,2,5,4,1,5,4,1,4}; int i=0,j=0; struct eventinfo { int type; int time; struct eventinfo *next; } * header; void addevent(int time, int type) { struct eventinfo * node = (struct eventinfo *)malloc(sizeof(struct eventinfo)); struct eventinfo *p, *q; node->type = type; node -> time = time; if(header->next == NULL) { header ->next = node; node->next = NULL; return ; } p = header->next; q = header; while((p->time next; } q->next = node; node -> next = p; } void print() { struct eventinfo * p = header->next; while(p!=NULL) { //printf("\n"); if(p->type ==1) printf("(A,"); else printf("(D,"); printf("%d)",p->time); p =p->next; } } void depart() { int nexttm; struct eventinfo * node = header->ne...

Application of Weibull Distribution

#include #include #include double f(int x, double v, double a, double b) { if(x return 0; else { return b/a*(pow((x-v)/a,b-1))*exp(-pow((x-v)/a,b)); } } double F(int x, double v, double a, double b) { if(x return 0; else { return (1 - exp(-pow((x-v)/a,b))); } } int main() { int x; double v,a,b; clrscr(); printf("enter d value of x, location, shape & scale: "); scanf(" %d %lf %lf %lf",&x, &v, &b, &a); printf(" f(%d) = %f",x,f(x,v,a,b)); printf(" F(%d) = %f",x,F(x,v,a,b)); getch(); return 0; }