+ All Categories
Home > Documents > Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of...

Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of...

Date post: 21-Dec-2015
Category:
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
21
Simulation Waiting Line
Transcript

Simulation

Waiting Line

2

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.

3

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

4

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.

5

Examples of models

a city map, a house floor plan, a photo of a house, an equation, a square, etc.

6

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

7

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.

8

Simulation

An experiment performed on a model Experiment: observing and studying the

behavior of a system Reasons for using simulation as a problem-

solving tool. The physical system is not available. The experiment may be dangerous. The cost of experimentation is too high.

9

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

10

Approaches

Time driven Event driven

11

Time driven discrete simulation

Initialize time initialTimeWhile time < stopTime

• Execute all events to be done at this time

• Increment time Output measures

12

Event driven discrete simulation

Initialize time initialTimeWhile more events to be done

• Advance time to the time of the earliest event

• Execute the earliest eventOutput measures

13

Waiting line simulation

Objects

Waiting Line Waiting Line Service providers (Cashiers)Service providers (Cashiers) ClockClock

14

Waiting LineWaiting 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

15

Waiting LineWaiting Line Events: Arrival:

record time in queue increment line length

Exit line: record waiting time: now – arrival increment transactions decrement line length

16

Cashiers (service providers)

Attributes: Input

Number of cashiers Output

Status of each cashier Idle Busy, remaining processing time

Total idle time per cashier

17

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

18

Clock

Records the time in increments of 1Returns time

19

Simulator

Initialize Simulation time S Processing time PT Probability of arrival P Line capacity L Number of cashiers C

Attributes: Current time elapsed, init 0 CT Available cashier

20

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

21

Reports

average waiting time number of transactions maximum length of line average idle time maximum idle time


Recommended