66
OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications of Simulation Modeling Simulation with Arena, 3 rd ed. Chapter 1 – What Is Simulation? Slide 1 of 23

OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Embed Size (px)

Citation preview

Page 1: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

OUTLINE

• Basic Concepts in Modeling and Simulation

• Building Simulation Models

• Verification and Validation

• Designing Experiments

• Output Analysis

• Applications of Simulation Modeling

Simulation with Arena, 3rd ed. Chapter 1 – What Is Simulation?

Slide 1 of 23

Page 2: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Simulation Modeling and Analysis – Chapter 1 – Basic Simulation Modeling

Slide 2 of 51

SIMULATION

Imitate the operations of a facility or process, usually via computer

What’s being simulated is the system To study system, often make

assumptions/approximations, both logical and mathematical, about how it works

These assumptions form a model of the system If model structure is simple enough, could use

mathematical methods to get exact information on questions of interest — analytical solution

Page 3: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Ways to Study Systems

– Simulation is “method of last resort?” Maybe …

– But with simulation there’s no need (or less need) to “look where the light is”

Page 4: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 4 of 23

Work With the System?

–Advantage — unquestionably looking at the right thing

But it’s often impossible to do so in reality with the actual system–System doesn’t exist–Would be disruptive, expensive, or dangerous

Page 5: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 5 of 23

Computer Simulation

• Methods and applications to imitate or mimic real systems usually via computer.

• No longer regarded as the approach of “last resort”.

• Today, it is viewed as an indispensable problem-solving methodology for engineers, designers, and managers.

• Can be used to study simple models but should not use it if an analytical solution is available

• Real power of simulation is in studying complex models

Page 6: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 6 of 23

Applications of Simulation

• Applies in many fields and industries– Manufacturing facility– Bank operation– Airport operations (passengers, security, planes, crews, baggage)– Transportation/logistics/distribution operation– Hospital facilities (emergency room, operating room, admissions)– Computer network– Freeway system– Business process (insurance office)– Criminal justice system– Chemical plant– Fast-food restaurant– Supermarket– Theme park– Emergency-response system

Page 7: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 7 of 23

Advantages of Simulation

• Flexibility to model things as they are (even if messy and complicated) - Allows uncertainty, nonstationarity in modeling

• New policies, operating procedures can be explored without disrupting ongoing operation of the real system.

• New hardware designs, physical layouts, transportation systems can be tested without committing resources for their acquisition.

• Time can be compressed or expanded to allow for a speed-up or slow-down of the phenomenon

• Advances in simulation software, computing and information technology are all increasing popularity of simulation

Page 8: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 8 of 23

The Bad News

• Don’t get exact answers, only approximations, estimates

• Model building requires special training.

• Simulation modeling and analysis can be time consuming and expensive.

• Simulation results can be difficult to interpret.

• Get random output (RIRO) from stochastic simulations Statistical design, analysis of simulation experiments

Page 9: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

SIMULATION vs. OPTIMIZATIONSIMULATION vs. OPTIMIZATIONIn an In an optimization modeloptimization model, the values of the , the values of the decision variables are decision variables are outputsoutputs that will that will maximize (or minimize) the value of the maximize (or minimize) the value of the objective function.objective function. InIn a a simulation modelsimulation model, the values of the , the values of the decision variables decision variables (controllable ones) (controllable ones) are are inputsinputs. The model evaluates the objective . The model evaluates the objective function for a particular set of valuesfunction for a particular set of values and and provides various performance measuresprovides various performance measures.. RIRO (Random input Random Output)RIRO (Random input Random Output)

Page 10: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Simulation Simulation Model TaxonomyModel Taxonomy

Page 11: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 11 of 46 Simulation with Arena, 3rd ed.

The System:A Simple Processing System

ArrivingBlank Parts

DepartingFinished Parts

Machine(Server)

Queue (FIFO) Part in Service

4567

• General intent: Estimate expected production Waiting time in queue, queue length, proportion of time

