0% found this document useful (0 votes)
4 views

W06 IntroductionToSimulation

Uploaded by

cqws7wz4zh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

W06 IntroductionToSimulation

Uploaded by

cqws7wz4zh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2

Where Does Simulation Stand?

OPIM 404
Business Process
Analysis & Design

Introduction to Simulation Get estimates and


not exact solutions

Tevhide Altekin

1 3
INTRODUCTION TO SIMULATION Model Taxonomy
Collection of elements (act or interact to achieve a
System present objective). The process or facility of interest is
usually called a system. System Model
Ways to study a system Some variables
Why? are random
• Understand (predict) the systems
Experiment with Experiment with behavior, and Deterministic Stochastic
the a model of the • Evaluate various alternatives Time evolution Time evolution
actual system actual system (design or operational). is not important is important

Properties and Static Dynamic Static Dynamic


Precise replica Significant
Physical Mathematical
of an object characteristics of the real Monte Carlo changes
Models Models
(although system are captured in Simulation occur at
executed in a mathematical or logical Continuous Discrete discrete
different equations and relations. time
material and to Simulation instances
Analytical Models
a different
scale). Such as optimization A broad collection of methods and Continuous Discrete
models. They can be applications to mimic the behavior of Discrete
formulated and solved. real systems usually on a computer Event
with appropriate software. Simulation
3a 5
Elements in a Simulation Study
Model Taxonomy (Cont’d)
In developing our conceptual model, we must determine:
§ Entities: Objects of interest (customers, jobs, etc.) that
§ Discrete-Event Simulation (DES) Model
flow through the system.
− Stochastic: Some variables are random − Characterized by its attributes & usually interacts with resources.
− Dynamic: Time evolution is important § Events: An occurrence (arrival, service completion, etc.)
that changes the system state.
− Discrete-Event: Significant changes occur at
§ Input parameters (constants or random variables):
discrete time instances − Uncontrollable, e.g. time between customer arrivals
− Controllable, e.g. number of parallel servers
§ State variables: Variables that define system state at any
§ Monte Carlo Simulation Model given time, e.g. number of customers in system, number of
− Stochastic: Some variables are random busy servers.
§ Performance measures: Output statistics used to
− Static: Time evolution is not important
evaluate objectives, e.g. average waiting time of
customers in system, percentage utilization of servers.
§ Alternative strategies to be evaluated.

Discrete Event Simulation 4 6


Types of Simulation
1. Deterministic vs Stochastic

- No random variates (RV) → No - Input: RVs → Uncertainty of input exists.


Examples of Systems and Elements
probabilistic/random components. - Output is also a RV.
- Given input (and the relationships in the model) →
Unique output (might take a lot of computer time
to evaluate what it is).

2. Static vs Dynamic

- No time component (either look at a system at a - Evolves through time.


particular time or time simply plays no substantive - Behavior of system changes over time.
role). - Example: Conveyor system.
- Example: Monte Carlo Simulation.

3. Continuous vs Discrete

- System state changes continuously. - System state changes at discrete points in


- Example: Altitude of a plane (involves differential time.
equations). - Example: Customers visiting a
supermarket.
6 8

Examples of Systems and Elements Resources


§ What entities compete for
− People
− Equipment
− Space
§ Entity seizes a resource, uses it, releases it
§ Think of a resource being assigned to an entity, rather
than an entity “belonging to” a resource
§ “A” resource can have several units of capacity
− Seats at a table in a restaurant
− Identical ticketing agents at an airline counter
§ Number of units of resource can be changed during the
simulation

7 9

Entities Queues
§ “Players” that move around, change status, affect and § Place for entities to wait when they can’t move on
are affected by other entities (maybe since the resource they want to seize is not
§ Dynamic objects — Get created, move around, leave available)
§ Usually represent “real” things § Have names, often tied to a corresponding resource
§ Can have “fake” entities for modeling “tricks” § Can have a finite capacity to model limited space à
− Breakdown demon, break angel Have to model what to do if an entity shows up to a
• Though Arena has built-in ways to model these queue that’s already full
examples directly
§ Usually watch the length of a queue, waiting time in it.
§ Can have different types of entities concurrently
§ Usually, identifying the types of entities is the first thing
to do in building a model
10 12

Attributes Variables vs. Attributes Example

§ Characteristic of all entities: describe, differentiate


§ All entities have same attribute “slots” but different
values for different entities, for example:
− Time of arrival
− Due date
− Priority
− Color
§ Attribute value tied to a specific entity
§ Like “local” (to entities) variables
§ Some automatic in Arena, some you define

11

Variables (Global)
§ Reflects a characteristic of the whole model, not of
specific entities
§ Used for many different kinds of things
− Travel time between all station pairs
− Number of parts in system
− Simulation clock (built-in Arena variable)
§ Name, value of which there is only one copy for the
whole model
§ Not tied to entities
§ Entities can access, change variables
§ Writing on the wall (rewriteable)
§ Some built-in by Arena, you can define others
12

Variables vs. Attributes Example


13a 13c
Discrete Event Simulation with Python
Main Components of DES Models
Example: Bank with Two Tellers
Python code provided on SUCourse:
§ State Variables: Describe the system at a particular time
DES-BankWithTwoTellersExample.py § Simulation Clock: Keeps track of time
The service times are assumed to be exponential. − Two widely used approaches to advance time it
• Next event time advance (hopping from event to event)&
The average time it takes to The average time it takes to
serve a customer is 1.2 min serve a customer is 1.5 min • Fixed-increment time advance (fixed time interval increments).

§ Statistical Counters: Variables for storing statistical info


about performance parameters
* When a customer enters bank and both § Initialization Routine: A subprogram or class that initializes
tellers are idle, they choose either one. the model at time 0
They wait in a single line for an idle teller
* If a customer enters the bank and there
are 4 people waiting in the line, they will § Timing Routine: A subprogram or a class that determines
leave the bank with a probability of 50%. the next event
* If a customer enters bank and there are
5 or more people waiting in line, they will § Event Routine: A subprogram or a class that updates the
leave the bank with a probability of 60%. system when a particular event occurs
Customers arrive at the bank about every 3 minutes
on average according to a Poisson process.

13b

Bank with Two Tellers Performance Measures


§ Counted
− Number of customers who waited in queue *
− Number of lost customers *
− Number of customers served

§ Time-Averaged
− Average number of customers is queue
− Average number of customers is system
− Utilization of Teller 1 *
− Utilization of Teller 2 *

§ Tallied when Observed


− Average interarrival time *
− Average service time of Teller 1 *
− Average service time of Teller 2 *
The performance measures with a * are − Average waiting time in queue *
reported in the Python code provided on
SUCourse. File name:
− Average time in system
DES-BankWithTwoTellersExample.py

You might also like