modeling and simulation (an...

26
1 Modeling and Simulation (An Introduction)

Upload: others

Post on 31-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

1

Modeling and Simulation

(An Introduction)

Page 2: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

The Nature of Simulation

2

Conceptions

Application areas

Impediments

Page 3: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Conceptions

3

Simulation course is about techniques for using computers to

imitate or simulate the operations of various kinds of real world

facilities or processes.

A simulation is the imitation of the operation of a real-world

process or system over time. Steps include

Generating an artificial history of a system

Observing the behavior of that artificial history

Drawing inferences concerning the operating characteristics of

the real system

Page 4: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Conceptions

4

Use the operation of a bank as an example:

Counting how many people come to the bank; how many tellers,

how long each customer is in service; etc.

Establishing a model and its corresponding computer program.

Executing the program, varying parameters (number of tellers,

service time, arrival intervals) and observing the behavior of the

system.

Drawing conclusions: increasing number of tellers; reducing

service time; changing queuing strategies; etc.

Page 5: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Conceptions

5

The behavior of a system as it evolves over time is studied by

developing a simulation model.

A model is a set of entities and the relationship among them. For the

bank example: entities would include customers, tellers, and

queues. Relations would include customers entering a queue; tellers

serving the customer; customers leaving the bank.

Once developed, a model has to be validated. There are many

different ways to validate a model: observation (measurement);

analytical model comparison (analysis).

Page 6: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Application areas

6

Designing and analyzing manufacturing systems

evaluating military weapons systems or their logistics requirements

determining hardware requirements or protocols for

communication networks

Determining hardware and software requirements for a computer

system

Designing and operating transportation systems such as airports,

freeways, ports and subways

Page 7: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Application areas

7

Evaluating designs for service organizations such as call centers, fast-

food restaurants, hospitals, and post offices.

Reengineering of business processes

Determining ordering polices for an inventory system

Analyzing financial or economic systems.

Page 8: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Impediments

8

Models used to study large-scale systems tend to be very

complex, and writing computer programs to execute them can

be an arduous task indeed. (excellent software products)

Large amount of computer time is sometimes required. (cheaper

and faster computer)

An unfortunate impression that simulation is just an exercise in

computer programming, albeit a complicated one. (attitude,

simulation methodology)

Page 9: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Systems, Models & Simulation

9

System is defined to be a collection of entities, e.g., people or

machines, which act and interact together toward the

accomplishment of some logical end.

System depends on the objectives of a particular study.

State of a system: collection of variables necessary to describe a

system at a particular time, relative to the objectives of a study. (the

number of busy tellers, the number of customers in the bank, the time of

arrival of each customer in the bank)

Types of systems:

Discrete and continuous.

Page 10: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Continue...

10

discrete system: the state variables change instantaneously at separated points in time.

(a bank, e.g., the number of customers in the bank)

continuous system: the state variables change continuously with respect to time. (an

airplane moving through the air, e.g., position and velocity )

• Many systems are partly discrete, partly continuous

Study on a system: try to gain some insight into the relationships

among various components, or to predict performance under some

new conditions being considered.

Ways to study a system:

Page 11: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,
Page 12: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Example

12

One study on a bank to determine the number of tellers needed to

provide adequate service for customers who want just to cash a

check or make a savings deposite, the system can be defined to be

that portion of the bank consisting of the tellers and the customers

waiting in line or being served.

If the loan officer and the safety deposite boxes are to be included,

the definition of the system must be expanded in an obvious way.

Page 13: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Systems, Models & Simulation

13

• Classification of simulation models

– Static vs. dynamic

– Deterministic vs. stochastic

– Continuous vs. discrete

• Most operational models are dynamic, stochastic, and

discrete – will be called discrete-event simulation models

Page 14: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Types of Simulation

Page 15: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Model Classifications

15

deterministic (input and output variables are fixed);

stochastic (at least one of the input or output variables is

probabilistic);

static (time is not taken into account);

dynamic (time-varying interactions among variables are

taken into account).

Page 16: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

System Terminology:

16

State: A variable characterizing an attribute in the system such as level of stock

in inventory or number of jobs waiting for processing

Event: An occurrence at a point in time which may change the state of the

system, such as arrival of a customer or start of work on a job.

Page 17: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

System Terminology:

17

Entity: An object that passes through the system, such as cars in an intersection

or orders in a factory. Often an event (e.g., arrival) is associated with an

entity (e.g., customer).

Queue: A queue is not only a physical queue of people, it can also be a task list, a

buffer of finished goods waiting for transportation or any place where

entities are waiting for something to happen for any reason.

Page 18: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

System Terminology:

18

Creating: Creating is causing an arrival of a new entity to the system at some point

in time.

Scheduling:

Scheduling is the act of assigning a new future event to an existing entity.

Page 19: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

System Terminology:

19

Random Variable: is a quantity that is uncertain, such as interarrival time between two

incoming flights or number of defective parts in a shipment.

Random Variate:

is an artificially generated random variable.

Page 20: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

System Terminology:

20

Distribution: is the mathematical law which governs the probabilistic features of a

random variable.

Page 21: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Example:

21

Building a simulation gas station with a single pump served

by a single service man assume that the arrival of cars as well as their service times are random

Page 22: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Solution (1):

22

At first identify the:

states

events

entities

queue

random realizations

distributions

Page 23: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Solution (1):

23

after identification of the different system requirements, you will come up with the different values:

states:

o Number of cars waiting for service, number of cars served at any moment

events:

o Number of cars, start of service, end of service

entities:

o cars

Page 24: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Solution (1):

24

queue

o The queue of cars in front of the pump, waiting for

services

random realizations:

o inter-arrival times, service times

distributions:

o assume exponential distribution for both inter-arrival

time and service time

Page 25: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Solution (2): Arrival Routine

25

Page 26: Modeling and Simulation (An Introduction)cs6.yolasite.com/resources/Modeling_and_Simulation__1.pdf · Systems, Models & Simulation 9 System is defined to be a collection of entities,

Solution (2): Departure Routine

26