machine is busy

• Time units Can use different units in different places … must declare Be careful to check the units when specifying inputs Declare base time units for internal calculations, outputs Be reasonable (interpretation, roundoff error)

Page 12: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 12 of 46 Simulation with Arena, 3rd ed.

Model Specifics

• Initially (time 0) empty and idle• Base time units: minutes• Input data (assume given for now …), in minutes:

Part Number Arrival Time Interarrival Time Service Time1 0.00 1.73 2.902 1.73 1.35 1.763 3.08 0.71 3.394 3.79 0.62 4.525 4.41 14.28 4.466 18.69 0.70 4.367 19.39 15.52 2.078 34.91 3.15 3.369 38.06 1.76 2.37

10 39.82 1.00 5.3811 40.82 . .

. . . .

. . . .

• Stop when 20 minutes of (simulated) time have passed

Page 13: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 13 of 46 Simulation with Arena, 3rd ed.

System

Clock

B(t)

Q(t)

Arrival times of custs. in queue

Event calendar

Number of completed waiting times in queue

Total of waiting times in queue

Area under Q(t)

Area under B(t)

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand:Setup

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

Page 14: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 14 of 46 Simulation with Arena, 3rd ed.

System

Clock 0.00

B(t) 0

Q(t) 0

Arrival times of custs. in queue

<empty>

Event calendar [1, 0.00, Arr] [–, 20.00, End]

Number of completed waiting times in queue 0

Total of waiting times in queue 0.00

Area under Q(t) 0.00

Area under B(t) 0.00

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand:t = 0.00, Initialize

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

Page 15: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 15 of 46 Simulation with Arena, 3rd ed.

System

Clock 0.00

B(t) 1

Q(t) 0

Arrival times of custs. in queue

<empty>

Event calendar [2, 1.73, Arr] [1, 2.90, Dep] [–, 20.00, End]

Number of completed waiting times in queue 1

Total of waiting times in queue 0.00

Area under Q(t) 0.00

Area under B(t) 0.00

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 0.00, Arrival of Part 1

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

1

Page 16: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 16 of 46 Simulation with Arena, 3rd ed.

System

Clock 1.73

B(t) 1

Q(t) 1

Arrival times of custs. in queue

(1.73)

Event calendar [1, 2.90, Dep] [3, 3.08, Arr] [–, 20.00, End]

Number of completed waiting times in queue 1

Total of waiting times in queue 0.00

Area under Q(t) 0.00

Area under B(t) 1.73

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 1.73, Arrival of Part 2

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

12

Page 17: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 17 of 46 Simulation with Arena, 3rd ed.

System

Clock 2.90

B(t) 1

Q(t) 0

Arrival times of custs. in queue

<empty>

Event calendar [3, 3.08, Arr] [2, 4.66, Dep] [–, 20.00, End]

Number of completed waiting times in queue 2

Total of waiting times in queue 1.17

Area under Q(t) 1.17

Area under B(t) 2.90

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 2.90, Departure of Part 1

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

2

Page 18: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 18 of 46 Simulation with Arena, 3rd ed.

System

Clock 3.08

B(t) 1

Q(t) 1

Arrival times of custs. in queue

(3.08)

Event calendar [4, 3.79, Arr] [2, 4.66, Dep] [–, 20.00, End]

Number of completed waiting times in queue 2

Total of waiting times in queue 1.17

Area under Q(t) 1.17

Area under B(t) 3.08

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 3.08, Arrival of Part 3

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

23

Page 19: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 19 of 46 Simulation with Arena, 3rd ed.

System

Clock 3.79

B(t) 1

Q(t) 2

Arrival times of custs. in queue

(3.79, 3.08)

Event calendar [5, 4.41, Arr] [2, 4.66, Dep] [–, 20.00, End]

Number of completed waiting times in queue 2

Total of waiting times in queue 1.17

Area under Q(t) 1.88

Area under B(t) 3.79

