* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download PPT file printable
Theoretical ecology wikipedia , lookup
Numerical weather prediction wikipedia , lookup
Computational fluid dynamics wikipedia , lookup
History of numerical weather prediction wikipedia , lookup
Molecular dynamics wikipedia , lookup
General circulation model wikipedia , lookup
Agent-based model wikipedia , lookup
Military simulation wikipedia , lookup
Live, virtual, and constructive wikipedia , lookup
Multi-state modeling of biomolecules wikipedia , lookup
Simulation Waiting Line Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that it preserves some defining components of the entity the relations between these components that are of current interest. 2 Introduction Definition (more formal) A model is a construct invented as an aid to understand the system under study. A model is a formal statement of: assumptions conceptualizations experimental design 3 The purpose of a model to help understand, describe, or predict how things work in the real world by exploring a simplified representation of a particular entity or phenomenon. 4 Examples of models a city map, a house floor plan, a photo of a house, an equation, a square, etc. 5 Types of models Static - a snapshot of the object/system at a particular time Dynamic - model of changes in the object/system Continuous Discrete - changes occur at some time intervals 6 Computational models Simulate a set of processes observed in the natural world in order to gain an understanding of these processes and to predict the outcome of natural processes given a specific set of input parameters. Conceptual and theoretical modeling constructs are expressed as sets of algorithms and implemented as software packages. 7 Simulation An experiment performed on a model Experiment: observing and studying the behavior of a system Reasons for using simulation as a problemsolving tool. The physical system is not available. The experiment may be dangerous. The cost of experimentation is too high. 8 Discrete simulation Components Entities: objects that interact Attributes: properties of entities Activities: processes that change the system Events: occurrence of activities Statistics: measures of the performance of the system 9 Approaches Time driven Event driven 10 Time driven discrete simulation Initialize time initialTime While time < stopTime • Execute all events to be done at this time • Increment time Output measures 11 Event driven discrete simulation Initialize time initialTime While more events to be done • Advance time to the time of the earliest event • Execute the earliest event Output measures 12 Waiting line simulation Objects Waiting Line Service providers (Cashiers) Clock 13 Waiting Line Attributes: Input probability of arrival line capacity processing time Output average waiting time number of transactions maximum length of the waiting line unprocessed requests due to exceeding the line capacity 14 Waiting Line Events: Arrival: record time in queue increment line length Exit line: record waiting time: now – arrival increment transactions decrement line length 15 Cashiers (service providers) Attributes: Input Number of cashiers Output Status of each cashier Idle Busy, remaining processing time Total idle time per cashier 16 Cashiers (service providers) Events: Get a customer to be served Assign an available cashier to a customer Update cashier status If idle, increment idle time If busy, decrement processing time 17 Clock Records the time in increments of 1 Returns time 18 Simulator Initialize Simulation time Processing time Probability of arrival Line capacity Number of cashiers S PT P L C Attributes: Current time elapsed, init 0 Available cashier CT 19 Algorithm While CT (current time elapsed) is less than S (simulation time) Record arrival with probability P If available cashier and line not empty exit line assign cashier to do the service Update cashiers’ status Increment CT Prepare report 20 Reports average waiting time number of transactions maximum length of line average idle time maximum idle time 21