A model is a representation of a system for the purpose of the system.
The way we can study a system.
· Static Vs Dynamic
· Deterministic Vs Stochastic
· Continuous Vs Discrete
Note: We have to Think at the top level of any system before start simulation.
Discrete Event Simulation: The state variables change instantaneously at separate point of time.
Time advance Mechanism:
· Next-event Time advance
· Fixed-increment Time advance
We consider the next event time advance approach for the single server queuing system.
ti = time of arrival of the ith client
Ai = ti - ti-1 = inter-arrival time between (i-1) th and ith arrival of client
Si = the actual time server spends serving ith client
Di = Delay in the queue of ith client (wastage of time)
Ci = ti + Di + Si = Time the ith client complete service and departs
ei = time of occurrence of ith event of any type (e0 =0)
· System State: The collection of state variables necessary for to describe the system at the particular time.
· Simulation Clock: A variable which will give us current value of simulation time.
· Event List: A list containing the next time when each type of event will occur.
· Statistical Counter: Variables use for starring or recording statistical information of the system performance.
· Initialization Routine: A sub program to initialize the simulation model at time Zero 0.
· Timing Routine: A sub program that determines the next event from the event list and then advance the simulation clock to the time when that event is to occur.
· Event Routine: A sub program that update the system state when a particular type of event occurs. (there is one event routine for each event type)
· Library Routine: A set of Sub program that used to generate random observation from probability distributions that were determined as part of simulation model.
· Report Generator: A Sub program that computes estimates (from the Statistical counters) of the desired measures of performance and produce a report when the simulation ends.
· Main Program: A Sub program that invoke the timing routine to determine the next event and then transfer control to the corresponding event routine to update the system state appropriately. The main program may also check for termination & invoke the report generator when the simulation is over.
Problem-1:
You have only one checkout counter
Customer arrives at this checkout counter at random from 1 to 8. Each possible value of inter arrival time has the same probability of occurrence as shown in the Table 1.
The service time varies from 1 to 6 minutes with the probabilities shown in Table 2.
The problem is to analyze the system by simulating the arrival and service of 20 customer.
Random value for time between arrivals- 913,727,015,948,309,922,753,235,302,109,093,607,738,359,888,106,212,493,535
Random value for service time- 84,10,74,53,17,79,91,67,89,38,32,94,79,05,79,84,52,55,30,50
1. Average Inter Arrival Time: 82/20 = 4.10
2. Average Arrival Time: 892/20 = 44.60
3. Average Service Time: 67/20 = 3.35
4. Average Waiting Time: 51/20 = 2.55
5. Average Time Customer spend in the System: 118/20 = 5.90
6. Average Number of customers in the queue or, Probability of Customers in the Queue: 12/20 = 0.60 or 60%
7. Probability of Idle Server: 18/85 = 0.21 or 21%
8. Utilization of Server [(End Time - Idle Time)/End Time]: (85 - 18)/85 = 0.79 or 79%
So, the utilization of the server is 79% and average waiting customer in the system is 2.55 min. The system needs to maintain two servers to minimize the average waiting time of the customer.
1. Consider a Clothing store cash counter
2. For the following data (time in minutes) simulate the system and answer the following question. Assume the first customer arrives at time t=0.
3. Calculate the average delay in queue
4. Calculate utilization of the server.