Q(t) graph B(t) graph

Time (Minutes) Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 3.79, Arrival of Part 4

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

234

Page 20: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 20 of 46 Simulation with Arena, 3rd ed.

System

Clock 4.41

B(t) 1

Q(t) 3

Arrival times of custs. in queue

(4.41, 3.79, 3.08)

Event calendar [2, 4.66, Dep] [6, 18.69, Arr] [–, 20.00, End]

Number of completed waiting times in queue 2

Total of waiting times in queue 1.17

Area under Q(t) 3.12

Area under B(t) 4.41

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 4.41, Arrival of Part 5

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

2345

Page 21: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 21 of 46 Simulation with Arena, 3rd ed.

System

Clock 4.66

B(t) 1

Q(t) 2

Arrival times of custs. in queue

(4.41, 3.79)

Event calendar [3, 8.05, Dep] [6, 18.69, Arr] [–, 20.00, End]

Number of completed waiting times in queue 3

Total of waiting times in queue 2.75

Area under Q(t) 3.87

Area under B(t) 4.66

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 4.66, Departure of Part 2

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

345

Page 22: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 22 of 46 Simulation with Arena, 3rd ed.

System

Clock 12.57

B(t) 1

Q(t) 0

Arrival times of custs. in queue

()

Event calendar [5, 17.03, Dep] [6, 18.69, Arr] [–, 20.00, End]

Number of completed waiting times in queue 5

Total of waiting times in queue 15.17

Area under Q(t) 15.17

Area under B(t) 12.57

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 12.57, Departure of Part 4

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

5

Page 23: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 23 of 46 Simulation with Arena, 3rd ed.

System

Clock 17.03

B(t) 0

Q(t) 0

Arrival times of custs. in queue ()

Event calendar [6, 18.69, Arr] [–, 20.00, End]

Number of completed waiting times in queue 5

Total of waiting times in queue 15.17

Area under Q(t) 15.17

Area under B(t) 17.03

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 17.03, Departure of Part 5

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

Page 24: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 24 of 46 Simulation with Arena, 3rd ed.

System

Clock 18.69

B(t) 1

Q(t) 0

Arrival times of custs. in queue ()

Event calendar [7, 19.39, Arr] [–, 20.00, End] [6, 23.05, Dep]

Number of completed waiting times in queue 6

Total of waiting times in queue 15.17

Area under Q(t) 15.17

Area under B(t) 17.03

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 18.69, Arrival of Part 6

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

6

Page 25: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 25 of 46 Simulation with Arena, 3rd ed.

System

Clock 19.39

B(t) 1

Q(t) 1

Arrival times of custs. in queue

(19.39)

Event calendar [–, 20.00, End] [6, 23.05, Dep] [8, 34.91, Arr]

Number of completed waiting times in queue 6

Total of waiting times in queue 15.17

Area under Q(t) 15.17

Area under B(t) 17.73

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation by Hand: t = 19.39, Arrival of Part 7

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

67

Page 26: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 26 of 46 Simulation with Arena, 3rd ed.

Simulation by Hand: t = 20.00, The End

0

1

2

3

4

0 5 10 15 20

012

0 5 10 15 20

67

System

Clock 20.00

B(t) 1

Q(t) 1

Arrival times of custs. in queue

(19.39)

Event calendar [6, 23.05, Dep] [8, 34.91, Arr]

Number of completed waiting times in queue 6

Total of waiting times in queue 15.17

Area under Q(t) 15.78

Area under B(t) 18.34

Q(t) graph B(t) graph

Time (Minutes)

Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...

Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Page 27: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 27 of 46 Simulation with Arena, 3rd ed.

Simulation by Hand:Finishing Up

• Average waiting time in queue:

• Time-average number in queue:

• Utilization of drill press:

part per minutes 53261715

queue in times of No.queue in times of Total

..

part 79020

7815value clock Final

curve under Area.

