Uploaded by Aron Kipkoech

null

advertisement
SIMULATION 2020
Question 1
a) Define simulation and modeling(2mks)
 Simulation-simulation is the imitation of the operation of a real-world system over time.
 Modeling-model is a representation of a system for the purpose of studying the system.
b) Explain three purposes of simulation(6mks)
 Study of experiments with internal interactions
 To study model’s behavior of Informational, organizational, and environmental changes
 Knowledge from simulations can be used to improve the system
 Used to verify analytical results, e.g., queueing systems.
 Used as pedagogical device to reinforce the learning material.
 Gaining insight of the operation of the system
 Developing operating or resource policies to improve system performance
 Testing new system before implementation.
 Gaining information without disturbing the actual system.
c) Describe the usage of the following tools for developing a problem statement
i.
Fishbone chart(2mks)\
Enables the practitioner to concentrate on the most important sources or causes of the problem
ii.
Pareto chart(2mks)
The simulation practitioner can only focus his or her limited time on those few factors that would
be expected to have maximum benefit to the organization.
d) Distinguish between the following aspects
i.
Analytical solution vs simulation solution(4mks)
 Analytical solution- gives support to idea theoretically and in mathematical equation.
 Simulation solution- simulation analysis shows that idea is physically implementable or
not.
ii.
Deterministic models vs stochastic models(4mks)
 Deterministic models- Simulation models without random variables.
 Stochastic models- Simulation models with random variables.
e) Considering a discrete-event system of a one operator barbershop, outline three state variables of this
system(3mks)
i.
Status of the server i.e. either busy or idle
ii.
The number of the customers waiting in the queue to be served (if
any)
iii.
The time arrival of each customer waiting in the queue
Note:
Events in the system are
Arrival of customer
Customer’s departure
f)
Distinguish between next-event time advance and fixed-increment time advance approaches in discreteevent simulation models(3mks)
Next-event time advance
The simulation clock is initialized to zero and the time of occurrence of future events is determined. The
simulation clock is then advanced to the time of occurrence of the most imminent (first) of thes future
events.
Successive jumps of the simulation clock for the next-event time-advance approach are generally variable
(or unequal) in size.
Since all state changes occur only at event times for discrete-event simulation model, periods of inactivity
are skipped over by jumping the clock from event time to event time
Fixed event time advance
Does not skip over these inactive periods, which can eat up computer time.
g) Illustrate how a generator is implemented by SimPy to describe a process(4mks)
Question 2
a)
Discuss three advantages of simulation(6mks)
 Hypotheses about how or why a phenomenon occurs can be tested for feasibility
 Time can be compressed or expanded-Slow-down or Speed-up
 Insight can be obtained about the interaction of variables
 Insight can be obtained about the importance of variables to the performance of the system
 Simulation can help to understand how the system operates
b) Write a simple SimPy program that simulates a car parking for 5 time units after which it drives for 2 time
units then goes back to parking(8mks)
c) Demonstrate how the car environment in 2(b) can be used to create a process within SimPy
environment(3mks)
d) Suppose the process created in 2(c) is simulated for 20 time units. Give the output of the simulation(3mks)
Question 3
a)
Consider the following diagram showing a realization of a single server queuing system.
Suppose
this system is observed for a period of 8.4 seconds depicted by event e13. Calculate an estimate of the
average number of customers in the queue not being served(5mks)
Average number of customers not being served (q(n))
= Area under the Q(t) graph / duration of simulation
={((2.1-1.6) x 1) +((2.4-2.1) x 2) + ((3.1-2.4) x 1) + ((4.9-4) x 1) + ((5.8-5.6) x 1) + ((7.2-5.8) x 2) +
((8.4-7.2) x 3)} / 8.4 = (0.5 + 0.6 + 0.7 + 0.9 + 0.2 + 2.8 + 3.6) / 8.4 =9.3/8.4 =1.8107
b) Explain three advantages of modeling with general simulation languages(3mks)
 Standardized features often needed in modeling
 Shorter development cycle for each model
 Much assistance in model verification
 Very readable code
c) Define Monte Carlo Simulation(2mks)
 Monte Carlo simulation is a scheme employing random numbers, i.e., random variates,
 which is used for solving certain stochastic or deterministic problems where, the
passage, of time plays no substantive role.
 Monte Carlo simulations are generally static rather than dynamic.
d) Discuss pitfalls associated with carrying out a simulation project(10mks)
Question 4
a) Discuss components of a discrete-event simulation model(10mks)
b) A car-wash has a limited number of washing machines. It defines a washing processes that takes
some(random) time. Car processes arrive at the car-wash at a random time. If one washing machine is
available, they start the washing process and wait for it to finish. If not they wait until they can use one.
Write a program simulate this scenario(6mks)
c) Considering the simulation depicted in fig 1 calculate an estimate of the expected utilization of this server
during the simulation(4mks)
Download