Download presentation
Presentation is loading. Please wait.
Published byAshlee Peters Modified over 9 years ago
1
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state, event and function it only emphasizes objects and their relationship to one another
2
MODELING EXAMPLES Declarative Declaration models deemphasize the actual functions that causes state change. Contains two components states and events. We can take any action and break it into sub actions. Refer to past notes.
3
MODELING EXAMPLES Functional Focuses on functions that transform input into output while keeping track of state vector along the way. The two approaches of functional modeling are identified by function-based or variable- based.
4
Functional continue… When to used: 1. If problem is given in term of distinct physical objects which are connected in a direct order, use a functional model. (i) if objects are primarily functional in nature use functional-based approach (ii) if objects represent capacitance or storage use variable-based approach 2. If the problem involves material flow throughout the system. MODELING EXAMPLES
5
3.Y 2.Y 1.Y Examples Lines Customer Server Conceptual model MODELING EXAMPLES Time Customer Server transfer function Customer Time 3.Y 2.Y 1.Y Functional model
6
MECHANISMS FOR TIME ADVANCE One of the central functions of a simulation system described earlier is the simulation executive. The executive manages the passage of time and ‘steps’ the model into the future, executing the relevant logical relationships along the way. There are two basic approaches for controlling the time advance: Time slicing Next event
7
MECHANISMS FOR TIME ADVANCE Time Slicing With the time slicing approach advances the model forward in time at fixed intervals, e.g. every 5 seconds. The executive moves the model between the time intervals regardless of whether anything will happen.
8
MECHANISMS FOR TIME ADVANCE Next Event With next event the model is advanced to the time of the next significant event. Hence if nothing is going to happen for the next 3 minutes the executive will move the model forward 3 minutes in one go. The nature of the jumping between significant points in time means that in most cases the next event mechanism is more efficient and allows models to be evaluated more quickly.
9
Simulation software have graphical displays to show the user the changing status of machines (running, idle, etc.) and the movement of parts. Because the software jumps between significant points in time the jumps may be uneven with many jumps separated only by 5 seconds of simulated time followed by one or two jumps of 4 minutes say. The series of snap shots shown by the graphical displays can be misleading and machines may appear broken down for long periods of time when in fact this is not the case. Next Event disadvantages
10
Concepts in Discrete-Event Simulation Terms and explanation System : A collection of entities (e.g. people and machines) that interact together overtime to accomplish one or more goals.
11
Model : An Abstract representation of a system, usually containing Structural, logical, or mathematical relationships which describe a system in terms of state, entities and their attributes, sets, processes, events, activities, and delays. Concepts in Discrete-Event Simulation Terms and explanation
12
Concepts in Discrete-Event Simulation Terms and explanation System state: A collection of variables that contain all the information Necessary to describe the system at any time. Entity : Any object or component in the system which requires explicit representation in the model (e.e. a server, a customer, a machine ).
13
Concepts in Discrete-Event Simulation Terms and explanation Attributes : The properties of a given entity (e.g. the priority of waiting customer, the routing of a job through a job shop). List : A collection of (permanently or temporarily) associated entities, ordered in some logical fashion (such as all customers currently in waiting line, ordered by first come first serve or by priority)
14
Concepts in Discrete-Event Simulation Terms and explanation Events : An instantaneous occurrence that changes the state of a system (such as an arrival of a new customer). Event notice : A record of an event to occur at the current or some future time, along with any associated data necessary to execute the event; at a minimum, the record includes event type and time.
15
Concepts in Discrete-Event Simulation Terms and explanation Event list : A list of event notices for future events, ordered by time of occurrences; also known as the future event list (FEL) Activity : A duration of time specified length (e.g. a service time or inter-arrival time), which is known when it begins(although it may be defined in terms of a statistical distribution.
16
Concepts in Discrete-Event Simulation Terms and explanation Delay : A duration of time of unspecified indefinite length, which is not known until it ends ( e.g. a customer’s delay in a last-in, first-out waiting line which, when it begins, depends on future arrivals). Clock: A variable representing simulated time called CLOCK in the examples to follow.
17
MECHANISMS FOR DESCRIBING LOGIC There are a number of different ways of representing the logic within a discrete event simulation model. These approaches can be used for modeling the same systems and will (should!) result in the same results, the differences lie in the ease by which they can be understood and implemented and the efficiency of their computation. Three mechanisms will be briefly described followed by detailed explanation of one of them
18
MECHANISMS FOR DESCRIBING LOGIC The approaches are illustrated in Figure 3 are : Event Activity Process Figure 3. Ways of describing model logic
19
The event approach describes an event as an instantaneous change and such events are usually paired, e.g. start of machine loading, end of machine loading, etc. Activities describe a duration, e.g. machine loading, and are therefore very similar to pairs of events. The process approach joins collections of events or activities together to describe the life cycle of an entity, in this case a machine. MECHANISMS FOR DESCRIBING LOGIC
20
The event approach is easy to understand and computationally efficient but is more difficult to implement than the activity approach. On the other hand whilst activity approach is relatively easy to understand it suffers from poor execution efficiency. The process is less common and requires more planning to implement properly though is generally thought to be efficient. MECHANISMS FOR DESCRIBING LOGIC
21
Detail of the event execution structure The event approach is described in Figure 4. The diagram shows two essential elements: the clock and simulation executive. Here the simulation executive will use an ‘event list’ (a string of chronologically ordered events).
22
Figure 4. Detail of the event approach structure (from Kreutzer, 1986)Kreutzer, 1986
23
The executive is responsible for ordering the events. The executive removes the first event from the list and executes the relevant model logic. Any new events that occur as a result are inserted on the list at the appropriate point (e.g. a machine start load event would generate a machine end load event scheduled for several seconds time). The cycle is then repeated. Detail of the event execution structure
24
Each event on the event list has two key data items. The first item is the time of the event which allows it to be ordered on the event list. The second item is the reference to the model logic that needs to be executed. This allows the executive to execute the correct logic at the correct time. Note that more than one event may reference the same model logic, this means that the same logic is used many times during the life of the simulation run. Detail of the event execution structure
25
Example of the mechanism working. Figure 5 illustrates the next event mechanism. The rows show the advance of time for a simple model involving one machine (cycle time 5) feeding a buffer followed by another machine (cycle time 12) that removes parts from the buffer to process them. Parts arrive every 6. The units of time could be seconds, minutes, hours, etc. depending on the model
26
Figure 5. Passage of time in next event simulation
27
The model starts from the common starting point know as ‘empty and idle’; the all entities are idle and there are no parts in the system. The next most significant time is 6 when the first part arrives. The executive jumps straight to this time. When the first part arrives the first machine starts processing it. Example of the mechanism working.
28
At time 11 (5 later) the executive will cause the first machine to place its processed part in the buffer. Immediately the second machine takes the part and starts processing it. Note that events may occur at the same time, as well as there being significant times between events. The model unfolds over time with parts arriving, being processed on machine1 and placed in the buffer. As would be expected parts accumulate in the buffer since machine2 is slower. Detail of the event execution structure
29
For a graphical display the machines would be shown as icons changing color when running. According to a graphical display it would appear that machine2 is busier than machine one. If the figures for the busy time are added up for each machine (machine1 : 16 -vs.- machine2 : 13) it is apparent that machine1 was busier. This is one of problems noted before that can occur when the graphical displays of next event simulation are taken too literally. Example of the mechanism working.
30
The Grocery Shop Problem A simple intro to execution of simulation. A small grocery store has only one checkout counter. Customer arrive at this checkout counter at random from 1-8 minutes apart. Each possible value of inter-arrival time has the same probability of occurrence, as shown in Table 2.1 The service time vary from 1 to 6 minutes with probabilities shown in Table 2.0. The problem is to analyze the arrival and service of 20 customer.
31
The Grocery Shop Problem Arrival queue server Service node Departure Figure 6.0 Grocery shop service node diagram
32
The Grocery Shop Problem Event of single-channel queue consist of two events (i) unit-arrival event (ii) unit-complete event Arrival Event Server Busy ? Unit enters service Unit enters Queue for service
33
The Grocery Shop Problem Departure Event Another Unit waiting ? Begin server idle time Remove the waiting unit from the queue Begin servicing the unit YesNo
34
The Grocery Shop Problem Service Time (minutes) Probability Cumulative Probability Random- Digit Assignment 10.100.1001-10 20.200.3011-30 30.300.6031-60 40.250.8561-85 50.100.9586-95 60.051.0096-00 Table 2.0 Service Time Distribution
35
The Grocery Shop Problem Time between Arrivals (minutes) Probability Cumulative Probability Random- Digit Assignment 10.1250.125001-125 20.1250.250126-250 30.1250.375251-375 40.1250.500376-500 50.1250.625501-625 60.1250.750626-750 70.1250.875751-875 80.1251.000876-000 Table 2.1 Distribution of time between Arrival
36
The Grocery Shop Problem Customer Random digits Time between arrivals (minutes) Customer Random digits Time between arrivals (minutes) 1--111091 29138120931 37276136075 40151147386 59488153593 63093168888 79228171061 87537182122 92352194934 103023205355 Table 2.3 Time-Between-Arrivals Determination
37
The Grocery Shop Problem Customer Random digits Service time (minutes) Customer Random digits Service Time (minutes) 184411323 210112945 374413794 453314051 517215795 679416844 791517523 867418553 989519302 1038320503 Table 2.4 Services time generated
38
Findings from Grocery Shop Simulation Table 1. Average waiting time ( minutes ) = total time customer wait in queue (minutes) total numbers of customers = 56 20 = 2.8 2. Probability (wait) = Number of customers who wait total numbers of customers = 13 20 =0.65
39
Findings from Grocery Shop Simulation Table 3. Probability of idle server = total idle time of server (minutes) total run time of simulation = 18 86 = 0.21 4. Average service time (minutes) = Total service time (minutes) total numbers of customers = 68 20 =3.4 minutes
40
Findings from Grocery Shop Simulation Table 5. Expected Service time ( minutes ) E(s) = ∞ Σ sp(s) S=0 = 1(0.10)+2(0.20)+3(0.30)+4(0.25)+5(0.10)+ 6(0.05) =3.2 minutes 6. Average time between arrivals (minutes) = Sum of all times between arrival (minutes) Number of arrivals - 1 = 82 19 =4.3 minutes
41
Findings from Grocery Shop Simulation Table 7. Average waiting time of those who wait ( minutes ) = total time customer wait in queue (minutes) total numbers of customers who wait = 56 13 = 4.3 8. Average time customer spends in the system = total time customer spend in system (minutes) total numbers of customers = 124 20 =6.2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.