1 / 183

System Simulation

System Simulation. Dr. Dessouky. Description. Simulation is a very powerful and widely used management science technique for the analysis and study of complex systems.

Télécharger la présentation

System Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. System Simulation Dr. Dessouky

  2. Description Simulation is a very powerful and widely used management science technique for the analysis and study of complex systems. Simulation may be defined as a technique that imitates the operation of a real-world system as it evolves over time. This is normally done by developing a simulation model. A simulation model usually takes the form of a set of assumptions about the operation of the system, expressed as mathematical or logical relations between the objects of interest in the system. Simulation has its advantages and disadvantages. We will focus our attention on simulation models and the simulation technique.

  3. Simulation • What is simulation: The process of designing a mathematical or logical model of a real-system and then conducting computer-based experiments with the model to describe, explain, and predict the behavior of the real system.

  4. Simulation • Where simulation fits in Programming Simulation Analysis Probability &Statistics Modeling

  5. Basic Terminology • In most simulation studies, we are concerned with the simulation of some system. • Thus, in order to model a system, we must understand the concept of a system. • Definition: A system is a collection of entities that act and interact toward the accomplishment of some logical end. • Systems generally tend to be dynamic – their status changes over time. To describe this status, we use the concept of the state of a system.

  6. Example Simulation Model • Ford - # of Panels per day (throughput) • Emergency Room – (beds, doctors, nurses), (minor, moderate, major, critical) • TRW – Ballistic Missile Survivability against Soviet Threat • Paramount Farms – Pistachio • Miami University Parking • HMT – Disks Throughput • Christopher Ranch – Garlic Capacity • Power Integration – Semiconductor Capacity, and random machine down times

  7. Value of Simulation • Empirical Method verses mathematical model • Allow you to calculate the extreme values not just the expected value

  8. Simulation • What is simulation • Simulation is the actual running of the model system to gain insight into its performance.

  9. Simulation • Why use simulation • Simulation is used to better understand the expected performance of the real system and to test the effectiveness of the system design.

  10. Simulation • Why use simulation • Without building them • experimental system • new concepts • Without disturbing them • costly experimentation • unsafe experimentation. • Without destroying them • Determine limits of stress

  11. Queuing systems • Performance measures (output) • Data requirements (input) • Uses of model • Kendall’s notation

  12. Queuing systems • System Performance measures (outputs) • Expected number of customers in system • Expected number of customers in queue • Expected time in system • Expected time in queue • Server utilization • Probability of n customers in system • Throughput

  13. Queuing systems • Data requirements (Inputs) • Interarrival time distribution • Service time distribution • Number of servers • Queue discipline • System capacity • Size of input population • Kendall’s notation (M/M/s/FCFS/K/M)

  14. Alternative to simulation • Simulation • Analytic models • Physical experimentation • Visit other sites

  15. Simulation vs. analytic modeling • Advantage: • various performance measures • greater realism • easier to understand • model the steady-state as well as the transit behavior. • Disadvantage: • May not provide you with the optimal solution • time to construct model will be longer.

  16. Simulation vs. Physical • Advantage: • High Speed • Not disruptive • Replication easy • Control variations • Generally less costly • Disadvantage: • Realism • Validity

  17. Realism Cost V V A A S S P P Simulation vs. Alternatives V A

  18. Representing system • System: • a collection of mutually interacting objects designed to accomplish a goal (machines repair system) • Entities: • denotes an element/object within boundary of system (machines, operators, repairman) • Entity – work being performed on object • Resource – performing the work

  19. Representing system • Attribute: • Characteristic or property or an entity (machine ID, Type of breakdown, time that machine went down) • Activity: • transforms the state of an object usually over some time (repairman service time, machine run time)

  20. Representing system • State of the system: • Numeric values that contain all the information necessary to describe the system at any time. • Delays: • Processes that take a conditional length of time in the system

  21. Representing system • Events: • Change the state of the system(end of service of machine,machine breaks down) • Queue: • it is set, used to model waiting

  22. Ex. Elevator systems • Entities • Elevators, people • Sets • People waiting at each floor • Attributes • Elevators – capacity, speed, destination, current location of each elevator • People – inter-arrival time at each floor, destination of each people

  23. Ex. Elevator systems • State of system: • # of people on each elevator • # of people in each floor • Activities • Load/Unloading passenger • Travel to next floor (speed and distance) • Persons travel to elevator

  24. Ex. Elevator systems • Delays: • Persons waiting for elevator • Events: • Elevator arrival • End unloading • End Loading • Person Arrival

  25. Static Simulation vs. Dynamic Simulation • There are two types of simulation models, static and dynamic. • Definition: A static simulation model is a representation of a system at a particular point in time. • We usually refer to a static simulation as a Monte Carlo simulation.

  26. Static Simulation vs. Dynamic Simulation • Definition: A dynamic simulation is a representation of a system as it evolves over time. • Within these two classifications, a simulation may be deterministic or stochastic. • A deterministic simulation model is one that contains no random variables; a stochastic simulation model contains one or more random variables.

  27. Discrete Event vs. Continuous Event Simulation • Discrete event: • state of system changes only at discrete points in time(events) • ex. Machine repair problem • Programming • Look at system only when events occur; time is advanced from event to event.

  28. Discrete Event vs. Continuous Event Simulation • Continuous event: • state of system changes continuously over time • Ex. Level of fluid in tank • Programming: • Advances time in small intervals. Use differential equations to represent flows.

  29. An Example of a Discrete-Event Simulation • To simulate a queuing system, we first have to describe it. • We assume arrivals are drawn from an infinite calling population. • There is unlimited waiting room capacity, and customers will be serve in the order of their arrival (FCFS). • Arrivals occur one at a time in a random fashion. • All arrivals are eventually served with the distribution of service teams as shown in the book.

  30. Service times are also assumed to be random. After service, all customers return to the calling population. • For this example, we use the following variables to define the state of the system: (1) the number of customers in the system; (2) the status of the server – that is, whether the server is busy or idle; and (3)the time of the next arrival. • An event is defined as a situation that causes the state of the system to change instantaneously.

  31. All the information about them is maintained in a list called the event list. • Time in a simulation is maintained using a variable called the clock time. • We begin this simulation with an empty system and arbitrarily assume that our first event, an arrival, takes place at clock time 0. • Next we schedule the departure time of the first customer. Departure time = clock time now + generated service time

  32. Also, we now schedule the next arrival into the system by randomly generating an interarrival time from the interarrival time distribution and setting the arrival time as Arrival time = clock time now + generated interarrival time • Both these events are their scheduled times are maintained on the event list. • This approach of simulation is called the next-event time-advance mechanism, because of the way the clock time is updated. We advance the simulation clock to the time of the most imminent event.

  33. As we move from event to event, we carry out the appropriate actions for each event, including any scheduling of future events. • The jump to the next event in the next-event mechanism may be a large one or a small one; that is, the jumps in this method are variable in size. • We contrast this approach with the fixed-increment time-advance method. • With this method, we advance the simulation clock in increments of Δt time units, where Δt is some appropriate time unit, usually 1 time unit.

  34. For most models, however, the next event mechanism tends to be more efficient computationally. • Consequently, we use only the next-event approach for the development of the models for the rest of the chapter. • To demonstrate the simulation model, we need to define several variables: • TM = clock time of the simulation • AT = scheduled time of the next arrival

  35. DT = scheduled time of the next departure • SS = status of the server (1=busy, 0=idle) • WL = length of the waiting line • MX = length (in time units) of a simulation run • We now begin the simulation by initializing all the variables. This simple example illustrates some of the basic concepts in simulation and the way in which simulation can be used to analyze a particular problem.

  36. World View – The Structure concepts and views under which the simulation is guided for the development of the simulation model • Event Orientation – defines the changes in state that occur at each event time • Process Orientation – describes the process through which the entities in the system flow • Activity Scanning Orientation – describes the activities in which the entities in the system engage

  37. Discrete Event Simulation • Event scheduling • Write modules that describe changes in the state of the system at each event • Main program advances time • One subprogram for each event • General purpose programming language

  38. Discrete Event Simulation • Process interaction • Write modules that describe the progress of entities through the system • As entities move the systems changes state • Entities are held to represent activities and delays • Promodel programming language

  39. Event scheduling • Time is advanced from event to event • Future events list – ordered list of upcoming events • As events are scheduled, they are added to the list • As events occur they are removed from list • Activities in event ( one / event type)

  40. Event scheduling • List is required to keep track of entities in a set • Statistics – Two types • Sample statistics – average of some values (W) • W = (W1 +W2 + …+Wn)/n = Total Wait / # of wait • Time average statistics – time weighted (L) • L = (0(t1) + 1(t2-t1) + 2(t3-t2) + 1(t4-t3)) / t4

  41. Activity scanning • Activity scanning • Time is modeled in fixed time increments to check if activity occurred • Small time increments is inefficient • Large time increments may miss activity • describes the activities in which the entities in the system engage.

  42. Process Oriented • Process oriented: • Many simulation models include elements which occur in defined patterns • The logic associated with such a system or events can be generalized and defined by a single statement • A simulation language could then translate such statement into the appropriate sequence of events • describes the processes through which the entities in the system flow.

  43. Process Oriented • Process oriented: • These statements, define a sequence of events which are automatically executed by the simulation language as the entities move through the process • Create arrival entities every t time units • However, since we are normally restricted to a set of standardized statement, provided by the simulation language, our model flexibility is not as great as with the event condition

  44. Feature provided by a language • Conceptual framework(entities, attributes, resource, queues) • Maintenance of event list • Random variable generation • Animation • Debugging function • Output analysis • Input analysis • Report generation

  45. Simulation Languages • One of the most important aspects of a simulation study is the computer programming. • Several special-purpose computer simulation languages have been developed to simplify programming. • The best known and most readily available simulation languages, including GPSS, GASP IV and SLAM. • Most simulation languages use one of two different modeling approaches or orientations; event scheduling or process interaction.

  46. GPSS uses the process-interaction approach. • SLAM allows the modeler to use either approach or even a mixture of the two, whichever is the most appropriate for the model being analyzed. • Of the general-purpose languages, FORTRAN is the most commonly used in simulation. • In fact, several simulation languages, including GASP IV and SLAM, use a FORTRAN base.

  47. To use GASP IV we must provide a main program, an initialization routine, and the event routines. • For the rest of the program, we use the GASP routines. • Because of these prewritten routines, GASP IV provides a great deal of programming flexibility. • GPSS, in contrast to GASP, is a highly structured special-purpose language. • GPSS does not require writing a program in the usual sense.

  48. Building a GPSS model then consist of combining these sets of blocks into a flow diagram so that it represents the path an entity takes as it passes through the system. • SLAM was developed by Pritsket and Pegden (1979). It allows us to develop simulation model as network models, discrete-event models, continuous models, or any combination of these.

  49. The decision of which language to use is one of the most important that a modeler or an analyst must make in performing a simulation study. • The simulation language offer several advantages. • The most important of these is that the special-purpose languages provide a natural framework for simulation modeling and most of the features needed in programming a simulation model.

  50. The Simulation Modeling Steps • We now discuss the process for a complete simulation study and present a systematic approach of carrying out a simulation. • A simulation study normally consists of several distinct stages. (See Figure in the book) • However, not all simulation studies consist of all these stages or follow the order stated here. • On the other hand, there may even be considerable overlap between some of these stages.

More Related