Beruflich Dokumente
Kultur Dokumente
Experiment No. 1
Title: Random Number Generator
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:1
Aim: To study and implement a PseudoRandom Number Generator (PRNG) using Linear
Congruential Method
Resources needed: Turbo C / Java
Theory
Problem Definition:
Write a Program for generating random numbers using Linear Congruential method such that
i) Period of the numbers generated is >=100
ii) Density of the numbers generated is maximum (average gap between random
numbers is < 0.1).
Concepts:
Random Numbers: Random numbers are a necessary basic ingredient in simulation of
almost all discrete systems. Most computer languages have a subroutine, object or function
that will generate a random number. A simulation language generates random numbers that
are used to generate event times and other random variables.
Properties of random Numbers:
A sequence of random number R1, R2 must have two important statistical properties,
uniformity and independence.
Uniformity :
If the interval (0, 1) is divided into n classes or subintervals of equal length , the expected
number of observations in each interval is N/n, where N is total number of observations.
Independence:
The probability of observing a value in a particular interval is independent of the previous
drawn value.
Problems faced in generating random numbers:
1. The generated number may not be uniformly distributed.
2. The number may be discrete valued instead of continuous values.
3. The mean of the numbers may be too high or low
4. The variance of the number may be too high or low.
5. The numbers may not be independent
e.g. a. Autocorrelation between numbers
b. Numbers successively higher or lower than adjacent numbers.
Criteria for random no. generator:
1. The routine should be fast.
2. The routine should be portable.
3. The routine should have a sufficient long cycle. The cycle length or period represents
the length of random number sequence before previous numbers begin to repeat
themselves in an earlier order. A special case of cycling is degenerating. A routine
degenerates when some number appears repeatedly which is unacceptable.
4. The random number should be replicable.
5. Most important, the generated random numbers should closely approximate to the
ideal statistical properties of uniformity and independence.
KJSCE/IT/BE/SEMVIII/SM/2015-16
Procedure:
Linear Congruential Method:
The Linear Congruential method produces a sequence of integers X1, X2, between 0 and
m-1 according to the following recursive relationship.
X i+1= (a X i + c) mod m , i = 0, 1, 2
The initial value X0 is called the seed, a is constant multiplier, c is the increment and m is the
modulus. Maximal period can be achieved by a, c, m, X0 satisfying one of the following
conditions
1. For m, a power of 2 (m = 2b) and c0 period p = 2b is achieved provided c is relatively
prime to m and a = 1+4k , k = 0,1,2,
2. For m = 2b and c = 0 , period p = 2b-2 is achieved provided X0 is odd and multiplier a
= 3+8k or a = 5+8k , k = 0,1,2,
3. For m a prime number and c = 0, period p = m-1 is achieved provided a has the
property that the smallest integer is such that a k-1 is divisible by m is k = m-1.
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
The random number generator using Linear Congruential method fairly satisfies the
properties of random number.
The set of data that provide adequate periodicity and density are as follows:
m=
a=
x0 =
c=
KJSCE/IT/BE/SEMVIII/SM/2015-16
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No. : 2
Title: Case Study 1
(Technical Paper)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No. : 3
Title: Single Server system
(The Grocery store problem)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:3
KJSCE/IT/BE/SEMVIII/SM/2015-16
KJSCE/IT/BE/SEMVIII/SM/2015-16
Performance measures:
1. Average Waiting Time = (Total time customers wait in queue) / (Total no. of
Customers)
2. Probability. Of Customers waiting =(No. of Customers who waits) / (Total no. of
Customers)
3.Probability. Of Idle Server = (Total Idle Time Of Server) / (Total runtime of simulation)
4.Average Time between Arrival = (Total Time between arrivals) / (No. of arrivals)
5.Average Waiting Time of Those Who Wait = (Total Time Customer waits in system) /
(Total no. of Customers)
6.Average Time Customers Spends In System = (Total Time Customer spends in system) /
(Total no. of Customers).
Activity Diagram:
1) Flowchart Arrival event:
Arrival Event
NO
YES
Server
Busy?
Unit Enters
service
Unit Enters
queue
NO
YES
Another unit
waiting?
Remove waiting
unit from queue
KJSCE/IT/BE/SEMVIII/SM/2015-16
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No. : 4
Title: Multi-Serve system (The Able-Baker car hop
problem)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:4
Aim: To simulate Multi-Serve system (The Able-Baker carhop problem) using Spreadsheet
0.4
0.2
0.15
There are 2 carhops Able & Baker. Able is better to do the job and works a bit faster than
Baker.
Their service distribution is as follows:
Service time Distribution of Able:
Service
2
3
Time(minutes)
Probability
0.3
0.28
Service time Distribution of Baker:
Service
3
4
time(minutes)
Probability
0.35
0.25
0.25
0.17
0.2
0.2
Able gets the customer if both carhops are idle. The problem is to find how well the current
arrangement is working. Simulate the problem for 1 hour.
Conceptual Model:
- Discrete event model of system used for multichannel queuing. e.g. Able & Baker
problem.
- A simulation table is used to record the system snapshots as time proceeds.
- The simulation requires mainly an activity table representing a service time
distribution of Able & Baker & interarrival time of customers.
- Activity duration is specified by a modeller.
Characteristics of System:
1. Calling Population: Infinite.
2. System capacity: Infinite.
3. Nature of Arrival: Random, probability distribution is given.
4. Service Mechanism: At a time maximum two customers can be served one by Able and
KJSCE/IT/BE/SEMVIII/SM/2015-16
the other by Baker. If Able & Baker both are busy, the customer has to wait. If both
servers are free, priority goes to Able. Service time for both is random; probability
distribution is given.
5. Queuing Discipline: FIFO.
System State:
1. Status of Able (indicating Able being idle or busy at a given instant).
2. Status of Baker (indicating Baker being idle or busy at a given instant).
3. Time customer spends in the queue
4. Time customer spends in the system
Entities:
Neither the customers nor the server needs to be explicitly represented except in terms
of state variable unless customer averages are desired.
Events:
- Arrival Event
- Service Completion by Able
- Service completion by Baker.
Delay:
A customer waits in queue until Able or Baker becomes free.
Use of Random Numbers:
- To generate random numbers in simulation packages, RANDBETWEEN() of Excel
can be used.
- In Able & Baker problem random numbers are used for arranging interarrival times
and service times required for customers.
Real life example:
- Scenarios in shopping centre where two cash counter are available.
o Here n number of customers pay the bill.
o Customer is chosen in FIFO manner.
Performance measures:
1. Average Waiting Time = (Total time customers wait in queue) / (Total no. of
Customers)
2. Probability Of Customers waiting = (No. of Customers who waits) / (Total no. of
Customers)
3. Probability Of Idle Server = (Total Idle Time Of Server) / (Total runtime of simulation)
4. Average Service Time = (Total Service Time) / (Total no. of Customers)
KJSCE/IT/BE/SEMVIII/SM/2015-16
5. Average Time between Arrival = (Total Time between arrivals) / (No. of arrivals)
6. Average Waiting Time Of Those Who Wait = (Total Time Customer waits in system) /
(Total no. of Customers)
7. Average Time Customers Spends In System = (Total Time Customer spends in system) /
(Total no. of Customers)
Able
Busy?
Enter service
from Able
Server
Busy?
Unit Enters
service
Unit Enters
queue
Questions:
1. What are the steps carried out for System Simulation using Simulation Table
KJSCE/IT/BE/SEMVIII/SM/2015-16
Give one
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
( Mention the subjective inference on the basis of the performance measures you
have analyzed )
KJSCE/IT/BE/SEMVIII/SM/2015-16
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No. : 5
Title: Single Server system (One-operator Barbershop
problem) using a general purpose language
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:5
Aim: To simulate a Single Server system (One-operator Barbershop problem) using a general
purpose language
KJSCE/IT/BE/SEMVIII/SM/2015-16
The actual population may be finite. The main difference between finite & infinite population
is based on the definition of the arrival rate.
2. System Capacity: The system capacity has no limit meaning that any no. of units comes
and waits in the queue. In many queuing system there is a limit to the no. of customers that
may be waiting.
3. Nature of Arrivals: Arrivals for service occur at a time in random fashion and once they
join the waiting line, they are served.
4. Service Mechanism: The units are served in order of their arrival by a single server or a
channel.
5. Queuing Discipline: It refers to the logical ordering of customers that will be chosen for
service when a server becomes busy.
6. State Of System: It is the no. of units in the system & status of server (busy / idle).
7. Events: It is a set of circumstances that causes an instantaneous change in the state of
system
Possible events in a single server system:
The Entry of a unit in the system.
Departure of unit from system on completion of service.
8. Simulation Clock: It is used to track simulation time.
Conceptual Model:
The One operator barbershop is simulated by using a program written in a general-purpose
language to record successive system snapshots as time advances. The simulation requires
mainly a service time distribution and an interarrival time distribution of customers.
Characteristics of Grocery Store checkout counter System:
1) Calling Population: Infinite.
2) System capacity: Infinite.
3) Nature of Arrival: Random arrival exponentially distributed with mean 1 minute
4) Service Mechanism: At a time only one customer is served; service time is random,
exponentially distributed with mean 0.5 minute
5) Queuing Discipline: FIFO.
System State:
1) Waiting time in queue.
2) Status of operator (Busy / Idle)
3) Time customer spends in the system.
Entities:
The entities in single channel queue are queue & server.
KJSCE/IT/BE/SEMVIII/SM/2015-16
Events:
1) Arrival Event
2) Departure Event
Activities:
1. Interarrival time.
2. Service time.
Delay:
Waiting time in the queue.
Stopping event:
1000th customer enters service
Use of Random Nos.:
- For generating interarrival time
- For generating service time
Real life Examples:
1. Customers queuing in the Telephone Bill Payment System
Customers form single channel queue.
Customer is chosen in FIFO manner.
Performance measures:
1. Average delay in queue =(Total time customers wait in queue) / (Total no. of
Customers)
2. Probability. Of Customers waiting =(No. of Customers who waits) / (Total no. of
Customers)
3. Server utilization = (Total busy Time Of Server) / (Total runtime of simulation)
4. Average Time between Arrival = (Total Time between arrivals) / (No. of arrivals)
5. Average Waiting Time of Those Who Wait = (Total Time Customer waits in
system) / (Total no. of Customers)
6. Average Time Customers Spends In System = (Total Time Customer spends in
system) / (Total no. of Customers)
Time simulation ends
KJSCE/IT/BE/SEMVIII/SM/2015-16
Activity Diagram:
Flowchart Arrival event:
Arrival event
Is the
server
busy?
Add 1 to the
number in queue
Set delay=0
For this customer and
gather statistics
Is the
queue
full?
Return
(Autonomous College Affiliated to University of Mumbai)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Departure
event
Is queue
empty?
Eliminate departure
event from the
consideration
Compute delay of
customer entering service
and gather statistics
Schedule a departure
event for this customer
Return
(Autonomous College Affiliated to University of Mumbai)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Questions:
1. Name a few special purpose simulation languages and simulation packages?
simulating simulation
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No.: 6
Title: Implementation of Uniformity test
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.: 6
Aim: To implement Kolmogorov -Smirnov test or Chi-square test to perform uniformity test
of generated random numbers.
Resources needed: Turbo C / Java
Theory
Problem Statement:
Write function in C / C++ / java or macros in MS-excel to implement Kolmogorov-Smirnov
test or Chi-square test.
Concepts:
Random Numbers generated using a known process or algorithm is called Pseudo random
Number.The random numbers generates must possess the property of :
1. Uniformity
2. Independence
Uniformity :
If the interval (0, 1) is divided into n classes or subintervals of equal length , the expected
number of observations in each interval is N/n, where N is total number of observations.
Independence:
The probability of observing a value in a particular interval is independent of the previous
drawn value.
Each random number R must be an independent sample drawn from a continuous uniform
distribution between 0 & 1
i.e.p.d.f. is given by
f(x) = 1
0x1
0
otherwise
The expected value of each Ri is given by
E(R) = 1
1 0
0x dx = [x2/2 ] = 1/2
And variance is given by
1
2
V(R) = 0x dx = [x3/3 ] = 1/3 1/4 = 1/12
Tests for Random numbers
1) Uniformity Test
A basic test that is to be performed to validate a new generator is the test of uniformity. Two
different testing methods are available, they are
a. Kolmogorov- Smirnov Test
b. Chi-square Test
KJSCE/IT/BE/SEMVIII/SM/2015-16
Both of these measure the degree of agreement between distance of sample of generated
random numbers and the theoretical uniform distributions.
1) Kolmogorov-Smirnov Test: This test compares the continuous cdf F(x) of the uniform
distribution to the empirical cdf SN(x) of sample of N distribution
By definition,
F(x) = x
0x1
If the sample from random no. generated is R1, R2, ,RN then the empirical cdf SN(x) is
defined as
No. of R1, R2, ,RN which are x
SN(x) =
N
As N becomes larger SN(x) should become better approximation to F(x) provided the null
hypothesis is true.
The Kolmogorov-Smirnov distance test is best on largest absolute
deviation between F(x) & SN(x) over range of random variable.
OiEi
(0)2 =
=1
Ei
Procedure:
(Write the algorithm for the test to be implemented and follow the steps given below)
Steps:
Implement either Kolmogorov-Smirnov Test or Chi-square Test using C / C++ / java
or macros in MS-excel
Generate 5 sample sets (Each set consisting of 100 random numbers) of Pseudo
random numbers using Linear Congruential Method.
Execute the test using all the five sample sets of random numbers as input and using
=0.05.
Draw conclusions on the acceptance or rejection of the null hypothesis of
independence.
KJSCE/IT/BE/SEMVIII/SM/2015-16
Questions:
3. List down the pros and cons of the Kolmogorov - Smirnov test and Chi- Square test.
Outcomes:
Conclusion:
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
References:
Books/ Journals/ Websites:
1. "Linear Congruential Generators" by Joe Bolte, Wolfram Demonstrations Project.
2. Severance, Frank (2001). System Modeling and Simulation. John Wiley & Sons, Ltd.
p. 86. ISBN 0-471-49694-4.
3. The GNU C library's rand() in stdlib.h uses a simple (single state) linear congruential
generator only in case that the state is declared as 8 bytes. If the state is larger (an
array), the generator becomes an additive feedback generator and the period increases.
See the simplified code that reproduces the random sequence from this library.
4. "A collection of selected pseudorandom number generators with linear structures, K.
Entacher, 1997". Retrieved 16 June 2012.
5. "How Visual Basic Generates Pseudo-Random Numbers for the RND Function".
Microsoft Support. Microsoft. Retrieved 17 June 2011.
6. In spite of documentation on MSDN, RtlUniform uses LCG, and not Lehmer's
algorithm, implementations before Windows Vista are flawed, because the result of
multiplication is cut to 32 bits, before modulo is applied
7. GNU Scientific Library: Other random number generators
8. Novice Forth library
9. Matsumoto, Makoto, and Takuji Nishimura (1998) ACM Transactions on Modeling
and Computer Simulation
10. S.K. Park and K.W. Miller (1988). "Random Number Generators: Good Ones Are
Hard To Find". Communications of the ACM31 (10): 11921201.
doi:10.1145/63039.63042.
11. D. E. Knuth. The Art of Computer Programming, Volume 2: Seminumerical
Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89684-2. Section
3.2.1: The Linear Congruential Method, pp. 1026.
12. P. L'Ecuyer (1999). "Tables of Linear Congruential Generators of Different Sizes and
Good Lattice Structure". Mathematics of Computation68 (225): 249260.
doi:10.1090/S0025-5718-99-00996-5.
13. Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 7.1.1.
Some History", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New
York: Cambridge University Press, ISBN 978-0-521-88068-8
14. Gentle, James E., (2003). Random Number Generation and Monte Carlo Methods, 2nd
edition, Springer, ISBN 0-387-00178-6.
15. Joan Boyar (1989). "Inferring sequences produced by pseudo-random number
generators". Journal of the ACM36 (1): 129141. doi:10.1145/58562.59305. (in this
paper, efficient algorithms are given for inferring sequences produced by certain
pseudo-random number generators).
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No.: 7
Title: Implementation of Frequency test
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:7
Aim: To implement Autocorrelation test to perform frequency test for the generated
random numbers.
Resources needed: Turbo C / Java
Theory
Problem Statement:
Write function in C / C++ / java or macros in MS-excel to implement Autocorrelation test .
Concepts:
Random Numbers generated using a known process or algorithm is called Pseudo random
Number. The random numbers generates must possess the property of :
3. Uniformity
4. Independence
Uniformity :
If the interval (0, 1) is divided into n classes or subintervals of equal length , the expected
number of observations in each interval is N/n, where N is total number of observations.
Independence:
The probability of observing a value in a particular interval is independent of the previous
drawn value.
Each random number R must be an independent sample drawn from a continuous uniform
distribution between 0 & 1
i.e.p.d.f. is given by
f(x) = 1
0x1
1
otherwise
The expected value of each Ri is given by
E(R) = 1
1 0
0x dx = [x2/2 ] = 1/2
And variance is given by
1
2
V(R) = 0x dx = [x3/3 ] = 1/3 1/4 = 1/12
Tests for Independence:
These tests are done to check the independence of sequence of random numbers.
1)Runs Test
This test analyses an orderly grouping of numbers in a sequence to test the hypothesis of
independence
KJSCE/IT/BE/SEMVIII/SM/2015-16
2) Auto correlation Test: The test for auto correlation is concerned with dependence
between numbers in a sequence. The test computes auto correlation between every m
numbers starting with the ith number. Thus autocorrelation limit between following numbers
would be of interest.
Ri , Ri+m , Ri+2m , Ri+(M+1)m
where M is the largest integer such that i+(M+1)m N where N is total number of values in
the sequence.
Since the nonzero autocorrelation implies a lack of independence, the following test is
appropriate:
H 0 : im 0,
H 1 : im 0,
For large values of M, the distribution of the estimator of im, denoted im is approximately
normal,if the values Ri , Ri+m , Ri+2m , Ri+(M+1)m are uncorrelated.
The test statistics is
Z0
im
im
with a mean of 0 and variance of 1,under the assumption of independence , for large M.
If -Z/2 Z0 Z/2 , H0 is rejected for the significance level .
3)Gap Test: The gap test is used to determine the significance of the interval between
reoccurrence of the same digit. A gap of length x occurs between reoccurrence of same digit.
4)Poker Test: The poker test for independence is based on frequency with which certain
digits are repeated in a series of numbers in each case a pair of like digits appear in the
numbers that were generated. In 3 digit sample of numbers there are three possibilities which
are as follows:
i) The individual numbers can all be different
ii) The individual numbers can all be same
iii) There can be one pair of like digits.
Procedure:
(Write the algorithm for the Autocorrelation test and follow the steps given below)
Steps:
Implement Autocorrelation test using C / C++ / java or macros in MS-excel.
Generate 5 sample sets (Each set consisting of 100 random numbers) of random
numbers using random number generator developed in the first experiment.
Execute the test using all the five sample sets of random number as input and using
=0.05.
Draw conclusions on the acceptance or rejection of the null hypothesis of
independence.
KJSCE/IT/BE/SEMVIII/SM/2015-16
Questions:
1. Define the hypothesis for
a) Testing of Uniformity
b) Testing of Independence
Outcomes:
Conclusion:
KJSCE/IT/BE/SEMVIII/SM/2015-16
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No. 8
Title: Simulation of Cafeteria
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.:8
Aim: To Implement the model for Cafeteria using Extend Sim and estimate system
performance
.
Resources needed: Extend Sim 7
Theory
Problem Statement:
People arrive at a self-service cafeteria at the rate of one every 30 sec (Arrivals are Poisson
distributed). 40% got to sandwich counter, where one worker makes a sandwich in
approximately 60 sec. The rest go to the main counter; where one server spoons the prepared
meal onto a plate in approximately 45 sec. All the customers must pay a single cashier, which
takes approximately 25 sec., for all customers eating takes approximately 20 min. After
eating 10% of the people go back for dessert, spending an additional 10 min (approx)
altogether in the cafeteria. Simulate until 100 people have left the cafeteria, how many people
are left in the cafeteria and what are they doing at the time the simulation ends. Except for the
arrivals all the other data are exponentially distributed.
Model the problem as a queuing system.
Animate the model in 2D.
Run the simulation till 100 people have departed from the system.
Plot and verify the following results
Length of the queue against the number of jobs exited from the system.
Display how many people are in the system when the simulation ends and what they are
doing.
Concepts:
A basic Discrete Event Model
The most common Discrete Event Model involves the handling of one or more waiting lines
or queues, such as those found in supermarkets or factories.
Conceptual Model assumptions:
The Job Shop model represents a business operation where Jobs can be processed.
The assumptions for the model are:
The model runs until 100 customers are exited from the system
Arrival of the customer is Poisson distributed with mean 30.
All other service times are exponentially distributed with the specified means
The blocks come from the Item, Value, and Plotter libraries
KJSCE/IT/BE/SEMVIII/SM/2015-16
Procedure:
(Write the algorithm for the Autocorrelation test and follow the steps given below)
Steps:
Starting a model and setting simulation parameters
The following steps are typical when starting any discrete event model.
Open a new model worksheet
Give the command Run > Simulation Setup. In the Setup tab enter the simulation
parameters:
o Global time units: seconds
If they arent already open, open the Item, Plotter, and Value libraries
Place an Executive block (Item library) on the top left corner of the model worksheet
Open dialog of the Executive block ; control tab; select options;
o Stop Simulation: when count connector value>= ; enter 100.
The Executive block does event scheduling and manages discrete event simulations. It must
be present in every discrete event model.
Start small
In building any simulation model, it is easiest to start with a simple subset of the process and
add detail until you arrive at a completed model that approximates the system thats being
modelled. This allows you to test at various stages while making the model building process
more manageable.
The following table lists the blocks that will be added to the worksheet and their use in the
model.
Except for the Plotter block from the Plotter library and random number block from value
library, the blocks in the table are from the Item library.
Name (Label)
Block Function
KJSCE/IT/BE/SEMVIII/SM/2015-16
Activity block(Server)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Questions:
1. List down the benefits of using a special purpose package such as Extend Sim to
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No.: 9
Title: Simulation of Manufacturing System
Page No:
(Autonomous College Affiliated to University of Mumbai)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Batch:
Roll No.:
Experiment No.: 9
Aim: To Implement the model for Manufacturing System using Extend Sim and estimate
system performance
Theory
Problem Statement:
In a manufacturing unit three types of items (numbered as 1, 2, or 3 depending on the type
of item it will be) arrive on an assembly line exponentially with a mean 1.Out of these 25%
are type 1; 50% are type 2 and 25 % are type 3 respectively. At one step of the assembly
process, there are four machines. Two of the machines can work on all three types, but one
of the machines is old and can work on types 1 and 2, and the fourth machine can only
work on type 3. All the machines process one item at a time and take constant time of one
unit to process each item. Plot the utilization of each machine.
Model the problem as a queuing system.
Animate the model in 2D.
Run the simulation till 480 min I,e 8 hours.
Plot and verify the following results
Length of the queue against the number of jobs exited from the system.
Concepts:
A basic discrete event model
The most common discrete event model involves the handling of one or more waiting lines
or queues, such as those found in supermarkets or factories.
Conceptual Model assumptions:
The Job Shop model represents a business operation where Jobs can be processed.
The assumptions for the model are:
The model runs for a simulated time of 8 hours (480 minutes)
Arrival of the items is exponentially distributed with a mean of 1.
Processing times for jobs are constant (I unit each)
The blocks come from the Item, Value, and Plotter libraries
KJSCE/IT/BE/SEMVIII/SM/2015-16
Procedure:
Starting a model and setting simulation parameters
The following steps are typical when starting any discrete event model.
Open a new model worksheet
Give the command Run > Simulation Setup. In the Setup tab enter the simulation
parameters:
o End time: 480
o Global time units: minutes
If they arent already open, open the Item, Plotter, and Value libraries
Place an Executive block (Item library) on the top left corner of the model
worksheet
The Executive block does event scheduling and manages discrete event simulations. It must
be present in every discrete event model.
Start small
In building any simulation model, it is easiest to start with a simple subset of the process
and add detail until you arrive at a completed model that approximates the system thats
being modelled. This allows you to test at various stages while making the model building
process more manageable.
The following table lists the blocks that will be added to the worksheet and their use in the
model.
Except for the Plotter block from the Plotter library and random number block from value
library, the blocks in the table are from the Item library.
Name (Label)
Block Function
KJSCE/IT/BE/SEMVIII/SM/2015-16
Starting at the right of the Executive block, place the blocks on the model worksheet
in a line from left to right, based on their order in the table.
Label the blocks as the system entities.
Enter the dialog parameters and settings for each block
Make the connections
Run the simulation
(Autonomous College Affiliated to University of Mumbai)
KJSCE/IT/BE/SEMVIII/SM/2015-16
Questions:
1. Give the significance of Validation and verification in simulation?
Page No:
KJSCE/IT/BE/SEMVIII/SM/2015-16
Outcomes:
Conclusion:
Grade: AA / AB / BB / BC / CC / CD /DD
KJSCE/IT/BE/SEMVIII/SM/2015-16
Experiment No.: 10
Title: Case Study 2
Processor and Memory simulation using virtual lab.