.)( tQ

less)(dimension 92020

3418value clock Final

curve under Area.

.)( tB

Page 28: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 28 of 46 Simulation with Arena, 3rd ed.

Randomness in Simulation

• The above was just one “replication” — a sample of size one (not worth much)

• Made a total of five replications:

• Confidence intervals for expected values: In general, For expected total production,

nstX n //, 211 )/.)(.(. 56417762803

042803 ..

Notesubstantialvariabilityacrossreplications

Page 29: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 29 of 46 Simulation with Arena, 3rd ed.

Steps in a Simulation Study

• Understand the system

• Be clear about the goals

• Formulate the model representation

• Translate into modeling software

• Verify “program”

• Validate model

• Design experiments

• Make runs

• Analyze, get insight, document results

Page 30: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Introduction 30

A Simulation Project Requires to Put together a Complete

Mix of Skills on the Team

-Knowledge of the system under investigation

-System analyst skills (model formulation)

-Model building skills (model Programming)

-Data collection skills

-Statistical skills (input data representation,

experimental design, output analysis)

-Management skills (to get everyone pulling in the

same direction)

Page 31: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Steps in a SimulationProject

Page 32: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Data Collection:Input Data Modeling

•Input Analysis activities consist of: data collection data analysis goodness-of-fit testing (Chi-Square and

the Kolmogrov-Smirnov tests).

•The quality of the output is no better than the quality of inputs (GIGO principle).

Page 33: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Introduction 33

Model Translation: Choose The Appropriate Simulation Tools

Assuming Simulation is the appropriate

means, three alternatives exist:1. Build Model in a General Purpose

Language

2. Build Model in a General Simulation Language

3. Use a Special Purpose Simulation Package

Page 34: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Slide 34 of 23

Simulation Languages

• ARENA, Extend, AweSim, Micro Saint, GPSS/SLX, SIMPLE++, SIMUL8 and etc.

Less flexibility Easier to learn More costly

Page 35: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Introduction 35

SPECIAL PURPOSE SIMULATION PACKAGES

NETWORK II.5: Simulator for computer systems

MEDMODEL: Health Care

OPNET: Simulator for communication networks, including wireless networks

SIMFACTORY: Simulator for manufacturing operations

Advantages: Short learning cycle, No programming

Disadvantages: High Cost, Limited Flexibility

Page 36: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Chapter 2 – Fundamental Simulation Concepts

Slide 36 of 46 Simulation with Arena, 3rd ed.

Two Simulation Modeling Approaches

1.Event-Scheduling Approach

2. Process-Interaction Approach

Page 37: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Steps in a SimulationProject

Page 38: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

04/19/23 38

Real-World System

Simulation Model(Conceptual Model)

Simulation Program

Validation

Verification

Verfication & Validation

Page 39: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Verification and Validation 39

Calibration and Validationof Models

RealSystem

InitialModel

First revisionof model

Secondrevisionof model

Revise

Revise

Revise

Compare model

to reality

Compare revised model

to reality

Compare 2nd revised model

to reality

<Iterative process of calibrating a model>

Page 40: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

04/19/23 40

Example

• Suppose, in our current system, average order-filling time is 16.2 hours for orders received via the web. We hope to reduce this by making changes in our logistics system.

• We can check the validity of our simulation model via a hypothesis test.

• We can set up the following test:

H0: simulation mean fill time = 16.2 H1: simulation mean fill time 16.2

Page 41: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

04/19/23 41

Testing

• Run R replications of the simulation model, collecting the average fill time Y1,…,YR on each replication.

• If the data are approximately normally distributed, then we reject

H0 if

1,2//|2.16|

Rt

RSY

Page 42: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

04/19/23 42

What can we conclude?

• If we accept, then the model is valid? No! The model and the real system are

not the same; if we make R large enough, we will eventually reject.

• If we reject, then the model is invalid? No! It may be close enough for the

decision we need to make; we might have accepted if R was smaller.

Page 43: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Steps in a SimulationProject

Page 44: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Experimental Design in Simulation

• There is a huge amount of literature on experimental design and most of it is applicable to simulation.

• Experimental design allows us to efficiently explore the relationship between inputs and outputs.

• In experimental design terminology, the input parameters and structural assumptions are called factors (qualitative, quantitative, controllable, uncontrollable) and the output performance measures are called responses.

Page 45: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Experimental I/O ExamplesExperimental I/O Examples

Example Inputs (factors) Outputs (responses)

Chemical reaction PressureTemperatureCatalyst concentration

Yield

Growing tomatoes FertilizerSoil pHSeed hybridWater

YieldHardiness

Simulation of amanufacturingsystem

Job dispatch ruleNumber of machinesMachines’ reliabilityMean downtimes

ThroughputTime in systemUtilizationsQueue sizes

Page 46: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

46

What Outputs (Responses) to Collect?

There are typically two types of

output:

Discrete-Time Output Data

Continuous-Time Output Data

Page 47: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

47

Discrete-time Output Data

There is a natural “first” observation, “second” observation, etc.—but can only observe them when they “happen”.

If Wi = time in system for the ith part produced (for i = 1, 2, ..., N), and there are N parts produced during the simulation

i1 2 3 N ..................................

Wi

Page 48: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

48

Continuous-time Output DataCan jump into system at any point in time (real, continuous time) and take a “snapshot” of something-there is no natural first or second observation.

If Q(t) = number of parts in a particular queue at time t between [0,T] and we run simulation for T units of simulated time

Q(t)

0

1

2

3

t T

Page 49: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

49

Simulation Model

Inputs: Cycletimes

Interarrivaltimes

Batchsizes

Outputs: Hourlyproduction

Machineutilization

RIRO

DIDO Vs. RIRO Simulation

Page 50: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Steps in a SimulationProject

Page 51: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

OUTPUT ANALYSIS

• Terminating (Transient) Simulations (Starts at time 0 under well-specified initial conditions)

Example: Bank opens at 8:30 am with no customers present and all tellers are available, and closes at 4:30 pm

• Non-terminating (Steady-state) Simulations (Initial conditions are defined by the analyst)

Examples: assembly lines that shut down infrequently, telephone systems, hospital emergency rooms, airport

Whether a simulation is considered to be terminating or non-terminating depends on

both the objectives of the simulation study and the nature of the system.

Simulation with Arena, 3rd ed. Chapter 1 – What Is Simulation?

Slide 51 of 23

Page 52: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

52

Analysis for Steady-State Simulations

Objective: Estimate the steady state mean

Basic question: Should you do many short runs or one long run ?????

lim ( )i iE Y

Many short runs

One long run

X1

X2

X3

X4

X5

X1

Page 53: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Simulation with ARENA©

• What is ARENA©?

Arena is a Microsoft Windows based application package for simulation modeling and analysis. It is a product of Rockwell Software, Inc.

Current version: 14.5 (2014)

• ARENA’s User interface: GUI, interactive and menu driven.

Page 54: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications
Page 55: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Cellular Manufacturing• Cells 1, 2, and 4 each have a single machine, Cell 3

has 2 machines. The two machines in Cell 3 are different: the newer one can process parts in 80% of the time of the older one.

• The system produces 3 parts types, each visiting a different sequence of stations.

• All the process times are triangularly distributed.

• We will collect statistics on resource utilization, time and number in queue, as well as cycle time (time in system, from entry to exit) by part type. Initially, we’ll run the simulation for 2000 minutes.

Page 56: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 1: Wayne International AirportWayne International Airport primarily serves

domestic air traffic. Occasionally, however,

a chartered plane from abroad will arrive

with passengers bound for Wayne's great amusement

parks.

Whenever an international plane

arrives at the airport the two customs

inspectors on duty set up operations to

process the passengers.

Page 57: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 1: Wayne International AirportIncoming passengers must first have their

passports and visas checked. This is handled by

one inspector. The time required to check

a passenger's passports and visas can be

described by the following probability distribution:

Time Probability

20 seconds .20

40 seconds .40

60 seconds .30

80 seconds .10

Page 58: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

After having their passports and visas checked, the passengers next proceed to the second customs official who does baggage inspections. Passengers form a single waiting line with the official inspecting baggage on a first come, first served basis. The time required for baggage inspection is described by the following probability distribution:

Time Time ProbabilityProbability No Time No Time .25 .25

1 minute 1 minute .60 .60 2 minutes 2 minutes .10 .10 3 minutes 3 minutes .05 .05

Exercise 1: Wayne International Airport

Page 59: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 1: Wayne International Airport

A chartered plane from abroad lands at Wayne

Airport with 80 passengers. Simulate the processing

of the first 10 passengers through customs. Use the

following random numbers:

For passport control:

93, 63, 26, 16, 21, 26, 70, 55, 72, 89

For baggage inspection:

13, 08, 60, 13, 68, 40, 40, 27, 23, 64

Page 60: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 1: Wayne International Airport

• Question 1

How long will it take for the first 10 passengers to clear customs?

• Question 2

What is the average length of time a customer waits before having his bags inspected after he clears passport control? How is this estimate biased?

Page 61: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 1: Wayne International AirportAnswer 1: Passenger 10 clears customs after 9 minutes and

20 seconds.

Answer 2: (Baggage Inspection Begins) - (Passport Control Ends)

= 0+0+0+40+0+20+20+40+40+0 = 120 sec.

Average Wait. Time/passenger=120/10 = 12 sec/passenger

This is a biased estimate because we assume that the

simulation began with the system empty. Thus, the

results tend to underestimate the average waiting time.

Page 62: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

EXERCISE 2: Hand Simulation of Ordering Policy

• XYZ company sells CD players (with speakers), which it orders from Fuji Electronics in Japan. Because of shipping and handling costs, each order must be for five CD players. Because of the time it takes to receive an order, the warehouse outlet places an order every time the present stock drops to five CD players. It costs $100 to place an order. It costs the warehouse $400 in lost sales when a customer asks for a CD player and the warehouse is out of stock. It costs $40 to keep each CD player stored in the warehouse. If a customer cannot purchase a CD player when it is requested, the customer will not wait until one comes in but will go to a competitor. The probability distributions for demand and lead time have been determined as follows:

Page 63: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

EXERCISE 2: Hand Simulation of Ordering Policy

Demand per Month Probability

0 .04

1 .08

2 .28

3 .40

4 .16

5 .02

6 .02

  1.00

Page 64: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

EXERCISE 2: Hand Simulation of Ordering Policy

Time to Receive an Order (month) Probability

1 .60

2 .30

3 .10

  1.00

Page 65: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

EXERCISE 2: Hand Simulation of Ordering Policy

• The warehouse has five CD players in stock. Orders are always received at the beginning of the week. Simulate ordering and sales policy for 10 months using the following random numbers and compute the average monthly cost.

RNs (Demand): 39, 72, 37, 87, 98,99, 93, 21,97, 41

RNs (Lead Time):73,75,15, 62, 47, 69, 95, 78, 16, 25

Page 66: OUTLINE Basic Concepts in Modeling and Simulation Building Simulation Models Verification and Validation Designing Experiments Output Analysis Applications

Exercise 3• George Nanchoff owns a gas station. The cars arrive at the gas station

and they are served by one assistant. Use the following inter-arrival time and service distribution to simulate arrival of five cars.

Using the random number sequence: 92, 44, 15, 97, 21, 80, 38, 64, 74, 08 estimate: – the average customer waiting time ,

– average idle time of the assistant,

– the average time a car spends in the system.

Interarrival time (in minutes)

P(X)Service Time (in minutes)

P (X)

4 .35 2 .30

7 .25 4 .40

10 .30 6 .20

20 .10 8 .10