COMP_494_12_10_22_1
COMP_494_12_10_22_1
COMP_494_12_10_22_1
• Dr.Pheobe N Fedha
• Introduce Modelling, simulation
• Applications
• Faster or slower
• designing semiconductors,
• telecommunications,
• E-business models.
next
Formal Definition(s)
• Object is an entity which exists in the real
world that enable study the behavior of a
model.
– input variables,
– performance measures,
– functional relationships.
Modelling Concepts
• Creating, testing, and applying
mathematical models require an
iterative process.
4. Data Collection
Phase 2
3. Model conceptualization
Model Building
5. Model Translation
No Phase 3
6. Verified
Yes Experimentation
No No
7. Validated
Yes
8. Experimental Design
Phase 4
Implementation
9. Model runs and analysis
Problem formulation
Clearly state the problem.
Setting of objectives and overall project plan
How we should approach the problem.
Model conceptualization
Establish a reasonable model.
Data collection
Collect the data necessary to run the simulation (such
as arrival rate, arrival process, service discipline,
service rate etc.).
Model translation
Convert the model into a programming language.
Steps in a Simulation Study
cpu cpu
open
closed
• A model is defined as a representation of a
system for the purpose of studying the
system e.g. mathematical or physical model,
static, dynamic deterministic,, stochastic and
discrete
Classification of Models
• Static Simulation(Monte Carlo Model):
Represents a system at a particular
point in time not affected with time.
Output
Input Input
(Linear) (Non-Linear)
Stable and unstable
– Model output settles down stable
– Model output always changes unstable
Output
Output
Time Time
(Stable) (Unstable)
Discrete Systems:
• A probability distribution is discrete if it
has possible number of values. The state
variables change at discrete time points.
Discrete simulation model
• At time zero there is an event: a customer arrives;
at time nine another customer arrives; at time ten
another customer arrives; at time twelve a
customer is served; and so on. These are examples
of events.
• In a bank, the number of customers
change when a customer arrives and
when the service provided to the
customer is completed.
Output
Input Input
(Deterministic) (Probabilistic)
Stochastic vs deterministic simulations
• A model is deterministic if its
behavior is entirely predictable.
Given a set of inputs, the model will
result in a unique set of outputs.
Served
Calling Jobs Service Jobs
Queue Mechanism
Population
leave the
system
Arrival Queue
Process Discipline
Service
Queue
Process
Configuration
Components of a Basic Queuing Process
The calling population
– The population from which customers/jobs
originate
– The size can be finite or infinite (the latter is
most common)
– Can be homogeneous (only one type of
customers/ jobs) or heterogeneous (several
different kinds of customers/jobs)
The Arrival Process
– Determines how, when and where
customer/jobs arrive to the system
– Important characteristic is the customers’/jobs’
inter-arrival times
– To correctly specify the arrival process requires
data collection of inter-arrival times and
statistical analysis.
ARRIVAL TYPES:
Random arrivals:
Scheduled arrivals e.g. patients to a physician,
airline arrivals to an airport.
Components of a Basic Queuing Process con’t
The queue configuration;
– Specifies the number of queues: Single or
multiple lines to a number of service stations
– Their location
– Their effect on customer behavior
• Balking and reneging
– System Capacity (# of jobs the queue can hold)
• Distinction between infinite and finite
capacity
Jockeying: Customer enters one line and
switches to another to reduce waiting time
• JO
BALKING: Decides not to enter the waiting
queue
RENEGING: Enter and leave before
service
Example – Two Queue Configurations
Servers Servers
Multiple v.s. Single Customer Queue
Configuration
Total
cost
Cost
Cost of
service
Cost of waiting
Process capacity
Examples of Real World Queuing Systems?
• Commercial Queuing Systems
– Commercial organizations serving external customers
– Ex. Dentist, bank, ATM, gas stations, plumber, garage …
• Transportation service systems
– Vehicles are customers or servers
– Ex. Vehicles waiting at toll stations and traffic lights,
trucks or ships waiting to be loaded, taxi cabs, fire
engines, elevators, buses …
• Business-internal service systems
– Customers receiving service are internal to the
organization providing the service
– Ex. Inspection stations, conveyor belts, computer
support …
Mitigating Effects of Long Queues
1.Concealing the queue from arriving
customers
– Ex. Restaurants divert people to the bar ,
amusement parks require people to buy
tickets outside the park, banks broadcast
news on TV at various stations along the
queue, casinos night club queues through
slot machine areas.
2.Use the customer as a resource
– Ex. Patient filling out medical history form
while waiting for physician
Mitigating Effects of Long Queues
3. Making the customer’s wait comfortable and
distracting their attention
– Ex. Complementary drinks at restaurants,
computer games, internet stations, food courts,
shops, etc. at airports
4.Explain reason for the wait
5.Provide pessimistic estimates of the
remaining wait time
– Wait seems shorter if a time estimate is given.
6.Be fair and open about the queuing
disciplines used
A Commonly Seen Queuing Model
• Service times as well as interarrival times are assumed
independent and identically distributed
– If not otherwise specified
• Commonly used notation principle: A/B/C
– A = The interarrival time distribution
– B = The service time distribution
– C = The number of parallel servers
• Commonly used distributions
– M = Markovian (exponential) - Memoryless
– D = Deterministic distribution
– G = General distribution
• Example: M/M/c
– Queuing system with exponentially distributed service and inter-
arrival times and c servers
A donut shop
• Suppose we decided to open a donut shop and are
unsure about how many employees to hire to sell
donuts to costumers. The operations of the shop is
the real-world system whose behavior we want to
understand. Given that the shop is not operating
yet, only a simulation model can provide us with
insights.
• We could devise models of different complexities.
– costumers that arrive at our shop at a particular
rate;
– employees (a number to be given as input) that
take a specific time to serve costumers.
• If we consider a donut shop to be a
deterministic model we would assume that a
new customer arrives every 5 minutes and
an employee takes 2 minutes to serve a
customer.
• System state:
– QN(t): number of patients queuing to see the nurse;
– QD(t): number of patients queuing to see a doctor;
– QA(t): number of patients queuing to see the staff;
– NN(t): number of nurses available to see the patients;
– ND(t): number of doctors available to see patients;
– NA(t): number of administrative staff available to see
patients.
• Resources: patients, nurses, doctors and
administrative staff;
4. Data Collection
Phase 2
3. Model conceptualization
Model Building
5. Model Translation
No Phase 3
6. Verified
Yes Experimentation
No No
7. Validated
Yes
8. Experimental Design
Phase 4
Implementation
9. Model runs and analysis
2. Arrival process
3. Service process
4. Number of servers
1. Calling population:
• The population of potential customers is
referred to as the calling population. ( finite,
or infinite).
– last-in-first-out (LIFO);
–
Common queue disciplines
• First in first out: The customers are served
one at a time and that the customer that has
been waiting the longest is served first.
If we can determine only one of the following, all other values can be
found by substitution:
Number units in system or queue
Mean time in system or queue
State diagram: single-server model
• Little’s Theorem in the context of
modeling and simulation.
L = λW,
• L is queue length
• λ is the average customer arrival rate
• W is delay in the system (wait) or the
average service time for a customer.
Important links
• https://www.youtube.com/watch?v=5q8z4Ik_c08
• https://www.youtube.com/watch?v=SqSUJ0UYWM
Q
• https://www.youtube.com/watch?v=r-z_veLmzYg
• https://www.youtube.com/watch?v=O46ZlKEjjHE
• https://www.youtube.com/watch?v=QppldN-t4pQ
A Markov Chain
• Is a case where future states of a process
are independent of the past and depend
only on the present .